diff --git "a/js.js" "b/js.js" new file mode 100644--- /dev/null +++ "b/js.js" @@ -0,0 +1,112728 @@ +/*! For license information please see main.a8c85a887cbc66bdad38.js.LICENSE.txt */ +(() => { + var __webpack_modules__ = { + 4184: (e, t) => { + var i; + ! function() { + "use strict"; + var n = {}.hasOwnProperty; + + function o() { + for (var e = [], t = 0; t < arguments.length; t++) { + var i = arguments[t]; + if (i) { + var r = typeof i; + if ("string" === r || "number" === r) e.push(i); + else if (Array.isArray(i)) { + if (i.length) { + var s = o.apply(null, i); + s && e.push(s) + } + } else if ("object" === r) + if (i.toString === Object.prototype.toString) + for (var a in i) n.call(i, a) && i[a] && e.push(a); + else e.push(i.toString()) + } + } + return e.join(" ") + } + e.exports ? (o.default = o, e.exports = o) : void 0 === (i = function() { + return o + }.apply(t, [])) || (e.exports = i) + }() + }, + 6168: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + ':root{--balloon-border-radius: 2px;--balloon-color: rgba(16,16,16,0.95);--balloon-text-color: #fff;--balloon-font-size: 12px;--balloon-move: 4px}button[aria-label][data-balloon-pos]{overflow:visible}[aria-label][data-balloon-pos]{position:relative;cursor:pointer}[aria-label][data-balloon-pos]:after{opacity:0;pointer-events:none;transition:all 0.18s ease-out 0.18s;text-indent:0;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;font-weight:normal;font-style:normal;text-shadow:none;font-size:var(--balloon-font-size);background:var(--balloon-color);border-radius:2px;color:var(--balloon-text-color);border-radius:var(--balloon-border-radius);content:attr(aria-label);padding:.5em 1em;position:absolute;white-space:nowrap;z-index:10}[aria-label][data-balloon-pos]:before{width:0;height:0;border:5px solid transparent;border-top-color:var(--balloon-color);opacity:0;pointer-events:none;transition:all 0.18s ease-out 0.18s;content:"";position:absolute;z-index:10}[aria-label][data-balloon-pos]:hover:before,[aria-label][data-balloon-pos]:hover:after,[aria-label][data-balloon-pos][data-balloon-visible]:before,[aria-label][data-balloon-pos][data-balloon-visible]:after,[aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:before,[aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:after{opacity:1;pointer-events:none}[aria-label][data-balloon-pos].font-awesome:after{font-family:FontAwesome, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Oxygen, Ubuntu, Cantarell, \'Open Sans\', \'Helvetica Neue\', sans-serif}[aria-label][data-balloon-pos][data-balloon-break]:after{white-space:pre}[aria-label][data-balloon-pos][data-balloon-break][data-balloon-length]:after{white-space:pre-line;word-break:break-word}[aria-label][data-balloon-pos][data-balloon-blunt]:before,[aria-label][data-balloon-pos][data-balloon-blunt]:after{transition:none}[aria-label][data-balloon-pos][data-balloon-pos="up"]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos="up"][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos="down"]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos="down"][data-balloon-visible]:after{transform:translate(-50%, 0)}[aria-label][data-balloon-pos][data-balloon-pos="up"]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos="up"][data-balloon-visible]:before,[aria-label][data-balloon-pos][data-balloon-pos="down"]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos="down"][data-balloon-visible]:before{transform:translate(-50%, 0)}[aria-label][data-balloon-pos][data-balloon-pos*="-left"]:after{left:0}[aria-label][data-balloon-pos][data-balloon-pos*="-left"]:before{left:5px}[aria-label][data-balloon-pos][data-balloon-pos*="-right"]:after{right:0}[aria-label][data-balloon-pos][data-balloon-pos*="-right"]:before{right:5px}[aria-label][data-balloon-pos][data-balloon-po*="-left"]:hover:after,[aria-label][data-balloon-pos][data-balloon-po*="-left"][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos*="-right"]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos*="-right"][data-balloon-visible]:after{transform:translate(0, 0)}[aria-label][data-balloon-pos][data-balloon-po*="-left"]:hover:before,[aria-label][data-balloon-pos][data-balloon-po*="-left"][data-balloon-visible]:before,[aria-label][data-balloon-pos][data-balloon-pos*="-right"]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos*="-right"][data-balloon-visible]:before{transform:translate(0, 0)}[aria-label][data-balloon-pos][data-balloon-pos^="up"]:before,[aria-label][data-balloon-pos][data-balloon-pos^="up"]:after{bottom:100%;transform-origin:top;transform:translate(0, var(--balloon-move))}[aria-label][data-balloon-pos][data-balloon-pos^="up"]:after{margin-bottom:10px}[aria-label][data-balloon-pos][data-balloon-pos="up"]:before,[aria-label][data-balloon-pos][data-balloon-pos="up"]:after{left:50%;transform:translate(-50%, var(--balloon-move))}[aria-label][data-balloon-pos][data-balloon-pos^="down"]:before,[aria-label][data-balloon-pos][data-balloon-pos^="down"]:after{top:100%;transform:translate(0, calc(var(--balloon-move) * -1))}[aria-label][data-balloon-pos][data-balloon-pos^="down"]:after{margin-top:10px}[aria-label][data-balloon-pos][data-balloon-pos^="down"]:before{width:0;height:0;border:5px solid transparent;border-bottom-color:var(--balloon-color)}[aria-label][data-balloon-pos][data-balloon-pos="down"]:after,[aria-label][data-balloon-pos][data-balloon-pos="down"]:before{left:50%;transform:translate(-50%, calc(var(--balloon-move) * -1))}[aria-label][data-balloon-pos][data-balloon-pos="left"]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos="left"][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos="right"]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos="right"][data-balloon-visible]:after{transform:translate(0, -50%)}[aria-label][data-balloon-pos][data-balloon-pos="left"]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos="left"][data-balloon-visible]:before,[aria-label][data-balloon-pos][data-balloon-pos="right"]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos="right"][data-balloon-visible]:before{transform:translate(0, -50%)}[aria-label][data-balloon-pos][data-balloon-pos="left"]:after,[aria-label][data-balloon-pos][data-balloon-pos="left"]:before{right:100%;top:50%;transform:translate(var(--balloon-move), -50%)}[aria-label][data-balloon-pos][data-balloon-pos="left"]:after{margin-right:10px}[aria-label][data-balloon-pos][data-balloon-pos="left"]:before{width:0;height:0;border:5px solid transparent;border-left-color:var(--balloon-color)}[aria-label][data-balloon-pos][data-balloon-pos="right"]:after,[aria-label][data-balloon-pos][data-balloon-pos="right"]:before{left:100%;top:50%;transform:translate(calc(var(--balloon-move) * -1), -50%)}[aria-label][data-balloon-pos][data-balloon-pos="right"]:after{margin-left:10px}[aria-label][data-balloon-pos][data-balloon-pos="right"]:before{width:0;height:0;border:5px solid transparent;border-right-color:var(--balloon-color)}[aria-label][data-balloon-pos][data-balloon-length]:after{white-space:normal}[aria-label][data-balloon-pos][data-balloon-length="small"]:after{width:80px}[aria-label][data-balloon-pos][data-balloon-length="medium"]:after{width:150px}[aria-label][data-balloon-pos][data-balloon-length="large"]:after{width:260px}[aria-label][data-balloon-pos][data-balloon-length="xlarge"]:after{width:380px}@media screen and (max-width: 768px){[aria-label][data-balloon-pos][data-balloon-length="xlarge"]:after{width:90vw}}[aria-label][data-balloon-pos][data-balloon-length="fit"]:after{width:100%}\n', + "" + ]); + const a = s + }, + 2757: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-action-bar {\r\n\twhite-space: nowrap;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-action-bar .actions-container {\r\n\tdisplay: flex;\r\n\tmargin: 0 auto;\r\n\tpadding: 0;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-action-bar.vertical .actions-container {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-action-bar .action-item {\r\n\tdisplay: block;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tcursor: pointer;\r\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\r\n}\r\n\r\n.monaco-action-bar .action-item.disabled {\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-action-bar .action-item .icon,\r\n.monaco-action-bar .action-item .codicon {\r\n\tdisplay: block;\r\n}\r\n\r\n.monaco-action-bar .action-item .codicon {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n}\r\n\r\n.monaco-action-bar .action-label {\r\n\tfont-size: 11px;\r\n\tpadding: 3px;\r\n\tborder-radius: 5px;\r\n}\r\n\r\n.monaco-action-bar .action-item.disabled .action-label,\r\n.monaco-action-bar .action-item.disabled .action-label::before,\r\n.monaco-action-bar .action-item.disabled .action-label:hover {\r\n\topacity: 0.4;\r\n}\r\n\r\n/* Vertical actions */\r\n\r\n.monaco-action-bar.vertical {\r\n\ttext-align: left;\r\n}\r\n\r\n.monaco-action-bar.vertical .action-item {\r\n\tdisplay: block;\r\n}\r\n\r\n.monaco-action-bar.vertical .action-label.separator {\r\n\tdisplay: block;\r\n\tborder-bottom: 1px solid #bbb;\r\n\tpadding-top: 1px;\r\n\tmargin-left: .8em;\r\n\tmargin-right: .8em;\r\n}\r\n\r\n.monaco-action-bar .action-item .action-label.separator {\r\n\twidth: 1px;\r\n\theight: 16px;\r\n\tmargin: 5px 4px !important;\r\n\tcursor: default;\r\n\tmin-width: 1px;\r\n\tpadding: 0;\r\n\tbackground-color: #bbb;\r\n}\r\n\r\n.secondary-actions .monaco-action-bar .action-label {\r\n\tmargin-left: 6px;\r\n}\r\n\r\n/* Action Items */\r\n.monaco-action-bar .action-item.select-container {\r\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\r\n\tflex: 1;\r\n\tmax-width: 170px;\r\n\tmin-width: 60px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tmargin-right: 10px;\r\n}\r\n\r\n.monaco-action-bar .action-item.action-dropdown-item {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-action-bar .action-item.action-dropdown-item > .action-label {\r\n\tmargin-right: 1px;\r\n}\r\n", + "" + ]); + const a = s + }, + 93: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-aria-container {\r\n\tposition: absolute; /* try to hide from window but not from screen readers */\r\n\tleft:-999em;\r\n}", + "" + ]); + const a = s + }, + 2013: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-text-button {\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n\twidth: 100%;\r\n\tpadding: 4px;\r\n\ttext-align: center;\r\n\tcursor: pointer;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-text-button:focus {\r\n\toutline-offset: 2px !important;\r\n}\r\n\r\n.monaco-text-button:hover {\r\n\ttext-decoration: none !important;\r\n}\r\n\r\n.monaco-button.disabled:focus,\r\n.monaco-button.disabled {\r\n\topacity: 0.4 !important;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-text-button > .codicon {\r\n\tmargin: 0 0.2em;\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-button-dropdown {\r\n\tdisplay: flex;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-button-dropdown > .monaco-dropdown-button {\r\n\tmargin-left: 1px;\r\n}\r\n\r\n.monaco-description-button {\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-description-button .monaco-button-label {\r\n\tfont-weight: 500;\r\n}\r\n\r\n.monaco-description-button .monaco-button-description {\r\n\tfont-style: italic;\r\n}\r\n", + "" + ]); + const a = s + }, + 4664: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-custom-checkbox {\r\n\tmargin-left: 2px;\r\n\tfloat: left;\r\n\tcursor: pointer;\r\n\toverflow: hidden;\r\n\topacity: 0.7;\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tborder: 1px solid transparent;\r\n\tpadding: 1px;\r\n\tbox-sizing:\tborder-box;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-custom-checkbox:hover,\r\n.monaco-custom-checkbox.checked {\r\n\topacity: 1;\r\n}\r\n\r\n.hc-black .monaco-custom-checkbox {\r\n\tbackground: none;\r\n}\r\n\r\n.hc-black .monaco-custom-checkbox:hover {\r\n\tbackground: none;\r\n}\r\n\r\n.monaco-custom-checkbox.monaco-simple-checkbox {\r\n\theight: 18px;\r\n\twidth: 18px;\r\n\tborder: 1px solid transparent;\r\n\tborder-radius: 3px;\r\n\tmargin-right: 9px;\r\n\tmargin-left: 0px;\r\n\tpadding: 0px;\r\n\topacity: 1;\r\n\tbackground-size: 16px !important;\r\n}\r\n\r\n/* hide check when unchecked */\r\n.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked)::before {\r\n\tvisibility: hidden;\r\n}\r\n", + "" + ]); + const a = s + }, + 4081: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.codicon-wrench-subaction {\r\n\topacity: 0.5;\r\n}\r\n\r\n@keyframes codicon-spin {\r\n\t100% {\r\n\t\ttransform:rotate(360deg);\r\n\t}\r\n}\r\n\r\n.codicon-sync.codicon-modifier-spin,\r\n.codicon-loading.codicon-modifier-spin,\r\n.codicon-gear.codicon-modifier-spin,\r\n.codicon-notebook-state-executing.codicon-modifier-spin {\r\n\t/* Use steps to throttle FPS to reduce CPU usage */\r\n\tanimation: codicon-spin 1.5s steps(30) infinite;\r\n}\r\n\r\n.codicon-modifier-disabled {\r\n\topacity: 0.4;\r\n}\r\n\r\n/* custom speed & easing for loading icon */\r\n.codicon-loading,\r\n.codicon-tree-item-loading::before {\r\n\tanimation-duration: 1s !important;\r\n\tanimation-timing-function: cubic-bezier(0.53, 0.21, 0.29, 0.67) !important;\r\n}\r\n", + "" + ]); + const a = s + }, + 58: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => u + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r), + a = i(1667), + l = i.n(a), + d = new URL(i(7485), i.b), + c = s()(o()), + h = l()(d); + c.push([e.id, + '/*---------------------------------------------------------------------------------------------\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@font-face {\r\n\tfont-family: "codicon";\r\n\tfont-display: block;\r\n\tsrc: url(' + + h + + ") format(\"truetype\");\r\n}\r\n\r\n.codicon[class*='codicon-'] {\r\n\tfont: normal normal normal 16px/1 codicon;\r\n\tdisplay: inline-block;\r\n\ttext-decoration: none;\r\n\ttext-rendering: auto;\r\n\ttext-align: center;\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n/* icon rules are dynamically created in codiconStyles */\r\n", + "" + ]); + const u = c + }, + 6328: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.context-view {\r\n\tposition: absolute;\r\n\tz-index: 2500;\r\n}\r\n\r\n.context-view.fixed {\r\n\tall: initial;\r\n\tfont-family: inherit;\r\n\tfont-size: 13px;\r\n\tposition: fixed;\r\n\tz-index: 2500;\r\n\tcolor: inherit;\r\n}\r\n", + "" + ]); + const a = s + }, + 477: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-count-badge {\r\n\tpadding: 3px 6px;\r\n\tborder-radius: 11px;\r\n\tfont-size: 11px;\r\n\tmin-width: 18px;\r\n\tmin-height: 18px;\r\n\tline-height: 11px;\r\n\tfont-weight: normal;\r\n\ttext-align: center;\r\n\tdisplay: inline-block;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-count-badge.long {\r\n\tpadding: 2px 3px;\r\n\tborder-radius: 2px;\r\n\tmin-height: auto;\r\n\tline-height: normal;\r\n}\r\n", + "" + ]); + const a = s + }, + 5035: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-dropdown {\r\n\theight: 100%;\r\n\tpadding: 0;\r\n}\r\n\r\n.monaco-dropdown > .dropdown-label {\r\n\tcursor: pointer;\r\n\theight: 100%;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.monaco-dropdown > .dropdown-label > .action-label.disabled {\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-dropdown-with-primary {\r\n\tdisplay: flex !important;\r\n\tflex-direction: row;\r\n\tborder-radius: 5px;\r\n}\r\n\r\n.monaco-dropdown-with-primary > .action-container > .action-label {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\r\n\tfont-size: 12px;\r\n\tpadding-left: 0px;\r\n\tpadding-right: 0px;\r\n\tline-height: 16px;\r\n\tmargin-left: -3px;\r\n}\r\n\r\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\r\n\tdisplay: block;\r\n\tbackground-size: 16px;\r\n\tbackground-position: center center;\r\n\tbackground-repeat: no-repeat;\r\n}\r\n", + "" + ]); + const a = s + }, + 6266: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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/* ---------- Find input ---------- */\r\n\r\n.monaco-findInput {\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-findInput .monaco-inputbox {\r\n\tfont-size: 13px;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-findInput > .controls {\r\n\tposition: absolute;\r\n\ttop: 3px;\r\n\tright: 2px;\r\n}\r\n\r\n.vs .monaco-findInput.disabled {\r\n\tbackground-color: #E1E1E1;\r\n}\r\n\r\n/* Theming */\r\n.vs-dark .monaco-findInput.disabled {\r\n\tbackground-color: #333;\r\n}\r\n\r\n/* Highlighting */\r\n.monaco-findInput.highlight-0 .controls {\r\n\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\r\n}\r\n.monaco-findInput.highlight-1 .controls {\r\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\r\n}\r\n.hc-black .monaco-findInput.highlight-0 .controls,\r\n.vs-dark .monaco-findInput.highlight-0 .controls {\r\n\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\r\n}\r\n.hc-black .monaco-findInput.highlight-1 .controls,\r\n.vs-dark .monaco-findInput.highlight-1 .controls {\r\n\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\r\n}\r\n\r\n@keyframes monaco-findInput-highlight-0 {\r\n\t0% { background: rgba(253, 255, 0, 0.8); }\r\n\t100% { background: transparent; }\r\n}\r\n@keyframes monaco-findInput-highlight-1 {\r\n\t0% { background: rgba(253, 255, 0, 0.8); }\r\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\r\n\t99% { background: transparent; }\r\n}\r\n\r\n@keyframes monaco-findInput-highlight-dark-0 {\r\n\t0% { background: rgba(255, 255, 255, 0.44); }\r\n\t100% { background: transparent; }\r\n}\r\n@keyframes monaco-findInput-highlight-dark-1 {\r\n\t0% { background: rgba(255, 255, 255, 0.44); }\r\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\r\n\t99% { background: transparent; }\r\n}", + "" + ]); + const a = s + }, + 3039: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-hover {\r\n\tcursor: default;\r\n\tposition: absolute;\r\n\toverflow: hidden;\r\n\tz-index: 50;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tbox-sizing: initial;\r\n\tanimation: fadein 100ms linear;\r\n\tline-height: 1.5em;\r\n}\r\n\r\n.monaco-hover.hidden {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-hover .hover-contents {\r\n\tpadding: 4px 8px;\r\n}\r\n\r\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {\r\n\tmax-width: 500px;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-hover p,\r\n.monaco-hover .code,\r\n.monaco-hover ul {\r\n\tmargin: 8px 0;\r\n}\r\n\r\n.monaco-hover code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-hover hr {\r\n\tbox-sizing: border-box;\r\n\tborder-left: 0px;\r\n\tborder-right: 0px;\r\n\tmargin-top: 4px;\r\n\tmargin-bottom: -4px;\r\n\tmargin-left: -8px;\r\n\tmargin-right: -8px;\r\n\theight: 1px;\r\n}\r\n\r\n.monaco-hover p:first-child,\r\n.monaco-hover .code:first-child,\r\n.monaco-hover ul:first-child {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-hover p:last-child,\r\n.monaco-hover .code:last-child,\r\n.monaco-hover ul:last-child {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n/* MarkupContent Layout */\r\n.monaco-hover ul {\r\n\tpadding-left: 20px;\r\n}\r\n.monaco-hover ol {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-hover li > p {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.monaco-hover li > ul {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-hover code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-hover .monaco-tokenized-source {\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar {\r\n\tfont-size: 12px;\r\n\tline-height: 22px;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions {\r\n\tdisplay: flex;\r\n\tpadding: 0px 8px;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions .action-container {\r\n\tmargin-right: 16px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {\r\n\tpadding-right: 4px;\r\n}\r\n\r\n.monaco-hover .markdown-hover .hover-contents .codicon {\r\n\tcolor: inherit;\r\n\tfont-size: inherit;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link:hover,\r\n.monaco-hover .hover-contents a.code-link {\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link:before {\r\n\tcontent: '(';\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link:after {\r\n\tcontent: ')';\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link > span {\r\n\ttext-decoration: underline;\r\n\t/** Hack to force underline to show **/\r\n\tborder-bottom: 1px solid transparent;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n/** Spans in markdown hovers need a margin-bottom to avoid looking cramped: https://github.com/microsoft/vscode/issues/101496 **/\r\n.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents) span {\r\n\tmargin-bottom: 4px;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-hover-content .action-container a {\r\n\t-webkit-user-select: none;\r\n\tuser-select: none;\r\n}\r\n\r\n.monaco-hover-content .action-container.disabled {\r\n\tpointer-events: none;\r\n\topacity: 0.4;\r\n\tcursor: default;\r\n}\r\n", + "" + ]); + const a = s + }, + 4269: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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/* ---------- Icon label ---------- */\r\n\r\n.monaco-icon-label {\r\n\tdisplay: flex; /* required for icons support :before rule */\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-icon-label::before {\r\n\r\n\t/* svg icons rendered as background image */\r\n\tbackground-size: 16px;\r\n\tbackground-position: left center;\r\n\tbackground-repeat: no-repeat;\r\n\tpadding-right: 6px;\r\n\twidth: 16px;\r\n\theight: 22px;\r\n\tline-height: inherit !important;\r\n\tdisplay: inline-block;\r\n\r\n\t/* fonts icons */\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n\tvertical-align: top;\r\n\r\n\tflex-shrink: 0; /* fix for https://github.com/microsoft/vscode/issues/13787 */\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container {\r\n\tmin-width: 0;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\r\n\tcolor: inherit;\r\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\r\n\tmargin: 0 2px;\r\n\topacity: 0.5;\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\topacity: .7;\r\n\tmargin-left: 0.5em;\r\n\tfont-size: 0.9em;\r\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\r\n}\r\n\r\n.monaco-icon-label.nowrap > .monaco-icon-label-container > .monaco-icon-description-container > .label-description{\r\n\twhite-space: nowrap\r\n}\r\n\r\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\topacity: .95;\r\n}\r\n\r\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\r\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-icon-label.deprecated {\r\n\ttext-decoration: line-through;\r\n\topacity: 0.66;\r\n}\r\n\r\n/* make sure apply italic font style to decorations as well */\r\n.monaco-icon-label.italic::after {\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\r\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.monaco-icon-label::after {\r\n\topacity: 0.75;\r\n\tfont-size: 90%;\r\n\tfont-weight: 600;\r\n\tmargin: 0 16px 0 5px;\r\n\ttext-align: center;\r\n}\r\n\r\n/* make sure selection color wins when a label is being selected */\r\n.monaco-list:focus .selected .monaco-icon-label, /* list */\r\n.monaco-list:focus .selected .monaco-icon-label::after\r\n{\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-list-row.focused.selected .label-description,\r\n.monaco-list-row.selected .label-description {\r\n\topacity: .8;\r\n}\r\n", + "" + ]); + const a = s + }, + 1188: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-inputbox {\r\n\tposition: relative;\r\n\tdisplay: block;\r\n\tpadding: 0;\r\n\tbox-sizing:\tborder-box;\r\n\r\n\t/* Customizable */\r\n\tfont-size: inherit;\r\n}\r\n\r\n.monaco-inputbox.idle {\r\n\tborder: 1px solid transparent;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > .input,\r\n.monaco-inputbox > .ibwrapper > .mirror {\r\n\r\n\t/* Customizable */\r\n\tpadding: 4px;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > .input {\r\n\tdisplay: inline-block;\r\n\tbox-sizing:\tborder-box;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tline-height: inherit;\r\n\tborder: none;\r\n\tfont-family: inherit;\r\n\tfont-size: inherit;\r\n\tresize: none;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > input {\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > textarea.input {\r\n\tdisplay: block;\r\n\t-ms-overflow-style: none; /* IE 10+: hide scrollbars */\r\n\tscrollbar-width: none; /* Firefox: hide scrollbars */\r\n\toutline: none;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > textarea.input::-webkit-scrollbar {\r\n\tdisplay: none; /* Chrome + Safari: hide scrollbar */\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > textarea.input.empty {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > .mirror {\r\n\tposition: absolute;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbox-sizing: border-box;\r\n\twhite-space: pre-wrap;\r\n\tvisibility: hidden;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n/* Context view */\r\n\r\n.monaco-inputbox-container {\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-inputbox-container .monaco-inputbox-message {\r\n\tdisplay: inline-block;\r\n\toverflow: hidden;\r\n\ttext-align: left;\r\n\twidth: 100%;\r\n\tbox-sizing:\tborder-box;\r\n\tpadding: 0.4em;\r\n\tfont-size: 12px;\r\n\tline-height: 17px;\r\n\tmargin-top: -1px;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n/* Action bar support */\r\n.monaco-inputbox .monaco-action-bar {\r\n\tposition: absolute;\r\n\tright: 2px;\r\n\ttop: 4px;\r\n}\r\n\r\n.monaco-inputbox .monaco-action-bar .action-item {\r\n\tmargin-left: 2px;\r\n}\r\n\r\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\r\n\tbackground-repeat: no-repeat;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n}\r\n", + "" + ]); + const a = s + }, + 2298: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-keybinding {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tline-height: 10px;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key {\r\n\tdisplay: inline-block;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n\tborder-radius: 3px;\r\n\tvertical-align: middle;\r\n\tfont-size: 11px;\r\n\tpadding: 3px 5px;\r\n\tmargin: 0 2px;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key:first-child {\r\n\tmargin-left: 0;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key:last-child {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key-separator {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\r\n\twidth: 6px;\r\n}\r\n", + "" + ]); + const a = s + }, + 7703: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-list {\r\n\tposition: relative;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-list.mouse-support {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-list > .monaco-scrollable-element {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-list-rows {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-list.horizontal-scrolling .monaco-list-rows {\r\n\twidth: auto;\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-list-row {\r\n\tposition: absolute;\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-list.mouse-support .monaco-list-row {\r\n\tcursor: pointer;\r\n\ttouch-action: none;\r\n}\r\n\r\n/* for OS X ballistic scrolling */\r\n.monaco-list-row.scrolling {\r\n\tdisplay: none !important;\r\n}\r\n\r\n/* Focus */\r\n.monaco-list.element-focused,\r\n.monaco-list.selection-single,\r\n.monaco-list.selection-multiple {\r\n\toutline: 0 !important;\r\n}\r\n\r\n/* Dnd */\r\n.monaco-drag-image {\r\n\tdisplay: inline-block;\r\n\tpadding: 1px 7px;\r\n\tborder-radius: 10px;\r\n\tfont-size: 12px;\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n}\r\n\r\n/* Type filter */\r\n\r\n.monaco-list-type-filter {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tposition: absolute;\r\n\tborder-radius: 2px;\r\n\tpadding: 0px 3px;\r\n\tmax-width: calc(100% - 10px);\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n\ttext-align: right;\r\n\tbox-sizing: border-box;\r\n\tcursor: all-scroll;\r\n\tfont-size: 13px;\r\n\tline-height: 18px;\r\n\theight: 20px;\r\n\tz-index: 1;\r\n\ttop: 4px;\r\n}\r\n\r\n.monaco-list-type-filter.dragging {\r\n\ttransition: top 0.2s, left 0.2s;\r\n}\r\n\r\n.monaco-list-type-filter.ne {\r\n\tright: 4px;\r\n}\r\n\r\n.monaco-list-type-filter.nw {\r\n\tleft: 4px;\r\n}\r\n\r\n.monaco-list-type-filter > .controls {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tbox-sizing: border-box;\r\n\ttransition: width 0.2s;\r\n\twidth: 0;\r\n}\r\n\r\n.monaco-list-type-filter.dragging > .controls,\r\n.monaco-list-type-filter:hover > .controls {\r\n\twidth: 36px;\r\n}\r\n\r\n.monaco-list-type-filter > .controls > * {\r\n\tborder: none;\r\n\tbox-sizing: border-box;\r\n\t-webkit-appearance: none;\r\n\t-moz-appearance: none;\r\n\tbackground: none;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tflex-shrink: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-list-type-filter > .controls > .filter {\r\n\tmargin-left: 4px;\r\n}\r\n\r\n.monaco-list-type-filter-message {\r\n\tposition: absolute;\r\n\tbox-sizing: border-box;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tpadding: 40px 1em 1em 1em;\r\n\ttext-align: center;\r\n\twhite-space: normal;\r\n\topacity: 0.7;\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-list-type-filter-message:empty {\r\n\tdisplay: none;\r\n}\r\n\r\n/* Electron */\r\n\r\n.monaco-list-type-filter {\r\n\tcursor: grab;\r\n}\r\n\r\n.monaco-list-type-filter.dragging {\r\n\tcursor: grabbing;\r\n}\r\n", + "" + ]); + const a = s + }, + 7548: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => p + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r), + a = i(1667), + l = i.n(a), + d = new URL(i(4768), i.b), + c = new URL(i(5555), i.b), + h = s()(o()), + u = l()(d), + g = l()(c); + h.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-mouse-cursor-text {\r\n\tcursor: text;\r\n}\r\n\r\n/* The following selector looks a bit funny, but that is needed to cover all the workbench and the editor!! */\r\n.vs-dark .mac .monaco-mouse-cursor-text, .hc-black .mac .monaco-mouse-cursor-text,\r\n.vs-dark.mac .monaco-mouse-cursor-text, .hc-black.mac .monaco-mouse-cursor-text {\r\n\tcursor: -webkit-image-set(url(" + + u + ") 1x, url(" + g + ") 2x) 5 8, text;\r\n}\r\n", "" + ]); + const p = h + }, + 4185: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-progress-container {\r\n\twidth: 100%;\r\n\theight: 5px;\r\n\toverflow: hidden; /* keep progress bit in bounds */\r\n}\r\n\r\n.monaco-progress-container .progress-bit {\r\n\twidth: 2%;\r\n\theight: 5px;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-progress-container.active .progress-bit {\r\n\tdisplay: inherit;\r\n}\r\n\r\n.monaco-progress-container.discrete .progress-bit {\r\n\tleft: 0;\r\n\ttransition: width 100ms linear;\r\n}\r\n\r\n.monaco-progress-container.discrete.done .progress-bit {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-progress-container.infinite .progress-bit {\r\n\tanimation-name: progress;\r\n\tanimation-duration: 4s;\r\n\tanimation-iteration-count: infinite;\r\n\tanimation-timing-function: linear;\r\n\ttransform: translate3d(0px, 0px, 0px);\r\n}\r\n\r\n/**\r\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\r\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\r\n * its relative size to the parent container:\r\n * parent width: 5000%\r\n * bit width: 100%\r\n * translateX should be as follow:\r\n * 50%: 5000% * 50% - 50% (set to center) = 2450%\r\n * 100%: 5000% * 100% - 100% (do not overflow) = 4900%\r\n */\r\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4900%) scaleX(1) } }\r\n", + "" + ]); + const a = s + }, + 1629: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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:root {\r\n\t--sash-size: 4px;\r\n}\r\n\r\n.monaco-sash {\r\n\tposition: absolute;\r\n\tz-index: 35;\r\n\ttouch-action: none;\r\n}\r\n\r\n.monaco-sash.disabled {\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-sash.mac.vertical {\r\n\tcursor: col-resize;\r\n}\r\n\r\n.monaco-sash.vertical.minimum {\r\n\tcursor: e-resize;\r\n}\r\n\r\n.monaco-sash.vertical.maximum {\r\n\tcursor: w-resize;\r\n}\r\n\r\n.monaco-sash.mac.horizontal {\r\n\tcursor: row-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.minimum {\r\n\tcursor: s-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.maximum {\r\n\tcursor: n-resize;\r\n}\r\n\r\n.monaco-sash.disabled {\r\n\tcursor: default !important;\r\n\tpointer-events: none !important;\r\n}\r\n\r\n.monaco-sash.vertical {\r\n\tcursor: ew-resize;\r\n\ttop: 0;\r\n\twidth: var(--sash-size);\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-sash.horizontal {\r\n\tcursor: ns-resize;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: var(--sash-size);\r\n}\r\n\r\n.monaco-sash:not(.disabled) > .orthogonal-drag-handle {\r\n\tcontent: \" \";\r\n\theight: calc(var(--sash-size) * 2);\r\n\twidth: calc(var(--sash-size) * 2);\r\n\tz-index: 100;\r\n\tdisplay: block;\r\n\tcursor: all-scroll;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\r\n\t> .orthogonal-drag-handle.start,\r\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\r\n\t> .orthogonal-drag-handle.end {\r\n\tcursor: nwse-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\r\n\t> .orthogonal-drag-handle.end,\r\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\r\n\t> .orthogonal-drag-handle.start {\r\n\tcursor: nesw-resize;\r\n}\r\n\r\n.monaco-sash.vertical > .orthogonal-drag-handle.start {\r\n\tleft: calc(var(--sash-size) * -0.5);\r\n\ttop: calc(var(--sash-size) * -1);\r\n}\r\n.monaco-sash.vertical > .orthogonal-drag-handle.end {\r\n\tleft: calc(var(--sash-size) * -0.5);\r\n\tbottom: calc(var(--sash-size) * -1);\r\n}\r\n.monaco-sash.horizontal > .orthogonal-drag-handle.start {\r\n\ttop: calc(var(--sash-size) * -0.5);\r\n\tleft: calc(var(--sash-size) * -1);\r\n}\r\n.monaco-sash.horizontal > .orthogonal-drag-handle.end {\r\n\ttop: calc(var(--sash-size) * -0.5);\r\n\tright: calc(var(--sash-size) * -1);\r\n}\r\n\r\n.monaco-sash:before {\r\n\tcontent: '';\r\n\tpointer-events: none;\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttransition: background-color 0.1s ease-out;\r\n\tbackground: transparent;\r\n}\r\n\r\n.monaco-sash.vertical:before {\r\n\twidth: var(--sash-hover-size);\r\n\tleft: calc(50% - (var(--sash-hover-size) / 2));\r\n}\r\n\r\n.monaco-sash.horizontal:before {\r\n\theight: var(--sash-hover-size);\r\n\ttop: calc(50% - (var(--sash-hover-size) / 2));\r\n}\r\n\r\n/** Debug **/\r\n\r\n.monaco-sash.debug {\r\n\tbackground: cyan;\r\n}\r\n\r\n.monaco-sash.debug.disabled {\r\n\tbackground: rgba(0, 255, 255, 0.2);\r\n}\r\n\r\n.monaco-sash.debug:not(.disabled) > .orthogonal-drag-handle {\r\n\tbackground: red;\r\n}\r\n", + "" + ]); + const a = s + }, + 7198: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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/* Arrows */\r\n.monaco-scrollable-element > .scrollbar > .scra {\r\n\tcursor: pointer;\r\n\tfont-size: 11px !important;\r\n}\r\n\r\n.monaco-scrollable-element > .visible {\r\n\topacity: 1;\r\n\r\n\t/* Background rule added for IE9 - to allow clicks on dom node */\r\n\tbackground:rgba(0,0,0,0);\r\n\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-scrollable-element > .invisible {\r\n\topacity: 0;\r\n\tpointer-events: none;\r\n}\r\n.monaco-scrollable-element > .invisible.fade {\r\n\ttransition: opacity 800ms linear;\r\n}\r\n\r\n/* Scrollable Content Inset Shadow */\r\n.monaco-scrollable-element > .shadow {\r\n\tposition: absolute;\r\n\tdisplay: none;\r\n}\r\n.monaco-scrollable-element > .shadow.top {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\theight: 3px;\r\n\twidth: 100%;\r\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.left {\r\n\tdisplay: block;\r\n\ttop: 3px;\r\n\tleft: 0;\r\n\theight: 100%;\r\n\twidth: 3px;\r\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.top-left-corner {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 3px;\r\n\twidth: 3px;\r\n}\r\n.monaco-scrollable-element > .shadow.top.left {\r\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\r\n}\r\n\r\n/* ---------- Default Style ---------- */\r\n\r\n.vs .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(100, 100, 100, .4);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(121, 121, 121, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(111, 195, 223, .6);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(100, 100, 100, .7);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(111, 195, 223, .8);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(0, 0, 0, .6);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(191, 191, 191, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(111, 195, 223, 1);\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: #000 6px 0 6px -6px inset;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: #000 6px 6px 6px -6px inset;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: none;\r\n}\r\n", + "" + ]); + const a = s + }, + 2470: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-split-view2 {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2 > .sash-container {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-split-view2 > .sash-container > .monaco-sash {\r\n\tpointer-events: initial;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\twhite-space: nowrap;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view {\r\n\twhite-space: initial;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view:not(.visible) {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-split-view2.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-split-view2.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2.separator-border > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\tcontent: ' ';\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tz-index: 5;\r\n\tpointer-events: none;\r\n\tbackground-color: var(--separator-border);\r\n}\r\n\r\n.monaco-split-view2.separator-border.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\theight: 100%;\r\n\twidth: 1px;\r\n}\r\n\r\n.monaco-split-view2.separator-border.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\theight: 1px;\r\n\twidth: 100%;\r\n}\r\n", + "" + ]); + const a = s + }, + 1728: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + '/*---------------------------------------------------------------------------------------------\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.monaco-table {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tposition: relative;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-table > .monaco-split-view2 {\r\n\tborder-bottom: 1px solid transparent;\r\n}\r\n\r\n.monaco-table > .monaco-list {\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-table-tr {\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-table-th {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tfont-weight: bold;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-table-th,\r\n.monaco-table-td {\r\n\tbox-sizing: border-box;\r\n\tflex-shrink: 0;\r\n\toverflow: hidden;\r\n\twhite-space: nowrap;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\r\n\tcontent: "";\r\n\tposition: absolute;\r\n\tleft: calc(var(--sash-size) / 2);\r\n\twidth: 0;\r\n\tborder-left: 1px solid transparent;\r\n}\r\n\r\n.monaco-table > .monaco-split-view2,\r\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\r\n\ttransition: border-color 0.2s ease-out;\r\n}\r\n/*\r\n.monaco-table:hover > .monaco-split-view2,\r\n.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\r\n\tborder-color: rgba(204, 204, 204, 0.2);\r\n} */\r\n', + "" + ]); + const a = s + }, + 1766: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-tl-row {\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\talign-items: center;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-tl-indent {\r\n\theight: 100%;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 16px;\r\n\tpointer-events: none;\r\n}\r\n\r\n.hide-arrows .monaco-tl-indent {\r\n\tleft: 12px;\r\n}\r\n\r\n.monaco-tl-indent > .indent-guide {\r\n\tdisplay: inline-block;\r\n\tbox-sizing: border-box;\r\n\theight: 100%;\r\n\tborder-left: 1px solid transparent;\r\n}\r\n\r\n.monaco-tl-indent > .indent-guide {\r\n\ttransition: border-color 0.1s linear;\r\n}\r\n\r\n.monaco-tl-twistie,\r\n.monaco-tl-contents {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-tl-twistie {\r\n\tfont-size: 10px;\r\n\ttext-align: right;\r\n\tpadding-right: 6px;\r\n\tflex-shrink: 0;\r\n\twidth: 16px;\r\n\tdisplay: flex !important;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\ttransform: translateX(3px);\r\n}\r\n\r\n.monaco-tl-contents {\r\n\tflex: 1;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-tl-twistie::before {\r\n\tborder-radius: 20px;\r\n}\r\n\r\n.monaco-tl-twistie.collapsed::before {\r\n\ttransform: rotate(-90deg);\r\n}\r\n\r\n.monaco-tl-twistie.codicon-tree-item-loading::before {\r\n\t/* Use steps to throttle FPS to reduce CPU usage */\r\n\tanimation: codicon-spin 1.25s steps(30) infinite;\r\n}\r\n", + "" + ]); + const a = s + }, + 3257: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.quick-input-widget {\r\n\tposition: absolute;\r\n\twidth: 600px;\r\n\tz-index: 2000;\r\n\tpadding: 0 1px 1px 1px;\r\n\tleft: 50%;\r\n\tmargin-left: -300px;\r\n}\r\n\r\n.quick-input-titlebar {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-left-action-bar {\r\n\tdisplay: flex;\r\n\tmargin-left: 4px;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-title {\r\n\tpadding: 3px 0px;\r\n\ttext-align: center;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.quick-input-right-action-bar {\r\n\tdisplay: flex;\r\n\tmargin-right: 4px;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-right-action-bar > .actions-container {\r\n\tjustify-content: flex-end;\r\n}\r\n\r\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\r\n\tbackground-position: center;\r\n\tbackground-repeat: no-repeat;\r\n\tpadding: 2px;\r\n}\r\n\r\n.quick-input-description {\r\n\tmargin: 6px;\r\n}\r\n\r\n.quick-input-header .quick-input-description {\r\n\tmargin: 4px 2px;\r\n}\r\n\r\n.quick-input-header {\r\n\tdisplay: flex;\r\n\tpadding: 6px 6px 0px 6px;\r\n\tmargin-bottom: -2px;\r\n}\r\n\r\n.quick-input-widget.hidden-input .quick-input-header {\r\n\t/* reduce margins and paddings when input box hidden */\r\n\tpadding: 0;\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.quick-input-and-message {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tflex-grow: 1;\r\n\tmin-width: 0;\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-check-all {\r\n\talign-self: center;\r\n\tmargin: 0;\r\n}\r\n\r\n.quick-input-filter {\r\n\tflex-grow: 1;\r\n\tdisplay: flex;\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-box {\r\n\tflex-grow: 1;\r\n}\r\n\r\n.quick-input-widget.show-checkboxes .quick-input-box,\r\n.quick-input-widget.show-checkboxes .quick-input-message {\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.quick-input-visible-count {\r\n\tposition: absolute;\r\n\tleft: -10000px;\r\n}\r\n\r\n.quick-input-count {\r\n\talign-self: center;\r\n\tposition: absolute;\r\n\tright: 4px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-count .monaco-count-badge {\r\n\tvertical-align: middle;\r\n\tpadding: 2px 4px;\r\n\tborder-radius: 2px;\r\n\tmin-height: auto;\r\n\tline-height: normal;\r\n}\r\n\r\n.quick-input-action {\r\n\tmargin-left: 6px;\r\n}\r\n\r\n.quick-input-action .monaco-text-button {\r\n\tfont-size: 11px;\r\n\tpadding: 0 6px;\r\n\tdisplay: flex;\r\n\theight: 27.5px;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-message {\r\n\tmargin-top: -1px;\r\n\tpadding: 5px 5px 2px 5px;\r\n\toverflow-wrap: break-word;\r\n}\r\n\r\n.quick-input-message > .codicon {\r\n\tmargin: 0 0.2em;\r\n\tvertical-align: text-bottom;\r\n}\r\n\r\n.quick-input-progress.monaco-progress-container {\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-progress.monaco-progress-container,\r\n.quick-input-progress.monaco-progress-container .progress-bit {\r\n\theight: 2px;\r\n}\r\n\r\n.quick-input-list {\r\n\tline-height: 22px;\r\n\tmargin-top: 6px;\r\n}\r\n\r\n.quick-input-widget.hidden-input .quick-input-list {\r\n\tmargin-top: 0; /* reduce margins when input box hidden */\r\n}\r\n\r\n.quick-input-list .monaco-list {\r\n\toverflow: hidden;\r\n\tmax-height: calc(20 * 22px);\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry {\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\tpadding: 0 6px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\r\n\tborder-top-width: 1px;\r\n\tborder-top-style: solid;\r\n}\r\n\r\n.quick-input-list .monaco-list-row[data-index=\"0\"] .quick-input-list-entry.quick-input-list-separator-border {\r\n\tborder-top-style: none;\r\n}\r\n\r\n.quick-input-list .quick-input-list-label {\r\n\toverflow: hidden;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-list .quick-input-list-checkbox {\r\n\talign-self: center;\r\n\tmargin: 0;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\theight: 100%;\r\n\tflex: 1;\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\r\n\tmargin-left: 10px;\r\n}\r\n\r\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\r\n\tdisplay: none;\r\n}\r\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\r\n\tdisplay: inline;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\r\n\tflex: 1; /* make sure the icon label grows within the row */\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\r\n\tvertical-align: text-bottom;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label span {\r\n\topacity: 1;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\r\n\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\r\n}\r\n\r\n.quick-input-list .quick-input-list-label-meta {\r\n\topacity: 0.7;\r\n\tline-height: normal;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.quick-input-list .monaco-highlighted-label .highlight {\r\n\tfont-weight: bold;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\r\n\tmargin-right: 8px; /* separate from keybindings or actions */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tdisplay: flex;\r\n\tflex: 0;\r\n\toverflow: visible;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\r\n\t/*\r\n\t * By default, actions in the quick input action bar are hidden\r\n\t * until hovered over them or selected.\r\n\t */\r\n\tdisplay: none;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\r\n\tmargin-right: 4px;\r\n\tpadding: 0px 2px 2px 2px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tmargin-top: 1px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tmargin-right: 4px; /* separate from scrollbar */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\r\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\r\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {\r\n\tdisplay: flex;\r\n}\r\n\r\n/* focused items in quick pick */\r\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,\r\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator {\r\n\tcolor: inherit\r\n}\r\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key {\r\n\tbackground: none;\r\n}\r\n", + "" + ]); + const a = s + }, + 504: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .inputarea {\r\n\tmin-width: 0;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\toutline: none !important;\r\n\tresize: none;\r\n\tborder: none;\r\n\toverflow: hidden;\r\n\tcolor: transparent;\r\n\tbackground-color: transparent;\r\n}\r\n/*.monaco-editor .inputarea {\r\n\tposition: fixed !important;\r\n\twidth: 800px !important;\r\n\theight: 500px !important;\r\n\ttop: initial !important;\r\n\tleft: initial !important;\r\n\tbottom: 0 !important;\r\n\tright: 0 !important;\r\n\tcolor: black !important;\r\n\tbackground: white !important;\r\n\tline-height: 15px !important;\r\n\tfont-size: 14px !important;\r\n}*/\r\n.monaco-editor .inputarea.ime-input {\r\n\tz-index: 10;\r\n}\r\n", + "" + ]); + const a = s + }, + 1260: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\r\n\tborder-right: 0;\r\n}\r\n", + "" + ]); + const a = s + }, + 5686: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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\tKeeping name short for faster parsing.\r\n\tcdr = core decorations rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cdr {\r\n\tposition: absolute;\r\n}", + "" + ]); + const a = s + }, + 4827: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .glyph-margin {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcgmr = core glyph margin rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cgmr {\r\n\tposition: absolute;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n", + "" + ]); + const a = s + }, + 6848: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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\tKeeping name short for faster parsing.\r\n\tcigr = core ident guides rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cigr {\r\n\tposition: absolute;\r\n}\r\n.monaco-editor .lines-content .cigra {\r\n\tposition: absolute;\r\n}\r\n", + "" + ]); + const a = s + }, + 6184: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .margin-view-overlays .line-numbers {\r\n\tfont-variant-numeric: tabular-nums;\r\n\tposition: absolute;\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\tcursor: default;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .relative-current-line-number {\r\n\ttext-align: left;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\r\n\tmargin-top: 1px;\r\n}\r\n", + "" + ]); + const a = s + }, + 9565: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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/* Uncomment to see lines flashing when they're painted */\r\n/*.monaco-editor .view-lines > .view-line {\r\n\tbackground-color: none;\r\n\tanimation-name: flash-background;\r\n\tanimation-duration: 800ms;\r\n}\r\n@keyframes flash-background {\r\n\t0% { background-color: lightgreen; }\r\n\t100% { background-color: none }\r\n}*/\r\n\r\n.monaco-editor.no-user-select .lines-content,\r\n.monaco-editor.no-user-select .view-line,\r\n.monaco-editor.no-user-select .view-lines {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-editor .view-lines {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .view-line {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .mtkz {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n/* TODO@tokenization bootstrap fix */\r\n/*.monaco-editor .view-line > span > span {\r\n\tfloat: none;\r\n\tmin-height: inherit;\r\n\tmargin-left: inherit;\r\n}*/\r\n", + "" + ]); + const a = s + }, + 4444: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .lines-decorations {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tbackground: white;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcldr = core lines decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cldr {\r\n\tposition: absolute;\r\n\theight: 100%;\r\n}", + "" + ]); + const a = s + }, + 9364: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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\tKeeping name short for faster parsing.\r\n\tcmdr = core margin decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cmdr {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}", + "" + ]); + const a = s + }, + 563: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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/* START cover the case that slider is visible on mouseover */\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\r\n\topacity: 0;\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\r\n\topacity: 1;\r\n}\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\r\n\topacity: 1;\r\n}\r\n/* END cover the case that slider is visible on mouseover */\r\n\r\n.monaco-editor .minimap-shadow-hidden {\r\n\tposition: absolute;\r\n\twidth: 0;\r\n}\r\n.monaco-editor .minimap-shadow-visible {\r\n\tposition: absolute;\r\n\tleft: -6px;\r\n\twidth: 6px;\r\n}\r\n.monaco-editor.no-minimap-shadow .minimap-shadow-visible {\r\n\tposition: absolute;\r\n\tleft: -1px;\r\n\twidth: 1px;\r\n}\r\n", + "" + ]); + const a = s + }, + 9822: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .overlayWidgets {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft:0;\r\n}", + "" + ]); + const a = s + }, + 9443: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .view-ruler {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}", + "" + ]); + const a = s + }, + 9649: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .scroll-decoration {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 6px;\r\n}", + "" + ]); + const a = s + }, + 2595: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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\tKeeping name short for faster parsing.\r\n\tcslr = core selections layer rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cslr {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\r\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\r\n\r\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\r\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\r\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\r\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\r\n", + "" + ]); + const a = s + }, + 4057: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .cursors-layer {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n.monaco-editor .cursors-layer > .cursor {\r\n\tposition: absolute;\r\n\toverflow: hidden;\r\n}\r\n\r\n/* -- smooth-caret-animation -- */\r\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\r\n\ttransition: all 80ms;\r\n}\r\n\r\n/* -- block-outline-style -- */\r\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\r\n\tbox-sizing: border-box;\r\n\tbackground: transparent !important;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n}\r\n\r\n/* -- underline-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\r\n\tborder-bottom-width: 2px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n/* -- underline-thin-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\r\n\tborder-bottom-width: 1px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n@keyframes monaco-cursor-smooth {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t60%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-phase {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t90%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-expand {\r\n\t0%,\r\n\t20% {\r\n\t\ttransform: scaleY(1);\r\n\t}\r\n\t80%,\r\n\t100% {\r\n\t\ttransform: scaleY(0);\r\n\t}\r\n}\r\n\r\n.cursor-smooth {\r\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-phase {\r\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-expand > .cursor {\r\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n", + "" + ]); + const a = s + }, + 2360: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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/* ---------- DiffEditor ---------- */\r\n\r\n.monaco-diff-editor .diffOverview {\r\n\tz-index: 9;\r\n}\r\n\r\n.monaco-diff-editor .diffOverview .diffViewport {\r\n\tz-index: 10;\r\n}\r\n\r\n/* colors not externalized: using transparancy on background */\r\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\r\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\r\n\tz-index: 10;\r\n}\r\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\r\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\r\n\r\n/* ---------- Diff ---------- */\r\n\r\n.monaco-editor .insert-sign,\r\n.monaco-diff-editor .insert-sign,\r\n.monaco-editor .delete-sign,\r\n.monaco-diff-editor .delete-sign {\r\n\tfont-size: 11px !important;\r\n\topacity: 0.7 !important;\r\n\tdisplay: flex !important;\r\n\talign-items: center;\r\n}\r\n.monaco-editor.hc-black .insert-sign,\r\n.monaco-diff-editor.hc-black .insert-sign,\r\n.monaco-editor.hc-black .delete-sign,\r\n.monaco-diff-editor.hc-black .delete-sign {\r\n\topacity: 1;\r\n}\r\n\r\n.monaco-editor .inline-deleted-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n.monaco-editor .inline-added-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n\r\n/* ---------- Inline Diff ---------- */\r\n\r\n.monaco-editor .view-zones .view-lines .view-line span {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\r\n\tcursor: pointer;\r\n}\r\n", + "" + ]); + const a = s + }, + 4504: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-diff-editor .diff-review-line-number {\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-diff-editor .diff-review {\r\n\tposition: absolute;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-summary {\r\n\tpadding-left: 10px;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-shadow {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-row {\r\n\twhite-space: pre;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-table {\r\n\tdisplay: table;\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-row {\r\n\tdisplay: table-row;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-spacer {\r\n\tdisplay: inline-block;\r\n\twidth: 10px;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-spacer > .codicon {\r\n\tfont-size: 9px !important;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-actions {\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\tright: 10px;\r\n\ttop: 2px;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-actions .action-label {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tmargin: 2px 0;\r\n}\r\n", + "" + ]); + const a = s + }, + 7337: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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/* -------------------- IE10 remove auto clear button -------------------- */\r\n\r\n::-ms-clear {\r\n\tdisplay: none;\r\n}\r\n\r\n/* All widgets */\r\n/* I am not a big fan of this rule */\r\n.monaco-editor .editor-widget input {\r\n\tcolor: inherit;\r\n}\r\n\r\n/* -------------------- Editor -------------------- */\r\n\r\n.monaco-editor {\r\n\tposition: relative;\r\n\toverflow: visible;\r\n\t-webkit-text-size-adjust: 100%;\r\n}\r\n\r\n/* -------------------- Misc -------------------- */\r\n\r\n.monaco-editor .overflow-guard {\r\n\tposition: relative;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .view-overlays {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n.monaco-editor .auto-closed-character {\r\n\topacity: 0.3;\r\n}\r\n*/\r\n", + "" + ]); + const a = s + }, + 2671: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .selection-anchor {\r\n\tbackground-color: #007ACC;\r\n\twidth: 2px !important;\r\n}\r\n", + "" + ]); + const a = s + }, + 7667: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .bracket-match {\r\n\tbox-sizing: border-box;\r\n}\r\n", + "" + ]); + const a = s + }, + 4754: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .contentWidgets .codicon-light-bulb,\r\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.monaco-editor .contentWidgets .codicon-light-bulb:hover,\r\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover {\r\n\tcursor: pointer;\r\n}\r\n", + "" + ]); + const a = s + }, + 5674: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .codelens-decoration {\r\n\toverflow: hidden;\r\n\tdisplay: inline-block;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > span,\r\n.monaco-editor .codelens-decoration > a {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n\twhite-space: nowrap;\r\n\tvertical-align: sub;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a {\r\n\ttext-decoration: none;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a:hover {\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .codelens-decoration .codicon {\r\n\tvertical-align: middle;\r\n\tcolor: currentColor !important;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a:hover .codicon::before {\r\n\tcursor: pointer;\r\n}\r\n\r\n@keyframes fadein {\r\n\t0% { opacity: 0; visibility: visible;}\r\n\t100% { opacity: 1; }\r\n}\r\n\r\n.monaco-editor .codelens-decoration.fadein {\r\n\tanimation: fadein 0.1s linear;\r\n}\r\n", + "" + ]); + const a = s + }, + 6562: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => u + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r), + a = i(1667), + l = i.n(a), + d = new URL(i(4748), i.b), + c = s()(o()), + h = l()(d); + c.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.colorpicker-widget {\r\n\theight: 190px;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-editor .colorpicker-hover:focus {\r\n\toutline: none;\r\n}\r\n\r\n\r\n/* Header */\r\n\r\n.colorpicker-header {\r\n\tdisplay: flex;\r\n\theight: 24px;\r\n\tposition: relative;\r\n\tbackground: url(" + + h + + ");\r\n\tbackground-size: 9px 9px;\r\n\timage-rendering: pixelated;\r\n}\r\n\r\n.colorpicker-header .picked-color {\r\n\twidth: 216px;\r\n\ttext-align: center;\r\n\tline-height: 24px;\r\n\tcursor: pointer;\r\n\tcolor: white;\r\n\tflex: 1;\r\n\ttext-align: center;\r\n}\r\n\r\n.colorpicker-header .picked-color.light {\r\n\tcolor: black;\r\n}\r\n\r\n.colorpicker-header .original-color {\r\n\twidth: 74px;\r\n\tz-index: inherit;\r\n\tcursor: pointer;\r\n}\r\n\r\n\r\n/* Body */\r\n\r\n.colorpicker-body {\r\n\tdisplay: flex;\r\n\tpadding: 8px;\r\n\tposition: relative;\r\n}\r\n\r\n.colorpicker-body .saturation-wrap {\r\n\toverflow: hidden;\r\n\theight: 150px;\r\n\tposition: relative;\r\n\tmin-width: 220px;\r\n\tflex: 1;\r\n}\r\n\r\n.colorpicker-body .saturation-box {\r\n\theight: 150px;\r\n\tposition: absolute;\r\n}\r\n\r\n.colorpicker-body .saturation-selection {\r\n\twidth: 9px;\r\n\theight: 9px;\r\n\tmargin: -5px 0 0 -5px;\r\n\tborder: 1px solid rgb(255, 255, 255);\r\n\tborder-radius: 100%;\r\n\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\r\n\tposition: absolute;\r\n}\r\n\r\n.colorpicker-body .strip {\r\n\twidth: 25px;\r\n\theight: 150px;\r\n}\r\n\r\n.colorpicker-body .hue-strip {\r\n\tposition: relative;\r\n\tmargin-left: 8px;\r\n\tcursor: grab;\r\n\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\r\n}\r\n\r\n.colorpicker-body .opacity-strip {\r\n\tposition: relative;\r\n\tmargin-left: 8px;\r\n\tcursor: grab;\r\n\tbackground: url(" + + h + + ");\r\n\tbackground-size: 9px 9px;\r\n\timage-rendering: pixelated;\r\n}\r\n\r\n.colorpicker-body .strip.grabbing {\r\n\tcursor: grabbing;\r\n}\r\n\r\n.colorpicker-body .slider {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: -2px;\r\n\twidth: calc(100% + 4px);\r\n\theight: 4px;\r\n\tbox-sizing: border-box;\r\n\tborder: 1px solid rgba(255, 255, 255, 0.71);\r\n\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\r\n}\r\n\r\n.colorpicker-body .strip .overlay {\r\n\theight: 150px;\r\n\tpointer-events: none;\r\n}\r\n", + "" + ]); + const u = c + }, + 9100: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor.vs .dnd-target {\r\n\tborder-right: 2px dotted black;\r\n\tcolor: white; /* opposite of black */\r\n}\r\n.monaco-editor.vs-dark .dnd-target {\r\n\tborder-right: 2px dotted #AEAFAD;\r\n\tcolor: #51504f; /* opposite of #AEAFAD */\r\n}\r\n.monaco-editor.hc-black .dnd-target {\r\n\tborder-right: 2px dotted #fff;\r\n\tcolor: #000; /* opposite of #fff */\r\n}\r\n\r\n.monaco-editor.mouse-default .view-lines,\r\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\r\n.monaco-editor.hc-black.mac.mouse-default .view-lines {\r\n\tcursor: default;\r\n}\r\n.monaco-editor.mouse-copy .view-lines,\r\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\r\n.monaco-editor.hc-black.mac.mouse-copy .view-lines {\r\n\tcursor: copy;\r\n}", + "" + ]); + const a = s + }, + 5160: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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/* Find widget */\r\n.monaco-editor .find-widget {\r\n\tposition: absolute;\r\n\tz-index: 35;\r\n\theight: 33px;\r\n\toverflow: hidden;\r\n\tline-height: 19px;\r\n\ttransition: transform 200ms linear;\r\n\tpadding: 0 4px;\r\n\tbox-sizing: border-box;\r\n\ttransform: translateY(calc(-100% - 10px)); /* shadow (10px) */\r\n}\r\n\r\n.monaco-editor .find-widget textarea {\r\n\tmargin: 0px;\r\n}\r\n\r\n.monaco-editor .find-widget.hiddenEditor {\r\n\tdisplay: none;\r\n}\r\n\r\n/* Find widget when replace is toggled on */\r\n.monaco-editor .find-widget.replaceToggled > .replace-part {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .find-widget.visible {\r\n\ttransform: translateY(0);\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\r\n\toutline: 1px solid -webkit-focus-ring-color;\r\n\toutline-offset: -1px;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-inputbox .input {\r\n\tbackground-color: transparent;\r\n\tmin-height: 0;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .input {\r\n\tfont-size: 13px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part,\r\n.monaco-editor .find-widget > .replace-part {\r\n\tmargin: 4px 0 0 17px;\r\n\tfont-size: 12px;\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\r\n\tmin-height: 25px;\r\n}\r\n\r\n\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\r\n\tpadding-right: 22px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .input,\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .mirror,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .input,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\r\n\tpadding-top: 2px;\r\n\tpadding-bottom: 2px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .find-actions {\r\n\theight: 25px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part .replace-actions {\r\n\theight: 25px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput {\r\n\tvertical-align: middle;\r\n\tdisplay: flex;\r\n\tflex:1;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element {\r\n\t/* Make sure textarea inherits the width correctly */\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical {\r\n\t/* Hide vertical scrollbar */\r\n\topacity: 0;\r\n}\r\n\r\n.monaco-editor .find-widget .matchesCount {\r\n\tdisplay: flex;\r\n\tflex: initial;\r\n\tmargin: 0 0 0 3px;\r\n\tpadding: 2px 0 0 2px;\r\n\theight: 25px;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\ttext-align: center;\r\n\tline-height: 23px;\r\n}\r\n\r\n.monaco-editor .find-widget .button {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tpadding: 3px;\r\n\tborder-radius: 5px;\r\n\tdisplay: flex;\r\n\tflex: initial;\r\n\tmargin-left: 3px;\r\n\tbackground-position: center center;\r\n\tbackground-repeat: no-repeat;\r\n\tcursor: pointer;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n/* find in selection button */\r\n.monaco-editor .find-widget .codicon-find-selection {\r\n\twidth: 22px;\r\n\theight: 22px;\r\n\tpadding: 3px;\r\n\tborder-radius: 5px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.left {\r\n\tmargin-left: 0;\r\n\tmargin-right: 3px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.wide {\r\n\twidth: auto;\r\n\tpadding: 1px 6px;\r\n\ttop: -1px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.toggle {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\twidth: 18px;\r\n\theight: 100%;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .find-widget .button.toggle.disabled {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .find-widget .disabled {\r\n\topacity: 0.3;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part > .monaco-findInput {\r\n\tposition: relative;\r\n\tdisplay: flex;\r\n\tvertical-align: middle;\r\n\tflex: auto;\r\n\tflex-grow: 0;\r\n\tflex-shrink: 0;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part > .monaco-findInput > .controls {\r\n\tposition: absolute;\r\n\ttop: 3px;\r\n\tright: 2px;\r\n}\r\n\r\n/* REDUCED */\r\n.monaco-editor .find-widget.reduced-find-widget .matchesCount {\r\n\tdisplay:none;\r\n}\r\n\r\n/* NARROW (SMALLER THAN REDUCED) */\r\n.monaco-editor .find-widget.narrow-find-widget {\r\n\tmax-width: 257px !important;\r\n}\r\n\r\n/* COLLAPSED (SMALLER THAN NARROW) */\r\n.monaco-editor .find-widget.collapsed-find-widget {\r\n\tmax-width: 170px !important;\r\n}\r\n\r\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\r\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\r\n\tdisplay:none;\r\n}\r\n\r\n.monaco-editor .findMatch {\r\n\tanimation-duration: 0;\r\n\tanimation-name: inherit !important;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-sash {\r\n\tleft: 0 !important;\r\n}\r\n\r\n.monaco-editor.hc-black .find-widget .button:before {\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\tleft: 2px;\r\n}\r\n", + "" + ]); + const a = s + }, + 6977: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + '/*---------------------------------------------------------------------------------------------\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.monaco-editor .margin-view-overlays .codicon-folding-expanded,\r\n.monaco-editor .margin-view-overlays .codicon-folding-collapsed {\r\n\tcursor: pointer;\r\n\topacity: 0;\r\n\ttransition: opacity 0.5s;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tfont-size: 140%;\r\n\tmargin-left: 2px;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays:hover .codicon,\r\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,\r\n.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons {\r\n\topacity: 1;\r\n}\r\n\r\n.monaco-editor .inline-folded:after {\r\n\tcolor: grey;\r\n\tmargin: 0.1em 0.2em 0 0.2em;\r\n\tcontent: "⋯";\r\n\tdisplay: inline;\r\n\tline-height: 1em;\r\n\tcursor: pointer;\r\n}\r\n', + "" + ]); + const a = s + }, + 8994: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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/* marker zone */\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .severity-icon {\r\n\tdisplay: inline-block;\r\n\tvertical-align: text-top;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .marker-widget {\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .marker-widget > .stale {\r\n\topacity: 0.6;\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-editor .marker-widget .title {\r\n\tdisplay: inline-block;\r\n\tpadding-right: 5px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer {\r\n\tposition: absolute;\r\n\twhite-space: pre;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tpadding: 8px 12px 0 20px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message .details {\r\n\tpadding-left: 6px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message .source,\r\n.monaco-editor .marker-widget .descriptioncontainer .message span.code {\r\n\topacity: 0.6;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link {\r\n\topacity: 0.6;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before {\r\n\tcontent: '(';\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after {\r\n\tcontent: ')';\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\r\n\ttext-decoration: underline;\r\n\t/** Hack to force underline to show **/\r\n\tborder-bottom: 1px solid transparent;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .filename {\r\n\tcursor: pointer;\r\n}\r\n", + "" + ]); + const a = s + }, + 2760: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .goto-definition-link {\r\n\ttext-decoration: underline;\r\n\tcursor: pointer;\r\n}", + "" + ]); + const a = s + }, + 9669: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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/* -- zone widget */\r\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\r\n\tborder-top-width: 1px;\r\n\tborder-bottom-width: 1px;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .inline {\r\n\tdisplay: inline-block;\r\n\tvertical-align: top;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .messages {\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\ttext-align: center;\r\n\tpadding: 3em 0;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree {\r\n\tline-height: 23px;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference {\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\r\n\tdisplay: inline-flex;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file {\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\r\n\tmargin-right: 12px;\r\n\tmargin-left: auto;\r\n}\r\n\r\n/* High Contrast Theming */\r\n\r\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file {\r\n\tfont-weight: bold;\r\n}\r\n", + "" + ]); + const a = s + }, + 3975: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .suggest-preview-additional-widget {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .suggest-preview-additional-widget .content-spacer {\r\n\tcolor: transparent;\r\n\twhite-space: pre;\r\n}\r\n\r\n.monaco-editor .suggest-preview-additional-widget .button {\r\n\tdisplay: inline-block;\r\n\tcursor: pointer;\r\n\ttext-decoration: underline;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .ghost-text-hidden {\r\n\topacity: 0;\r\n\tfont-size: 0;\r\n}\r\n\r\n.monaco-editor .ghost-text-decoration-preview {\r\n\tfont-style: italic;\r\n}\r\n", + "" + ]); + const a = s + }, + 7854: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .detected-link,\r\n.monaco-editor .detected-link-active {\r\n\ttext-decoration: underline;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .detected-link-active {\r\n\tcursor: pointer;\r\n}\r\n", + "" + ]); + const a = s + }, + 1356: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .monaco-editor-overlaymessage {\r\n\tpadding-bottom: 8px;\r\n\tz-index: 10000;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage.below {\r\n\tpadding-bottom: 0;\r\n\tpadding-top: 8px;\r\n\tz-index: 10000;\r\n}\r\n\r\n@keyframes fadeIn {\r\n\tfrom { opacity: 0; }\r\n\tto { opacity: 1; }\r\n}\r\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\r\n\tanimation: fadeIn 150ms ease-out;\r\n}\r\n\r\n@keyframes fadeOut {\r\n\tfrom { opacity: 1; }\r\n\tto { opacity: 0; }\r\n}\r\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\r\n\tanimation: fadeOut 100ms ease-out;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage .message {\r\n\tpadding: 1px 4px;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage .anchor {\r\n\twidth: 0 !important;\r\n\theight: 0 !important;\r\n\tborder-color: transparent;\r\n\tborder-style: solid;\r\n\tz-index: 1000;\r\n\tborder-width: 8px;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,\r\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.below {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.top {\r\n\tdisplay: inherit;\r\n\ttop: -8px;\r\n}\r\n", + "" + ]); + const a = s + }, + 2265: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .parameter-hints-widget {\r\n\tz-index: 10;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tline-height: 1.5em;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget > .phwrapper {\r\n\tmax-width: 440px;\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple {\r\n\tmin-height: 3.3em;\r\n\tpadding: 0;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.visible {\r\n\ttransition: left .05s ease-in-out;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget p,\r\n.monaco-editor .parameter-hints-widget ul {\r\n\tmargin: 8px 0;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\r\n.monaco-editor .parameter-hints-widget .body {\r\n\tdisplay: flex;\r\n\tflex: 1;\r\n\tflex-direction: column;\r\n\tmin-height: 100%;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .signature {\r\n\tpadding: 4px 5px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs {\r\n\tpadding: 0 10px 0 5px;\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs.empty {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\r\n\twhite-space: initial;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .markdown-docs code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .code {\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .controls {\r\n\tdisplay: none;\r\n\tflex-direction: column;\r\n\talign-items: center;\r\n\tmin-width: 22px;\r\n\tjustify-content: flex-end;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple .controls {\r\n\tdisplay: flex;\r\n\tpadding: 0 2px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple .button {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tbackground-repeat: no-repeat;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .button.previous {\r\n\tbottom: 24px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .overloads {\r\n\ttext-align: center;\r\n\theight: 12px;\r\n\tline-height: 12px;\r\n\topacity: 0.5;\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\r\n\tfont-weight: bold;\r\n\ttext-decoration: underline;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\r\n\tfont-weight: bold;\r\n\tmargin-right: 0.5em;\r\n}\r\n", + "" + ]); + const a = s + }, + 1283: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .peekview-widget .head {\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tfont-size: 13px;\r\n\tmargin-left: 20px;\r\n\tmin-width: 0;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title.clickable {\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\r\n\tfont-size: 0.9em;\r\n\tmargin-left: 0.5em;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .meta {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .dirname {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .filename {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty)::before {\r\n\tcontent: '-';\r\n\tpadding: 0 0.3em;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions {\r\n\tflex: 1;\r\n\ttext-align: right;\r\n\tpadding-right: 2px;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .peekview-widget > .body {\r\n\tborder-top: 1px solid;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .codicon {\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon {\r\n\tcolor: inherit !important;\r\n}\r\n", + "" + ]); + const a = s + }, + 7113: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .rename-box {\r\n\tz-index: 100;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .rename-box.preview {\r\n\tpadding: 3px 3px 0 3px;\r\n}\r\n\r\n.monaco-editor .rename-box .rename-input {\r\n\tpadding: 3px;\r\n\twidth: calc(100% - 6px);\r\n}\r\n\r\n.monaco-editor .rename-box .rename-label {\r\n\tdisplay: none;\r\n\topacity: .8;\r\n}\r\n\r\n.monaco-editor .rename-box.preview .rename-label {\r\n\tdisplay: inherit;\r\n}\r\n", + "" + ]); + const a = s + }, + 8894: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .snippet-placeholder {\r\n\tmin-width: 2px;\r\n\toutline-style: solid;\r\n\toutline-width: 1px;\r\n}\r\n\r\n.monaco-editor .finish-snippet-placeholder {\r\n\toutline-style: solid;\r\n\toutline-width: 1px;\r\n}\r\n", + "" + ]); + const a = s + }, + 36: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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/* Suggest widget*/\r\n\r\n.monaco-editor .suggest-widget {\r\n\twidth: 430px;\r\n\tz-index: 40;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-editor .suggest-widget.message {\r\n\tflex-direction: row;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .suggest-widget,\r\n.monaco-editor .suggest-details {\r\n\tflex: 0 1 auto;\r\n\twidth: 100%;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n}\r\n\r\n.monaco-editor.hc-black .suggest-widget,\r\n.monaco-editor.hc-black .suggest-details {\r\n\tborder-width: 2px;\r\n}\r\n\r\n/* Styles for status bar part */\r\n\r\n\r\n.monaco-editor .suggest-widget .suggest-status-bar {\r\n\tbox-sizing: border-box;\r\n\tdisplay: none;\r\n\tflex-flow: row nowrap;\r\n\tjustify-content: space-between;\r\n\twidth: 100%;\r\n\tfont-size: 80%;\r\n\tpadding: 0 4px 0 4px;\r\n\tborder-top: 1px solid transparent;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .suggest-widget .suggest-status-bar .left {\r\n\tpadding-right: 8px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label {\r\n\topacity: 0.5;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label::after {\r\n\tcontent: ', ';\r\n\tmargin-right: 0.3em;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\r\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\r\n\twidth: 100%;\r\n}\r\n\r\n/* Styles for Message element for when widget is loading or is empty */\r\n\r\n.monaco-editor .suggest-widget>.message {\r\n\tpadding-left: 22px;\r\n}\r\n\r\n/** Styles for the list element **/\r\n\r\n.monaco-editor .suggest-widget>.tree {\r\n\theight: 100%;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n/** Styles for each row in the list element **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\r\n\tdisplay: flex;\r\n\t-mox-box-sizing: border-box;\r\n\tbox-sizing: border-box;\r\n\tpadding-right: 10px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: 2px 2px;\r\n\twhite-space: nowrap;\r\n\tcursor: pointer;\r\n\ttouch-action: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents {\r\n\tflex: 1;\r\n\theight: 100%;\r\n\toverflow: hidden;\r\n\tpadding-left: 2px;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main {\r\n\tdisplay: flex;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: pre;\r\n\tjustify-content: space-between;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left, .monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\r\n\tfont-weight: bold;\r\n}\r\n\r\n/** ReadMore Icon styles **/\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore::before {\r\n\tcolor: inherit;\r\n\topacity: 1;\r\n\tfont-size: 14px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close {\r\n\tposition: absolute;\r\n\ttop: 6px;\r\n\tright: 2px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover {\r\n\topacity: 1;\r\n}\r\n\r\n/** signature, qualifier, type/details opacity **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\r\n\topacity: 0.7;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\topacity: 0.6;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label {\r\n\tmargin-left: 12px;\r\n\topacity: 0.4;\r\n\tfont-size: 85%;\r\n\tline-height: initial;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n\talign-self: center;\r\n}\r\n\r\n/** Type Info and icon next to the label in the focused completion item **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\r\n\tfont-size: 85%;\r\n\tmargin-left: 1.1em;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Details: if using CompletionItem#details, show on focus **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Details: if using CompletionItemLabel#details, always show **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Ellipsis on hover **/\r\n\r\n.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\r\n\twidth: calc(100% - 26px);\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left {\r\n\tflex-shrink: 1;\r\n\tflex-grow: 1;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label {\r\n\tflex-shrink: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label {\r\n\tmax-width: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label {\r\n\tflex-shrink: 1;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\r\n\toverflow: hidden;\r\n\tflex-shrink: 4;\r\n\tmax-width: 70%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\tright: 10px;\r\n\twidth: 18px;\r\n\theight: 18px;\r\n\tvisibility: hidden;\r\n}\r\n\r\n/** Do NOT display ReadMore when docs is side/below **/\r\n\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore, .monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\r\n\tdisplay: none !important;\r\n}\r\n\r\n/** Do NOT display ReadMore when using plain CompletionItemLabel (details/documentation might not be resolved) **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n/** Focused item can show ReadMore, but can't when docs is side/below **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\r\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover>.contents>.main>.right>.readMore {\r\n\tvisibility: visible;\r\n}\r\n\r\n/** Styles for each row in the list **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated {\r\n\topacity: 0.66;\r\n\ttext-decoration: unset;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label::before {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\r\n\tdisplay: block;\r\n\theight: 16px;\r\n\twidth: 16px;\r\n\tmargin-left: 2px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-size: 80%;\r\n\tbackground-position: center;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon, .monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon::before {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\r\n\tmargin: 0 0 0 0.3em;\r\n\tborder: 0.1em solid #000;\r\n\twidth: 0.7em;\r\n\theight: 0.7em;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n/** Styles for the docs of the completion item in focus **/\r\n\r\n.monaco-editor .suggest-details-container {\r\n\tz-index: 41;\r\n}\r\n\r\n.monaco-editor .suggest-details {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-editor .suggest-details.no-docs {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element {\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body {\r\n\tbox-sizing: border-box;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type {\r\n\tflex: 2;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\topacity: 0.7;\r\n\twhite-space: pre;\r\n\tmargin: 0 24px 0 0;\r\n\tpadding: 4px 0 12px 5px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap {\r\n\twhite-space: normal;\r\n\tword-break: break-all;\r\n}\r\n\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs {\r\n\tmargin: 0;\r\n\tpadding: 4px 5px;\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs {\r\n\tmargin-right: 24px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs {\r\n\tpadding: 0;\r\n\twhite-space: initial;\r\n\tmin-height: calc(1rem + 8px);\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty) {\r\n\tpadding: 4px 5px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code {\r\n\twhite-space: pre-wrap;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon {\r\n\tvertical-align: sub;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-details code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-editor .suggest-details ul {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-editor .suggest-details ol {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-editor .suggest-details p code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n", + "" + ]); + const a = s + }, + 6458: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .zone-widget {\r\n\tposition: absolute;\r\n\tz-index: 10;\r\n}\r\n\r\n\r\n.monaco-editor .zone-widget .zone-widget-container {\r\n\tborder-top-style: solid;\r\n\tborder-bottom-style: solid;\r\n\tborder-top-width: 0;\r\n\tborder-bottom-width: 0;\r\n\tposition: relative;\r\n}\r\n", + "" + ]); + const a = s + }, + 8844: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .accessibilityHelpWidget {\r\n\tpadding: 10px;\r\n\tvertical-align: middle;\r\n\toverflow: scroll;\r\n}", + "" + ]); + const a = s + }, + 1556: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => p + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r), + a = i(1667), + l = i.n(a), + d = new URL(i(2766), i.b), + c = new URL(i(1568), i.b), + h = s()(o()), + u = l()(d), + g = l()(c); + h.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .iPadShowKeyboard {\r\n\twidth: 58px;\r\n\tmin-width: 0;\r\n\theight: 36px;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\tresize: none;\r\n\toverflow: hidden;\r\n\tbackground: url(" + + u + + ") center center no-repeat;\r\n\tborder: 4px solid #F6F6F6;\r\n\tborder-radius: 4px;\r\n}\r\n\r\n.monaco-editor.vs-dark .iPadShowKeyboard {\r\n\tbackground: url(" + + g + ") center center no-repeat;\r\n\tborder: 4px solid #252526;\r\n}", + "" + ]); + const p = h + }, + 5189: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-editor .tokens-inspect-widget {\r\n\tz-index: 50;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tpadding: 10px;\r\n}\r\n\r\n.tokens-inspect-separator {\r\n\theight: 1px;\r\n\tborder: 0;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token-length {\r\n\tfont-weight: normal;\r\n\tfont-size: 60%;\r\n\tfloat: right;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\r\n\tfont-family: var(--monaco-monospace-font);\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token-type {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n", + "" + ]); + const a = s + }, + 3198: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.quick-input-widget {\r\n\tfont-size: 13px;\r\n}\r\n\r\n.quick-input-widget .monaco-highlighted-label .highlight,\r\n.quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #0066BF;\r\n}\r\n\r\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,\r\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight {\r\n\tcolor: #9DDDFF;\r\n}\r\n\r\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\r\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #0097fb;\r\n}\r\n\r\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\r\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #F38518;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key {\r\n\tbackground-color: rgba(221, 221, 221, 0.4);\r\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\r\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\r\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\r\n\tcolor: #555;\r\n}\r\n\r\n.hc-black .monaco-keybinding > .monaco-keybinding-key {\r\n\tbackground-color: transparent;\r\n\tborder: solid 1px rgb(111, 195, 223);\r\n\tbox-shadow: none;\r\n\tcolor: #fff;\r\n}\r\n\r\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\r\n\tbackground-color: rgba(128, 128, 128, 0.17);\r\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\r\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\r\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\r\n\tcolor: #ccc;\r\n}\r\n", + "" + ]); + const a = s + }, + 643: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + '/*---------------------------------------------------------------------------------------------\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/* Default standalone editor fonts */\r\n.monaco-editor {\r\n\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\r\n\t--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;\r\n}\r\n\r\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\r\n\tstroke-width: 1.2px;\r\n}\r\n\r\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\tstroke-width: 1.2px;\r\n}\r\n\r\n.monaco-hover p {\r\n\tmargin: 0;\r\n}\r\n\r\n/* See https://github.com/microsoft/monaco-editor/issues/2168#issuecomment-780078600 */\r\n.monaco-aria-container {\r\n\tposition: absolute !important;\r\n\ttop: 0; /* avoid being placed underneath a sibling element */\r\n\theight: 1px;\r\n\twidth: 1px;\r\n\tmargin: -1px;\r\n\toverflow: hidden;\r\n\tpadding: 0;\r\n\tclip: rect(1px, 1px, 1px, 1px);\r\n\tclip-path: inset(50%);\r\n}\r\n\r\n/* The hc-black theme is already high contrast optimized */\r\n.monaco-editor.hc-black {\r\n\t-ms-high-contrast-adjust: none;\r\n}\r\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\r\n@media screen and (-ms-high-contrast:active) {\r\n\r\n\t/* current line highlight */\r\n\t.monaco-editor.vs .view-overlays .current-line,\r\n\t.monaco-editor.vs-dark .view-overlays .current-line {\r\n\t\tborder-color: windowtext !important;\r\n\t\tborder-left: 0;\r\n\t\tborder-right: 0;\r\n\t}\r\n\r\n\t/* view cursors */\r\n\t.monaco-editor.vs .cursor,\r\n\t.monaco-editor.vs-dark .cursor {\r\n\t\tbackground-color: windowtext !important;\r\n\t}\r\n\t/* dnd target */\r\n\t.monaco-editor.vs .dnd-target,\r\n\t.monaco-editor.vs-dark .dnd-target {\r\n\t\tborder-color: windowtext !important;\r\n\t}\r\n\r\n\t/* selected text background */\r\n\t.monaco-editor.vs .selected-text,\r\n\t.monaco-editor.vs-dark .selected-text {\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\r\n\t/* allow the text to have a transparent background. */\r\n\t.monaco-editor.vs .view-line,\r\n\t.monaco-editor.vs-dark .view-line {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t}\r\n\r\n\t/* text color */\r\n\t.monaco-editor.vs .view-line span,\r\n\t.monaco-editor.vs-dark .view-line span {\r\n\t\tcolor: windowtext !important;\r\n\t}\r\n\t/* selected text color */\r\n\t.monaco-editor.vs .view-line span.inline-selected-text,\r\n\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\r\n\t\tcolor: highlighttext !important;\r\n\t}\r\n\r\n\t/* allow decorations */\r\n\t.monaco-editor.vs .view-overlays,\r\n\t.monaco-editor.vs-dark .view-overlays {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t}\r\n\r\n\t/* various decorations */\r\n\t.monaco-editor.vs .selectionHighlight,\r\n\t.monaco-editor.vs-dark .selectionHighlight,\r\n\t.monaco-editor.vs .wordHighlight,\r\n\t.monaco-editor.vs-dark .wordHighlight,\r\n\t.monaco-editor.vs .wordHighlightStrong,\r\n\t.monaco-editor.vs-dark .wordHighlightStrong,\r\n\t.monaco-editor.vs .reference-decoration,\r\n\t.monaco-editor.vs-dark .reference-decoration {\r\n\t\tborder: 2px dotted highlight !important;\r\n\t\tbackground: transparent !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .rangeHighlight,\r\n\t.monaco-editor.vs-dark .rangeHighlight {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px dotted activeborder !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .bracket-match,\r\n\t.monaco-editor.vs-dark .bracket-match {\r\n\t\tborder-color: windowtext !important;\r\n\t\tbackground: transparent !important;\r\n\t}\r\n\r\n\t/* find widget */\r\n\t.monaco-editor.vs .findMatch,\r\n\t.monaco-editor.vs-dark .findMatch,\r\n\t.monaco-editor.vs .currentFindMatch,\r\n\t.monaco-editor.vs-dark .currentFindMatch {\r\n\t\tborder: 2px dotted activeborder !important;\r\n\t\tbackground: transparent !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .find-widget,\r\n\t.monaco-editor.vs-dark .find-widget {\r\n\t\tborder: 1px solid windowtext;\r\n\t}\r\n\r\n\t/* list - used by suggest widget */\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* scrollbars */\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: background !important;\r\n\t\tborder: 1px solid windowtext;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\t\tbackground: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\r\n\t/* overview ruler */\r\n\t.monaco-editor.vs .decorationsOverviewRuler,\r\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\r\n\t\topacity: 0;\r\n\t}\r\n\r\n\t/* minimap */\r\n\t.monaco-editor.vs .minimap,\r\n\t.monaco-editor.vs-dark .minimap {\r\n\t\tdisplay: none;\r\n\t}\r\n\r\n\t/* squiggles */\r\n\t.monaco-editor.vs .squiggly-d-error,\r\n\t.monaco-editor.vs-dark .squiggly-d-error {\r\n\t\tbackground: transparent !important;\r\n\t\tborder-bottom: 4px double #E47777;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-c-warning,\r\n\t.monaco-editor.vs-dark .squiggly-c-warning {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-b-info,\r\n\t.monaco-editor.vs-dark .squiggly-b-info {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-a-hint,\r\n\t.monaco-editor.vs-dark .squiggly-a-hint {\r\n\t\tborder-bottom: 4px double #6c6c6c;\r\n\t}\r\n\r\n\t/* contextmenu */\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* diff editor */\r\n\t.monaco-diff-editor.vs .diffOverviewRuler,\r\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\r\n\t\tdisplay: none;\r\n\t}\r\n\t.monaco-editor.vs .line-insert,\r\n\t.monaco-editor.vs-dark .line-insert,\r\n\t.monaco-editor.vs .line-delete,\r\n\t.monaco-editor.vs-dark .line-delete {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .char-insert,\r\n\t.monaco-editor.vs-dark .char-insert,\r\n\t.monaco-editor.vs .char-delete,\r\n\t.monaco-editor.vs-dark .char-delete {\r\n\t\tbackground: transparent !important;\r\n\t}\r\n}\r\n\r\n/*.monaco-editor.vs [tabindex="0"]:focus {\r\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}\r\n\r\n.monaco-editor.vs-dark [tabindex="0"]:focus {\r\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}*/\r\n', + "" + ]); + const a = s + }, + 1854: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.monaco-action-bar .action-item.menu-entry .action-label.icon {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: 50%;\r\n\tbackground-size: 16px;\r\n}\r\n\r\n.monaco-action-bar .action-item.menu-entry .action-label {\r\n\tbackground-image: var(--menu-entry-icon-light);\r\n}\r\n\r\n.vs-dark .monaco-action-bar .action-item.menu-entry .action-label,\r\n.hc-black .monaco-action-bar .action-item.menu-entry .action-label {\r\n\tbackground-image: var(--menu-entry-icon-dark);\r\n}\r\n\r\n\r\n.monaco-dropdown-with-default {\r\n\tdisplay: flex !important;\r\n\tflex-direction: row;\r\n\tborder-radius: 5px;\r\n}\r\n\r\n.monaco-dropdown-with-default > .action-container > .action-label {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-dropdown-with-default > .action-container.menu-entry > .action-label.icon {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: 50%;\r\n\tbackground-size: 16px;\r\n}\r\n\r\n.monaco-dropdown-with-default > .action-container.menu-entry > .action-label {\r\n\tbackground-image: var(--menu-entry-icon-light);\r\n}\r\n\r\n.vs-dark .monaco-dropdown-with-default > .action-container.menu-entry > .action-label,\r\n.hc-black .monaco-dropdown-with-default > .action-container.menu-entry > .action-label {\r\n\tbackground-image: var(--menu-entry-icon-dark);\r\n}\r\n\r\n.monaco-dropdown-with-default > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\r\n\tfont-size: 12px;\r\n\tpadding-left: 0px;\r\n\tpadding-right: 0px;\r\n\tline-height: 16px;\r\n\tmargin-left: -3px;\r\n}\r\n\r\n.monaco-dropdown-with-default > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\r\n\tdisplay: block;\r\n\tbackground-size: 16px;\r\n\tbackground-position: center center;\r\n\tbackground-repeat: no-repeat;\r\n}\r\n", + "" + ]); + const a = s + }, + 4932: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "/*---------------------------------------------------------------------------------------------\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.context-view .monaco-menu {\r\n\tmin-width: 130px;\r\n}\r\n\r\n", + "" + ]); + const a = s + }, + 9087: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => a + }); + var n = i(8081), + o = i.n(n), + r = i(3645), + s = i.n(r)()(o()); + s.push([e.id, + "body {\n font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;\n margin: 0;\n background: #4795ff;\n color: #fff;\n}\n\na {\n text-decoration: none;\n color: inherit;\n}\n\n.container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100vw;\n height: 100vh;\n overflow: hidden;\n}\n\n.error {\n color: white;\n background-color: red;\n background-image: linear-gradient(-45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);\n}\n\n.nav {\n box-sizing: border-box;\n width: 100%;\n flex-shrink: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n z-index: 2;\n border-bottom: 1px solid #2c61a9;\n min-height: 52px;\n}\n\n.nav-group {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.nav-group:first-of-type {\n justify-content: flex-start;\n}\n\n.nav-group:last-of-type {\n justify-content: flex-end;\n}\n\n.brand {\n margin: 0 1ch;\n font-size: 24px;\n font-weight: 200;\n text-transform: uppercase;\n}\n\n.main {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n box-sizing: border-box;\n width: 100%;\n}\n\n.split {\n display: flex;\n flex: 1;\n width: 100%;\n overflow: hidden;\n}\n\n.button {\n border: none;\n background: none;\n cursor: pointer;\n padding: 0.5em 1em;\n display: flex;\n align-items: center;\n justify-content: center;\n color: inherit;\n font-size: inherit;\n transition: background-color 0.25s, transform 0.25s;\n background: #273e7c77;\n text-transform: uppercase;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 0;\n margin: 0 4px;\n line-height: 1;\n}\n\n.button:hover {\n background: #273e7c\n}\n\n.button:active {\n transform: translateY(2px);\n}\n\n.button:focus {\n outline: none;\n}\n\n.info-link {\n margin-left: 8px;\n}\n\n.info-icon {\n height: 32px;\n width: 32px;\n fill: currentColor;\n opacity: 0.75;\n}\n\n.info-icon:hover {\n opacity: 1;\n}\n\n.editor {\n flex: 1;\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n.sidebar {\n display: flex;\n flex-direction: column;\n background: #444;\n color: white;\n max-width: min-content;\n}\n\n.files {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.file {\n cursor: pointer;\n padding: 8px 16px;\n transition: background-color 0.25s;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 0;\n font-size: 90%;\n}\n\n.file:hover {\n background-color: #3168b380;\n}\n\n.file.selected {\n background-color: #3168b3;\n}\n\n.infobox {\n padding: 32px 64px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n border: 3px solid #000;\n cursor: pointer;\n transition: box-shadow 0.25s;\n font-size: 200%;\n box-shadow: 8px 8px 0 #00000077;\n min-height: 300px;\n}\n\n.infobox:hover {\n box-shadow: 8px 8px 0 #000000;\n}\n\n.infobox:focus {\n outline: none;\n}\n\n.error {\n color: white;\n background-color: red;\n background-image: linear-gradient(-45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);\n}\n\n.message {\n padding: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n}\n\n.monaco {\n flex: 1;\n}\n\n.hidden {\n display: none;\n}\n\n.filename {\n background: #4795ff;\n color: white;\n padding: 4px 16px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n white-space: nowrap;\n min-height: 32px;\n}\n\n.narrow .filename {\n padding: 4px;\n}\n\n.filename-section {\n display: flex;\n align-items: center;\n overflow: hidden;\n flex-shrink: 0;\n}\n\n.filename-section-filename {\n flex: 1;\n justify-content: flex-start;\n}\n\n.filename-section-actions {\n justify-content: flex-end;\n}\n\n.selected-filename {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.button.reset {\n border: none;\n background: none;\n cursor: pointer;\n padding: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n text-transform: none;\n}\n\n.reset:focus {\n outline: none;\n}\n\n.logo {\n width: 32px;\n height: 32px;\n transition: width 0.25s, height 0.25s;\n}\n\n.header-section-file {\n flex: 1;\n overflow: hidden;\n}\n\n.download {\n background: #36b536;\n border: 1px solid white;\n}\n\n.download:hover {\n background: #16d41c;\n}\n\n.install {\n background: #273e7c00;\n}\n\n.install:hover {\n background: #273e7c77;\n}\n\n.toggle-preview {\n font-size: 90%;\n}\n\n.toggle-files {\n padding: 4px 8px;\n background: none;\n}\n\n.intro {\n text-shadow: 0 1px 1px #444;\n line-height: 1;\n}\n\n.intro .button {\n margin: 32px 0;\n}\n\n.extensions {\n font-size: 50%;\n margin-top: 16px;\n}\n\n.choose {\n font-size: 24px;\n margin-top: 24px;\n line-height: 1.2;\n}\n\n.preview {\n display: flex;\n flex: 1;\n background-color: #4795ff;\n background-image: linear-gradient(-45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);\n overflow-y: auto;\n height: 100%;\n}\n\n.preview-image {\n max-width: 100%;\n margin: auto;\n}\n\n.filename-form {\n padding: 0 8px;\n display: flex;\n align-items: center;\n text-shadow: 0 1px 1px #444;\n overflow: hidden;\n}\n\n.narrow .filename-form {\n display: none;\n}\n\n.filename-input {\n background: none;\n color: inherit;\n font-size: inherit;\n border: 2px solid transparent;\n transition: border-color 0.25s;\n}\n\n.filename-input:focus {\n outline: none;\n border-bottom-color: white;\n}\n\n.gutter {\n flex-shrink: 0;\n cursor: col-resize;\n background: #4795ff;\n}\n\n.narrow [data-balloon-pos]::before,\n.narrow [data-balloon-pos]::after {\n display: none;\n}\n\n.waiting {\n display: none;\n}\n\n.fullscreen .waiting {\n display: flex;\n}\n\n.fullscreen .split {\n display: none;\n}\n\n.fullscreen .nav {\n border-bottom: none;\n}\n", + "" + ]); + const a = s + }, + 3645: e => { + "use strict"; + e.exports = function(e) { + var t = []; + return t.toString = function() { + return this.map((function(t) { + var i = "", + n = void 0 !== t[5]; + return t[4] && (i += "@supports (".concat(t[4], ") {")), t[2] && + (i += "@media ".concat(t[2], " {")), n && (i += "@layer".concat( + t[5].length > 0 ? " ".concat(t[5]) : "", " {")), i += e(t), n && + (i += "}"), t[2] && (i += "}"), t[4] && (i += "}"), i + })).join("") + }, t.i = function(e, i, n, o, r) { + "string" == typeof e && (e = [ + [null, e, void 0] + ]); + var s = {}; + if (n) + for (var a = 0; a < this.length; a++) { + var l = this[a][0]; + null != l && (s[l] = !0) + } + for (var d = 0; d < e.length; d++) { + var c = [].concat(e[d]); + n && s[c[0]] || (void 0 !== r && (void 0 === c[5] || (c[1] = + "@layer".concat(c[5].length > 0 ? " ".concat(c[5]) : "", " {").concat( + c[1], "}")), c[5] = r), i && (c[2] ? (c[1] = "@media ".concat(c[ + 2], " {").concat(c[1], "}"), c[2] = i) : c[2] = i), o && (c[4] ? + (c[1] = "@supports (".concat(c[4], ") {").concat(c[1], "}"), c[4] = + o) : c[4] = "".concat(o)), t.push(c)) + } + }, t + } + }, + 1667: e => { + "use strict"; + e.exports = function(e, t) { + return t || (t = {}), e ? (e = String(e.__esModule ? e.default : e), + /^['"].*['"]$/.test(e) && (e = e.slice(1, -1)), t.hash && (e += t.hash), + /["'() \t\n]|(%20)/.test(e) || t.needQuotes ? '"'.concat(e.replace( + /"/g, '\\"').replace(/\n/g, "\\n"), '"') : e) : e + } + }, + 8081: e => { + "use strict"; + e.exports = function(e) { + return e[1] + } + }, + 7769: module => { + "use strict"; + const toBytes = e => [...e].map((e => e.charCodeAt(0))), + xpiZipFilename = toBytes("META-INF/mozilla.rsa"), + oxmlContentTypes = toBytes("[Content_Types].xml"), + oxmlRels = toBytes("_rels/.rels"); + + function readUInt64LE(e, t = 0) { + let i = e[t], + n = 1, + o = 0; + for (; ++o < 8;) n *= 256, i += e[t + o] * n; + return i + } + const fileType = e => { + if (!(e instanceof Uint8Array || e instanceof ArrayBuffer || Buffer.isBuffer( + e))) throw new TypeError( + `Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof e}\`` + ); + const t = e instanceof Uint8Array ? e : new Uint8Array(e); + if (!(t && t.length > 1)) return null; + const i = (e, i) => { + i = Object.assign({ + offset: 0 + }, i); + for (let n = 0; n < e.length; n++) + if (i.mask) { + if (e[n] !== (i.mask[n] & t[n + i.offset])) return !1 + } else if (e[n] !== t[n + i.offset]) return !1; + return !0 + }, + n = (e, t) => i(toBytes(e), t); + if (i([255, 216, 255])) return { + ext: "jpg", + mime: "image/jpeg" + }; + if (i([137, 80, 78, 71, 13, 10, 26, 10])) return { + ext: "png", + mime: "image/png" + }; + if (i([71, 73, 70])) return { + ext: "gif", + mime: "image/gif" + }; + if (i([87, 69, 66, 80], { + offset: 8 + })) return { + ext: "webp", + mime: "image/webp" + }; + if (i([70, 76, 73, 70])) return { + ext: "flif", + mime: "image/flif" + }; + if ((i([73, 73, 42, 0]) || i([77, 77, 0, 42])) && i([67, 82], { + offset: 8 + })) return { + ext: "cr2", + mime: "image/x-canon-cr2" + }; + if (i([73, 73, 42, 0]) || i([77, 77, 0, 42])) return { + ext: "tif", + mime: "image/tiff" + }; + if (i([66, 77])) return { + ext: "bmp", + mime: "image/bmp" + }; + if (i([73, 73, 188])) return { + ext: "jxr", + mime: "image/vnd.ms-photo" + }; + if (i([56, 66, 80, 83])) return { + ext: "psd", + mime: "image/vnd.adobe.photoshop" + }; + if (i([80, 75, 3, 4])) { + if (i([109, 105, 109, 101, 116, 121, 112, 101, 97, 112, 112, 108, 105, + 99, 97, 116, 105, 111, 110, 47, 101, 112, 117, 98, 43, 122, 105, + 112 + ], { + offset: 30 + })) return { + ext: "epub", + mime: "application/epub+zip" + }; + if (i(xpiZipFilename, { + offset: 30 + })) return { + ext: "xpi", + mime: "application/x-xpinstall" + }; + if (n("mimetypeapplication/vnd.oasis.opendocument.text", { + offset: 30 + })) return { + ext: "odt", + mime: "application/vnd.oasis.opendocument.text" + }; + if (n("mimetypeapplication/vnd.oasis.opendocument.spreadsheet", { + offset: 30 + })) return { + ext: "ods", + mime: "application/vnd.oasis.opendocument.spreadsheet" + }; + if (n("mimetypeapplication/vnd.oasis.opendocument.presentation", { + offset: 30 + })) return { + ext: "odp", + mime: "application/vnd.oasis.opendocument.presentation" + }; + const e = (e, t = 0) => e.findIndex(((e, i, n) => i >= t && 80 === n[i] && + 75 === n[i + 1] && 3 === n[i + 2] && 4 === n[i + 3])); + let o = 0, + r = !1, + s = null; + do { + const a = o + 30; + if (r || (r = i(oxmlContentTypes, { + offset: a + }) || i(oxmlRels, { + offset: a + })), s || (n("word/", { + offset: a + }) ? s = { + ext: "docx", + mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + } : n("ppt/", { + offset: a + }) ? s = { + ext: "pptx", + mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation" + } : n("xl/", { + offset: a + }) && (s = { + ext: "xlsx", + mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + })), r && s) return s; + o = e(t, a) + } while (o >= 0); + if (s) return s + } + if (i([80, 75]) && (3 === t[2] || 5 === t[2] || 7 === t[2]) && (4 === t[ + 3] || 6 === t[3] || 8 === t[3])) return { + ext: "zip", + mime: "application/zip" + }; + if (i([117, 115, 116, 97, 114], { + offset: 257 + })) return { + ext: "tar", + mime: "application/x-tar" + }; + if (i([82, 97, 114, 33, 26, 7]) && (0 === t[6] || 1 === t[6])) return { + ext: "rar", + mime: "application/x-rar-compressed" + }; + if (i([31, 139, 8])) return { + ext: "gz", + mime: "application/gzip" + }; + if (i([66, 90, 104])) return { + ext: "bz2", + mime: "application/x-bzip2" + }; + if (i([55, 122, 188, 175, 39, 28])) return { + ext: "7z", + mime: "application/x-7z-compressed" + }; + if (i([120, 1])) return { + ext: "dmg", + mime: "application/x-apple-diskimage" + }; + if (i([51, 103, 112, 53]) || i([0, 0, 0]) && i([102, 116, 121, 112], { + offset: 4 + }) && (i([109, 112, 52, 49], { + offset: 8 + }) || i([109, 112, 52, 50], { + offset: 8 + }) || i([105, 115, 111, 109], { + offset: 8 + }) || i([105, 115, 111, 50], { + offset: 8 + }) || i([109, 109, 112, 52], { + offset: 8 + }) || i([77, 52, 86], { + offset: 8 + }) || i([100, 97, 115, 104], { + offset: 8 + }))) return { + ext: "mp4", + mime: "video/mp4" + }; + if (i([77, 84, 104, 100])) return { + ext: "mid", + mime: "audio/midi" + }; + if (i([26, 69, 223, 163])) { + const e = t.subarray(4, 4100), + i = e.findIndex(((e, t, i) => 66 === i[t] && 130 === i[t + 1])); + if (-1 !== i) { + const t = i + 3, + n = i => [...i].every(((i, n) => e[t + n] === i.charCodeAt(0))); + if (n("matroska")) return { + ext: "mkv", + mime: "video/x-matroska" + }; + if (n("webm")) return { + ext: "webm", + mime: "video/webm" + } + } + } + if (i([0, 0, 0, 20, 102, 116, 121, 112, 113, 116, 32, 32]) || i([102, + 114, 101, 101 + ], { + offset: 4 + }) || i([102, 116, 121, 112, 113, 116, 32, 32], { + offset: 4 + }) || i([109, 100, 97, 116], { + offset: 4 + }) || i([109, 111, 111, 118], { + offset: 4 + }) || i([119, 105, 100, 101], { + offset: 4 + })) return { + ext: "mov", + mime: "video/quicktime" + }; + if (i([82, 73, 70, 70])) { + if (i([65, 86, 73], { + offset: 8 + })) return { + ext: "avi", + mime: "video/vnd.avi" + }; + if (i([87, 65, 86, 69], { + offset: 8 + })) return { + ext: "wav", + mime: "audio/vnd.wave" + }; + if (i([81, 76, 67, 77], { + offset: 8 + })) return { + ext: "qcp", + mime: "audio/qcelp" + } + } + if (i([48, 38, 178, 117, 142, 102, 207, 17, 166, 217])) { + let e = 30; + do { + const n = readUInt64LE(t, e + 16); + if (i([145, 7, 220, 183, 183, 169, 207, 17, 142, 230, 0, 192, 12, 32, + 83, 101 + ], { + offset: e + })) { + if (i([64, 158, 105, 248, 77, 91, 207, 17, 168, 253, 0, 128, 95, 92, + 68, 43 + ], { + offset: e + 24 + })) return { + ext: "wma", + mime: "audio/x-ms-wma" + }; + if (i([192, 239, 25, 188, 77, 91, 207, 17, 168, 253, 0, 128, 95, 92, + 68, 43 + ], { + offset: e + 24 + })) return { + ext: "wmv", + mime: "video/x-ms-asf" + }; + break + } + e += n + } while (e + 24 <= t.length); + return { + ext: "asf", + mime: "application/vnd.ms-asf" + } + } + if (i([0, 0, 1, 186]) || i([0, 0, 1, 179])) return { + ext: "mpg", + mime: "video/mpeg" + }; + if (i([102, 116, 121, 112, 51, 103], { + offset: 4 + })) return { + ext: "3gp", + mime: "video/3gpp" + }; + for (let e = 0; e < 2 && e < t.length - 16; e++) { + if (i([73, 68, 51], { + offset: e + }) || i([255, 226], { + offset: e, + mask: [255, 226] + })) return { + ext: "mp3", + mime: "audio/mpeg" + }; + if (i([255, 228], { + offset: e, + mask: [255, 228] + })) return { + ext: "mp2", + mime: "audio/mpeg" + }; + if (i([255, 248], { + offset: e, + mask: [255, 252] + })) return { + ext: "mp2", + mime: "audio/mpeg" + }; + if (i([255, 240], { + offset: e, + mask: [255, 252] + })) return { + ext: "mp4", + mime: "audio/mpeg" + } + } + if (i([102, 116, 121, 112, 77, 52, 65], { + offset: 4 + })) return { + ext: "m4a", + mime: "audio/mp4" + }; + if (i([79, 112, 117, 115, 72, 101, 97, 100], { + offset: 28 + })) return { + ext: "opus", + mime: "audio/opus" + }; + if (i([79, 103, 103, 83])) return i([128, 116, 104, 101, 111, 114, 97], { + offset: 28 + }) ? { + ext: "ogv", + mime: "video/ogg" + } : i([1, 118, 105, 100, 101, 111, 0], { + offset: 28 + }) ? { + ext: "ogm", + mime: "video/ogg" + } : i([127, 70, 76, 65, 67], { + offset: 28 + }) ? { + ext: "oga", + mime: "audio/ogg" + } : i([83, 112, 101, 101, 120, 32, 32], { + offset: 28 + }) ? { + ext: "spx", + mime: "audio/ogg" + } : i([1, 118, 111, 114, 98, 105, 115], { + offset: 28 + }) ? { + ext: "ogg", + mime: "audio/ogg" + } : { + ext: "ogx", + mime: "application/ogg" + }; + if (i([102, 76, 97, 67])) return { + ext: "flac", + mime: "audio/x-flac" + }; + if (i([77, 65, 67, 32])) return { + ext: "ape", + mime: "audio/ape" + }; + if (i([119, 118, 112, 107])) return { + ext: "wv", + mime: "audio/wavpack" + }; + if (i([35, 33, 65, 77, 82, 10])) return { + ext: "amr", + mime: "audio/amr" + }; + if (i([37, 80, 68, 70])) return { + ext: "pdf", + mime: "application/pdf" + }; + if (i([77, 90])) return { + ext: "exe", + mime: "application/x-msdownload" + }; + if ((67 === t[0] || 70 === t[0]) && i([87, 83], { + offset: 1 + })) return { + ext: "swf", + mime: "application/x-shockwave-flash" + }; + if (i([123, 92, 114, 116, 102])) return { + ext: "rtf", + mime: "application/rtf" + }; + if (i([0, 97, 115, 109])) return { + ext: "wasm", + mime: "application/wasm" + }; + if (i([119, 79, 70, 70]) && (i([0, 1, 0, 0], { + offset: 4 + }) || i([79, 84, 84, 79], { + offset: 4 + }))) return { + ext: "woff", + mime: "font/woff" + }; + if (i([119, 79, 70, 50]) && (i([0, 1, 0, 0], { + offset: 4 + }) || i([79, 84, 84, 79], { + offset: 4 + }))) return { + ext: "woff2", + mime: "font/woff2" + }; + if (i([76, 80], { + offset: 34 + }) && (i([0, 0, 1], { + offset: 8 + }) || i([1, 0, 2], { + offset: 8 + }) || i([2, 0, 2], { + offset: 8 + }))) return { + ext: "eot", + mime: "application/vnd.ms-fontobject" + }; + if (i([0, 1, 0, 0, 0])) return { + ext: "ttf", + mime: "font/ttf" + }; + if (i([79, 84, 84, 79, 0])) return { + ext: "otf", + mime: "font/otf" + }; + if (i([0, 0, 1, 0])) return { + ext: "ico", + mime: "image/x-icon" + }; + if (i([0, 0, 2, 0])) return { + ext: "cur", + mime: "image/x-icon" + }; + if (i([70, 76, 86, 1])) return { + ext: "flv", + mime: "video/x-flv" + }; + if (i([37, 33])) return { + ext: "ps", + mime: "application/postscript" + }; + if (i([253, 55, 122, 88, 90, 0])) return { + ext: "xz", + mime: "application/x-xz" + }; + if (i([83, 81, 76, 105])) return { + ext: "sqlite", + mime: "application/x-sqlite3" + }; + if (i([78, 69, 83, 26])) return { + ext: "nes", + mime: "application/x-nintendo-nes-rom" + }; + if (i([67, 114, 50, 52])) return { + ext: "crx", + mime: "application/x-google-chrome-extension" + }; + if (i([77, 83, 67, 70]) || i([73, 83, 99, 40])) return { + ext: "cab", + mime: "application/vnd.ms-cab-compressed" + }; + if (i([33, 60, 97, 114, 99, 104, 62, 10, 100, 101, 98, 105, 97, 110, 45, + 98, 105, 110, 97, 114, 121 + ])) return { + ext: "deb", + mime: "application/x-deb" + }; + if (i([33, 60, 97, 114, 99, 104, 62])) return { + ext: "ar", + mime: "application/x-unix-archive" + }; + if (i([237, 171, 238, 219])) return { + ext: "rpm", + mime: "application/x-rpm" + }; + if (i([31, 160]) || i([31, 157])) return { + ext: "Z", + mime: "application/x-compress" + }; + if (i([76, 90, 73, 80])) return { + ext: "lz", + mime: "application/x-lzip" + }; + if (i([208, 207, 17, 224, 161, 177, 26, 225])) return { + ext: "msi", + mime: "application/x-msi" + }; + if (i([6, 14, 43, 52, 2, 5, 1, 1, 13, 1, 2, 1, 1, 2])) return { + ext: "mxf", + mime: "application/mxf" + }; + if (i([71], { + offset: 4 + }) && (i([71], { + offset: 192 + }) || i([71], { + offset: 196 + }))) return { + ext: "mts", + mime: "video/mp2t" + }; + if (i([66, 76, 69, 78, 68, 69, 82])) return { + ext: "blend", + mime: "application/x-blender" + }; + if (i([66, 80, 71, 251])) return { + ext: "bpg", + mime: "image/bpg" + }; + if (i([0, 0, 0, 12, 106, 80, 32, 32, 13, 10, 135, 10])) { + if (i([106, 112, 50, 32], { + offset: 20 + })) return { + ext: "jp2", + mime: "image/jp2" + }; + if (i([106, 112, 120, 32], { + offset: 20 + })) return { + ext: "jpx", + mime: "image/jpx" + }; + if (i([106, 112, 109, 32], { + offset: 20 + })) return { + ext: "jpm", + mime: "image/jpm" + }; + if (i([109, 106, 112, 50], { + offset: 20 + })) return { + ext: "mj2", + mime: "image/mj2" + } + } + if (i([70, 79, 82, 77])) return { + ext: "aif", + mime: "audio/aiff" + }; + if (n(" new Promise(((resolve, + reject) => { + const stream = eval("require")("stream"); + readableStream.once("readable", (() => { + const e = new stream.PassThrough, + t = readableStream.read(module.exports.minimumBytes) || + readableStream.read(); + try { + e.fileType = fileType(t) + } catch (e) { + reject(e) + } + readableStream.unshift(t), stream.pipeline ? resolve(stream.pipeline( + readableStream, e, (() => {}))) : resolve(readableStream.pipe(e)) + })) + })) + }, + 9184: (e, t, i) => { + "use strict"; + const n = i(7769), + o = new Set(["jpg", "png", "gif", "webp", "flif", "cr2", "tif", "bmp", + "jxr", "psd", "ico", "bpg", "jp2", "jpm", "jpx", "heic", "cur", "dcm" + ]), + r = e => { + const t = n(e); + return o.has(t && t.ext) ? t : null + }; + e.exports = r, e.exports.default = r, Object.defineProperty(r, + "minimumBytes", { + value: n.minimumBytes + }) + }, + 5733: (e, t, i) => { + e.exports = function e(t, i, n) { + function o(s, a) { + if (!i[s]) { + if (!t[s]) { + if (r) return r(s, !0); + var l = new Error("Cannot find module '" + s + "'"); + throw l.code = "MODULE_NOT_FOUND", l + } + var d = i[s] = { + exports: {} + }; + t[s][0].call(d.exports, (function(e) { + return o(t[s][1][e] || e) + }), d, d.exports, e, t, i, n) + } + return i[s].exports + } + for (var r = void 0, s = 0; s < n.length; s++) o(n[s]); + return o + }({ + 1: [function(e, t, i) { + "use strict"; + var n = e("./utils"), + o = e("./support"), + r = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + i.encode = function(e) { + for (var t, i, o, s, a, l, d, c = [], h = 0, u = e.length, g = u, + p = "string" !== n.getTypeOf(e); h < e.length;) g = u - h, o = + p ? (t = e[h++], i = h < u ? e[h++] : 0, h < u ? e[h++] : 0) : ( + t = e.charCodeAt(h++), i = h < u ? e.charCodeAt(h++) : 0, h < u ? + e.charCodeAt(h++) : 0), s = t >> 2, a = (3 & t) << 4 | i >> 4, + l = 1 < g ? (15 & i) << 2 | o >> 6 : 64, d = 2 < g ? 63 & o : 64, + c.push(r.charAt(s) + r.charAt(a) + r.charAt(l) + r.charAt(d)); + return c.join("") + }, i.decode = function(e) { + var t, i, n, s, a, l, d = 0, + c = 0, + h = "data:"; + if (e.substr(0, h.length) === h) throw new Error( + "Invalid base64 input, it looks like a data url."); + var u, g = 3 * (e = e.replace(/[^A-Za-z0-9\+\/\=]/g, "")).length / + 4; + if (e.charAt(e.length - 1) === r.charAt(64) && g--, e.charAt(e.length - + 2) === r.charAt(64) && g--, g % 1 != 0) throw new Error( + "Invalid base64 input, bad content length."); + for (u = o.uint8array ? new Uint8Array(0 | g) : new Array(0 | g); d < + e.length;) t = r.indexOf(e.charAt(d++)) << 2 | (s = r.indexOf(e.charAt( + d++))) >> 4, i = (15 & s) << 4 | (a = r.indexOf(e.charAt(d++))) >> + 2, n = (3 & a) << 6 | (l = r.indexOf(e.charAt(d++))), u[c++] = t, + 64 !== a && (u[c++] = i), 64 !== l && (u[c++] = n); + return u + } + }, { + "./support": 30, + "./utils": 32 + }], + 2: [function(e, t, i) { + "use strict"; + var n = e("./external"), + o = e("./stream/DataWorker"), + r = e("./stream/Crc32Probe"), + s = e("./stream/DataLengthProbe"); + + function a(e, t, i, n, o) { + this.compressedSize = e, this.uncompressedSize = t, this.crc32 = i, + this.compression = n, this.compressedContent = o + } + a.prototype = { + getContentWorker: function() { + var e = new o(n.Promise.resolve(this.compressedContent)).pipe( + this.compression.uncompressWorker()).pipe(new s("data_length")), + t = this; + return e.on("end", (function() { + if (this.streamInfo.data_length !== t.uncompressedSize) + throw new Error("Bug : uncompressed data size mismatch") + })), e + }, + getCompressedWorker: function() { + return new o(n.Promise.resolve(this.compressedContent)).withStreamInfo( + "compressedSize", this.compressedSize).withStreamInfo( + "uncompressedSize", this.uncompressedSize).withStreamInfo( + "crc32", this.crc32).withStreamInfo("compression", this.compression) + } + }, a.createWorkerFrom = function(e, t, i) { + return e.pipe(new r).pipe(new s("uncompressedSize")).pipe(t.compressWorker( + i)).pipe(new s("compressedSize")).withStreamInfo("compression", + t) + }, t.exports = a + }, { + "./external": 6, + "./stream/Crc32Probe": 25, + "./stream/DataLengthProbe": 26, + "./stream/DataWorker": 27 + }], + 3: [function(e, t, i) { + "use strict"; + var n = e("./stream/GenericWorker"); + i.STORE = { + magic: "\0\0", + compressWorker: function(e) { + return new n("STORE compression") + }, + uncompressWorker: function() { + return new n("STORE decompression") + } + }, i.DEFLATE = e("./flate") + }, { + "./flate": 7, + "./stream/GenericWorker": 28 + }], + 4: [function(e, t, i) { + "use strict"; + var n = e("./utils"), + o = function() { + for (var e, t = [], i = 0; i < 256; i++) { + e = i; + for (var n = 0; n < 8; n++) e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> + 1; + t[i] = e + } + return t + }(); + t.exports = function(e, t) { + return void 0 !== e && e.length ? "string" !== n.getTypeOf(e) ? + function(e, t, i, n) { + var r = o, + s = 0 + i; + e ^= -1; + for (var a = 0; a < s; a++) e = e >>> 8 ^ r[255 & (e ^ t[a])]; + return -1 ^ e + }(0 | t, e, e.length) : function(e, t, i, n) { + var r = o, + s = 0 + i; + e ^= -1; + for (var a = 0; a < s; a++) e = e >>> 8 ^ r[255 & (e ^ t.charCodeAt( + a))]; + return -1 ^ e + }(0 | t, e, e.length) : 0 + } + }, { + "./utils": 32 + }], + 5: [function(e, t, i) { + "use strict"; + i.base64 = !1, i.binary = !1, i.dir = !1, i.createFolders = !0, i.date = + null, i.compression = null, i.compressionOptions = null, i.comment = + null, i.unixPermissions = null, i.dosPermissions = null + }, {}], + 6: [function(e, t, i) { + "use strict"; + var n; + n = "undefined" != typeof Promise ? Promise : e("lie"), t.exports = { + Promise: n + } + }, { + lie: 37 + }], + 7: [function(e, t, i) { + "use strict"; + var n = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && + "undefined" != typeof Uint32Array, + o = e("pako"), + r = e("./utils"), + s = e("./stream/GenericWorker"), + a = n ? "uint8array" : "array"; + + function l(e, t) { + s.call(this, "FlateWorker/" + e), this._pako = null, this._pakoAction = + e, this._pakoOptions = t, this.meta = {} + } + i.magic = "\b\0", r.inherits(l, s), l.prototype.processChunk = + function(e) { + this.meta = e.meta, null === this._pako && this._createPako(), + this._pako.push(r.transformTo(a, e.data), !1) + }, l.prototype.flush = function() { + s.prototype.flush.call(this), null === this._pako && this._createPako(), + this._pako.push([], !0) + }, l.prototype.cleanUp = function() { + s.prototype.cleanUp.call(this), this._pako = null + }, l.prototype._createPako = function() { + this._pako = new o[this._pakoAction]({ + raw: !0, + level: this._pakoOptions.level || -1 + }); + var e = this; + this._pako.onData = function(t) { + e.push({ + data: t, + meta: e.meta + }) + } + }, i.compressWorker = function(e) { + return new l("Deflate", e) + }, i.uncompressWorker = function() { + return new l("Inflate", {}) + } + }, { + "./stream/GenericWorker": 28, + "./utils": 32, + pako: 38 + }], + 8: [function(e, t, i) { + "use strict"; + + function n(e, t) { + var i, n = ""; + for (i = 0; i < t; i++) n += String.fromCharCode(255 & e), e >>>= + 8; + return n + } + + function o(e, t, i, o, s, c) { + var h, u, g = e.file, + p = e.compression, + m = c !== a.utf8encode, + f = r.transformTo("string", c(g.name)), + _ = r.transformTo("string", a.utf8encode(g.name)), + b = g.comment, + v = r.transformTo("string", c(b)), + w = r.transformTo("string", a.utf8encode(b)), + C = _.length !== g.name.length, + y = w.length !== b.length, + S = "", + x = "", + k = "", + L = g.dir, + N = g.date, + D = { + crc32: 0, + compressedSize: 0, + uncompressedSize: 0 + }; + t && !i || (D.crc32 = e.crc32, D.compressedSize = e.compressedSize, + D.uncompressedSize = e.uncompressedSize); + var E = 0; + t && (E |= 8), m || !C && !y || (E |= 2048); + var I = 0, + T = 0; + L && (I |= 16), "UNIX" === s ? (T = 798, I |= function(e, t) { + var i = e; + return e || (i = t ? 16893 : 33204), (65535 & i) << 16 + }(g.unixPermissions, L)) : (T = 20, I |= function(e) { + return 63 & (e || 0) + }(g.dosPermissions)), h = N.getUTCHours(), h <<= 6, h |= N.getUTCMinutes(), + h <<= 5, h |= N.getUTCSeconds() / 2, u = N.getUTCFullYear() - + 1980, u <<= 4, u |= N.getUTCMonth() + 1, u <<= 5, u |= N.getUTCDate(), + C && (x = n(1, 1) + n(l(f), 4) + _, S += "up" + n(x.length, 2) + + x), y && (k = n(1, 1) + n(l(v), 4) + w, S += "uc" + n(k.length, + 2) + k); + var M = ""; + return M += "\n\0", M += n(E, 2), M += p.magic, M += n(h, 2), M += + n(u, 2), M += n(D.crc32, 4), M += n(D.compressedSize, 4), M += n( + D.uncompressedSize, 4), M += n(f.length, 2), M += n(S.length, 2), { + fileRecord: d.LOCAL_FILE_HEADER + M + f + S, + dirRecord: d.CENTRAL_FILE_HEADER + n(T, 2) + M + n(v.length, 2) + + "\0\0\0\0" + n(I, 4) + n(o, 4) + f + S + v + } + } + var r = e("../utils"), + s = e("../stream/GenericWorker"), + a = e("../utf8"), + l = e("../crc32"), + d = e("../signature"); + + function c(e, t, i, n) { + s.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = + t, this.zipPlatform = i, this.encodeFileName = n, this.streamFiles = + e, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], + this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = + null, this._sources = [] + } + r.inherits(c, s), c.prototype.push = function(e) { + var t = e.meta.percent || 0, + i = this.entriesCount, + n = this._sources.length; + this.accumulate ? this.contentBuffer.push(e) : (this.bytesWritten += + e.data.length, s.prototype.push.call(this, { + data: e.data, + meta: { + currentFile: this.currentFile, + percent: i ? (t + 100 * (i - n - 1)) / i : 100 + } + })) + }, c.prototype.openedSource = function(e) { + this.currentSourceOffset = this.bytesWritten, this.currentFile = + e.file.name; + var t = this.streamFiles && !e.file.dir; + if (t) { + var i = o(e, t, !1, this.currentSourceOffset, this.zipPlatform, + this.encodeFileName); + this.push({ + data: i.fileRecord, + meta: { + percent: 0 + } + }) + } else this.accumulate = !0 + }, c.prototype.closedSource = function(e) { + this.accumulate = !1; + var t = this.streamFiles && !e.file.dir, + i = o(e, t, !0, this.currentSourceOffset, this.zipPlatform, this + .encodeFileName); + if (this.dirRecords.push(i.dirRecord), t) this.push({ + data: function(e) { + return d.DATA_DESCRIPTOR + n(e.crc32, 4) + n(e.compressedSize, + 4) + n(e.uncompressedSize, 4) + }(e), + meta: { + percent: 100 + } + }); + else + for (this.push({ + data: i.fileRecord, + meta: { + percent: 0 + } + }); this.contentBuffer.length;) this.push(this.contentBuffer.shift()); + this.currentFile = null + }, c.prototype.flush = function() { + for (var e = this.bytesWritten, t = 0; t < this.dirRecords.length; t++) + this.push({ + data: this.dirRecords[t], + meta: { + percent: 100 + } + }); + var i = this.bytesWritten - e, + o = function(e, t, i, o, s) { + var a = r.transformTo("string", s(o)); + return d.CENTRAL_DIRECTORY_END + "\0\0\0\0" + n(e, 2) + n(e, 2) + + n(t, 4) + n(i, 4) + n(a.length, 2) + a + }(this.dirRecords.length, i, e, this.zipComment, this.encodeFileName); + this.push({ + data: o, + meta: { + percent: 100 + } + }) + }, c.prototype.prepareNextSource = function() { + this.previous = this._sources.shift(), this.openedSource(this.previous + .streamInfo), this.isPaused ? this.previous.pause() : this.previous + .resume() + }, c.prototype.registerPrevious = function(e) { + this._sources.push(e); + var t = this; + return e.on("data", (function(e) { + t.processChunk(e) + })), e.on("end", (function() { + t.closedSource(t.previous.streamInfo), t._sources.length ? t.prepareNextSource() : + t.end() + })), e.on("error", (function(e) { + t.error(e) + })), this + }, c.prototype.resume = function() { + return !!s.prototype.resume.call(this) && (!this.previous && this + ._sources.length ? (this.prepareNextSource(), !0) : this.previous || + this._sources.length || this.generatedError ? void 0 : (this.end(), ! + 0)) + }, c.prototype.error = function(e) { + var t = this._sources; + if (!s.prototype.error.call(this, e)) return !1; + for (var i = 0; i < t.length; i++) try { + t[i].error(e) + } catch (e) {} + return !0 + }, c.prototype.lock = function() { + s.prototype.lock.call(this); + for (var e = this._sources, t = 0; t < e.length; t++) e[t].lock() + }, t.exports = c + }, { + "../crc32": 4, + "../signature": 23, + "../stream/GenericWorker": 28, + "../utf8": 31, + "../utils": 32 + }], + 9: [function(e, t, i) { + "use strict"; + var n = e("../compressions"), + o = e("./ZipFileWorker"); + i.generateWorker = function(e, t, i) { + var r = new o(t.streamFiles, i, t.platform, t.encodeFileName), + s = 0; + try { + e.forEach((function(e, i) { + s++; + var o = function(e, t) { + var i = e || t, + o = n[i]; + if (!o) throw new Error(i + + " is not a valid compression method !"); + return o + }(i.options.compression, t.compression), + a = i.options.compressionOptions || t.compressionOptions || {}, + l = i.dir, + d = i.date; + i._compressWorker(o, a).withStreamInfo("file", { + name: e, + dir: l, + date: d, + comment: i.comment || "", + unixPermissions: i.unixPermissions, + dosPermissions: i.dosPermissions + }).pipe(r) + })), r.entriesCount = s + } catch (e) { + r.error(e) + } + return r + } + }, { + "../compressions": 3, + "./ZipFileWorker": 8 + }], + 10: [function(e, t, i) { + "use strict"; + + function n() { + if (!(this instanceof n)) return new n; + if (arguments.length) throw new Error( + "The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide." + ); + this.files = Object.create(null), this.comment = null, this.root = + "", this.clone = function() { + var e = new n; + for (var t in this) "function" != typeof this[t] && (e[t] = this[ + t]); + return e + } + }(n.prototype = e("./object")).loadAsync = e("./load"), n.support = + e("./support"), n.defaults = e("./defaults"), n.version = "3.7.1", + n.loadAsync = function(e, t) { + return (new n).loadAsync(e, t) + }, n.external = e("./external"), t.exports = n + }, { + "./defaults": 5, + "./external": 6, + "./load": 11, + "./object": 15, + "./support": 30 + }], + 11: [function(e, t, i) { + "use strict"; + var n = e("./utils"), + o = e("./external"), + r = e("./utf8"), + s = e("./zipEntries"), + a = e("./stream/Crc32Probe"), + l = e("./nodejsUtils"); + + function d(e) { + return new o.Promise((function(t, i) { + var n = e.decompressed.getContentWorker().pipe(new a); + n.on("error", (function(e) { + i(e) + })).on("end", (function() { + n.streamInfo.crc32 !== e.decompressed.crc32 ? i(new Error( + "Corrupted zip : CRC32 mismatch")) : t() + })).resume() + })) + } + t.exports = function(e, t) { + var i = this; + return t = n.extend(t || {}, { + base64: !1, + checkCRC32: !1, + optimizedBinaryString: !1, + createFolders: !1, + decodeFileName: r.utf8decode + }), l.isNode && l.isStream(e) ? o.Promise.reject(new Error( + "JSZip can't accept a stream when loading a zip file.")) : n.prepareContent( + "the loaded zip file", e, !0, t.optimizedBinaryString, t.base64 + ).then((function(e) { + var i = new s(t); + return i.load(e), i + })).then((function(e) { + var i = [o.Promise.resolve(e)], + n = e.files; + if (t.checkCRC32) + for (var r = 0; r < n.length; r++) i.push(d(n[r])); + return o.Promise.all(i) + })).then((function(e) { + for (var n = e.shift(), o = n.files, r = 0; r < o.length; r++) { + var s = o[r]; + i.file(s.fileNameStr, s.decompressed, { + binary: !0, + optimizedBinaryString: !0, + date: s.date, + dir: s.dir, + comment: s.fileCommentStr.length ? s.fileCommentStr : null, + unixPermissions: s.unixPermissions, + dosPermissions: s.dosPermissions, + createFolders: t.createFolders + }) + } + return n.zipComment.length && (i.comment = n.zipComment), i + })) + } + }, { + "./external": 6, + "./nodejsUtils": 14, + "./stream/Crc32Probe": 25, + "./utf8": 31, + "./utils": 32, + "./zipEntries": 33 + }], + 12: [function(e, t, i) { + "use strict"; + var n = e("../utils"), + o = e("../stream/GenericWorker"); + + function r(e, t) { + o.call(this, "Nodejs stream input adapter for " + e), this._upstreamEnded = ! + 1, this._bindStream(t) + } + n.inherits(r, o), r.prototype._bindStream = function(e) { + var t = this; + (this._stream = e).pause(), e.on("data", (function(e) { + t.push({ + data: e, + meta: { + percent: 0 + } + }) + })).on("error", (function(e) { + t.isPaused ? this.generatedError = e : t.error(e) + })).on("end", (function() { + t.isPaused ? t._upstreamEnded = !0 : t.end() + })) + }, r.prototype.pause = function() { + return !!o.prototype.pause.call(this) && (this._stream.pause(), ! + 0) + }, r.prototype.resume = function() { + return !!o.prototype.resume.call(this) && (this._upstreamEnded ? + this.end() : this._stream.resume(), !0) + }, t.exports = r + }, { + "../stream/GenericWorker": 28, + "../utils": 32 + }], + 13: [function(e, t, i) { + "use strict"; + var n = e("readable-stream").Readable; + + function o(e, t, i) { + n.call(this, t), this._helper = e; + var o = this; + e.on("data", (function(e, t) { + o.push(e) || o._helper.pause(), i && i(t) + })).on("error", (function(e) { + o.emit("error", e) + })).on("end", (function() { + o.push(null) + })) + } + e("../utils").inherits(o, n), o.prototype._read = function() { + this._helper.resume() + }, t.exports = o + }, { + "../utils": 32, + "readable-stream": 16 + }], + 14: [function(e, t, i) { + "use strict"; + t.exports = { + isNode: "undefined" != typeof Buffer, + newBufferFrom: function(e, t) { + if (Buffer.from && Buffer.from !== Uint8Array.from) return + Buffer.from(e, t); + if ("number" == typeof e) throw new Error( + 'The "data" argument must not be a number'); + return new Buffer(e, t) + }, + allocBuffer: function(e) { + if (Buffer.alloc) return Buffer.alloc(e); + var t = new Buffer(e); + return t.fill(0), t + }, + isBuffer: function(e) { + return Buffer.isBuffer(e) + }, + isStream: function(e) { + return e && "function" == typeof e.on && "function" == typeof e + .pause && "function" == typeof e.resume + } + } + }, {}], + 15: [function(e, t, i) { + "use strict"; + + function n(e, t, i) { + var n, o = r.getTypeOf(t), + a = r.extend(i || {}, l); + a.date = a.date || new Date, null !== a.compression && (a.compression = + a.compression.toUpperCase()), "string" == typeof a.unixPermissions && + (a.unixPermissions = parseInt(a.unixPermissions, 8)), a.unixPermissions && + 16384 & a.unixPermissions && (a.dir = !0), a.dosPermissions && 16 & + a.dosPermissions && (a.dir = !0), a.dir && (e = m(e)), a.createFolders && + (n = p(e)) && f.call(this, n, !0); + var h = "string" === o && !1 === a.binary && !1 === a.base64; + i && void 0 !== i.binary || (a.binary = !h), (t instanceof d && 0 === + t.uncompressedSize || a.dir || !t || 0 === t.length) && (a.base64 = ! + 1, a.binary = !0, t = "", a.compression = "STORE", o = "string"); + var _; + _ = t instanceof d || t instanceof s ? t : u.isNode && u.isStream( + t) ? new g(e, t) : r.prepareContent(e, t, a.binary, a.optimizedBinaryString, + a.base64); + var b = new c(e, _, a); + this.files[e] = b + } + var o = e("./utf8"), + r = e("./utils"), + s = e("./stream/GenericWorker"), + a = e("./stream/StreamHelper"), + l = e("./defaults"), + d = e("./compressedObject"), + c = e("./zipObject"), + h = e("./generate"), + u = e("./nodejsUtils"), + g = e("./nodejs/NodejsStreamInputAdapter"), + p = function(e) { + "/" === e.slice(-1) && (e = e.substring(0, e.length - 1)); + var t = e.lastIndexOf("/"); + return 0 < t ? e.substring(0, t) : "" + }, + m = function(e) { + return "/" !== e.slice(-1) && (e += "/"), e + }, + f = function(e, t) { + return t = void 0 !== t ? t : l.createFolders, e = m(e), this.files[ + e] || n.call(this, e, null, { + dir: !0, + createFolders: t + }), this.files[e] + }; + + function _(e) { + return "[object RegExp]" === Object.prototype.toString.call(e) + } + var b = { + load: function() { + throw new Error( + "This method has been removed in JSZip 3.0, please check the upgrade guide." + ) + }, + forEach: function(e) { + var t, i, n; + for (t in this.files) n = this.files[t], (i = t.slice(this.root + .length, t.length)) && t.slice(0, this.root.length) === this.root && + e(i, n) + }, + filter: function(e) { + var t = []; + return this.forEach((function(i, n) { + e(i, n) && t.push(n) + })), t + }, + file: function(e, t, i) { + if (1 !== arguments.length) return e = this.root + e, n.call( + this, e, t, i), this; + if (_(e)) { + var o = e; + return this.filter((function(e, t) { + return !t.dir && o.test(e) + })) + } + var r = this.files[this.root + e]; + return r && !r.dir ? r : null + }, + folder: function(e) { + if (!e) return this; + if (_(e)) return this.filter((function(t, i) { + return i.dir && e.test(t) + })); + var t = this.root + e, + i = f.call(this, t), + n = this.clone(); + return n.root = i.name, n + }, + remove: function(e) { + e = this.root + e; + var t = this.files[e]; + if (t || ("/" !== e.slice(-1) && (e += "/"), t = this.files[e]), + t && !t.dir) delete this.files[e]; + else + for (var i = this.filter((function(t, i) { + return i.name.slice(0, e.length) === e + })), n = 0; n < i.length; n++) delete this.files[i[n].name]; + return this + }, + generate: function(e) { + throw new Error( + "This method has been removed in JSZip 3.0, please check the upgrade guide." + ) + }, + generateInternalStream: function(e) { + var t, i = {}; + try { + if ((i = r.extend(e || {}, { + streamFiles: !1, + compression: "STORE", + compressionOptions: null, + type: "", + platform: "DOS", + comment: null, + mimeType: "application/zip", + encodeFileName: o.utf8encode + })).type = i.type.toLowerCase(), i.compression = i.compression + .toUpperCase(), "binarystring" === i.type && (i.type = + "string"), !i.type) throw new Error( + "No output type specified."); + r.checkSupport(i.type), "darwin" !== i.platform && "freebsd" !== + i.platform && "linux" !== i.platform && "sunos" !== i.platform || + (i.platform = "UNIX"), "win32" === i.platform && (i.platform = + "DOS"); + var n = i.comment || this.comment || ""; + t = h.generateWorker(this, i, n) + } catch (e) { + (t = new s("error")).error(e) + } + return new a(t, i.type || "string", i.mimeType) + }, + generateAsync: function(e, t) { + return this.generateInternalStream(e).accumulate(t) + }, + generateNodeStream: function(e, t) { + return (e = e || {}).type || (e.type = "nodebuffer"), this.generateInternalStream( + e).toNodejsStream(t) + } + }; + t.exports = b + }, { + "./compressedObject": 2, + "./defaults": 5, + "./generate": 9, + "./nodejs/NodejsStreamInputAdapter": 12, + "./nodejsUtils": 14, + "./stream/GenericWorker": 28, + "./stream/StreamHelper": 29, + "./utf8": 31, + "./utils": 32, + "./zipObject": 35 + }], + 16: [function(e, t, i) { + t.exports = e("stream") + }, { + stream: void 0 + }], + 17: [function(e, t, i) { + "use strict"; + var n = e("./DataReader"); + + function o(e) { + n.call(this, e); + for (var t = 0; t < this.data.length; t++) e[t] = 255 & e[t] + } + e("../utils").inherits(o, n), o.prototype.byteAt = function(e) { + return this.data[this.zero + e] + }, o.prototype.lastIndexOfSignature = function(e) { + for (var t = e.charCodeAt(0), i = e.charCodeAt(1), n = e.charCodeAt( + 2), o = e.charCodeAt(3), r = this.length - 4; 0 <= r; --r) + if (this.data[r] === t && this.data[r + 1] === i && this.data[r + + 2] === n && this.data[r + 3] === o) return r - this.zero; + return -1 + }, o.prototype.readAndCheckSignature = function(e) { + var t = e.charCodeAt(0), + i = e.charCodeAt(1), + n = e.charCodeAt(2), + o = e.charCodeAt(3), + r = this.readData(4); + return t === r[0] && i === r[1] && n === r[2] && o === r[3] + }, o.prototype.readData = function(e) { + if (this.checkOffset(e), 0 === e) return []; + var t = this.data.slice(this.zero + this.index, this.zero + this.index + + e); + return this.index += e, t + }, t.exports = o + }, { + "../utils": 32, + "./DataReader": 18 + }], + 18: [function(e, t, i) { + "use strict"; + var n = e("../utils"); + + function o(e) { + this.data = e, this.length = e.length, this.index = 0, this.zero = + 0 + } + o.prototype = { + checkOffset: function(e) { + this.checkIndex(this.index + e) + }, + checkIndex: function(e) { + if (this.length < this.zero + e || e < 0) throw new Error( + "End of data reached (data length = " + this.length + + ", asked index = " + e + "). Corrupted zip ?") + }, + setIndex: function(e) { + this.checkIndex(e), this.index = e + }, + skip: function(e) { + this.setIndex(this.index + e) + }, + byteAt: function(e) {}, + readInt: function(e) { + var t, i = 0; + for (this.checkOffset(e), t = this.index + e - 1; t >= this.index; t--) + i = (i << 8) + this.byteAt(t); + return this.index += e, i + }, + readString: function(e) { + return n.transformTo("string", this.readData(e)) + }, + readData: function(e) {}, + lastIndexOfSignature: function(e) {}, + readAndCheckSignature: function(e) {}, + readDate: function() { + var e = this.readInt(4); + return new Date(Date.UTC(1980 + (e >> 25 & 127), (e >> 21 & 15) - + 1, e >> 16 & 31, e >> 11 & 31, e >> 5 & 63, (31 & e) << 1)) + } + }, t.exports = o + }, { + "../utils": 32 + }], + 19: [function(e, t, i) { + "use strict"; + var n = e("./Uint8ArrayReader"); + + function o(e) { + n.call(this, e) + } + e("../utils").inherits(o, n), o.prototype.readData = function(e) { + this.checkOffset(e); + var t = this.data.slice(this.zero + this.index, this.zero + this.index + + e); + return this.index += e, t + }, t.exports = o + }, { + "../utils": 32, + "./Uint8ArrayReader": 21 + }], + 20: [function(e, t, i) { + "use strict"; + var n = e("./DataReader"); + + function o(e) { + n.call(this, e) + } + e("../utils").inherits(o, n), o.prototype.byteAt = function(e) { + return this.data.charCodeAt(this.zero + e) + }, o.prototype.lastIndexOfSignature = function(e) { + return this.data.lastIndexOf(e) - this.zero + }, o.prototype.readAndCheckSignature = function(e) { + return e === this.readData(4) + }, o.prototype.readData = function(e) { + this.checkOffset(e); + var t = this.data.slice(this.zero + this.index, this.zero + this.index + + e); + return this.index += e, t + }, t.exports = o + }, { + "../utils": 32, + "./DataReader": 18 + }], + 21: [function(e, t, i) { + "use strict"; + var n = e("./ArrayReader"); + + function o(e) { + n.call(this, e) + } + e("../utils").inherits(o, n), o.prototype.readData = function(e) { + if (this.checkOffset(e), 0 === e) return new Uint8Array(0); + var t = this.data.subarray(this.zero + this.index, this.zero + + this.index + e); + return this.index += e, t + }, t.exports = o + }, { + "../utils": 32, + "./ArrayReader": 17 + }], + 22: [function(e, t, i) { + "use strict"; + var n = e("../utils"), + o = e("../support"), + r = e("./ArrayReader"), + s = e("./StringReader"), + a = e("./NodeBufferReader"), + l = e("./Uint8ArrayReader"); + t.exports = function(e) { + var t = n.getTypeOf(e); + return n.checkSupport(t), "string" !== t || o.uint8array ? + "nodebuffer" === t ? new a(e) : o.uint8array ? new l(n.transformTo( + "uint8array", e)) : new r(n.transformTo("array", e)) : new s(e) + } + }, { + "../support": 30, + "../utils": 32, + "./ArrayReader": 17, + "./NodeBufferReader": 19, + "./StringReader": 20, + "./Uint8ArrayReader": 21 + }], + 23: [function(e, t, i) { + "use strict"; + i.LOCAL_FILE_HEADER = "PK", i.CENTRAL_FILE_HEADER = "PK", i.CENTRAL_DIRECTORY_END = + "PK", i.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK", i.ZIP64_CENTRAL_DIRECTORY_END = + "PK", i.DATA_DESCRIPTOR = "PK\b" + }, {}], + 24: [function(e, t, i) { + "use strict"; + var n = e("./GenericWorker"), + o = e("../utils"); + + function r(e) { + n.call(this, "ConvertWorker to " + e), this.destType = e + } + o.inherits(r, n), r.prototype.processChunk = function(e) { + this.push({ + data: o.transformTo(this.destType, e.data), + meta: e.meta + }) + }, t.exports = r + }, { + "../utils": 32, + "./GenericWorker": 28 + }], + 25: [function(e, t, i) { + "use strict"; + var n = e("./GenericWorker"), + o = e("../crc32"); + + function r() { + n.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0) + } + e("../utils").inherits(r, n), r.prototype.processChunk = function(e) { + this.streamInfo.crc32 = o(e.data, this.streamInfo.crc32 || 0), + this.push(e) + }, t.exports = r + }, { + "../crc32": 4, + "../utils": 32, + "./GenericWorker": 28 + }], + 26: [function(e, t, i) { + "use strict"; + var n = e("../utils"), + o = e("./GenericWorker"); + + function r(e) { + o.call(this, "DataLengthProbe for " + e), this.propName = e, this.withStreamInfo( + e, 0) + } + n.inherits(r, o), r.prototype.processChunk = function(e) { + if (e) { + var t = this.streamInfo[this.propName] || 0; + this.streamInfo[this.propName] = t + e.data.length + } + o.prototype.processChunk.call(this, e) + }, t.exports = r + }, { + "../utils": 32, + "./GenericWorker": 28 + }], + 27: [function(e, t, i) { + "use strict"; + var n = e("../utils"), + o = e("./GenericWorker"); + + function r(e) { + o.call(this, "DataWorker"); + var t = this; + this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = + null, this.type = "", this._tickScheduled = !1, e.then((function( + e) { + t.dataIsReady = !0, t.data = e, t.max = e && e.length || 0, t.type = + n.getTypeOf(e), t.isPaused || t._tickAndRepeat() + }), (function(e) { + t.error(e) + })) + } + n.inherits(r, o), r.prototype.cleanUp = function() { + o.prototype.cleanUp.call(this), this.data = null + }, r.prototype.resume = function() { + return !!o.prototype.resume.call(this) && (!this._tickScheduled && + this.dataIsReady && (this._tickScheduled = !0, n.delay(this._tickAndRepeat, [], + this)), !0) + }, r.prototype._tickAndRepeat = function() { + this._tickScheduled = !1, this.isPaused || this.isFinished || ( + this._tick(), this.isFinished || (n.delay(this._tickAndRepeat, [], + this), this._tickScheduled = !0)) + }, r.prototype._tick = function() { + if (this.isPaused || this.isFinished) return !1; + var e = null, + t = Math.min(this.max, this.index + 16384); + if (this.index >= this.max) return this.end(); + switch (this.type) { + case "string": + e = this.data.substring(this.index, t); + break; + case "uint8array": + e = this.data.subarray(this.index, t); + break; + case "array": + case "nodebuffer": + e = this.data.slice(this.index, t) + } + return this.index = t, this.push({ + data: e, + meta: { + percent: this.max ? this.index / this.max * 100 : 0 + } + }) + }, t.exports = r + }, { + "../utils": 32, + "./GenericWorker": 28 + }], + 28: [function(e, t, i) { + "use strict"; + + function n(e) { + this.name = e || "default", this.streamInfo = {}, this.generatedError = + null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = ! + 1, this.isLocked = !1, this._listeners = { + data: [], + end: [], + error: [] + }, this.previous = null + } + n.prototype = { + push: function(e) { + this.emit("data", e) + }, + end: function() { + if (this.isFinished) return !1; + this.flush(); + try { + this.emit("end"), this.cleanUp(), this.isFinished = !0 + } catch (e) { + this.emit("error", e) + } + return !0 + }, + error: function(e) { + return !this.isFinished && (this.isPaused ? this.generatedError = + e : (this.isFinished = !0, this.emit("error", e), this.previous && + this.previous.error(e), this.cleanUp()), !0) + }, + on: function(e, t) { + return this._listeners[e].push(t), this + }, + cleanUp: function() { + this.streamInfo = this.generatedError = this.extraStreamInfo = + null, this._listeners = [] + }, + emit: function(e, t) { + if (this._listeners[e]) + for (var i = 0; i < this._listeners[e].length; i++) this._listeners[ + e][i].call(this, t) + }, + pipe: function(e) { + return e.registerPrevious(this) + }, + registerPrevious: function(e) { + if (this.isLocked) throw new Error("The stream '" + this + + "' has already been used."); + this.streamInfo = e.streamInfo, this.mergeStreamInfo(), this.previous = + e; + var t = this; + return e.on("data", (function(e) { + t.processChunk(e) + })), e.on("end", (function() { + t.end() + })), e.on("error", (function(e) { + t.error(e) + })), this + }, + pause: function() { + return !this.isPaused && !this.isFinished && (this.isPaused = ! + 0, this.previous && this.previous.pause(), !0) + }, + resume: function() { + if (!this.isPaused || this.isFinished) return !1; + var e = this.isPaused = !1; + return this.generatedError && (this.error(this.generatedError), + e = !0), this.previous && this.previous.resume(), !e + }, + flush: function() {}, + processChunk: function(e) { + this.push(e) + }, + withStreamInfo: function(e, t) { + return this.extraStreamInfo[e] = t, this.mergeStreamInfo(), + this + }, + mergeStreamInfo: function() { + for (var e in this.extraStreamInfo) this.extraStreamInfo.hasOwnProperty( + e) && (this.streamInfo[e] = this.extraStreamInfo[e]) + }, + lock: function() { + if (this.isLocked) throw new Error("The stream '" + this + + "' has already been used."); + this.isLocked = !0, this.previous && this.previous.lock() + }, + toString: function() { + var e = "Worker " + this.name; + return this.previous ? this.previous + " -> " + e : e + } + }, t.exports = n + }, {}], + 29: [function(e, t, i) { + "use strict"; + var n = e("../utils"), + o = e("./ConvertWorker"), + r = e("./GenericWorker"), + s = e("../base64"), + a = e("../support"), + l = e("../external"), + d = null; + if (a.nodestream) try { + d = e("../nodejs/NodejsStreamOutputAdapter") + } catch (e) {} + + function c(e, t, i) { + var s = t; + switch (t) { + case "blob": + case "arraybuffer": + s = "uint8array"; + break; + case "base64": + s = "string" + } + try { + this._internalType = s, this._outputType = t, this._mimeType = i, + n.checkSupport(s), this._worker = e.pipe(new o(s)), e.lock() + } catch (e) { + this._worker = new r("error"), this._worker.error(e) + } + } + c.prototype = { + accumulate: function(e) { + return function(e, t) { + return new l.Promise((function(i, o) { + var r = [], + a = e._internalType, + l = e._outputType, + d = e._mimeType; + e.on("data", (function(e, i) { + r.push(e), t && t(i) + })).on("error", (function(e) { + r = [], o(e) + })).on("end", (function() { + try { + var e = function(e, t, i) { + switch (e) { + case "blob": + return n.newBlob(n.transformTo("arraybuffer", t), + i); + case "base64": + return s.encode(t); + default: + return n.transformTo(e, t) + } + }(l, function(e, t) { + var i, n = 0, + o = null, + r = 0; + for (i = 0; i < t.length; i++) r += t[i].length; + switch (e) { + case "string": + return t.join(""); + case "array": + return Array.prototype.concat.apply([], t); + case "uint8array": + for (o = new Uint8Array(r), i = 0; i < t.length; i++) + o.set(t[i], n), n += t[i].length; + return o; + case "nodebuffer": + return Buffer.concat(t); + default: + throw new Error("concat : unsupported type '" + + e + "'") + } + }(a, r), d); + i(e) + } catch (e) { + o(e) + } + r = [] + })).resume() + })) + }(this, e) + }, + on: function(e, t) { + var i = this; + return "data" === e ? this._worker.on(e, (function(e) { + t.call(i, e.data, e.meta) + })) : this._worker.on(e, (function() { + n.delay(t, arguments, i) + })), this + }, + resume: function() { + return n.delay(this._worker.resume, [], this._worker), this + }, + pause: function() { + return this._worker.pause(), this + }, + toNodejsStream: function(e) { + if (n.checkSupport("nodestream"), "nodebuffer" !== this._outputType) + throw new Error(this._outputType + + " is not supported by this method"); + return new d(this, { + objectMode: "nodebuffer" !== this._outputType + }, e) + } + }, t.exports = c + }, { + "../base64": 1, + "../external": 6, + "../nodejs/NodejsStreamOutputAdapter": 13, + "../support": 30, + "../utils": 32, + "./ConvertWorker": 24, + "./GenericWorker": 28 + }], + 30: [function(e, t, i) { + "use strict"; + if (i.base64 = !0, i.array = !0, i.string = !0, i.arraybuffer = + "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array, + i.nodebuffer = "undefined" != typeof Buffer, i.uint8array = + "undefined" != typeof Uint8Array, "undefined" == typeof ArrayBuffer + ) i.blob = !1; + else { + var n = new ArrayBuffer(0); + try { + i.blob = 0 === new Blob([n], { + type: "application/zip" + }).size + } catch (e) { + try { + var o = new(self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || + self.MSBlobBuilder); + o.append(n), i.blob = 0 === o.getBlob("application/zip").size + } catch (e) { + i.blob = !1 + } + } + } + try { + i.nodestream = !!e("readable-stream").Readable + } catch (e) { + i.nodestream = !1 + } + }, { + "readable-stream": 16 + }], + 31: [function(e, t, i) { + "use strict"; + for (var n = e("./utils"), o = e("./support"), r = e( + "./nodejsUtils"), s = e("./stream/GenericWorker"), a = new Array( + 256), l = 0; l < 256; l++) a[l] = 252 <= l ? 6 : 248 <= l ? 5 : + 240 <= l ? 4 : 224 <= l ? 3 : 192 <= l ? 2 : 1; + + function d() { + s.call(this, "utf-8 decode"), this.leftOver = null + } + + function c() { + s.call(this, "utf-8 encode") + } + a[254] = a[254] = 1, i.utf8encode = function(e) { + return o.nodebuffer ? r.newBufferFrom(e, "utf-8") : function(e) { + var t, i, n, r, s, a = e.length, + l = 0; + for (r = 0; r < a; r++) 55296 == (64512 & (i = e.charCodeAt(r))) && + r + 1 < a && 56320 == (64512 & (n = e.charCodeAt(r + 1))) && ( + i = 65536 + (i - 55296 << 10) + (n - 56320), r++), l += i < + 128 ? 1 : i < 2048 ? 2 : i < 65536 ? 3 : 4; + for (t = o.uint8array ? new Uint8Array(l) : new Array(l), r = s = + 0; s < l; r++) 55296 == (64512 & (i = e.charCodeAt(r))) && r + + 1 < a && 56320 == (64512 & (n = e.charCodeAt(r + 1))) && (i = + 65536 + (i - 55296 << 10) + (n - 56320), r++), i < 128 ? t[s++] = + i : (i < 2048 ? t[s++] = 192 | i >>> 6 : (i < 65536 ? t[s++] = + 224 | i >>> 12 : (t[s++] = 240 | i >>> 18, t[s++] = 128 | i >>> + 12 & 63), t[s++] = 128 | i >>> 6 & 63), t[s++] = 128 | 63 & + i); + return t + }(e) + }, i.utf8decode = function(e) { + return o.nodebuffer ? n.transformTo("nodebuffer", e).toString( + "utf-8") : function(e) { + var t, i, o, r, s = e.length, + l = new Array(2 * s); + for (t = i = 0; t < s;) + if ((o = e[t++]) < 128) l[i++] = o; + else if (4 < (r = a[o])) l[i++] = 65533, t += r - 1; + else { + for (o &= 2 === r ? 31 : 3 === r ? 15 : 7; 1 < r && t < s;) o = + o << 6 | 63 & e[t++], r--; + 1 < r ? l[i++] = 65533 : o < 65536 ? l[i++] = o : (o -= 65536, + l[i++] = 55296 | o >> 10 & 1023, l[i++] = 56320 | 1023 & o) + } + return l.length !== i && (l.subarray ? l = l.subarray(0, i) : l + .length = i), n.applyFromCharCode(l) + }(e = n.transformTo(o.uint8array ? "uint8array" : "array", e)) + }, n.inherits(d, s), d.prototype.processChunk = function(e) { + var t = n.transformTo(o.uint8array ? "uint8array" : "array", e.data); + if (this.leftOver && this.leftOver.length) { + if (o.uint8array) { + var r = t; + (t = new Uint8Array(r.length + this.leftOver.length)).set(this.leftOver, + 0), t.set(r, this.leftOver.length) + } else t = this.leftOver.concat(t); + this.leftOver = null + } + var s = function(e, t) { + var i; + for ((t = t || e.length) > e.length && (t = e.length), i = t - + 1; 0 <= i && 128 == (192 & e[i]);) i--; + return i < 0 || 0 === i ? t : i + a[e[i]] > t ? i : t + }(t), + l = t; + s !== t.length && (o.uint8array ? (l = t.subarray(0, s), this.leftOver = + t.subarray(s, t.length)) : (l = t.slice(0, s), this.leftOver = + t.slice(s, t.length))), this.push({ + data: i.utf8decode(l), + meta: e.meta + }) + }, d.prototype.flush = function() { + this.leftOver && this.leftOver.length && (this.push({ + data: i.utf8decode(this.leftOver), + meta: {} + }), this.leftOver = null) + }, i.Utf8DecodeWorker = d, n.inherits(c, s), c.prototype.processChunk = + function(e) { + this.push({ + data: i.utf8encode(e.data), + meta: e.meta + }) + }, i.Utf8EncodeWorker = c + }, { + "./nodejsUtils": 14, + "./stream/GenericWorker": 28, + "./support": 30, + "./utils": 32 + }], + 32: [function(e, t, i) { + "use strict"; + var n = e("./support"), + o = e("./base64"), + r = e("./nodejsUtils"), + s = e("set-immediate-shim"), + a = e("./external"); + + function l(e) { + return e + } + + function d(e, t) { + for (var i = 0; i < e.length; ++i) t[i] = 255 & e.charCodeAt(i); + return t + } + i.newBlob = function(e, t) { + i.checkSupport("blob"); + try { + return new Blob([e], { + type: t + }) + } catch (i) { + try { + var n = new(self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || + self.MSBlobBuilder); + return n.append(e), n.getBlob(t) + } catch (e) { + throw new Error("Bug : can't construct the Blob.") + } + } + }; + var c = { + stringifyByChunk: function(e, t, i) { + var n = [], + o = 0, + r = e.length; + if (r <= i) return String.fromCharCode.apply(null, e); + for (; o < r;) "array" === t || "nodebuffer" === t ? n.push( + String.fromCharCode.apply(null, e.slice(o, Math.min(o + i, r))) + ) : n.push(String.fromCharCode.apply(null, e.subarray(o, Math.min( + o + i, r)))), o += i; + return n.join("") + }, + stringifyByChar: function(e) { + for (var t = "", i = 0; i < e.length; i++) t += String.fromCharCode( + e[i]); + return t + }, + applyCanBeUsed: { + uint8array: function() { + try { + return n.uint8array && 1 === String.fromCharCode.apply(null, + new Uint8Array(1)).length + } catch (e) { + return !1 + } + }(), + nodebuffer: function() { + try { + return n.nodebuffer && 1 === String.fromCharCode.apply(null, + r.allocBuffer(1)).length + } catch (e) { + return !1 + } + }() + } + }; + + function h(e) { + var t = 65536, + n = i.getTypeOf(e), + o = !0; + if ("uint8array" === n ? o = c.applyCanBeUsed.uint8array : + "nodebuffer" === n && (o = c.applyCanBeUsed.nodebuffer), o) + for (; 1 < t;) try { + return c.stringifyByChunk(e, n, t) + } catch (e) { + t = Math.floor(t / 2) + } + return c.stringifyByChar(e) + } + + function u(e, t) { + for (var i = 0; i < e.length; i++) t[i] = e[i]; + return t + } + i.applyFromCharCode = h; + var g = {}; + g.string = { + string: l, + array: function(e) { + return d(e, new Array(e.length)) + }, + arraybuffer: function(e) { + return g.string.uint8array(e).buffer + }, + uint8array: function(e) { + return d(e, new Uint8Array(e.length)) + }, + nodebuffer: function(e) { + return d(e, r.allocBuffer(e.length)) + } + }, g.array = { + string: h, + array: l, + arraybuffer: function(e) { + return new Uint8Array(e).buffer + }, + uint8array: function(e) { + return new Uint8Array(e) + }, + nodebuffer: function(e) { + return r.newBufferFrom(e) + } + }, g.arraybuffer = { + string: function(e) { + return h(new Uint8Array(e)) + }, + array: function(e) { + return u(new Uint8Array(e), new Array(e.byteLength)) + }, + arraybuffer: l, + uint8array: function(e) { + return new Uint8Array(e) + }, + nodebuffer: function(e) { + return r.newBufferFrom(new Uint8Array(e)) + } + }, g.uint8array = { + string: h, + array: function(e) { + return u(e, new Array(e.length)) + }, + arraybuffer: function(e) { + return e.buffer + }, + uint8array: l, + nodebuffer: function(e) { + return r.newBufferFrom(e) + } + }, g.nodebuffer = { + string: h, + array: function(e) { + return u(e, new Array(e.length)) + }, + arraybuffer: function(e) { + return g.nodebuffer.uint8array(e).buffer + }, + uint8array: function(e) { + return u(e, new Uint8Array(e.length)) + }, + nodebuffer: l + }, i.transformTo = function(e, t) { + if (t = t || "", !e) return t; + i.checkSupport(e); + var n = i.getTypeOf(t); + return g[n][e](t) + }, i.getTypeOf = function(e) { + return "string" == typeof e ? "string" : "[object Array]" === + Object.prototype.toString.call(e) ? "array" : n.nodebuffer && r.isBuffer( + e) ? "nodebuffer" : n.uint8array && e instanceof Uint8Array ? + "uint8array" : n.arraybuffer && e instanceof ArrayBuffer ? + "arraybuffer" : void 0 + }, i.checkSupport = function(e) { + if (!n[e.toLowerCase()]) throw new Error(e + + " is not supported by this platform") + }, i.MAX_VALUE_16BITS = 65535, i.MAX_VALUE_32BITS = -1, i.pretty = + function(e) { + var t, i, n = ""; + for (i = 0; i < (e || "").length; i++) n += "\\x" + ((t = e.charCodeAt( + i)) < 16 ? "0" : "") + t.toString(16).toUpperCase(); + return n + }, i.delay = function(e, t, i) { + s((function() { + e.apply(i || null, t || []) + })) + }, i.inherits = function(e, t) { + function i() {} + i.prototype = t.prototype, e.prototype = new i + }, i.extend = function() { + var e, t, i = {}; + for (e = 0; e < arguments.length; e++) + for (t in arguments[e]) arguments[e].hasOwnProperty(t) && void 0 === + i[t] && (i[t] = arguments[e][t]); + return i + }, i.prepareContent = function(e, t, r, s, l) { + return a.Promise.resolve(t).then((function(e) { + return n.blob && (e instanceof Blob || -1 !== [ + "[object File]", "[object Blob]" + ].indexOf(Object.prototype.toString.call(e))) && "undefined" != + typeof FileReader ? new a.Promise((function(t, i) { + var n = new FileReader; + n.onload = function(e) { + t(e.target.result) + }, n.onerror = function(e) { + i(e.target.error) + }, n.readAsArrayBuffer(e) + })) : e + })).then((function(t) { + var c = i.getTypeOf(t); + return c ? ("arraybuffer" === c ? t = i.transformTo( + "uint8array", t) : "string" === c && (l ? t = o.decode(t) : + r && !0 !== s && (t = function(e) { + return d(e, n.uint8array ? new Uint8Array(e.length) : + new Array(e.length)) + }(t))), t) : a.Promise.reject(new Error( + "Can't read the data of '" + e + + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?" + )) + })) + } + }, { + "./base64": 1, + "./external": 6, + "./nodejsUtils": 14, + "./support": 30, + "set-immediate-shim": 54 + }], + 33: [function(e, t, i) { + "use strict"; + var n = e("./reader/readerFor"), + o = e("./utils"), + r = e("./signature"), + s = e("./zipEntry"), + a = (e("./utf8"), e("./support")); + + function l(e) { + this.files = [], this.loadOptions = e + } + l.prototype = { + checkSignature: function(e) { + if (!this.reader.readAndCheckSignature(e)) { + this.reader.index -= 4; + var t = this.reader.readString(4); + throw new Error("Corrupted zip or bug: unexpected signature (" + + o.pretty(t) + ", expected " + o.pretty(e) + ")") + } + }, + isSignature: function(e, t) { + var i = this.reader.index; + this.reader.setIndex(e); + var n = this.reader.readString(4) === t; + return this.reader.setIndex(i), n + }, + readBlockEndOfCentral: function() { + this.diskNumber = this.reader.readInt(2), this.diskWithCentralDirStart = + this.reader.readInt(2), this.centralDirRecordsOnThisDisk = + this.reader.readInt(2), this.centralDirRecords = this.reader.readInt( + 2), this.centralDirSize = this.reader.readInt(4), this.centralDirOffset = + this.reader.readInt(4), this.zipCommentLength = this.reader.readInt( + 2); + var e = this.reader.readData(this.zipCommentLength), + t = a.uint8array ? "uint8array" : "array", + i = o.transformTo(t, e); + this.zipComment = this.loadOptions.decodeFileName(i) + }, + readBlockZip64EndOfCentral: function() { + this.zip64EndOfCentralSize = this.reader.readInt(8), this.reader + .skip(4), this.diskNumber = this.reader.readInt(4), this.diskWithCentralDirStart = + this.reader.readInt(4), this.centralDirRecordsOnThisDisk = + this.reader.readInt(8), this.centralDirRecords = this.reader.readInt( + 8), this.centralDirSize = this.reader.readInt(8), this.centralDirOffset = + this.reader.readInt(8), this.zip64ExtensibleData = {}; + for (var e, t, i, n = this.zip64EndOfCentralSize - 44; 0 < n;) e = + this.reader.readInt(2), t = this.reader.readInt(4), i = this.reader + .readData(t), this.zip64ExtensibleData[e] = { + id: e, + length: t, + value: i + } + }, + readBlockZip64EndOfCentralLocator: function() { + if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), + this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt( + 8), this.disksCount = this.reader.readInt(4), 1 < this.disksCount + ) throw new Error("Multi-volumes zip are not supported") + }, + readLocalFiles: function() { + var e, t; + for (e = 0; e < this.files.length; e++) t = this.files[e], this + .reader.setIndex(t.localHeaderOffset), this.checkSignature(r.LOCAL_FILE_HEADER), + t.readLocalPart(this.reader), t.handleUTF8(), t.processAttributes() + }, + readCentralDir: function() { + var e; + for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature( + r.CENTRAL_FILE_HEADER);)(e = new s({ + zip64: this.zip64 + }, this.loadOptions)).readCentralPart(this.reader), this.files + .push(e); + if (this.centralDirRecords !== this.files.length && 0 !== this.centralDirRecords && + 0 === this.files.length) throw new Error( + "Corrupted zip or bug: expected " + this.centralDirRecords + + " records in central dir, got " + this.files.length) + }, + readEndOfCentral: function() { + var e = this.reader.lastIndexOfSignature(r.CENTRAL_DIRECTORY_END); + if (e < 0) throw this.isSignature(0, r.LOCAL_FILE_HEADER) ? new Error( + "Corrupted zip: can't find end of central directory") : new Error( + "Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html" + ); + this.reader.setIndex(e); + var t = e; + if (this.checkSignature(r.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), + this.diskNumber === o.MAX_VALUE_16BITS || this.diskWithCentralDirStart === + o.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === o.MAX_VALUE_16BITS || + this.centralDirRecords === o.MAX_VALUE_16BITS || this.centralDirSize === + o.MAX_VALUE_32BITS || this.centralDirOffset === o.MAX_VALUE_32BITS + ) { + if (this.zip64 = !0, (e = this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < + 0) throw new Error( + "Corrupted zip: can't find the ZIP64 end of central directory locator" + ); + if (this.reader.setIndex(e), this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR), + this.readBlockZip64EndOfCentralLocator(), !this.isSignature( + this.relativeOffsetEndOfZip64CentralDir, r.ZIP64_CENTRAL_DIRECTORY_END + ) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature( + r.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < + 0)) throw new Error( + "Corrupted zip: can't find the ZIP64 end of central directory" + ); + this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), + this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral() + } + var i = this.centralDirOffset + this.centralDirSize; + this.zip64 && (i += 20, i += 12 + this.zip64EndOfCentralSize); + var n = t - i; + if (0 < n) this.isSignature(t, r.CENTRAL_FILE_HEADER) || (this.reader + .zero = n); + else if (n < 0) throw new Error("Corrupted zip: missing " + + Math.abs(n) + " bytes.") + }, + prepareReader: function(e) { + this.reader = n(e) + }, + load: function(e) { + this.prepareReader(e), this.readEndOfCentral(), this.readCentralDir(), + this.readLocalFiles() + } + }, t.exports = l + }, { + "./reader/readerFor": 22, + "./signature": 23, + "./support": 30, + "./utf8": 31, + "./utils": 32, + "./zipEntry": 34 + }], + 34: [function(e, t, i) { + "use strict"; + var n = e("./reader/readerFor"), + o = e("./utils"), + r = e("./compressedObject"), + s = e("./crc32"), + a = e("./utf8"), + l = e("./compressions"), + d = e("./support"); + + function c(e, t) { + this.options = e, this.loadOptions = t + } + c.prototype = { + isEncrypted: function() { + return 1 == (1 & this.bitFlag) + }, + useUTF8: function() { + return 2048 == (2048 & this.bitFlag) + }, + readLocalPart: function(e) { + var t, i; + if (e.skip(22), this.fileNameLength = e.readInt(2), i = e.readInt( + 2), this.fileName = e.readData(this.fileNameLength), e.skip(i), - + 1 === this.compressedSize || -1 === this.uncompressedSize) + throw new Error( + "Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)" + ); + if (null === (t = function(e) { + for (var t in l) + if (l.hasOwnProperty(t) && l[t].magic === e) return l[t]; + return null + }(this.compressionMethod))) throw new Error( + "Corrupted zip : compression " + o.pretty(this.compressionMethod) + + " unknown (inner file : " + o.transformTo("string", this.fileName) + + ")"); + this.decompressed = new r(this.compressedSize, this.uncompressedSize, + this.crc32, t, e.readData(this.compressedSize)) + }, + readCentralPart: function(e) { + this.versionMadeBy = e.readInt(2), e.skip(2), this.bitFlag = e.readInt( + 2), this.compressionMethod = e.readString(2), this.date = e.readDate(), + this.crc32 = e.readInt(4), this.compressedSize = e.readInt(4), + this.uncompressedSize = e.readInt(4); + var t = e.readInt(2); + if (this.extraFieldsLength = e.readInt(2), this.fileCommentLength = + e.readInt(2), this.diskNumberStart = e.readInt(2), this.internalFileAttributes = + e.readInt(2), this.externalFileAttributes = e.readInt(4), this + .localHeaderOffset = e.readInt(4), this.isEncrypted()) throw new Error( + "Encrypted zip are not supported"); + e.skip(t), this.readExtraFields(e), this.parseZIP64ExtraField(e), + this.fileComment = e.readData(this.fileCommentLength) + }, + processAttributes: function() { + this.unixPermissions = null, this.dosPermissions = null; + var e = this.versionMadeBy >> 8; + this.dir = !!(16 & this.externalFileAttributes), 0 == e && ( + this.dosPermissions = 63 & this.externalFileAttributes), 3 == + e && (this.unixPermissions = this.externalFileAttributes >> 16 & + 65535), this.dir || "/" !== this.fileNameStr.slice(-1) || ( + this.dir = !0) + }, + parseZIP64ExtraField: function(e) { + if (this.extraFields[1]) { + var t = n(this.extraFields[1].value); + this.uncompressedSize === o.MAX_VALUE_32BITS && (this.uncompressedSize = + t.readInt(8)), this.compressedSize === o.MAX_VALUE_32BITS && + (this.compressedSize = t.readInt(8)), this.localHeaderOffset === + o.MAX_VALUE_32BITS && (this.localHeaderOffset = t.readInt(8)), + this.diskNumberStart === o.MAX_VALUE_32BITS && (this.diskNumberStart = + t.readInt(4)) + } + }, + readExtraFields: function(e) { + var t, i, n, o = e.index + this.extraFieldsLength; + for (this.extraFields || (this.extraFields = {}); e.index + 4 < + o;) t = e.readInt(2), i = e.readInt(2), n = e.readData(i), + this.extraFields[t] = { + id: t, + length: i, + value: n + }; + e.setIndex(o) + }, + handleUTF8: function() { + var e = d.uint8array ? "uint8array" : "array"; + if (this.useUTF8()) this.fileNameStr = a.utf8decode(this.fileName), + this.fileCommentStr = a.utf8decode(this.fileComment); + else { + var t = this.findExtraFieldUnicodePath(); + if (null !== t) this.fileNameStr = t; + else { + var i = o.transformTo(e, this.fileName); + this.fileNameStr = this.loadOptions.decodeFileName(i) + } + var n = this.findExtraFieldUnicodeComment(); + if (null !== n) this.fileCommentStr = n; + else { + var r = o.transformTo(e, this.fileComment); + this.fileCommentStr = this.loadOptions.decodeFileName(r) + } + } + }, + findExtraFieldUnicodePath: function() { + var e = this.extraFields[28789]; + if (e) { + var t = n(e.value); + return 1 !== t.readInt(1) || s(this.fileName) !== t.readInt(4) ? + null : a.utf8decode(t.readData(e.length - 5)) + } + return null + }, + findExtraFieldUnicodeComment: function() { + var e = this.extraFields[25461]; + if (e) { + var t = n(e.value); + return 1 !== t.readInt(1) || s(this.fileComment) !== t.readInt( + 4) ? null : a.utf8decode(t.readData(e.length - 5)) + } + return null + } + }, t.exports = c + }, { + "./compressedObject": 2, + "./compressions": 3, + "./crc32": 4, + "./reader/readerFor": 22, + "./support": 30, + "./utf8": 31, + "./utils": 32 + }], + 35: [function(e, t, i) { + "use strict"; + + function n(e, t, i) { + this.name = e, this.dir = i.dir, this.date = i.date, this.comment = + i.comment, this.unixPermissions = i.unixPermissions, this.dosPermissions = + i.dosPermissions, this._data = t, this._dataBinary = i.binary, + this.options = { + compression: i.compression, + compressionOptions: i.compressionOptions + } + } + var o = e("./stream/StreamHelper"), + r = e("./stream/DataWorker"), + s = e("./utf8"), + a = e("./compressedObject"), + l = e("./stream/GenericWorker"); + n.prototype = { + internalStream: function(e) { + var t = null, + i = "string"; + try { + if (!e) throw new Error("No output type specified."); + var n = "string" === (i = e.toLowerCase()) || "text" === i; + "binarystring" !== i && "text" !== i || (i = "string"), t = + this._decompressWorker(); + var r = !this._dataBinary; + r && !n && (t = t.pipe(new s.Utf8EncodeWorker)), !r && n && (t = + t.pipe(new s.Utf8DecodeWorker)) + } catch (e) { + (t = new l("error")).error(e) + } + return new o(t, i, "") + }, + async: function(e, t) { + return this.internalStream(e).accumulate(t) + }, + nodeStream: function(e, t) { + return this.internalStream(e || "nodebuffer").toNodejsStream(t) + }, + _compressWorker: function(e, t) { + if (this._data instanceof a && this._data.compression.magic === + e.magic) return this._data.getCompressedWorker(); + var i = this._decompressWorker(); + return this._dataBinary || (i = i.pipe(new s.Utf8EncodeWorker)), + a.createWorkerFrom(i, e, t) + }, + _decompressWorker: function() { + return this._data instanceof a ? this._data.getContentWorker() : + this._data instanceof l ? this._data : new r(this._data) + } + }; + for (var d = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", + "asArrayBuffer" + ], c = function() { + throw new Error( + "This method has been removed in JSZip 3.0, please check the upgrade guide." + ) + }, h = 0; h < d.length; h++) n.prototype[d[h]] = c; + t.exports = n + }, { + "./compressedObject": 2, + "./stream/DataWorker": 27, + "./stream/GenericWorker": 28, + "./stream/StreamHelper": 29, + "./utf8": 31 + }], + 36: [function(e, t, n) { + (function(e) { + "use strict"; + var i, n, o = e.MutationObserver || e.WebKitMutationObserver; + if (o) { + var r = 0, + s = new o(c), + a = e.document.createTextNode(""); + s.observe(a, { + characterData: !0 + }), i = function() { + a.data = r = ++r % 2 + } + } else if (e.setImmediate || void 0 === e.MessageChannel) i = + "document" in e && "onreadystatechange" in e.document.createElement( + "script") ? function() { + var t = e.document.createElement("script"); + t.onreadystatechange = function() { + c(), t.onreadystatechange = null, t.parentNode.removeChild(t), + t = null + }, e.document.documentElement.appendChild(t) + } : function() { + setTimeout(c, 0) + }; + else { + var l = new e.MessageChannel; + l.port1.onmessage = c, i = function() { + l.port2.postMessage(0) + } + } + var d = []; + + function c() { + var e, t; + n = !0; + for (var i = d.length; i;) { + for (t = d, d = [], e = -1; ++e < i;) t[e](); + i = d.length + } + n = !1 + } + t.exports = function(e) { + 1 !== d.push(e) || n || i() + } + }).call(this, void 0 !== i.g ? i.g : "undefined" != typeof self ? + self : "undefined" != typeof window ? window : {}) + }, {}], + 37: [function(e, t, i) { + "use strict"; + var n = e("immediate"); + + function o() {} + var r = {}, + s = ["REJECTED"], + a = ["FULFILLED"], + l = ["PENDING"]; + + function d(e) { + if ("function" != typeof e) throw new TypeError( + "resolver must be a function"); + this.state = l, this.queue = [], this.outcome = void 0, e !== o && + g(this, e) + } + + function c(e, t, i) { + this.promise = e, "function" == typeof t && (this.onFulfilled = t, + this.callFulfilled = this.otherCallFulfilled), "function" == + typeof i && (this.onRejected = i, this.callRejected = this.otherCallRejected) + } + + function h(e, t, i) { + n((function() { + var n; + try { + n = t(i) + } catch (n) { + return r.reject(e, n) + } + n === e ? r.reject(e, new TypeError( + "Cannot resolve promise with itself")) : r.resolve(e, n) + })) + } + + function u(e) { + var t = e && e.then; + if (e && ("object" == typeof e || "function" == typeof e) && + "function" == typeof t) return function() { + t.apply(e, arguments) + } + } + + function g(e, t) { + var i = !1; + + function n(t) { + i || (i = !0, r.reject(e, t)) + } + + function o(t) { + i || (i = !0, r.resolve(e, t)) + } + var s = p((function() { + t(o, n) + })); + "error" === s.status && n(s.value) + } + + function p(e, t) { + var i = {}; + try { + i.value = e(t), i.status = "success" + } catch (e) { + i.status = "error", i.value = e + } + return i + }(t.exports = d).prototype.finally = function(e) { + if ("function" != typeof e) return this; + var t = this.constructor; + return this.then((function(i) { + return t.resolve(e()).then((function() { + return i + })) + }), (function(i) { + return t.resolve(e()).then((function() { + throw i + })) + })) + }, d.prototype.catch = function(e) { + return this.then(null, e) + }, d.prototype.then = function(e, t) { + if ("function" != typeof e && this.state === a || "function" != + typeof t && this.state === s) return this; + var i = new this.constructor(o); + return this.state !== l ? h(i, this.state === a ? e : t, this.outcome) : + this.queue.push(new c(i, e, t)), i + }, c.prototype.callFulfilled = function(e) { + r.resolve(this.promise, e) + }, c.prototype.otherCallFulfilled = function(e) { + h(this.promise, this.onFulfilled, e) + }, c.prototype.callRejected = function(e) { + r.reject(this.promise, e) + }, c.prototype.otherCallRejected = function(e) { + h(this.promise, this.onRejected, e) + }, r.resolve = function(e, t) { + var i = p(u, t); + if ("error" === i.status) return r.reject(e, i.value); + var n = i.value; + if (n) g(e, n); + else { + e.state = a, e.outcome = t; + for (var o = -1, s = e.queue.length; ++o < s;) e.queue[o].callFulfilled( + t) + } + return e + }, r.reject = function(e, t) { + e.state = s, e.outcome = t; + for (var i = -1, n = e.queue.length; ++i < n;) e.queue[i].callRejected( + t); + return e + }, d.resolve = function(e) { + return e instanceof this ? e : r.resolve(new this(o), e) + }, d.reject = function(e) { + var t = new this(o); + return r.reject(t, e) + }, d.all = function(e) { + var t = this; + if ("[object Array]" !== Object.prototype.toString.call(e)) return + this.reject(new TypeError("must be an array")); + var i = e.length, + n = !1; + if (!i) return this.resolve([]); + for (var s = new Array(i), a = 0, l = -1, d = new this(o); ++l < + i;) c(e[l], l); + return d; + + function c(e, o) { + t.resolve(e).then((function(e) { + s[o] = e, ++a !== i || n || (n = !0, r.resolve(d, s)) + }), (function(e) { + n || (n = !0, r.reject(d, e)) + })) + } + }, d.race = function(e) { + if ("[object Array]" !== Object.prototype.toString.call(e)) return + this.reject(new TypeError("must be an array")); + var t = e.length, + i = !1; + if (!t) return this.resolve([]); + for (var n, s = -1, a = new this(o); ++s < t;) n = e[s], this.resolve( + n).then((function(e) { + i || (i = !0, r.resolve(a, e)) + }), (function(e) { + i || (i = !0, r.reject(a, e)) + })); + return a + } + }, { + immediate: 36 + }], + 38: [function(e, t, i) { + "use strict"; + var n = {}; + (0, e("./lib/utils/common").assign)(n, e("./lib/deflate"), e( + "./lib/inflate"), e("./lib/zlib/constants")), t.exports = n + }, { + "./lib/deflate": 39, + "./lib/inflate": 40, + "./lib/utils/common": 41, + "./lib/zlib/constants": 44 + }], + 39: [function(e, t, i) { + "use strict"; + var n = e("./zlib/deflate"), + o = e("./utils/common"), + r = e("./utils/strings"), + s = e("./zlib/messages"), + a = e("./zlib/zstream"), + l = Object.prototype.toString; + + function d(e) { + if (!(this instanceof d)) return new d(e); + this.options = o.assign({ + level: -1, + method: 8, + chunkSize: 16384, + windowBits: 15, + memLevel: 8, + strategy: 0, + to: "" + }, e || {}); + var t = this.options; + t.raw && 0 < t.windowBits ? t.windowBits = -t.windowBits : t.gzip && + 0 < t.windowBits && t.windowBits < 16 && (t.windowBits += 16), + this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], + this.strm = new a, this.strm.avail_out = 0; + var i = n.deflateInit2(this.strm, t.level, t.method, t.windowBits, + t.memLevel, t.strategy); + if (0 !== i) throw new Error(s[i]); + if (t.header && n.deflateSetHeader(this.strm, t.header), t.dictionary) { + var c; + if (c = "string" == typeof t.dictionary ? r.string2buf(t.dictionary) : + "[object ArrayBuffer]" === l.call(t.dictionary) ? new Uint8Array( + t.dictionary) : t.dictionary, 0 !== (i = n.deflateSetDictionary( + this.strm, c))) throw new Error(s[i]); + this._dict_set = !0 + } + } + + function c(e, t) { + var i = new d(t); + if (i.push(e, !0), i.err) throw i.msg || s[i.err]; + return i.result + } + d.prototype.push = function(e, t) { + var i, s, a = this.strm, + d = this.options.chunkSize; + if (this.ended) return !1; + s = t === ~~t ? t : !0 === t ? 4 : 0, "string" == typeof e ? a.input = + r.string2buf(e) : "[object ArrayBuffer]" === l.call(e) ? a.input = + new Uint8Array(e) : a.input = e, a.next_in = 0, a.avail_in = a.input + .length; + do { + if (0 === a.avail_out && (a.output = new o.Buf8(d), a.next_out = + 0, a.avail_out = d), 1 !== (i = n.deflate(a, s)) && 0 !== i) + return this.onEnd(i), !(this.ended = !0); + 0 !== a.avail_out && (0 !== a.avail_in || 4 !== s && 2 !== s) || + ("string" === this.options.to ? this.onData(r.buf2binstring(o.shrinkBuf( + a.output, a.next_out))) : this.onData(o.shrinkBuf(a.output, a + .next_out))) + } while ((0 < a.avail_in || 0 === a.avail_out) && 1 !== i); + return 4 === s ? (i = n.deflateEnd(this.strm), this.onEnd(i), + this.ended = !0, 0 === i) : 2 !== s || (this.onEnd(0), !(a.avail_out = + 0)) + }, d.prototype.onData = function(e) { + this.chunks.push(e) + }, d.prototype.onEnd = function(e) { + 0 === e && ("string" === this.options.to ? this.result = this.chunks + .join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], + this.err = e, this.msg = this.strm.msg + }, i.Deflate = d, i.deflate = c, i.deflateRaw = function(e, t) { + return (t = t || {}).raw = !0, c(e, t) + }, i.gzip = function(e, t) { + return (t = t || {}).gzip = !0, c(e, t) + } + }, { + "./utils/common": 41, + "./utils/strings": 42, + "./zlib/deflate": 46, + "./zlib/messages": 51, + "./zlib/zstream": 53 + }], + 40: [function(e, t, i) { + "use strict"; + var n = e("./zlib/inflate"), + o = e("./utils/common"), + r = e("./utils/strings"), + s = e("./zlib/constants"), + a = e("./zlib/messages"), + l = e("./zlib/zstream"), + d = e("./zlib/gzheader"), + c = Object.prototype.toString; + + function h(e) { + if (!(this instanceof h)) return new h(e); + this.options = o.assign({ + chunkSize: 16384, + windowBits: 0, + to: "" + }, e || {}); + var t = this.options; + t.raw && 0 <= t.windowBits && t.windowBits < 16 && (t.windowBits = - + t.windowBits, 0 === t.windowBits && (t.windowBits = -15)), !(0 <= + t.windowBits && t.windowBits < 16) || e && e.windowBits || (t.windowBits += + 32), 15 < t.windowBits && t.windowBits < 48 && 0 == (15 & t.windowBits) && + (t.windowBits |= 15), this.err = 0, this.msg = "", this.ended = ! + 1, this.chunks = [], this.strm = new l, this.strm.avail_out = 0; + var i = n.inflateInit2(this.strm, t.windowBits); + if (i !== s.Z_OK) throw new Error(a[i]); + this.header = new d, n.inflateGetHeader(this.strm, this.header) + } + + function u(e, t) { + var i = new h(t); + if (i.push(e, !0), i.err) throw i.msg || a[i.err]; + return i.result + } + h.prototype.push = function(e, t) { + var i, a, l, d, h, u, g = this.strm, + p = this.options.chunkSize, + m = this.options.dictionary, + f = !1; + if (this.ended) return !1; + a = t === ~~t ? t : !0 === t ? s.Z_FINISH : s.Z_NO_FLUSH, + "string" == typeof e ? g.input = r.binstring2buf(e) : + "[object ArrayBuffer]" === c.call(e) ? g.input = new Uint8Array( + e) : g.input = e, g.next_in = 0, g.avail_in = g.input.length; + do { + if (0 === g.avail_out && (g.output = new o.Buf8(p), g.next_out = + 0, g.avail_out = p), (i = n.inflate(g, s.Z_NO_FLUSH)) === s.Z_NEED_DICT && + m && (u = "string" == typeof m ? r.string2buf(m) : + "[object ArrayBuffer]" === c.call(m) ? new Uint8Array(m) : m, + i = n.inflateSetDictionary(this.strm, u)), i === s.Z_BUF_ERROR && + !0 === f && (i = s.Z_OK, f = !1), i !== s.Z_STREAM_END && i !== + s.Z_OK) return this.onEnd(i), !(this.ended = !0); + g.next_out && (0 !== g.avail_out && i !== s.Z_STREAM_END && (0 !== + g.avail_in || a !== s.Z_FINISH && a !== s.Z_SYNC_FLUSH) || ( + "string" === this.options.to ? (l = r.utf8border(g.output, g.next_out), + d = g.next_out - l, h = r.buf2string(g.output, l), g.next_out = + d, g.avail_out = p - d, d && o.arraySet(g.output, g.output, + l, d, 0), this.onData(h)) : this.onData(o.shrinkBuf(g.output, + g.next_out)))), 0 === g.avail_in && 0 === g.avail_out && (f = ! + 0) + } while ((0 < g.avail_in || 0 === g.avail_out) && i !== s.Z_STREAM_END); + return i === s.Z_STREAM_END && (a = s.Z_FINISH), a === s.Z_FINISH ? + (i = n.inflateEnd(this.strm), this.onEnd(i), this.ended = !0, i === + s.Z_OK) : a !== s.Z_SYNC_FLUSH || (this.onEnd(s.Z_OK), !(g.avail_out = + 0)) + }, h.prototype.onData = function(e) { + this.chunks.push(e) + }, h.prototype.onEnd = function(e) { + e === s.Z_OK && ("string" === this.options.to ? this.result = + this.chunks.join("") : this.result = o.flattenChunks(this.chunks) + ), this.chunks = [], this.err = e, this.msg = this.strm.msg + }, i.Inflate = h, i.inflate = u, i.inflateRaw = function(e, t) { + return (t = t || {}).raw = !0, u(e, t) + }, i.ungzip = u + }, { + "./utils/common": 41, + "./utils/strings": 42, + "./zlib/constants": 44, + "./zlib/gzheader": 47, + "./zlib/inflate": 49, + "./zlib/messages": 51, + "./zlib/zstream": 53 + }], + 41: [function(e, t, i) { + "use strict"; + var n = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && + "undefined" != typeof Int32Array; + i.assign = function(e) { + for (var t = Array.prototype.slice.call(arguments, 1); t.length;) { + var i = t.shift(); + if (i) { + if ("object" != typeof i) throw new TypeError(i + + "must be non-object"); + for (var n in i) i.hasOwnProperty(n) && (e[n] = i[n]) + } + } + return e + }, i.shrinkBuf = function(e, t) { + return e.length === t ? e : e.subarray ? e.subarray(0, t) : (e.length = + t, e) + }; + var o = { + arraySet: function(e, t, i, n, o) { + if (t.subarray && e.subarray) e.set(t.subarray(i, i + n), o); + else + for (var r = 0; r < n; r++) e[o + r] = t[i + r] + }, + flattenChunks: function(e) { + var t, i, n, o, r, s; + for (t = n = 0, i = e.length; t < i; t++) n += e[t].length; + for (s = new Uint8Array(n), t = o = 0, i = e.length; t < i; t++) + r = e[t], s.set(r, o), o += r.length; + return s + } + }, + r = { + arraySet: function(e, t, i, n, o) { + for (var r = 0; r < n; r++) e[o + r] = t[i + r] + }, + flattenChunks: function(e) { + return [].concat.apply([], e) + } + }; + i.setTyped = function(e) { + e ? (i.Buf8 = Uint8Array, i.Buf16 = Uint16Array, i.Buf32 = + Int32Array, i.assign(i, o)) : (i.Buf8 = Array, i.Buf16 = Array, + i.Buf32 = Array, i.assign(i, r)) + }, i.setTyped(n) + }, {}], + 42: [function(e, t, i) { + "use strict"; + var n = e("./common"), + o = !0, + r = !0; + try { + String.fromCharCode.apply(null, [0]) + } catch (e) { + o = !1 + } + try { + String.fromCharCode.apply(null, new Uint8Array(1)) + } catch (e) { + r = !1 + } + for (var s = new n.Buf8(256), a = 0; a < 256; a++) s[a] = 252 <= a ? + 6 : 248 <= a ? 5 : 240 <= a ? 4 : 224 <= a ? 3 : 192 <= a ? 2 : 1; + + function l(e, t) { + if (t < 65537 && (e.subarray && r || !e.subarray && o)) return + String.fromCharCode.apply(null, n.shrinkBuf(e, t)); + for (var i = "", s = 0; s < t; s++) i += String.fromCharCode(e[s]); + return i + } + s[254] = s[254] = 1, i.string2buf = function(e) { + var t, i, o, r, s, a = e.length, + l = 0; + for (r = 0; r < a; r++) 55296 == (64512 & (i = e.charCodeAt(r))) && + r + 1 < a && 56320 == (64512 & (o = e.charCodeAt(r + 1))) && (i = + 65536 + (i - 55296 << 10) + (o - 56320), r++), l += i < 128 ? 1 : + i < 2048 ? 2 : i < 65536 ? 3 : 4; + for (t = new n.Buf8(l), r = s = 0; s < l; r++) 55296 == (64512 & + (i = e.charCodeAt(r))) && r + 1 < a && 56320 == (64512 & (o = e + .charCodeAt(r + 1))) && (i = 65536 + (i - 55296 << 10) + (o - + 56320), r++), i < 128 ? t[s++] = i : (i < 2048 ? t[s++] = 192 | + i >>> 6 : (i < 65536 ? t[s++] = 224 | i >>> 12 : (t[s++] = 240 | + i >>> 18, t[s++] = 128 | i >>> 12 & 63), t[s++] = 128 | i >>> + 6 & 63), t[s++] = 128 | 63 & i); + return t + }, i.buf2binstring = function(e) { + return l(e, e.length) + }, i.binstring2buf = function(e) { + for (var t = new n.Buf8(e.length), i = 0, o = t.length; i < o; i++) + t[i] = e.charCodeAt(i); + return t + }, i.buf2string = function(e, t) { + var i, n, o, r, a = t || e.length, + d = new Array(2 * a); + for (i = n = 0; i < a;) + if ((o = e[i++]) < 128) d[n++] = o; + else if (4 < (r = s[o])) d[n++] = 65533, i += r - 1; + else { + for (o &= 2 === r ? 31 : 3 === r ? 15 : 7; 1 < r && i < a;) o = + o << 6 | 63 & e[i++], r--; + 1 < r ? d[n++] = 65533 : o < 65536 ? d[n++] = o : (o -= 65536, d[ + n++] = 55296 | o >> 10 & 1023, d[n++] = 56320 | 1023 & o) + } + return l(d, n) + }, i.utf8border = function(e, t) { + var i; + for ((t = t || e.length) > e.length && (t = e.length), i = t - 1; 0 <= + i && 128 == (192 & e[i]);) i--; + return i < 0 || 0 === i ? t : i + s[e[i]] > t ? i : t + } + }, { + "./common": 41 + }], + 43: [function(e, t, i) { + "use strict"; + t.exports = function(e, t, i, n) { + for (var o = 65535 & e | 0, r = e >>> 16 & 65535 | 0, s = 0; 0 !== + i;) { + for (i -= s = 2e3 < i ? 2e3 : i; r = r + (o = o + t[n++] | 0) | + 0, --s;); + o %= 65521, r %= 65521 + } + return o | r << 16 | 0 + } + }, {}], + 44: [function(e, t, i) { + "use strict"; + t.exports = { + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + Z_BUF_ERROR: -5, + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + Z_BINARY: 0, + Z_TEXT: 1, + Z_UNKNOWN: 2, + Z_DEFLATED: 8 + } + }, {}], + 45: [function(e, t, i) { + "use strict"; + var n = function() { + for (var e, t = [], i = 0; i < 256; i++) { + e = i; + for (var n = 0; n < 8; n++) e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> + 1; + t[i] = e + } + return t + }(); + t.exports = function(e, t, i, o) { + var r = n, + s = o + i; + e ^= -1; + for (var a = o; a < s; a++) e = e >>> 8 ^ r[255 & (e ^ t[a])]; + return -1 ^ e + } + }, {}], + 46: [function(e, t, i) { + "use strict"; + var n, o = e("../utils/common"), + r = e("./trees"), + s = e("./adler32"), + a = e("./crc32"), + l = e("./messages"), + d = -2, + c = 258, + h = 262, + u = 113; + + function g(e, t) { + return e.msg = l[t], t + } + + function p(e) { + return (e << 1) - (4 < e ? 9 : 0) + } + + function m(e) { + for (var t = e.length; 0 <= --t;) e[t] = 0 + } + + function f(e) { + var t = e.state, + i = t.pending; + i > e.avail_out && (i = e.avail_out), 0 !== i && (o.arraySet(e.output, + t.pending_buf, t.pending_out, i, e.next_out), e.next_out += i, + t.pending_out += i, e.total_out += i, e.avail_out -= i, t.pending -= + i, 0 === t.pending && (t.pending_out = 0)) + } + + function _(e, t) { + r._tr_flush_block(e, 0 <= e.block_start ? e.block_start : -1, e.strstart - + e.block_start, t), e.block_start = e.strstart, f(e.strm) + } + + function b(e, t) { + e.pending_buf[e.pending++] = t + } + + function v(e, t) { + e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = + 255 & t + } + + function w(e, t) { + var i, n, o = e.max_chain_length, + r = e.strstart, + s = e.prev_length, + a = e.nice_match, + l = e.strstart > e.w_size - h ? e.strstart - (e.w_size - h) : 0, + d = e.window, + u = e.w_mask, + g = e.prev, + p = e.strstart + c, + m = d[r + s - 1], + f = d[r + s]; + e.prev_length >= e.good_match && (o >>= 2), a > e.lookahead && (a = + e.lookahead); + do { + if (d[(i = t) + s] === f && d[i + s - 1] === m && d[i] === d[r] && + d[++i] === d[r + 1]) { + r += 2, i++; + do {} while (d[++r] === d[++i] && d[++r] === d[++i] && d[++r] === + d[++i] && d[++r] === d[++i] && d[++r] === d[++i] && d[++r] === + d[++i] && d[++r] === d[++i] && d[++r] === d[++i] && r < p); + if (n = c - (p - r), r = p - c, s < n) { + if (e.match_start = t, a <= (s = n)) break; + m = d[r + s - 1], f = d[r + s] + } + } + } while ((t = g[t & u]) > l && 0 != --o); + return s <= e.lookahead ? s : e.lookahead + } + + function C(e) { + var t, i, n, r, l, d, c, u, g, p, m = e.w_size; + do { + if (r = e.window_size - e.lookahead - e.strstart, e.strstart >= m + + (m - h)) { + for (o.arraySet(e.window, e.window, m, m, 0), e.match_start -= m, + e.strstart -= m, e.block_start -= m, t = i = e.hash_size; n = e + .head[--t], e.head[t] = m <= n ? n - m : 0, --i;); + for (t = i = m; n = e.prev[--t], e.prev[t] = m <= n ? n - m : 0, -- + i;); + r += m + } + if (0 === e.strm.avail_in) break; + if (d = e.strm, c = e.window, u = e.strstart + e.lookahead, p = + void 0, (g = r) < (p = d.avail_in) && (p = g), i = 0 === p ? 0 : + (d.avail_in -= p, o.arraySet(c, d.input, d.next_in, p, u), 1 === + d.state.wrap ? d.adler = s(d.adler, c, p, u) : 2 === d.state.wrap && + (d.adler = a(d.adler, c, p, u)), d.next_in += p, d.total_in += + p, p), e.lookahead += i, e.lookahead + e.insert >= 3) + for (l = e.strstart - e.insert, e.ins_h = e.window[l], e.ins_h = + (e.ins_h << e.hash_shift ^ e.window[l + 1]) & e.hash_mask; e.insert && + (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[l + 3 - 1]) & e.hash_mask, + e.prev[l & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = l, l++, + e.insert--, !(e.lookahead + e.insert < 3));); + } while (e.lookahead < h && 0 !== e.strm.avail_in) + } + + function y(e, t) { + for (var i, n;;) { + if (e.lookahead < h) { + if (C(e), e.lookahead < h && 0 === t) return 1; + if (0 === e.lookahead) break + } + if (i = 0, e.lookahead >= 3 && (e.ins_h = (e.ins_h << e.hash_shift ^ + e.window[e.strstart + 3 - 1]) & e.hash_mask, i = e.prev[e.strstart & + e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), 0 !== + i && e.strstart - i <= e.w_size - h && (e.match_length = w(e, i)), + e.match_length >= 3) + if (n = r._tr_tally(e, e.strstart - e.match_start, e.match_length - + 3), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && + e.lookahead >= 3) { + for (e.match_length--; e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ + e.window[e.strstart + 3 - 1]) & e.hash_mask, i = e.prev[e.strstart & + e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart, 0 != + --e.match_length;); + e.strstart++ + } else e.strstart += e.match_length, e.match_length = 0, e.ins_h = + e.window[e.strstart], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[ + e.strstart + 1]) & e.hash_mask; + else n = r._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, + e.strstart++; + if (n && (_(e, !1), 0 === e.strm.avail_out)) return 1 + } + return e.insert = e.strstart < 2 ? e.strstart : 2, 4 === t ? (_(e, ! + 0), 0 === e.strm.avail_out ? 3 : 4) : e.last_lit && (_(e, !1), 0 === + e.strm.avail_out) ? 1 : 2 + } + + function S(e, t) { + for (var i, n, o;;) { + if (e.lookahead < h) { + if (C(e), e.lookahead < h && 0 === t) return 1; + if (0 === e.lookahead) break + } + if (i = 0, e.lookahead >= 3 && (e.ins_h = (e.ins_h << e.hash_shift ^ + e.window[e.strstart + 3 - 1]) & e.hash_mask, i = e.prev[e.strstart & + e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = + e.match_length, e.prev_match = e.match_start, e.match_length = 2, + 0 !== i && e.prev_length < e.max_lazy_match && e.strstart - i <= + e.w_size - h && (e.match_length = w(e, i), e.match_length <= 5 && + (1 === e.strategy || 3 === e.match_length && 4096 < e.strstart - + e.match_start) && (e.match_length = 2)), e.prev_length >= 3 && + e.match_length <= e.prev_length) { + for (o = e.strstart + e.lookahead - 3, n = r._tr_tally(e, e.strstart - + 1 - e.prev_match, e.prev_length - 3), e.lookahead -= e.prev_length - + 1, e.prev_length -= 2; ++e.strstart <= o && (e.ins_h = (e.ins_h << + e.hash_shift ^ e.window[e.strstart + 3 - 1]) & e.hash_mask, i = + e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = + e.strstart), 0 != --e.prev_length;); + if (e.match_available = 0, e.match_length = 2, e.strstart++, n && + (_(e, !1), 0 === e.strm.avail_out)) return 1 + } else if (e.match_available) { + if ((n = r._tr_tally(e, 0, e.window[e.strstart - 1])) && _(e, !1), + e.strstart++, e.lookahead--, 0 === e.strm.avail_out) return 1 + } else e.match_available = 1, e.strstart++, e.lookahead-- + } + return e.match_available && (n = r._tr_tally(e, 0, e.window[e.strstart - + 1]), e.match_available = 0), e.insert = e.strstart < 2 ? e.strstart : + 2, 4 === t ? (_(e, !0), 0 === e.strm.avail_out ? 3 : 4) : e.last_lit && + (_(e, !1), 0 === e.strm.avail_out) ? 1 : 2 + } + + function x(e, t, i, n, o) { + this.good_length = e, this.max_lazy = t, this.nice_length = i, + this.max_chain = n, this.func = o + } + + function k() { + this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = + 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = + null, this.gzindex = 0, this.method = 8, this.last_flush = -1, + this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = + null, this.window_size = 0, this.prev = null, this.head = null, + this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = + 0, this.hash_shift = 0, this.block_start = 0, this.match_length = + 0, this.prev_match = 0, this.match_available = 0, this.strstart = + 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, + this.max_chain_length = 0, this.max_lazy_match = 0, this.level = + 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, + this.dyn_ltree = new o.Buf16(1146), this.dyn_dtree = new o.Buf16( + 122), this.bl_tree = new o.Buf16(78), m(this.dyn_ltree), m(this.dyn_dtree), + m(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = + null, this.bl_count = new o.Buf16(16), this.heap = new o.Buf16( + 573), m(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = + new o.Buf16(573), m(this.depth), this.l_buf = 0, this.lit_bufsize = + 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = + 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = + 0 + } + + function L(e) { + var t; + return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = + 2, (t = e.state).pending = 0, t.pending_out = 0, t.wrap < 0 && ( + t.wrap = -t.wrap), t.status = t.wrap ? 42 : u, e.adler = 2 === + t.wrap ? 0 : 1, t.last_flush = 0, r._tr_init(t), 0) : g(e, d) + } + + function N(e) { + var t = L(e); + return 0 === t && function(e) { + e.window_size = 2 * e.w_size, m(e.head), e.max_lazy_match = n[e.level] + .max_lazy, e.good_match = n[e.level].good_length, e.nice_match = + n[e.level].nice_length, e.max_chain_length = n[e.level].max_chain, + e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = + 0, e.match_length = e.prev_length = 2, e.match_available = 0, e + .ins_h = 0 + }(e.state), t + } + + function D(e, t, i, n, r, s) { + if (!e) return d; + var a = 1; + if (-1 === t && (t = 6), n < 0 ? (a = 0, n = -n) : 15 < n && (a = + 2, n -= 16), r < 1 || 9 < r || 8 !== i || n < 8 || 15 < n || t < + 0 || 9 < t || s < 0 || 4 < s) return g(e, d); + 8 === n && (n = 9); + var l = new k; + return (e.state = l).strm = e, l.wrap = a, l.gzhead = null, l.w_bits = + n, l.w_size = 1 << l.w_bits, l.w_mask = l.w_size - 1, l.hash_bits = + r + 7, l.hash_size = 1 << l.hash_bits, l.hash_mask = l.hash_size - + 1, l.hash_shift = ~~((l.hash_bits + 3 - 1) / 3), l.window = new o + .Buf8(2 * l.w_size), l.head = new o.Buf16(l.hash_size), l.prev = + new o.Buf16(l.w_size), l.lit_bufsize = 1 << r + 6, l.pending_buf_size = + 4 * l.lit_bufsize, l.pending_buf = new o.Buf8(l.pending_buf_size), + l.d_buf = 1 * l.lit_bufsize, l.l_buf = 3 * l.lit_bufsize, l.level = + t, l.strategy = s, l.method = i, N(e) + } + n = [new x(0, 0, 0, 0, (function(e, t) { + var i = 65535; + for (i > e.pending_buf_size - 5 && (i = e.pending_buf_size - 5);;) { + if (e.lookahead <= 1) { + if (C(e), 0 === e.lookahead && 0 === t) return 1; + if (0 === e.lookahead) break + } + e.strstart += e.lookahead, e.lookahead = 0; + var n = e.block_start + i; + if ((0 === e.strstart || e.strstart >= n) && (e.lookahead = e + .strstart - n, e.strstart = n, _(e, !1), 0 === e.strm.avail_out + )) return 1; + if (e.strstart - e.block_start >= e.w_size - h && (_(e, !1), + 0 === e.strm.avail_out)) return 1 + } + return e.insert = 0, 4 === t ? (_(e, !0), 0 === e.strm.avail_out ? + 3 : 4) : (e.strstart > e.block_start && (_(e, !1), e.strm.avail_out), + 1) + })), new x(4, 4, 8, 4, y), new x(4, 5, 16, 8, y), new x(4, 6, 32, + 32, y), new x(4, 4, 16, 16, S), new x(8, 16, 32, 32, S), new x(8, + 16, 128, 128, S), new x(8, 32, 128, 256, S), new x(32, 128, 258, + 1024, S), new x(32, 258, 258, 4096, S)], i.deflateInit = function( + e, t) { + return D(e, t, 8, 15, 8, 0) + }, i.deflateInit2 = D, i.deflateReset = N, i.deflateResetKeep = L, + i.deflateSetHeader = function(e, t) { + return e && e.state ? 2 !== e.state.wrap ? d : (e.state.gzhead = + t, 0) : d + }, i.deflate = function(e, t) { + var i, o, s, l; + if (!e || !e.state || 5 < t || t < 0) return e ? g(e, d) : d; + if (o = e.state, !e.output || !e.input && 0 !== e.avail_in || 666 === + o.status && 4 !== t) return g(e, 0 === e.avail_out ? -5 : d); + if (o.strm = e, i = o.last_flush, o.last_flush = t, 42 === o.status) + if (2 === o.wrap) e.adler = 0, b(o, 31), b(o, 139), b(o, 8), o.gzhead ? + (b(o, (o.gzhead.text ? 1 : 0) + (o.gzhead.hcrc ? 2 : 0) + (o.gzhead + .extra ? 4 : 0) + (o.gzhead.name ? 8 : 0) + (o.gzhead.comment ? + 16 : 0)), b(o, 255 & o.gzhead.time), b(o, o.gzhead.time >> 8 & + 255), b(o, o.gzhead.time >> 16 & 255), b(o, o.gzhead.time >> + 24 & 255), b(o, 9 === o.level ? 2 : 2 <= o.strategy || o.level < + 2 ? 4 : 0), b(o, 255 & o.gzhead.os), o.gzhead.extra && o.gzhead + .extra.length && (b(o, 255 & o.gzhead.extra.length), b(o, o.gzhead + .extra.length >> 8 & 255)), o.gzhead.hcrc && (e.adler = a(e.adler, + o.pending_buf, o.pending, 0)), o.gzindex = 0, o.status = 69) : + (b(o, 0), b(o, 0), b(o, 0), b(o, 0), b(o, 0), b(o, 9 === o.level ? + 2 : 2 <= o.strategy || o.level < 2 ? 4 : 0), b(o, 3), o.status = + u); + else { + var h = 8 + (o.w_bits - 8 << 4) << 8; + h |= (2 <= o.strategy || o.level < 2 ? 0 : o.level < 6 ? 1 : 6 === + o.level ? 2 : 3) << 6, 0 !== o.strstart && (h |= 32), h += 31 - + h % 31, o.status = u, v(o, h), 0 !== o.strstart && (v(o, e.adler >>> + 16), v(o, 65535 & e.adler)), e.adler = 1 + } + if (69 === o.status) + if (o.gzhead.extra) { + for (s = o.pending; o.gzindex < (65535 & o.gzhead.extra.length) && + (o.pending !== o.pending_buf_size || (o.gzhead.hcrc && o.pending > + s && (e.adler = a(e.adler, o.pending_buf, o.pending - s, s)), + f(e), s = o.pending, o.pending !== o.pending_buf_size));) b(o, + 255 & o.gzhead.extra[o.gzindex]), o.gzindex++; + o.gzhead.hcrc && o.pending > s && (e.adler = a(e.adler, o.pending_buf, + o.pending - s, s)), o.gzindex === o.gzhead.extra.length && (o + .gzindex = 0, o.status = 73) + } else o.status = 73; + if (73 === o.status) + if (o.gzhead.name) { + s = o.pending; + do { + if (o.pending === o.pending_buf_size && (o.gzhead.hcrc && o.pending > + s && (e.adler = a(e.adler, o.pending_buf, o.pending - s, s)), + f(e), s = o.pending, o.pending === o.pending_buf_size)) { + l = 1; + break + } + l = o.gzindex < o.gzhead.name.length ? 255 & o.gzhead.name.charCodeAt( + o.gzindex++) : 0, b(o, l) + } while (0 !== l); + o.gzhead.hcrc && o.pending > s && (e.adler = a(e.adler, o.pending_buf, + o.pending - s, s)), 0 === l && (o.gzindex = 0, o.status = 91) + } else o.status = 91; + if (91 === o.status) + if (o.gzhead.comment) { + s = o.pending; + do { + if (o.pending === o.pending_buf_size && (o.gzhead.hcrc && o.pending > + s && (e.adler = a(e.adler, o.pending_buf, o.pending - s, s)), + f(e), s = o.pending, o.pending === o.pending_buf_size)) { + l = 1; + break + } + l = o.gzindex < o.gzhead.comment.length ? 255 & o.gzhead.comment + .charCodeAt(o.gzindex++) : 0, b(o, l) + } while (0 !== l); + o.gzhead.hcrc && o.pending > s && (e.adler = a(e.adler, o.pending_buf, + o.pending - s, s)), 0 === l && (o.status = 103) + } else o.status = 103; + if (103 === o.status && (o.gzhead.hcrc ? (o.pending + 2 > o.pending_buf_size && + f(e), o.pending + 2 <= o.pending_buf_size && (b(o, 255 & e.adler), + b(o, e.adler >> 8 & 255), e.adler = 0, o.status = u)) : o.status = + u), 0 !== o.pending) { + if (f(e), 0 === e.avail_out) return o.last_flush = -1, 0 + } else if (0 === e.avail_in && p(t) <= p(i) && 4 !== t) return g( + e, -5); + if (666 === o.status && 0 !== e.avail_in) return g(e, -5); + if (0 !== e.avail_in || 0 !== o.lookahead || 0 !== t && 666 !== o + .status) { + var w = 2 === o.strategy ? function(e, t) { + for (var i;;) { + if (0 === e.lookahead && (C(e), 0 === e.lookahead)) { + if (0 === t) return 1; + break + } + if (e.match_length = 0, i = r._tr_tally(e, 0, e.window[e.strstart]), + e.lookahead--, e.strstart++, i && (_(e, !1), 0 === e.strm.avail_out) + ) return 1 + } + return e.insert = 0, 4 === t ? (_(e, !0), 0 === e.strm.avail_out ? + 3 : 4) : e.last_lit && (_(e, !1), 0 === e.strm.avail_out) ? + 1 : 2 + }(o, t) : 3 === o.strategy ? function(e, t) { + for (var i, n, o, s, a = e.window;;) { + if (e.lookahead <= c) { + if (C(e), e.lookahead <= c && 0 === t) return 1; + if (0 === e.lookahead) break + } + if (e.match_length = 0, e.lookahead >= 3 && 0 < e.strstart && + (n = a[o = e.strstart - 1]) === a[++o] && n === a[++o] && n === + a[++o]) { + s = e.strstart + c; + do {} while (n === a[++o] && n === a[++o] && n === a[++o] && + n === a[++o] && n === a[++o] && n === a[++o] && n === a[++o] && + n === a[++o] && o < s); + e.match_length = c - (s - o), e.match_length > e.lookahead && + (e.match_length = e.lookahead) + } + if (e.match_length >= 3 ? (i = r._tr_tally(e, 1, e.match_length - + 3), e.lookahead -= e.match_length, e.strstart += e.match_length, + e.match_length = 0) : (i = r._tr_tally(e, 0, e.window[e.strstart]), + e.lookahead--, e.strstart++), i && (_(e, !1), 0 === e.strm.avail_out)) + return 1 + } + return e.insert = 0, 4 === t ? (_(e, !0), 0 === e.strm.avail_out ? + 3 : 4) : e.last_lit && (_(e, !1), 0 === e.strm.avail_out) ? + 1 : 2 + }(o, t) : n[o.level].func(o, t); + if (3 !== w && 4 !== w || (o.status = 666), 1 === w || 3 === w) + return 0 === e.avail_out && (o.last_flush = -1), 0; + if (2 === w && (1 === t ? r._tr_align(o) : 5 !== t && (r._tr_stored_block( + o, 0, 0, !1), 3 === t && (m(o.head), 0 === o.lookahead && (o + .strstart = 0, o.block_start = 0, o.insert = 0))), f(e), 0 === + e.avail_out)) return o.last_flush = -1, 0 + } + return 4 !== t ? 0 : o.wrap <= 0 ? 1 : (2 === o.wrap ? (b(o, 255 & + e.adler), b(o, e.adler >> 8 & 255), b(o, e.adler >> 16 & 255), + b(o, e.adler >> 24 & 255), b(o, 255 & e.total_in), b(o, e.total_in >> + 8 & 255), b(o, e.total_in >> 16 & 255), b(o, e.total_in >> 24 & + 255)) : (v(o, e.adler >>> 16), v(o, 65535 & e.adler)), f(e), + 0 < o.wrap && (o.wrap = -o.wrap), 0 !== o.pending ? 0 : 1) + }, i.deflateEnd = function(e) { + var t; + return e && e.state ? 42 !== (t = e.state.status) && 69 !== t && + 73 !== t && 91 !== t && 103 !== t && t !== u && 666 !== t ? g(e, + d) : (e.state = null, t === u ? g(e, -3) : 0) : d + }, i.deflateSetDictionary = function(e, t) { + var i, n, r, a, l, c, h, u, g = t.length; + if (!e || !e.state) return d; + if (2 === (a = (i = e.state).wrap) || 1 === a && 42 !== i.status || + i.lookahead) return d; + for (1 === a && (e.adler = s(e.adler, t, g, 0)), i.wrap = 0, g >= + i.w_size && (0 === a && (m(i.head), i.strstart = 0, i.block_start = + 0, i.insert = 0), u = new o.Buf8(i.w_size), o.arraySet(u, t, g - + i.w_size, i.w_size, 0), t = u, g = i.w_size), l = e.avail_in, c = + e.next_in, h = e.input, e.avail_in = g, e.next_in = 0, e.input = + t, C(i); i.lookahead >= 3;) { + for (n = i.strstart, r = i.lookahead - 2; i.ins_h = (i.ins_h << + i.hash_shift ^ i.window[n + 3 - 1]) & i.hash_mask, i.prev[n & + i.w_mask] = i.head[i.ins_h], i.head[i.ins_h] = n, n++, --r;); + i.strstart = n, i.lookahead = 2, C(i) + } + return i.strstart += i.lookahead, i.block_start = i.strstart, i.insert = + i.lookahead, i.lookahead = 0, i.match_length = i.prev_length = 2, + i.match_available = 0, e.next_in = c, e.input = h, e.avail_in = + l, i.wrap = a, 0 + }, i.deflateInfo = "pako deflate (from Nodeca project)" + }, { + "../utils/common": 41, + "./adler32": 43, + "./crc32": 45, + "./messages": 51, + "./trees": 52 + }], + 47: [function(e, t, i) { + "use strict"; + t.exports = function() { + this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = + null, this.extra_len = 0, this.name = "", this.comment = "", + this.hcrc = 0, this.done = !1 + } + }, {}], + 48: [function(e, t, i) { + "use strict"; + t.exports = function(e, t) { + var i, n, o, r, s, a, l, d, c, h, u, g, p, m, f, _, b, v, w, C, y, + S, x, k, L; + i = e.state, n = e.next_in, k = e.input, o = n + (e.avail_in - 5), + r = e.next_out, L = e.output, s = r - (t - e.avail_out), a = r + + (e.avail_out - 257), l = i.dmax, d = i.wsize, c = i.whave, h = i + .wnext, u = i.window, g = i.hold, p = i.bits, m = i.lencode, f = + i.distcode, _ = (1 << i.lenbits) - 1, b = (1 << i.distbits) - 1; + e: do { + p < 15 && (g += k[n++] << p, p += 8, g += k[n++] << p, p += 8), + v = m[g & _]; + t: for (;;) { + if (g >>>= w = v >>> 24, p -= w, 0 == (w = v >>> 16 & 255)) L[ + r++] = 65535 & v; + else { + if (!(16 & w)) { + if (0 == (64 & w)) { + v = m[(65535 & v) + (g & (1 << w) - 1)]; + continue t + } + if (32 & w) { + i.mode = 12; + break e + } + e.msg = "invalid literal/length code", i.mode = 30; + break e + } + C = 65535 & v, (w &= 15) && (p < w && (g += k[n++] << p, p += + 8), C += g & (1 << w) - 1, g >>>= w, p -= w), p < 15 && (g += + k[n++] << p, p += 8, g += k[n++] << p, p += 8), v = f[g & + b]; + i: for (;;) { + if (g >>>= w = v >>> 24, p -= w, !(16 & (w = v >>> 16 & + 255))) { + if (0 == (64 & w)) { + v = f[(65535 & v) + (g & (1 << w) - 1)]; + continue i + } + e.msg = "invalid distance code", i.mode = 30; + break e + } + if (y = 65535 & v, p < (w &= 15) && (g += k[n++] << p, (p += + 8) < w && (g += k[n++] << p, p += 8)), l < (y += g & (1 << + w) - 1)) { + e.msg = "invalid distance too far back", i.mode = 30; + break e + } + if (g >>>= w, p -= w, (w = r - s) < y) { + if (c < (w = y - w) && i.sane) { + e.msg = "invalid distance too far back", i.mode = 30; + break e + } + if (x = u, (S = 0) === h) { + if (S += d - w, w < C) { + for (C -= w; L[r++] = u[S++], --w;); + S = r - y, x = L + } + } else if (h < w) { + if (S += d + h - w, (w -= h) < C) { + for (C -= w; L[r++] = u[S++], --w;); + if (S = 0, h < C) { + for (C -= w = h; L[r++] = u[S++], --w;); + S = r - y, x = L + } + } + } else if (S += h - w, w < C) { + for (C -= w; L[r++] = u[S++], --w;); + S = r - y, x = L + } + for (; 2 < C;) L[r++] = x[S++], L[r++] = x[S++], L[r++] = + x[S++], C -= 3; + C && (L[r++] = x[S++], 1 < C && (L[r++] = x[S++])) + } else { + for (S = r - y; L[r++] = L[S++], L[r++] = L[S++], L[r++] = + L[S++], 2 < (C -= 3);); + C && (L[r++] = L[S++], 1 < C && (L[r++] = L[S++])) + } + break + } + } + break + } + } while (n < o && r < a); + n -= C = p >> 3, g &= (1 << (p -= C << 3)) - 1, e.next_in = n, e.next_out = + r, e.avail_in = n < o ? o - n + 5 : 5 - (n - o), e.avail_out = r < + a ? a - r + 257 : 257 - (r - a), i.hold = g, i.bits = p + } + }, {}], + 49: [function(e, t, i) { + "use strict"; + var n = e("../utils/common"), + o = e("./adler32"), + r = e("./crc32"), + s = e("./inffast"), + a = e("./inftrees"), + l = -2; + + function d(e) { + return (e >>> 24 & 255) + (e >>> 8 & 65280) + ((65280 & e) << 8) + + ((255 & e) << 24) + } + + function c() { + this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, + this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, + this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, + this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, + this.length = 0, this.offset = 0, this.extra = 0, this.lencode = + null, this.distcode = null, this.lenbits = 0, this.distbits = 0, + this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, + this.next = null, this.lens = new n.Buf16(320), this.work = new n + .Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = + 0, this.back = 0, this.was = 0 + } + + function h(e) { + var t; + return e && e.state ? (t = e.state, e.total_in = e.total_out = t.total = + 0, e.msg = "", t.wrap && (e.adler = 1 & t.wrap), t.mode = 1, t.last = + 0, t.havedict = 0, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = + 0, t.lencode = t.lendyn = new n.Buf32(852), t.distcode = t.distdyn = + new n.Buf32(592), t.sane = 1, t.back = -1, 0) : l + } + + function u(e) { + var t; + return e && e.state ? ((t = e.state).wsize = 0, t.whave = 0, t.wnext = + 0, h(e)) : l + } + + function g(e, t) { + var i, n; + return e && e.state ? (n = e.state, t < 0 ? (i = 0, t = -t) : (i = + 1 + (t >> 4), t < 48 && (t &= 15)), t && (t < 8 || 15 < t) ? l : + (null !== n.window && n.wbits !== t && (n.window = null), n.wrap = + i, n.wbits = t, u(e))) : l + } + + function p(e, t) { + var i, n; + return e ? (n = new c, (e.state = n).window = null, 0 !== (i = g(e, + t)) && (e.state = null), i) : l + } + var m, f, _ = !0; + + function b(e) { + if (_) { + var t; + for (m = new n.Buf32(512), f = new n.Buf32(32), t = 0; t < 144;) e + .lens[t++] = 8; + for (; t < 256;) e.lens[t++] = 9; + for (; t < 280;) e.lens[t++] = 7; + for (; t < 288;) e.lens[t++] = 8; + for (a(1, e.lens, 0, 288, m, 0, e.work, { + bits: 9 + }), t = 0; t < 32;) e.lens[t++] = 5; + a(2, e.lens, 0, 32, f, 0, e.work, { + bits: 5 + }), _ = !1 + } + e.lencode = m, e.lenbits = 9, e.distcode = f, e.distbits = 5 + } + + function v(e, t, i, o) { + var r, s = e.state; + return null === s.window && (s.wsize = 1 << s.wbits, s.wnext = 0, + s.whave = 0, s.window = new n.Buf8(s.wsize)), o >= s.wsize ? (n.arraySet( + s.window, t, i - s.wsize, s.wsize, 0), s.wnext = 0, s.whave = s + .wsize) : (o < (r = s.wsize - s.wnext) && (r = o), n.arraySet(s.window, + t, i - o, r, s.wnext), (o -= r) ? (n.arraySet(s.window, t, i - + o, o, 0), s.wnext = o, s.whave = s.wsize) : (s.wnext += r, s.wnext === + s.wsize && (s.wnext = 0), s.whave < s.wsize && (s.whave += r))), + 0 + } + i.inflateReset = u, i.inflateReset2 = g, i.inflateResetKeep = h, i.inflateInit = + function(e) { + return p(e, 15) + }, i.inflateInit2 = p, i.inflate = function(e, t) { + var i, c, h, u, g, p, m, f, _, w, C, y, S, x, k, L, N, D, E, I, T, + M, A, R, O = 0, + P = new n.Buf8(4), + F = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, + 1, 15 + ]; + if (!e || !e.state || !e.output || !e.input && 0 !== e.avail_in) + return l; + 12 === (i = e.state).mode && (i.mode = 13), g = e.next_out, h = e + .output, m = e.avail_out, u = e.next_in, c = e.input, p = e.avail_in, + f = i.hold, _ = i.bits, w = p, C = m, M = 0; + e: for (;;) switch (i.mode) { + case 1: + if (0 === i.wrap) { + i.mode = 13; + break + } + for (; _ < 16;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + if (2 & i.wrap && 35615 === f) { + P[i.check = 0] = 255 & f, P[1] = f >>> 8 & 255, i.check = r( + i.check, P, 2, 0), _ = f = 0, i.mode = 2; + break + } + if (i.flags = 0, i.head && (i.head.done = !1), !(1 & i.wrap) || + (((255 & f) << 8) + (f >> 8)) % 31) { + e.msg = "incorrect header check", i.mode = 30; + break + } + if (8 != (15 & f)) { + e.msg = "unknown compression method", i.mode = 30; + break + } + if (_ -= 4, T = 8 + (15 & (f >>>= 4)), 0 === i.wbits) i.wbits = + T; + else if (T > i.wbits) { + e.msg = "invalid window size", i.mode = 30; + break + } + i.dmax = 1 << T, e.adler = i.check = 1, i.mode = 512 & f ? 10 : + 12, _ = f = 0; + break; + case 2: + for (; _ < 16;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + if (i.flags = f, 8 != (255 & i.flags)) { + e.msg = "unknown compression method", i.mode = 30; + break + } + if (57344 & i.flags) { + e.msg = "unknown header flags set", i.mode = 30; + break + } + i.head && (i.head.text = f >> 8 & 1), 512 & i.flags && (P[0] = + 255 & f, P[1] = f >>> 8 & 255, i.check = r(i.check, P, 2, 0) + ), _ = f = 0, i.mode = 3; + case 3: + for (; _ < 32;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + i.head && (i.head.time = f), 512 & i.flags && (P[0] = 255 & f, + P[1] = f >>> 8 & 255, P[2] = f >>> 16 & 255, P[3] = f >>> + 24 & 255, i.check = r(i.check, P, 4, 0)), _ = f = 0, i.mode = + 4; + case 4: + for (; _ < 16;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + i.head && (i.head.xflags = 255 & f, i.head.os = f >> 8), 512 & + i.flags && (P[0] = 255 & f, P[1] = f >>> 8 & 255, i.check = + r(i.check, P, 2, 0)), _ = f = 0, i.mode = 5; + case 5: + if (1024 & i.flags) { + for (; _ < 16;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + i.length = f, i.head && (i.head.extra_len = f), 512 & i.flags && + (P[0] = 255 & f, P[1] = f >>> 8 & 255, i.check = r(i.check, + P, 2, 0)), _ = f = 0 + } else i.head && (i.head.extra = null); + i.mode = 6; + case 6: + if (1024 & i.flags && (p < (y = i.length) && (y = p), y && (i + .head && (T = i.head.extra_len - i.length, i.head.extra || + (i.head.extra = new Array(i.head.extra_len)), n.arraySet( + i.head.extra, c, u, y, T)), 512 & i.flags && (i.check = + r(i.check, c, y, u)), p -= y, u += y, i.length -= y), i.length)) + break e; + i.length = 0, i.mode = 7; + case 7: + if (2048 & i.flags) { + if (0 === p) break e; + for (y = 0; T = c[u + y++], i.head && T && i.length < 65536 && + (i.head.name += String.fromCharCode(T)), T && y < p;); + if (512 & i.flags && (i.check = r(i.check, c, y, u)), p -= y, + u += y, T) break e + } else i.head && (i.head.name = null); + i.length = 0, i.mode = 8; + case 8: + if (4096 & i.flags) { + if (0 === p) break e; + for (y = 0; T = c[u + y++], i.head && T && i.length < 65536 && + (i.head.comment += String.fromCharCode(T)), T && y < p;); + if (512 & i.flags && (i.check = r(i.check, c, y, u)), p -= y, + u += y, T) break e + } else i.head && (i.head.comment = null); + i.mode = 9; + case 9: + if (512 & i.flags) { + for (; _ < 16;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + if (f !== (65535 & i.check)) { + e.msg = "header crc mismatch", i.mode = 30; + break + } + _ = f = 0 + } + i.head && (i.head.hcrc = i.flags >> 9 & 1, i.head.done = !0), + e.adler = i.check = 0, i.mode = 12; + break; + case 10: + for (; _ < 32;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + e.adler = i.check = d(f), _ = f = 0, i.mode = 11; + case 11: + if (0 === i.havedict) return e.next_out = g, e.avail_out = m, + e.next_in = u, e.avail_in = p, i.hold = f, i.bits = _, 2; + e.adler = i.check = 1, i.mode = 12; + case 12: + if (5 === t || 6 === t) break e; + case 13: + if (i.last) { + f >>>= 7 & _, _ -= 7 & _, i.mode = 27; + break + } + for (; _ < 3;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + switch (i.last = 1 & f, _ -= 1, 3 & (f >>>= 1)) { + case 0: + i.mode = 14; + break; + case 1: + if (b(i), i.mode = 20, 6 !== t) break; + f >>>= 2, _ -= 2; + break e; + case 2: + i.mode = 17; + break; + case 3: + e.msg = "invalid block type", i.mode = 30 + } + f >>>= 2, _ -= 2; + break; + case 14: + for (f >>>= 7 & _, _ -= 7 & _; _ < 32;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + if ((65535 & f) != (f >>> 16 ^ 65535)) { + e.msg = "invalid stored block lengths", i.mode = 30; + break + } + if (i.length = 65535 & f, _ = f = 0, i.mode = 15, 6 === t) + break e; + case 15: + i.mode = 16; + case 16: + if (y = i.length) { + if (p < y && (y = p), m < y && (y = m), 0 === y) break e; + n.arraySet(h, c, u, y, g), p -= y, u += y, m -= y, g += y, i + .length -= y; + break + } + i.mode = 12; + break; + case 17: + for (; _ < 14;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + if (i.nlen = 257 + (31 & f), f >>>= 5, _ -= 5, i.ndist = 1 + + (31 & f), f >>>= 5, _ -= 5, i.ncode = 4 + (15 & f), f >>>= 4, + _ -= 4, 286 < i.nlen || 30 < i.ndist) { + e.msg = "too many length or distance symbols", i.mode = 30; + break + } + i.have = 0, i.mode = 18; + case 18: + for (; i.have < i.ncode;) { + for (; _ < 3;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + i.lens[F[i.have++]] = 7 & f, f >>>= 3, _ -= 3 + } + for (; i.have < 19;) i.lens[F[i.have++]] = 0; + if (i.lencode = i.lendyn, i.lenbits = 7, A = { + bits: i.lenbits + }, M = a(0, i.lens, 0, 19, i.lencode, 0, i.work, A), i.lenbits = + A.bits, M) { + e.msg = "invalid code lengths set", i.mode = 30; + break + } + i.have = 0, i.mode = 19; + case 19: + for (; i.have < i.nlen + i.ndist;) { + for (; L = (O = i.lencode[f & (1 << i.lenbits) - 1]) >>> 16 & + 255, N = 65535 & O, !((k = O >>> 24) <= _);) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + if (N < 16) f >>>= k, _ -= k, i.lens[i.have++] = N; + else { + if (16 === N) { + for (R = k + 2; _ < R;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + if (f >>>= k, _ -= k, 0 === i.have) { + e.msg = "invalid bit length repeat", i.mode = 30; + break + } + T = i.lens[i.have - 1], y = 3 + (3 & f), f >>>= 2, _ -= 2 + } else if (17 === N) { + for (R = k + 3; _ < R;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + _ -= k, T = 0, y = 3 + (7 & (f >>>= k)), f >>>= 3, _ -= 3 + } else { + for (R = k + 7; _ < R;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + _ -= k, T = 0, y = 11 + (127 & (f >>>= k)), f >>>= 7, _ -= + 7 + } + if (i.have + y > i.nlen + i.ndist) { + e.msg = "invalid bit length repeat", i.mode = 30; + break + } + for (; y--;) i.lens[i.have++] = T + } + } + if (30 === i.mode) break; + if (0 === i.lens[256]) { + e.msg = "invalid code -- missing end-of-block", i.mode = 30; + break + } + if (i.lenbits = 9, A = { + bits: i.lenbits + }, M = a(1, i.lens, 0, i.nlen, i.lencode, 0, i.work, A), i.lenbits = + A.bits, M) { + e.msg = "invalid literal/lengths set", i.mode = 30; + break + } + if (i.distbits = 6, i.distcode = i.distdyn, A = { + bits: i.distbits + }, M = a(2, i.lens, i.nlen, i.ndist, i.distcode, 0, i.work, + A), i.distbits = A.bits, M) { + e.msg = "invalid distances set", i.mode = 30; + break + } + if (i.mode = 20, 6 === t) break e; + case 20: + i.mode = 21; + case 21: + if (6 <= p && 258 <= m) { + e.next_out = g, e.avail_out = m, e.next_in = u, e.avail_in = + p, i.hold = f, i.bits = _, s(e, C), g = e.next_out, h = e.output, + m = e.avail_out, u = e.next_in, c = e.input, p = e.avail_in, + f = i.hold, _ = i.bits, 12 === i.mode && (i.back = -1); + break + } + for (i.back = 0; L = (O = i.lencode[f & (1 << i.lenbits) - 1]) >>> + 16 & 255, N = 65535 & O, !((k = O >>> 24) <= _);) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + if (L && 0 == (240 & L)) { + for (D = k, E = L, I = N; L = (O = i.lencode[I + ((f & (1 << + D + E) - 1) >> D)]) >>> 16 & 255, N = 65535 & O, !(D + (k = + O >>> 24) <= _);) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + f >>>= D, _ -= D, i.back += D + } + if (f >>>= k, _ -= k, i.back += k, i.length = N, 0 === L) { + i.mode = 26; + break + } + if (32 & L) { + i.back = -1, i.mode = 12; + break + } + if (64 & L) { + e.msg = "invalid literal/length code", i.mode = 30; + break + } + i.extra = 15 & L, i.mode = 22; + case 22: + if (i.extra) { + for (R = i.extra; _ < R;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + i.length += f & (1 << i.extra) - 1, f >>>= i.extra, _ -= i.extra, + i.back += i.extra + } + i.was = i.length, i.mode = 23; + case 23: + for (; L = (O = i.distcode[f & (1 << i.distbits) - 1]) >>> 16 & + 255, N = 65535 & O, !((k = O >>> 24) <= _);) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + if (0 == (240 & L)) { + for (D = k, E = L, I = N; L = (O = i.distcode[I + ((f & (1 << + D + E) - 1) >> D)]) >>> 16 & 255, N = 65535 & O, !(D + (k = + O >>> 24) <= _);) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + f >>>= D, _ -= D, i.back += D + } + if (f >>>= k, _ -= k, i.back += k, 64 & L) { + e.msg = "invalid distance code", i.mode = 30; + break + } + i.offset = N, i.extra = 15 & L, i.mode = 24; + case 24: + if (i.extra) { + for (R = i.extra; _ < R;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + i.offset += f & (1 << i.extra) - 1, f >>>= i.extra, _ -= i.extra, + i.back += i.extra + } + if (i.offset > i.dmax) { + e.msg = "invalid distance too far back", i.mode = 30; + break + } + i.mode = 25; + case 25: + if (0 === m) break e; + if (y = C - m, i.offset > y) { + if ((y = i.offset - y) > i.whave && i.sane) { + e.msg = "invalid distance too far back", i.mode = 30; + break + } + S = y > i.wnext ? (y -= i.wnext, i.wsize - y) : i.wnext - y, + y > i.length && (y = i.length), x = i.window + } else x = h, S = g - i.offset, y = i.length; + for (m < y && (y = m), m -= y, i.length -= y; h[g++] = x[S++], -- + y;); + 0 === i.length && (i.mode = 21); + break; + case 26: + if (0 === m) break e; + h[g++] = i.length, m--, i.mode = 21; + break; + case 27: + if (i.wrap) { + for (; _ < 32;) { + if (0 === p) break e; + p--, f |= c[u++] << _, _ += 8 + } + if (C -= m, e.total_out += C, i.total += C, C && (e.adler = + i.check = i.flags ? r(i.check, h, C, g - C) : o(i.check, h, + C, g - C)), C = m, (i.flags ? f : d(f)) !== i.check) { + e.msg = "incorrect data check", i.mode = 30; + break + } + _ = f = 0 + } + i.mode = 28; + case 28: + if (i.wrap && i.flags) { + for (; _ < 32;) { + if (0 === p) break e; + p--, f += c[u++] << _, _ += 8 + } + if (f !== (4294967295 & i.total)) { + e.msg = "incorrect length check", i.mode = 30; + break + } + _ = f = 0 + } + i.mode = 29; + case 29: + M = 1; + break e; + case 30: + M = -3; + break e; + case 31: + return -4; + default: + return l + } + return e.next_out = g, e.avail_out = m, e.next_in = u, e.avail_in = + p, i.hold = f, i.bits = _, (i.wsize || C !== e.avail_out && i.mode < + 30 && (i.mode < 27 || 4 !== t)) && v(e, e.output, e.next_out, C - + e.avail_out) ? (i.mode = 31, -4) : (w -= e.avail_in, C -= e.avail_out, + e.total_in += w, e.total_out += C, i.total += C, i.wrap && C && + (e.adler = i.check = i.flags ? r(i.check, h, C, e.next_out - C) : + o(i.check, h, C, e.next_out - C)), e.data_type = i.bits + (i.last ? + 64 : 0) + (12 === i.mode ? 128 : 0) + (20 === i.mode || 15 === + i.mode ? 256 : 0), (0 == w && 0 === C || 4 === t) && 0 === M && + (M = -5), M) + }, i.inflateEnd = function(e) { + if (!e || !e.state) return l; + var t = e.state; + return t.window && (t.window = null), e.state = null, 0 + }, i.inflateGetHeader = function(e, t) { + var i; + return e && e.state ? 0 == (2 & (i = e.state).wrap) ? l : ((i.head = + t).done = !1, 0) : l + }, i.inflateSetDictionary = function(e, t) { + var i, n = t.length; + return e && e.state ? 0 !== (i = e.state).wrap && 11 !== i.mode ? + l : 11 === i.mode && o(1, t, n, 0) !== i.check ? -3 : v(e, t, n, + n) ? (i.mode = 31, -4) : (i.havedict = 1, 0) : l + }, i.inflateInfo = "pako inflate (from Nodeca project)" + }, { + "../utils/common": 41, + "./adler32": 43, + "./crc32": 45, + "./inffast": 48, + "./inftrees": 50 + }], + 50: [function(e, t, i) { + "use strict"; + var n = e("../utils/common"), + o = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, + 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 + ], + r = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, + 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 + ], + s = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, + 12289, 16385, 24577, 0, 0 + ], + a = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, + 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, + 64 + ]; + t.exports = function(e, t, i, l, d, c, h, u) { + var g, p, m, f, _, b, v, w, C, y = u.bits, + S = 0, + x = 0, + k = 0, + L = 0, + N = 0, + D = 0, + E = 0, + I = 0, + T = 0, + M = 0, + A = null, + R = 0, + O = new n.Buf16(16), + P = new n.Buf16(16), + F = null, + B = 0; + for (S = 0; S <= 15; S++) O[S] = 0; + for (x = 0; x < l; x++) O[t[i + x]]++; + for (N = y, L = 15; 1 <= L && 0 === O[L]; L--); + if (L < N && (N = L), 0 === L) return d[c++] = 20971520, d[c++] = + 20971520, u.bits = 1, 0; + for (k = 1; k < L && 0 === O[k]; k++); + for (N < k && (N = k), S = I = 1; S <= 15; S++) + if (I <<= 1, (I -= O[S]) < 0) return -1; + if (0 < I && (0 === e || 1 !== L)) return -1; + for (P[1] = 0, S = 1; S < 15; S++) P[S + 1] = P[S] + O[S]; + for (x = 0; x < l; x++) 0 !== t[i + x] && (h[P[t[i + x]]++] = x); + if (b = 0 === e ? (A = F = h, 19) : 1 === e ? (A = o, R -= 257, F = + r, B -= 257, 256) : (A = s, F = a, -1), S = k, _ = c, E = x = M = + 0, m = -1, f = (T = 1 << (D = N)) - 1, 1 === e && 852 < T || 2 === + e && 592 < T) return 1; + for (;;) { + for (v = S - E, C = h[x] < b ? (w = 0, h[x]) : h[x] > b ? (w = F[ + B + h[x]], A[R + h[x]]) : (w = 96, 0), g = 1 << S - E, k = p = + 1 << D; d[_ + (M >> E) + (p -= g)] = v << 24 | w << 16 | C | 0, + 0 !== p;); + for (g = 1 << S - 1; M & g;) g >>= 1; + if (0 !== g ? (M &= g - 1, M += g) : M = 0, x++, 0 == --O[S]) { + if (S === L) break; + S = t[i + h[x]] + } + if (N < S && (M & f) !== m) { + for (0 === E && (E = N), _ += k, I = 1 << (D = S - E); D + E < + L && !((I -= O[D + E]) <= 0);) D++, I <<= 1; + if (T += 1 << D, 1 === e && 852 < T || 2 === e && 592 < T) + return 1; + d[m = M & f] = N << 24 | D << 16 | _ - c | 0 + } + } + return 0 !== M && (d[_ + M] = S - E << 24 | 64 << 16 | 0), u.bits = + N, 0 + } + }, { + "../utils/common": 41 + }], + 51: [function(e, t, i) { + "use strict"; + t.exports = { + 2: "need dictionary", + 1: "stream end", + 0: "", + "-1": "file error", + "-2": "stream error", + "-3": "data error", + "-4": "insufficient memory", + "-5": "buffer error", + "-6": "incompatible version" + } + }, {}], + 52: [function(e, t, i) { + "use strict"; + var n = e("../utils/common"); + + function o(e) { + for (var t = e.length; 0 <= --t;) e[t] = 0 + } + var r = 256, + s = 286, + a = 30, + l = 15, + d = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, + 4, 4, 4, 5, 5, 5, 5, 0 + ], + c = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, + 9, 10, 10, 11, 11, 12, 12, 13, 13 + ], + h = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], + u = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, + 15 + ], + g = new Array(576); + o(g); + var p = new Array(60); + o(p); + var m = new Array(512); + o(m); + var f = new Array(256); + o(f); + var _ = new Array(29); + o(_); + var b, v, w, C = new Array(a); + + function y(e, t, i, n, o) { + this.static_tree = e, this.extra_bits = t, this.extra_base = i, + this.elems = n, this.max_length = o, this.has_stree = e && e.length + } + + function S(e, t) { + this.dyn_tree = e, this.max_code = 0, this.stat_desc = t + } + + function x(e) { + return e < 256 ? m[e] : m[256 + (e >>> 7)] + } + + function k(e, t) { + e.pending_buf[e.pending++] = 255 & t, e.pending_buf[e.pending++] = + t >>> 8 & 255 + } + + function L(e, t, i) { + e.bi_valid > 16 - i ? (e.bi_buf |= t << e.bi_valid & 65535, k(e, e + .bi_buf), e.bi_buf = t >> 16 - e.bi_valid, e.bi_valid += i - 16) : + (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += i) + } + + function N(e, t, i) { + L(e, i[2 * t], i[2 * t + 1]) + } + + function D(e, t) { + for (var i = 0; i |= 1 & e, e >>>= 1, i <<= 1, 0 < --t;); + return i >>> 1 + } + + function E(e, t, i) { + var n, o, r = new Array(16), + s = 0; + for (n = 1; n <= l; n++) r[n] = s = s + i[n - 1] << 1; + for (o = 0; o <= t; o++) { + var a = e[2 * o + 1]; + 0 !== a && (e[2 * o] = D(r[a]++, a)) + } + } + + function I(e) { + var t; + for (t = 0; t < s; t++) e.dyn_ltree[2 * t] = 0; + for (t = 0; t < a; t++) e.dyn_dtree[2 * t] = 0; + for (t = 0; t < 19; t++) e.bl_tree[2 * t] = 0; + e.dyn_ltree[512] = 1, e.opt_len = e.static_len = 0, e.last_lit = e + .matches = 0 + } + + function T(e) { + 8 < e.bi_valid ? k(e, e.bi_buf) : 0 < e.bi_valid && (e.pending_buf[ + e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0 + } + + function M(e, t, i, n) { + var o = 2 * t, + r = 2 * i; + return e[o] < e[r] || e[o] === e[r] && n[t] <= n[i] + } + + function A(e, t, i) { + for (var n = e.heap[i], o = i << 1; o <= e.heap_len && (o < e.heap_len && + M(t, e.heap[o + 1], e.heap[o], e.depth) && o++, !M(t, n, e.heap[ + o], e.depth));) e.heap[i] = e.heap[o], i = o, o <<= 1; + e.heap[i] = n + } + + function R(e, t, i) { + var n, o, s, a, l = 0; + if (0 !== e.last_lit) + for (; n = e.pending_buf[e.d_buf + 2 * l] << 8 | e.pending_buf[e.d_buf + + 2 * l + 1], o = e.pending_buf[e.l_buf + l], l++, 0 === n ? N(e, + o, t) : (N(e, (s = f[o]) + r + 1, t), 0 !== (a = d[s]) && L(e, + o -= _[s], a), N(e, s = x(--n), i), 0 !== (a = c[s]) && L(e, n -= + C[s], a)), l < e.last_lit;); + N(e, 256, t) + } + + function O(e, t) { + var i, n, o, r = t.dyn_tree, + s = t.stat_desc.static_tree, + a = t.stat_desc.has_stree, + d = t.stat_desc.elems, + c = -1; + for (e.heap_len = 0, e.heap_max = 573, i = 0; i < d; i++) 0 !== r[ + 2 * i] ? (e.heap[++e.heap_len] = c = i, e.depth[i] = 0) : r[2 * + i + 1] = 0; + for (; e.heap_len < 2;) r[2 * (o = e.heap[++e.heap_len] = c < 2 ? + ++c : 0)] = 1, e.depth[o] = 0, e.opt_len--, a && (e.static_len -= + s[2 * o + 1]); + for (t.max_code = c, i = e.heap_len >> 1; 1 <= i; i--) A(e, r, i); + for (o = d; i = e.heap[1], e.heap[1] = e.heap[e.heap_len--], A(e, + r, 1), n = e.heap[1], e.heap[--e.heap_max] = i, e.heap[--e.heap_max] = + n, r[2 * o] = r[2 * i] + r[2 * n], e.depth[o] = (e.depth[i] >= e.depth[ + n] ? e.depth[i] : e.depth[n]) + 1, r[2 * i + 1] = r[2 * n + 1] = + o, e.heap[1] = o++, A(e, r, 1), 2 <= e.heap_len;); + e.heap[--e.heap_max] = e.heap[1], + function(e, t) { + var i, n, o, r, s, a, d = t.dyn_tree, + c = t.max_code, + h = t.stat_desc.static_tree, + u = t.stat_desc.has_stree, + g = t.stat_desc.extra_bits, + p = t.stat_desc.extra_base, + m = t.stat_desc.max_length, + f = 0; + for (r = 0; r <= l; r++) e.bl_count[r] = 0; + for (d[2 * e.heap[e.heap_max] + 1] = 0, i = e.heap_max + 1; i < + 573; i++) m < (r = d[2 * d[2 * (n = e.heap[i]) + 1] + 1] + 1) && + (r = m, f++), d[2 * n + 1] = r, c < n || (e.bl_count[r]++, s = + 0, p <= n && (s = g[n - p]), a = d[2 * n], e.opt_len += a * (r + + s), u && (e.static_len += a * (h[2 * n + 1] + s))); + if (0 !== f) { + do { + for (r = m - 1; 0 === e.bl_count[r];) r--; + e.bl_count[r]--, e.bl_count[r + 1] += 2, e.bl_count[m]--, f -= + 2 + } while (0 < f); + for (r = m; 0 !== r; r--) + for (n = e.bl_count[r]; 0 !== n;) c < (o = e.heap[--i]) || (d[ + 2 * o + 1] !== r && (e.opt_len += (r - d[2 * o + 1]) * d[2 * + o], d[2 * o + 1] = r), n--) + } + }(e, t), E(r, c, e.bl_count) + } + + function P(e, t, i) { + var n, o, r = -1, + s = t[1], + a = 0, + l = 7, + d = 4; + for (0 === s && (l = 138, d = 3), t[2 * (i + 1) + 1] = 65535, n = + 0; n <= i; n++) o = s, s = t[2 * (n + 1) + 1], ++a < l && o === s || + (a < d ? e.bl_tree[2 * o] += a : 0 !== o ? (o !== r && e.bl_tree[ + 2 * o]++, e.bl_tree[32]++) : a <= 10 ? e.bl_tree[34]++ : e.bl_tree[ + 36]++, r = o, d = (a = 0) === s ? (l = 138, 3) : o === s ? (l = + 6, 3) : (l = 7, 4)) + } + + function F(e, t, i) { + var n, o, r = -1, + s = t[1], + a = 0, + l = 7, + d = 4; + for (0 === s && (l = 138, d = 3), n = 0; n <= i; n++) + if (o = s, s = t[2 * (n + 1) + 1], !(++a < l && o === s)) { + if (a < d) + for (; N(e, o, e.bl_tree), 0 != --a;); + else 0 !== o ? (o !== r && (N(e, o, e.bl_tree), a--), N(e, 16, e + .bl_tree), L(e, a - 3, 2)) : a <= 10 ? (N(e, 17, e.bl_tree), L( + e, a - 3, 3)) : (N(e, 18, e.bl_tree), L(e, a - 11, 7)); + r = o, d = (a = 0) === s ? (l = 138, 3) : o === s ? (l = 6, 3) : + (l = 7, 4) + } + } + o(C); + var B = !1; + + function W(e, t, i, o) { + L(e, 0 + (o ? 1 : 0), 3), + function(e, t, i, o) { + T(e), k(e, i), k(e, ~i), n.arraySet(e.pending_buf, e.window, t, + i, e.pending), e.pending += i + }(e, t, i) + } + i._tr_init = function(e) { + B || (function() { + var e, t, i, n, o, r = new Array(16); + for (n = i = 0; n < 28; n++) + for (_[n] = i, e = 0; e < 1 << d[n]; e++) f[i++] = n; + for (f[i - 1] = n, n = o = 0; n < 16; n++) + for (C[n] = o, e = 0; e < 1 << c[n]; e++) m[o++] = n; + for (o >>= 7; n < a; n++) + for (C[n] = o << 7, e = 0; e < 1 << c[n] - 7; e++) m[256 + o++] = + n; + for (t = 0; t <= l; t++) r[t] = 0; + for (e = 0; e <= 143;) g[2 * e + 1] = 8, e++, r[8]++; + for (; e <= 255;) g[2 * e + 1] = 9, e++, r[9]++; + for (; e <= 279;) g[2 * e + 1] = 7, e++, r[7]++; + for (; e <= 287;) g[2 * e + 1] = 8, e++, r[8]++; + for (E(g, 287, r), e = 0; e < a; e++) p[2 * e + 1] = 5, p[2 * + e] = D(e, 5); + b = new y(g, d, 257, s, l), v = new y(p, c, 0, a, l), w = new y( + new Array(0), h, 0, 19, 7) + }(), B = !0), e.l_desc = new S(e.dyn_ltree, b), e.d_desc = new S( + e.dyn_dtree, v), e.bl_desc = new S(e.bl_tree, w), e.bi_buf = 0, + e.bi_valid = 0, I(e) + }, i._tr_stored_block = W, i._tr_flush_block = function(e, t, i, n) { + var o, s, a = 0; + 0 < e.level ? (2 === e.strm.data_type && (e.strm.data_type = + function(e) { + var t, i = 4093624447; + for (t = 0; t <= 31; t++, i >>>= 1) + if (1 & i && 0 !== e.dyn_ltree[2 * t]) return 0; + if (0 !== e.dyn_ltree[18] || 0 !== e.dyn_ltree[20] || 0 !== e + .dyn_ltree[26]) return 1; + for (t = 32; t < r; t++) + if (0 !== e.dyn_ltree[2 * t]) return 1; + return 0 + }(e)), O(e, e.l_desc), O(e, e.d_desc), a = function(e) { + var t; + for (P(e, e.dyn_ltree, e.l_desc.max_code), P(e, e.dyn_dtree, e + .d_desc.max_code), O(e, e.bl_desc), t = 18; 3 <= t && 0 === + e.bl_tree[2 * u[t] + 1]; t--); + return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t + }(e), o = e.opt_len + 3 + 7 >>> 3, (s = e.static_len + 3 + 7 >>> + 3) <= o && (o = s)) : o = s = i + 5, i + 4 <= o && -1 !== t ? W( + e, t, i, n) : 4 === e.strategy || s === o ? (L(e, 2 + (n ? 1 : + 0), 3), R(e, g, p)) : (L(e, 4 + (n ? 1 : 0), 3), function(e, t, + i, n) { + var o; + for (L(e, t - 257, 5), L(e, i - 1, 5), L(e, n - 4, 4), o = 0; o < + n; o++) L(e, e.bl_tree[2 * u[o] + 1], 3); + F(e, e.dyn_ltree, t - 1), F(e, e.dyn_dtree, i - 1) + }(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, a + 1), R(e, + e.dyn_ltree, e.dyn_dtree)), I(e), n && T(e) + }, i._tr_tally = function(e, t, i) { + return e.pending_buf[e.d_buf + 2 * e.last_lit] = t >>> 8 & 255, e + .pending_buf[e.d_buf + 2 * e.last_lit + 1] = 255 & t, e.pending_buf[ + e.l_buf + e.last_lit] = 255 & i, e.last_lit++, 0 === t ? e.dyn_ltree[ + 2 * i]++ : (e.matches++, t--, e.dyn_ltree[2 * (f[i] + r + 1)]++, + e.dyn_dtree[2 * x(t)]++), e.last_lit === e.lit_bufsize - 1 + }, i._tr_align = function(e) { + L(e, 2, 3), N(e, 256, g), + function(e) { + 16 === e.bi_valid ? (k(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = + 0) : 8 <= e.bi_valid && (e.pending_buf[e.pending++] = 255 & e + .bi_buf, e.bi_buf >>= 8, e.bi_valid -= 8) + }(e) + } + }, { + "../utils/common": 41 + }], + 53: [function(e, t, i) { + "use strict"; + t.exports = function() { + this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = + 0, this.output = null, this.next_out = 0, this.avail_out = 0, + this.total_out = 0, this.msg = "", this.state = null, this.data_type = + 2, this.adler = 0 + } + }, {}], + 54: [function(e, t, i) { + "use strict"; + t.exports = "function" == typeof setImmediate ? setImmediate : + function() { + var e = [].slice.apply(arguments); + e.splice(1, 0, 0), setTimeout.apply(null, e) + } + }, {}] + }, {}, [10])(10) + }, + 158: (e, t, i) => { + var n; + self.MonacoEnvironment = (n = { + editorWorkerService: "editor.worker.455af92e7e1dc39fdbc8060f6680ab32.js", + css: "css.worker.6cf2730e37c0fe22a2a0295576f3ee12.js", + html: "html.worker.6b1ed1bedd96f08944b0e5a8b12c4739.js", + json: "json.worker.d63c826e229c90273981bd45f77732ad.js", + typescript: "ts.worker.da9b5ead4848cc2777299f9d18504d8c.js", + javascript: "ts.worker.da9b5ead4848cc2777299f9d18504d8c.js", + less: "css.worker.6cf2730e37c0fe22a2a0295576f3ee12.js", + scss: "css.worker.6cf2730e37c0fe22a2a0295576f3ee12.js", + handlebars: "html.worker.6b1ed1bedd96f08944b0e5a8b12c4739.js", + razor: "html.worker.6b1ed1bedd96f08944b0e5a8b12c4739.js" + }, { + globalAPI: !1, + getWorkerUrl: function(e, t) { + var o = i.p, + r = (o ? o.replace(/\/$/, "") + "/" : "") + n[t]; + if (/^((http:)|(https:)|(file:)|(\/\/))/.test(r)) { + var s = String(window.location), + a = s.substr(0, s.length - window.location.hash.length - window.location + .search.length - window.location.pathname.length); + if (r.substring(0, a.length) !== a) { + /^(\/\/)/.test(r) && (r = window.location.protocol + r); + var l = new Blob(["/*" + t + '*/importScripts("' + r + '");'], { + type: "application/javascript" + }); + return URL.createObjectURL(l) + } + } + return r + } + }), i(5898), i(4396), i(6012), i(4594), i(2015), i(9093), i(8191), i( + 7956), i(9098), i(6522), i(8728), i(2834), i(6961), i(1372), i(255), i( + 3190), i(3111), i(4818), i(5091), i(2097), i(2729), i(5389), i(3285), i( + 1321), i(3554), i(638), i(7586), i(3167), i(154), i(6307), i(674), i( + 370), i(8486), i(4993), i(7720), i(8944), i(8936), i(5048), i(7290), i( + 1955), i(2860), i(9830), i(5662), i(9720), i(7847), i(1725), i(185), i( + 3497), i(9453), i(661), e.exports = i(110), i(6292), i(605), i(902), i( + 8423), i(3763), i(2323), i(7365), i(9723), i(5161), i(6628), i(8307), i( + 8828), i(1905), i(4199) + }, + 6268: (e, t, i) => { + "use strict"; + i.d(t, { + px: () => r, + WP: () => s, + fX: () => a, + ie: () => l, + mX: () => d, + vU: () => h, + Pf: () => u, + i7: () => g, + G6: () => p, + MG: () => m, + Dt: () => f, + $W: () => _ + }); + var n = i(4669); + class o { + constructor() { + this._zoomLevel = 0, this._lastZoomLevelChangeTime = 0, this._onDidChangeZoomLevel = + new n.Q5, this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event, + this._zoomFactor = 1 + } + getZoomLevel() { + return this._zoomLevel + } + getTimeSinceLastZoomLevelChanged() { + return Date.now() - this._lastZoomLevelChangeTime + } + getZoomFactor() { + return this._zoomFactor + } + getPixelRatio() { + let e = document.createElement("canvas").getContext("2d"); + return (window.devicePixelRatio || 1) / (e.webkitBackingStorePixelRatio || + e.mozBackingStorePixelRatio || e.msBackingStorePixelRatio || e.oBackingStorePixelRatio || + e.backingStorePixelRatio || 1) + } + } + + function r() { + return o.INSTANCE.getZoomLevel() + } + + function s() { + return o.INSTANCE.getTimeSinceLastZoomLevelChanged() + } + + function a(e) { + return o.INSTANCE.onDidChangeZoomLevel(e) + } + + function l() { + return o.INSTANCE.getZoomFactor() + } + + function d() { + return o.INSTANCE.getPixelRatio() + } + o.INSTANCE = new o; + const c = navigator.userAgent, + h = c.indexOf("Firefox") >= 0, + u = c.indexOf("AppleWebKit") >= 0, + g = c.indexOf("Chrome") >= 0, + p = !g && c.indexOf("Safari") >= 0, + m = !g && !p && u, + f = c.indexOf("Android") >= 0, + _ = window.matchMedia && window.matchMedia("(display-mode: standalone)") + .matches + }, + 161: (e, t, i) => { + "use strict"; + i.d(t, { + D: () => r + }); + var n = i(6268), + o = i(1432); + const r = { + clipboard: { + writeText: o.tY || document.queryCommandSupported && document.queryCommandSupported( + "copy") || !!(navigator && navigator.clipboard && navigator.clipboard + .writeText), + readText: o.tY || !!(navigator && navigator.clipboard && navigator.clipboard + .readText) + }, + keyboard: o.tY || n.$W ? 0 : navigator.keyboard || n.G6 ? 1 : 2, + touch: "ontouchstart" in window || navigator.maxTouchPoints > 0, + pointerEvents: window.PointerEvent && ("ontouchstart" in window || + window.navigator.maxTouchPoints > 0 || navigator.maxTouchPoints > 0) + } + }, + 3547: (e, t, i) => { + "use strict"; + i.d(t, { + go: () => n, + TN: () => o, + P$: () => r + }); + const n = { + RESOURCES: "ResourceURLs", + DOWNLOAD_URL: "DownloadURL", + FILES: "Files", + TEXT: i(1170).vW.text, + TERMINALS: "Terminals" + }; + class o { + constructor(e) { + this.data = e + } + update() {} + getData() { + return this.data + } + } + const r = { + CurrentDragAndDropData: void 0 + } + }, + 5321: (e, t, i) => { + "use strict"; + i.d(t, { + PO: () => g, + Uw: () => p, + nm: () => f, + mu: () => b, + Gw: () => v, + Lo: () => w, + qV: () => C, + j_: () => y, + RE: () => S, + lI: () => x, + jL: () => k, + Y_: () => I, + Dx: () => T, + D6: () => M, + Ro: () => R, + xQ: () => O, + dp: () => P, + i: () => F, + DI: () => B, + w: () => W, + FK: () => z, + If: () => V, + wn: () => H, + jg: () => U, + Fx: () => j, + uU: () => K, + OO: () => q, + Ay: () => Z, + vY: () => G, + dS: () => Y, + fk: () => J, + uN: () => ee, + Re: () => te, + tw: () => ie, + zB: () => ne, + vL: () => oe, + _0: () => re, + go: () => ae, + R3: () => le, + Ce: () => de, + mc: () => ce, + $: () => pe, + $Z: () => me, + Cp: () => fe, + H$: () => _e, + Uh: () => be, + V3: () => ve, + jt: () => we, + wY: () => Ce, + _h: () => ye, + _q: () => Se, + uB: () => xe + }); + var n = i(6268), + o = i(161), + r = i(9069), + s = i(3938), + a = i(5393), + l = i(7301), + d = i(4669), + c = i(5976), + h = i(6663), + u = i(1432); + + function g(e) { + for (; e.firstChild;) e.firstChild.remove() + } + + function p(e) { + var t; + return null !== (t = null == e ? void 0 : e.isConnected) && void 0 !== t && + t + } + class m { + constructor(e, t, i, n) { + this._node = e, this._type = t, this._handler = i, this._options = n || + !1, this._node.addEventListener(this._type, this._handler, this._options) + } + dispose() { + this._handler && (this._node.removeEventListener(this._type, this._handler, + this._options), this._node = null, this._handler = null) + } + } + + function f(e, t, i, n) { + return new m(e, t, i, n) + } + + function _(e) { + return function(t) { + return e(new s.n(t)) + } + } + let b = function(e, t, i, n) { + let o = i; + return "click" === t || "mousedown" === t ? o = _(i) : "keydown" !== t && + "keypress" !== t && "keyup" !== t || (o = function(e) { + return function(t) { + return e(new r.y(t)) + } + }(i)), f(e, t, o, n) + }, + v = function(e, t, i) { + return w(e, _(t), i) + }; + + function w(e, t, i) { + return f(e, u.gn && o.D.pointerEvents ? ie.POINTER_DOWN : ie.MOUSE_DOWN, + t, i) + } + + function C(e, t, i) { + return f(e, u.gn && o.D.pointerEvents ? ie.POINTER_UP : ie.MOUSE_UP, t, + i) + } + + function y(e, t) { + return f(e, "mouseout", (i => { + let n = i.relatedTarget; + for (; n && n !== e;) n = n.parentNode; + n !== e && t(i) + })) + } + + function S(e, t) { + return f(e, "pointerout", (i => { + let n = i.relatedTarget; + for (; n && n !== e;) n = n.parentNode; + n !== e && t(i) + })) + } + let x, k, L = null; + class N { + constructor(e, t = 0) { + this._runner = e, this.priority = t, this._canceled = !1 + } + dispose() { + this._canceled = !0 + } + execute() { + if (!this._canceled) try { + this._runner() + } catch (e) { + (0, l.dL)(e) + } + } + static sort(e, t) { + return t.priority - e.priority + } + }! function() { + let e = [], + t = null, + i = !1, + n = !1, + o = () => { + for (i = !1, t = e, e = [], n = !0; t.length > 0;) t.sort(N.sort), t.shift() + .execute(); + n = !1 + }; + k = (t, n = 0) => { + let r = new N(t, n); + return e.push(r), i || (i = !0, function(e) { + if (!L) { + const e = e => setTimeout((() => e((new Date).getTime())), 0); + L = self.requestAnimationFrame || self.msRequestAnimationFrame || + self.webkitRequestAnimationFrame || self.mozRequestAnimationFrame || + self.oRequestAnimationFrame || e + } + L.call(self, e) + }(o)), r + }, x = (e, i) => { + if (n) { + let n = new N(e, i); + return t.push(n), n + } + return k(e, i) + } + }(); + const D = function(e, t) { + return t + }; + class E extends c.JT { + constructor(e, t, i, n = D, o = 8) { + super(); + let r = null, + s = 0, + l = this._register(new a._F), + d = () => { + s = (new Date).getTime(), i(r), r = null + }; + this._register(f(e, t, (e => { + r = n(r, e); + let t = (new Date).getTime() - s; + t >= o ? (l.cancel(), d()) : l.setIfNotSet(d, o - t) + }))) + } + } + + function I(e, t, i, n, o) { + return new E(e, t, i, n, o) + } + + function T(e) { + return document.defaultView.getComputedStyle(e, null) + } + + function M(e) { + if (e !== document.body) return new R(e.clientWidth, e.clientHeight); + if (u.gn && window.visualViewport) return new R(window.visualViewport.width, + window.visualViewport.height); + if (window.innerWidth && window.innerHeight) return new R(window.innerWidth, + window.innerHeight); + if (document.body && document.body.clientWidth && document.body.clientHeight) + return new R(document.body.clientWidth, document.body.clientHeight); + if (document.documentElement && document.documentElement.clientWidth && + document.documentElement.clientHeight) return new R(document.documentElement + .clientWidth, document.documentElement.clientHeight); + throw new Error("Unable to figure out browser width and height") + } + class A { + static convertToPixels(e, t) { + return parseFloat(t) || 0 + } + static getDimension(e, t, i) { + let n = T(e), + o = "0"; + return n && (o = n.getPropertyValue ? n.getPropertyValue(t) : n.getAttribute( + i)), A.convertToPixels(e, o) + } + static getBorderLeftWidth(e) { + return A.getDimension(e, "border-left-width", "borderLeftWidth") + } + static getBorderRightWidth(e) { + return A.getDimension(e, "border-right-width", "borderRightWidth") + } + static getBorderTopWidth(e) { + return A.getDimension(e, "border-top-width", "borderTopWidth") + } + static getBorderBottomWidth(e) { + return A.getDimension(e, "border-bottom-width", "borderBottomWidth") + } + static getPaddingLeft(e) { + return A.getDimension(e, "padding-left", "paddingLeft") + } + static getPaddingRight(e) { + return A.getDimension(e, "padding-right", "paddingRight") + } + static getPaddingTop(e) { + return A.getDimension(e, "padding-top", "paddingTop") + } + static getPaddingBottom(e) { + return A.getDimension(e, "padding-bottom", "paddingBottom") + } + static getMarginLeft(e) { + return A.getDimension(e, "margin-left", "marginLeft") + } + static getMarginTop(e) { + return A.getDimension(e, "margin-top", "marginTop") + } + static getMarginRight(e) { + return A.getDimension(e, "margin-right", "marginRight") + } + static getMarginBottom(e) { + return A.getDimension(e, "margin-bottom", "marginBottom") + } + } + class R { + constructor(e, t) { + this.width = e, this.height = t + } + with(e = this.width, t = this.height) { + return e !== this.width || t !== this.height ? new R(e, t) : this + } + static is(e) { + return "object" == typeof e && "number" == typeof e.height && "number" == + typeof e.width + } + static lift(e) { + return e instanceof R ? e : new R(e.width, e.height) + } + static equals(e, t) { + return e === t || !(!e || !t) && e.width === t.width && e.height === t + .height + } + } + + function O(e) { + let t = e.offsetParent, + i = e.offsetTop, + n = e.offsetLeft; + for (; null !== (e = e.parentNode) && e !== document.body && e !== + document.documentElement;) { + i -= e.scrollTop; + const o = $(e) ? null : T(e); + o && (n -= "rtl" !== o.direction ? e.scrollLeft : -e.scrollLeft), e === + t && (n += A.getBorderLeftWidth(e), i += A.getBorderTopWidth(e), i += + e.offsetTop, n += e.offsetLeft, t = e.offsetParent) + } + return { + left: n, + top: i + } + } + + function P(e, t, i) { + "number" == typeof t && (e.style.width = `${t}px`), "number" == typeof i && + (e.style.height = `${i}px`) + } + + function F(e) { + let t = e.getBoundingClientRect(); + return { + left: t.left + B.scrollX, + top: t.top + B.scrollY, + width: t.width, + height: t.height + } + } + const B = new class {get scrollX() { + return "number" == typeof window.scrollX ? window.scrollX : document.body + .scrollLeft + document.documentElement.scrollLeft + } + get scrollY() { + return "number" == typeof window.scrollY ? window.scrollY : document.body + .scrollTop + document.documentElement.scrollTop + } + }; + + function W(e) { + let t = A.getMarginLeft(e) + A.getMarginRight(e); + return e.offsetWidth + t + } + + function z(e) { + let t = A.getBorderLeftWidth(e) + A.getBorderRightWidth(e), + i = A.getPaddingLeft(e) + A.getPaddingRight(e); + return e.offsetWidth - t - i + } + + function V(e) { + let t = A.getBorderTopWidth(e) + A.getBorderBottomWidth(e), + i = A.getPaddingTop(e) + A.getPaddingBottom(e); + return e.offsetHeight - t - i + } + + function H(e) { + let t = A.getMarginTop(e) + A.getMarginBottom(e); + return e.offsetHeight + t + } + + function U(e, t) { + for (; e;) { + if (e === t) return !0; + e = e.parentNode + } + return !1 + } + + function j(e, t, i) { + for (; e && e.nodeType === e.ELEMENT_NODE;) { + if (e.classList.contains(t)) return e; + if (i) + if ("string" == typeof i) { + if (e.classList.contains(i)) return null + } else if (e === i) return null; + e = e.parentNode + } + return null + } + + function K(e, t, i) { + return !!j(e, t, i) + } + + function $(e) { + return e && !!e.host && !!e.mode + } + + function q(e) { + return !!Z(e) + } + + function Z(e) { + for (; e.parentNode;) { + if (e === document.body) return null; + e = e.parentNode + } + return $(e) ? e : null + } + + function G() { + let e = document.activeElement; + for (; null == e ? void 0 : e.shadowRoot;) e = e.shadowRoot.activeElement; + return e + } + + function Y(e = document.getElementsByTagName("head")[0]) { + let t = document.createElement("style"); + return t.type = "text/css", t.media = "screen", e.appendChild(t), t + } + let Q = null; + + function X() { + return Q || (Q = Y()), Q + } + + function J(e, t, i = X()) { + i && t && i.sheet.insertRule(e + "{" + t + "}", 0) + } + + function ee(e, t = X()) { + if (!t) return; + let i = function(e) { + var t, i; + return (null === (t = null == e ? void 0 : e.sheet) || void 0 === t ? + void 0 : t.rules) ? e.sheet.rules : (null === (i = null == e ? void 0 : + e.sheet) || void 0 === i ? void 0 : i.cssRules) ? e.sheet.cssRules : [] + }(t), + n = []; + for (let t = 0; t < i.length; t++) - 1 !== i[t].selectorText.indexOf(e) && + n.push(t); + for (let e = n.length - 1; e >= 0; e--) t.sheet.deleteRule(n[e]) + } + + function te(e) { + return "object" == typeof HTMLElement ? e instanceof HTMLElement : e && + "object" == typeof e && 1 === e.nodeType && "string" == typeof e.nodeName + } + const ie = { + CLICK: "click", + AUXCLICK: "auxclick", + DBLCLICK: "dblclick", + MOUSE_UP: "mouseup", + MOUSE_DOWN: "mousedown", + MOUSE_OVER: "mouseover", + MOUSE_MOVE: "mousemove", + MOUSE_OUT: "mouseout", + MOUSE_ENTER: "mouseenter", + MOUSE_LEAVE: "mouseleave", + MOUSE_WHEEL: "wheel", + POINTER_UP: "pointerup", + POINTER_DOWN: "pointerdown", + POINTER_MOVE: "pointermove", + CONTEXT_MENU: "contextmenu", + WHEEL: "wheel", + KEY_DOWN: "keydown", + KEY_PRESS: "keypress", + KEY_UP: "keyup", + LOAD: "load", + BEFORE_UNLOAD: "beforeunload", + UNLOAD: "unload", + ABORT: "abort", + ERROR: "error", + RESIZE: "resize", + SCROLL: "scroll", + FULLSCREEN_CHANGE: "fullscreenchange", + WK_FULLSCREEN_CHANGE: "webkitfullscreenchange", + SELECT: "select", + CHANGE: "change", + SUBMIT: "submit", + RESET: "reset", + FOCUS: "focus", + FOCUS_IN: "focusin", + FOCUS_OUT: "focusout", + BLUR: "blur", + INPUT: "input", + STORAGE: "storage", + DRAG_START: "dragstart", + DRAG: "drag", + DRAG_ENTER: "dragenter", + DRAG_LEAVE: "dragleave", + DRAG_OVER: "dragover", + DROP: "drop", + DRAG_END: "dragend", + ANIMATION_START: n.Pf ? "webkitAnimationStart" : "animationstart", + ANIMATION_END: n.Pf ? "webkitAnimationEnd" : "animationend", + ANIMATION_ITERATION: n.Pf ? "webkitAnimationIteration" : "animationiteration" + }, + ne = { + stop: function(e, t) { + e.preventDefault ? e.preventDefault() : e.returnValue = !1, t && (e.stopPropagation ? + e.stopPropagation() : e.cancelBubble = !0) + } + }; + + function oe(e) { + let t = []; + for (let i = 0; e && e.nodeType === e.ELEMENT_NODE; i++) t[i] = e.scrollTop, + e = e.parentNode; + return t + } + + function re(e, t) { + for (let i = 0; e && e.nodeType === e.ELEMENT_NODE; i++) e.scrollTop !== + t[i] && (e.scrollTop = t[i]), e = e.parentNode + } + class se extends c.JT { + constructor(e) { + super(), this._onDidFocus = this._register(new d.Q5), this.onDidFocus = + this._onDidFocus.event, this._onDidBlur = this._register(new d.Q5), + this.onDidBlur = this._onDidBlur.event; + let t = U(document.activeElement, e), + i = !1; + const n = () => { + i = !1, t || (t = !0, this._onDidFocus.fire()) + }, + o = () => { + t && (i = !0, window.setTimeout((() => { + i && (i = !1, t = !1, this._onDidBlur.fire()) + }), 0)) + }; + this._refreshStateHandler = () => { + U(document.activeElement, e) !== t && (t ? o() : n()) + }, this._register(f(e, ie.FOCUS, n, !0)), this._register(f(e, ie.BLUR, + o, !0)) + } + } + + function ae(e) { + return new se(e) + } + + function le(e, ...t) { + if (e.append(...t), 1 === t.length && "string" != typeof t[0]) return t[ + 0] + } + + function de(e, t) { + return e.insertBefore(t, e.firstChild), t + } + + function ce(e, ...t) { + e.innerText = "", le(e, ...t) + } + const he = /([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/; + var ue; + + function ge(e, t, i, ...n) { + let o = he.exec(t); + if (!o) throw new Error("Bad use of emmet"); + i = Object.assign({}, i || {}); + let r, s = o[1] || "div"; + return r = e !== ue.HTML ? document.createElementNS(e, s) : document.createElement( + s), o[3] && (r.id = o[3]), o[4] && (r.className = o[4].replace(/\./g, + " ").trim()), Object.keys(i).forEach((e => { + const t = i[e]; + void 0 !== t && (/^on\w+$/.test(e) ? r[e] = t : "selected" === e ? t && + r.setAttribute(e, "true") : r.setAttribute(e, t)) + })), r.append(...n), r + } + + function pe(e, t, ...i) { + return ge(ue.HTML, e, t, ...i) + } + + function me(...e) { + for (let t of e) t.style.display = "", t.removeAttribute("aria-hidden") + } + + function fe(...e) { + for (let t of e) t.style.display = "none", t.setAttribute("aria-hidden", + "true") + } + + function _e(e) { + return Array.prototype.slice.call(document.getElementsByTagName(e), 0) + } + + function be(e) { + const t = window.devicePixelRatio * e; + return Math.max(1, Math.floor(t)) / window.devicePixelRatio + } + + function ve(e) { + window.open(e, "_blank", "noopener") + } + + function we(e) { + const t = () => { + e(), i = k(t) + }; + let i = k(t); + return (0, c.OF)((() => i.dispose())) + } + + function Ce(e) { + return e ? + `url('${h.Gi.asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')` : + "url('')" + } + + function ye(e) { + return `'${e.replace(/'/g,"%27")}'` + }! function(e) { + e.HTML = "http://www.w3.org/1999/xhtml", e.SVG = + "http://www.w3.org/2000/svg" + }(ue || (ue = {})), pe.SVG = function(e, t, ...i) { + return ge(ue.SVG, e, t, ...i) + }, h.WX.setPreferredWebSchema(/^https:/.test(window.location.href) ? + "https" : "http"); + class Se extends d.Q5 { + constructor() { + super(), this._subscriptions = new c.SL, this._keyStatus = { + altKey: !1, + shiftKey: !1, + ctrlKey: !1, + metaKey: !1 + }, this._subscriptions.add(f(window, "keydown", (e => { + if (e.defaultPrevented) return; + const t = new r.y(e); + if (6 !== t.keyCode || !e.repeat) { + if (e.altKey && !this._keyStatus.altKey) this._keyStatus.lastKeyPressed = + "alt"; + else if (e.ctrlKey && !this._keyStatus.ctrlKey) this._keyStatus + .lastKeyPressed = "ctrl"; + else if (e.metaKey && !this._keyStatus.metaKey) this._keyStatus + .lastKeyPressed = "meta"; + else if (e.shiftKey && !this._keyStatus.shiftKey) this._keyStatus + .lastKeyPressed = "shift"; + else { + if (6 === t.keyCode) return; + this._keyStatus.lastKeyPressed = void 0 + } + this._keyStatus.altKey = e.altKey, this._keyStatus.ctrlKey = e.ctrlKey, + this._keyStatus.metaKey = e.metaKey, this._keyStatus.shiftKey = + e.shiftKey, this._keyStatus.lastKeyPressed && (this._keyStatus + .event = e, this.fire(this._keyStatus)) + } + }), !0)), this._subscriptions.add(f(window, "keyup", (e => { + e.defaultPrevented || (!e.altKey && this._keyStatus.altKey ? + this._keyStatus.lastKeyReleased = "alt" : !e.ctrlKey && this._keyStatus + .ctrlKey ? this._keyStatus.lastKeyReleased = "ctrl" : !e.metaKey && + this._keyStatus.metaKey ? this._keyStatus.lastKeyReleased = + "meta" : !e.shiftKey && this._keyStatus.shiftKey ? this._keyStatus + .lastKeyReleased = "shift" : this._keyStatus.lastKeyReleased = + void 0, this._keyStatus.lastKeyPressed !== this._keyStatus.lastKeyReleased && + (this._keyStatus.lastKeyPressed = void 0), this._keyStatus.altKey = + e.altKey, this._keyStatus.ctrlKey = e.ctrlKey, this._keyStatus + .metaKey = e.metaKey, this._keyStatus.shiftKey = e.shiftKey, + this._keyStatus.lastKeyReleased && (this._keyStatus.event = e, + this.fire(this._keyStatus))) + }), !0)), this._subscriptions.add(f(document.body, "mousedown", (() => { + this._keyStatus.lastKeyPressed = void 0 + }), !0)), this._subscriptions.add(f(document.body, "mouseup", (() => { + this._keyStatus.lastKeyPressed = void 0 + }), !0)), this._subscriptions.add(f(document.body, "mousemove", (e => { + e.buttons && (this._keyStatus.lastKeyPressed = void 0) + }), !0)), this._subscriptions.add(f(window, "blur", (() => { + this.resetKeyStatus() + }))) + } + get keyStatus() { + return this._keyStatus + } + resetKeyStatus() { + this.doResetKeyStatus(), this.fire(this._keyStatus) + } + doResetKeyStatus() { + this._keyStatus = { + altKey: !1, + shiftKey: !1, + ctrlKey: !1, + metaKey: !1 + } + } + static getInstance() { + return Se.instance || (Se.instance = new Se), Se.instance + } + dispose() { + super.dispose(), this._subscriptions.dispose() + } + } + + function xe(e, t) { + const i = window.matchMedia(e); + "function" == typeof i.addEventListener ? i.addEventListener("change", t) : + i.addListener(t) + } + }, + 4850: (e, t, i) => { + "use strict"; + i.d(t, { + Y: () => o, + p: () => r + }); + var n = i(4669); + class o { + constructor(e, t, i) { + const o = e => this.emitter.fire(e); + this.emitter = new n.Q5({ + onFirstListenerAdd: () => e.addEventListener(t, o, i), + onLastListenerRemove: () => e.removeEventListener(t, o, i) + }) + } + get event() { + return this.emitter.event + } + dispose() { + this.emitter.dispose() + } + } + + function r(e) { + return e.preventDefault(), e.stopPropagation(), e + } + }, + 8626: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => n, + X: () => o + }); + class n { + constructor(e) { + this.domNode = e, this._maxWidth = -1, this._width = -1, this._height = - + 1, this._top = -1, this._left = -1, this._bottom = -1, this._right = - + 1, this._fontFamily = "", this._fontWeight = "", this._fontSize = -1, + this._fontFeatureSettings = "", this._lineHeight = -1, this._letterSpacing = - + 100, this._className = "", this._display = "", this._position = "", + this._visibility = "", this._backgroundColor = "", this._layerHint = ! + 1, this._contain = "none", this._boxShadow = "" + } + setMaxWidth(e) { + this._maxWidth !== e && (this._maxWidth = e, this.domNode.style.maxWidth = + this._maxWidth + "px") + } + setWidth(e) { + this._width !== e && (this._width = e, this.domNode.style.width = this + ._width + "px") + } + setHeight(e) { + this._height !== e && (this._height = e, this.domNode.style.height = + this._height + "px") + } + setTop(e) { + this._top !== e && (this._top = e, this.domNode.style.top = this._top + + "px") + } + unsetTop() { + -1 !== this._top && (this._top = -1, this.domNode.style.top = "") + } + setLeft(e) { + this._left !== e && (this._left = e, this.domNode.style.left = this._left + + "px") + } + setBottom(e) { + this._bottom !== e && (this._bottom = e, this.domNode.style.bottom = + this._bottom + "px") + } + setRight(e) { + this._right !== e && (this._right = e, this.domNode.style.right = this + ._right + "px") + } + setFontFamily(e) { + this._fontFamily !== e && (this._fontFamily = e, this.domNode.style.fontFamily = + this._fontFamily) + } + setFontWeight(e) { + this._fontWeight !== e && (this._fontWeight = e, this.domNode.style.fontWeight = + this._fontWeight) + } + setFontSize(e) { + this._fontSize !== e && (this._fontSize = e, this.domNode.style.fontSize = + this._fontSize + "px") + } + setFontFeatureSettings(e) { + this._fontFeatureSettings !== e && (this._fontFeatureSettings = e, + this.domNode.style.fontFeatureSettings = this._fontFeatureSettings) + } + setLineHeight(e) { + this._lineHeight !== e && (this._lineHeight = e, this.domNode.style.lineHeight = + this._lineHeight + "px") + } + setLetterSpacing(e) { + this._letterSpacing !== e && (this._letterSpacing = e, this.domNode.style + .letterSpacing = this._letterSpacing + "px") + } + setClassName(e) { + this._className !== e && (this._className = e, this.domNode.className = + this._className) + } + toggleClassName(e, t) { + this.domNode.classList.toggle(e, t), this._className = this.domNode.className + } + setDisplay(e) { + this._display !== e && (this._display = e, this.domNode.style.display = + this._display) + } + setPosition(e) { + this._position !== e && (this._position = e, this.domNode.style.position = + this._position) + } + setVisibility(e) { + this._visibility !== e && (this._visibility = e, this.domNode.style.visibility = + this._visibility) + } + setBackgroundColor(e) { + this._backgroundColor !== e && (this._backgroundColor = e, this.domNode + .style.backgroundColor = this._backgroundColor) + } + setLayerHinting(e) { + this._layerHint !== e && (this._layerHint = e, this.domNode.style.transform = + this._layerHint ? "translate3d(0px, 0px, 0px)" : "") + } + setBoxShadow(e) { + this._boxShadow !== e && (this._boxShadow = e, this.domNode.style.boxShadow = + e) + } + setContain(e) { + this._contain !== e && (this._contain = e, this.domNode.style.contain = + this._contain) + } + setAttribute(e, t) { + this.domNode.setAttribute(e, t) + } + removeAttribute(e) { + this.domNode.removeAttribute(e) + } + appendChild(e) { + this.domNode.appendChild(e.domNode) + } + removeChild(e) { + this.domNode.removeChild(e.domNode) + } + } + + function o(e) { + return new n(e) + } + }, + 8764: (e, t, i) => { + "use strict"; + i.d(t, { + IY: () => o, + BO: () => r, + az: () => s + }); + var n = i(5321); + + function o(e, t = {}) { + const i = s(t); + return i.textContent = e, i + } + + function r(e, t = {}) { + const i = s(t); + return l(i, function(e, t) { + const i = { + type: 1, + children: [] + }; + let n = 0, + o = i; + const r = [], + s = new a(e); + for (; !s.eos();) { + let e = s.next(); + const i = "\\" === e && 0 !== d(s.peek(), t); + if (i && (e = s.next()), i || 0 === d(e, t) || e !== s.peek()) + if ("\n" === e) 2 === o.type && (o = r.pop()), o.children.push({ + type: 8 + }); + else if (2 !== o.type) { + const t = { + type: 2, + content: e + }; + o.children.push(t), r.push(o), o = t + } else o.content += e; + else { + s.advance(), 2 === o.type && (o = r.pop()); + const i = d(e, t); + if (o.type === i || 5 === o.type && 6 === i) o = r.pop(); + else { + const e = { + type: i, + children: [] + }; + 5 === i && (e.index = n, n++), o.children.push(e), r.push(o), o = + e + } + } + } + return 2 === o.type && (o = r.pop()), r.length, i + }(e, !!t.renderCodeSegments), t.actionHandler, t.renderCodeSegments), i + } + + function s(e) { + const t = e.inline ? "span" : "div", + i = document.createElement(t); + return e.className && (i.className = e.className), i + } + class a { + constructor(e) { + this.source = e, this.index = 0 + } + eos() { + return this.index >= this.source.length + } + next() { + const e = this.peek(); + return this.advance(), e + } + peek() { + return this.source[this.index] + } + advance() { + this.index++ + } + } + + function l(e, t, i, o) { + let r; + if (2 === t.type) r = document.createTextNode(t.content || ""); + else if (3 === t.type) r = document.createElement("b"); + else if (4 === t.type) r = document.createElement("i"); + else if (7 === t.type && o) r = document.createElement("code"); + else if (5 === t.type && i) { + const e = document.createElement("a"); + e.href = "#", i.disposables.add(n.mu(e, "click", (e => { + i.callback(String(t.index), e) + }))), r = e + } else 8 === t.type ? r = document.createElement("br") : 1 === t.type && + (r = e); + r && e !== r && e.appendChild(r), r && Array.isArray(t.children) && t.children + .forEach((e => { + l(r, e, i, o) + })) + } + + function d(e, t) { + switch (e) { + case "*": + return 3; + case "_": + return 4; + case "[": + return 5; + case "]": + return 6; + case "`": + return t ? 7 : 0; + default: + return 0 + } + } + }, + 7974: (e, t, i) => { + "use strict"; + i.d(t, { + e: () => l, + Z: () => d + }); + var n = i(5321), + o = i(262), + r = i(3938), + s = i(5976), + a = i(1432); + + function l(e, t) { + let i = new r.n(t); + return i.preventDefault(), { + leftButton: i.leftButton, + buttons: i.buttons, + posx: i.posx, + posy: i.posy + } + } + class d { + constructor() { + this._hooks = new s.SL, this._mouseMoveEventMerger = null, this._mouseMoveCallback = + null, this._onStopCallback = null + } + dispose() { + this.stopMonitoring(!1), this._hooks.dispose() + } + stopMonitoring(e, t) { + if (!this.isMonitoring()) return; + this._hooks.clear(), this._mouseMoveEventMerger = null, this._mouseMoveCallback = + null; + const i = this._onStopCallback; + this._onStopCallback = null, e && i && i(t) + } + isMonitoring() { + return !!this._mouseMoveEventMerger + } + startMonitoring(e, t, i, s, l) { + if (this.isMonitoring()) return; + this._mouseMoveEventMerger = i, this._mouseMoveCallback = s, this._onStopCallback = + l; + const d = o.E.getSameOriginWindowChain(), + c = a.gn ? "pointermove" : "mousemove", + h = d.map((e => e.window.document)), + u = n.Ay(e); + u && h.unshift(u); + for (const e of h) this._hooks.add(n.Y_(e, c, (e => { + e.buttons === t ? this._mouseMoveCallback(e) : this.stopMonitoring(! + 0) + }), ((e, t) => this._mouseMoveEventMerger(e, t)))), this._hooks.add(n + .nm(e, "mouseup", (e => this.stopMonitoring(!0)))); + if (o.E.hasDifferentOriginAncestor()) { + let e = d[d.length - 1]; + this._hooks.add(n.nm(e.window.document, "mouseout", (e => { + "html" === new r.n(e).target.tagName.toLowerCase() && this.stopMonitoring(! + 0) + }))), this._hooks.add(n.nm(e.window.document, "mouseover", (e => { + "html" === new r.n(e).target.tagName.toLowerCase() && this.stopMonitoring(! + 0) + }))), this._hooks.add(n.nm(e.window.document.body, "mouseleave", (e => { + this.stopMonitoring(!0) + }))) + } + } + } + }, + 262: (e, t, i) => { + "use strict"; + i.d(t, { + E: () => s + }); + let n = !1, + o = null; + + function r(e) { + if (!e.parent || e.parent === e) return null; + try { + let t = e.location, + i = e.parent.location; + if ("null" !== t.origin && "null" !== i.origin && (t.protocol !== i.protocol || + t.hostname !== i.hostname || t.port !== i.port)) return n = !0, null + } catch (e) { + return n = !0, null + } + return e.parent + } + class s { + static getSameOriginWindowChain() { + if (!o) { + o = []; + let e, t = window; + do { + e = r(t), e ? o.push({ + window: t, + iframeElement: t.frameElement || null + }) : o.push({ + window: t, + iframeElement: null + }), t = e + } while (t) + } + return o.slice(0) + } + static hasDifferentOriginAncestor() { + return o || this.getSameOriginWindowChain(), n + } + static getPositionOfChildWindowRelativeToAncestorWindow(e, t) { + if (!t || e === t) return { + top: 0, + left: 0 + }; + let i = 0, + n = 0, + o = this.getSameOriginWindowChain(); + for (const e of o) { + if (i += e.window.scrollY, n += e.window.scrollX, e.window === t) + break; + if (!e.iframeElement) break; + let o = e.iframeElement.getBoundingClientRect(); + i += o.top, n += o.left + } + return { + top: i, + left: n + } + } + } + }, + 9069: (e, t, i) => { + "use strict"; + i.d(t, { + y: () => c + }); + var n = i(6268), + o = i(2258), + r = i(1432); + let s = new Array(230), + a = new Array(112); + ! function() { + for (let e = 0; e < a.length; e++) a[e] = -1; + + function e(e, t) { + s[e] = t, a[t] = e + } + e(3, 7), e(8, 1), e(9, 2), e(13, 3), e(16, 4), e(17, 5), e(18, 6), e(19, + 7), e(20, 8), e(27, 9), e(32, 10), e(33, 11), e(34, 12), e(35, 13), e( + 36, 14), e(37, 15), e(38, 16), e(39, 17), e(40, 18), e(45, 19), e(46, + 20), e(48, 21), e(49, 22), e(50, 23), e(51, 24), e(52, 25), e(53, 26), + e(54, 27), e(55, 28), e(56, 29), e(57, 30), e(65, 31), e(66, 32), e(67, + 33), e(68, 34), e(69, 35), e(70, 36), e(71, 37), e(72, 38), e(73, 39), + e(74, 40), e(75, 41), e(76, 42), e(77, 43), e(78, 44), e(79, 45), e(80, + 46), e(81, 47), e(82, 48), e(83, 49), e(84, 50), e(85, 51), e(86, 52), + e(87, 53), e(88, 54), e(89, 55), e(90, 56), e(93, 58), e(96, 93), e(97, + 94), e(98, 95), e(99, 96), e(100, 97), e(101, 98), e(102, 99), e(103, + 100), e(104, 101), e(105, 102), e(106, 103), e(107, 104), e(108, 105), + e(109, 106), e(110, 107), e(111, 108), e(112, 59), e(113, 60), e(114, + 61), e(115, 62), e(116, 63), e(117, 64), e(118, 65), e(119, 66), e(120, + 67), e(121, 68), e(122, 69), e(123, 70), e(124, 71), e(125, 72), e(126, + 73), e(127, 74), e(128, 75), e(129, 76), e(130, 77), e(144, 78), e(145, + 79), e(186, 80), e(187, 81), e(188, 82), e(189, 83), e(190, 84), e(191, + 85), e(192, 86), e(193, 110), e(194, 111), e(219, 87), e(220, 88), e( + 221, 89), e(222, 90), e(223, 91), e(226, 92), e(229, 109), n.vU ? (e( + 59, 80), e(107, 81), e(109, 83), r.dz && e(224, 57)) : n.Pf && (e(91, + 57), r.dz ? e(93, 57) : e(92, 57)) + }(); + const l = r.dz ? 256 : 2048, + d = r.dz ? 2048 : 256; + class c { + constructor(e) { + this._standardKeyboardEventBrand = !0; + let t = e; + this.browserEvent = t, this.target = t.target, this.ctrlKey = t.ctrlKey, + this.shiftKey = t.shiftKey, this.altKey = t.altKey, this.metaKey = t.metaKey, + this.keyCode = function(e) { + if (e.charCode) { + let t = String.fromCharCode(e.charCode).toUpperCase(); + return o.kL.fromString(t) + } + return s[e.keyCode] || 0 + }(t), this.code = t.code, this.ctrlKey = this.ctrlKey || 5 === this.keyCode, + this.altKey = this.altKey || 6 === this.keyCode, this.shiftKey = this + .shiftKey || 4 === this.keyCode, this.metaKey = this.metaKey || 57 === + this.keyCode, this._asKeybinding = this._computeKeybinding(), this._asRuntimeKeybinding = + this._computeRuntimeKeybinding() + } + preventDefault() { + this.browserEvent && this.browserEvent.preventDefault && this.browserEvent + .preventDefault() + } + stopPropagation() { + this.browserEvent && this.browserEvent.stopPropagation && this.browserEvent + .stopPropagation() + } + toKeybinding() { + return this._asRuntimeKeybinding + } + equals(e) { + return this._asKeybinding === e + } + _computeKeybinding() { + let e = 0; + 5 !== this.keyCode && 4 !== this.keyCode && 6 !== this.keyCode && 57 !== + this.keyCode && (e = this.keyCode); + let t = 0; + return this.ctrlKey && (t |= l), this.altKey && (t |= 512), this.shiftKey && + (t |= 1024), this.metaKey && (t |= d), t |= e, t + } + _computeRuntimeKeybinding() { + let e = 0; + return 5 !== this.keyCode && 4 !== this.keyCode && 6 !== this.keyCode && + 57 !== this.keyCode && (e = this.keyCode), new o.QC(this.ctrlKey, + this.shiftKey, this.altKey, this.metaKey, e) + } + } + }, + 3938: (e, t, i) => { + "use strict"; + i.d(t, { + n: () => s, + q: () => a + }); + var n = i(6268), + o = i(262), + r = i(1432); + class s { + constructor(e) { + this.timestamp = Date.now(), this.browserEvent = e, this.leftButton = + 0 === e.button, this.middleButton = 1 === e.button, this.rightButton = + 2 === e.button, this.buttons = e.buttons, this.target = e.target, + this.detail = e.detail || 1, "dblclick" === e.type && (this.detail = + 2), this.ctrlKey = e.ctrlKey, this.shiftKey = e.shiftKey, this.altKey = + e.altKey, this.metaKey = e.metaKey, "number" == typeof e.pageX ? ( + this.posx = e.pageX, this.posy = e.pageY) : (this.posx = e.clientX + + document.body.scrollLeft + document.documentElement.scrollLeft, this + .posy = e.clientY + document.body.scrollTop + document.documentElement + .scrollTop); + let t = o.E.getPositionOfChildWindowRelativeToAncestorWindow(self, e.view); + this.posx -= t.left, this.posy -= t.top + } + preventDefault() { + this.browserEvent.preventDefault() + } + stopPropagation() { + this.browserEvent.stopPropagation() + } + } + class a { + constructor(e, t = 0, i = 0) { + if (this.browserEvent = e || null, this.target = e ? e.target || e.targetNode || + e.srcElement : null, this.deltaY = i, this.deltaX = t, e) { + let t = e, + i = e; + if (void 0 !== t.wheelDeltaY) this.deltaY = t.wheelDeltaY / 120; + else if (void 0 !== i.VERTICAL_AXIS && i.axis === i.VERTICAL_AXIS) + this.deltaY = -i.detail / 3; + else if ("wheel" === e.type) { + const t = e; + t.deltaMode === t.DOM_DELTA_LINE ? n.vU && !r.dz ? this.deltaY = -e.deltaY / + 3 : this.deltaY = -e.deltaY : this.deltaY = -e.deltaY / 40 + } + if (void 0 !== t.wheelDeltaX) n.G6 && r.ED ? this.deltaX = -t.wheelDeltaX / + 120 : this.deltaX = t.wheelDeltaX / 120; + else if (void 0 !== i.HORIZONTAL_AXIS && i.axis === i.HORIZONTAL_AXIS) + this.deltaX = -e.detail / 3; + else if ("wheel" === e.type) { + const t = e; + t.deltaMode === t.DOM_DELTA_LINE ? n.vU && !r.dz ? this.deltaX = -e.deltaX / + 3 : this.deltaX = -e.deltaX : this.deltaX = -e.deltaX / 40 + } + 0 === this.deltaY && 0 === this.deltaX && e.wheelDelta && (this.deltaY = + e.wheelDelta / 120) + } + } + preventDefault() { + this.browserEvent && this.browserEvent.preventDefault() + } + stopPropagation() { + this.browserEvent && this.browserEvent.stopPropagation() + } + } + }, + 553: (e, t, i) => { + "use strict"; + i.d(t, { + t: () => n, + o: () => l + }); + var n, o = i(5321), + r = i(9488), + s = i(9898), + a = i(5976); + ! function(e) { + e.Tap = "-monaco-gesturetap", e.Change = "-monaco-gesturechange", e.Start = + "-monaco-gesturestart", e.End = "-monaco-gesturesend", e.Contextmenu = + "-monaco-gesturecontextmenu" + }(n || (n = {})); + class l extends a.JT { + constructor() { + super(), this.dispatched = !1, this.activeTouches = {}, this.handle = + null, this.targets = [], this.ignoreTargets = [], this._lastSetTapCountTime = + 0, this._register(o.nm(document, "touchstart", (e => this.onTouchStart( + e)), { + passive: !1 + })), this._register(o.nm(document, "touchend", (e => this.onTouchEnd( + e)))), this._register(o.nm(document, "touchmove", (e => this.onTouchMove( + e)), { + passive: !1 + })) + } + static addTarget(e) { + return l.isTouchDevice() ? (l.INSTANCE || (l.INSTANCE = new l), l.INSTANCE + .targets.push(e), { + dispose: () => { + l.INSTANCE.targets = l.INSTANCE.targets.filter((t => t !== e)) + } + }) : a.JT.None + } + static ignoreTarget(e) { + return l.isTouchDevice() ? (l.INSTANCE || (l.INSTANCE = new l), l.INSTANCE + .ignoreTargets.push(e), { + dispose: () => { + l.INSTANCE.ignoreTargets = l.INSTANCE.ignoreTargets.filter((t => + t !== e)) + } + }) : a.JT.None + } + static isTouchDevice() { + return "ontouchstart" in window || navigator.maxTouchPoints > 0 + } + dispose() { + this.handle && (this.handle.dispose(), this.handle = null), super.dispose() + } + onTouchStart(e) { + let t = Date.now(); + this.handle && (this.handle.dispose(), this.handle = null); + for (let i = 0, o = e.targetTouches.length; i < o; i++) { + let o = e.targetTouches.item(i); + this.activeTouches[o.identifier] = { + id: o.identifier, + initialTarget: o.target, + initialTimeStamp: t, + initialPageX: o.pageX, + initialPageY: o.pageY, + rollingTimestamps: [t], + rollingPageX: [o.pageX], + rollingPageY: [o.pageY] + }; + let r = this.newGestureEvent(n.Start, o.target); + r.pageX = o.pageX, r.pageY = o.pageY, this.dispatchEvent(r) + } + this.dispatched && (e.preventDefault(), e.stopPropagation(), this.dispatched = ! + 1) + } + onTouchEnd(e) { + let t = Date.now(), + i = Object.keys(this.activeTouches).length; + for (let o = 0, s = e.changedTouches.length; o < s; o++) { + let s = e.changedTouches.item(o); + if (!this.activeTouches.hasOwnProperty(String(s.identifier))) { + console.warn("move of an UNKNOWN touch", s); + continue + } + let a = this.activeTouches[s.identifier], + d = Date.now() - a.initialTimeStamp; + if (d < l.HOLD_DELAY && Math.abs(a.initialPageX - r.Gb(a.rollingPageX)) < + 30 && Math.abs(a.initialPageY - r.Gb(a.rollingPageY)) < 30) { + let e = this.newGestureEvent(n.Tap, a.initialTarget); + e.pageX = r.Gb(a.rollingPageX), e.pageY = r.Gb(a.rollingPageY), + this.dispatchEvent(e) + } else if (d >= l.HOLD_DELAY && Math.abs(a.initialPageX - r.Gb(a.rollingPageX)) < + 30 && Math.abs(a.initialPageY - r.Gb(a.rollingPageY)) < 30) { + let e = this.newGestureEvent(n.Contextmenu, a.initialTarget); + e.pageX = r.Gb(a.rollingPageX), e.pageY = r.Gb(a.rollingPageY), + this.dispatchEvent(e) + } else if (1 === i) { + let e = r.Gb(a.rollingPageX), + i = r.Gb(a.rollingPageY), + n = r.Gb(a.rollingTimestamps) - a.rollingTimestamps[0], + o = e - a.rollingPageX[0], + s = i - a.rollingPageY[0]; + const l = this.targets.filter((e => a.initialTarget instanceof Node && + e.contains(a.initialTarget))); + this.inertia(l, t, Math.abs(o) / n, o > 0 ? 1 : -1, e, Math.abs(s) / + n, s > 0 ? 1 : -1, i) + } + this.dispatchEvent(this.newGestureEvent(n.End, a.initialTarget)), + delete this.activeTouches[s.identifier] + } + this.dispatched && (e.preventDefault(), e.stopPropagation(), this.dispatched = ! + 1) + } + newGestureEvent(e, t) { + let i = document.createEvent("CustomEvent"); + return i.initEvent(e, !1, !0), i.initialTarget = t, i.tapCount = 0, i + } + dispatchEvent(e) { + if (e.type === n.Tap) { + const t = (new Date).getTime(); + let i = 0; + i = t - this._lastSetTapCountTime > l.CLEAR_TAP_COUNT_TIME ? 1 : 2, + this._lastSetTapCountTime = t, e.tapCount = i + } else e.type !== n.Change && e.type !== n.Contextmenu || (this._lastSetTapCountTime = + 0); + for (let t = 0; t < this.ignoreTargets.length; t++) + if (e.initialTarget instanceof Node && this.ignoreTargets[t].contains( + e.initialTarget)) return; + this.targets.forEach((t => { + e.initialTarget instanceof Node && t.contains(e.initialTarget) && + (t.dispatchEvent(e), this.dispatched = !0) + })) + } + inertia(e, t, i, r, s, a, d, c) { + this.handle = o.jL((() => { + let o = Date.now(), + h = o - t, + u = 0, + g = 0, + p = !0; + i += l.SCROLL_FRICTION * h, a += l.SCROLL_FRICTION * h, i > 0 && + (p = !1, u = r * i * h), a > 0 && (p = !1, g = d * a * h); + let m = this.newGestureEvent(n.Change); + m.translationX = u, m.translationY = g, e.forEach((e => e.dispatchEvent( + m))), p || this.inertia(e, o, i, r, s + u, a, d, c + g) + })) + } + onTouchMove(e) { + let t = Date.now(); + for (let i = 0, o = e.changedTouches.length; i < o; i++) { + let o = e.changedTouches.item(i); + if (!this.activeTouches.hasOwnProperty(String(o.identifier))) { + console.warn("end of an UNKNOWN touch", o); + continue + } + let s = this.activeTouches[o.identifier], + a = this.newGestureEvent(n.Change, s.initialTarget); + a.translationX = o.pageX - r.Gb(s.rollingPageX), a.translationY = o.pageY - + r.Gb(s.rollingPageY), a.pageX = o.pageX, a.pageY = o.pageY, this.dispatchEvent( + a), s.rollingPageX.length > 3 && (s.rollingPageX.shift(), s.rollingPageY + .shift(), s.rollingTimestamps.shift()), s.rollingPageX.push(o.pageX), + s.rollingPageY.push(o.pageY), s.rollingTimestamps.push(t) + } + this.dispatched && (e.preventDefault(), e.stopPropagation(), this.dispatched = ! + 1) + } + } + l.SCROLL_FRICTION = -.005, l.HOLD_DELAY = 700, l.CLEAR_TAP_COUNT_TIME = + 400, + function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + r > 3 && s && Object.defineProperty(t, i, s) + }([s.H], l, "isTouchDevice", null) + }, + 6033: (e, t, i) => { + "use strict"; + i.d(t, { + Y: () => u, + g: () => g + }); + var n = i(6268), + o = i(3547), + r = i(5321), + s = i(553), + a = i(4741), + l = i(5976), + d = i(1432), + c = i(8401), + h = (i(5408), i(3580)); + class u extends l.JT { + constructor(e, t, i = {}) { + super(), this.options = i, this._context = e || this, this._action = + t, t instanceof a.aU && this._register(t.onDidChange((e => { + this.element && this.handleActionChangeEvent(e) + }))) + } + handleActionChangeEvent(e) { + void 0 !== e.enabled && this.updateEnabled(), void 0 !== e.checked && + this.updateChecked(), void 0 !== e.class && this.updateClass(), void 0 !== + e.label && (this.updateLabel(), this.updateTooltip()), void 0 !== e.tooltip && + this.updateTooltip() + } + get actionRunner() { + return this._actionRunner || (this._actionRunner = this._register(new a + .Wi)), this._actionRunner + } + set actionRunner(e) { + this._actionRunner = e + } + getAction() { + return this._action + } + isEnabled() { + return this._action.enabled + } + setActionContext(e) { + this._context = e + } + render(e) { + const t = this.element = e; + this._register(s.o.addTarget(e)); + const i = this.options && this.options.draggable; + i && (e.draggable = !0, n.vU && this._register((0, r.nm)(e, r.tw.DRAG_START, ( + e => { + var t; + return null === (t = e.dataTransfer) || void 0 === t ? void 0 : + t.setData(o.go.TEXT, this._action.label) + })))), this._register((0, r.nm)(t, s.t.Tap, (e => this.onClick(e, ! + 0)))), this._register((0, r.nm)(t, r.tw.MOUSE_DOWN, (e => { + i || r.zB.stop(e, !0), this._action.enabled && 0 === e.button && + t.classList.add("active") + }))), d.dz && this._register((0, r.nm)(t, r.tw.CONTEXT_MENU, (e => { + 0 === e.button && !0 === e.ctrlKey && this.onClick(e) + }))), this._register((0, r.nm)(t, r.tw.CLICK, (e => { + r.zB.stop(e, !0), this.options && this.options.isMenu || d.xS((() => + this.onClick(e))) + }))), this._register((0, r.nm)(t, r.tw.DBLCLICK, (e => { + r.zB.stop(e, !0) + }))), [r.tw.MOUSE_UP, r.tw.MOUSE_OUT].forEach((e => { + this._register((0, r.nm)(t, e, (e => { + r.zB.stop(e), t.classList.remove("active") + }))) + })) + } + onClick(e, t = !1) { + var i; + r.zB.stop(e, !0); + const n = c.Jp(this._context) ? (null === (i = this.options) || void 0 === + i ? void 0 : i.useEventAsContext) ? e : { + preserveFocus: t + } : this._context; + this.actionRunner.run(this._action, n) + } + focus() { + this.element && (this.element.tabIndex = 0, this.element.focus(), + this.element.classList.add("focused")) + } + blur() { + this.element && (this.element.blur(), this.element.tabIndex = -1, + this.element.classList.remove("focused")) + } + setFocusable(e) { + this.element && (this.element.tabIndex = e ? 0 : -1) + } + get trapsArrowNavigation() { + return !1 + } + updateEnabled() {} + updateLabel() {} + updateTooltip() {} + updateClass() {} + updateChecked() {} + dispose() { + this.element && (this.element.remove(), this.element = void 0), super + .dispose() + } + } + class g extends u { + constructor(e, t, i = {}) { + super(e, t, i), this.options = i, this.options.icon = void 0 !== i.icon && + i.icon, this.options.label = void 0 === i.label || i.label, this.cssClass = + "" + } + render(e) { + super.render(e), this.element && (this.label = (0, r.R3)(this.element, ( + 0, r.$)("a.action-label"))), this.label && (this._action.id === a.Z0 + .ID ? this.label.setAttribute("role", "presentation") : this.options + .isMenu ? this.label.setAttribute("role", "menuitem") : this.label.setAttribute( + "role", "button")), this.options.label && this.options.keybinding && + this.element && ((0, r.R3)(this.element, (0, r.$)("span.keybinding")) + .textContent = this.options.keybinding), this.updateClass(), this.updateLabel(), + this.updateTooltip(), this.updateEnabled(), this.updateChecked() + } + focus() { + this.label && (this.label.tabIndex = 0, this.label.focus()) + } + blur() { + this.label && (this.label.tabIndex = -1) + } + setFocusable(e) { + this.label && (this.label.tabIndex = e ? 0 : -1) + } + updateLabel() { + this.options.label && this.label && (this.label.textContent = this.getAction() + .label) + } + updateTooltip() { + let e = null; + this.getAction().tooltip ? e = this.getAction().tooltip : !this.options + .label && this.getAction().label && this.options.icon && (e = this.getAction() + .label, this.options.keybinding && (e = h.N({ + key: "titleLabel", + comment: ["action title", "action keybinding"] + }, "{0} ({1})", e, this.options.keybinding))), e && this.label && ( + this.label.title = e) + } + updateClass() { + this.cssClass && this.label && this.label.classList.remove(...this.cssClass + .split(" ")), this.options.icon ? (this.cssClass = this.getAction().class, + this.label && (this.label.classList.add("codicon"), this.cssClass && + this.label.classList.add(...this.cssClass.split(" "))), this.updateEnabled() + ) : this.label && this.label.classList.remove("codicon") + } + updateEnabled() { + this.getAction().enabled ? (this.label && (this.label.removeAttribute( + "aria-disabled"), this.label.classList.remove("disabled")), this.element && + this.element.classList.remove("disabled")) : (this.label && (this.label + .setAttribute("aria-disabled", "true"), this.label.classList.add( + "disabled")), this.element && this.element.classList.add( + "disabled")) + } + updateChecked() { + this.label && (this.getAction().checked ? this.label.classList.add( + "checked") : this.label.classList.remove("checked")) + } + } + }, + 317: (e, t, i) => { + "use strict"; + i.d(t, { + o: () => h + }); + var n = i(5321), + o = i(9069), + r = i(6033), + s = i(4741), + a = i(4669), + l = i(5976), + d = i(8401), + c = (i(5408), function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }); + class h extends l.JT { + constructor(e, t = {}) { + var i, l, d, c, h, u; + let g, p; + switch (super(), this.triggerKeyDown = !1, this.focusable = !0, this._onDidBlur = + this._register(new a.Q5), this.onDidBlur = this._onDidBlur.event, + this._onDidCancel = this._register(new a.Q5({ + onFirstListenerAdd: () => this.cancelHasListener = !0 + })), this.onDidCancel = this._onDidCancel.event, this.cancelHasListener = ! + 1, this._onDidRun = this._register(new a.Q5), this.onDidRun = this._onDidRun + .event, this._onBeforeRun = this._register(new a.Q5), this.onBeforeRun = + this._onBeforeRun.event, this.options = t, this._context = null !== + (i = t.context) && void 0 !== i ? i : null, this._orientation = null !== + (l = this.options.orientation) && void 0 !== l ? l : 0, this._triggerKeys = { + keyDown: null !== (c = null === (d = this.options.triggerKeys) || + void 0 === d ? void 0 : d.keyDown) && void 0 !== c && c, + keys: null !== (u = null === (h = this.options.triggerKeys) || void 0 === + h ? void 0 : h.keys) && void 0 !== u ? u : [3, 10] + }, this.options.actionRunner ? this._actionRunner = this.options.actionRunner : + (this._actionRunner = new s.Wi, this._register(this._actionRunner)), + this._register(this._actionRunner.onDidRun((e => this._onDidRun.fire( + e)))), this._register(this._actionRunner.onBeforeRun((e => this._onBeforeRun + .fire(e)))), this._actionIds = [], this.viewItems = [], this.focusedItem = + void 0, this.domNode = document.createElement("div"), this.domNode.className = + "monaco-action-bar", !1 !== t.animated && this.domNode.classList.add( + "animated"), this._orientation) { + case 0: + g = [15], p = [17]; + break; + case 1: + g = [16], p = [18], this.domNode.className += " vertical" + } + this._register(n.nm(this.domNode, n.tw.KEY_DOWN, (e => { + const t = new o.y(e); + let i = !0; + const n = "number" == typeof this.focusedItem ? this.viewItems[ + this.focusedItem] : void 0; + g && (t.equals(g[0]) || t.equals(g[1])) ? i = this.focusPrevious() : + p && (t.equals(p[0]) || t.equals(p[1])) ? i = this.focusNext() : + t.equals(9) && this.cancelHasListener ? this._onDidCancel.fire() : + t.equals(14) ? i = this.focusFirst() : t.equals(13) ? i = this.focusLast() : + t.equals(2) && n instanceof r.Y && n.trapsArrowNavigation ? i = + this.focusNext() : this.isTriggerKeyEvent(t) ? this._triggerKeys + .keyDown ? this.doTrigger(t) : this.triggerKeyDown = !0 : i = ! + 1, i && (t.preventDefault(), t.stopPropagation()) + }))), this._register(n.nm(this.domNode, n.tw.KEY_UP, (e => { + const t = new o.y(e); + this.isTriggerKeyEvent(t) ? (!this._triggerKeys.keyDown && this.triggerKeyDown && + (this.triggerKeyDown = !1, this.doTrigger(t)), t.preventDefault(), + t.stopPropagation()) : (t.equals(2) || t.equals(1026)) && this + .updateFocusedItem() + }))), this.focusTracker = this._register(n.go(this.domNode)), this._register( + this.focusTracker.onDidBlur((() => { + n.vY() !== this.domNode && n.jg(n.vY(), this.domNode) || (this._onDidBlur + .fire(), this.focusedItem = void 0, this.triggerKeyDown = !1) + }))), this._register(this.focusTracker.onDidFocus((() => this.updateFocusedItem()))), + this.actionsList = document.createElement("ul"), this.actionsList.className = + "actions-container", this.actionsList.setAttribute("role", "toolbar"), + this.options.ariaLabel && this.actionsList.setAttribute("aria-label", + this.options.ariaLabel), this.domNode.appendChild(this.actionsList), + e.appendChild(this.domNode) + } + isTriggerKeyEvent(e) { + let t = !1; + return this._triggerKeys.keys.forEach((i => { + t = t || e.equals(i) + })), t + } + updateFocusedItem() { + for (let e = 0; e < this.actionsList.children.length; e++) { + const t = this.actionsList.children[e]; + if (n.jg(n.vY(), t)) { + this.focusedItem = e; + break + } + } + } + get context() { + return this._context + } + set context(e) { + this._context = e, this.viewItems.forEach((t => t.setActionContext(e))) + } + get actionRunner() { + return this._actionRunner + } + set actionRunner(e) { + e && (this._actionRunner = e, this.viewItems.forEach((t => t.actionRunner = + e))) + } + getContainer() { + return this.domNode + } + push(e, t = {}) { + const i = Array.isArray(e) ? e : [e]; + let o = d.hj(t.index) ? t.index : null; + i.forEach((e => { + const i = document.createElement("li"); + let s; + i.className = "action-item", i.setAttribute("role", + "presentation"), this.options.allowContextMenu || this._register( + n.nm(i, n.tw.CONTEXT_MENU, (e => { + n.zB.stop(e, !0) + }))), this.options.actionViewItemProvider && (s = this.options.actionViewItemProvider( + e)), s || (s = new r.g(this.context, e, t)), s.actionRunner = + this._actionRunner, s.setActionContext(this.context), s.render(i), + this.focusable && s instanceof r.Y && 0 === this.viewItems.length && + s.setFocusable(!0), null === o || o < 0 || o >= this.actionsList + .children.length ? (this.actionsList.appendChild(i), this.viewItems + .push(s), this._actionIds.push(e.id)) : (this.actionsList.insertBefore( + i, this.actionsList.children[o]), this.viewItems.splice(o, 0, + s), this._actionIds.splice(o, 0, e.id), o++) + })), "number" == typeof this.focusedItem && this.focus(this.focusedItem) + } + clear() { + (0, l.B9)(this.viewItems), this.viewItems = [], this._actionIds = [], + n.PO(this.actionsList) + } + length() { + return this.viewItems.length + } + focus(e) { + let t, i = !1; + if (void 0 === e ? i = !0 : "number" == typeof e ? t = e : "boolean" == + typeof e && (i = e), i && void 0 === this.focusedItem) { + const e = this.viewItems.findIndex((e => e.isEnabled())); + this.focusedItem = -1 === e ? void 0 : e, this.updateFocus() + } else void 0 !== t && (this.focusedItem = t), this.updateFocus() + } + focusFirst() { + return this.focusedItem = this.length() > 1 ? 1 : 0, this.focusPrevious() + } + focusLast() { + return this.focusedItem = this.length() < 2 ? 0 : this.length() - 2, + this.focusNext() + } + focusNext() { + if (void 0 === this.focusedItem) this.focusedItem = this.viewItems.length - + 1; + else if (this.viewItems.length <= 1) return !1; + const e = this.focusedItem; + let t; + do { + if (this.options.preventLoopNavigation && this.focusedItem + 1 >= + this.viewItems.length) return this.focusedItem = e, !1; + this.focusedItem = (this.focusedItem + 1) % this.viewItems.length, t = + this.viewItems[this.focusedItem] + } while (this.focusedItem !== e && this.options.focusOnlyEnabledItems && + !t.isEnabled()); + return this.updateFocus(), !0 + } + focusPrevious() { + if (void 0 === this.focusedItem) this.focusedItem = 0; + else if (this.viewItems.length <= 1) return !1; + const e = this.focusedItem; + let t; + do { + if (this.focusedItem = this.focusedItem - 1, this.focusedItem < 0) { + if (this.options.preventLoopNavigation) return this.focusedItem = e, ! + 1; + this.focusedItem = this.viewItems.length - 1 + } + t = this.viewItems[this.focusedItem] + } while (this.focusedItem !== e && this.options.focusOnlyEnabledItems && + !t.isEnabled()); + return this.updateFocus(!0), !0 + } + updateFocus(e, t) { + void 0 === this.focusedItem && this.actionsList.focus({ + preventScroll: t + }); + for (let i = 0; i < this.viewItems.length; i++) { + const n = this.viewItems[i], + o = n; + if (i === this.focusedItem) { + let i = !0; + d.mf(o.focus) || (i = !1), this.options.focusOnlyEnabledItems && d.mf( + n.isEnabled) && !n.isEnabled() && (i = !1), i ? o.focus(e) : this + .actionsList.focus({ + preventScroll: t + }) + } else d.mf(o.blur) && o.blur() + } + } + doTrigger(e) { + if (void 0 === this.focusedItem) return; + const t = this.viewItems[this.focusedItem]; + if (t instanceof r.Y) { + const i = null === t._context || void 0 === t._context ? e : t._context; + this.run(t._action, i) + } + } + run(e, t) { + return c(this, void 0, void 0, (function*() { + yield this._actionRunner.run(e, t) + })) + } + dispose() { + (0, l.B9)(this.viewItems), this.viewItems = [], this._actionIds = [], + this.getContainer().remove(), super.dispose() + } + } + }, + 6346: (e, t, i) => { + "use strict"; + i.d(t, { + Z9: () => k, + wW: () => x, + i7: () => L + }); + var n = i(5321), + o = i(1432), + r = i(3379), + s = i.n(r), + a = i(7795), + l = i.n(a), + d = i(569), + c = i.n(d), + h = i(3565), + u = i.n(h), + g = i(9216), + p = i.n(g), + m = i(4589), + f = i.n(m), + _ = i(93), + b = {}; + let v, w, C, y, S; + + function x(e) { + v = document.createElement("div"), v.className = "monaco-aria-container"; + const t = () => { + const e = document.createElement("div"); + return e.className = "monaco-alert", e.setAttribute("role", "alert"), + e.setAttribute("aria-atomic", "true"), v.appendChild(e), e + }; + w = t(), C = t(); + const i = () => { + const e = document.createElement("div"); + return e.className = "monaco-status", e.setAttribute("role", + "complementary"), e.setAttribute("aria-live", "polite"), e.setAttribute( + "aria-atomic", "true"), v.appendChild(e), e + }; + y = i(), S = i(), e.appendChild(v) + } + + function k(e) { + v && (w.textContent !== e ? (n.PO(C), N(w, e)) : (n.PO(w), N(C, e))) + } + + function L(e) { + v && (o.dz ? k(e) : y.textContent !== e ? (n.PO(S), N(y, e)) : (n.PO(y), + N(S, e))) + } + + function N(e, t) { + n.PO(e), t.length > 2e4 && (t = t.substr(0, 2e4)), e.textContent = t, e.style + .visibility = "hidden", e.style.visibility = "visible" + } + b.styleTagTransform = f(), b.setAttributes = u(), b.insert = c().bind( + null, "head"), b.domAPI = l(), b.insertStyleElement = p(), s()(_.Z, b), + _.Z && _.Z.locals && _.Z.locals + }, + 9899: (e, t, i) => { + "use strict"; + i.d(t, { + a: () => w + }); + var n = i(3046), + o = i(3379), + r = i.n(o), + s = i(7795), + a = i.n(s), + l = i(569), + d = i.n(l), + c = i(3565), + h = i.n(c), + u = i(9216), + g = i.n(u), + p = i(4589), + m = i.n(p), + f = i(58), + _ = {}; + _.styleTagTransform = m(), _.setAttributes = h(), _.insert = d().bind( + null, "head"), _.domAPI = a(), _.insertStyleElement = g(), r()(f.Z, _), + f.Z && f.Z.locals && f.Z.locals; + var b = i(4081), + v = {}; + + function w(e) { + let t = e.definition; + for (; t instanceof n.lA;) t = t.definition; + return `.codicon-${e.id}:before { content: '${t.fontCharacter}'; }` + } + v.styleTagTransform = m(), v.setAttributes = h(), v.insert = d().bind( + null, "head"), v.domAPI = a(), v.insertStyleElement = g(), r()(b.Z, v), + b.Z && b.Z.locals && b.Z.locals + }, + 9162: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => y + }); + var n = i(5321), + o = i(1264), + r = i(6248), + s = i(7295), + a = i(3379), + l = i.n(a), + d = i(7795), + c = i.n(d), + h = i(569), + u = i.n(h), + g = i(3565), + p = i.n(g), + m = i(9216), + f = i.n(m), + _ = i(4589), + b = i.n(_), + v = i(477), + w = {}; + w.styleTagTransform = b(), w.setAttributes = p(), w.insert = u().bind( + null, "head"), w.domAPI = c(), w.insertStyleElement = f(), l()(v.Z, w), + v.Z && v.Z.locals && v.Z.locals; + const C = { + badgeBackground: o.Il.fromHex("#4D4D4D"), + badgeForeground: o.Il.fromHex("#FFFFFF") + }; + class y { + constructor(e, t) { + this.count = 0, this.options = t || Object.create(null), (0, r.jB)( + this.options, C, !1), this.badgeBackground = this.options.badgeBackground, + this.badgeForeground = this.options.badgeForeground, this.badgeBorder = + this.options.badgeBorder, this.element = (0, n.R3)(e, (0, n.$)( + ".monaco-count-badge")), this.countFormat = this.options.countFormat || + "{0}", this.titleFormat = this.options.titleFormat || "", this.setCount( + this.options.count || 0) + } + setCount(e) { + this.count = e, this.render() + } + setTitleFormat(e) { + this.titleFormat = e, this.render() + } + render() { + this.element.textContent = (0, s.WU)(this.countFormat, this.count), + this.element.title = (0, s.WU)(this.titleFormat, this.count), this.applyStyles() + } + style(e) { + this.badgeBackground = e.badgeBackground, this.badgeForeground = e.badgeForeground, + this.badgeBorder = e.badgeBorder, this.applyStyles() + } + applyStyles() { + if (this.element) { + const e = this.badgeBackground ? this.badgeBackground.toString() : "", + t = this.badgeForeground ? this.badgeForeground.toString() : "", + i = this.badgeBorder ? this.badgeBorder.toString() : ""; + this.element.style.backgroundColor = e, this.element.style.color = t, + this.element.style.borderWidth = i ? "1px" : "", this.element.style.borderStyle = + i ? "solid" : "", this.element.style.borderColor = i + } + } + } + }, + 4650: (e, t, i) => { + "use strict"; + i.d(t, { + q: () => s + }); + var n = i(5321), + o = i(6811), + r = i(6248); + class s { + constructor(e, t) { + this.supportIcons = t, this.text = "", this.title = "", this.highlights = [], + this.didEverRender = !1, this.domNode = document.createElement("span"), + this.domNode.className = "monaco-highlighted-label", e.appendChild( + this.domNode) + } + get element() { + return this.domNode + } + set(e, t = [], i = "", n) { + e || (e = ""), n && (e = s.escapeNewLines(e, t)), this.didEverRender && + this.text === e && this.title === i && r.fS(this.highlights, t) || ( + this.text = e, this.title = i, this.highlights = t, this.render()) + } + render() { + const e = []; + let t = 0; + for (const i of this.highlights) { + if (i.end === i.start) continue; + if (t < i.start) { + const r = this.text.substring(t, i.start); + e.push(n.$("span", void 0, ...this.supportIcons ? (0, o.T)(r) : [r])), + t = i.end + } + const r = this.text.substring(i.start, i.end), + s = n.$("span.highlight", void 0, ...this.supportIcons ? (0, o.T)(r) : [ + r + ]); + i.extraClasses && s.classList.add(i.extraClasses), e.push(s), t = i.end + } + if (t < this.text.length) { + const i = this.text.substring(t); + e.push(n.$("span", void 0, ...this.supportIcons ? (0, o.T)(i) : [i])) + } + n.mc(this.domNode, ...e), this.title ? this.domNode.title = this.title : + this.domNode.removeAttribute("title"), this.didEverRender = !0 + } + static escapeNewLines(e, t) { + let i = 0, + n = 0; + return e.replace(/\r\n|\r|\n/g, ((e, o) => { + n = "\r\n" === e ? -1 : 0, o += i; + for (const e of t) e.end <= o || (e.start >= o && (e.start += n), + e.end >= o && (e.end += n)); + return i += n, "⏎" + })) + } + } + }, + 3326: (e, t, i) => { + "use strict"; + i.d(t, { + g: () => D + }); + var n = i(5321), + o = i(4650), + r = i(5393), + s = i(1050), + a = i(5976), + l = i(8401), + d = i(3580), + c = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + var h = i(6248), + u = i(1134), + g = i(3379), + p = i.n(g), + m = i(7795), + f = i.n(m), + _ = i(569), + b = i.n(_), + v = i(3565), + w = i.n(v), + C = i(9216), + y = i.n(C), + S = i(4589), + x = i.n(S), + k = i(4269), + L = {}; + L.styleTagTransform = x(), L.setAttributes = w(), L.insert = b().bind( + null, "head"), L.domAPI = f(), L.insertStyleElement = y(), p()(k.Z, L), + k.Z && k.Z.locals && k.Z.locals; + class N { + constructor(e) { + this._element = e + } + get element() { + return this._element + } + set textContent(e) { + this.disposed || e === this._textContent || (this._textContent = e, + this._element.textContent = e) + } + set className(e) { + this.disposed || e === this._className || (this._className = e, this._element + .className = e) + } + set empty(e) { + this.disposed || e === this._empty || (this._empty = e, this._element.style + .marginLeft = e ? "0" : "") + } + dispose() { + this.disposed = !0 + } + } + class D extends a.JT { + constructor(e, t) { + super(), this.customHovers = new Map, this.domNode = this._register( + new N(n.R3(e, n.$(".monaco-icon-label")))), this.labelContainer = n + .R3(this.domNode.element, n.$(".monaco-icon-label-container")); + const i = n.R3(this.labelContainer, n.$( + "span.monaco-icon-name-container")); + this.descriptionContainer = this._register(new N(n.R3(this.labelContainer, + n.$("span.monaco-icon-description-container")))), (null == t ? void 0 : + t.supportHighlights) || (null == t ? void 0 : t.supportIcons) ? + this.nameNode = new I(i, !!t.supportIcons) : this.nameNode = new E(i), ( + null == t ? void 0 : t.supportDescriptionHighlights) ? this.descriptionNodeFactory = + () => new o.q(n.R3(this.descriptionContainer.element, n.$( + "span.label-description")), !!t.supportIcons) : this.descriptionNodeFactory = + () => this._register(new N(n.R3(this.descriptionContainer.element, n + .$("span.label-description")))), this.hoverDelegate = null == t ? + void 0 : t.hoverDelegate + } + setLabel(e, t, i) { + const n = ["monaco-icon-label"]; + i && (i.extraClasses && n.push(...i.extraClasses), i.italic && n.push( + "italic"), i.strikethrough && n.push("strikethrough")), this.domNode + .className = n.join(" "), this.setupHover(this.labelContainer, null == + i ? void 0 : i.title), this.nameNode.setLabel(e, i), (t || this.descriptionNode) && + (this.descriptionNode || (this.descriptionNode = this.descriptionNodeFactory()), + this.descriptionNode instanceof o.q ? (this.descriptionNode.set(t || + "", i ? i.descriptionMatches : void 0), this.setupHover(this.descriptionNode + .element, null == i ? void 0 : i.descriptionTitle)) : (this.descriptionNode + .textContent = t || "", this.setupHover(this.descriptionNode.element, ( + null == i ? void 0 : i.descriptionTitle) || ""), this.descriptionNode + .empty = !t)) + } + setupHover(e, t) { + const i = this.customHovers.get(e); + if (i && (i.dispose(), this.customHovers.delete(e)), t) + if (this.hoverDelegate) { + const i = function(e, t, i) { + if (!i) return; + const o = function(e) { + if ((0, l.HD)(e)) return () => c(this, void 0, void 0, ( + function*() { + return e + })); + if ((0, l.mf)(e.markdown)) return e.markdown; { + const t = e.markdown; + return () => c(this, void 0, void 0, (function*() { + return t + })) + } + }(i); + let h, u; + const g = n.nm(t, n.tw.MOUSE_OVER, (g => { + if (h) return; + const p = new s.A, + m = e => { + const i = e.type === n.tw.MOUSE_DOWN; + i && (null == u || u.dispose(), u = void 0), (i || e.fromElement === + t) && (null == h || h.dispose(), h = void 0) + }, + f = n.nm(t, n.tw.MOUSE_LEAVE, m, !0), + _ = n.nm(t, n.tw.MOUSE_DOWN, m, !0), + b = { + targetElements: [t], + dispose: () => {} + }; + let v; + if (void 0 === e.placement || "mouse" === e.placement) { + const e = e => b.x = e.x + 10; + v = n.nm(t, n.tw.MOUSE_MOVE, e, !0) + } + const w = new r.pY((() => c(this, void 0, void 0, (function*() { + var t; + if (h) { + const n = { + content: (0, d.N)("iconLabel.loading", "Loading..."), + target: b, + hoverPosition: 2 + }; + null == u || u.dispose(), u = e.showHover(n); + const r = null !== (t = yield o(p.token)) && void 0 !== + t ? t : (0, l.HD)(i) ? void 0 : i.markdownNotSupportedFallback; + if (null == u || u.dispose(), u = void 0, r && h) { + const t = { + content: r, + target: b, + showPointer: "element" === e.placement, + hoverPosition: 2 + }; + u = e.showHover(t) + } + } + null == v || v.dispose() + }))), e.delay); + w.schedule(), h = (0, a.OF)((() => { + w.dispose(), null == v || v.dispose(), _.dispose(), f.dispose(), + p.dispose(!0) + })) + }), !0); + return (0, a.OF)((() => { + g.dispose(), null == h || h.dispose(), null == u || u.dispose() + })) + }(this.hoverDelegate, e, t); + i && this.customHovers.set(e, i) + } else ! function(e, t) { + (0, l.HD)(t) ? e.title = t: (null == t ? void 0 : t.markdownNotSupportedFallback) ? + e.title = t.markdownNotSupportedFallback : e.removeAttribute( + "title") + }(e, t); + else e.removeAttribute("title") + } + dispose() { + super.dispose(); + for (const e of this.customHovers.values()) e.dispose(); + this.customHovers.clear() + } + } + class E { + constructor(e) { + this.container = e, this.label = void 0, this.singleLabel = void 0 + } + setLabel(e, t) { + if (this.label !== e || !(0, h.fS)(this.options, t)) + if (this.label = e, this.options = t, "string" == typeof e) this.singleLabel || + (this.container.innerText = "", this.container.classList.remove( + "multiple"), this.singleLabel = n.R3(this.container, n.$( + "a.label-name", { + id: null == t ? void 0 : t.domId + }))), this.singleLabel.textContent = e; + else { + this.container.innerText = "", this.container.classList.add( + "multiple"), this.singleLabel = void 0; + for (let i = 0; i < e.length; i++) { + const o = e[i], + r = (null == t ? void 0 : t.domId) && + `${null==t?void 0:t.domId}_${i}`; + n.R3(this.container, n.$("a.label-name", { + id: r, + "data-icon-label-count": e.length, + "data-icon-label-index": i, + role: "treeitem" + }, o)), i < e.length - 1 && n.R3(this.container, n.$( + "span.label-separator", void 0, (null == t ? void 0 : t.separator) || + "/")) + } + } + } + } + class I { + constructor(e, t) { + this.container = e, this.supportIcons = t, this.label = void 0, this.singleLabel = + void 0 + } + setLabel(e, t) { + if (this.label !== e || !(0, h.fS)(this.options, t)) + if (this.label = e, this.options = t, "string" == typeof e) this.singleLabel || + (this.container.innerText = "", this.container.classList.remove( + "multiple"), this.singleLabel = new o.q(n.R3(this.container, n.$( + "a.label-name", { + id: null == t ? void 0 : t.domId + })), this.supportIcons)), this.singleLabel.set(e, null == t ? void 0 : + t.matches, void 0, null == t ? void 0 : t.labelEscapeNewLines); + else { + this.container.innerText = "", this.container.classList.add( + "multiple"), this.singleLabel = void 0; + const i = (null == t ? void 0 : t.separator) || "/", + r = function(e, t, i) { + if (!i) return; + let n = 0; + return e.map((e => { + const o = { + start: n, + end: n + e.length + }, + r = i.map((e => u.e.intersect(o, e))).filter((e => !u.e.isEmpty( + e))).map((({ + start: e, + end: t + }) => ({ + start: e - n, + end: t - n + }))); + return n = o.end + t.length, r + })) + }(e, i, null == t ? void 0 : t.matches); + for (let s = 0; s < e.length; s++) { + const a = e[s], + l = r ? r[s] : void 0, + d = (null == t ? void 0 : t.domId) && + `${null==t?void 0:t.domId}_${s}`, + c = n.$("a.label-name", { + id: d, + "data-icon-label-count": e.length, + "data-icon-label-index": s, + role: "treeitem" + }); + new o.q(n.R3(this.container, c), this.supportIcons).set(a, l, void 0, + null == t ? void 0 : t.labelEscapeNewLines), s < e.length - 1 && + n.R3(c, n.$("span.label-separator", void 0, i)) + } + } + } + } + }, + 6811: (e, t, i) => { + "use strict"; + i.d(t, { + T: () => s + }); + var n = i(5321), + o = i(3046); + const r = new RegExp( + `(\\\\)?\\$\\((${o.dT.iconNameExpression}(?:${o.dT.iconModifierExpression})?)\\)`, + "g"); + + function s(e) { + const t = new Array; + let i, n = 0, + o = 0; + for (; null !== (i = r.exec(e));) { + o = i.index || 0, t.push(e.substring(n, o)), n = (i.index || 0) + i[0].length; + const [, r, s] = i; + t.push(r ? `$(${s})` : a({ + id: s + })) + } + return n < e.length && t.push(e.substring(n)), t + } + + function a(e) { + const t = n.$("span"); + return t.classList.add(...o.dT.asClassNameArray(e)), t + } + }, + 4299: (e, t, i) => { + "use strict"; + i.d(t, { + p: () => A, + W: () => M + }); + var n = i(5321), + o = i(4850), + r = i(8764), + s = i(317), + a = i(6346), + l = i(6781), + d = i(3794), + c = i(1264), + h = i(4669); + class u { + constructor(e, t = 0, i = e.length, n = t - 1) { + this.items = e, this.start = t, this.end = i, this.index = n + } + current() { + return this.index === this.start - 1 || this.index === this.end ? null : + this.items[this.index] + } + next() { + return this.index = Math.min(this.index + 1, this.end), this.current() + } + previous() { + return this.index = Math.max(this.index - 1, this.start - 1), this.current() + } + first() { + return this.index = this.start, this.current() + } + last() { + return this.index = this.end - 1, this.current() + } + } + class g { + constructor(e = [], t = 10) { + this._initialize(e), this._limit = t, this._onChange() + } + add(e) { + this._history.delete(e), this._history.add(e), this._onChange() + } + next() { + return this._currentPosition() !== this._elements.length - 1 ? this._navigator + .next() : null + } + previous() { + return 0 !== this._currentPosition() ? this._navigator.previous() : + null + } + current() { + return this._navigator.current() + } + first() { + return this._navigator.first() + } + last() { + return this._navigator.last() + } + has(e) { + return this._history.has(e) + } + _onChange() { + this._reduceToLimit(); + const e = this._elements; + this._navigator = new u(e, 0, e.length, e.length) + } + _reduceToLimit() { + const e = this._elements; + e.length > this._limit && this._initialize(e.slice(e.length - this._limit)) + } + _currentPosition() { + const e = this._navigator.current(); + return e ? this._elements.indexOf(e) : -1 + } + _initialize(e) { + this._history = new Set; + for (const t of e) this._history.add(t) + } + get _elements() { + const e = []; + return this._history.forEach((t => e.push(t))), e + } + } + var p = i(6248), + m = i(3379), + f = i.n(m), + _ = i(7795), + b = i.n(_), + v = i(569), + w = i.n(v), + C = i(3565), + y = i.n(C), + S = i(9216), + x = i.n(S), + k = i(4589), + L = i.n(k), + N = i(1188), + D = {}; + D.styleTagTransform = L(), D.setAttributes = y(), D.insert = w().bind( + null, "head"), D.domAPI = b(), D.insertStyleElement = x(), f()(N.Z, D), + N.Z && N.Z.locals && N.Z.locals; + var E = i(3580); + const I = n.$, + T = { + inputBackground: c.Il.fromHex("#3C3C3C"), + inputForeground: c.Il.fromHex("#CCCCCC"), + inputValidationInfoBorder: c.Il.fromHex("#55AAFF"), + inputValidationInfoBackground: c.Il.fromHex("#063B49"), + inputValidationWarningBorder: c.Il.fromHex("#B89500"), + inputValidationWarningBackground: c.Il.fromHex("#352A05"), + inputValidationErrorBorder: c.Il.fromHex("#BE1100"), + inputValidationErrorBackground: c.Il.fromHex("#5A1D1D") + }; + class M extends d.$ { + constructor(e, t, i) { + var r; + super(), this.state = "idle", this.maxHeight = Number.POSITIVE_INFINITY, + this._onDidChange = this._register(new h.Q5), this.onDidChange = + this._onDidChange.event, this._onDidHeightChange = this._register( + new h.Q5), this.onDidHeightChange = this._onDidHeightChange.event, + this.contextViewProvider = t, this.options = i || Object.create(null), ( + 0, p.jB)(this.options, T, !1), this.message = null, this.placeholder = + this.options.placeholder || "", this.tooltip = null !== (r = this.options + .tooltip) && void 0 !== r ? r : this.placeholder || "", this.ariaLabel = + this.options.ariaLabel || "", this.inputBackground = this.options.inputBackground, + this.inputForeground = this.options.inputForeground, this.inputBorder = + this.options.inputBorder, this.inputValidationInfoBorder = this.options + .inputValidationInfoBorder, this.inputValidationInfoBackground = + this.options.inputValidationInfoBackground, this.inputValidationInfoForeground = + this.options.inputValidationInfoForeground, this.inputValidationWarningBorder = + this.options.inputValidationWarningBorder, this.inputValidationWarningBackground = + this.options.inputValidationWarningBackground, this.inputValidationWarningForeground = + this.options.inputValidationWarningForeground, this.inputValidationErrorBorder = + this.options.inputValidationErrorBorder, this.inputValidationErrorBackground = + this.options.inputValidationErrorBackground, this.inputValidationErrorForeground = + this.options.inputValidationErrorForeground, this.options.validationOptions && + (this.validation = this.options.validationOptions.validation), this.element = + n.R3(e, I(".monaco-inputbox.idle")); + let a = this.options.flexibleHeight ? "textarea" : "input", + d = n.R3(this.element, I(".ibwrapper")); + if (this.input = n.R3(d, I(a + ".input.empty")), this.input.setAttribute( + "autocorrect", "off"), this.input.setAttribute("autocapitalize", + "off"), this.input.setAttribute("spellcheck", "false"), this.onfocus( + this.input, (() => this.element.classList.add("synthetic-focus"))), + this.onblur(this.input, (() => this.element.classList.remove( + "synthetic-focus"))), this.options.flexibleHeight) { + this.maxHeight = "number" == typeof this.options.flexibleMaxHeight ? + this.options.flexibleMaxHeight : Number.POSITIVE_INFINITY, this.mirror = + n.R3(d, I("div.mirror")), this.mirror.innerText = " ", this.scrollableElement = + new l.NB(this.element, { + vertical: 1 + }), this.options.flexibleWidth && (this.input.setAttribute("wrap", + "off"), this.mirror.style.whiteSpace = "pre", this.mirror.style.wordWrap = + "initial"), n.R3(e, this.scrollableElement.getDomNode()), this._register( + this.scrollableElement), this._register(this.scrollableElement.onScroll( + (e => this.input.scrollTop = e.scrollTop))); + const t = this._register(new o.Y(document, "selectionchange")), + i = h.ju.filter(t.event, (() => { + const e = document.getSelection(); + return (null == e ? void 0 : e.anchorNode) === d + })); + this._register(i(this.updateScrollDimensions, this)), this._register( + this.onDidHeightChange(this.updateScrollDimensions, this)) + } else this.input.type = this.options.type || "text", this.input.setAttribute( + "wrap", "off"); + this.ariaLabel && this.input.setAttribute("aria-label", this.ariaLabel), + this.placeholder && !this.options.showPlaceholderOnFocus && this.setPlaceHolder( + this.placeholder), this.tooltip && this.setTooltip(this.tooltip), + this.oninput(this.input, (() => this.onValueChange())), this.onblur( + this.input, (() => this.onBlur())), this.onfocus(this.input, (() => + this.onFocus())), this.ignoreGesture(this.input), setTimeout((() => + this.updateMirror()), 0), this.options.actions && (this.actionbar = + this._register(new s.o(this.element)), this.actionbar.push(this.options + .actions, { + icon: !0, + label: !1 + })), this.applyStyles() + } + onBlur() { + this._hideMessage(), this.options.showPlaceholderOnFocus && this.input + .setAttribute("placeholder", "") + } + onFocus() { + this._showMessage(), this.options.showPlaceholderOnFocus && this.input + .setAttribute("placeholder", this.placeholder || "") + } + setPlaceHolder(e) { + this.placeholder = e, this.input.setAttribute("placeholder", e) + } + setTooltip(e) { + this.tooltip = e, this.input.title = e + } + setAriaLabel(e) { + this.ariaLabel = e, e ? this.input.setAttribute("aria-label", this.ariaLabel) : + this.input.removeAttribute("aria-label") + } + getAriaLabel() { + return this.ariaLabel + } + get inputElement() { + return this.input + } + get value() { + return this.input.value + } + set value(e) { + this.input.value !== e && (this.input.value = e, this.onValueChange()) + } + get height() { + return "number" == typeof this.cachedHeight ? this.cachedHeight : n.wn( + this.element) + } + focus() { + this.input.focus() + } + blur() { + this.input.blur() + } + hasFocus() { + return document.activeElement === this.input + } + select(e = null) { + this.input.select(), e && (this.input.setSelectionRange(e.start, e.end), + e.end === this.input.value.length && (this.input.scrollLeft = this.input + .scrollWidth)) + } + isSelectionAtEnd() { + return this.input.selectionEnd === this.input.value.length && this.input + .selectionStart === this.input.selectionEnd + } + enable() { + this.input.removeAttribute("disabled") + } + disable() { + this.blur(), this.input.disabled = !0, this._hideMessage() + } + get width() { + return n.w(this.input) + } + set width(e) { + if (this.options.flexibleHeight && this.options.flexibleWidth) { + let t = 0; + this.mirror && (t = (parseFloat(this.mirror.style.paddingLeft || "") || + 0) + (parseFloat(this.mirror.style.paddingRight || "") || 0)), + this.input.style.width = e - t + "px" + } else this.input.style.width = e + "px"; + this.mirror && (this.mirror.style.width = e + "px") + } + set paddingRight(e) { + this.options.flexibleHeight && this.options.flexibleWidth ? this.input + .style.width = `calc(100% - ${e}px)` : this.input.style.paddingRight = + e + "px", this.mirror && (this.mirror.style.paddingRight = e + "px") + } + updateScrollDimensions() { + if ("number" != typeof this.cachedContentHeight || "number" != typeof this + .cachedHeight || !this.scrollableElement) return; + const e = this.cachedContentHeight, + t = this.cachedHeight, + i = this.input.scrollTop; + this.scrollableElement.setScrollDimensions({ + scrollHeight: e, + height: t + }), this.scrollableElement.setScrollPosition({ + scrollTop: i + }) + } + showMessage(e, t) { + this.message = e, this.element.classList.remove("idle"), this.element + .classList.remove("info"), this.element.classList.remove("warning"), + this.element.classList.remove("error"), this.element.classList.add( + this.classForType(e.type)); + const i = this.stylesForType(this.message.type); + this.element.style.border = i.border ? `1px solid ${i.border}` : "", ( + this.hasFocus() || t) && this._showMessage() + } + hideMessage() { + this.message = null, this.element.classList.remove("info"), this.element + .classList.remove("warning"), this.element.classList.remove("error"), + this.element.classList.add("idle"), this._hideMessage(), this.applyStyles() + } + validate() { + let e = null; + return this.validation && (e = this.validation(this.value), e ? (this + .inputElement.setAttribute("aria-invalid", "true"), this.showMessage( + e)) : this.inputElement.hasAttribute("aria-invalid") && (this.inputElement + .removeAttribute("aria-invalid"), this.hideMessage())), null == e ? + void 0 : e.type + } + stylesForType(e) { + switch (e) { + case 1: + return { + border: this.inputValidationInfoBorder, + background: this.inputValidationInfoBackground, + foreground: this.inputValidationInfoForeground + }; + case 2: + return { + border: this.inputValidationWarningBorder, + background: this.inputValidationWarningBackground, + foreground: this.inputValidationWarningForeground + }; + default: + return { + border: this.inputValidationErrorBorder, + background: this.inputValidationErrorBackground, + foreground: this.inputValidationErrorForeground + } + } + } + classForType(e) { + switch (e) { + case 1: + return "info"; + case 2: + return "warning"; + default: + return "error" + } + } + _showMessage() { + if (!this.contextViewProvider || !this.message) return; + let e, t, i = () => e.style.width = n.w(this.element) + "px"; + this.contextViewProvider.showContextView({ + getAnchor: () => this.element, + anchorAlignment: 1, + render: t => { + if (!this.message) return null; + e = n.R3(t, I(".monaco-inputbox-container")), i(); + const o = { + inline: !0, + className: "monaco-inputbox-message" + }, + s = this.message.formatContent ? (0, r.BO)(this.message.content, + o) : (0, r.IY)(this.message.content, o); + s.classList.add(this.classForType(this.message.type)); + const a = this.stylesForType(this.message.type); + return s.style.backgroundColor = a.background ? a.background.toString() : + "", s.style.color = a.foreground ? a.foreground.toString() : "", + s.style.border = a.border ? `1px solid ${a.border}` : "", n.R3( + e, s), null + }, + onHide: () => { + this.state = "closed" + }, + layout: i + }), t = 3 === this.message.type ? E.N("alertErrorMessage", + "Error: {0}", this.message.content) : 2 === this.message.type ? E.N( + "alertWarningMessage", "Warning: {0}", this.message.content) : E.N( + "alertInfoMessage", "Info: {0}", this.message.content), a.Z9(t), + this.state = "open" + } + _hideMessage() { + this.contextViewProvider && ("open" === this.state && this.contextViewProvider + .hideContextView(), this.state = "idle") + } + onValueChange() { + this._onDidChange.fire(this.value), this.validate(), this.updateMirror(), + this.input.classList.toggle("empty", !this.value), "open" === this.state && + this.contextViewProvider && this.contextViewProvider.layout() + } + updateMirror() { + if (!this.mirror) return; + const e = this.value, + t = 10 === e.charCodeAt(e.length - 1) ? " " : ""; + (e + t).replace(/\u000c/g, "") ? this.mirror.textContent = e + t : + this.mirror.innerText = " ", this.layout() + } + style(e) { + this.inputBackground = e.inputBackground, this.inputForeground = e.inputForeground, + this.inputBorder = e.inputBorder, this.inputValidationInfoBackground = + e.inputValidationInfoBackground, this.inputValidationInfoForeground = + e.inputValidationInfoForeground, this.inputValidationInfoBorder = e.inputValidationInfoBorder, + this.inputValidationWarningBackground = e.inputValidationWarningBackground, + this.inputValidationWarningForeground = e.inputValidationWarningForeground, + this.inputValidationWarningBorder = e.inputValidationWarningBorder, + this.inputValidationErrorBackground = e.inputValidationErrorBackground, + this.inputValidationErrorForeground = e.inputValidationErrorForeground, + this.inputValidationErrorBorder = e.inputValidationErrorBorder, this + .applyStyles() + } + applyStyles() { + const e = this.inputBackground ? this.inputBackground.toString() : "", + t = this.inputForeground ? this.inputForeground.toString() : "", + i = this.inputBorder ? this.inputBorder.toString() : ""; + this.element.style.backgroundColor = e, this.element.style.color = t, + this.input.style.backgroundColor = "inherit", this.input.style.color = + t, this.element.style.borderWidth = i ? "1px" : "", this.element.style + .borderStyle = i ? "solid" : "", this.element.style.borderColor = i + } + layout() { + if (!this.mirror) return; + const e = this.cachedContentHeight; + this.cachedContentHeight = n.wn(this.mirror), e !== this.cachedContentHeight && + (this.cachedHeight = Math.min(this.cachedContentHeight, this.maxHeight), + this.input.style.height = this.cachedHeight + "px", this._onDidHeightChange + .fire(this.cachedContentHeight)) + } + insertAtCursor(e) { + const t = this.inputElement, + i = t.selectionStart, + n = t.selectionEnd, + o = t.value; + null !== i && null !== n && (this.value = o.substr(0, i) + e + o.substr( + n), t.setSelectionRange(i + 1, i + 1), this.layout()) + } + dispose() { + this._hideMessage(), this.message = null, this.actionbar && this.actionbar + .dispose(), super.dispose() + } + } + class A extends M { + constructor(e, t, i) { + super(e, t, i), this.history = new g(i.history, 100) + } + addToHistory() { + this.value && this.value !== this.getCurrentValue() && this.history.add( + this.value) + } + showNextValue() { + this.history.has(this.value) || this.addToHistory(); + let e = this.getNextValue(); + e && (e = e === this.value ? this.getNextValue() : e), e && (this.value = + e, a.i7(this.value)) + } + showPreviousValue() { + this.history.has(this.value) || this.addToHistory(); + let e = this.getPreviousValue(); + e && (e = e === this.value ? this.getPreviousValue() : e), e && (this.value = + e, a.i7(this.value)) + } + getCurrentValue() { + let e = this.history.current(); + return e || (e = this.history.last(), this.history.next()), e + } + getPreviousValue() { + return this.history.previous() || this.history.first() + } + getNextValue() { + return this.history.next() || this.history.last() + } + } + }, + 5707: (e, t, i) => { + "use strict"; + i.d(t, { + kX: () => S, + Bv: () => N + }); + var n = i(6268), + o = i(3547), + r = i(5321), + s = i(4850), + a = i(553), + l = i(6781), + d = i(9488), + c = i(5393), + h = i(9898), + u = i(4669), + g = i(5976), + p = i(6248), + m = i(1134), + f = i(6633); + + function _(e, t) { + const i = []; + for (let n of t) { + if (e.start >= n.range.end) continue; + if (e.end < n.range.start) break; + const t = m.e.intersect(e, n.range); + m.e.isEmpty(t) || i.push({ + range: t, + size: n.size + }) + } + return i + } + + function b({ + start: e, + end: t + }, i) { + return { + start: e + i, + end: t + i + } + } + class v { + constructor() { + this.groups = [], this._size = 0 + } + splice(e, t, i = []) { + const n = i.length - t, + o = _({ + start: 0, + end: e + }, this.groups), + r = _({ + start: e + t, + end: Number.POSITIVE_INFINITY + }, this.groups).map((e => ({ + range: b(e.range, n), + size: e.size + }))), + s = i.map(((t, i) => ({ + range: { + start: e + i, + end: e + i + 1 + }, + size: t.size + }))); + this.groups = function(...e) { + return function(e) { + const t = []; + let i = null; + for (let n of e) { + const e = n.range.start, + o = n.range.end, + r = n.size; + i && r === i.size ? i.range.end = o : (i = { + range: { + start: e, + end: o + }, + size: r + }, t.push(i)) + } + return t + }(e.reduce(((e, t) => e.concat(t)), [])) + }(o, s, r), this._size = this.groups.reduce(((e, t) => e + t.size * ( + t.range.end - t.range.start)), 0) + } + get count() { + const e = this.groups.length; + return e ? this.groups[e - 1].range.end : 0 + } + get size() { + return this._size + } + indexAt(e) { + if (e < 0) return -1; + let t = 0, + i = 0; + for (let n of this.groups) { + const o = n.range.end - n.range.start, + r = i + o * n.size; + if (e < r) return t + Math.floor((e - i) / n.size); + t += o, i = r + } + return t + } + indexAfter(e) { + return Math.min(this.indexAt(e) + 1, this.count) + } + positionAt(e) { + if (e < 0) return -1; + let t = 0, + i = 0; + for (let n of this.groups) { + const o = n.range.end - n.range.start, + r = i + o; + if (e < r) return t + (e - i) * n.size; + t += o * n.size, i = r + } + return -1 + } + } + class w { + constructor(e) { + this.renderers = e, this.cache = new Map + } + alloc(e) { + let t = this.getTemplateCache(e).pop(); + if (!t) { + const i = (0, r.$)(".monaco-list-row"); + t = { + domNode: i, + templateId: e, + templateData: this.getRenderer(e).renderTemplate(i) + } + } + return t + } + release(e) { + e && this.releaseRow(e) + } + releaseRow(e) { + const { + domNode: t, + templateId: i + } = e; + t && (t.classList.remove("scrolling"), function(e) { + try { + e.parentElement && e.parentElement.removeChild(e) + } catch (e) {} + }(t)), this.getTemplateCache(i).push(e) + } + getTemplateCache(e) { + let t = this.cache.get(e); + return t || (t = [], this.cache.set(e, t)), t + } + dispose() { + this.cache.forEach(((e, t) => { + for (const i of e) this.getRenderer(t).disposeTemplate(i.templateData), + i.templateData = null + })), this.cache.clear() + } + getRenderer(e) { + const t = this.renderers.get(e); + if (!t) throw new Error(`No renderer found for ${e}`); + return t + } + } + var C = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }; + const y = { + useShadows: !0, + verticalScrollMode: 1, + setRowLineHeight: !0, + setRowHeight: !0, + supportDynamicHeights: !1, + dnd: { + getDragElements: e => [e], + getDragURI: () => null, + onDragStart() {}, + onDragOver: () => !1, + drop() {} + }, + horizontalScrolling: !1, + transformOptimization: !0, + alwaysConsumeMouseWheel: !0 + }; + class S { + constructor(e) { + this.elements = e + } + update() {} + getData() { + return this.elements + } + } + class x { + constructor(e) { + this.elements = e + } + update() {} + getData() { + return this.elements + } + } + class k { + constructor() { + this.types = [], this.files = [] + } + update(e) { + if (e.types && this.types.splice(0, this.types.length, ...e.types), e.files) { + this.files.splice(0, this.files.length); + for (let t = 0; t < e.files.length; t++) { + const i = e.files.item(t); + i && (i.size || i.type) && this.files.push(i) + } + } + } + getData() { + return { + types: this.types, + files: this.files + } + } + } + class L { + constructor(e) { + (null == e ? void 0 : e.getSetSize) ? this.getSetSize = e.getSetSize.bind( + e): this.getSetSize = (e, t, i) => i, (null == e ? void 0 : e.getPosInSet) ? + this.getPosInSet = e.getPosInSet.bind(e) : this.getPosInSet = (e, t) => + t + 1, (null == e ? void 0 : e.getRole) ? this.getRole = e.getRole.bind( + e) : this.getRole = e => "listitem", (null == e ? void 0 : e.isChecked) ? + this.isChecked = e.isChecked.bind(e) : this.isChecked = e => {} + } + } + class N { + constructor(e, t, i, n = y) { + if (this.virtualDelegate = t, this.domId = "list_id_" + ++N.InstanceCount, + this.renderers = new Map, this.renderWidth = 0, this._scrollHeight = + 0, this.scrollableElementUpdateDisposable = null, this.scrollableElementWidthDelayer = + new c.vp(50), this.splicing = !1, this.dragOverAnimationStopDisposable = + g.JT.None, this.dragOverMouseY = 0, this.canDrop = !1, this.currentDragFeedbackDisposable = + g.JT.None, this.onDragLeaveTimeout = g.JT.None, this.disposables = + new g.SL, this._onDidChangeContentHeight = new u.Q5, this._horizontalScrolling = ! + 1, n.horizontalScrolling && n.supportDynamicHeights) throw new Error( + "Horizontal scrolling and dynamic heights not supported simultaneously" + ); + this.items = [], this.itemId = 0, this.rangeMap = new v; + for (const e of i) this.renderers.set(e.templateId, e); + this.cache = this.disposables.add(new w(this.renderers)), this.lastRenderTop = + 0, this.lastRenderHeight = 0, this.domNode = document.createElement( + "div"), this.domNode.className = "monaco-list", this.domNode.classList + .add(this.domId), this.domNode.tabIndex = 0, this.domNode.classList.toggle( + "mouse-support", "boolean" != typeof n.mouseSupport || n.mouseSupport + ), this._horizontalScrolling = (0, p.CJ)(n, (e => e.horizontalScrolling), + y.horizontalScrolling), this.domNode.classList.toggle( + "horizontal-scrolling", this._horizontalScrolling), this.additionalScrollHeight = + void 0 === n.additionalScrollHeight ? 0 : n.additionalScrollHeight, + this.accessibilityProvider = new L(n.accessibilityProvider), this.rowsContainer = + document.createElement("div"), this.rowsContainer.className = + "monaco-list-rows", (0, p.CJ)(n, (e => e.transformOptimization), y.transformOptimization) && + (this.rowsContainer.style.transform = "translate3d(0px, 0px, 0px)"), + this.disposables.add(a.o.addTarget(this.rowsContainer)), this.scrollable = + new f.Rm((0, p.CJ)(n, (e => e.smoothScrolling), !1) ? 125 : 0, (e => + (0, r.jL)(e))), this.scrollableElement = this.disposables.add(new l.$Z( + this.rowsContainer, { + alwaysConsumeMouseWheel: (0, p.CJ)(n, (e => e.alwaysConsumeMouseWheel), + y.alwaysConsumeMouseWheel), + horizontal: 1, + vertical: (0, p.CJ)(n, (e => e.verticalScrollMode), y.verticalScrollMode), + useShadows: (0, p.CJ)(n, (e => e.useShadows), y.useShadows), + mouseWheelScrollSensitivity: n.mouseWheelScrollSensitivity, + fastScrollSensitivity: n.fastScrollSensitivity + }, this.scrollable)), this.domNode.appendChild(this.scrollableElement + .getDomNode()), e.appendChild(this.domNode), this.scrollableElement.onScroll( + this.onScroll, this, this.disposables), this.disposables.add((0, r.nm) + (this.rowsContainer, a.t.Change, (e => this.onTouchChange(e)))), + this.disposables.add((0, r.nm)(this.scrollableElement.getDomNode(), + "scroll", (e => e.target.scrollTop = 0))), this.disposables.add((0, + r.nm)(this.domNode, "dragover", (e => this.onDragOver(this.toDragEvent( + e))))), this.disposables.add((0, r.nm)(this.domNode, "drop", (e => + this.onDrop(this.toDragEvent(e))))), this.disposables.add((0, r.nm)( + this.domNode, "dragleave", (e => this.onDragLeave(this.toDragEvent( + e))))), this.disposables.add((0, r.nm)(this.domNode, "dragend", (e => + this.onDragEnd(e)))), this.setRowLineHeight = (0, p.CJ)(n, (e => e.setRowLineHeight), + y.setRowLineHeight), this.setRowHeight = (0, p.CJ)(n, (e => e.setRowHeight), + y.setRowHeight), this.supportDynamicHeights = (0, p.CJ)(n, (e => e.supportDynamicHeights), + y.supportDynamicHeights), this.dnd = (0, p.CJ)(n, (e => e.dnd), y.dnd), + this.layout() + } + get contentHeight() { + return this.rangeMap.size + } + get horizontalScrolling() { + return this._horizontalScrolling + } + set horizontalScrolling(e) { + if (e !== this._horizontalScrolling) { + if (e && this.supportDynamicHeights) throw new Error( + "Horizontal scrolling and dynamic heights not supported simultaneously" + ); + if (this._horizontalScrolling = e, this.domNode.classList.toggle( + "horizontal-scrolling", this._horizontalScrolling), this._horizontalScrolling) { + for (const e of this.items) this.measureItemWidth(e); + this.updateScrollWidth(), this.scrollableElement.setScrollDimensions({ + width: (0, r.FK)(this.domNode) + }), this.rowsContainer.style.width = + `${Math.max(this.scrollWidth||0,this.renderWidth)}px` + } else this.scrollableElementWidthDelayer.cancel(), this.scrollableElement + .setScrollDimensions({ + width: this.renderWidth, + scrollWidth: this.renderWidth + }), this.rowsContainer.style.width = "" + } + } + updateOptions(e) { + void 0 !== e.additionalScrollHeight && (this.additionalScrollHeight = + e.additionalScrollHeight, this.scrollableElement.setScrollDimensions({ + scrollHeight: this.scrollHeight + })), void 0 !== e.smoothScrolling && this.scrollable.setSmoothScrollDuration( + e.smoothScrolling ? 125 : 0), void 0 !== e.horizontalScrolling && ( + this.horizontalScrolling = e.horizontalScrolling), void 0 !== e.mouseWheelScrollSensitivity && + this.scrollableElement.updateOptions({ + mouseWheelScrollSensitivity: e.mouseWheelScrollSensitivity + }), void 0 !== e.fastScrollSensitivity && this.scrollableElement.updateOptions({ + fastScrollSensitivity: e.fastScrollSensitivity + }) + } + splice(e, t, i = []) { + if (this.splicing) throw new Error("Can't run recursive splices."); + this.splicing = !0; + try { + return this._splice(e, t, i) + } finally { + this.splicing = !1, this._onDidChangeContentHeight.fire(this.contentHeight) + } + } + _splice(e, t, i = []) { + const n = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight), + o = { + start: e, + end: e + t + }, + r = m.e.intersect(n, o), + s = new Map; + for (let e = r.start; e < r.end; e++) { + const t = this.items[e]; + if (t.dragStartDisposable.dispose(), t.row) { + let i = s.get(t.templateId); + i || (i = [], s.set(t.templateId, i)); + const n = this.renderers.get(t.templateId); + n && n.disposeElement && n.disposeElement(t.element, e, t.row.templateData, + t.size), i.push(t.row) + } + t.row = null + } + const a = { + start: e + t, + end: this.items.length + }, + l = m.e.intersect(a, n), + d = m.e.relativeComplement(a, n), + c = i.map((e => ({ + id: String(this.itemId++), + element: e, + templateId: this.virtualDelegate.getTemplateId(e), + size: this.virtualDelegate.getHeight(e), + width: void 0, + hasDynamicHeight: !!this.virtualDelegate.hasDynamicHeight && this + .virtualDelegate.hasDynamicHeight(e), + lastDynamicHeightWidth: void 0, + row: null, + uri: void 0, + dropTarget: !1, + dragStartDisposable: g.JT.None + }))); + let h; + 0 === e && t >= this.items.length ? (this.rangeMap = new v, this.rangeMap + .splice(0, 0, c), h = this.items, this.items = c) : (this.rangeMap.splice( + e, t, c), h = this.items.splice(e, t, ...c)); + const u = i.length - t, + p = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight), + f = b(l, u), + _ = m.e.intersect(p, f); + for (let e = _.start; e < _.end; e++) this.updateItemInDOM(this.items[ + e], e); + const w = m.e.relativeComplement(f, p); + for (const e of w) + for (let t = e.start; t < e.end; t++) this.removeItemFromDOM(t); + const C = d.map((e => b(e, u))), + y = [{ + start: e, + end: e + i.length + }, ...C].map((e => m.e.intersect(p, e))), + S = this.getNextToLastElement(y); + for (const e of y) + for (let t = e.start; t < e.end; t++) { + const e = this.items[t], + i = s.get(e.templateId), + n = null == i ? void 0 : i.pop(); + this.insertItemInDOM(t, S, n) + } + for (const e of s.values()) + for (const t of e) this.cache.release(t); + return this.eventuallyUpdateScrollDimensions(), this.supportDynamicHeights && + this._rerender(this.scrollTop, this.renderHeight), h.map((e => e.element)) + } + eventuallyUpdateScrollDimensions() { + this._scrollHeight = this.contentHeight, this.rowsContainer.style.height = + `${this._scrollHeight}px`, this.scrollableElementUpdateDisposable || + (this.scrollableElementUpdateDisposable = (0, r.jL)((() => { + this.scrollableElement.setScrollDimensions({ + scrollHeight: this.scrollHeight + }), this.updateScrollWidth(), this.scrollableElementUpdateDisposable = + null + }))) + } + eventuallyUpdateScrollWidth() { + this.horizontalScrolling ? this.scrollableElementWidthDelayer.trigger( + (() => this.updateScrollWidth())) : this.scrollableElementWidthDelayer + .cancel() + } + updateScrollWidth() { + if (!this.horizontalScrolling) return; + let e = 0; + for (const t of this.items) void 0 !== t.width && (e = Math.max(e, t.width)); + this.scrollWidth = e, this.scrollableElement.setScrollDimensions({ + scrollWidth: 0 === e ? 0 : e + 10 + }) + } + rerender() { + if (this.supportDynamicHeights) { + for (const e of this.items) e.lastDynamicHeightWidth = void 0; + this._rerender(this.lastRenderTop, this.lastRenderHeight) + } + } + get length() { + return this.items.length + } + get renderHeight() { + return this.scrollableElement.getScrollDimensions().height + } + element(e) { + return this.items[e].element + } + domElement(e) { + const t = this.items[e].row; + return t && t.domNode + } + elementHeight(e) { + return this.items[e].size + } + elementTop(e) { + return this.rangeMap.positionAt(e) + } + indexAt(e) { + return this.rangeMap.indexAt(e) + } + indexAfter(e) { + return this.rangeMap.indexAfter(e) + } + layout(e, t) { + let i = { + height: "number" == typeof e ? e : (0, r.If)(this.domNode) + }; + this.scrollableElementUpdateDisposable && (this.scrollableElementUpdateDisposable + .dispose(), this.scrollableElementUpdateDisposable = null, i.scrollHeight = + this.scrollHeight), this.scrollableElement.setScrollDimensions(i), + void 0 !== t && (this.renderWidth = t, this.supportDynamicHeights && + this._rerender(this.scrollTop, this.renderHeight)), this.horizontalScrolling && + this.scrollableElement.setScrollDimensions({ + width: "number" == typeof t ? t : (0, r.FK)(this.domNode) + }) + } + render(e, t, i, n, o, r = !1) { + const s = this.getRenderRange(t, i), + a = m.e.relativeComplement(s, e), + l = m.e.relativeComplement(e, s), + d = this.getNextToLastElement(a); + if (r) { + const t = m.e.intersect(e, s); + for (let e = t.start; e < t.end; e++) this.updateItemInDOM(this.items[ + e], e) + } + for (const e of a) + for (let t = e.start; t < e.end; t++) this.insertItemInDOM(t, d); + for (const e of l) + for (let t = e.start; t < e.end; t++) this.removeItemFromDOM(t); + void 0 !== n && (this.rowsContainer.style.left = `-${n}px`), this.rowsContainer + .style.top = `-${t}px`, this.horizontalScrolling && void 0 !== o && ( + this.rowsContainer.style.width = `${Math.max(o,this.renderWidth)}px` + ), this.lastRenderTop = t, this.lastRenderHeight = i + } + insertItemInDOM(e, t, i) { + const n = this.items[e]; + n.row || (n.row = null != i ? i : this.cache.alloc(n.templateId)); + const o = this.accessibilityProvider.getRole(n.element) || "listitem"; + n.row.domNode.setAttribute("role", o); + const s = this.accessibilityProvider.isChecked(n.element); + void 0 !== s && n.row.domNode.setAttribute("aria-checked", String(!!s)), + n.row.domNode.parentElement || (t ? this.rowsContainer.insertBefore(n + .row.domNode, t) : this.rowsContainer.appendChild(n.row.domNode)), + this.updateItemInDOM(n, e); + const a = this.renderers.get(n.templateId); + if (!a) throw new Error( + `No renderer found for template id ${n.templateId}`); + a && a.renderElement(n.element, e, n.row.templateData, n.size); + const l = this.dnd.getDragURI(n.element); + n.dragStartDisposable.dispose(), n.row.domNode.draggable = !!l, l && ( + n.dragStartDisposable = (0, r.nm)(n.row.domNode, "dragstart", (e => + this.onDragStart(n.element, l, e)))), this.horizontalScrolling && ( + this.measureItemWidth(n), this.eventuallyUpdateScrollWidth()) + } + measureItemWidth(e) { + if (!e.row || !e.row.domNode) return; + e.row.domNode.style.width = n.vU ? "-moz-fit-content" : "fit-content", + e.width = (0, r.FK)(e.row.domNode); + const t = window.getComputedStyle(e.row.domNode); + t.paddingLeft && (e.width += parseFloat(t.paddingLeft)), t.paddingRight && + (e.width += parseFloat(t.paddingRight)), e.row.domNode.style.width = + "" + } + updateItemInDOM(e, t) { + e.row.domNode.style.top = `${this.elementTop(t)}px`, this.setRowHeight && + (e.row.domNode.style.height = `${e.size}px`), this.setRowLineHeight && + (e.row.domNode.style.lineHeight = `${e.size}px`), e.row.domNode.setAttribute( + "data-index", `${t}`), e.row.domNode.setAttribute( + "data-last-element", t === this.length - 1 ? "true" : "false"), e.row + .domNode.setAttribute("aria-setsize", String(this.accessibilityProvider + .getSetSize(e.element, t, this.length))), e.row.domNode.setAttribute( + "aria-posinset", String(this.accessibilityProvider.getPosInSet(e.element, + t))), e.row.domNode.setAttribute("id", this.getElementDomId(t)), e.row + .domNode.classList.toggle("drop-target", e.dropTarget) + } + removeItemFromDOM(e) { + const t = this.items[e]; + if (t.dragStartDisposable.dispose(), t.row) { + const i = this.renderers.get(t.templateId); + i && i.disposeElement && i.disposeElement(t.element, e, t.row.templateData, + t.size), this.cache.release(t.row), t.row = null + } + this.horizontalScrolling && this.eventuallyUpdateScrollWidth() + } + getScrollTop() { + return this.scrollableElement.getScrollPosition().scrollTop + } + setScrollTop(e, t) { + this.scrollableElementUpdateDisposable && (this.scrollableElementUpdateDisposable + .dispose(), this.scrollableElementUpdateDisposable = null, this.scrollableElement + .setScrollDimensions({ + scrollHeight: this.scrollHeight + })), this.scrollableElement.setScrollPosition({ + scrollTop: e, + reuseAnimation: t + }) + } + get scrollTop() { + return this.getScrollTop() + } + set scrollTop(e) { + this.setScrollTop(e) + } + get scrollHeight() { + return this._scrollHeight + (this.horizontalScrolling ? 10 : 0) + this + .additionalScrollHeight + } + get onMouseClick() { + return u.ju.map(this.disposables.add(new s.Y(this.domNode, "click")).event, ( + e => this.toMouseEvent(e))) + } + get onMouseDblClick() { + return u.ju.map(this.disposables.add(new s.Y(this.domNode, "dblclick")) + .event, (e => this.toMouseEvent(e))) + } + get onMouseMiddleClick() { + return u.ju.filter(u.ju.map(this.disposables.add(new s.Y(this.domNode, + "auxclick")).event, (e => this.toMouseEvent(e))), (e => 1 === e.browserEvent + .button)) + } + get onMouseDown() { + return u.ju.map(this.disposables.add(new s.Y(this.domNode, "mousedown")) + .event, (e => this.toMouseEvent(e))) + } + get onContextMenu() { + return u.ju.any(u.ju.map(this.disposables.add(new s.Y(this.domNode, + "contextmenu")).event, (e => this.toMouseEvent(e))), u.ju.map(this.disposables + .add(new s.Y(this.domNode, a.t.Contextmenu)).event, (e => this.toGestureEvent( + e)))) + } + get onTouchStart() { + return u.ju.map(this.disposables.add(new s.Y(this.domNode, + "touchstart")).event, (e => this.toTouchEvent(e))) + } + get onTap() { + return u.ju.map(this.disposables.add(new s.Y(this.rowsContainer, a.t.Tap)) + .event, (e => this.toGestureEvent(e))) + } + toMouseEvent(e) { + const t = this.getItemIndexFromEventTarget(e.target || null), + i = void 0 === t ? void 0 : this.items[t]; + return { + browserEvent: e, + index: t, + element: i && i.element + } + } + toTouchEvent(e) { + const t = this.getItemIndexFromEventTarget(e.target || null), + i = void 0 === t ? void 0 : this.items[t]; + return { + browserEvent: e, + index: t, + element: i && i.element + } + } + toGestureEvent(e) { + const t = this.getItemIndexFromEventTarget(e.initialTarget || null), + i = void 0 === t ? void 0 : this.items[t]; + return { + browserEvent: e, + index: t, + element: i && i.element + } + } + toDragEvent(e) { + const t = this.getItemIndexFromEventTarget(e.target || null), + i = void 0 === t ? void 0 : this.items[t]; + return { + browserEvent: e, + index: t, + element: i && i.element + } + } + onScroll(e) { + try { + const t = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight); + this.render(t, e.scrollTop, e.height, e.scrollLeft, e.scrollWidth), + this.supportDynamicHeights && this._rerender(e.scrollTop, e.height, + e.inSmoothScrolling) + } catch (t) { + throw console.error("Got bad scroll event:", e), t + } + } + onTouchChange(e) { + e.preventDefault(), e.stopPropagation(), this.scrollTop -= e.translationY + } + onDragStart(e, t, i) { + if (!i.dataTransfer) return; + const n = this.dnd.getDragElements(e); + if (i.dataTransfer.effectAllowed = "copyMove", i.dataTransfer.setData( + o.go.TEXT, t), i.dataTransfer.setDragImage) { + let e; + this.dnd.getDragLabel && (e = this.dnd.getDragLabel(n, i)), void 0 === + e && (e = String(n.length)); + const t = (0, r.$)(".monaco-drag-image"); + t.textContent = e, document.body.appendChild(t), i.dataTransfer.setDragImage( + t, -10, -10), setTimeout((() => document.body.removeChild(t)), 0) + } + this.currentDragData = new S(n), o.P$.CurrentDragAndDropData = new x(n), + this.dnd.onDragStart && this.dnd.onDragStart(this.currentDragData, i) + } + onDragOver(e) { + if (e.browserEvent.preventDefault(), this.onDragLeaveTimeout.dispose(), + o.P$.CurrentDragAndDropData && "vscode-ui" === o.P$.CurrentDragAndDropData + .getData()) return !1; + if (this.setupDragAndDropScrollTopAnimation(e.browserEvent), !e.browserEvent + .dataTransfer) return !1; + if (!this.currentDragData) + if (o.P$.CurrentDragAndDropData) this.currentDragData = o.P$.CurrentDragAndDropData; + else { + if (!e.browserEvent.dataTransfer.types) return !1; + this.currentDragData = new k + } + const t = this.dnd.onDragOver(this.currentDragData, e.element, e.index, + e.browserEvent); + if (this.canDrop = "boolean" == typeof t ? t : t.accept, !this.canDrop) + return this.currentDragFeedback = void 0, this.currentDragFeedbackDisposable + .dispose(), !1; + let i; + if (e.browserEvent.dataTransfer.dropEffect = "boolean" != typeof t && + 0 === t.effect ? "copy" : "move", i = "boolean" != typeof t && t.feedback ? + t.feedback : void 0 === e.index ? [-1] : [e.index], i = (0, d.EB)(i).filter( + (e => e >= -1 && e < this.length)).sort(((e, t) => e - t)), i = -1 === + i[0] ? [-1] : i, n = this.currentDragFeedback, r = i, Array.isArray(n) && + Array.isArray(r) ? (0, d.fS)(n, r) : n === r) return !0; + var n, r; + if (this.currentDragFeedback = i, this.currentDragFeedbackDisposable.dispose(), - + 1 === i[0]) this.domNode.classList.add("drop-target"), this.rowsContainer + .classList.add("drop-target"), this.currentDragFeedbackDisposable = ( + 0, g.OF)((() => { + this.domNode.classList.remove("drop-target"), this.rowsContainer.classList + .remove("drop-target") + })); + else { + for (const e of i) { + const t = this.items[e]; + t.dropTarget = !0, t.row && t.row.domNode.classList.add( + "drop-target") + } + this.currentDragFeedbackDisposable = (0, g.OF)((() => { + for (const e of i) { + const t = this.items[e]; + t.dropTarget = !1, t.row && t.row.domNode.classList.remove( + "drop-target") + } + })) + } + return !0 + } + onDragLeave(e) { + var t, i; + this.onDragLeaveTimeout.dispose(), this.onDragLeaveTimeout = (0, c.Vg) + ((() => this.clearDragOverFeedback()), 100), this.currentDragData && + (null === (i = (t = this.dnd).onDragLeave) || void 0 === i || i.call( + t, this.currentDragData, e.element, e.index, e.browserEvent)) + } + onDrop(e) { + if (!this.canDrop) return; + const t = this.currentDragData; + this.teardownDragAndDropScrollTopAnimation(), this.clearDragOverFeedback(), + this.currentDragData = void 0, o.P$.CurrentDragAndDropData = void 0, + t && e.browserEvent.dataTransfer && (e.browserEvent.preventDefault(), + t.update(e.browserEvent.dataTransfer), this.dnd.drop(t, e.element, e + .index, e.browserEvent)) + } + onDragEnd(e) { + this.canDrop = !1, this.teardownDragAndDropScrollTopAnimation(), this.clearDragOverFeedback(), + this.currentDragData = void 0, o.P$.CurrentDragAndDropData = void 0, + this.dnd.onDragEnd && this.dnd.onDragEnd(e) + } + clearDragOverFeedback() { + this.currentDragFeedback = void 0, this.currentDragFeedbackDisposable.dispose(), + this.currentDragFeedbackDisposable = g.JT.None + } + setupDragAndDropScrollTopAnimation(e) { + if (!this.dragOverAnimationDisposable) { + const e = (0, r.xQ)(this.domNode).top; + this.dragOverAnimationDisposable = (0, r.jt)(this.animateDragAndDropScrollTop + .bind(this, e)) + } + this.dragOverAnimationStopDisposable.dispose(), this.dragOverAnimationStopDisposable = + (0, c.Vg)((() => { + this.dragOverAnimationDisposable && (this.dragOverAnimationDisposable + .dispose(), this.dragOverAnimationDisposable = void 0) + }), 1e3), this.dragOverMouseY = e.pageY + } + animateDragAndDropScrollTop(e) { + if (void 0 === this.dragOverMouseY) return; + const t = this.dragOverMouseY - e, + i = this.renderHeight - 35; + t < 35 ? this.scrollTop += Math.max(-14, Math.floor(.3 * (t - 35))) : + t > i && (this.scrollTop += Math.min(14, Math.floor(.3 * (t - i)))) + } + teardownDragAndDropScrollTopAnimation() { + this.dragOverAnimationStopDisposable.dispose(), this.dragOverAnimationDisposable && + (this.dragOverAnimationDisposable.dispose(), this.dragOverAnimationDisposable = + void 0) + } + getItemIndexFromEventTarget(e) { + const t = this.scrollableElement.getDomNode(); + let i = e; + for (; i instanceof HTMLElement && i !== this.rowsContainer && t.contains( + i);) { + const e = i.getAttribute("data-index"); + if (e) { + const t = Number(e); + if (!isNaN(t)) return t + } + i = i.parentElement + } + } + getRenderRange(e, t) { + return { + start: this.rangeMap.indexAt(e), + end: this.rangeMap.indexAfter(e + t - 1) + } + } + _rerender(e, t, i) { + const n = this.getRenderRange(e, t); + let o, r; + e === this.elementTop(n.start) ? (o = n.start, r = 0) : n.end - n.start > + 1 && (o = n.start + 1, r = this.elementTop(o) - e); + let s = 0; + for (;;) { + const a = this.getRenderRange(e, t); + let l = !1; + for (let e = a.start; e < a.end; e++) { + const t = this.probeDynamicHeight(e); + 0 !== t && this.rangeMap.splice(e, 1, [this.items[e]]), s += t, l = + l || 0 !== t + } + if (!l) { + 0 !== s && this.eventuallyUpdateScrollDimensions(); + const t = m.e.relativeComplement(n, a); + for (const e of t) + for (let t = e.start; t < e.end; t++) this.items[t].row && this.removeItemFromDOM( + t); + const l = m.e.relativeComplement(a, n); + for (const e of l) + for (let t = e.start; t < e.end; t++) { + const e = t + 1, + i = e < this.items.length ? this.items[e].row : null, + n = i ? i.domNode : null; + this.insertItemInDOM(t, n) + } + for (let e = a.start; e < a.end; e++) this.items[e].row && this.updateItemInDOM( + this.items[e], e); + if ("number" == typeof o) { + const t = this.scrollable.getFutureScrollPosition().scrollTop - e, + n = this.elementTop(o) - r + t; + this.setScrollTop(n, i) + } + return void this._onDidChangeContentHeight.fire(this.contentHeight) + } + } + } + probeDynamicHeight(e) { + const t = this.items[e]; + if (!t.hasDynamicHeight || t.lastDynamicHeightWidth === this.renderWidth) + return 0; + if (this.virtualDelegate.hasDynamicHeight && !this.virtualDelegate.hasDynamicHeight( + t.element)) return 0; + const i = t.size; + if (!this.setRowHeight && t.row) { + let e = t.row.domNode.offsetHeight; + return t.size = e, t.lastDynamicHeightWidth = this.renderWidth, e - i + } + const n = this.cache.alloc(t.templateId); + n.domNode.style.height = "", this.rowsContainer.appendChild(n.domNode); + const o = this.renderers.get(t.templateId); + return o && (o.renderElement(t.element, e, n.templateData, void 0), o.disposeElement && + o.disposeElement(t.element, e, n.templateData, void 0)), t.size = n.domNode + .offsetHeight, this.virtualDelegate.setDynamicHeight && this.virtualDelegate + .setDynamicHeight(t.element, t.size), t.lastDynamicHeightWidth = this + .renderWidth, this.rowsContainer.removeChild(n.domNode), this.cache.release( + n), t.size - i + } + getNextToLastElement(e) { + const t = e[e.length - 1]; + if (!t) return null; + const i = this.items[t.end]; + return i && i.row ? i.row.domNode : null + } + getElementDomId(e) { + return `${this.domId}_${e}` + } + dispose() { + if (this.items) { + for (const e of this.items) + if (e.row) { + const t = this.renderers.get(e.row.templateId); + t && (t.disposeElement && t.disposeElement(e.element, -1, e.row.templateData, + void 0), t.disposeTemplate(e.row.templateData)) + } + this.items = [] + } + this.domNode && this.domNode.parentNode && this.domNode.parentNode.removeChild( + this.domNode), (0, g.B9)(this.disposables) + } + } + N.InstanceCount = 0, C([h.H], N.prototype, "onMouseClick", null), C([h.H], + N.prototype, "onMouseDblClick", null), C([h.H], N.prototype, + "onMouseMiddleClick", null), C([h.H], N.prototype, "onMouseDown", null), + C([h.H], N.prototype, "onContextMenu", null), C([h.H], N.prototype, + "onTouchStart", null), C([h.H], N.prototype, "onTap", null) + }, + 3799: (e, t, i) => { + "use strict"; + i.d(t, { + WK: () => M, + wD: () => W, + aV: () => q, + sx: () => B, + cK: () => E, + hD: () => I, + wn: () => P, + Zo: () => O + }); + var n = i(5321), + o = i(4850), + r = i(9069), + s = i(553), + a = i(6346); + class l { + constructor(e) { + this.spliceables = e + } + splice(e, t, i) { + this.spliceables.forEach((n => n.splice(e, t, i))) + } + } + var d = i(9488), + c = i(5393), + h = i(1264), + u = i(9898), + g = i(4669), + p = i(5392), + m = i(5976), + f = i(9870), + _ = i(6248), + b = i(1432), + v = i(8401); + i(3164); + class w extends Error { + constructor(e, t) { + super(`ListError [${e}] ${t}`) + } + } + var C, y = i(5707), + S = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + x = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class k { + constructor(e) { + this.trait = e, this.renderedElements = [] + } + get templateId() { + return `template:${this.trait.trait}` + } + renderTemplate(e) { + return e + } + renderElement(e, t, i) { + const n = this.renderedElements.findIndex((e => e.templateData === i)); + if (n >= 0) { + const e = this.renderedElements[n]; + this.trait.unrender(i), e.index = t + } else { + const e = { + index: t, + templateData: i + }; + this.renderedElements.push(e) + } + this.trait.renderIndex(t, i) + } + splice(e, t, i) { + const n = []; + for (const o of this.renderedElements) o.index < e ? n.push(o) : o.index >= + e + t && n.push({ + index: o.index + i - t, + templateData: o.templateData + }); + this.renderedElements = n + } + renderIndexes(e) { + for (const { + index: t, + templateData: i + } + of this.renderedElements) e.indexOf(t) > -1 && this.trait.renderIndex( + t, i) + } + disposeTemplate(e) { + const t = this.renderedElements.findIndex((t => t.templateData === e)); + t < 0 || this.renderedElements.splice(t, 1) + } + } + class L { + constructor(e) { + this._trait = e, this.length = 0, this.indexes = [], this.sortedIndexes = [], + this._onChange = new g.Q5, this.onChange = this._onChange.event + } + get trait() { + return this._trait + } + get renderer() { + return new k(this) + } + splice(e, t, i) { + var n; + t = Math.max(0, Math.min(t, this.length - e)); + const o = i.length - t, + r = e + t, + s = [...this.sortedIndexes.filter((t => t < e)), ...i.map(((t, i) => + t ? i + e : -1)).filter((e => -1 !== e)), ...this.sortedIndexes.filter( + (e => e >= r)).map((e => e + o))], + a = this.length + o; + if (this.sortedIndexes.length > 0 && 0 === s.length && a > 0) { + const t = null !== (n = this.sortedIndexes.find((t => t >= e))) && + void 0 !== n ? n : a - 1; + s.push(Math.min(t, a - 1)) + } + this.renderer.splice(e, t, i.length), this._set(s, s), this.length = a + } + renderIndex(e, t) { + t.classList.toggle(this._trait, this.contains(e)) + } + unrender(e) { + e.classList.remove(this._trait) + } + set(e, t) { + return this._set(e, [...e].sort(U), t) + } + _set(e, t, i) { + const n = this.indexes, + o = this.sortedIndexes; + this.indexes = e, this.sortedIndexes = t; + const r = H(o, e); + return this.renderer.renderIndexes(r), this._onChange.fire({ + indexes: e, + browserEvent: i + }), n + } + get() { + return this.indexes + } + contains(e) { + return (0, d.ry)(this.sortedIndexes, e, U) >= 0 + } + dispose() { + (0, m.B9)(this._onChange) + } + } + S([u.H], L.prototype, "renderer", null); + class N extends L { + constructor(e) { + super("selected"), this.setAriaSelected = e + } + renderIndex(e, t) { + super.renderIndex(e, t), this.setAriaSelected && (this.contains(e) ? t + .setAttribute("aria-selected", "true") : t.setAttribute( + "aria-selected", "false")) + } + } + class D { + constructor(e, t, i) { + this.trait = e, this.view = t, this.identityProvider = i + } + splice(e, t, i) { + if (!this.identityProvider) return this.trait.splice(e, t, i.map((() => + !1))); + const n = this.trait.get().map((e => this.identityProvider.getId(this.view + .element(e)).toString())), + o = i.map((e => n.indexOf(this.identityProvider.getId(e).toString()) > + -1)); + this.trait.splice(e, t, o) + } + } + + function E(e) { + return "INPUT" === e.tagName || "TEXTAREA" === e.tagName + } + + function I(e) { + return !!e.classList.contains("monaco-editor") || !e.classList.contains( + "monaco-list") && !!e.parentElement && I(e.parentElement) + } + class T { + constructor(e, t, i) { + this.list = e, this.view = t, this.disposables = new m.SL, this.multipleSelectionDisposables = + new m.SL, this.onKeyDown.filter((e => 3 === e.keyCode)).on(this.onEnter, + this, this.disposables), this.onKeyDown.filter((e => 16 === e.keyCode)) + .on(this.onUpArrow, this, this.disposables), this.onKeyDown.filter((e => + 18 === e.keyCode)).on(this.onDownArrow, this, this.disposables), + this.onKeyDown.filter((e => 11 === e.keyCode)).on(this.onPageUpArrow, + this, this.disposables), this.onKeyDown.filter((e => 12 === e.keyCode)) + .on(this.onPageDownArrow, this, this.disposables), this.onKeyDown.filter( + (e => 9 === e.keyCode)).on(this.onEscape, this, this.disposables), ! + 1 !== i.multipleSelectionSupport && this.onKeyDown.filter((e => (b.dz ? + e.metaKey : e.ctrlKey) && 31 === e.keyCode)).on(this.onCtrlA, this, + this.multipleSelectionDisposables) + } + get onKeyDown() { + return g.ju.chain(this.disposables.add(new o.Y(this.view.domNode, + "keydown")).event).filter((e => !E(e.target))).map((e => new r.y(e))) + } + updateOptions(e) { + void 0 !== e.multipleSelectionSupport && (this.multipleSelectionDisposables + .clear(), e.multipleSelectionSupport && this.onKeyDown.filter((e => + (b.dz ? e.metaKey : e.ctrlKey) && 31 === e.keyCode)).on(this.onCtrlA, + this, this.multipleSelectionDisposables)) + } + onEnter(e) { + e.preventDefault(), e.stopPropagation(), this.list.setSelection(this.list + .getFocus(), e.browserEvent) + } + onUpArrow(e) { + e.preventDefault(), e.stopPropagation(), this.list.focusPrevious(1, !1, + e.browserEvent), this.list.reveal(this.list.getFocus()[0]), this.view + .domNode.focus() + } + onDownArrow(e) { + e.preventDefault(), e.stopPropagation(), this.list.focusNext(1, !1, e.browserEvent), + this.list.reveal(this.list.getFocus()[0]), this.view.domNode.focus() + } + onPageUpArrow(e) { + e.preventDefault(), e.stopPropagation(), this.list.focusPreviousPage(e + .browserEvent), this.list.reveal(this.list.getFocus()[0]), this.view + .domNode.focus() + } + onPageDownArrow(e) { + e.preventDefault(), e.stopPropagation(), this.list.focusNextPage(e.browserEvent), + this.list.reveal(this.list.getFocus()[0]), this.view.domNode.focus() + } + onCtrlA(e) { + e.preventDefault(), e.stopPropagation(), this.list.setSelection((0, d.w6) + (this.list.length), e.browserEvent), this.view.domNode.focus() + } + onEscape(e) { + this.list.getSelection().length && (e.preventDefault(), e.stopPropagation(), + this.list.setSelection([], e.browserEvent), this.view.domNode.focus() + ) + } + dispose() { + this.disposables.dispose(), this.multipleSelectionDisposables.dispose() + } + } + S([u.H], T.prototype, "onKeyDown", null), + function(e) { + e[e.Idle = 0] = "Idle", e[e.Typing = 1] = "Typing" + }(C || (C = {})); + const M = new class { + mightProducePrintableCharacter(e) { + return !(e.ctrlKey || e.metaKey || e.altKey) && (e.keyCode >= 31 && e + .keyCode <= 56 || e.keyCode >= 21 && e.keyCode <= 30 || e.keyCode >= + 93 && e.keyCode <= 102 || e.keyCode >= 80 && e.keyCode <= 90) + } + }; + class A { + constructor(e, t, i, n) { + this.list = e, this.view = t, this.keyboardNavigationLabelProvider = i, + this.delegate = n, this.enabled = !1, this.state = C.Idle, this.automaticKeyboardNavigation = ! + 0, this.triggered = !1, this.previouslyFocused = -1, this.enabledDisposables = + new m.SL, this.disposables = new m.SL, this.updateOptions(e.options) + } + updateOptions(e) { + void 0 === e.enableKeyboardNavigation || e.enableKeyboardNavigation ? + this.enable() : this.disable(), void 0 !== e.automaticKeyboardNavigation && + (this.automaticKeyboardNavigation = e.automaticKeyboardNavigation) + } + enable() { + if (this.enabled) return; + const e = g.ju.chain(this.enabledDisposables.add(new o.Y(this.view.domNode, + "keydown")).event).filter((e => !E(e.target))).filter((() => this.automaticKeyboardNavigation || + this.triggered)).map((e => new r.y(e))).filter((e => this.delegate.mightProducePrintableCharacter( + e))).forEach((e => { + e.stopPropagation(), e.preventDefault() + })).map((e => e.browserEvent.key)).event, + t = g.ju.debounce(e, (() => null), 800); + g.ju.reduce(g.ju.any(e, t), ((e, t) => null === t ? null : (e || "") + + t))(this.onInput, this, this.enabledDisposables), t(this.onClear, + this, this.enabledDisposables), this.enabled = !0, this.triggered = ! + 1 + } + disable() { + this.enabled && (this.enabledDisposables.clear(), this.enabled = !1, + this.triggered = !1) + } + onClear() { + var e; + const t = this.list.getFocus(); + if (t.length > 0 && t[0] === this.previouslyFocused) { + const i = null === (e = this.list.options.accessibilityProvider) || + void 0 === e ? void 0 : e.getAriaLabel(this.list.element(t[0])); + i && (0, a.Z9)(i) + } + this.previouslyFocused = -1 + } + onInput(e) { + if (!e) return this.state = C.Idle, void(this.triggered = !1); + const t = this.list.getFocus(), + i = t.length > 0 ? t[0] : 0, + n = this.state === C.Idle ? 1 : 0; + this.state = C.Typing; + for (let t = 0; t < this.list.length; t++) { + const o = (i + t + n) % this.list.length, + r = this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel( + this.view.element(o)), + s = r && r.toString(); + if (void 0 === s || (0, p.Ji)(e, s)) return this.previouslyFocused = + i, this.list.setFocus([o]), void this.list.reveal(o) + } + } + dispose() { + this.disable(), this.enabledDisposables.dispose(), this.disposables.dispose() + } + } + class R { + constructor(e, t) { + this.list = e, this.view = t, this.disposables = new m.SL, g.ju.chain( + this.disposables.add(new o.Y(t.domNode, "keydown")).event).filter((e => + !E(e.target))).map((e => new r.y(e))).filter((e => !(2 !== e.keyCode || + e.ctrlKey || e.metaKey || e.shiftKey || e.altKey))).on(this.onTab, + this, this.disposables) + } + onTab(e) { + if (e.target !== this.view.domNode) return; + const t = this.list.getFocus(); + if (0 === t.length) return; + const i = this.view.domElement(t[0]); + if (!i) return; + const n = i.querySelector("[tabIndex]"); + if (!(n && n instanceof HTMLElement && -1 !== n.tabIndex)) return; + const o = window.getComputedStyle(n); + "hidden" !== o.visibility && "none" !== o.display && (e.preventDefault(), + e.stopPropagation(), n.focus()) + } + dispose() { + this.disposables.dispose() + } + } + + function O(e) { + return b.dz ? e.browserEvent.metaKey : e.browserEvent.ctrlKey + } + + function P(e) { + return e.browserEvent.shiftKey + } + const F = { + isSelectionSingleChangeEvent: O, + isSelectionRangeChangeEvent: P + }; + class B { + constructor(e) { + this.list = e, this.disposables = new m.SL, this._onPointer = new g.Q5, + this.onPointer = this._onPointer.event, !1 !== e.options.multipleSelectionSupport && + (this.multipleSelectionController = this.list.options.multipleSelectionController || + F), this.mouseSupport = void 0 === e.options.mouseSupport || !!e.options + .mouseSupport, this.mouseSupport && (e.onMouseDown(this.onMouseDown, + this, this.disposables), e.onContextMenu(this.onContextMenu, this, + this.disposables), e.onMouseDblClick(this.onDoubleClick, this, this + .disposables), e.onTouchStart(this.onMouseDown, this, this.disposables), + this.disposables.add(s.o.addTarget(e.getHTMLElement()))), g.ju.any(e + .onMouseClick, e.onMouseMiddleClick, e.onTap)(this.onViewPointer, + this, this.disposables) + } + updateOptions(e) { + void 0 !== e.multipleSelectionSupport && (this.multipleSelectionController = + void 0, e.multipleSelectionSupport && (this.multipleSelectionController = + this.list.options.multipleSelectionController || F)) + } + isSelectionSingleChangeEvent(e) { + return !!this.multipleSelectionController && this.multipleSelectionController + .isSelectionSingleChangeEvent(e) + } + isSelectionRangeChangeEvent(e) { + return !!this.multipleSelectionController && this.multipleSelectionController + .isSelectionRangeChangeEvent(e) + } + isSelectionChangeEvent(e) { + return this.isSelectionSingleChangeEvent(e) || this.isSelectionRangeChangeEvent( + e) + } + onMouseDown(e) { + I(e.browserEvent.target) || document.activeElement !== e.browserEvent.target && + this.list.domFocus() + } + onContextMenu(e) { + if (I(e.browserEvent.target)) return; + const t = void 0 === e.index ? [] : [e.index]; + this.list.setFocus(t, e.browserEvent) + } + onViewPointer(e) { + if (!this.mouseSupport) return; + if (E(e.browserEvent.target) || I(e.browserEvent.target)) return; + const t = e.index; + return void 0 === t ? (this.list.setFocus([], e.browserEvent), this.list + .setSelection([], e.browserEvent), void this.list.setAnchor(void 0)) : + this.isSelectionRangeChangeEvent(e) || this.isSelectionChangeEvent(e) ? + this.changeSelection(e) : (this.list.setFocus([t], e.browserEvent), + this.list.setAnchor(t), (i = e.browserEvent) instanceof MouseEvent && + 2 === i.button || this.list.setSelection([t], e.browserEvent), void this + ._onPointer.fire(e)); + var i + } + onDoubleClick(e) { + if (E(e.browserEvent.target) || I(e.browserEvent.target)) return; + if (this.isSelectionChangeEvent(e)) return; + const t = this.list.getFocus(); + this.list.setSelection(t, e.browserEvent) + } + changeSelection(e) { + const t = e.index; + let i = this.list.getAnchor(); + if (this.isSelectionRangeChangeEvent(e)) { + if (void 0 === i) { + const e = this.list.getFocus()[0]; + i = null != e ? e : t, this.list.setAnchor(i) + } + const n = Math.min(i, t), + o = Math.max(i, t), + r = (0, d.w6)(n, o + 1), + s = this.list.getSelection(), + a = function(e, t) { + const i = e.indexOf(t); + if (-1 === i) return []; + const n = []; + let o = i - 1; + for (; o >= 0 && e[o] === t - (i - o);) n.push(e[o--]); + for (n.reverse(), o = i; o < e.length && e[o] === t + (o - i);) n.push( + e[o++]); + return n + }(H(s, [i]), i); + if (0 === a.length) return; + const l = H(r, function(e, t) { + const i = []; + let n = 0, + o = 0; + for (; n < e.length || o < t.length;) + if (n >= e.length) i.push(t[o++]); + else if (o >= t.length) i.push(e[n++]); + else { + if (e[n] === t[o]) { + n++, o++; + continue + } + e[n] < t[o] ? i.push(e[n++]) : o++ + } + return i + }(s, a)); + this.list.setSelection(l, e.browserEvent), this.list.setFocus([t], e.browserEvent) + } else if (this.isSelectionSingleChangeEvent(e)) { + const i = this.list.getSelection(), + n = i.filter((e => e !== t)); + this.list.setFocus([t]), this.list.setAnchor(t), i.length === n.length ? + this.list.setSelection([...n, t], e.browserEvent) : this.list.setSelection( + n, e.browserEvent) + } + } + dispose() { + this.disposables.dispose() + } + } + class W { + constructor(e, t) { + this.styleElement = e, this.selectorSuffix = t + } + style(e) { + const t = this.selectorSuffix && `.${this.selectorSuffix}`, + i = []; + e.listBackground && (e.listBackground.isOpaque() ? i.push( + `.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }` + ) : b.dz || console.warn( + `List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.` + )), e.listFocusBackground && (i.push( + `.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }` + ), i.push( + `.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }` + )), e.listFocusForeground && i.push( + `.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }` + ), e.listActiveSelectionBackground && (i.push( + `.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }` + ), i.push( + `.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }` + )), e.listActiveSelectionForeground && i.push( + `.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }` + ), e.listActiveSelectionIconForeground && i.push( + `.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }` + ), e.listFocusAndSelectionBackground && i.push( + `\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t` + ), e.listFocusAndSelectionForeground && i.push( + `\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t` + ), e.listInactiveFocusForeground && (i.push( + `.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }` + ), i.push( + `.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }` + )), e.listInactiveSelectionIconForeground && i.push( + `.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }` + ), e.listInactiveFocusBackground && (i.push( + `.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }` + ), i.push( + `.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }` + )), e.listInactiveSelectionBackground && (i.push( + `.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }` + ), i.push( + `.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }` + )), e.listInactiveSelectionForeground && i.push( + `.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }` + ), e.listHoverBackground && i.push( + `.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }` + ), e.listHoverForeground && i.push( + `.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }` + ), e.listSelectionOutline && i.push( + `.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }` + ), e.listFocusOutline && i.push( + `\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t` + ), e.listInactiveFocusOutline && i.push( + `.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }` + ), e.listHoverOutline && i.push( + `.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }` + ), e.listDropBackground && i.push( + `\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t` + ), e.listFilterWidgetBackground && i.push( + `.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }` + ), e.listFilterWidgetOutline && i.push( + `.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }` + ), e.listFilterWidgetNoMatchesOutline && i.push( + `.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }` + ), e.listMatchesShadow && i.push( + `.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }` + ), e.tableColumnsBorder && i.push( + `\n\t\t\t\t.monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t}` + ), this.styleElement.textContent = i.join("\n") + } + } + const z = { + listFocusBackground: h.Il.fromHex("#7FB0D0"), + listActiveSelectionBackground: h.Il.fromHex("#0E639C"), + listActiveSelectionForeground: h.Il.fromHex("#FFFFFF"), + listActiveSelectionIconForeground: h.Il.fromHex("#FFFFFF"), + listFocusAndSelectionBackground: h.Il.fromHex("#094771"), + listFocusAndSelectionForeground: h.Il.fromHex("#FFFFFF"), + listInactiveSelectionBackground: h.Il.fromHex("#3F3F46"), + listInactiveSelectionIconForeground: h.Il.fromHex("#FFFFFF"), + listHoverBackground: h.Il.fromHex("#2A2D2E"), + listDropBackground: h.Il.fromHex("#383B3D"), + treeIndentGuidesStroke: h.Il.fromHex("#a9a9a9"), + tableColumnsBorder: h.Il.fromHex("#cccccc").transparent(.2) + }, + V = { + keyboardSupport: !0, + mouseSupport: !0, + multipleSelectionSupport: !0, + dnd: { + getDragURI: () => null, + onDragStart() {}, + onDragOver: () => !1, + drop() {} + } + }; + + function H(e, t) { + const i = []; + let n = 0, + o = 0; + for (; n < e.length || o < t.length;) + if (n >= e.length) i.push(t[o++]); + else if (o >= t.length) i.push(e[n++]); + else { + if (e[n] === t[o]) { + i.push(e[n]), n++, o++; + continue + } + e[n] < t[o] ? i.push(e[n++]) : i.push(t[o++]) + } + return i + } + const U = (e, t) => e - t; + class j { + constructor(e, t) { + this._templateId = e, this.renderers = t + } + get templateId() { + return this._templateId + } + renderTemplate(e) { + return this.renderers.map((t => t.renderTemplate(e))) + } + renderElement(e, t, i, n) { + let o = 0; + for (const r of this.renderers) r.renderElement(e, t, i[o++], n) + } + disposeElement(e, t, i, n) { + let o = 0; + for (const r of this.renderers) r.disposeElement && r.disposeElement(e, + t, i[o], n), o += 1 + } + disposeTemplate(e) { + let t = 0; + for (const i of this.renderers) i.disposeTemplate(e[t++]) + } + } + class K { + constructor(e) { + this.accessibilityProvider = e, this.templateId = "a18n" + } + renderTemplate(e) { + return e + } + renderElement(e, t, i) { + const n = this.accessibilityProvider.getAriaLabel(e); + n ? i.setAttribute("aria-label", n) : i.removeAttribute("aria-label"); + const o = this.accessibilityProvider.getAriaLevel && this.accessibilityProvider + .getAriaLevel(e); + "number" == typeof o ? i.setAttribute("aria-level", `${o}`) : i.removeAttribute( + "aria-level") + } + disposeTemplate(e) {} + } + class $ { + constructor(e, t) { + this.list = e, this.dnd = t + } + getDragElements(e) { + const t = this.list.getSelectedElements(); + return t.indexOf(e) > -1 ? t : [e] + } + getDragURI(e) { + return this.dnd.getDragURI(e) + } + getDragLabel(e, t) { + if (this.dnd.getDragLabel) return this.dnd.getDragLabel(e, t) + } + onDragStart(e, t) { + this.dnd.onDragStart && this.dnd.onDragStart(e, t) + } + onDragOver(e, t, i, n) { + return this.dnd.onDragOver(e, t, i, n) + } + onDragLeave(e, t, i, n) { + var o, r; + null === (r = (o = this.dnd).onDragLeave) || void 0 === r || r.call(o, + e, t, i, n) + } + onDragEnd(e) { + this.dnd.onDragEnd && this.dnd.onDragEnd(e) + } + drop(e, t, i, n) { + this.dnd.drop(e, t, i, n) + } + } + class q { + constructor(e, t, i, o, r = V) { + var s; + this.user = e, this._options = r, this.focus = new L("focused"), this.anchor = + new L("anchor"), this.eventBufferer = new g.E7, this._ariaLabel = "", + this.disposables = new m.SL, this._onDidDispose = new g.Q5, this.onDidDispose = + this._onDidDispose.event; + const a = this._options.accessibilityProvider && this._options.accessibilityProvider + .getWidgetRole ? null === (s = this._options.accessibilityProvider) || + void 0 === s ? void 0 : s.getWidgetRole() : "list"; + this.selection = new N("listbox" !== a), (0, _.jB)(r, z, !1); + const d = [this.focus.renderer, this.selection.renderer]; + this.accessibilityProvider = r.accessibilityProvider, this.accessibilityProvider && + (d.push(new K(this.accessibilityProvider)), this.accessibilityProvider + .onDidChangeActiveDescendant && this.accessibilityProvider.onDidChangeActiveDescendant( + this.onDidChangeActiveDescendant, this, this.disposables)), o = o.map( + (e => new j(e.templateId, [...d, e]))); + const c = Object.assign(Object.assign({}, r), { + dnd: r.dnd && new $(this, r.dnd) + }); + if (this.view = new y.Bv(t, i, o, c), this.view.domNode.setAttribute( + "role", a), r.styleController) this.styleController = r.styleController( + this.view.domId); + else { + const e = (0, n.dS)(this.view.domNode); + this.styleController = new W(e, this.view.domId) + } + if (this.spliceable = new l([new D(this.focus, this.view, r.identityProvider), + new D(this.selection, this.view, r.identityProvider), new D(this.anchor, + this.view, r.identityProvider), this.view + ]), this.disposables.add(this.focus), this.disposables.add(this.selection), + this.disposables.add(this.anchor), this.disposables.add(this.view), + this.disposables.add(this._onDidDispose), this.disposables.add(new R( + this, this.view)), ("boolean" != typeof r.keyboardSupport || r.keyboardSupport) && + (this.keyboardController = new T(this, this.view, r), this.disposables + .add(this.keyboardController)), r.keyboardNavigationLabelProvider) { + const e = r.keyboardNavigationDelegate || M; + this.typeLabelController = new A(this, this.view, r.keyboardNavigationLabelProvider, + e), this.disposables.add(this.typeLabelController) + } + this.mouseController = this.createMouseController(r), this.disposables + .add(this.mouseController), this.onDidChangeFocus(this._onFocusChange, + this, this.disposables), this.onDidChangeSelection(this._onSelectionChange, + this, this.disposables), this.accessibilityProvider && (this.ariaLabel = + this.accessibilityProvider.getWidgetAriaLabel()), !1 !== this._options + .multipleSelectionSupport && this.view.domNode.setAttribute( + "aria-multiselectable", "true") + } + get onDidChangeFocus() { + return g.ju.map(this.eventBufferer.wrapEvent(this.focus.onChange), (e => + this.toListEvent(e))) + } + get onDidChangeSelection() { + return g.ju.map(this.eventBufferer.wrapEvent(this.selection.onChange), ( + e => this.toListEvent(e))) + } + get domId() { + return this.view.domId + } + get onMouseClick() { + return this.view.onMouseClick + } + get onMouseDblClick() { + return this.view.onMouseDblClick + } + get onMouseMiddleClick() { + return this.view.onMouseMiddleClick + } + get onPointer() { + return this.mouseController.onPointer + } + get onMouseDown() { + return this.view.onMouseDown + } + get onTouchStart() { + return this.view.onTouchStart + } + get onTap() { + return this.view.onTap + } + get onContextMenu() { + let e = !1; + const t = g.ju.chain(this.disposables.add(new o.Y(this.view.domNode, + "keydown")).event).map((e => new r.y(e))).filter((t => e = 58 === t.keyCode || + t.shiftKey && 68 === t.keyCode)).map(o.p).filter((() => !1)).event, + i = g.ju.chain(this.disposables.add(new o.Y(this.view.domNode, + "keyup")).event).forEach((() => e = !1)).map((e => new r.y(e))).filter( + (e => 58 === e.keyCode || e.shiftKey && 68 === e.keyCode)).map(o.p).map( + (({ + browserEvent: e + }) => { + const t = this.getFocus(), + i = t.length ? t[0] : void 0; + return { + index: i, + element: void 0 !== i ? this.view.element(i) : void 0, + anchor: void 0 !== i ? this.view.domElement(i) : this.view.domNode, + browserEvent: e + } + })).event, + n = g.ju.chain(this.view.onContextMenu).filter((t => !e)).map((({ + element: e, + index: t, + browserEvent: i + }) => ({ + element: e, + index: t, + anchor: { + x: i.pageX + 1, + y: i.pageY + }, + browserEvent: i + }))).event; + return g.ju.any(t, i, n) + } + get onKeyDown() { + return this.disposables.add(new o.Y(this.view.domNode, "keydown")).event + } + get onDidFocus() { + return g.ju.signal(this.disposables.add(new o.Y(this.view.domNode, + "focus", !0)).event) + } + createMouseController(e) { + return new B(this) + } + updateOptions(e = {}) { + var t; + this._options = Object.assign(Object.assign({}, this._options), e), + this.typeLabelController && this.typeLabelController.updateOptions( + this._options), void 0 !== this._options.multipleSelectionController && + (this._options.multipleSelectionSupport ? this.view.domNode.setAttribute( + "aria-multiselectable", "true") : this.view.domNode.removeAttribute( + "aria-multiselectable")), this.mouseController.updateOptions(e), + null === (t = this.keyboardController) || void 0 === t || t.updateOptions( + e), this.view.updateOptions(e) + } + get options() { + return this._options + } + splice(e, t, i = []) { + if (e < 0 || e > this.view.length) throw new w(this.user, + `Invalid start index: ${e}`); + if (t < 0) throw new w(this.user, `Invalid delete count: ${t}`); + 0 === t && 0 === i.length || this.eventBufferer.bufferEvents((() => + this.spliceable.splice(e, t, i))) + } + rerender() { + this.view.rerender() + } + element(e) { + return this.view.element(e) + } + get length() { + return this.view.length + } + get contentHeight() { + return this.view.contentHeight + } + get scrollTop() { + return this.view.getScrollTop() + } + set scrollTop(e) { + this.view.setScrollTop(e) + } + get ariaLabel() { + return this._ariaLabel + } + set ariaLabel(e) { + this._ariaLabel = e, this.view.domNode.setAttribute("aria-label", e) + } + domFocus() { + this.view.domNode.focus({ + preventScroll: !0 + }) + } + layout(e, t) { + this.view.layout(e, t) + } + setSelection(e, t) { + for (const t of e) + if (t < 0 || t >= this.length) throw new w(this.user, + `Invalid index ${t}`); + this.selection.set(e, t) + } + getSelection() { + return this.selection.get() + } + getSelectedElements() { + return this.getSelection().map((e => this.view.element(e))) + } + setAnchor(e) { + if (void 0 !== e) { + if (e < 0 || e >= this.length) throw new w(this.user, + `Invalid index ${e}`); + this.anchor.set([e]) + } else this.anchor.set([]) + } + getAnchor() { + return (0, d.Xh)(this.anchor.get(), void 0) + } + getAnchorElement() { + const e = this.getAnchor(); + return void 0 === e ? void 0 : this.element(e) + } + setFocus(e, t) { + for (const t of e) + if (t < 0 || t >= this.length) throw new w(this.user, + `Invalid index ${t}`); + this.focus.set(e, t) + } + focusNext(e = 1, t = !1, i, n) { + if (0 === this.length) return; + const o = this.focus.get(), + r = this.findNextIndex(o.length > 0 ? o[0] + e : 0, t, n); + r > -1 && this.setFocus([r], i) + } + focusPrevious(e = 1, t = !1, i, n) { + if (0 === this.length) return; + const o = this.focus.get(), + r = this.findPreviousIndex(o.length > 0 ? o[0] - e : 0, t, n); + r > -1 && this.setFocus([r], i) + } + focusNextPage(e, t) { + return x(this, void 0, void 0, (function*() { + let i = this.view.indexAt(this.view.getScrollTop() + this.view.renderHeight); + i = 0 === i ? 0 : i - 1; + const n = this.view.element(i), + o = this.getFocusedElements()[0]; + if (o !== n) { + const n = this.findPreviousIndex(i, !1, t); + n > -1 && o !== this.view.element(n) ? this.setFocus([n], e) : + this.setFocus([i], e) + } else { + const n = this.view.getScrollTop(); + this.view.setScrollTop(n + this.view.renderHeight - this.view.elementHeight( + i)), this.view.getScrollTop() !== n && (this.setFocus([]), + yield(0, c.Vs)(0), yield this.focusNextPage(e, t)) + } + })) + } + focusPreviousPage(e, t) { + return x(this, void 0, void 0, (function*() { + let i; + const n = this.view.getScrollTop(); + i = 0 === n ? this.view.indexAt(n) : this.view.indexAfter(n - 1); + const o = this.view.element(i), + r = this.getFocusedElements()[0]; + if (r !== o) { + const n = this.findNextIndex(i, !1, t); + n > -1 && r !== this.view.element(n) ? this.setFocus([n], e) : + this.setFocus([i], e) + } else { + const i = n; + this.view.setScrollTop(n - this.view.renderHeight), this.view.getScrollTop() !== + i && (this.setFocus([]), yield(0, c.Vs)(0), yield this.focusPreviousPage( + e, t)) + } + })) + } + focusLast(e, t) { + if (0 === this.length) return; + const i = this.findPreviousIndex(this.length - 1, !1, t); + i > -1 && this.setFocus([i], e) + } + focusFirst(e, t) { + this.focusNth(0, e, t) + } + focusNth(e, t, i) { + if (0 === this.length) return; + const n = this.findNextIndex(e, !1, i); + n > -1 && this.setFocus([n], t) + } + findNextIndex(e, t = !1, i) { + for (let n = 0; n < this.length; n++) { + if (e >= this.length && !t) return -1; + if (e %= this.length, !i || i(this.element(e))) return e; + e++ + } + return -1 + } + findPreviousIndex(e, t = !1, i) { + for (let n = 0; n < this.length; n++) { + if (e < 0 && !t) return -1; + if (e = (this.length + e % this.length) % this.length, !i || i(this.element( + e))) return e; + e-- + } + return -1 + } + getFocus() { + return this.focus.get() + } + getFocusedElements() { + return this.getFocus().map((e => this.view.element(e))) + } + reveal(e, t) { + if (e < 0 || e >= this.length) throw new w(this.user, + `Invalid index ${e}`); + const i = this.view.getScrollTop(), + n = this.view.elementTop(e), + o = this.view.elementHeight(e); + if ((0, v.hj)(t)) { + const e = o - this.view.renderHeight; + this.view.setScrollTop(e * (0, f.u)(t, 0, 1) + n) + } else { + const e = n + o, + t = i + this.view.renderHeight; + n < i && e >= t || (n < i || e >= t && o >= this.view.renderHeight ? + this.view.setScrollTop(n) : e >= t && this.view.setScrollTop(e - + this.view.renderHeight)) + } + } + getRelativeTop(e) { + if (e < 0 || e >= this.length) throw new w(this.user, + `Invalid index ${e}`); + const t = this.view.getScrollTop(), + i = this.view.elementTop(e), + n = this.view.elementHeight(e); + if (i < t || i + n > t + this.view.renderHeight) return null; + const o = n - this.view.renderHeight; + return Math.abs((t - i) / o) + } + getHTMLElement() { + return this.view.domNode + } + style(e) { + this.styleController.style(e) + } + toListEvent({ + indexes: e, + browserEvent: t + }) { + return { + indexes: e, + elements: e.map((e => this.view.element(e))), + browserEvent: t + } + } + _onFocusChange() { + const e = this.focus.get(); + this.view.domNode.classList.toggle("element-focused", e.length > 0), + this.onDidChangeActiveDescendant() + } + onDidChangeActiveDescendant() { + var e; + const t = this.focus.get(); + if (t.length > 0) { + let i; + (null === (e = this.accessibilityProvider) || void 0 === e ? void 0 : + e.getActiveDescendantId) && (i = this.accessibilityProvider.getActiveDescendantId( + this.view.element(t[0]))), this.view.domNode.setAttribute( + "aria-activedescendant", i || this.view.getElementDomId(t[0])) + } else this.view.domNode.removeAttribute("aria-activedescendant") + } + _onSelectionChange() { + const e = this.selection.get(); + this.view.domNode.classList.toggle("selection-none", 0 === e.length), + this.view.domNode.classList.toggle("selection-single", 1 === e.length), + this.view.domNode.classList.toggle("selection-multiple", e.length > 1) + } + dispose() { + this._onDidDispose.fire(), this.disposables.dispose(), this._onDidDispose + .dispose() + } + } + S([u.H], q.prototype, "onDidChangeFocus", null), S([u.H], q.prototype, + "onDidChangeSelection", null), S([u.H], q.prototype, "onContextMenu", + null), S([u.H], q.prototype, "onKeyDown", null), S([u.H], q.prototype, + "onDidFocus", null) + }, + 1185: (e, t, i) => { + "use strict"; + i.d(t, { + S: () => _ + }); + var n = i(3379), + o = i.n(n), + r = i(7795), + s = i.n(r), + a = i(569), + l = i.n(a), + d = i(3565), + c = i.n(d), + h = i(9216), + u = i.n(h), + g = i(4589), + p = i.n(g), + m = i(7548), + f = {}; + f.styleTagTransform = p(), f.setAttributes = c(), f.insert = l().bind( + null, "head"), f.domAPI = s(), f.insertStyleElement = u(), o()(m.Z, f), + m.Z && m.Z.locals && m.Z.locals; + const _ = "monaco-mouse-cursor-text" + }, + 3841: (e, t, i) => { + "use strict"; + i.d(t, { + l: () => k, + g: () => M + }); + var n = i(5321), + o = i(4850), + r = i(553), + s = i(5393), + a = i(9898), + l = i(4669), + d = i(5976), + c = i(1432), + h = i(3379), + u = i.n(h), + g = i(7795), + p = i.n(g), + m = i(569), + f = i.n(m), + _ = i(3565), + b = i.n(_), + v = i(9216), + w = i.n(v), + C = i(4589), + y = i.n(C), + S = i(1629), + x = {}; + x.styleTagTransform = y(), x.setAttributes = b(), x.insert = f().bind( + null, "head"), x.domAPI = p(), x.insertStyleElement = w(), u()(S.Z, x), + S.Z && S.Z.locals && S.Z.locals; + var k, L = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }; + ! function(e) { + e.North = "north", e.South = "south", e.East = "east", e.West = "west" + }(k || (k = {})); + const N = new l.Q5, + D = new l.Q5; + class E { + constructor() { + this.disposables = new d.SL + } + get onPointerMove() { + return this.disposables.add(new o.Y(window, "mousemove")).event + } + get onPointerUp() { + return this.disposables.add(new o.Y(window, "mouseup")).event + } + dispose() { + this.disposables.dispose() + } + } + L([a.H], E.prototype, "onPointerMove", null), L([a.H], E.prototype, + "onPointerUp", null); + class I { + constructor(e) { + this.el = e, this.disposables = new d.SL + } + get onPointerMove() { + return this.disposables.add(new o.Y(this.el, r.t.Change)).event + } + get onPointerUp() { + return this.disposables.add(new o.Y(this.el, r.t.End)).event + } + dispose() { + this.disposables.dispose() + } + } + L([a.H], I.prototype, "onPointerMove", null), L([a.H], I.prototype, + "onPointerUp", null); + class T { + constructor(e) { + this.factory = e + } + get onPointerMove() { + return this.factory.onPointerMove + } + get onPointerUp() { + return this.factory.onPointerUp + } + dispose() {} + } + L([a.H], T.prototype, "onPointerMove", null), L([a.H], T.prototype, + "onPointerUp", null); + class M extends d.JT { + constructor(e, t, i) { + super(), this.hoverDelay = 300, this.hoverDelayer = this._register( + new s.vp(this.hoverDelay)), this._state = 3, this._onDidEnablementChange = + this._register(new l.Q5), this.onDidEnablementChange = this._onDidEnablementChange + .event, this._onDidStart = this._register(new l.Q5), this.onDidStart = + this._onDidStart.event, this._onDidChange = this._register(new l.Q5), + this.onDidChange = this._onDidChange.event, this._onDidReset = this._register( + new l.Q5), this.onDidReset = this._onDidReset.event, this._onDidEnd = + this._register(new l.Q5), this.onDidEnd = this._onDidEnd.event, this + .linkedSash = void 0, this.orthogonalStartSashDisposables = this._register( + new d.SL), this.orthogonalStartDragHandleDisposables = this._register( + new d.SL), this.orthogonalEndSashDisposables = this._register(new d + .SL), this.orthogonalEndDragHandleDisposables = this._register(new d + .SL), this.el = (0, n.R3)(e, (0, n.$)(".monaco-sash")), i.orthogonalEdge && + this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`), c.dz && + this.el.classList.add("mac"); + const a = this._register(new o.Y(this.el, "mousedown")).event; + this._register(a((e => this.onPointerStart(e, new E)), this)); + const h = this._register(new o.Y(this.el, "dblclick")).event; + this._register(h(this.onPointerDoublePress, this)); + const u = this._register(new o.Y(this.el, "mouseenter")).event; + this._register(u((() => M.onMouseEnter(this)))); + const g = this._register(new o.Y(this.el, "mouseleave")).event; + this._register(g((() => M.onMouseLeave(this)))), this._register(r.o.addTarget( + this.el)); + const p = l.ju.map(this._register(new o.Y(this.el, r.t.Start)).event, ( + e => { + var t; + return Object.assign(Object.assign({}, e), { + target: null !== (t = e.initialTarget) && void 0 !== t ? t : null + }) + })); + this._register(p((e => this.onPointerStart(e, new I(this.el))), this)); + const m = this._register(new o.Y(this.el, r.t.Tap)).event, + f = l.ju.map(l.ju.filter(l.ju.debounce(m, ((e, t) => { + var i; + return { + event: t, + count: (null !== (i = null == e ? void 0 : e.count) && void 0 !== + i ? i : 0) + 1 + } + }), 250), (({ + count: e + }) => 2 === e)), (({ + event: e + }) => { + var t; + return Object.assign(Object.assign({}, e), { + target: null !== (t = e.initialTarget) && void 0 !== t ? t : null + }) + })); + this._register(f(this.onPointerDoublePress, this)), "number" == + typeof i.size ? (this.size = i.size, 0 === i.orientation ? this.el.style + .width = `${this.size}px` : this.el.style.height = `${this.size}px` + ) : (this.size = 4, this._register(N.event((e => { + this.size = e, this.layout() + })))), this._register(D.event((e => this.hoverDelay = e))), this.hidden = ! + 1, this.layoutProvider = t, this.orthogonalStartSash = i.orthogonalStartSash, + this.orthogonalEndSash = i.orthogonalEndSash, this.orientation = i.orientation || + 0, 1 === this.orientation ? (this.el.classList.add("horizontal"), + this.el.classList.remove("vertical")) : (this.el.classList.remove( + "horizontal"), this.el.classList.add("vertical")), this.el.classList + .toggle("debug", !1), this.layout() + } + get state() { + return this._state + } + set state(e) { + this._state !== e && (this.el.classList.toggle("disabled", 0 === e), + this.el.classList.toggle("minimum", 1 === e), this.el.classList.toggle( + "maximum", 2 === e), this._state = e, this._onDidEnablementChange.fire( + e)) + } + get orthogonalStartSash() { + return this._orthogonalStartSash + } + set orthogonalStartSash(e) { + if (this.orthogonalStartDragHandleDisposables.clear(), this.orthogonalStartSashDisposables + .clear(), e) { + const t = t => { + this.orthogonalStartDragHandleDisposables.clear(), 0 !== t && ( + this._orthogonalStartDragHandle = (0, n.R3)(this.el, (0, n.$)( + ".orthogonal-drag-handle.start")), this.orthogonalStartDragHandleDisposables + .add((0, d.OF)((() => this._orthogonalStartDragHandle.remove()))), + this.orthogonalStartDragHandleDisposables.add(new o.Y(this._orthogonalStartDragHandle, + "mouseenter")).event((() => M.onMouseEnter(e)), void 0, this.orthogonalStartDragHandleDisposables), + this.orthogonalStartDragHandleDisposables.add(new o.Y(this._orthogonalStartDragHandle, + "mouseleave")).event((() => M.onMouseLeave(e)), void 0, this.orthogonalStartDragHandleDisposables) + ) + }; + this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(t, + this)), t(e.state) + } + this._orthogonalStartSash = e + } + get orthogonalEndSash() { + return this._orthogonalEndSash + } + set orthogonalEndSash(e) { + if (this.orthogonalEndDragHandleDisposables.clear(), this.orthogonalEndSashDisposables + .clear(), e) { + const t = t => { + this.orthogonalEndDragHandleDisposables.clear(), 0 !== t && (this._orthogonalEndDragHandle = + (0, n.R3)(this.el, (0, n.$)(".orthogonal-drag-handle.end")), + this.orthogonalEndDragHandleDisposables.add((0, d.OF)((() => + this._orthogonalEndDragHandle.remove()))), this.orthogonalEndDragHandleDisposables + .add(new o.Y(this._orthogonalEndDragHandle, "mouseenter")).event( + (() => M.onMouseEnter(e)), void 0, this.orthogonalEndDragHandleDisposables + ), this.orthogonalEndDragHandleDisposables.add(new o.Y(this._orthogonalEndDragHandle, + "mouseleave")).event((() => M.onMouseLeave(e)), void 0, this.orthogonalEndDragHandleDisposables) + ) + }; + this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(t, + this)), t(e.state) + } + this._orthogonalEndSash = e + } + onPointerStart(e, t) { + n.zB.stop(e); + let i = !1; + if (!e.__orthogonalSashEvent) { + const n = this.getOrthogonalSash(e); + n && (i = !0, e.__orthogonalSashEvent = !0, n.onPointerStart(e, new T( + t))) + } + if (this.linkedSash && !e.__linkedSashEvent && (e.__linkedSashEvent = ! + 0, this.linkedSash.onPointerStart(e, new T(t))), !this.state) return + ; + const o = (0, n.H$)("iframe"); + for (const e of o) e.style.pointerEvents = "none"; + const r = e.pageX, + s = e.pageY, + a = e.altKey, + l = { + startX: r, + currentX: r, + startY: s, + currentY: s, + altKey: a + }; + this.el.classList.add("active"), this._onDidStart.fire(l); + const h = (0, n.dS)(this.el), + u = () => { + let e = ""; + e = i ? "all-scroll" : 1 === this.orientation ? 1 === this.state ? + "s-resize" : 2 === this.state ? "n-resize" : c.dz ? "row-resize" : + "ns-resize" : 1 === this.state ? "e-resize" : 2 === this.state ? + "w-resize" : c.dz ? "col-resize" : "ew-resize", h.textContent = + `* { cursor: ${e} !important; }` + }, + g = new d.SL; + u(), i || this.onDidEnablementChange(u, null, g), t.onPointerMove((e => { + n.zB.stop(e, !1); + const t = { + startX: r, + currentX: e.pageX, + startY: s, + currentY: e.pageY, + altKey: a + }; + this._onDidChange.fire(t) + }), null, g), t.onPointerUp((e => { + n.zB.stop(e, !1), this.el.removeChild(h), this.el.classList.remove( + "active"), this._onDidEnd.fire(), g.dispose(); + for (const e of o) e.style.pointerEvents = "auto" + }), null, g), g.add(t) + } + onPointerDoublePress(e) { + const t = this.getOrthogonalSash(e); + t && t._onDidReset.fire(), this.linkedSash && this.linkedSash._onDidReset + .fire(), this._onDidReset.fire() + } + static onMouseEnter(e, t = !1) { + e.el.classList.contains("active") ? (e.hoverDelayer.cancel(), e.el.classList + .add("hover")) : e.hoverDelayer.trigger((() => e.el.classList.add( + "hover")), e.hoverDelay).then(void 0, (() => {})), !t && e.linkedSash && + M.onMouseEnter(e.linkedSash, !0) + } + static onMouseLeave(e, t = !1) { + e.hoverDelayer.cancel(), e.el.classList.remove("hover"), !t && e.linkedSash && + M.onMouseLeave(e.linkedSash, !0) + } + clearSashHoverState() { + M.onMouseLeave(this) + } + layout() { + if (0 === this.orientation) { + const e = this.layoutProvider; + this.el.style.left = e.getVerticalSashLeft(this) - this.size / 2 + + "px", e.getVerticalSashTop && (this.el.style.top = e.getVerticalSashTop( + this) + "px"), e.getVerticalSashHeight && (this.el.style.height = + e.getVerticalSashHeight(this) + "px") + } else { + const e = this.layoutProvider; + this.el.style.top = e.getHorizontalSashTop(this) - this.size / 2 + + "px", e.getHorizontalSashLeft && (this.el.style.left = e.getHorizontalSashLeft( + this) + "px"), e.getHorizontalSashWidth && (this.el.style.width = + e.getHorizontalSashWidth(this) + "px") + } + } + hide() { + this.hidden = !0, this.el.style.display = "none", this.el.setAttribute( + "aria-hidden", "true") + } + getOrthogonalSash(e) { + if (e.target && e.target instanceof HTMLElement) return e.target.classList + .contains("orthogonal-drag-handle") ? e.target.classList.contains( + "start") ? this.orthogonalStartSash : this.orthogonalEndSash : + void 0 + } + dispose() { + super.dispose(), this.el.remove() + } + } + }, + 6781: (e, t, i) => { + "use strict"; + i.d(t, { + s$: () => j, + NB: () => H, + $Z: () => U + }); + var n = i(6268), + o = i(5321), + r = i(8626), + s = i(3938), + a = i(7974), + l = i(3794), + d = i(5393); + class c extends l.$ { + constructor(e) { + super(), this._onActivate = e.onActivate, this.bgDomNode = document.createElement( + "div"), this.bgDomNode.className = "arrow-background", this.bgDomNode + .style.position = "absolute", this.bgDomNode.style.width = e.bgWidth + + "px", this.bgDomNode.style.height = e.bgHeight + "px", void 0 !== e.top && + (this.bgDomNode.style.top = "0px"), void 0 !== e.left && (this.bgDomNode + .style.left = "0px"), void 0 !== e.bottom && (this.bgDomNode.style.bottom = + "0px"), void 0 !== e.right && (this.bgDomNode.style.right = "0px"), + this.domNode = document.createElement("div"), this.domNode.className = + e.className, this.domNode.classList.add(...e.icon.classNamesArray), + this.domNode.style.position = "absolute", this.domNode.style.width = + "11px", this.domNode.style.height = "11px", void 0 !== e.top && ( + this.domNode.style.top = e.top + "px"), void 0 !== e.left && (this.domNode + .style.left = e.left + "px"), void 0 !== e.bottom && (this.domNode.style + .bottom = e.bottom + "px"), void 0 !== e.right && (this.domNode.style + .right = e.right + "px"), this._mouseMoveMonitor = this._register( + new a.Z), this.onmousedown(this.bgDomNode, (e => this._arrowMouseDown( + e))), this.onmousedown(this.domNode, (e => this._arrowMouseDown(e))), + this._mousedownRepeatTimer = this._register(new d.zh), this._mousedownScheduleRepeatTimer = + this._register(new d._F) + } + _arrowMouseDown(e) { + this._onActivate(), this._mousedownRepeatTimer.cancel(), this._mousedownScheduleRepeatTimer + .cancelAndSet((() => { + this._mousedownRepeatTimer.cancelAndSet((() => this._onActivate()), + 1e3 / 24) + }), 200), this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, + a.e, (e => {}), (() => { + this._mousedownRepeatTimer.cancel(), this._mousedownScheduleRepeatTimer + .cancel() + })), e.preventDefault() + } + } + var h = i(5976); + class u extends h.JT { + constructor(e, t, i) { + super(), this._visibility = e, this._visibleClassName = t, this._invisibleClassName = + i, this._domNode = null, this._isVisible = !1, this._isNeeded = !1, + this._rawShouldBeVisible = !1, this._shouldBeVisible = !1, this._revealTimer = + this._register(new d._F) + } + setVisibility(e) { + this._visibility !== e && (this._visibility = e, this._updateShouldBeVisible()) + } + setShouldBeVisible(e) { + this._rawShouldBeVisible = e, this._updateShouldBeVisible() + } + _applyVisibilitySetting() { + return 2 !== this._visibility && (3 === this._visibility || this._rawShouldBeVisible) + } + _updateShouldBeVisible() { + const e = this._applyVisibilitySetting(); + this._shouldBeVisible !== e && (this._shouldBeVisible = e, this.ensureVisibility()) + } + setIsNeeded(e) { + this._isNeeded !== e && (this._isNeeded = e, this.ensureVisibility()) + } + setDomNode(e) { + this._domNode = e, this._domNode.setClassName(this._invisibleClassName), + this.setShouldBeVisible(!1) + } + ensureVisibility() { + this._isNeeded ? this._shouldBeVisible ? this._reveal() : this._hide(! + 0) : this._hide(!1) + } + _reveal() { + this._isVisible || (this._isVisible = !0, this._revealTimer.setIfNotSet( + (() => { + this._domNode && this._domNode.setClassName(this._visibleClassName) + }), 0)) + } + _hide(e) { + this._revealTimer.cancel(), this._isVisible && (this._isVisible = !1, + this._domNode && this._domNode.setClassName(this._invisibleClassName + + (e ? " fade" : ""))) + } + } + var g = i(1432); + class p extends l.$ { + constructor(e) { + super(), this._lazyRender = e.lazyRender, this._host = e.host, this._scrollable = + e.scrollable, this._scrollByPage = e.scrollByPage, this._scrollbarState = + e.scrollbarState, this._visibilityController = this._register(new u( + e.visibility, "visible scrollbar " + e.extraScrollbarClassName, + "invisible scrollbar " + e.extraScrollbarClassName)), this._visibilityController + .setIsNeeded(this._scrollbarState.isNeeded()), this._mouseMoveMonitor = + this._register(new a.Z), this._shouldRender = !0, this.domNode = (0, + r.X)(document.createElement("div")), this.domNode.setAttribute( + "role", "presentation"), this.domNode.setAttribute("aria-hidden", + "true"), this._visibilityController.setDomNode(this.domNode), this.domNode + .setPosition("absolute"), this.onmousedown(this.domNode.domNode, (e => + this._domNodeMouseDown(e))) + } + _createArrow(e) { + const t = this._register(new c(e)); + this.domNode.domNode.appendChild(t.bgDomNode), this.domNode.domNode.appendChild( + t.domNode) + } + _createSlider(e, t, i, n) { + this.slider = (0, r.X)(document.createElement("div")), this.slider.setClassName( + "slider"), this.slider.setPosition("absolute"), this.slider.setTop( + e), this.slider.setLeft(t), "number" == typeof i && this.slider.setWidth( + i), "number" == typeof n && this.slider.setHeight(n), this.slider.setLayerHinting(! + 0), this.slider.setContain("strict"), this.domNode.domNode.appendChild( + this.slider.domNode), this.onmousedown(this.slider.domNode, (e => { + e.leftButton && (e.preventDefault(), this._sliderMouseDown(e, (() => {}))) + })), this.onclick(this.slider.domNode, (e => { + e.leftButton && e.stopPropagation() + })) + } + _onElementSize(e) { + return this._scrollbarState.setVisibleSize(e) && (this._visibilityController + .setIsNeeded(this._scrollbarState.isNeeded()), this._shouldRender = ! + 0, this._lazyRender || this.render()), this._shouldRender + } + _onElementScrollSize(e) { + return this._scrollbarState.setScrollSize(e) && (this._visibilityController + .setIsNeeded(this._scrollbarState.isNeeded()), this._shouldRender = ! + 0, this._lazyRender || this.render()), this._shouldRender + } + _onElementScrollPosition(e) { + return this._scrollbarState.setScrollPosition(e) && (this._visibilityController + .setIsNeeded(this._scrollbarState.isNeeded()), this._shouldRender = ! + 0, this._lazyRender || this.render()), this._shouldRender + } + beginReveal() { + this._visibilityController.setShouldBeVisible(!0) + } + beginHide() { + this._visibilityController.setShouldBeVisible(!1) + } + render() { + this._shouldRender && (this._shouldRender = !1, this._renderDomNode( + this._scrollbarState.getRectangleLargeSize(), this._scrollbarState + .getRectangleSmallSize()), this._updateSlider(this._scrollbarState + .getSliderSize(), this._scrollbarState.getArrowSize() + this._scrollbarState + .getSliderPosition())) + } + _domNodeMouseDown(e) { + e.target === this.domNode.domNode && this._onMouseDown(e) + } + delegateMouseDown(e) { + const t = this.domNode.domNode.getClientRects()[0].top, + i = t + this._scrollbarState.getSliderPosition(), + n = t + this._scrollbarState.getSliderPosition() + this._scrollbarState + .getSliderSize(), + o = this._sliderMousePosition(e); + i <= o && o <= n ? e.leftButton && (e.preventDefault(), this._sliderMouseDown( + e, (() => {}))) : this._onMouseDown(e) + } + _onMouseDown(e) { + let t, i; + if (e.target === this.domNode.domNode && "number" == typeof e.browserEvent + .offsetX && "number" == typeof e.browserEvent.offsetY) t = e.browserEvent + .offsetX, i = e.browserEvent.offsetY; + else { + const n = o.i(this.domNode.domNode); + t = e.posx - n.left, i = e.posy - n.top + } + const n = this._mouseDownRelativePosition(t, i); + this._setDesiredScrollPositionNow(this._scrollByPage ? this._scrollbarState + .getDesiredScrollPositionFromOffsetPaged(n) : this._scrollbarState.getDesiredScrollPositionFromOffset( + n)), e.leftButton && (e.preventDefault(), this._sliderMouseDown(e, ( + () => {}))) + } + _sliderMouseDown(e, t) { + const i = this._sliderMousePosition(e), + n = this._sliderOrthogonalMousePosition(e), + o = this._scrollbarState.clone(); + this.slider.toggleClassName("active", !0), this._mouseMoveMonitor.startMonitoring( + e.target, e.buttons, a.e, (e => { + const t = this._sliderOrthogonalMousePosition(e), + r = Math.abs(t - n); + if (g.ED && r > 140) return void this._setDesiredScrollPositionNow( + o.getScrollPosition()); + const s = this._sliderMousePosition(e) - i; + this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta( + s)) + }), (() => { + this.slider.toggleClassName("active", !1), this._host.onDragEnd(), + t() + })), this._host.onDragStart() + } + _setDesiredScrollPositionNow(e) { + const t = {}; + this.writeScrollPosition(t, e), this._scrollable.setScrollPositionNow( + t) + } + updateScrollbarSize(e) { + this._updateScrollbarSize(e), this._scrollbarState.setScrollbarSize(e), + this._shouldRender = !0, this._lazyRender || this.render() + } + isNeeded() { + return this._scrollbarState.isNeeded() + } + } + class m { + constructor(e, t, i, n, o, r) { + this._scrollbarSize = Math.round(t), this._oppositeScrollbarSize = + Math.round(i), this._arrowSize = Math.round(e), this._visibleSize = n, + this._scrollSize = o, this._scrollPosition = r, this._computedAvailableSize = + 0, this._computedIsNeeded = !1, this._computedSliderSize = 0, this._computedSliderRatio = + 0, this._computedSliderPosition = 0, this._refreshComputedValues() + } + clone() { + return new m(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize, + this._visibleSize, this._scrollSize, this._scrollPosition) + } + setVisibleSize(e) { + const t = Math.round(e); + return this._visibleSize !== t && (this._visibleSize = t, this._refreshComputedValues(), ! + 0) + } + setScrollSize(e) { + const t = Math.round(e); + return this._scrollSize !== t && (this._scrollSize = t, this._refreshComputedValues(), ! + 0) + } + setScrollPosition(e) { + const t = Math.round(e); + return this._scrollPosition !== t && (this._scrollPosition = t, this._refreshComputedValues(), ! + 0) + } + setScrollbarSize(e) { + this._scrollbarSize = Math.round(e) + } + setOppositeScrollbarSize(e) { + this._oppositeScrollbarSize = Math.round(e) + } + static _computeValues(e, t, i, n, o) { + const r = Math.max(0, i - e), + s = Math.max(0, r - 2 * t), + a = n > 0 && n > i; + if (!a) return { + computedAvailableSize: Math.round(r), + computedIsNeeded: a, + computedSliderSize: Math.round(s), + computedSliderRatio: 0, + computedSliderPosition: 0 + }; + const l = Math.round(Math.max(20, Math.floor(i * s / n))), + d = (s - l) / (n - i), + c = o * d; + return { + computedAvailableSize: Math.round(r), + computedIsNeeded: a, + computedSliderSize: Math.round(l), + computedSliderRatio: d, + computedSliderPosition: Math.round(c) + } + } + _refreshComputedValues() { + const e = m._computeValues(this._oppositeScrollbarSize, this._arrowSize, + this._visibleSize, this._scrollSize, this._scrollPosition); + this._computedAvailableSize = e.computedAvailableSize, this._computedIsNeeded = + e.computedIsNeeded, this._computedSliderSize = e.computedSliderSize, + this._computedSliderRatio = e.computedSliderRatio, this._computedSliderPosition = + e.computedSliderPosition + } + getArrowSize() { + return this._arrowSize + } + getScrollPosition() { + return this._scrollPosition + } + getRectangleLargeSize() { + return this._computedAvailableSize + } + getRectangleSmallSize() { + return this._scrollbarSize + } + isNeeded() { + return this._computedIsNeeded + } + getSliderSize() { + return this._computedSliderSize + } + getSliderPosition() { + return this._computedSliderPosition + } + getDesiredScrollPositionFromOffset(e) { + if (!this._computedIsNeeded) return 0; + const t = e - this._arrowSize - this._computedSliderSize / 2; + return Math.round(t / this._computedSliderRatio) + } + getDesiredScrollPositionFromOffsetPaged(e) { + if (!this._computedIsNeeded) return 0; + const t = e - this._arrowSize; + let i = this._scrollPosition; + return t < this._computedSliderPosition ? i -= this._visibleSize : i += + this._visibleSize, i + } + getDesiredScrollPositionFromDelta(e) { + if (!this._computedIsNeeded) return 0; + const t = this._computedSliderPosition + e; + return Math.round(t / this._computedSliderRatio) + } + } + var f = i(3046); + const _ = (0, f.CM)("scrollbar-button-left", f.lA.triangleLeft), + b = (0, f.CM)("scrollbar-button-right", f.lA.triangleRight); + class v extends p { + constructor(e, t, i) { + const n = e.getScrollDimensions(), + o = e.getCurrentScrollPosition(); + if (super({ + lazyRender: t.lazyRender, + host: i, + scrollbarState: new m(t.horizontalHasArrows ? t.arrowSize : 0, 2 === + t.horizontal ? 0 : t.horizontalScrollbarSize, 2 === t.vertical ? + 0 : t.verticalScrollbarSize, n.width, n.scrollWidth, o.scrollLeft + ), + visibility: t.horizontal, + extraScrollbarClassName: "horizontal", + scrollable: e, + scrollByPage: t.scrollByPage + }), t.horizontalHasArrows) { + const e = (t.arrowSize - 11) / 2, + i = (t.horizontalScrollbarSize - 11) / 2; + this._createArrow({ + className: "scra", + icon: _, + top: i, + left: e, + bottom: void 0, + right: void 0, + bgWidth: t.arrowSize, + bgHeight: t.horizontalScrollbarSize, + onActivate: () => this._host.onMouseWheel(new s.q(null, 1, 0)) + }), this._createArrow({ + className: "scra", + icon: b, + top: i, + left: void 0, + bottom: void 0, + right: e, + bgWidth: t.arrowSize, + bgHeight: t.horizontalScrollbarSize, + onActivate: () => this._host.onMouseWheel(new s.q(null, -1, 0)) + }) + } + this._createSlider(Math.floor((t.horizontalScrollbarSize - t.horizontalSliderSize) / + 2), 0, void 0, t.horizontalSliderSize) + } + _updateSlider(e, t) { + this.slider.setWidth(e), this.slider.setLeft(t) + } + _renderDomNode(e, t) { + this.domNode.setWidth(e), this.domNode.setHeight(t), this.domNode.setLeft( + 0), this.domNode.setBottom(0) + } + onDidScroll(e) { + return this._shouldRender = this._onElementScrollSize(e.scrollWidth) || + this._shouldRender, this._shouldRender = this._onElementScrollPosition( + e.scrollLeft) || this._shouldRender, this._shouldRender = this._onElementSize( + e.width) || this._shouldRender, this._shouldRender + } + _mouseDownRelativePosition(e, t) { + return e + } + _sliderMousePosition(e) { + return e.posx + } + _sliderOrthogonalMousePosition(e) { + return e.posy + } + _updateScrollbarSize(e) { + this.slider.setHeight(e) + } + writeScrollPosition(e, t) { + e.scrollLeft = t + } + updateOptions(e) { + this.updateScrollbarSize(2 === e.horizontal ? 0 : e.horizontalScrollbarSize), + this._scrollbarState.setOppositeScrollbarSize(2 === e.vertical ? 0 : + e.verticalScrollbarSize), this._visibilityController.setVisibility(e + .horizontal), this._scrollByPage = e.scrollByPage + } + } + const w = (0, f.CM)("scrollbar-button-up", f.lA.triangleUp), + C = (0, f.CM)("scrollbar-button-down", f.lA.triangleDown); + class y extends p { + constructor(e, t, i) { + const n = e.getScrollDimensions(), + o = e.getCurrentScrollPosition(); + if (super({ + lazyRender: t.lazyRender, + host: i, + scrollbarState: new m(t.verticalHasArrows ? t.arrowSize : 0, 2 === + t.vertical ? 0 : t.verticalScrollbarSize, 0, n.height, n.scrollHeight, + o.scrollTop), + visibility: t.vertical, + extraScrollbarClassName: "vertical", + scrollable: e, + scrollByPage: t.scrollByPage + }), t.verticalHasArrows) { + const e = (t.arrowSize - 11) / 2, + i = (t.verticalScrollbarSize - 11) / 2; + this._createArrow({ + className: "scra", + icon: w, + top: e, + left: i, + bottom: void 0, + right: void 0, + bgWidth: t.verticalScrollbarSize, + bgHeight: t.arrowSize, + onActivate: () => this._host.onMouseWheel(new s.q(null, 0, 1)) + }), this._createArrow({ + className: "scra", + icon: C, + top: void 0, + left: i, + bottom: e, + right: void 0, + bgWidth: t.verticalScrollbarSize, + bgHeight: t.arrowSize, + onActivate: () => this._host.onMouseWheel(new s.q(null, 0, -1)) + }) + } + this._createSlider(0, Math.floor((t.verticalScrollbarSize - t.verticalSliderSize) / + 2), t.verticalSliderSize, void 0) + } + _updateSlider(e, t) { + this.slider.setHeight(e), this.slider.setTop(t) + } + _renderDomNode(e, t) { + this.domNode.setWidth(t), this.domNode.setHeight(e), this.domNode.setRight( + 0), this.domNode.setTop(0) + } + onDidScroll(e) { + return this._shouldRender = this._onElementScrollSize(e.scrollHeight) || + this._shouldRender, this._shouldRender = this._onElementScrollPosition( + e.scrollTop) || this._shouldRender, this._shouldRender = this._onElementSize( + e.height) || this._shouldRender, this._shouldRender + } + _mouseDownRelativePosition(e, t) { + return t + } + _sliderMousePosition(e) { + return e.posy + } + _sliderOrthogonalMousePosition(e) { + return e.posx + } + _updateScrollbarSize(e) { + this.slider.setWidth(e) + } + writeScrollPosition(e, t) { + e.scrollTop = t + } + updateOptions(e) { + this.updateScrollbarSize(2 === e.vertical ? 0 : e.verticalScrollbarSize), + this._scrollbarState.setOppositeScrollbarSize(0), this._visibilityController + .setVisibility(e.vertical), this._scrollByPage = e.scrollByPage + } + } + var S = i(4669), + x = i(6633), + k = i(3379), + L = i.n(k), + N = i(7795), + D = i.n(N), + E = i(569), + I = i.n(E), + T = i(3565), + M = i.n(T), + A = i(9216), + R = i.n(A), + O = i(4589), + P = i.n(O), + F = i(7198), + B = {}; + B.styleTagTransform = P(), B.setAttributes = M(), B.insert = I().bind( + null, "head"), B.domAPI = D(), B.insertStyleElement = R(), L()(F.Z, B), + F.Z && F.Z.locals && F.Z.locals; + class W { + constructor(e, t, i) { + this.timestamp = e, this.deltaX = t, this.deltaY = i, this.score = 0 + } + } + class z { + constructor() { + this._capacity = 5, this._memory = [], this._front = -1, this._rear = - + 1 + } + isPhysicalMouseWheel() { + if (-1 === this._front && -1 === this._rear) return !1; + let e = 1, + t = 0, + i = 1, + n = this._rear; + for (;;) { + const o = n === this._front ? e : Math.pow(2, -i); + if (e -= o, t += this._memory[n].score * o, n === this._front) break; + n = (this._capacity + n - 1) % this._capacity, i++ + } + return t <= .5 + } + accept(e, t, i) { + const n = new W(e, t, i); + n.score = this._computeScore(n), -1 === this._front && -1 === this._rear ? + (this._memory[0] = n, this._front = 0, this._rear = 0) : (this._rear = + (this._rear + 1) % this._capacity, this._rear === this._front && ( + this._front = (this._front + 1) % this._capacity), this._memory[ + this._rear] = n) + } + _computeScore(e) { + if (Math.abs(e.deltaX) > 0 && Math.abs(e.deltaY) > 0) return 1; + let t = .5; + return -1 === this._front && -1 === this._rear || this._memory[this._rear], + this._isAlmostInt(e.deltaX) && this._isAlmostInt(e.deltaY) || (t += .25), + Math.min(Math.max(t, 0), 1) + } + _isAlmostInt(e) { + return Math.abs(Math.round(e) - e) < .01 + } + } + z.INSTANCE = new z; + class V extends l.$ { + constructor(e, t, i) { + super(), this._onScroll = this._register(new S.Q5), this.onScroll = + this._onScroll.event, this._onWillScroll = this._register(new S.Q5), + e.style.overflow = "hidden", this._options = function(e) { + const t = { + lazyRender: void 0 !== e.lazyRender && e.lazyRender, + className: void 0 !== e.className ? e.className : "", + useShadows: void 0 === e.useShadows || e.useShadows, + handleMouseWheel: void 0 === e.handleMouseWheel || e.handleMouseWheel, + flipAxes: void 0 !== e.flipAxes && e.flipAxes, + consumeMouseWheelIfScrollbarIsNeeded: void 0 !== e.consumeMouseWheelIfScrollbarIsNeeded && + e.consumeMouseWheelIfScrollbarIsNeeded, + alwaysConsumeMouseWheel: void 0 !== e.alwaysConsumeMouseWheel && + e.alwaysConsumeMouseWheel, + scrollYToX: void 0 !== e.scrollYToX && e.scrollYToX, + mouseWheelScrollSensitivity: void 0 !== e.mouseWheelScrollSensitivity ? + e.mouseWheelScrollSensitivity : 1, + fastScrollSensitivity: void 0 !== e.fastScrollSensitivity ? e.fastScrollSensitivity : 5, + scrollPredominantAxis: void 0 === e.scrollPredominantAxis || e.scrollPredominantAxis, + mouseWheelSmoothScroll: void 0 === e.mouseWheelSmoothScroll || e.mouseWheelSmoothScroll, + arrowSize: void 0 !== e.arrowSize ? e.arrowSize : 11, + listenOnDomNode: void 0 !== e.listenOnDomNode ? e.listenOnDomNode : null, + horizontal: void 0 !== e.horizontal ? e.horizontal : 1, + horizontalScrollbarSize: void 0 !== e.horizontalScrollbarSize ? e + .horizontalScrollbarSize : 10, + horizontalSliderSize: void 0 !== e.horizontalSliderSize ? e.horizontalSliderSize : 0, + horizontalHasArrows: void 0 !== e.horizontalHasArrows && e.horizontalHasArrows, + vertical: void 0 !== e.vertical ? e.vertical : 1, + verticalScrollbarSize: void 0 !== e.verticalScrollbarSize ? e.verticalScrollbarSize : 10, + verticalHasArrows: void 0 !== e.verticalHasArrows && e.verticalHasArrows, + verticalSliderSize: void 0 !== e.verticalSliderSize ? e.verticalSliderSize : 0, + scrollByPage: void 0 !== e.scrollByPage && e.scrollByPage + }; + return t.horizontalSliderSize = void 0 !== e.horizontalSliderSize ? + e.horizontalSliderSize : t.horizontalScrollbarSize, t.verticalSliderSize = + void 0 !== e.verticalSliderSize ? e.verticalSliderSize : t.verticalScrollbarSize, + g.dz && (t.className += " mac"), t + }(t), this._scrollable = i, this._register(this._scrollable.onScroll( + (e => { + this._onWillScroll.fire(e), this._onDidScroll(e), this._onScroll + .fire(e) + }))); + const n = { + onMouseWheel: e => this._onMouseWheel(e), + onDragStart: () => this._onDragStart(), + onDragEnd: () => this._onDragEnd() + }; + this._verticalScrollbar = this._register(new y(this._scrollable, this + ._options, n)), this._horizontalScrollbar = this._register(new v( + this._scrollable, this._options, n)), this._domNode = document.createElement( + "div"), this._domNode.className = "monaco-scrollable-element " + + this._options.className, this._domNode.setAttribute("role", + "presentation"), this._domNode.style.position = "relative", this._domNode + .style.overflow = "hidden", this._domNode.appendChild(e), this._domNode + .appendChild(this._horizontalScrollbar.domNode.domNode), this._domNode + .appendChild(this._verticalScrollbar.domNode.domNode), this._options + .useShadows ? (this._leftShadowDomNode = (0, r.X)(document.createElement( + "div")), this._leftShadowDomNode.setClassName("shadow"), this._domNode + .appendChild(this._leftShadowDomNode.domNode), this._topShadowDomNode = + (0, r.X)(document.createElement("div")), this._topShadowDomNode.setClassName( + "shadow"), this._domNode.appendChild(this._topShadowDomNode.domNode), + this._topLeftShadowDomNode = (0, r.X)(document.createElement("div")), + this._topLeftShadowDomNode.setClassName("shadow"), this._domNode.appendChild( + this._topLeftShadowDomNode.domNode)) : (this._leftShadowDomNode = + null, this._topShadowDomNode = null, this._topLeftShadowDomNode = + null), this._listenOnDomNode = this._options.listenOnDomNode || + this._domNode, this._mouseWheelToDispose = [], this._setListeningToMouseWheel( + this._options.handleMouseWheel), this.onmouseover(this._listenOnDomNode, ( + e => this._onMouseOver(e))), this.onnonbubblingmouseout(this._listenOnDomNode, ( + e => this._onMouseOut(e))), this._hideTimeout = this._register(new d + ._F), this._isDragging = !1, this._mouseIsOver = !1, this._shouldRender = ! + 0, this._revealOnScroll = !0 + } + dispose() { + this._mouseWheelToDispose = (0, h.B9)(this._mouseWheelToDispose), + super.dispose() + } + getDomNode() { + return this._domNode + } + getOverviewRulerLayoutInfo() { + return { + parent: this._domNode, + insertBefore: this._verticalScrollbar.domNode.domNode + } + } + delegateVerticalScrollbarMouseDown(e) { + this._verticalScrollbar.delegateMouseDown(e) + } + getScrollDimensions() { + return this._scrollable.getScrollDimensions() + } + setScrollDimensions(e) { + this._scrollable.setScrollDimensions(e, !1) + } + updateClassName(e) { + this._options.className = e, g.dz && (this._options.className += + " mac"), this._domNode.className = "monaco-scrollable-element " + + this._options.className + } + updateOptions(e) { + void 0 !== e.handleMouseWheel && (this._options.handleMouseWheel = e.handleMouseWheel, + this._setListeningToMouseWheel(this._options.handleMouseWheel)), + void 0 !== e.mouseWheelScrollSensitivity && (this._options.mouseWheelScrollSensitivity = + e.mouseWheelScrollSensitivity), void 0 !== e.fastScrollSensitivity && + (this._options.fastScrollSensitivity = e.fastScrollSensitivity), + void 0 !== e.scrollPredominantAxis && (this._options.scrollPredominantAxis = + e.scrollPredominantAxis), void 0 !== e.horizontal && (this._options + .horizontal = e.horizontal), void 0 !== e.vertical && (this._options + .vertical = e.vertical), void 0 !== e.horizontalScrollbarSize && ( + this._options.horizontalScrollbarSize = e.horizontalScrollbarSize), + void 0 !== e.verticalScrollbarSize && (this._options.verticalScrollbarSize = + e.verticalScrollbarSize), void 0 !== e.scrollByPage && (this._options + .scrollByPage = e.scrollByPage), this._horizontalScrollbar.updateOptions( + this._options), this._verticalScrollbar.updateOptions(this._options), + this._options.lazyRender || this._render() + } + _setListeningToMouseWheel(e) { + if (this._mouseWheelToDispose.length > 0 !== e && (this._mouseWheelToDispose = + (0, h.B9)(this._mouseWheelToDispose), e)) { + const e = e => { + this._onMouseWheel(new s.q(e)) + }; + this._mouseWheelToDispose.push(o.nm(this._listenOnDomNode, o.tw.MOUSE_WHEEL, + e, { + passive: !1 + })) + } + } + _onMouseWheel(e) { + const t = z.INSTANCE; { + const i = window.devicePixelRatio / (0, n.ie)(); + g.ED || g.IJ ? t.accept(Date.now(), e.deltaX / i, e.deltaY / i) : t.accept( + Date.now(), e.deltaX, e.deltaY) + } + let i = !1; + if (e.deltaY || e.deltaX) { + let n = e.deltaY * this._options.mouseWheelScrollSensitivity, + o = e.deltaX * this._options.mouseWheelScrollSensitivity; + this._options.scrollPredominantAxis && (Math.abs(n) >= Math.abs(o) ? + o = 0 : n = 0), this._options.flipAxes && ([n, o] = [o, n]); + const r = !g.dz && e.browserEvent && e.browserEvent.shiftKey; + !this._options.scrollYToX && !r || o || (o = n, n = 0), e.browserEvent && + e.browserEvent.altKey && (o *= this._options.fastScrollSensitivity, + n *= this._options.fastScrollSensitivity); + const s = this._scrollable.getFutureScrollPosition(); + let a = {}; + if (n) { + const e = 50 * n, + t = s.scrollTop - (e < 0 ? Math.floor(e) : Math.ceil(e)); + this._verticalScrollbar.writeScrollPosition(a, t) + } + if (o) { + const e = 50 * o, + t = s.scrollLeft - (e < 0 ? Math.floor(e) : Math.ceil(e)); + this._horizontalScrollbar.writeScrollPosition(a, t) + } + a = this._scrollable.validateScrollPosition(a), (s.scrollLeft !== a.scrollLeft || + s.scrollTop !== a.scrollTop) && (this._options.mouseWheelSmoothScroll && + t.isPhysicalMouseWheel() ? this._scrollable.setScrollPositionSmooth( + a) : this._scrollable.setScrollPositionNow(a), i = !0) + } + let o = i; + !o && this._options.alwaysConsumeMouseWheel && (o = !0), !o && this._options + .consumeMouseWheelIfScrollbarIsNeeded && (this._verticalScrollbar.isNeeded() || + this._horizontalScrollbar.isNeeded()) && (o = !0), o && (e.preventDefault(), + e.stopPropagation()) + } + _onDidScroll(e) { + this._shouldRender = this._horizontalScrollbar.onDidScroll(e) || this + ._shouldRender, this._shouldRender = this._verticalScrollbar.onDidScroll( + e) || this._shouldRender, this._options.useShadows && (this._shouldRender = ! + 0), this._revealOnScroll && this._reveal(), this._options.lazyRender || + this._render() + } + renderNow() { + if (!this._options.lazyRender) throw new Error( + "Please use `lazyRender` together with `renderNow`!"); + this._render() + } + _render() { + if (this._shouldRender && (this._shouldRender = !1, this._horizontalScrollbar + .render(), this._verticalScrollbar.render(), this._options.useShadows + )) { + const e = this._scrollable.getCurrentScrollPosition(), + t = e.scrollTop > 0, + i = e.scrollLeft > 0, + n = i ? " left" : "", + o = t ? " top" : "", + r = i || t ? " top-left-corner" : ""; + this._leftShadowDomNode.setClassName(`shadow${n}`), this._topShadowDomNode + .setClassName(`shadow${o}`), this._topLeftShadowDomNode.setClassName( + `shadow${r}${o}${n}`) + } + } + _onDragStart() { + this._isDragging = !0, this._reveal() + } + _onDragEnd() { + this._isDragging = !1, this._hide() + } + _onMouseOut(e) { + this._mouseIsOver = !1, this._hide() + } + _onMouseOver(e) { + this._mouseIsOver = !0, this._reveal() + } + _reveal() { + this._verticalScrollbar.beginReveal(), this._horizontalScrollbar.beginReveal(), + this._scheduleHide() + } + _hide() { + this._mouseIsOver || this._isDragging || (this._verticalScrollbar.beginHide(), + this._horizontalScrollbar.beginHide()) + } + _scheduleHide() { + this._mouseIsOver || this._isDragging || this._hideTimeout.cancelAndSet( + (() => this._hide()), 500) + } + } + class H extends V { + constructor(e, t) { + (t = t || {}).mouseWheelSmoothScroll = !1; + const i = new x.Rm(0, (e => o.jL(e))); + super(e, t, i), this._register(i) + } + setScrollPosition(e) { + this._scrollable.setScrollPositionNow(e) + } + getScrollPosition() { + return this._scrollable.getCurrentScrollPosition() + } + } + class U extends V { + constructor(e, t, i) { + super(e, t, i) + } + setScrollPosition(e) { + e.reuseAnimation ? this._scrollable.setScrollPositionSmooth(e, e.reuseAnimation) : + this._scrollable.setScrollPositionNow(e) + } + getScrollPosition() { + return this._scrollable.getCurrentScrollPosition() + } + } + class j extends H { + constructor(e, t) { + super(e, t), this._element = e, this.onScroll((e => { + e.scrollTopChanged && (this._element.scrollTop = e.scrollTop), e.scrollLeftChanged && + (this._element.scrollLeft = e.scrollLeft) + })), this.scanDomNode() + } + scanDomNode() { + this.setScrollDimensions({ + width: this._element.clientWidth, + scrollWidth: this._element.scrollWidth, + height: this._element.clientHeight, + scrollHeight: this._element.scrollHeight + }), this.setScrollPosition({ + scrollLeft: this._element.scrollLeft, + scrollTop: this._element.scrollTop + }) + } + } + }, + 9782: (e, t, i) => { + "use strict"; + i.d(t, { + M: () => M, + z: () => A + }); + var n = i(5321), + o = i(3841), + r = i(6781), + s = i(9488), + a = i(1264), + l = i(4669), + d = i(5976), + c = i(9870), + h = i(6633), + u = i(8401), + g = i(3379), + p = i.n(g), + m = i(7795), + f = i.n(m), + _ = i(569), + b = i.n(_), + v = i(3565), + w = i.n(v), + C = i(9216), + y = i.n(C), + S = i(4589), + x = i.n(S), + k = i(2470), + L = {}; + L.styleTagTransform = x(), L.setAttributes = w(), L.insert = b().bind( + null, "head"), L.domAPI = f(), L.insertStyleElement = y(), p()(k.Z, L), + k.Z && k.Z.locals && k.Z.locals; + const N = { + separatorBorder: a.Il.transparent + }; + class D { + constructor(e, t, i, n) { + this.container = e, this.view = t, this.disposable = n, this._cachedVisibleSize = + void 0, "number" == typeof i ? (this._size = i, this._cachedVisibleSize = + void 0, e.classList.add("visible")) : (this._size = 0, this._cachedVisibleSize = + i.cachedVisibleSize) + } + set size(e) { + this._size = e + } + get size() { + return this._size + } + get visible() { + return void 0 === this._cachedVisibleSize + } + setVisible(e, t) { + e !== this.visible && (e ? (this.size = (0, c.u)(this._cachedVisibleSize, + this.viewMinimumSize, this.viewMaximumSize), this._cachedVisibleSize = + void 0) : (this._cachedVisibleSize = "number" == typeof t ? t : + this.size, this.size = 0), this.container.classList.toggle( + "visible", e), this.view.setVisible && this.view.setVisible(e)) + } + get minimumSize() { + return this.visible ? this.view.minimumSize : 0 + } + get viewMinimumSize() { + return this.view.minimumSize + } + get maximumSize() { + return this.visible ? this.view.maximumSize : 0 + } + get viewMaximumSize() { + return this.view.maximumSize + } + get priority() { + return this.view.priority + } + get snap() { + return !!this.view.snap + } + set enabled(e) { + this.container.style.pointerEvents = e ? "" : "none" + } + layout(e, t) { + this.layoutContainer(e), this.view.layout(this.size, e, t) + } + dispose() { + return this.disposable.dispose(), this.view + } + } + class E extends D { + layoutContainer(e) { + this.container.style.top = `${e}px`, this.container.style.height = + `${this.size}px` + } + } + class I extends D { + layoutContainer(e) { + this.container.style.left = `${e}px`, this.container.style.width = + `${this.size}px` + } + } + var T, M; + ! function(e) { + e[e.Idle = 0] = "Idle", e[e.Busy = 1] = "Busy" + }(T || (T = {})), + function(e) { + e.Distribute = { + type: "distribute" + }, e.Split = function(e) { + return { + type: "split", + index: e + } + }, e.Invisible = function(e) { + return { + type: "invisible", + cachedVisibleSize: e + } + } + }(M || (M = {})); + class A extends d.JT { + constructor(e, t = {}) { + var i, o; + super(), this.size = 0, this.contentSize = 0, this.proportions = void 0, + this.viewItems = [], this.sashItems = [], this.state = T.Idle, this._onDidSashChange = + this._register(new l.Q5), this.onDidSashChange = this._onDidSashChange + .event, this._onDidSashReset = this._register(new l.Q5), this._startSnappingEnabled = ! + 0, this._endSnappingEnabled = !0, this.orientation = u.o8(t.orientation) ? + 0 : t.orientation, this.inverseAltBehavior = !!t.inverseAltBehavior, + this.proportionalLayout = !!u.o8(t.proportionalLayout) || !!t.proportionalLayout, + this.getSashOrthogonalSize = t.getSashOrthogonalSize, this.el = + document.createElement("div"), this.el.classList.add( + "monaco-split-view2"), this.el.classList.add(0 === this.orientation ? + "vertical" : "horizontal"), e.appendChild(this.el), this.sashContainer = + (0, n.R3)(this.el, (0, n.$)(".sash-container")), this.viewContainer = + (0, n.$)(".split-view-container"), this.scrollable = new h.Rm(125, n + .jL), this.scrollableElement = this._register(new r.$Z(this.viewContainer, { + vertical: 0 === this.orientation ? null !== (i = t.scrollbarVisibility) && + void 0 !== i ? i : 1 : 2, + horizontal: 1 === this.orientation ? null !== (o = t.scrollbarVisibility) && + void 0 !== o ? o : 1 : 2 + }, this.scrollable)), this.onDidScroll = this.scrollableElement.onScroll, + this._register(this.onDidScroll((e => { + this.viewContainer.scrollTop = e.scrollTop, this.viewContainer.scrollLeft = + e.scrollLeft + }))), (0, n.R3)(this.el, this.scrollableElement.getDomNode()), this.style( + t.styles || N), t.descriptor && (this.size = t.descriptor.size, t.descriptor + .views.forEach(((e, t) => { + const i = u.o8(e.visible) || e.visible ? e.size : { + type: "invisible", + cachedVisibleSize: e.size + }, + n = e.view; + this.doAddView(n, i, t, !0) + })), this.contentSize = this.viewItems.reduce(((e, t) => e + t.size), + 0), this.saveProportions()) + } + get orthogonalStartSash() { + return this._orthogonalStartSash + } + set orthogonalStartSash(e) { + for (const t of this.sashItems) t.sash.orthogonalStartSash = e; + this._orthogonalStartSash = e + } + get orthogonalEndSash() { + return this._orthogonalEndSash + } + set orthogonalEndSash(e) { + for (const t of this.sashItems) t.sash.orthogonalEndSash = e; + this._orthogonalEndSash = e + } + get startSnappingEnabled() { + return this._startSnappingEnabled + } + set startSnappingEnabled(e) { + this._startSnappingEnabled !== e && (this._startSnappingEnabled = e, + this.updateSashEnablement()) + } + get endSnappingEnabled() { + return this._endSnappingEnabled + } + set endSnappingEnabled(e) { + this._endSnappingEnabled !== e && (this._endSnappingEnabled = e, this + .updateSashEnablement()) + } + style(e) { + e.separatorBorder.isTransparent() ? (this.el.classList.remove( + "separator-border"), this.el.style.removeProperty( + "--separator-border")) : (this.el.classList.add("separator-border"), + this.el.style.setProperty("--separator-border", e.separatorBorder.toString()) + ) + } + addView(e, t, i = this.viewItems.length, n) { + this.doAddView(e, t, i, n) + } + layout(e, t) { + const i = Math.max(this.size, this.contentSize); + if (this.size = e, this.layoutContext = t, this.proportions) + for (let t = 0; t < this.viewItems.length; t++) { + const i = this.viewItems[t]; + i.size = (0, c.u)(Math.round(this.proportions[t] * e), i.minimumSize, + i.maximumSize) + } else { + const t = (0, s.w6)(this.viewItems.length), + n = t.filter((e => 1 === this.viewItems[e].priority)), + o = t.filter((e => 2 === this.viewItems[e].priority)); + this.resize(this.viewItems.length - 1, e - i, void 0, n, o) + } + this.distributeEmptySpace(), this.layoutViews() + } + saveProportions() { + this.proportionalLayout && this.contentSize > 0 && (this.proportions = + this.viewItems.map((e => e.size / this.contentSize))) + } + onSashStart({ + sash: e, + start: t, + alt: i + }) { + for (const e of this.viewItems) e.enabled = !1; + const o = this.sashItems.findIndex((t => t.sash === e)), + r = (0, d.F8)((0, n.nm)(document.body, "keydown", (e => a(this.sashDragState + .current, e.altKey))), (0, n.nm)(document.body, "keyup", (() => a( + this.sashDragState.current, !1)))), + a = (e, t) => { + const i = this.viewItems.map((e => e.size)); + let n, a, l = Number.NEGATIVE_INFINITY, + d = Number.POSITIVE_INFINITY; + if (this.inverseAltBehavior && (t = !t), t) + if (o === this.sashItems.length - 1) { + const e = this.viewItems[o]; + l = (e.minimumSize - e.size) / 2, d = (e.maximumSize - e.size) / + 2 + } else { + const e = this.viewItems[o + 1]; + l = (e.size - e.maximumSize) / 2, d = (e.size - e.minimumSize) / + 2 + } + if (!t) { + const e = (0, s.w6)(o, -1), + t = (0, s.w6)(o + 1, this.viewItems.length), + r = e.reduce(((e, t) => e + (this.viewItems[t].minimumSize - i[t])), + 0), + l = e.reduce(((e, t) => e + (this.viewItems[t].viewMaximumSize - + i[t])), 0), + d = 0 === t.length ? Number.POSITIVE_INFINITY : t.reduce(((e, t) => + e + (i[t] - this.viewItems[t].minimumSize)), 0), + c = 0 === t.length ? Number.NEGATIVE_INFINITY : t.reduce(((e, t) => + e + (i[t] - this.viewItems[t].viewMaximumSize)), 0), + h = Math.max(r, c), + u = Math.min(d, l), + g = this.findFirstSnapIndex(e), + p = this.findFirstSnapIndex(t); + if ("number" == typeof g) { + const e = this.viewItems[g], + t = Math.floor(e.viewMinimumSize / 2); + n = { + index: g, + limitDelta: e.visible ? h - t : h + t, + size: e.size + } + } + if ("number" == typeof p) { + const e = this.viewItems[p], + t = Math.floor(e.viewMinimumSize / 2); + a = { + index: p, + limitDelta: e.visible ? u + t : u - t, + size: e.size + } + } + } + this.sashDragState = { + start: e, + current: e, + index: o, + sizes: i, + minDelta: l, + maxDelta: d, + alt: t, + snapBefore: n, + snapAfter: a, + disposable: r + } + }; + a(t, i) + } + onSashChange({ + current: e + }) { + const { + index: t, + start: i, + sizes: n, + alt: o, + minDelta: r, + maxDelta: s, + snapBefore: a, + snapAfter: l + } = this.sashDragState; + this.sashDragState.current = e; + const d = e - i, + c = this.resize(t, d, n, void 0, void 0, r, s, a, l); + if (o) { + const e = t === this.sashItems.length - 1, + i = this.viewItems.map((e => e.size)), + n = e ? t : t + 1, + o = this.viewItems[n], + r = o.size - o.maximumSize, + s = o.size - o.minimumSize, + a = e ? t - 1 : t + 1; + this.resize(a, -c, i, void 0, void 0, r, s) + } + this.distributeEmptySpace(), this.layoutViews() + } + onSashEnd(e) { + this._onDidSashChange.fire(e), this.sashDragState.disposable.dispose(), + this.saveProportions(); + for (const e of this.viewItems) e.enabled = !0 + } + onViewChange(e, t) { + const i = this.viewItems.indexOf(e); + i < 0 || i >= this.viewItems.length || (t = "number" == typeof t ? t : + e.size, t = (0, c.u)(t, e.minimumSize, e.maximumSize), this.inverseAltBehavior && + i > 0 ? (this.resize(i - 1, Math.floor((e.size - t) / 2)), this.distributeEmptySpace(), + this.layoutViews()) : (e.size = t, this.relayout([i], void 0))) + } + resizeView(e, t) { + if (this.state !== T.Idle) throw new Error("Cant modify splitview"); + if (this.state = T.Busy, e < 0 || e >= this.viewItems.length) return; + const i = (0, s.w6)(this.viewItems.length).filter((t => t !== e)), + n = [...i.filter((e => 1 === this.viewItems[e].priority)), e], + o = i.filter((e => 2 === this.viewItems[e].priority)), + r = this.viewItems[e]; + t = Math.round(t), t = (0, c.u)(t, r.minimumSize, Math.min(r.maximumSize, + this.size)), r.size = t, this.relayout(n, o), this.state = T.Idle + } + distributeViewSizes() { + const e = []; + let t = 0; + for (const i of this.viewItems) i.maximumSize - i.minimumSize > 0 && + (e.push(i), t += i.size); + const i = Math.floor(t / e.length); + for (const t of e) t.size = (0, c.u)(i, t.minimumSize, t.maximumSize); + const n = (0, s.w6)(this.viewItems.length), + o = n.filter((e => 1 === this.viewItems[e].priority)), + r = n.filter((e => 2 === this.viewItems[e].priority)); + this.relayout(o, r) + } + getViewSize(e) { + return e < 0 || e >= this.viewItems.length ? -1 : this.viewItems[e].size + } + doAddView(e, t, i = this.viewItems.length, r) { + if (this.state !== T.Idle) throw new Error("Cant modify splitview"); + this.state = T.Busy; + const a = (0, n.$)(".split-view-view"); + i === this.viewItems.length ? this.viewContainer.appendChild(a) : + this.viewContainer.insertBefore(a, this.viewContainer.children.item( + i)); + const c = e.onDidChange((e => this.onViewChange(p, e))), + h = (0, d.OF)((() => this.viewContainer.removeChild(a))), + u = (0, d.F8)(c, h); + let g; + g = "number" == typeof t ? t : "split" === t.type ? this.getViewSize( + t.index) / 2 : "invisible" === t.type ? { + cachedVisibleSize: t.cachedVisibleSize + } : e.minimumSize; + const p = 0 === this.orientation ? new E(a, e, g, u) : new I(a, e, g, + u); + if (this.viewItems.splice(i, 0, p), this.viewItems.length > 1) { + let e = { + orthogonalStartSash: this.orthogonalStartSash, + orthogonalEndSash: this.orthogonalEndSash + }; + const t = 0 === this.orientation ? new o.g(this.sashContainer, { + getHorizontalSashTop: e => this.getSashPosition(e), + getHorizontalSashWidth: this.getSashOrthogonalSize + }, Object.assign(Object.assign({}, e), { + orientation: 1 + })) : new o.g(this.sashContainer, { + getVerticalSashLeft: e => this.getSashPosition(e), + getVerticalSashHeight: this.getSashOrthogonalSize + }, Object.assign(Object.assign({}, e), { + orientation: 0 + })), + n = 0 === this.orientation ? e => ({ + sash: t, + start: e.startY, + current: e.currentY, + alt: e.altKey + }) : e => ({ + sash: t, + start: e.startX, + current: e.currentX, + alt: e.altKey + }), + r = l.ju.map(t.onDidStart, n)(this.onSashStart, this), + a = l.ju.map(t.onDidChange, n)(this.onSashChange, this), + c = l.ju.map(t.onDidEnd, (() => this.sashItems.findIndex((e => e.sash === + t)))), + h = c(this.onSashEnd, this), + u = t.onDidReset((() => { + const e = this.sashItems.findIndex((e => e.sash === t)), + i = (0, s.w6)(e, -1), + n = (0, s.w6)(e + 1, this.viewItems.length), + o = this.findFirstSnapIndex(i), + r = this.findFirstSnapIndex(n); + ("number" != typeof o || this.viewItems[o].visible) && ("number" != + typeof r || this.viewItems[r].visible) && this._onDidSashReset.fire( + e) + })), + g = (0, d.F8)(r, a, h, u, t), + p = { + sash: t, + disposable: g + }; + this.sashItems.splice(i - 1, 0, p) + } + let m; + a.appendChild(e.element), "number" != typeof t && "split" === t.type && + (m = [t.index]), r || this.relayout([i], m), this.state = T.Idle, r || + "number" == typeof t || "distribute" !== t.type || this.distributeViewSizes() + } + relayout(e, t) { + const i = this.viewItems.reduce(((e, t) => e + t.size), 0); + this.resize(this.viewItems.length - 1, this.size - i, void 0, e, t), + this.distributeEmptySpace(), this.layoutViews(), this.saveProportions() + } + resize(e, t, i = this.viewItems.map((e => e.size)), n, o, r = Number.NEGATIVE_INFINITY, + a = Number.POSITIVE_INFINITY, l, d) { + if (e < 0 || e >= this.viewItems.length) return 0; + const h = (0, s.w6)(e, -1), + u = (0, s.w6)(e + 1, this.viewItems.length); + if (o) + for (const e of o)(0, s.zI)(h, e), (0, s.zI)(u, e); + if (n) + for (const e of n)(0, s.al)(h, e), (0, s.al)(u, e); + const g = h.map((e => this.viewItems[e])), + p = h.map((e => i[e])), + m = u.map((e => this.viewItems[e])), + f = u.map((e => i[e])), + _ = h.reduce(((e, t) => e + (this.viewItems[t].minimumSize - i[t])), + 0), + b = h.reduce(((e, t) => e + (this.viewItems[t].maximumSize - i[t])), + 0), + v = 0 === u.length ? Number.POSITIVE_INFINITY : u.reduce(((e, t) => + e + (i[t] - this.viewItems[t].minimumSize)), 0), + w = 0 === u.length ? Number.NEGATIVE_INFINITY : u.reduce(((e, t) => + e + (i[t] - this.viewItems[t].maximumSize)), 0), + C = Math.max(_, w, r), + y = Math.min(v, b, a); + let S = !1; + if (l) { + const e = this.viewItems[l.index], + i = t >= l.limitDelta; + S = i !== e.visible, e.setVisible(i, l.size) + } + if (!S && d) { + const e = this.viewItems[d.index], + i = t < d.limitDelta; + S = i !== e.visible, e.setVisible(i, d.size) + } + if (S) return this.resize(e, t, i, n, o, r, a); + for (let e = 0, i = t = (0, c.u)(t, C, y); e < g.length; e++) { + const t = g[e], + n = (0, c.u)(p[e] + i, t.minimumSize, t.maximumSize); + i -= n - p[e], t.size = n + } + for (let e = 0, i = t; e < m.length; e++) { + const t = m[e], + n = (0, c.u)(f[e] - i, t.minimumSize, t.maximumSize); + i += n - f[e], t.size = n + } + return t + } + distributeEmptySpace(e) { + const t = this.viewItems.reduce(((e, t) => e + t.size), 0); + let i = this.size - t; + const n = (0, s.w6)(this.viewItems.length - 1, -1), + o = n.filter((e => 1 === this.viewItems[e].priority)), + r = n.filter((e => 2 === this.viewItems[e].priority)); + for (const e of r)(0, s.zI)(n, e); + for (const e of o)(0, s.al)(n, e); + "number" == typeof e && (0, s.al)(n, e); + for (let e = 0; 0 !== i && e < n.length; e++) { + const t = this.viewItems[n[e]], + o = (0, c.u)(t.size + i, t.minimumSize, t.maximumSize); + i -= o - t.size, t.size = o + } + } + layoutViews() { + this.contentSize = this.viewItems.reduce(((e, t) => e + t.size), 0); + let e = 0; + for (const t of this.viewItems) t.layout(e, this.layoutContext), e += + t.size; + this.sashItems.forEach((e => e.sash.layout())), this.updateSashEnablement(), + this.updateScrollableElement() + } + updateScrollableElement() { + 0 === this.orientation ? this.scrollableElement.setScrollDimensions({ + height: this.size, + scrollHeight: this.contentSize + }) : this.scrollableElement.setScrollDimensions({ + width: this.size, + scrollWidth: this.contentSize + }) + } + updateSashEnablement() { + let e = !1; + const t = this.viewItems.map((t => e = t.size - t.minimumSize > 0 || + e)); + e = !1; + const i = this.viewItems.map((t => e = t.maximumSize - t.size > 0 || + e)), + n = [...this.viewItems].reverse(); + e = !1; + const o = n.map((t => e = t.size - t.minimumSize > 0 || e)).reverse(); + e = !1; + const r = n.map((t => e = t.maximumSize - t.size > 0 || e)).reverse(); + let a = 0; + for (let e = 0; e < this.sashItems.length; e++) { + const { + sash: n + } = this.sashItems[e]; + a += this.viewItems[e].size; + const l = !(t[e] && r[e + 1]), + d = !(i[e] && o[e + 1]); + if (l && d) { + const i = (0, s.w6)(e, -1), + r = (0, s.w6)(e + 1, this.viewItems.length), + l = this.findFirstSnapIndex(i), + d = this.findFirstSnapIndex(r), + c = "number" == typeof l && !this.viewItems[l].visible, + h = "number" == typeof d && !this.viewItems[d].visible; + c && o[e] && (a > 0 || this.startSnappingEnabled) ? n.state = 1 : h && + t[e] && (a < this.contentSize || this.endSnappingEnabled) ? n.state = + 2 : n.state = 0 + } else n.state = l && !d ? 1 : !l && d ? 2 : 3 + } + } + getSashPosition(e) { + let t = 0; + for (let i = 0; i < this.sashItems.length; i++) + if (t += this.viewItems[i].size, this.sashItems[i].sash === e) return + t; + return 0 + } + findFirstSnapIndex(e) { + for (const t of e) { + const e = this.viewItems[t]; + if (e.visible && e.snap) return t + } + for (const t of e) { + const e = this.viewItems[t]; + if (e.visible && e.maximumSize - e.minimumSize > 0) return; + if (!e.visible && e.snap) return t + } + } + dispose() { + super.dispose(), this.viewItems.forEach((e => e.dispose())), this.viewItems = [], + this.sashItems.forEach((e => e.disposable.dispose())), this.sashItems = [] + } + } + }, + 3794: (e, t, i) => { + "use strict"; + i.d(t, { + $: () => l + }); + var n = i(5321), + o = i(9069), + r = i(3938), + s = i(553), + a = i(5976); + class l extends a.JT { + onclick(e, t) { + this._register(n.nm(e, n.tw.CLICK, (e => t(new r.n(e))))) + } + onmousedown(e, t) { + this._register(n.nm(e, n.tw.MOUSE_DOWN, (e => t(new r.n(e))))) + } + onmouseover(e, t) { + this._register(n.nm(e, n.tw.MOUSE_OVER, (e => t(new r.n(e))))) + } + onnonbubblingmouseout(e, t) { + this._register(n.j_(e, (e => t(new r.n(e))))) + } + onkeydown(e, t) { + this._register(n.nm(e, n.tw.KEY_DOWN, (e => t(new o.y(e))))) + } + onkeyup(e, t) { + this._register(n.nm(e, n.tw.KEY_UP, (e => t(new o.y(e))))) + } + oninput(e, t) { + this._register(n.nm(e, n.tw.INPUT, t)) + } + onblur(e, t) { + this._register(n.nm(e, n.tw.BLUR, t)) + } + onfocus(e, t) { + this._register(n.nm(e, n.tw.FOCUS, t)) + } + ignoreGesture(e) { + s.o.ignoreTarget(e) + } + } + }, + 4741: (e, t, i) => { + "use strict"; + i.d(t, { + aU: () => a, + Wi: () => l, + Z0: () => d, + wY: () => c, + eZ: () => h + }); + var n = i(4669), + o = i(5976), + r = i(3580), + s = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class a extends o.JT { + constructor(e, t = "", i = "", o = !0, r) { + super(), this._onDidChange = this._register(new n.Q5), this.onDidChange = + this._onDidChange.event, this._enabled = !0, this._checked = !1, + this._id = e, this._label = t, this._cssClass = i, this._enabled = o, + this._actionCallback = r + } + get id() { + return this._id + } + get label() { + return this._label + } + set label(e) { + this._setLabel(e) + } + _setLabel(e) { + this._label !== e && (this._label = e, this._onDidChange.fire({ + label: e + })) + } + get tooltip() { + return this._tooltip || "" + } + set tooltip(e) { + this._setTooltip(e) + } + _setTooltip(e) { + this._tooltip !== e && (this._tooltip = e, this._onDidChange.fire({ + tooltip: e + })) + } + get class() { + return this._cssClass + } + set class(e) { + this._setClass(e) + } + _setClass(e) { + this._cssClass !== e && (this._cssClass = e, this._onDidChange.fire({ + class: e + })) + } + get enabled() { + return this._enabled + } + set enabled(e) { + this._setEnabled(e) + } + _setEnabled(e) { + this._enabled !== e && (this._enabled = e, this._onDidChange.fire({ + enabled: e + })) + } + get checked() { + return this._checked + } + set checked(e) { + this._setChecked(e) + } + _setChecked(e) { + this._checked !== e && (this._checked = e, this._onDidChange.fire({ + checked: e + })) + } + run(e, t) { + return s(this, void 0, void 0, (function*() { + this._actionCallback && (yield this._actionCallback(e)) + })) + } + } + class l extends o.JT { + constructor() { + super(...arguments), this._onBeforeRun = this._register(new n.Q5), + this.onBeforeRun = this._onBeforeRun.event, this._onDidRun = this._register( + new n.Q5), this.onDidRun = this._onDidRun.event + } + run(e, t) { + return s(this, void 0, void 0, (function*() { + if (!e.enabled) return; + let i; + this._onBeforeRun.fire({ + action: e + }); + try { + yield this.runAction(e, t) + } catch (e) { + i = e + } + this._onDidRun.fire({ + action: e, + error: i + }) + })) + } + runAction(e, t) { + return s(this, void 0, void 0, (function*() { + yield e.run(t) + })) + } + } + class d extends a { + constructor(e) { + super(d.ID, e, e ? "separator text" : "separator"), this.checked = !1, + this.enabled = !1 + } + } + d.ID = "vs.actions.separator"; + class c { + constructor(e, t, i, n) { + this.tooltip = "", this.enabled = !0, this.checked = !1, this.id = e, + this.label = t, this.class = n, this._actions = i + } + get actions() { + return this._actions + } + dispose() {} + run() { + return s(this, void 0, void 0, (function*() {})) + } + } + class h extends a { + constructor() { + super(h.ID, r.N("submenu.empty", "(empty)"), void 0, !1) + } + } + h.ID = "vs.actions.empty" + }, + 9488: (e, t, i) => { + "use strict"; + + function n(e, t = 0) { + return e[e.length - (1 + t)] + } + + function o(e) { + if (0 === e.length) throw new Error("Invalid tail call"); + return [e.slice(0, e.length - 1), e[e.length - 1]] + } + + function r(e, t, i = ((e, t) => e === t)) { + if (e === t) return !0; + if (!e || !t) return !1; + if (e.length !== t.length) return !1; + for (let n = 0, o = e.length; n < o; n++) + if (!i(e[n], t[n])) return !1; + return !0 + } + + function s(e, t, i) { + let n = 0, + o = e.length - 1; + for (; n <= o;) { + const r = (n + o) / 2 | 0, + s = i(e[r], t); + if (s < 0) n = r + 1; + else { + if (!(s > 0)) return r; + o = r - 1 + } + } + return -(n + 1) + } + + function a(e, t) { + let i = 0, + n = e.length; + if (0 === n) return 0; + for (; i < n;) { + const o = Math.floor((i + n) / 2); + t(e[o]) ? n = o : i = o + 1 + } + return i + } + + function l(e, t, i) { + if ((e |= 0) >= t.length) throw new TypeError("invalid index"); + let n = t[Math.floor(t.length * Math.random())], + o = [], + r = [], + s = []; + for (let e of t) { + const t = i(e, n); + t < 0 ? o.push(e) : t > 0 ? r.push(e) : s.push(e) + } + return e < o.length ? l(e, o, i) : e < o.length + s.length ? s[0] : l(e - + (o.length + s.length), r, i) + } + + function d(e, t) { + const i = []; + let n; + for (const o of e.slice(0).sort(t)) n && 0 === t(n[0], o) ? n.push(o) : + (n = [o], i.push(n)); + return i + } + + function c(e) { + return e.filter((e => !!e)) + } + + function h(e) { + return !Array.isArray(e) || 0 === e.length + } + + function u(e) { + return Array.isArray(e) && e.length > 0 + } + + function g(e, t) { + if (!t) return e.filter(((t, i) => e.indexOf(t) === i)); + const i = Object.create(null); + return e.filter((e => { + const n = t(e); + return !i[n] && (i[n] = !0, !0) + })) + } + + function p(e) { + const t = new Set; + return e.filter((e => !t.has(e) && (t.add(e), !0))) + } + + function m(e, t) { + return e.length > 0 ? e[0] : t + } + + function f(e) { + return [].concat(...e) + } + + function _(e, t) { + let i = "number" == typeof t ? e : 0; + "number" == typeof t ? i = e : (i = 0, t = e); + const n = []; + if (i <= t) + for (let e = i; e < t; e++) n.push(e); + else + for (let e = i; e > t; e--) n.push(e); + return n + } + + function b(e, t, i) { + const n = e.slice(0, t), + o = e.slice(t); + return n.concat(i, o) + } + + function v(e, t) { + const i = e.indexOf(t); + i > -1 && (e.splice(i, 1), e.unshift(t)) + } + + function w(e, t) { + const i = e.indexOf(t); + i > -1 && (e.splice(i, 1), e.push(t)) + } + + function C(e) { + return Array.isArray(e) ? e : [e] + } + + function y(e, t, i, n) { + const o = S(e, t), + r = e.splice(o, i); + return function(e, t, i) { + const n = S(e, t), + o = e.length, + r = i.length; + e.length = o + r; + for (let t = o - 1; t >= n; t--) e[t + r] = e[t]; + for (let t = 0; t < r; t++) e[t + n] = i[t] + }(e, o, n), r + } + + function S(e, t) { + return t < 0 ? Math.max(t + e.length, 0) : Math.min(t, e.length) + } + i.d(t, { + Gb: () => n, + JH: () => o, + fS: () => r, + ry: () => s, + lG: () => a, + HW: () => l, + vM: () => d, + kX: () => c, + XY: () => h, + Of: () => u, + EB: () => g, + cU: () => p, + Xh: () => m, + xH: () => f, + w6: () => _, + Zv: () => b, + zI: () => v, + al: () => w, + _2: () => C, + db: () => y, + H9: () => x + }); + class x { + constructor(e) { + this.items = e, this.firstIdx = 0, this.lastIdx = this.items.length - + 1 + } + takeWhile(e) { + let t = this.firstIdx; + for (; t < this.items.length && e(this.items[t]);) t++; + const i = t === this.firstIdx ? null : this.items.slice(this.firstIdx, + t); + return this.firstIdx = t, i + } + takeFromEndWhile(e) { + let t = this.lastIdx; + for (; t >= 0 && e(this.items[t]);) t--; + const i = t === this.lastIdx ? null : this.items.slice(t + 1, this.lastIdx + + 1); + return this.lastIdx = t, i + } + } + }, + 5146: (e, t, i) => { + "use strict"; + + function n(e, t) { + if (!e) throw new Error(t ? `Assertion failed (${t})` : + "Assertion Failed") + } + i.d(t, { + ok: () => n + }) + }, + 5393: (e, t, i) => { + "use strict"; + i.d(t, { + J8: () => s, + PG: () => a, + eP: () => l, + vp: () => c, + rH: () => h, + Vs: () => u, + Vg: () => g, + Ps: () => p, + _F: () => m, + zh: () => f, + pY: () => _, + To: () => b, + Ue: () => v, + jT: () => w + }); + var n = i(1050), + o = i(7301), + r = i(5976); + + function s(e) { + return !!e && "function" == typeof e.then + } + + function a(e) { + const t = new n.A, + i = e(t.token), + r = new Promise(((e, n) => { + const r = t.token.onCancellationRequested((() => { + r.dispose(), t.dispose(), n((0, o.F0)()) + })); + Promise.resolve(i).then((i => { + r.dispose(), t.dispose(), e(i) + }), (e => { + r.dispose(), t.dispose(), n(e) + })) + })); + return new class { + cancel() { + t.cancel() + } + then(e, t) { + return r.then(e, t) + } catch (e) { + return this.then(void 0, e) + } finally(e) { + return r.finally(e) + } + } + } + + function l(e, t, i) { + return Promise.race([e, new Promise((e => t.onCancellationRequested((() => + e(i)))))]) + } + class d { + constructor() { + this.activePromise = null, this.queuedPromise = null, this.queuedPromiseFactory = + null + } + queue(e) { + if (this.activePromise) { + if (this.queuedPromiseFactory = e, !this.queuedPromise) { + const e = () => { + this.queuedPromise = null; + const e = this.queue(this.queuedPromiseFactory); + return this.queuedPromiseFactory = null, e + }; + this.queuedPromise = new Promise((t => { + this.activePromise.then(e, e).then(t) + })) + } + return new Promise(((e, t) => { + this.queuedPromise.then(e, t) + })) + } + return this.activePromise = e(), new Promise(((e, t) => { + this.activePromise.then((t => { + this.activePromise = null, e(t) + }), (e => { + this.activePromise = null, t(e) + })) + })) + } + } + class c { + constructor(e) { + this.defaultDelay = e, this.timeout = null, this.completionPromise = + null, this.doResolve = null, this.doReject = null, this.task = null + } + trigger(e, t = this.defaultDelay) { + return this.task = e, this.cancelTimeout(), this.completionPromise || + (this.completionPromise = new Promise(((e, t) => { + this.doResolve = e, this.doReject = t + })).then((() => { + if (this.completionPromise = null, this.doResolve = null, this.task) { + const e = this.task; + return this.task = null, e() + } + }))), this.timeout = setTimeout((() => { + this.timeout = null, this.doResolve && this.doResolve(null) + }), t), this.completionPromise + } + isTriggered() { + return null !== this.timeout + } + cancel() { + this.cancelTimeout(), this.completionPromise && (this.doReject && this + .doReject((0, o.F0)()), this.completionPromise = null) + } + cancelTimeout() { + null !== this.timeout && (clearTimeout(this.timeout), this.timeout = + null) + } + dispose() { + this.cancel() + } + } + class h { + constructor(e) { + this.delayer = new c(e), this.throttler = new d + } + trigger(e, t) { + return this.delayer.trigger((() => this.throttler.queue(e)), t) + } + dispose() { + this.delayer.dispose() + } + } + + function u(e, t) { + return t ? new Promise(((i, n) => { + const r = setTimeout((() => { + s.dispose(), i() + }), e), + s = t.onCancellationRequested((() => { + clearTimeout(r), s.dispose(), n((0, o.F0)()) + })) + })) : a((t => u(e, t))) + } + + function g(e, t = 0) { + const i = setTimeout(e, t); + return (0, r.OF)((() => clearTimeout(i))) + } + + function p(e, t = (e => !!e), i = null) { + let n = 0; + const o = e.length, + r = () => { + if (n >= o) return Promise.resolve(i); + const s = e[n++]; + return Promise.resolve(s()).then((e => t(e) ? Promise.resolve(e) : r())) + }; + return r() + } + class m { + constructor(e, t) { + this._token = -1, "function" == typeof e && "number" == typeof t && + this.setIfNotSet(e, t) + } + dispose() { + this.cancel() + } + cancel() { + -1 !== this._token && (clearTimeout(this._token), this._token = -1) + } + cancelAndSet(e, t) { + this.cancel(), this._token = setTimeout((() => { + this._token = -1, e() + }), t) + } + setIfNotSet(e, t) { + -1 === this._token && (this._token = setTimeout((() => { + this._token = -1, e() + }), t)) + } + } + class f { + constructor() { + this._token = -1 + } + dispose() { + this.cancel() + } + cancel() { + -1 !== this._token && (clearInterval(this._token), this._token = -1) + } + cancelAndSet(e, t) { + this.cancel(), this._token = setInterval((() => { + e() + }), t) + } + } + class _ { + constructor(e, t) { + this.timeoutToken = -1, this.runner = e, this.timeout = t, this.timeoutHandler = + this.onTimeout.bind(this) + } + dispose() { + this.cancel(), this.runner = null + } + cancel() { + this.isScheduled() && (clearTimeout(this.timeoutToken), this.timeoutToken = - + 1) + } + schedule(e = this.timeout) { + this.cancel(), this.timeoutToken = setTimeout(this.timeoutHandler, e) + } + get delay() { + return this.timeout + } + set delay(e) { + this.timeout = e + } + isScheduled() { + return -1 !== this.timeoutToken + } + onTimeout() { + this.timeoutToken = -1, this.runner && this.doRun() + } + doRun() { + this.runner && this.runner() + } + } + let b; + ! function() { + if ("function" != typeof requestIdleCallback || "function" != typeof cancelIdleCallback) { + const e = Object.freeze({ + didTimeout: !0, + timeRemaining: () => 15 + }); + b = t => { + const i = setTimeout((() => t(e))); + let n = !1; + return { + dispose() { + n || (n = !0, clearTimeout(i)) + } + } + } + } else b = (e, t) => { + const i = requestIdleCallback(e, "number" == typeof t ? { + timeout: t + } : void 0); + let n = !1; + return { + dispose() { + n || (n = !0, cancelIdleCallback(i)) + } + } + } + }(); + class v { + constructor(e) { + this._didRun = !1, this._executor = () => { + try { + this._value = e() + } catch (e) { + this._error = e + } finally { + this._didRun = !0 + } + }, this._handle = b((() => this._executor())) + } + dispose() { + this._handle.dispose() + } + get value() { + if (this._didRun || (this._handle.dispose(), this._executor()), this._error) + throw this._error; + return this._value + } + get isInitialized() { + return this._didRun + } + } + var w; + ! function(e) { + e.settled = function(e) { + return t = this, i = void 0, o = function*() { + let t; + const i = yield Promise.all(e.map((e => e.then((e => e), (e => { + t || (t = e) + }))))); + if (void 0 !== t) throw t; + return i + }, new((n = void 0) || (n = Promise))((function(e, r) { + function s(e) { + try { + l(o.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(o.throw(e)) + } catch (e) { + r(e) + } + } + + function l(t) { + var i; + t.done ? e(t.value) : (i = t.value, i instanceof n ? i : new n(( + function(e) { + e(i) + }))).then(s, a) + } + l((o = o.apply(t, i || [])).next()) + })); + var t, i, n, o + } + }(w || (w = {})) + }, + 3060: (e, t, i) => { + "use strict"; + i.d(t, { + KN: () => r, + mP: () => s, + oq: () => a, + Ag: () => l, + T4: () => d, + Q$: () => c, + Cg: () => h + }); + const n = "undefined" != typeof Buffer; + let o; + class r { + constructor(e) { + this.buffer = e, this.byteLength = this.buffer.byteLength + } + static wrap(e) { + return n && !Buffer.isBuffer(e) && (e = Buffer.from(e.buffer, e.byteOffset, + e.byteLength)), new r(e) + } + toString() { + return n ? this.buffer.toString() : (o || (o = new TextDecoder), o.decode( + this.buffer)) + } + } + + function s(e, t) { + return e[t + 0] << 0 >>> 0 | e[t + 1] << 8 >>> 0 + } + + function a(e, t, i) { + e[i + 0] = 255 & t, t >>>= 8, e[i + 1] = 255 & t + } + + function l(e, t) { + return e[t] * Math.pow(2, 24) + e[t + 1] * Math.pow(2, 16) + e[t + 2] * + Math.pow(2, 8) + e[t + 3] + } + + function d(e, t, i) { + e[i + 3] = t, t >>>= 8, e[i + 2] = t, t >>>= 8, e[i + 1] = t, t >>>= 8, + e[i] = t + } + + function c(e, t) { + return e[t] + } + + function h(e, t, i) { + e[i] = t + } + }, + 1050: (e, t, i) => { + "use strict"; + i.d(t, { + T: () => r, + A: () => a + }); + var n = i(4669); + const o = Object.freeze((function(e, t) { + const i = setTimeout(e.bind(t), 0); + return { + dispose() { + clearTimeout(i) + } + } + })); + var r; + ! function(e) { + e.isCancellationToken = function(t) { + return t === e.None || t === e.Cancelled || t instanceof s || !(!t || + "object" != typeof t) && "boolean" == typeof t.isCancellationRequested && + "function" == typeof t.onCancellationRequested + }, e.None = Object.freeze({ + isCancellationRequested: !1, + onCancellationRequested: n.ju.None + }), e.Cancelled = Object.freeze({ + isCancellationRequested: !0, + onCancellationRequested: o + }) + }(r || (r = {})); + class s { + constructor() { + this._isCancelled = !1, this._emitter = null + } + cancel() { + this._isCancelled || (this._isCancelled = !0, this._emitter && (this._emitter + .fire(void 0), this.dispose())) + } + get isCancellationRequested() { + return this._isCancelled + } + get onCancellationRequested() { + return this._isCancelled ? o : (this._emitter || (this._emitter = new n + .Q5), this._emitter.event) + } + dispose() { + this._emitter && (this._emitter.dispose(), this._emitter = null) + } + } + class a { + constructor(e) { + this._token = void 0, this._parentListener = void 0, this._parentListener = + e && e.onCancellationRequested(this.cancel, this) + } + get token() { + return this._token || (this._token = new s), this._token + } + cancel() { + this._token ? this._token instanceof s && this._token.cancel() : this._token = + r.Cancelled + } + dispose(e = !1) { + e && this.cancel(), this._parentListener && this._parentListener.dispose(), + this._token ? this._token instanceof s && this._token.dispose() : + this._token = r.None + } + } + }, + 3046: (e, t, i) => { + "use strict"; + i.d(t, { + fK: () => r, + CM: () => s, + JL: () => a, + lA: () => l, + dT: () => d + }); + var n = i(4669); + const o = new class { + constructor() { + this._icons = new Map, this._onDidRegister = new n.Q5 + } + add(e) { + const t = this._icons.get(e.id); + t ? e.description ? t.description = e.description : console.error( + `Duplicate registration of codicon ${e.id}`) : (this._icons.set(e.id, + e), this._onDidRegister.fire(e)) + } + get(e) { + return this._icons.get(e) + } + get all() { + return this._icons.values() + } + get onDidRegister() { + return this._onDidRegister.event + } + }, + r = o; + + function s(e, t) { + return new l(e, t) + } + + function a(e) { + return e ? e.replace(/\$\((.*?)\)/g, ((e, t) => ` ${t} `)).trim() : "" + } + class l { + constructor(e, t, i) { + this.id = e, this.definition = t, this.description = i, o.add(this) + } + get classNames() { + return "codicon codicon-" + this.id + } + get classNamesArray() { + return ["codicon", "codicon-" + this.id] + } + get cssSelector() { + return ".codicon.codicon-" + this.id + } + } + var d; + ! function(e) { + e.iconNameSegment = "[A-Za-z0-9]+", e.iconNameExpression = + "[A-Za-z0-9\\-]+", e.iconModifierExpression = "~[A-Za-z]+"; + const t = new RegExp( + `^(${e.iconNameExpression})(${e.iconModifierExpression})?$`); + + function i(e) { + if (e instanceof l) return ["codicon", "codicon-" + e.id]; + const n = t.exec(e.id); + if (!n) return i(l.error); + let [, o, r] = n; + const s = ["codicon", "codicon-" + o]; + return r && s.push("codicon-modifier-" + r.substr(1)), s + } + e.asClassNameArray = i, e.asClassName = function(e) { + return i(e).join(" ") + }, e.asCSSSelector = function(e) { + return "." + i(e).join(".") + } + }(d || (d = {})), + function(e) { + e.add = new e("add", { + fontCharacter: "\\ea60" + }), e.plus = new e("plus", { + fontCharacter: "\\ea60" + }), e.gistNew = new e("gist-new", { + fontCharacter: "\\ea60" + }), e.repoCreate = new e("repo-create", { + fontCharacter: "\\ea60" + }), e.lightbulb = new e("lightbulb", { + fontCharacter: "\\ea61" + }), e.lightBulb = new e("light-bulb", { + fontCharacter: "\\ea61" + }), e.repo = new e("repo", { + fontCharacter: "\\ea62" + }), e.repoDelete = new e("repo-delete", { + fontCharacter: "\\ea62" + }), e.gistFork = new e("gist-fork", { + fontCharacter: "\\ea63" + }), e.repoForked = new e("repo-forked", { + fontCharacter: "\\ea63" + }), e.gitPullRequest = new e("git-pull-request", { + fontCharacter: "\\ea64" + }), e.gitPullRequestAbandoned = new e("git-pull-request-abandoned", { + fontCharacter: "\\ea64" + }), e.recordKeys = new e("record-keys", { + fontCharacter: "\\ea65" + }), e.keyboard = new e("keyboard", { + fontCharacter: "\\ea65" + }), e.tag = new e("tag", { + fontCharacter: "\\ea66" + }), e.tagAdd = new e("tag-add", { + fontCharacter: "\\ea66" + }), e.tagRemove = new e("tag-remove", { + fontCharacter: "\\ea66" + }), e.person = new e("person", { + fontCharacter: "\\ea67" + }), e.personFollow = new e("person-follow", { + fontCharacter: "\\ea67" + }), e.personOutline = new e("person-outline", { + fontCharacter: "\\ea67" + }), e.personFilled = new e("person-filled", { + fontCharacter: "\\ea67" + }), e.gitBranch = new e("git-branch", { + fontCharacter: "\\ea68" + }), e.gitBranchCreate = new e("git-branch-create", { + fontCharacter: "\\ea68" + }), e.gitBranchDelete = new e("git-branch-delete", { + fontCharacter: "\\ea68" + }), e.sourceControl = new e("source-control", { + fontCharacter: "\\ea68" + }), e.mirror = new e("mirror", { + fontCharacter: "\\ea69" + }), e.mirrorPublic = new e("mirror-public", { + fontCharacter: "\\ea69" + }), e.star = new e("star", { + fontCharacter: "\\ea6a" + }), e.starAdd = new e("star-add", { + fontCharacter: "\\ea6a" + }), e.starDelete = new e("star-delete", { + fontCharacter: "\\ea6a" + }), e.starEmpty = new e("star-empty", { + fontCharacter: "\\ea6a" + }), e.comment = new e("comment", { + fontCharacter: "\\ea6b" + }), e.commentAdd = new e("comment-add", { + fontCharacter: "\\ea6b" + }), e.alert = new e("alert", { + fontCharacter: "\\ea6c" + }), e.warning = new e("warning", { + fontCharacter: "\\ea6c" + }), e.search = new e("search", { + fontCharacter: "\\ea6d" + }), e.searchSave = new e("search-save", { + fontCharacter: "\\ea6d" + }), e.logOut = new e("log-out", { + fontCharacter: "\\ea6e" + }), e.signOut = new e("sign-out", { + fontCharacter: "\\ea6e" + }), e.logIn = new e("log-in", { + fontCharacter: "\\ea6f" + }), e.signIn = new e("sign-in", { + fontCharacter: "\\ea6f" + }), e.eye = new e("eye", { + fontCharacter: "\\ea70" + }), e.eyeUnwatch = new e("eye-unwatch", { + fontCharacter: "\\ea70" + }), e.eyeWatch = new e("eye-watch", { + fontCharacter: "\\ea70" + }), e.circleFilled = new e("circle-filled", { + fontCharacter: "\\ea71" + }), e.primitiveDot = new e("primitive-dot", { + fontCharacter: "\\ea71" + }), e.closeDirty = new e("close-dirty", { + fontCharacter: "\\ea71" + }), e.debugBreakpoint = new e("debug-breakpoint", { + fontCharacter: "\\ea71" + }), e.debugBreakpointDisabled = new e("debug-breakpoint-disabled", { + fontCharacter: "\\ea71" + }), e.debugHint = new e("debug-hint", { + fontCharacter: "\\ea71" + }), e.primitiveSquare = new e("primitive-square", { + fontCharacter: "\\ea72" + }), e.edit = new e("edit", { + fontCharacter: "\\ea73" + }), e.pencil = new e("pencil", { + fontCharacter: "\\ea73" + }), e.info = new e("info", { + fontCharacter: "\\ea74" + }), e.issueOpened = new e("issue-opened", { + fontCharacter: "\\ea74" + }), e.gistPrivate = new e("gist-private", { + fontCharacter: "\\ea75" + }), e.gitForkPrivate = new e("git-fork-private", { + fontCharacter: "\\ea75" + }), e.lock = new e("lock", { + fontCharacter: "\\ea75" + }), e.mirrorPrivate = new e("mirror-private", { + fontCharacter: "\\ea75" + }), e.close = new e("close", { + fontCharacter: "\\ea76" + }), e.removeClose = new e("remove-close", { + fontCharacter: "\\ea76" + }), e.x = new e("x", { + fontCharacter: "\\ea76" + }), e.repoSync = new e("repo-sync", { + fontCharacter: "\\ea77" + }), e.sync = new e("sync", { + fontCharacter: "\\ea77" + }), e.clone = new e("clone", { + fontCharacter: "\\ea78" + }), e.desktopDownload = new e("desktop-download", { + fontCharacter: "\\ea78" + }), e.beaker = new e("beaker", { + fontCharacter: "\\ea79" + }), e.microscope = new e("microscope", { + fontCharacter: "\\ea79" + }), e.vm = new e("vm", { + fontCharacter: "\\ea7a" + }), e.deviceDesktop = new e("device-desktop", { + fontCharacter: "\\ea7a" + }), e.file = new e("file", { + fontCharacter: "\\ea7b" + }), e.fileText = new e("file-text", { + fontCharacter: "\\ea7b" + }), e.more = new e("more", { + fontCharacter: "\\ea7c" + }), e.ellipsis = new e("ellipsis", { + fontCharacter: "\\ea7c" + }), e.kebabHorizontal = new e("kebab-horizontal", { + fontCharacter: "\\ea7c" + }), e.mailReply = new e("mail-reply", { + fontCharacter: "\\ea7d" + }), e.reply = new e("reply", { + fontCharacter: "\\ea7d" + }), e.organization = new e("organization", { + fontCharacter: "\\ea7e" + }), e.organizationFilled = new e("organization-filled", { + fontCharacter: "\\ea7e" + }), e.organizationOutline = new e("organization-outline", { + fontCharacter: "\\ea7e" + }), e.newFile = new e("new-file", { + fontCharacter: "\\ea7f" + }), e.fileAdd = new e("file-add", { + fontCharacter: "\\ea7f" + }), e.newFolder = new e("new-folder", { + fontCharacter: "\\ea80" + }), e.fileDirectoryCreate = new e("file-directory-create", { + fontCharacter: "\\ea80" + }), e.trash = new e("trash", { + fontCharacter: "\\ea81" + }), e.trashcan = new e("trashcan", { + fontCharacter: "\\ea81" + }), e.history = new e("history", { + fontCharacter: "\\ea82" + }), e.clock = new e("clock", { + fontCharacter: "\\ea82" + }), e.folder = new e("folder", { + fontCharacter: "\\ea83" + }), e.fileDirectory = new e("file-directory", { + fontCharacter: "\\ea83" + }), e.symbolFolder = new e("symbol-folder", { + fontCharacter: "\\ea83" + }), e.logoGithub = new e("logo-github", { + fontCharacter: "\\ea84" + }), e.markGithub = new e("mark-github", { + fontCharacter: "\\ea84" + }), e.github = new e("github", { + fontCharacter: "\\ea84" + }), e.terminal = new e("terminal", { + fontCharacter: "\\ea85" + }), e.console = new e("console", { + fontCharacter: "\\ea85" + }), e.repl = new e("repl", { + fontCharacter: "\\ea85" + }), e.zap = new e("zap", { + fontCharacter: "\\ea86" + }), e.symbolEvent = new e("symbol-event", { + fontCharacter: "\\ea86" + }), e.error = new e("error", { + fontCharacter: "\\ea87" + }), e.stop = new e("stop", { + fontCharacter: "\\ea87" + }), e.variable = new e("variable", { + fontCharacter: "\\ea88" + }), e.symbolVariable = new e("symbol-variable", { + fontCharacter: "\\ea88" + }), e.array = new e("array", { + fontCharacter: "\\ea8a" + }), e.symbolArray = new e("symbol-array", { + fontCharacter: "\\ea8a" + }), e.symbolModule = new e("symbol-module", { + fontCharacter: "\\ea8b" + }), e.symbolPackage = new e("symbol-package", { + fontCharacter: "\\ea8b" + }), e.symbolNamespace = new e("symbol-namespace", { + fontCharacter: "\\ea8b" + }), e.symbolObject = new e("symbol-object", { + fontCharacter: "\\ea8b" + }), e.symbolMethod = new e("symbol-method", { + fontCharacter: "\\ea8c" + }), e.symbolFunction = new e("symbol-function", { + fontCharacter: "\\ea8c" + }), e.symbolConstructor = new e("symbol-constructor", { + fontCharacter: "\\ea8c" + }), e.symbolBoolean = new e("symbol-boolean", { + fontCharacter: "\\ea8f" + }), e.symbolNull = new e("symbol-null", { + fontCharacter: "\\ea8f" + }), e.symbolNumeric = new e("symbol-numeric", { + fontCharacter: "\\ea90" + }), e.symbolNumber = new e("symbol-number", { + fontCharacter: "\\ea90" + }), e.symbolStructure = new e("symbol-structure", { + fontCharacter: "\\ea91" + }), e.symbolStruct = new e("symbol-struct", { + fontCharacter: "\\ea91" + }), e.symbolParameter = new e("symbol-parameter", { + fontCharacter: "\\ea92" + }), e.symbolTypeParameter = new e("symbol-type-parameter", { + fontCharacter: "\\ea92" + }), e.symbolKey = new e("symbol-key", { + fontCharacter: "\\ea93" + }), e.symbolText = new e("symbol-text", { + fontCharacter: "\\ea93" + }), e.symbolReference = new e("symbol-reference", { + fontCharacter: "\\ea94" + }), e.goToFile = new e("go-to-file", { + fontCharacter: "\\ea94" + }), e.symbolEnum = new e("symbol-enum", { + fontCharacter: "\\ea95" + }), e.symbolValue = new e("symbol-value", { + fontCharacter: "\\ea95" + }), e.symbolRuler = new e("symbol-ruler", { + fontCharacter: "\\ea96" + }), e.symbolUnit = new e("symbol-unit", { + fontCharacter: "\\ea96" + }), e.activateBreakpoints = new e("activate-breakpoints", { + fontCharacter: "\\ea97" + }), e.archive = new e("archive", { + fontCharacter: "\\ea98" + }), e.arrowBoth = new e("arrow-both", { + fontCharacter: "\\ea99" + }), e.arrowDown = new e("arrow-down", { + fontCharacter: "\\ea9a" + }), e.arrowLeft = new e("arrow-left", { + fontCharacter: "\\ea9b" + }), e.arrowRight = new e("arrow-right", { + fontCharacter: "\\ea9c" + }), e.arrowSmallDown = new e("arrow-small-down", { + fontCharacter: "\\ea9d" + }), e.arrowSmallLeft = new e("arrow-small-left", { + fontCharacter: "\\ea9e" + }), e.arrowSmallRight = new e("arrow-small-right", { + fontCharacter: "\\ea9f" + }), e.arrowSmallUp = new e("arrow-small-up", { + fontCharacter: "\\eaa0" + }), e.arrowUp = new e("arrow-up", { + fontCharacter: "\\eaa1" + }), e.bell = new e("bell", { + fontCharacter: "\\eaa2" + }), e.bold = new e("bold", { + fontCharacter: "\\eaa3" + }), e.book = new e("book", { + fontCharacter: "\\eaa4" + }), e.bookmark = new e("bookmark", { + fontCharacter: "\\eaa5" + }), e.debugBreakpointConditionalUnverified = new e( + "debug-breakpoint-conditional-unverified", { + fontCharacter: "\\eaa6" + }), e.debugBreakpointConditional = new e( + "debug-breakpoint-conditional", { + fontCharacter: "\\eaa7" + }), e.debugBreakpointConditionalDisabled = new e( + "debug-breakpoint-conditional-disabled", { + fontCharacter: "\\eaa7" + }), e.debugBreakpointDataUnverified = new e( + "debug-breakpoint-data-unverified", { + fontCharacter: "\\eaa8" + }), e.debugBreakpointData = new e("debug-breakpoint-data", { + fontCharacter: "\\eaa9" + }), e.debugBreakpointDataDisabled = new e( + "debug-breakpoint-data-disabled", { + fontCharacter: "\\eaa9" + }), e.debugBreakpointLogUnverified = new e( + "debug-breakpoint-log-unverified", { + fontCharacter: "\\eaaa" + }), e.debugBreakpointLog = new e("debug-breakpoint-log", { + fontCharacter: "\\eaab" + }), e.debugBreakpointLogDisabled = new e( + "debug-breakpoint-log-disabled", { + fontCharacter: "\\eaab" + }), e.briefcase = new e("briefcase", { + fontCharacter: "\\eaac" + }), e.broadcast = new e("broadcast", { + fontCharacter: "\\eaad" + }), e.browser = new e("browser", { + fontCharacter: "\\eaae" + }), e.bug = new e("bug", { + fontCharacter: "\\eaaf" + }), e.calendar = new e("calendar", { + fontCharacter: "\\eab0" + }), e.caseSensitive = new e("case-sensitive", { + fontCharacter: "\\eab1" + }), e.check = new e("check", { + fontCharacter: "\\eab2" + }), e.checklist = new e("checklist", { + fontCharacter: "\\eab3" + }), e.chevronDown = new e("chevron-down", { + fontCharacter: "\\eab4" + }), e.chevronLeft = new e("chevron-left", { + fontCharacter: "\\eab5" + }), e.chevronRight = new e("chevron-right", { + fontCharacter: "\\eab6" + }), e.chevronUp = new e("chevron-up", { + fontCharacter: "\\eab7" + }), e.chromeClose = new e("chrome-close", { + fontCharacter: "\\eab8" + }), e.chromeMaximize = new e("chrome-maximize", { + fontCharacter: "\\eab9" + }), e.chromeMinimize = new e("chrome-minimize", { + fontCharacter: "\\eaba" + }), e.chromeRestore = new e("chrome-restore", { + fontCharacter: "\\eabb" + }), e.circleOutline = new e("circle-outline", { + fontCharacter: "\\eabc" + }), e.debugBreakpointUnverified = new e("debug-breakpoint-unverified", { + fontCharacter: "\\eabc" + }), e.circleSlash = new e("circle-slash", { + fontCharacter: "\\eabd" + }), e.circuitBoard = new e("circuit-board", { + fontCharacter: "\\eabe" + }), e.clearAll = new e("clear-all", { + fontCharacter: "\\eabf" + }), e.clippy = new e("clippy", { + fontCharacter: "\\eac0" + }), e.closeAll = new e("close-all", { + fontCharacter: "\\eac1" + }), e.cloudDownload = new e("cloud-download", { + fontCharacter: "\\eac2" + }), e.cloudUpload = new e("cloud-upload", { + fontCharacter: "\\eac3" + }), e.code = new e("code", { + fontCharacter: "\\eac4" + }), e.collapseAll = new e("collapse-all", { + fontCharacter: "\\eac5" + }), e.colorMode = new e("color-mode", { + fontCharacter: "\\eac6" + }), e.commentDiscussion = new e("comment-discussion", { + fontCharacter: "\\eac7" + }), e.compareChanges = new e("compare-changes", { + fontCharacter: "\\eafd" + }), e.creditCard = new e("credit-card", { + fontCharacter: "\\eac9" + }), e.dash = new e("dash", { + fontCharacter: "\\eacc" + }), e.dashboard = new e("dashboard", { + fontCharacter: "\\eacd" + }), e.database = new e("database", { + fontCharacter: "\\eace" + }), e.debugContinue = new e("debug-continue", { + fontCharacter: "\\eacf" + }), e.debugDisconnect = new e("debug-disconnect", { + fontCharacter: "\\ead0" + }), e.debugPause = new e("debug-pause", { + fontCharacter: "\\ead1" + }), e.debugRestart = new e("debug-restart", { + fontCharacter: "\\ead2" + }), e.debugStart = new e("debug-start", { + fontCharacter: "\\ead3" + }), e.debugStepInto = new e("debug-step-into", { + fontCharacter: "\\ead4" + }), e.debugStepOut = new e("debug-step-out", { + fontCharacter: "\\ead5" + }), e.debugStepOver = new e("debug-step-over", { + fontCharacter: "\\ead6" + }), e.debugStop = new e("debug-stop", { + fontCharacter: "\\ead7" + }), e.debug = new e("debug", { + fontCharacter: "\\ead8" + }), e.deviceCameraVideo = new e("device-camera-video", { + fontCharacter: "\\ead9" + }), e.deviceCamera = new e("device-camera", { + fontCharacter: "\\eada" + }), e.deviceMobile = new e("device-mobile", { + fontCharacter: "\\eadb" + }), e.diffAdded = new e("diff-added", { + fontCharacter: "\\eadc" + }), e.diffIgnored = new e("diff-ignored", { + fontCharacter: "\\eadd" + }), e.diffModified = new e("diff-modified", { + fontCharacter: "\\eade" + }), e.diffRemoved = new e("diff-removed", { + fontCharacter: "\\eadf" + }), e.diffRenamed = new e("diff-renamed", { + fontCharacter: "\\eae0" + }), e.diff = new e("diff", { + fontCharacter: "\\eae1" + }), e.discard = new e("discard", { + fontCharacter: "\\eae2" + }), e.editorLayout = new e("editor-layout", { + fontCharacter: "\\eae3" + }), e.emptyWindow = new e("empty-window", { + fontCharacter: "\\eae4" + }), e.exclude = new e("exclude", { + fontCharacter: "\\eae5" + }), e.extensions = new e("extensions", { + fontCharacter: "\\eae6" + }), e.eyeClosed = new e("eye-closed", { + fontCharacter: "\\eae7" + }), e.fileBinary = new e("file-binary", { + fontCharacter: "\\eae8" + }), e.fileCode = new e("file-code", { + fontCharacter: "\\eae9" + }), e.fileMedia = new e("file-media", { + fontCharacter: "\\eaea" + }), e.filePdf = new e("file-pdf", { + fontCharacter: "\\eaeb" + }), e.fileSubmodule = new e("file-submodule", { + fontCharacter: "\\eaec" + }), e.fileSymlinkDirectory = new e("file-symlink-directory", { + fontCharacter: "\\eaed" + }), e.fileSymlinkFile = new e("file-symlink-file", { + fontCharacter: "\\eaee" + }), e.fileZip = new e("file-zip", { + fontCharacter: "\\eaef" + }), e.files = new e("files", { + fontCharacter: "\\eaf0" + }), e.filter = new e("filter", { + fontCharacter: "\\eaf1" + }), e.flame = new e("flame", { + fontCharacter: "\\eaf2" + }), e.foldDown = new e("fold-down", { + fontCharacter: "\\eaf3" + }), e.foldUp = new e("fold-up", { + fontCharacter: "\\eaf4" + }), e.fold = new e("fold", { + fontCharacter: "\\eaf5" + }), e.folderActive = new e("folder-active", { + fontCharacter: "\\eaf6" + }), e.folderOpened = new e("folder-opened", { + fontCharacter: "\\eaf7" + }), e.gear = new e("gear", { + fontCharacter: "\\eaf8" + }), e.gift = new e("gift", { + fontCharacter: "\\eaf9" + }), e.gistSecret = new e("gist-secret", { + fontCharacter: "\\eafa" + }), e.gist = new e("gist", { + fontCharacter: "\\eafb" + }), e.gitCommit = new e("git-commit", { + fontCharacter: "\\eafc" + }), e.gitCompare = new e("git-compare", { + fontCharacter: "\\eafd" + }), e.gitMerge = new e("git-merge", { + fontCharacter: "\\eafe" + }), e.githubAction = new e("github-action", { + fontCharacter: "\\eaff" + }), e.githubAlt = new e("github-alt", { + fontCharacter: "\\eb00" + }), e.globe = new e("globe", { + fontCharacter: "\\eb01" + }), e.grabber = new e("grabber", { + fontCharacter: "\\eb02" + }), e.graph = new e("graph", { + fontCharacter: "\\eb03" + }), e.gripper = new e("gripper", { + fontCharacter: "\\eb04" + }), e.heart = new e("heart", { + fontCharacter: "\\eb05" + }), e.home = new e("home", { + fontCharacter: "\\eb06" + }), e.horizontalRule = new e("horizontal-rule", { + fontCharacter: "\\eb07" + }), e.hubot = new e("hubot", { + fontCharacter: "\\eb08" + }), e.inbox = new e("inbox", { + fontCharacter: "\\eb09" + }), e.issueClosed = new e("issue-closed", { + fontCharacter: "\\eba4" + }), e.issueReopened = new e("issue-reopened", { + fontCharacter: "\\eb0b" + }), e.issues = new e("issues", { + fontCharacter: "\\eb0c" + }), e.italic = new e("italic", { + fontCharacter: "\\eb0d" + }), e.jersey = new e("jersey", { + fontCharacter: "\\eb0e" + }), e.json = new e("json", { + fontCharacter: "\\eb0f" + }), e.kebabVertical = new e("kebab-vertical", { + fontCharacter: "\\eb10" + }), e.key = new e("key", { + fontCharacter: "\\eb11" + }), e.law = new e("law", { + fontCharacter: "\\eb12" + }), e.lightbulbAutofix = new e("lightbulb-autofix", { + fontCharacter: "\\eb13" + }), e.linkExternal = new e("link-external", { + fontCharacter: "\\eb14" + }), e.link = new e("link", { + fontCharacter: "\\eb15" + }), e.listOrdered = new e("list-ordered", { + fontCharacter: "\\eb16" + }), e.listUnordered = new e("list-unordered", { + fontCharacter: "\\eb17" + }), e.liveShare = new e("live-share", { + fontCharacter: "\\eb18" + }), e.loading = new e("loading", { + fontCharacter: "\\eb19" + }), e.location = new e("location", { + fontCharacter: "\\eb1a" + }), e.mailRead = new e("mail-read", { + fontCharacter: "\\eb1b" + }), e.mail = new e("mail", { + fontCharacter: "\\eb1c" + }), e.markdown = new e("markdown", { + fontCharacter: "\\eb1d" + }), e.megaphone = new e("megaphone", { + fontCharacter: "\\eb1e" + }), e.mention = new e("mention", { + fontCharacter: "\\eb1f" + }), e.milestone = new e("milestone", { + fontCharacter: "\\eb20" + }), e.mortarBoard = new e("mortar-board", { + fontCharacter: "\\eb21" + }), e.move = new e("move", { + fontCharacter: "\\eb22" + }), e.multipleWindows = new e("multiple-windows", { + fontCharacter: "\\eb23" + }), e.mute = new e("mute", { + fontCharacter: "\\eb24" + }), e.noNewline = new e("no-newline", { + fontCharacter: "\\eb25" + }), e.note = new e("note", { + fontCharacter: "\\eb26" + }), e.octoface = new e("octoface", { + fontCharacter: "\\eb27" + }), e.openPreview = new e("open-preview", { + fontCharacter: "\\eb28" + }), e.package_ = new e("package", { + fontCharacter: "\\eb29" + }), e.paintcan = new e("paintcan", { + fontCharacter: "\\eb2a" + }), e.pin = new e("pin", { + fontCharacter: "\\eb2b" + }), e.play = new e("play", { + fontCharacter: "\\eb2c" + }), e.run = new e("run", { + fontCharacter: "\\eb2c" + }), e.plug = new e("plug", { + fontCharacter: "\\eb2d" + }), e.preserveCase = new e("preserve-case", { + fontCharacter: "\\eb2e" + }), e.preview = new e("preview", { + fontCharacter: "\\eb2f" + }), e.project = new e("project", { + fontCharacter: "\\eb30" + }), e.pulse = new e("pulse", { + fontCharacter: "\\eb31" + }), e.question = new e("question", { + fontCharacter: "\\eb32" + }), e.quote = new e("quote", { + fontCharacter: "\\eb33" + }), e.radioTower = new e("radio-tower", { + fontCharacter: "\\eb34" + }), e.reactions = new e("reactions", { + fontCharacter: "\\eb35" + }), e.references = new e("references", { + fontCharacter: "\\eb36" + }), e.refresh = new e("refresh", { + fontCharacter: "\\eb37" + }), e.regex = new e("regex", { + fontCharacter: "\\eb38" + }), e.remoteExplorer = new e("remote-explorer", { + fontCharacter: "\\eb39" + }), e.remote = new e("remote", { + fontCharacter: "\\eb3a" + }), e.remove = new e("remove", { + fontCharacter: "\\eb3b" + }), e.replaceAll = new e("replace-all", { + fontCharacter: "\\eb3c" + }), e.replace = new e("replace", { + fontCharacter: "\\eb3d" + }), e.repoClone = new e("repo-clone", { + fontCharacter: "\\eb3e" + }), e.repoForcePush = new e("repo-force-push", { + fontCharacter: "\\eb3f" + }), e.repoPull = new e("repo-pull", { + fontCharacter: "\\eb40" + }), e.repoPush = new e("repo-push", { + fontCharacter: "\\eb41" + }), e.report = new e("report", { + fontCharacter: "\\eb42" + }), e.requestChanges = new e("request-changes", { + fontCharacter: "\\eb43" + }), e.rocket = new e("rocket", { + fontCharacter: "\\eb44" + }), e.rootFolderOpened = new e("root-folder-opened", { + fontCharacter: "\\eb45" + }), e.rootFolder = new e("root-folder", { + fontCharacter: "\\eb46" + }), e.rss = new e("rss", { + fontCharacter: "\\eb47" + }), e.ruby = new e("ruby", { + fontCharacter: "\\eb48" + }), e.saveAll = new e("save-all", { + fontCharacter: "\\eb49" + }), e.saveAs = new e("save-as", { + fontCharacter: "\\eb4a" + }), e.save = new e("save", { + fontCharacter: "\\eb4b" + }), e.screenFull = new e("screen-full", { + fontCharacter: "\\eb4c" + }), e.screenNormal = new e("screen-normal", { + fontCharacter: "\\eb4d" + }), e.searchStop = new e("search-stop", { + fontCharacter: "\\eb4e" + }), e.server = new e("server", { + fontCharacter: "\\eb50" + }), e.settingsGear = new e("settings-gear", { + fontCharacter: "\\eb51" + }), e.settings = new e("settings", { + fontCharacter: "\\eb52" + }), e.shield = new e("shield", { + fontCharacter: "\\eb53" + }), e.smiley = new e("smiley", { + fontCharacter: "\\eb54" + }), e.sortPrecedence = new e("sort-precedence", { + fontCharacter: "\\eb55" + }), e.splitHorizontal = new e("split-horizontal", { + fontCharacter: "\\eb56" + }), e.splitVertical = new e("split-vertical", { + fontCharacter: "\\eb57" + }), e.squirrel = new e("squirrel", { + fontCharacter: "\\eb58" + }), e.starFull = new e("star-full", { + fontCharacter: "\\eb59" + }), e.starHalf = new e("star-half", { + fontCharacter: "\\eb5a" + }), e.symbolClass = new e("symbol-class", { + fontCharacter: "\\eb5b" + }), e.symbolColor = new e("symbol-color", { + fontCharacter: "\\eb5c" + }), e.symbolConstant = new e("symbol-constant", { + fontCharacter: "\\eb5d" + }), e.symbolEnumMember = new e("symbol-enum-member", { + fontCharacter: "\\eb5e" + }), e.symbolField = new e("symbol-field", { + fontCharacter: "\\eb5f" + }), e.symbolFile = new e("symbol-file", { + fontCharacter: "\\eb60" + }), e.symbolInterface = new e("symbol-interface", { + fontCharacter: "\\eb61" + }), e.symbolKeyword = new e("symbol-keyword", { + fontCharacter: "\\eb62" + }), e.symbolMisc = new e("symbol-misc", { + fontCharacter: "\\eb63" + }), e.symbolOperator = new e("symbol-operator", { + fontCharacter: "\\eb64" + }), e.symbolProperty = new e("symbol-property", { + fontCharacter: "\\eb65" + }), e.wrench = new e("wrench", { + fontCharacter: "\\eb65" + }), e.wrenchSubaction = new e("wrench-subaction", { + fontCharacter: "\\eb65" + }), e.symbolSnippet = new e("symbol-snippet", { + fontCharacter: "\\eb66" + }), e.tasklist = new e("tasklist", { + fontCharacter: "\\eb67" + }), e.telescope = new e("telescope", { + fontCharacter: "\\eb68" + }), e.textSize = new e("text-size", { + fontCharacter: "\\eb69" + }), e.threeBars = new e("three-bars", { + fontCharacter: "\\eb6a" + }), e.thumbsdown = new e("thumbsdown", { + fontCharacter: "\\eb6b" + }), e.thumbsup = new e("thumbsup", { + fontCharacter: "\\eb6c" + }), e.tools = new e("tools", { + fontCharacter: "\\eb6d" + }), e.triangleDown = new e("triangle-down", { + fontCharacter: "\\eb6e" + }), e.triangleLeft = new e("triangle-left", { + fontCharacter: "\\eb6f" + }), e.triangleRight = new e("triangle-right", { + fontCharacter: "\\eb70" + }), e.triangleUp = new e("triangle-up", { + fontCharacter: "\\eb71" + }), e.twitter = new e("twitter", { + fontCharacter: "\\eb72" + }), e.unfold = new e("unfold", { + fontCharacter: "\\eb73" + }), e.unlock = new e("unlock", { + fontCharacter: "\\eb74" + }), e.unmute = new e("unmute", { + fontCharacter: "\\eb75" + }), e.unverified = new e("unverified", { + fontCharacter: "\\eb76" + }), e.verified = new e("verified", { + fontCharacter: "\\eb77" + }), e.versions = new e("versions", { + fontCharacter: "\\eb78" + }), e.vmActive = new e("vm-active", { + fontCharacter: "\\eb79" + }), e.vmOutline = new e("vm-outline", { + fontCharacter: "\\eb7a" + }), e.vmRunning = new e("vm-running", { + fontCharacter: "\\eb7b" + }), e.watch = new e("watch", { + fontCharacter: "\\eb7c" + }), e.whitespace = new e("whitespace", { + fontCharacter: "\\eb7d" + }), e.wholeWord = new e("whole-word", { + fontCharacter: "\\eb7e" + }), e.window = new e("window", { + fontCharacter: "\\eb7f" + }), e.wordWrap = new e("word-wrap", { + fontCharacter: "\\eb80" + }), e.zoomIn = new e("zoom-in", { + fontCharacter: "\\eb81" + }), e.zoomOut = new e("zoom-out", { + fontCharacter: "\\eb82" + }), e.listFilter = new e("list-filter", { + fontCharacter: "\\eb83" + }), e.listFlat = new e("list-flat", { + fontCharacter: "\\eb84" + }), e.listSelection = new e("list-selection", { + fontCharacter: "\\eb85" + }), e.selection = new e("selection", { + fontCharacter: "\\eb85" + }), e.listTree = new e("list-tree", { + fontCharacter: "\\eb86" + }), e.debugBreakpointFunctionUnverified = new e( + "debug-breakpoint-function-unverified", { + fontCharacter: "\\eb87" + }), e.debugBreakpointFunction = new e("debug-breakpoint-function", { + fontCharacter: "\\eb88" + }), e.debugBreakpointFunctionDisabled = new e( + "debug-breakpoint-function-disabled", { + fontCharacter: "\\eb88" + }), e.debugStackframeActive = new e("debug-stackframe-active", { + fontCharacter: "\\eb89" + }), e.debugStackframeDot = new e("debug-stackframe-dot", { + fontCharacter: "\\eb8a" + }), e.debugStackframe = new e("debug-stackframe", { + fontCharacter: "\\eb8b" + }), e.debugStackframeFocused = new e("debug-stackframe-focused", { + fontCharacter: "\\eb8b" + }), e.debugBreakpointUnsupported = new e("debug-breakpoint-unsupported", { + fontCharacter: "\\eb8c" + }), e.symbolString = new e("symbol-string", { + fontCharacter: "\\eb8d" + }), e.debugReverseContinue = new e("debug-reverse-continue", { + fontCharacter: "\\eb8e" + }), e.debugStepBack = new e("debug-step-back", { + fontCharacter: "\\eb8f" + }), e.debugRestartFrame = new e("debug-restart-frame", { + fontCharacter: "\\eb90" + }), e.callIncoming = new e("call-incoming", { + fontCharacter: "\\eb92" + }), e.callOutgoing = new e("call-outgoing", { + fontCharacter: "\\eb93" + }), e.menu = new e("menu", { + fontCharacter: "\\eb94" + }), e.expandAll = new e("expand-all", { + fontCharacter: "\\eb95" + }), e.feedback = new e("feedback", { + fontCharacter: "\\eb96" + }), e.groupByRefType = new e("group-by-ref-type", { + fontCharacter: "\\eb97" + }), e.ungroupByRefType = new e("ungroup-by-ref-type", { + fontCharacter: "\\eb98" + }), e.account = new e("account", { + fontCharacter: "\\eb99" + }), e.bellDot = new e("bell-dot", { + fontCharacter: "\\eb9a" + }), e.debugConsole = new e("debug-console", { + fontCharacter: "\\eb9b" + }), e.library = new e("library", { + fontCharacter: "\\eb9c" + }), e.output = new e("output", { + fontCharacter: "\\eb9d" + }), e.runAll = new e("run-all", { + fontCharacter: "\\eb9e" + }), e.syncIgnored = new e("sync-ignored", { + fontCharacter: "\\eb9f" + }), e.pinned = new e("pinned", { + fontCharacter: "\\eba0" + }), e.githubInverted = new e("github-inverted", { + fontCharacter: "\\eba1" + }), e.debugAlt = new e("debug-alt", { + fontCharacter: "\\eb91" + }), e.serverProcess = new e("server-process", { + fontCharacter: "\\eba2" + }), e.serverEnvironment = new e("server-environment", { + fontCharacter: "\\eba3" + }), e.pass = new e("pass", { + fontCharacter: "\\eba4" + }), e.stopCircle = new e("stop-circle", { + fontCharacter: "\\eba5" + }), e.playCircle = new e("play-circle", { + fontCharacter: "\\eba6" + }), e.record = new e("record", { + fontCharacter: "\\eba7" + }), e.debugAltSmall = new e("debug-alt-small", { + fontCharacter: "\\eba8" + }), e.vmConnect = new e("vm-connect", { + fontCharacter: "\\eba9" + }), e.cloud = new e("cloud", { + fontCharacter: "\\ebaa" + }), e.merge = new e("merge", { + fontCharacter: "\\ebab" + }), e.exportIcon = new e("export", { + fontCharacter: "\\ebac" + }), e.graphLeft = new e("graph-left", { + fontCharacter: "\\ebad" + }), e.magnet = new e("magnet", { + fontCharacter: "\\ebae" + }), e.notebook = new e("notebook", { + fontCharacter: "\\ebaf" + }), e.redo = new e("redo", { + fontCharacter: "\\ebb0" + }), e.checkAll = new e("check-all", { + fontCharacter: "\\ebb1" + }), e.pinnedDirty = new e("pinned-dirty", { + fontCharacter: "\\ebb2" + }), e.passFilled = new e("pass-filled", { + fontCharacter: "\\ebb3" + }), e.circleLargeFilled = new e("circle-large-filled", { + fontCharacter: "\\ebb4" + }), e.circleLargeOutline = new e("circle-large-outline", { + fontCharacter: "\\ebb5" + }), e.combine = new e("combine", { + fontCharacter: "\\ebb6" + }), e.gather = new e("gather", { + fontCharacter: "\\ebb6" + }), e.table = new e("table", { + fontCharacter: "\\ebb7" + }), e.variableGroup = new e("variable-group", { + fontCharacter: "\\ebb8" + }), e.typeHierarchy = new e("type-hierarchy", { + fontCharacter: "\\ebb9" + }), e.typeHierarchySub = new e("type-hierarchy-sub", { + fontCharacter: "\\ebba" + }), e.typeHierarchySuper = new e("type-hierarchy-super", { + fontCharacter: "\\ebbb" + }), e.gitPullRequestCreate = new e("git-pull-request-create", { + fontCharacter: "\\ebbc" + }), e.runAbove = new e("run-above", { + fontCharacter: "\\ebbd" + }), e.runBelow = new e("run-below", { + fontCharacter: "\\ebbe" + }), e.notebookTemplate = new e("notebook-template", { + fontCharacter: "\\ebbf" + }), e.debugRerun = new e("debug-rerun", { + fontCharacter: "\\ebc0" + }), e.workspaceTrusted = new e("workspace-trusted", { + fontCharacter: "\\ebc1" + }), e.workspaceUntrusted = new e("workspace-untrusted", { + fontCharacter: "\\ebc2" + }), e.workspaceUnspecified = new e("workspace-unspecified", { + fontCharacter: "\\ebc3" + }), e.terminalCmd = new e("terminal-cmd", { + fontCharacter: "\\ebc4" + }), e.terminalDebian = new e("terminal-debian", { + fontCharacter: "\\ebc5" + }), e.terminalLinux = new e("terminal-linux", { + fontCharacter: "\\ebc6" + }), e.terminalPowershell = new e("terminal-powershell", { + fontCharacter: "\\ebc7" + }), e.terminalTmux = new e("terminal-tmux", { + fontCharacter: "\\ebc8" + }), e.terminalUbuntu = new e("terminal-ubuntu", { + fontCharacter: "\\ebc9" + }), e.terminalBash = new e("terminal-bash", { + fontCharacter: "\\ebca" + }), e.arrowSwap = new e("arrow-swap", { + fontCharacter: "\\ebcb" + }), e.copy = new e("copy", { + fontCharacter: "\\ebcc" + }), e.personAdd = new e("person-add", { + fontCharacter: "\\ebcd" + }), e.filterFilled = new e("filter-filled", { + fontCharacter: "\\ebce" + }), e.wand = new e("wand", { + fontCharacter: "\\ebcf" + }), e.debugLineByLine = new e("debug-line-by-line", { + fontCharacter: "\\ebd0" + }), e.inspect = new e("inspect", { + fontCharacter: "\\ebd1" + }), e.layers = new e("layers", { + fontCharacter: "\\ebd2" + }), e.layersDot = new e("layers-dot", { + fontCharacter: "\\ebd3" + }), e.layersActive = new e("layers-active", { + fontCharacter: "\\ebd4" + }), e.compass = new e("compass", { + fontCharacter: "\\ebd5" + }), e.compassDot = new e("compass-dot", { + fontCharacter: "\\ebd6" + }), e.compassActive = new e("compass-active", { + fontCharacter: "\\ebd7" + }), e.azure = new e("azure", { + fontCharacter: "\\ebd8" + }), e.issueDraft = new e("issue-draft", { + fontCharacter: "\\ebd9" + }), e.gitPullRequestClosed = new e("git-pull-request-closed", { + fontCharacter: "\\ebda" + }), e.gitPullRequestDraft = new e("git-pull-request-draft", { + fontCharacter: "\\ebdb" + }), e.debugAll = new e("debug-all", { + fontCharacter: "\\ebdc" + }), e.debugCoverage = new e("debug-coverage", { + fontCharacter: "\\ebdd" + }), e.runErrors = new e("run-errors", { + fontCharacter: "\\ebde" + }), e.folderLibrary = new e("folder-library", { + fontCharacter: "\\ebdf" + }), e.dropDownButton = new e("drop-down-button", e.chevronDown.definition) + }(l || (l = {})) + }, + 6626: (e, t, i) => { + "use strict"; + i.d(t, { + E: () => o, + r: () => r + }); + const n = Object.prototype.hasOwnProperty; + + function o(e, t) { + for (let i in e) + if (n.call(e, i) && !1 === t({ + key: i, + value: e[i] + }, (function() { + delete e[i] + }))) return + } + class r { + constructor() { + this.map = new Map + } + add(e, t) { + let i = this.map.get(e); + i || (i = new Set, this.map.set(e, i)), i.add(t) + } + delete(e, t) { + const i = this.map.get(e); + i && (i.delete(t), 0 === i.size && this.map.delete(e)) + } + forEach(e, t) { + const i = this.map.get(e); + i && i.forEach(t) + } + } + }, + 1264: (e, t, i) => { + "use strict"; + + function n(e, t) { + const i = Math.pow(10, t); + return Math.round(e * i) / i + } + i.d(t, { + VS: () => o, + tx: () => s, + Il: () => a + }); + class o { + constructor(e, t, i, o = 1) { + this._rgbaBrand = void 0, this.r = 0 | Math.min(255, Math.max(0, e)), + this.g = 0 | Math.min(255, Math.max(0, t)), this.b = 0 | Math.min(255, + Math.max(0, i)), this.a = n(Math.max(Math.min(1, o), 0), 3) + } + static equals(e, t) { + return e.r === t.r && e.g === t.g && e.b === t.b && e.a === t.a + } + } + class r { + constructor(e, t, i, o) { + this._hslaBrand = void 0, this.h = 0 | Math.max(Math.min(360, e), 0), + this.s = n(Math.max(Math.min(1, t), 0), 3), this.l = n(Math.max(Math.min( + 1, i), 0), 3), this.a = n(Math.max(Math.min(1, o), 0), 3) + } + static equals(e, t) { + return e.h === t.h && e.s === t.s && e.l === t.l && e.a === t.a + } + static fromRGBA(e) { + const t = e.r / 255, + i = e.g / 255, + n = e.b / 255, + o = e.a, + s = Math.max(t, i, n), + a = Math.min(t, i, n); + let l = 0, + d = 0; + const c = (a + s) / 2, + h = s - a; + if (h > 0) { + switch (d = Math.min(c <= .5 ? h / (2 * c) : h / (2 - 2 * c), 1), s) { + case t: + l = (i - n) / h + (i < n ? 6 : 0); + break; + case i: + l = (n - t) / h + 2; + break; + case n: + l = (t - i) / h + 4 + } + l *= 60, l = Math.round(l) + } + return new r(l, d, c, o) + } + static _hue2rgb(e, t, i) { + return i < 0 && (i += 1), i > 1 && (i -= 1), i < 1 / 6 ? e + 6 * (t - + e) * i : i < .5 ? t : i < 2 / 3 ? e + (t - e) * (2 / 3 - i) * 6 : e + } + static toRGBA(e) { + const t = e.h / 360, + { + s: i, + l: n, + a: s + } = e; + let a, l, d; + if (0 === i) a = l = d = n; + else { + const e = n < .5 ? n * (1 + i) : n + i - n * i, + o = 2 * n - e; + a = r._hue2rgb(o, e, t + 1 / 3), l = r._hue2rgb(o, e, t), d = r._hue2rgb( + o, e, t - 1 / 3) + } + return new o(Math.round(255 * a), Math.round(255 * l), Math.round(255 * + d), s) + } + } + class s { + constructor(e, t, i, o) { + this._hsvaBrand = void 0, this.h = 0 | Math.max(Math.min(360, e), 0), + this.s = n(Math.max(Math.min(1, t), 0), 3), this.v = n(Math.max(Math.min( + 1, i), 0), 3), this.a = n(Math.max(Math.min(1, o), 0), 3) + } + static equals(e, t) { + return e.h === t.h && e.s === t.s && e.v === t.v && e.a === t.a + } + static fromRGBA(e) { + const t = e.r / 255, + i = e.g / 255, + n = e.b / 255, + o = Math.max(t, i, n), + r = o - Math.min(t, i, n), + a = 0 === o ? 0 : r / o; + let l; + return l = 0 === r ? 0 : o === t ? ((i - n) / r % 6 + 6) % 6 : o === i ? + (n - t) / r + 2 : (t - i) / r + 4, new s(Math.round(60 * l), a, o, e.a) + } + static toRGBA(e) { + const { + h: t, + s: i, + v: n, + a: r + } = e, s = n * i, a = s * (1 - Math.abs(t / 60 % 2 - 1)), l = n - s; + let [d, c, h] = [0, 0, 0]; + return t < 60 ? (d = s, c = a) : t < 120 ? (d = a, c = s) : t < 180 ? + (c = s, h = a) : t < 240 ? (c = a, h = s) : t < 300 ? (d = a, h = s) : + t <= 360 && (d = s, h = a), d = Math.round(255 * (d + l)), c = Math.round( + 255 * (c + l)), h = Math.round(255 * (h + l)), new o(d, c, h, r) + } + } + class a { + constructor(e) { + if (!e) throw new Error("Color needs a value"); + if (e instanceof o) this.rgba = e; + else if (e instanceof r) this._hsla = e, this.rgba = r.toRGBA(e); + else { + if (!(e instanceof s)) throw new Error("Invalid color ctor argument"); + this._hsva = e, this.rgba = s.toRGBA(e) + } + } + static fromHex(e) { + return a.Format.CSS.parseHex(e) || a.red + } + get hsla() { + return this._hsla ? this._hsla : r.fromRGBA(this.rgba) + } + get hsva() { + return this._hsva ? this._hsva : s.fromRGBA(this.rgba) + } + equals(e) { + return !!e && o.equals(this.rgba, e.rgba) && r.equals(this.hsla, e.hsla) && + s.equals(this.hsva, e.hsva) + } + getRelativeLuminance() { + return n(.2126 * a._relativeLuminanceForComponent(this.rgba.r) + .7152 * + a._relativeLuminanceForComponent(this.rgba.g) + .0722 * a._relativeLuminanceForComponent( + this.rgba.b), 4) + } + static _relativeLuminanceForComponent(e) { + const t = e / 255; + return t <= .03928 ? t / 12.92 : Math.pow((t + .055) / 1.055, 2.4) + } + isLighter() { + return (299 * this.rgba.r + 587 * this.rgba.g + 114 * this.rgba.b) / + 1e3 >= 128 + } + isLighterThan(e) { + return this.getRelativeLuminance() > e.getRelativeLuminance() + } + isDarkerThan(e) { + return this.getRelativeLuminance() < e.getRelativeLuminance() + } + lighten(e) { + return new a(new r(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * + e, this.hsla.a)) + } + darken(e) { + return new a(new r(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * + e, this.hsla.a)) + } + transparent(e) { + const { + r: t, + g: i, + b: n, + a: r + } = this.rgba; + return new a(new o(t, i, n, r * e)) + } + isTransparent() { + return 0 === this.rgba.a + } + isOpaque() { + return 1 === this.rgba.a + } + opposite() { + return new a(new o(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba + .b, this.rgba.a)) + } + toString() { + return "" + a.Format.CSS.format(this) + } + static getLighterColor(e, t, i) { + if (e.isLighterThan(t)) return e; + i = i || .5; + const n = e.getRelativeLuminance(), + o = t.getRelativeLuminance(); + return i = i * (o - n) / o, e.lighten(i) + } + static getDarkerColor(e, t, i) { + if (e.isDarkerThan(t)) return e; + i = i || .5; + const n = e.getRelativeLuminance(); + return i = i * (n - t.getRelativeLuminance()) / n, e.darken(i) + } + } + a.white = new a(new o(255, 255, 255, 1)), a.black = new a(new o(0, 0, 0, + 1)), a.red = new a(new o(255, 0, 0, 1)), a.blue = new a(new o(0, 0, 255, + 1)), a.cyan = new a(new o(0, 255, 255, 1)), a.lightgrey = new a(new o( + 211, 211, 211, 1)), a.transparent = new a(new o(0, 0, 0, 0)), + function(e) { + let t; + ! function(t) { + let i; + ! function(t) { + function i(e) { + const t = e.toString(16); + return 2 !== t.length ? "0" + t : t + } + + function n(e) { + switch (e) { + case 48: + return 0; + case 49: + return 1; + case 50: + return 2; + case 51: + return 3; + case 52: + return 4; + case 53: + return 5; + case 54: + return 6; + case 55: + return 7; + case 56: + return 8; + case 57: + return 9; + case 97: + case 65: + return 10; + case 98: + case 66: + return 11; + case 99: + case 67: + return 12; + case 100: + case 68: + return 13; + case 101: + case 69: + return 14; + case 102: + case 70: + return 15 + } + return 0 + } + t.formatRGB = function(t) { + return 1 === t.rgba.a ? + `rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})` : e.Format.CSS.formatRGBA( + t) + }, t.formatRGBA = function(e) { + return + `rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})` + }, t.formatHSL = function(t) { + return 1 === t.hsla.a ? + `hsl(${t.hsla.h}, ${(100*t.hsla.s).toFixed(2)}%, ${(100*t.hsla.l).toFixed(2)}%)` : + e.Format.CSS.formatHSLA(t) + }, t.formatHSLA = function(e) { + return + `hsla(${e.hsla.h}, ${(100*e.hsla.s).toFixed(2)}%, ${(100*e.hsla.l).toFixed(2)}%, ${e.hsla.a.toFixed(2)})` + }, t.formatHex = function(e) { + return `#${i(e.rgba.r)}${i(e.rgba.g)}${i(e.rgba.b)}` + }, t.formatHexA = function(t, n = !1) { + return n && 1 === t.rgba.a ? e.Format.CSS.formatHex(t) : + `#${i(t.rgba.r)}${i(t.rgba.g)}${i(t.rgba.b)}${i(Math.round(255*t.rgba.a))}` + }, t.format = function(t) { + return t.isOpaque() ? e.Format.CSS.formatHex(t) : e.Format.CSS.formatRGBA( + t) + }, t.parseHex = function(t) { + const i = t.length; + if (0 === i) return null; + if (35 !== t.charCodeAt(0)) return null; + if (7 === i) { + const i = 16 * n(t.charCodeAt(1)) + n(t.charCodeAt(2)), + r = 16 * n(t.charCodeAt(3)) + n(t.charCodeAt(4)), + s = 16 * n(t.charCodeAt(5)) + n(t.charCodeAt(6)); + return new e(new o(i, r, s, 1)) + } + if (9 === i) { + const i = 16 * n(t.charCodeAt(1)) + n(t.charCodeAt(2)), + r = 16 * n(t.charCodeAt(3)) + n(t.charCodeAt(4)), + s = 16 * n(t.charCodeAt(5)) + n(t.charCodeAt(6)), + a = 16 * n(t.charCodeAt(7)) + n(t.charCodeAt(8)); + return new e(new o(i, r, s, a / 255)) + } + if (4 === i) { + const i = n(t.charCodeAt(1)), + r = n(t.charCodeAt(2)), + s = n(t.charCodeAt(3)); + return new e(new o(16 * i + i, 16 * r + r, 16 * s + s)) + } + if (5 === i) { + const i = n(t.charCodeAt(1)), + r = n(t.charCodeAt(2)), + s = n(t.charCodeAt(3)), + a = n(t.charCodeAt(4)); + return new e(new o(16 * i + i, 16 * r + r, 16 * s + s, (16 * a + a) / + 255)) + } + return null + } + }(i = t.CSS || (t.CSS = {})) + }(t = e.Format || (e.Format = {})) + }(a || (a = {})) + }, + 9898: (e, t, i) => { + "use strict"; + + function n(e, t, i) { + let n = null, + o = null; + if ("function" == typeof i.value ? (n = "value", o = i.value, 0 !== o.length && + console.warn( + "Memoize should only be used in functions with zero parameters")) : + "function" == typeof i.get && (n = "get", o = i.get), !o) throw new Error( + "not supported"); + const r = `$memoize$${t}`; + i[n] = function(...e) { + return this.hasOwnProperty(r) || Object.defineProperty(this, r, { + configurable: !1, + enumerable: !1, + writable: !1, + value: o.apply(this, e) + }), this[r] + } + } + i.d(t, { + H: () => n + }) + }, + 2484: (e, t, i) => { + "use strict"; + i.d(t, { + Hs: () => c, + a$: () => s + }); + class n { + constructor(e, t, i, n) { + this.originalStart = e, this.originalLength = t, this.modifiedStart = + i, this.modifiedLength = n + } + getOriginalEnd() { + return this.originalStart + this.originalLength + } + getModifiedEnd() { + return this.modifiedStart + this.modifiedLength + } + } + var o = i(9954); + class r { + constructor(e) { + this.source = e + } + getElements() { + const e = this.source, + t = new Int32Array(e.length); + for (let i = 0, n = e.length; i < n; i++) t[i] = e.charCodeAt(i); + return t + } + } + + function s(e, t, i) { + return new c(new r(e), new r(t)).ComputeDiff(i).changes + } + class a { + static Assert(e, t) { + if (!e) throw new Error(t) + } + } + class l { + static Copy(e, t, i, n, o) { + for (let r = 0; r < o; r++) i[n + r] = e[t + r] + } + static Copy2(e, t, i, n, o) { + for (let r = 0; r < o; r++) i[n + r] = e[t + r] + } + } + class d { + constructor() { + this.m_changes = [], this.m_originalStart = 1073741824, this.m_modifiedStart = + 1073741824, this.m_originalCount = 0, this.m_modifiedCount = 0 + } + MarkNextChange() { + (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.m_changes + .push(new n(this.m_originalStart, this.m_originalCount, this.m_modifiedStart, + this.m_modifiedCount)), this.m_originalCount = 0, this.m_modifiedCount = + 0, this.m_originalStart = 1073741824, this.m_modifiedStart = + 1073741824 + } + AddOriginalElement(e, t) { + this.m_originalStart = Math.min(this.m_originalStart, e), this.m_modifiedStart = + Math.min(this.m_modifiedStart, t), this.m_originalCount++ + } + AddModifiedElement(e, t) { + this.m_originalStart = Math.min(this.m_originalStart, e), this.m_modifiedStart = + Math.min(this.m_modifiedStart, t), this.m_modifiedCount++ + } + getChanges() { + return (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), + this.m_changes + } + getReverseChanges() { + return (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), + this.m_changes.reverse(), this.m_changes + } + } + class c { + constructor(e, t, i = null) { + this.ContinueProcessingPredicate = i, this._originalSequence = e, this + ._modifiedSequence = t; + const [n, o, r] = c._getElements(e), [s, a, l] = c._getElements(t); + this._hasStrings = r && l, this._originalStringElements = n, this._originalElementsOrHash = + o, this._modifiedStringElements = s, this._modifiedElementsOrHash = a, + this.m_forwardHistory = [], this.m_reverseHistory = [] + } + static _isStringArray(e) { + return e.length > 0 && "string" == typeof e[0] + } + static _getElements(e) { + const t = e.getElements(); + if (c._isStringArray(t)) { + const e = new Int32Array(t.length); + for (let i = 0, n = t.length; i < n; i++) e[i] = (0, o.Cv)(t[i], 0); + return [t, e, !0] + } + return t instanceof Int32Array ? [ + [], t, !1 + ] : [ + [], new Int32Array(t), !1 + ] + } + ElementsAreEqual(e, t) { + return this._originalElementsOrHash[e] === this._modifiedElementsOrHash[ + t] && (!this._hasStrings || this._originalStringElements[e] === this + ._modifiedStringElements[t]) + } + ElementsAreStrictEqual(e, t) { + return !!this.ElementsAreEqual(e, t) && c._getStrictElement(this._originalSequence, + e) === c._getStrictElement(this._modifiedSequence, t) + } + static _getStrictElement(e, t) { + return "function" == typeof e.getStrictElement ? e.getStrictElement(t) : + null + } + OriginalElementsAreEqual(e, t) { + return this._originalElementsOrHash[e] === this._originalElementsOrHash[ + t] && (!this._hasStrings || this._originalStringElements[e] === this + ._originalStringElements[t]) + } + ModifiedElementsAreEqual(e, t) { + return this._modifiedElementsOrHash[e] === this._modifiedElementsOrHash[ + t] && (!this._hasStrings || this._modifiedStringElements[e] === this + ._modifiedStringElements[t]) + } + ComputeDiff(e) { + return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, + this._modifiedElementsOrHash.length - 1, e) + } + _ComputeDiff(e, t, i, n, o) { + const r = [!1]; + let s = this.ComputeDiffRecursive(e, t, i, n, r); + return o && (s = this.PrettifyChanges(s)), { + quitEarly: r[0], + changes: s + } + } + ComputeDiffRecursive(e, t, i, o, r) { + for (r[0] = !1; e <= t && i <= o && this.ElementsAreEqual(e, i);) e++, + i++; + for (; t >= e && o >= i && this.ElementsAreEqual(t, o);) t--, o--; + if (e > t || i > o) { + let r; + return i <= o ? (a.Assert(e === t + 1, + "originalStart should only be one more than originalEnd"), r = [ + new n(e, 0, i, o - i + 1) + ]) : e <= t ? (a.Assert(i === o + 1, + "modifiedStart should only be one more than modifiedEnd"), r = [ + new n(e, t - e + 1, i, 0) + ]) : (a.Assert(e === t + 1, + "originalStart should only be one more than originalEnd"), a.Assert( + i === o + 1, + "modifiedStart should only be one more than modifiedEnd"), r = []), + r + } + const s = [0], + l = [0], + d = this.ComputeRecursionPoint(e, t, i, o, s, l, r), + c = s[0], + h = l[0]; + if (null !== d) return d; + if (!r[0]) { + const s = this.ComputeDiffRecursive(e, c, i, h, r); + let a = []; + return a = r[0] ? [new n(c + 1, t - (c + 1) + 1, h + 1, o - (h + 1) + + 1)] : this.ComputeDiffRecursive(c + 1, t, h + 1, o, r), this.ConcatenateChanges( + s, a) + } + return [new n(e, t - e + 1, i, o - i + 1)] + } + WALKTRACE(e, t, i, o, r, s, a, l, c, h, u, g, p, m, f, _, b, v) { + let w = null, + C = null, + y = new d, + S = t, + x = i, + k = p[0] - _[0] - o, + L = -1073741824, + N = this.m_forwardHistory.length - 1; + do { + const t = k + e; + t === S || t < x && c[t - 1] < c[t + 1] ? (m = (u = c[t + 1]) - k - o, + u < L && y.MarkNextChange(), L = u, y.AddModifiedElement(u + 1, m), + k = t + 1 - e) : (m = (u = c[t - 1] + 1) - k - o, u < L && y.MarkNextChange(), + L = u - 1, y.AddOriginalElement(u, m + 1), k = t - 1 - e), N >= 0 && + (e = (c = this.m_forwardHistory[N])[0], S = 1, x = c.length - 1) + } while (--N >= -1); + if (w = y.getReverseChanges(), v[0]) { + let e = p[0] + 1, + t = _[0] + 1; + if (null !== w && w.length > 0) { + const i = w[w.length - 1]; + e = Math.max(e, i.getOriginalEnd()), t = Math.max(t, i.getModifiedEnd()) + } + C = [new n(e, g - e + 1, t, f - t + 1)] + } else { + y = new d, S = s, x = a, k = p[0] - _[0] - l, L = 1073741824, N = b ? + this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2; + do { + const e = k + r; + e === S || e < x && h[e - 1] >= h[e + 1] ? (m = (u = h[e + 1] - 1) - + k - l, u > L && y.MarkNextChange(), L = u + 1, y.AddOriginalElement( + u + 1, m + 1), k = e + 1 - r) : (m = (u = h[e - 1]) - k - l, u > + L && y.MarkNextChange(), L = u, y.AddModifiedElement(u + 1, m + 1), + k = e - 1 - r), N >= 0 && (r = (h = this.m_reverseHistory[N])[0], + S = 1, x = h.length - 1) + } while (--N >= -1); + C = y.getChanges() + } + return this.ConcatenateChanges(w, C) + } + ComputeRecursionPoint(e, t, i, o, r, s, a) { + let d = 0, + c = 0, + h = 0, + u = 0, + g = 0, + p = 0; + e--, i--, r[0] = 0, s[0] = 0, this.m_forwardHistory = [], this.m_reverseHistory = []; + const m = t - e + (o - i), + f = m + 1, + _ = new Int32Array(f), + b = new Int32Array(f), + v = o - i, + w = t - e, + C = e - i, + y = t - o, + S = (w - v) % 2 == 0; + _[v] = e, b[w] = t, a[0] = !1; + for (let x = 1; x <= m / 2 + 1; x++) { + let m = 0, + k = 0; + h = this.ClipDiagonalBound(v - x, x, v, f), u = this.ClipDiagonalBound( + v + x, x, v, f); + for (let e = h; e <= u; e += 2) { + d = e === h || e < u && _[e - 1] < _[e + 1] ? _[e + 1] : _[e - 1] + + 1, c = d - (e - v) - C; + const i = d; + for (; d < t && c < o && this.ElementsAreEqual(d + 1, c + 1);) d++, + c++; + if (_[e] = d, d + c > m + k && (m = d, k = c), !S && Math.abs(e - w) <= + x - 1 && d >= b[e]) return r[0] = d, s[0] = c, i <= b[e] && x <= + 1448 ? this.WALKTRACE(v, h, u, C, w, g, p, y, _, b, d, t, r, c, o, + s, S, a) : null + } + const L = (m - e + (k - i) - x) / 2; + if (null !== this.ContinueProcessingPredicate && !this.ContinueProcessingPredicate( + m, L)) return a[0] = !0, r[0] = m, s[0] = k, L > 0 && x <= 1448 ? + this.WALKTRACE(v, h, u, C, w, g, p, y, _, b, d, t, r, c, o, s, S, a) : + (e++, i++, [new n(e, t - e + 1, i, o - i + 1)]); + g = this.ClipDiagonalBound(w - x, x, w, f), p = this.ClipDiagonalBound( + w + x, x, w, f); + for (let n = g; n <= p; n += 2) { + d = n === g || n < p && b[n - 1] >= b[n + 1] ? b[n + 1] - 1 : b[n - + 1], c = d - (n - w) - y; + const l = d; + for (; d > e && c > i && this.ElementsAreEqual(d, c);) d--, c--; + if (b[n] = d, S && Math.abs(n - v) <= x && d <= _[n]) return r[0] = + d, s[0] = c, l >= _[n] && x <= 1448 ? this.WALKTRACE(v, h, u, C, w, + g, p, y, _, b, d, t, r, c, o, s, S, a) : null + } + if (x <= 1447) { + let e = new Int32Array(u - h + 2); + e[0] = v - h + 1, l.Copy2(_, h, e, 1, u - h + 1), this.m_forwardHistory + .push(e), e = new Int32Array(p - g + 2), e[0] = w - g + 1, l.Copy2( + b, g, e, 1, p - g + 1), this.m_reverseHistory.push(e) + } + } + return this.WALKTRACE(v, h, u, C, w, g, p, y, _, b, d, t, r, c, o, s, + S, a) + } + PrettifyChanges(e) { + for (let t = 0; t < e.length; t++) { + const i = e[t], + n = t < e.length - 1 ? e[t + 1].originalStart : this._originalElementsOrHash + .length, + o = t < e.length - 1 ? e[t + 1].modifiedStart : this._modifiedElementsOrHash + .length, + r = i.originalLength > 0, + s = i.modifiedLength > 0; + for (; i.originalStart + i.originalLength < n && i.modifiedStart + i.modifiedLength < + o && (!r || this.OriginalElementsAreEqual(i.originalStart, i.originalStart + + i.originalLength)) && (!s || this.ModifiedElementsAreEqual(i.modifiedStart, + i.modifiedStart + i.modifiedLength));) { + const e = this.ElementsAreStrictEqual(i.originalStart, i.modifiedStart); + if (this.ElementsAreStrictEqual(i.originalStart + i.originalLength, + i.modifiedStart + i.modifiedLength) && !e) break; + i.originalStart++, i.modifiedStart++ + } + let a = [null]; + t < e.length - 1 && this.ChangesOverlap(e[t], e[t + 1], a) && (e[t] = + a[0], e.splice(t + 1, 1), t--) + } + for (let t = e.length - 1; t >= 0; t--) { + const i = e[t]; + let n = 0, + o = 0; + if (t > 0) { + const i = e[t - 1]; + n = i.originalStart + i.originalLength, o = i.modifiedStart + i.modifiedLength + } + const r = i.originalLength > 0, + s = i.modifiedLength > 0; + let a = 0, + l = this._boundaryScore(i.originalStart, i.originalLength, i.modifiedStart, + i.modifiedLength); + for (let e = 1;; e++) { + const t = i.originalStart - e, + d = i.modifiedStart - e; + if (t < n || d < o) break; + if (r && !this.OriginalElementsAreEqual(t, t + i.originalLength)) + break; + if (s && !this.ModifiedElementsAreEqual(d, d + i.modifiedLength)) + break; + const c = (t === n && d === o ? 5 : 0) + this._boundaryScore(t, i.originalLength, + d, i.modifiedLength); + c > l && (l = c, a = e) + } + i.originalStart -= a, i.modifiedStart -= a; + const d = [null]; + t > 0 && this.ChangesOverlap(e[t - 1], e[t], d) && (e[t - 1] = d[0], + e.splice(t, 1), t++) + } + if (this._hasStrings) + for (let t = 1, i = e.length; t < i; t++) { + const i = e[t - 1], + n = e[t], + o = n.originalStart - i.originalStart - i.originalLength, + r = i.originalStart, + s = n.originalStart + n.originalLength, + a = s - r, + l = i.modifiedStart, + d = n.modifiedStart + n.modifiedLength, + c = d - l; + if (o < 5 && a < 20 && c < 20) { + const e = this._findBetterContiguousSequence(r, a, l, c, o); + if (e) { + const [t, r] = e; + t === i.originalStart + i.originalLength && r === i.modifiedStart + + i.modifiedLength || (i.originalLength = t - i.originalStart, i.modifiedLength = + r - i.modifiedStart, n.originalStart = t + o, n.modifiedStart = + r + o, n.originalLength = s - n.originalStart, n.modifiedLength = + d - n.modifiedStart) + } + } + } + return e + } + _findBetterContiguousSequence(e, t, i, n, o) { + if (t < o || n < o) return null; + const r = e + t - o + 1, + s = i + n - o + 1; + let a = 0, + l = 0, + d = 0; + for (let t = e; t < r; t++) + for (let e = i; e < s; e++) { + const i = this._contiguousSequenceScore(t, e, o); + i > 0 && i > a && (a = i, l = t, d = e) + } + return a > 0 ? [l, d] : null + } + _contiguousSequenceScore(e, t, i) { + let n = 0; + for (let o = 0; o < i; o++) { + if (!this.ElementsAreEqual(e + o, t + o)) return 0; + n += this._originalStringElements[e + o].length + } + return n + } + _OriginalIsBoundary(e) { + return e <= 0 || e >= this._originalElementsOrHash.length - 1 || this._hasStrings && + /^\s*$/.test(this._originalStringElements[e]) + } + _OriginalRegionIsBoundary(e, t) { + if (this._OriginalIsBoundary(e) || this._OriginalIsBoundary(e - 1)) + return !0; + if (t > 0) { + const i = e + t; + if (this._OriginalIsBoundary(i - 1) || this._OriginalIsBoundary(i)) + return !0 + } + return !1 + } + _ModifiedIsBoundary(e) { + return e <= 0 || e >= this._modifiedElementsOrHash.length - 1 || this._hasStrings && + /^\s*$/.test(this._modifiedStringElements[e]) + } + _ModifiedRegionIsBoundary(e, t) { + if (this._ModifiedIsBoundary(e) || this._ModifiedIsBoundary(e - 1)) + return !0; + if (t > 0) { + const i = e + t; + if (this._ModifiedIsBoundary(i - 1) || this._ModifiedIsBoundary(i)) + return !0 + } + return !1 + } + _boundaryScore(e, t, i, n) { + return (this._OriginalRegionIsBoundary(e, t) ? 1 : 0) + (this._ModifiedRegionIsBoundary( + i, n) ? 1 : 0) + } + ConcatenateChanges(e, t) { + let i = []; + if (0 === e.length || 0 === t.length) return t.length > 0 ? t : e; + if (this.ChangesOverlap(e[e.length - 1], t[0], i)) { + const n = new Array(e.length + t.length - 1); + return l.Copy(e, 0, n, 0, e.length - 1), n[e.length - 1] = i[0], l.Copy( + t, 1, n, e.length, t.length - 1), n + } { + const i = new Array(e.length + t.length); + return l.Copy(e, 0, i, 0, e.length), l.Copy(t, 0, i, e.length, t.length), + i + } + } + ChangesOverlap(e, t, i) { + if (a.Assert(e.originalStart <= t.originalStart, + "Left change is not less than or equal to right change"), a.Assert(e + .modifiedStart <= t.modifiedStart, + "Left change is not less than or equal to right change"), e.originalStart + + e.originalLength >= t.originalStart || e.modifiedStart + e.modifiedLength >= + t.modifiedStart) { + const o = e.originalStart; + let r = e.originalLength; + const s = e.modifiedStart; + let a = e.modifiedLength; + return e.originalStart + e.originalLength >= t.originalStart && (r = + t.originalStart + t.originalLength - e.originalStart), e.modifiedStart + + e.modifiedLength >= t.modifiedStart && (a = t.modifiedStart + t.modifiedLength - + e.modifiedStart), i[0] = new n(o, r, s, a), !0 + } + return i[0] = null, !1 + } + ClipDiagonalBound(e, t, i, n) { + if (e >= 0 && e < n) return e; + const o = t % 2 == 0; + return e < 0 ? o === (i % 2 == 0) ? 0 : 1 : o === ((n - i - 1) % 2 == + 0) ? n - 1 : n - 2 + } + } + }, + 7301: (e, t, i) => { + "use strict"; + i.d(t, { + dL: () => o, + Cp: () => r, + ri: () => s, + VV: () => l, + F0: () => d, + b1: () => c, + L6: () => h, + B8: () => u + }); + const n = new class { + constructor() { + this.listeners = [], this.unexpectedErrorHandler = function(e) { + setTimeout((() => { + if (e.stack) throw new Error(e.message + "\n\n" + e.stack); + throw e + }), 0) + } + } + emit(e) { + this.listeners.forEach((t => { + t(e) + })) + } + onUnexpectedError(e) { + this.unexpectedErrorHandler(e), this.emit(e) + } + onUnexpectedExternalError(e) { + this.unexpectedErrorHandler(e) + } + }; + + function o(e) { + l(e) || n.onUnexpectedError(e) + } + + function r(e) { + l(e) || n.onUnexpectedExternalError(e) + } + + function s(e) { + if (e instanceof Error) { + let { + name: t, + message: i + } = e; + return { + $isError: !0, + name: t, + message: i, + stack: e.stacktrace || e.stack + } + } + return e + } + const a = "Canceled"; + + function l(e) { + return e instanceof Error && e.name === a && e.message === a + } + + function d() { + const e = new Error(a); + return e.name = e.message, e + } + + function c(e) { + return e ? new Error(`Illegal argument: ${e}`) : new Error( + "Illegal argument") + } + + function h(e) { + return e ? new Error(`Illegal state: ${e}`) : new Error("Illegal state") + } + class u extends Error { + constructor(e) { + super("NotSupported"), e && (this.message = e) + } + } + }, + 4669: (e, t, i) => { + "use strict"; + i.d(t, { + ju: () => n, + Q5: () => d, + K3: () => c, + D0: () => h, + E7: () => u, + ZD: () => g + }); + var n, o = i(7301), + r = i(5976), + s = i(1741), + a = i(4013); + ! function(e) { + function t(e) { + return (t, i = null, n) => { + let o, r = !1; + return o = e((e => { + if (!r) return o ? o.dispose() : r = !0, t.call(i, e) + }), null, n), r && o.dispose(), o + } + } + + function i(e, t) { + return a(((i, n = null, o) => e((e => i.call(n, t(e))), null, o))) + } + + function n(e, t) { + return a(((i, n = null, o) => e((e => { + t(e), i.call(n, e) + }), null, o))) + } + + function o(e, t) { + return a(((i, n = null, o) => e((e => t(e) && i.call(n, e)), null, o))) + } + + function s(e, t, n) { + let o = n; + return i(e, (e => (o = t(o, e), o))) + } + + function a(e) { + let t; + const i = new d({ + onFirstListenerAdd() { + t = e(i.fire, i) + }, onLastListenerRemove() { + t.dispose() + } + }); + return i.event + } + + function l(e, t, i = 100, n = !1, o) { + let r, s, a, l = 0; + const c = new d({ + leakWarningThreshold: o, + onFirstListenerAdd() { + r = e((e => { + l++, s = t(s, e), n && !a && (c.fire(s), s = void 0), + clearTimeout(a), a = setTimeout((() => { + const e = s; + s = void 0, a = void 0, (!n || l > 1) && c.fire(e), l = 0 + }), i) + })) + }, + onLastListenerRemove() { + r.dispose() + } + }); + return c.event + } + + function c(e, t = ((e, t) => e === t)) { + let i, n = !0; + return o(e, (e => { + const o = n || !t(e, i); + return n = !1, i = e, o + })) + } + e.None = () => r.JT.None, e.once = t, e.map = i, e.forEach = n, e.filter = + o, e.signal = function(e) { + return e + }, e.any = function(...e) { + return (t, i = null, n) => (0, r.F8)(...e.map((e => e((e => t.call(i, + e)), null, n)))) + }, e.reduce = s, e.debounce = l, e.latch = c, e.split = function(t, i) { + return [e.filter(t, i), e.filter(t, (e => !i(e)))] + }, e.buffer = function(e, t = !1, i = []) { + let n = i.slice(), + o = e((e => { + n ? n.push(e) : s.fire(e) + })); + const r = () => { + n && n.forEach((e => s.fire(e))), n = null + }, + s = new d({ + onFirstListenerAdd() { + o || (o = e((e => s.fire(e)))) + }, onFirstListenerDidAdd() { + n && (t ? setTimeout(r) : r()) + }, onLastListenerRemove() { + o && o.dispose(), o = null + } + }); + return s.event + }; + class h { + constructor(e) { + this.event = e + } + map(e) { + return new h(i(this.event, e)) + } + forEach(e) { + return new h(n(this.event, e)) + } + filter(e) { + return new h(o(this.event, e)) + } + reduce(e, t) { + return new h(s(this.event, e, t)) + } + latch() { + return new h(c(this.event)) + } + debounce(e, t = 100, i = !1, n) { + return new h(l(this.event, e, t, i, n)) + } + on(e, t, i) { + return this.event(e, t, i) + } + once(e, i, n) { + return t(this.event)(e, i, n) + } + } + e.chain = function(e) { + return new h(e) + }, e.fromNodeEventEmitter = function(e, t, i = (e => e)) { + const n = (...e) => o.fire(i(...e)), + o = new d({ + onFirstListenerAdd: () => e.on(t, n), + onLastListenerRemove: () => e.removeListener(t, n) + }); + return o.event + }, e.fromDOMEventEmitter = function(e, t, i = (e => e)) { + const n = (...e) => o.fire(i(...e)), + o = new d({ + onFirstListenerAdd: () => e.addEventListener(t, n), + onLastListenerRemove: () => e.removeEventListener(t, n) + }); + return o.event + }, e.toPromise = function(e) { + return new Promise((i => t(e)(i))) + } + }(n || (n = {})); + class l { + constructor(e) { + this._listenerCount = 0, this._invocationCount = 0, this._elapsedOverall = + 0, this._name = `${e}_${l._idPool++}` + } + start(e) { + this._stopWatch = new a.G(!0), this._listenerCount = e + } + stop() { + if (this._stopWatch) { + const e = this._stopWatch.elapsed(); + this._elapsedOverall += e, this._invocationCount += 1, console.info( + `did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})` + ), this._stopWatch = void 0 + } + } + } + l._idPool = 0; + class d { + constructor(e) { + var t; + this._disposed = !1, this._options = e, this._leakageMon = void 0, + this._perfMon = (null === (t = this._options) || void 0 === t ? void 0 : + t._profName) ? new l(this._options._profName) : void 0 + } + get event() { + return this._event || (this._event = (e, t, i) => { + var n; + this._listeners || (this._listeners = new s.S); + const o = this._listeners.isEmpty(); + o && this._options && this._options.onFirstListenerAdd && this._options + .onFirstListenerAdd(this); + const a = this._listeners.push(t ? [e, t] : e); + o && this._options && this._options.onFirstListenerDidAdd && this._options + .onFirstListenerDidAdd(this), this._options && this._options.onListenerDidAdd && + this._options.onListenerDidAdd(this, e, t); + const l = null === (n = this._leakageMon) || void 0 === n ? void 0 : + n.check(this._listeners.size), + d = (0, r.OF)((() => { + l && l(), !this._disposed && (a(), this._options && this._options + .onLastListenerRemove) && (this._listeners && !this._listeners + .isEmpty() || this._options.onLastListenerRemove(this)) + })); + return i instanceof r.SL ? i.add(d) : Array.isArray(i) && i.push(d), + d + }), this._event + } + fire(e) { + var t, i; + if (this._listeners) { + this._deliveryQueue || (this._deliveryQueue = new s.S); + for (let t of this._listeners) this._deliveryQueue.push([t, e]); + for (null === (t = this._perfMon) || void 0 === t || t.start(this._deliveryQueue + .size); this._deliveryQueue.size > 0;) { + const [e, t] = this._deliveryQueue.shift(); + try { + "function" == typeof e ? e.call(void 0, t) : e[0].call(e[1], t) + } catch (e) { + (0, o.dL)(e) + } + } + null === (i = this._perfMon) || void 0 === i || i.stop() + } + } + dispose() { + var e, t, i, n, o; + this._disposed || (this._disposed = !0, null === (e = this._listeners) || + void 0 === e || e.clear(), null === (t = this._deliveryQueue) || + void 0 === t || t.clear(), null === (n = null === (i = this._options) || + void 0 === i ? void 0 : i.onLastListenerRemove) || void 0 === n || + n.call(i), null === (o = this._leakageMon) || void 0 === o || o.dispose() + ) + } + } + class c extends d { + constructor(e) { + super(e), this._isPaused = 0, this._eventQueue = new s.S, this._mergeFn = + null == e ? void 0 : e.merge + } + pause() { + this._isPaused++ + } + resume() { + if (0 !== this._isPaused && 0 == --this._isPaused) + if (this._mergeFn) { + const e = Array.from(this._eventQueue); + this._eventQueue.clear(), super.fire(this._mergeFn(e)) + } else + for (; !this._isPaused && 0 !== this._eventQueue.size;) super.fire( + this._eventQueue.shift()) + } + fire(e) { + this._listeners && (0 !== this._isPaused ? this._eventQueue.push(e) : + super.fire(e)) + } + } + class h extends c { + constructor(e) { + var t; + super(e), this._delay = null !== (t = e.delay) && void 0 !== t ? t : + 100 + } + fire(e) { + this._handle || (this.pause(), this._handle = setTimeout((() => { + this._handle = void 0, this.resume() + }), this._delay)), super.fire(e) + } + } + class u { + constructor() { + this.buffers = [] + } + wrapEvent(e) { + return (t, i, n) => e((e => { + const n = this.buffers[this.buffers.length - 1]; + n ? n.push((() => t.call(i, e))) : t.call(i, e) + }), void 0, n) + } + bufferEvents(e) { + const t = []; + this.buffers.push(t); + const i = e(); + return this.buffers.pop(), t.forEach((e => e())), i + } + } + class g { + constructor() { + this.listening = !1, this.inputEvent = n.None, this.inputEventListener = + r.JT.None, this.emitter = new d({ + onFirstListenerDidAdd: () => { + this.listening = !0, this.inputEventListener = this.inputEvent( + this.emitter.fire, this.emitter) + }, + onLastListenerRemove: () => { + this.listening = !1, this.inputEventListener.dispose() + } + }), this.event = this.emitter.event + } + set input(e) { + this.inputEvent = e, this.listening && (this.inputEventListener.dispose(), + this.inputEventListener = e(this.emitter.fire, this.emitter)) + } + dispose() { + this.inputEventListener.dispose(), this.emitter.dispose() + } + } + }, + 5527: (e, t, i) => { + "use strict"; + i.d(t, { + fn: () => s, + KM: () => a, + vY: () => l, + oP: () => d + }); + var n = i(8721), + o = i(1432), + r = i(7295); + + function s(e) { + return -1 === e.indexOf("/") && (e = function(e) { + return e.replace(/[\\/]/g, n.KR.sep) + }(e)), /^[a-zA-Z]:(\/|$)/.test(e) && (e = "/" + e), e + } + + function a(e, t, i, o = n.ir) { + if (e === t) return !0; + if (!e || !t) return !1; + if (t.length > e.length) return !1; + if (i) { + if (!(0, r.ok)(e, t)) return !1; + if (t.length === e.length) return !0; + let i = t.length; + return t.charAt(t.length - 1) === o && i--, e.charAt(i) === o + } + return t.charAt(t.length - 1) !== o && (t += o), 0 === e.indexOf(t) + } + + function l(e) { + const t = (0, n.Fv)(e); + return o.ED ? !(e.length > 3) && d(t) && (2 === e.length || 92 === t.charCodeAt( + 2)) : t === n.KR.sep + } + + function d(e) { + return !!o.ED && ((t = e.charCodeAt(0)) >= 65 && t <= 90 || t >= 97 && t <= + 122) && 58 === e.charCodeAt(1); + var t + } + }, + 5392: (e, t, i) => { + "use strict"; + i.d(t, { + or: () => r, + Ji: () => s, + ir: () => a, + KZ: () => w, + Oh: () => L, + jB: () => N, + mB: () => D, + CL: () => z, + EW: () => V, + l7: () => U + }); + var n = i(3702), + o = i(7295); + + function r(...e) { + return function(t, i) { + for (let n = 0, o = e.length; n < o; n++) { + const o = e[n](t, i); + if (o) return o + } + return null + } + } + const s = function(e, t, i) { + if (!i || i.length < t.length) return null; + let n; + return n = e ? o.ok(i, t) : 0 === i.indexOf(t), n ? t.length > 0 ? [{ + start: 0, + end: t.length + }] : [] : null + }.bind(void 0, !0); + + function a(e, t) { + const i = t.toLowerCase().indexOf(e.toLowerCase()); + return -1 === i ? null : [{ + start: i, + end: i + e.length + }] + } + + function l(e, t, i, n) { + if (i === e.length) return []; + if (n === t.length) return null; + if (e[i] === t[n]) { + let o = null; + return (o = l(e, t, i + 1, n + 1)) ? f({ + start: n, + end: n + 1 + }, o) : null + } + return l(e, t, i, n + 1) + } + + function d(e) { + return 97 <= e && e <= 122 + } + + function c(e) { + return 65 <= e && e <= 90 + } + + function h(e) { + return 48 <= e && e <= 57 + } + + function u(e) { + return 32 === e || 9 === e || 10 === e || 13 === e + } + const g = new Set; + + function p(e) { + return u(e) || g.has(e) + } + + function m(e) { + return d(e) || c(e) || h(e) + } + + function f(e, t) { + return 0 === t.length ? t = [e] : e.end === t[0].start ? t[0].start = e.start : + t.unshift(e), t + } + + function _(e, t) { + for (let i = t; i < e.length; i++) { + const t = e.charCodeAt(i); + if (c(t) || h(t) || i > 0 && !m(e.charCodeAt(i - 1))) return i + } + return e.length + } + + function b(e, t, i, n) { + if (i === e.length) return []; + if (n === t.length) return null; + if (e[i] !== t[n].toLowerCase()) return null; { + let o = null, + r = n + 1; + for (o = b(e, t, i + 1, n + 1); !o && (r = _(t, r)) < t.length;) o = b( + e, t, i + 1, r), r++; + return null === o ? null : f({ + start: n, + end: n + 1 + }, o) + } + } + + function v(e, t) { + if (!t) return null; + if (0 === (t = t.trim()).length) return null; + if (! function(e) { + let t = 0, + i = 0, + n = 0, + o = 0; + for (let r = 0; r < e.length; r++) n = e.charCodeAt(r), c(n) && t++, d( + n) && i++, u(n) && o++; + return 0 !== t && 0 !== i || 0 !== o ? t <= 5 : e.length <= 30 + }(e)) return null; + if (t.length > 60) return null; + const i = function(e) { + let t = 0, + i = 0, + n = 0, + o = 0, + r = 0; + for (let s = 0; s < e.length; s++) r = e.charCodeAt(s), c(r) && t++, d( + r) && i++, m(r) && n++, h(r) && o++; + return { + upperPercent: t / e.length, + lowerPercent: i / e.length, + alphaPercent: n / e.length, + numericPercent: o / e.length + } + }(t); + if (! function(e) { + const { + upperPercent: t, + lowerPercent: i, + alphaPercent: n, + numericPercent: o + } = e; + return i > .2 && t < .8 && n > .6 && o < .2 + }(i)) { + if (! function(e) { + const { + upperPercent: t, + lowerPercent: i + } = e; + return 0 === i && t > .6 + }(i)) return null; + t = t.toLowerCase() + } + let n = null, + o = 0; + for (e = e.toLowerCase(); o < t.length && null === (n = b(e, t, 0, o));) + o = _(t, o + 1); + return n + } + + function w(e, t, i = !1) { + if (!t || 0 === t.length) return null; + let n = null, + o = 0; + for (e = e.toLowerCase(), t = t.toLowerCase(); o < t.length && null === + (n = C(e, t, 0, o, i));) o = y(t, o + 1); + return n + } + + function C(e, t, i, n, o) { + if (i === e.length) return []; + if (n === t.length) return null; + if ((r = e.charCodeAt(i)) === (s = t.charCodeAt(n)) || p(r) && p(s)) { + let r = null, + s = n + 1; + if (r = C(e, t, i + 1, n + 1, o), !o) + for (; !r && (s = y(t, s)) < t.length;) r = C(e, t, i + 1, s, o), s++; + return null === r ? null : f({ + start: n, + end: n + 1 + }, r) + } + return null; + var r, s + } + + function y(e, t) { + for (let i = t; i < e.length; i++) + if (p(e.charCodeAt(i)) || i > 0 && p(e.charCodeAt(i - 1))) return i; + return e.length + } + "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach((e => g.add(e.charCodeAt( + 0)))); + const S = r(s, v, a), + x = r(s, v, (function(e, t) { + return l(e.toLowerCase(), t.toLowerCase(), 0, 0) + })), + k = new n.z6(1e4); + + function L(e, t, i = !1) { + if ("string" != typeof e || "string" != typeof t) return null; + let n = k.get(e); + n || (n = new RegExp(o.un(e), "i"), k.set(e, n)); + const r = n.exec(t); + return r ? [{ + start: r.index, + end: r.index + r[0].length + }] : i ? x(e, t) : S(e, t) + } + + function N(e, t, i, n, o, r) { + const s = Math.min(13, e.length); + for (; i < s; i++) { + const s = V(e, t, i, n, o, r, !1); + if (s) return s + } + return [0, r] + } + + function D(e) { + if (void 0 === e) return []; + const t = [], + i = e[1]; + for (let n = e.length - 1; n > 1; n--) { + const o = e[n] + i, + r = t[t.length - 1]; + r && r.end === o ? r.end = o + 1 : t.push({ + start: o, + end: o + 1 + }) + } + return t + } + const E = 128; + + function I() { + const e = [], + t = []; + for (let e = 0; e <= E; e++) t[e] = 0; + for (let i = 0; i <= E; i++) e.push(t.slice(0)); + return e + } + + function T(e) { + const t = []; + for (let i = 0; i <= e; i++) t[i] = 0; + return t + } + const M = T(256), + A = T(256), + R = I(), + O = I(), + P = I(); + + function F(e, t) { + if (t < 0 || t >= e.length) return !1; + const i = e.codePointAt(t); + switch (i) { + case 95: + case 45: + case 46: + case 32: + case 47: + case 92: + case 39: + case 34: + case 58: + case 36: + case 60: + case 40: + case 91: + return !0; + case void 0: + return !1; + default: + return !!o.C8(i) + } + } + + function B(e, t) { + if (t < 0 || t >= e.length) return !1; + switch (e.charCodeAt(t)) { + case 32: + case 9: + return !0; + default: + return !1 + } + } + + function W(e, t, i) { + return t[e] !== i[e] + } + var z; + + function V(e, t, i, n, o, r, s) { + const a = e.length > E ? E : e.length, + l = n.length > E ? E : n.length; + if (i >= a || r >= l || a - i > l - r) return; + if (! function(e, t, i, n, o, r, s = !1) { + for (; t < i && o < r;) e[t] === n[o] && (s && (M[t] = o), t += 1), o += + 1; + return t === i + }(t, i, a, o, r, l, !0)) return; + ! function(e, t, i, n, o, r) { + let s = e - 1, + a = t - 1; + for (; s >= i && a >= n;) o[s] === r[a] && (A[s] = a, s--), a-- + }(a, l, i, r, t, o); + let d = 1, + c = 1, + h = i, + u = r; + const g = [!1]; + for (d = 1, h = i; h < a; d++, h++) { + const s = M[h], + p = A[h], + m = h + 1 < a ? A[h + 1] : l; + for (c = s - r + 1, u = s; u < m; c++, u++) { + let a = Number.MIN_SAFE_INTEGER, + m = !1; + u <= p && (a = H(e, t, h, i, n, o, u, l, r, 0 === R[d - 1][c - 1], g)); + let f = 0; + a !== Number.MAX_SAFE_INTEGER && (m = !0, f = a + O[d - 1][c - 1]); + const _ = u > s, + b = _ ? O[d][c - 1] + (R[d][c - 1] > 0 ? -5 : 0) : 0, + v = u > s + 1 && R[d][c - 1] > 0, + w = v ? O[d][c - 2] + (R[d][c - 2] > 0 ? -5 : 0) : 0; + if (v && (!_ || w >= b) && (!m || w >= f)) O[d][c] = w, P[d][c] = 3, R[ + d][c] = 0; + else if (_ && (!m || b >= f)) O[d][c] = b, P[d][c] = 2, R[d][c] = 0; + else { + if (!m) throw new Error("not possible"); + O[d][c] = f, P[d][c] = 1, R[d][c] = R[d - 1][c - 1] + 1 + } + } + } + if (!g[0] && !s) return; + d--, c--; + const p = [O[d][c], r]; + let m = 0, + f = 0; + for (; d >= 1;) { + let e = c; + do { + const t = P[d][e]; + if (3 === t) e -= 2; + else { + if (2 !== t) break; + e -= 1 + } + } while (e >= 1); + m > 1 && t[i + d - 1] === o[r + c - 1] && !W(e + r - 1, n, o) && m + 1 > + R[d][e] && (e = c), e === c ? m++ : m = 1, f || (f = e), d--, c = e - + 1, p.push(c) + } + l === a && (p[0] += 2); + const _ = f - a; + return p[0] -= _, p + } + + function H(e, t, i, n, o, r, s, a, l, d, c) { + if (t[i] !== r[s]) return Number.MIN_SAFE_INTEGER; + let h = 1, + u = !1; + return s === i - n ? h = e[i] === o[s] ? 7 : 5 : !W(s, o, r) || 0 !== s && + W(s - 1, o, r) ? !F(r, s) || 0 !== s && F(r, s - 1) ? (F(r, s - 1) || B( + r, s - 1)) && (h = 5, u = !0) : h = 5 : (h = e[i] === o[s] ? 7 : 5, u = ! + 0), h > 1 && i === n && (c[0] = !0), u || (u = W(s, o, r) || F(r, s - + 1) || B(r, s - 1)), i === n ? s > l && (h -= u ? 3 : 5) : h += d ? u ? + 2 : 0 : u ? 0 : 1, s + 1 === a && (h -= u ? 3 : 5), h + } + + function U(e, t, i, n, o, r, s) { + return function(e, t, i, n, o, r, s, a) { + let l = V(e, t, i, n, o, r, a); + if (e.length >= 3) { + const t = Math.min(7, e.length - 1); + for (let s = i + 1; s < t; s++) { + const t = j(e, s); + if (t) { + const e = V(t, t.toLowerCase(), i, n, o, r, a); + e && (e[0] -= 3, (!l || e[0] > l[0]) && (l = e)) + } + } + } + return l + }(e, t, i, n, o, r, 0, s) + } + + function j(e, t) { + if (t + 1 >= e.length) return; + const i = e[t], + n = e[t + 1]; + return i !== n ? e.slice(0, t) + n + i + e.slice(t + 2) : void 0 + }! function(e) { + e.Default = [-100, 0], e.isDefault = function(e) { + return !e || 2 === e.length && -100 === e[0] && 0 === e[1] + } + }(z || (z = {})) + }, + 8289: (e, t, i) => { + "use strict"; + + function n(e) { + const t = this; + let i, n = !1; + return function() { + return n || (n = !0, i = e.apply(t, arguments)), i + } + } + i.d(t, { + I: () => n + }) + }, + 4118: (e, t, i) => { + "use strict"; + i.d(t, { + EQ: () => L, + Qc: () => N + }); + var n = i(5393), + o = i(5527), + r = i(3702), + s = i(8721), + a = i(7295); + const l = "**", + d = /\//g; + + function c(e) { + switch (e) { + case 0: + return ""; + case 1: + return "[^/\\\\]*?"; + default: + return "(?:[/\\\\]|[^/\\\\]+[/\\\\]|[/\\\\][^/\\\\]+)*?" + } + } + + function h(e, t) { + if (!e) return []; + const i = []; + let n = !1, + o = !1, + r = ""; + for (const s of e) { + switch (s) { + case t: + if (!n && !o) { + i.push(r), r = ""; + continue + } + break; + case "{": + n = !0; + break; + case "}": + n = !1; + break; + case "[": + o = !0; + break; + case "]": + o = !1 + } + r += s + } + return r && i.push(r), i + } + + function u(e) { + if (!e) return ""; + let t = ""; + const i = h(e, "/"); + if (i.every((e => e === l))) t = ".*"; + else { + let e = !1; + i.forEach(((n, o) => { + if (n === l) return void(e || (t += c(2), e = !0)); + let r = !1, + s = "", + d = !1, + g = ""; + for (const e of n) + if ("}" !== e && r) s += e; + else if (!d || "]" === e && g) switch (e) { + case "{": + r = !0; + continue; + case "[": + d = !0; + continue; + case "}": + const i = `(?:${h(s,",").map((e=>u(e))).join("|")})`; + t += i, r = !1, s = ""; + break; + case "]": + t += "[" + g + "]", d = !1, g = ""; + break; + case "?": + t += "[^/\\\\]"; + continue; + case "*": + t += c(1); + continue; + default: + t += a.ec(e) + } else { + let t; + t = "-" === e ? e : "^" !== e && "!" !== e || g ? "/" === e ? "" : + a.ec(e) : "^", g += t + } + o < i.length - 1 && (i[o + 1] !== l || o + 2 < i.length) && (t += + "[/\\\\]"), e = !1 + })) + } + return t + } + const g = /^\*\*\/\*\.[\w\.-]+$/, + p = /^\*\*\/([\w\.-]+)\/?$/, + m = /^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/, + f = + /^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/, + _ = /^\*\*((\/[\w\.-]+)+)\/?$/, + b = /^([\w\.-]+(\/[\w\.-]+)*)\/?$/, + v = new r.z6(1e4), + w = function() { + return !1 + }, + C = function() { + return null + }; + + function y(e, t) { + if (!e) return C; + let i; + i = "string" != typeof e ? e.pattern : e, i = i.trim(); + const n = `${i}_${!!t.trimForExclusions}`; + let o, r = v.get(n); + if (r) return S(r, e); + if (g.test(i)) { + const e = i.substr(4); + r = function(t, n) { + return "string" == typeof t && t.endsWith(e) ? i : null + } + } else r = (o = p.exec(x(i, t))) ? function(e, t) { + const i = `/${e}`, + n = `\\${e}`, + o = function(o, r) { + return "string" != typeof o ? null : r ? r === e ? t : null : o === + e || o.endsWith(i) || o.endsWith(n) ? t : null + }, + r = [e]; + return o.basenames = r, o.patterns = [t], o.allBasenames = r, o + }(o[1], i) : (t.trimForExclusions ? f : m).test(i) ? function(e, t) { + const i = D(e.slice(1, -1).split(",").map((e => y(e, t))).filter((e => + e !== C)), e), + n = i.length; + if (!n) return C; + if (1 === n) return i[0]; + const o = function(t, n) { + for (let o = 0, r = i.length; o < r; o++) + if (i[o](t, n)) return e; + return null + }, + r = i.find((e => !!e.allBasenames)); + r && (o.allBasenames = r.allBasenames); + const s = i.reduce(((e, t) => t.allPaths ? e.concat(t.allPaths) : e), []); + return s.length && (o.allPaths = s), o + }(i, t) : (o = _.exec(x(i, t))) ? k(o[1].substr(1), i, !0) : (o = b.exec( + x(i, t))) ? k(o[1], i, !1) : function(e) { + try { + const t = new RegExp(`^${u(e)}$`); + return function(i) { + return t.lastIndex = 0, "string" == typeof i && t.test(i) ? e : + null + } + } catch (e) { + return C + } + }(i); + return v.set(n, r), S(r, e) + } + + function S(e, t) { + return "string" == typeof t ? e : function(i, n) { + return o.KM(i, t.base) ? e(s.Gf(t.base, i), n) : null + } + } + + function x(e, t) { + return t.trimForExclusions && e.endsWith("/**") ? e.substr(0, e.length - + 2) : e + } + + function k(e, t, i) { + const n = s.ir === s.KR.sep, + o = n ? e : e.replace(d, s.ir), + r = s.ir + o, + a = s.KR.sep + e, + l = i ? function(i, s) { + return "string" != typeof i || i !== o && !i.endsWith(r) && (n || i !== + e && !i.endsWith(a)) ? null : t + } : function(i, r) { + return "string" != typeof i || i !== o && (n || i !== e) ? null : t + }; + return l.allPaths = [(i ? "*/" : "./") + e], l + } + + function L(e, t, i) { + return !(!e || "string" != typeof t) && N(e)(t, void 0, i) + } + + function N(e, t = {}) { + if (!e) return w; + if ("string" == typeof e || function(e) { + const t = e; + return t && "string" == typeof t.base && "string" == typeof t.pattern + }(e)) { + const i = y(e, t); + if (i === C) return w; + const n = function(e, t) { + return !!i(e, t) + }; + return i.allBasenames && (n.allBasenames = i.allBasenames), i.allPaths && + (n.allPaths = i.allPaths), n + } + return function(e, t) { + const i = D(Object.getOwnPropertyNames(e).map((i => function(e, t, i) { + if (!1 === t) return C; + const o = y(e, i); + if (o === C) return C; + if ("boolean" == typeof t) return o; + if (t) { + const i = t.when; + if ("string" == typeof i) { + const t = (t, r, s, a) => { + if (!a || !o(t, r)) return null; + const l = a(i.replace("$(basename)", s)); + return (0, n.J8)(l) ? l.then((t => t ? e : null)) : l ? e : + null + }; + return t.requiresSiblings = !0, t + } + } + return o + }(i, e[i], t))).filter((e => e !== C))), + o = i.length; + if (!o) return C; + if (!i.some((e => !!e.requiresSiblings))) { + if (1 === o) return i[0]; + const e = function(e, t) { + for (let n = 0, o = i.length; n < o; n++) { + const o = i[n](e, t); + if (o) return o + } + return null + }, + t = i.find((e => !!e.allBasenames)); + t && (e.allBasenames = t.allBasenames); + const n = i.reduce(((e, t) => t.allPaths ? e.concat(t.allPaths) : e), []); + return n.length && (e.allPaths = n), e + } + const r = function(e, t, n) { + let o; + for (let r = 0, a = i.length; r < a; r++) { + const a = i[r]; + a.requiresSiblings && n && (t || (t = s.EZ(e)), o || (o = t.substr( + 0, t.length - s.DZ(e).length))); + const l = a(e, t, o, n); + if (l) return l + } + return null + }, + a = i.find((e => !!e.allBasenames)); + a && (r.allBasenames = a.allBasenames); + const l = i.reduce(((e, t) => t.allPaths ? e.concat(t.allPaths) : e), []); + return l.length && (r.allPaths = l), r + }(e, t) + } + + function D(e, t) { + const i = e.filter((e => !!e.basenames)); + if (i.length < 2) return e; + const n = i.reduce(((e, t) => { + const i = t.basenames; + return i ? e.concat(i) : e + }), []); + let o; + if (t) { + o = []; + for (let e = 0, i = n.length; e < i; e++) o.push(t) + } else o = i.reduce(((e, t) => { + const i = t.patterns; + return i ? e.concat(i) : e + }), []); + const r = function(e, t) { + if ("string" != typeof e) return null; + if (!t) { + let i; + for (i = e.length; i > 0; i--) { + const t = e.charCodeAt(i - 1); + if (47 === t || 92 === t) break + } + t = e.substr(i) + } + const i = n.indexOf(t); + return -1 !== i ? o[i] : null + }; + r.basenames = n, r.patterns = o, r.allBasenames = n; + const s = e.filter((e => !e.basenames)); + return s.push(r), s + } + }, + 9954: (e, t, i) => { + "use strict"; + i.d(t, { + vp: () => o, + SP: () => r, + Cv: () => a, + yP: () => h + }); + var n = i(7295); + + function o(e) { + return r(e, 0) + } + + function r(e, t) { + switch (typeof e) { + case "object": + return null === e ? s(349, t) : Array.isArray(e) ? (i = e, n = s( + 104579, n = t), i.reduce(((e, t) => r(t, e)), n)) : function(e, t) { + return t = s(181387, t), Object.keys(e).sort().reduce(((t, i) => (t = + a(i, t), r(e[i], t))), t) + }(e, t); + case "string": + return a(e, t); + case "boolean": + return function(e, t) { + return s(e ? 433 : 863, t) + }(e, t); + case "number": + return s(e, t); + case "undefined": + return s(937, t); + default: + return s(617, t) + } + var i, n + } + + function s(e, t) { + return (t << 5) - t + e | 0 + } + + function a(e, t) { + t = s(149417, t); + for (let i = 0, n = e.length; i < n; i++) t = s(e.charCodeAt(i), t); + return t + } + + function l(e, t, i = 32) { + const n = i - t; + return (e << t | (~((1 << n) - 1) & e) >>> n) >>> 0 + } + + function d(e, t = 0, i = e.byteLength, n = 0) { + for (let o = 0; o < i; o++) e[t + o] = n + } + + function c(e, t = 32) { + return e instanceof ArrayBuffer ? Array.from(new Uint8Array(e)).map((e => + e.toString(16).padStart(2, "0"))).join("") : function(e, t, i = "0") { + for (; e.length < t;) e = i + e; + return e + }((e >>> 0).toString(16), t / 4) + } + class h { + constructor() { + this._h0 = 1732584193, this._h1 = 4023233417, this._h2 = 2562383102, + this._h3 = 271733878, this._h4 = 3285377520, this._buff = new Uint8Array( + 67), this._buffDV = new DataView(this._buff.buffer), this._buffLen = + 0, this._totalLen = 0, this._leftoverHighSurrogate = 0, this._finished = ! + 1 + } + update(e) { + const t = e.length; + if (0 === t) return; + const i = this._buff; + let o, r, s = this._buffLen, + a = this._leftoverHighSurrogate; + for (0 !== a ? (o = a, r = -1, a = 0) : (o = e.charCodeAt(0), r = 0);;) { + let l = o; + if (n.ZG(o)) { + if (!(r + 1 < t)) { + a = o; + break + } { + const t = e.charCodeAt(r + 1); + n.YK(t) ? (r++, l = n.rL(o, t)) : l = 65533 + } + } else n.YK(o) && (l = 65533); + if (s = this._push(i, s, l), r++, !(r < t)) break; + o = e.charCodeAt(r) + } + this._buffLen = s, this._leftoverHighSurrogate = a + } + _push(e, t, i) { + return i < 128 ? e[t++] = i : i < 2048 ? (e[t++] = 192 | (1984 & i) >>> + 6, e[t++] = 128 | (63 & i) >>> 0) : i < 65536 ? (e[t++] = 224 | ( + 61440 & i) >>> 12, e[t++] = 128 | (4032 & i) >>> 6, e[t++] = 128 | + (63 & i) >>> 0) : (e[t++] = 240 | (1835008 & i) >>> 18, e[t++] = 128 | + (258048 & i) >>> 12, e[t++] = 128 | (4032 & i) >>> 6, e[t++] = 128 | + (63 & i) >>> 0), t >= 64 && (this._step(), t -= 64, this._totalLen += + 64, e[0] = e[64], e[1] = e[65], e[2] = e[66]), t + } + digest() { + return this._finished || (this._finished = !0, this._leftoverHighSurrogate && + (this._leftoverHighSurrogate = 0, this._buffLen = this._push(this._buff, + this._buffLen, 65533)), this._totalLen += this._buffLen, this._wrapUp() + ), c(this._h0) + c(this._h1) + c(this._h2) + c(this._h3) + c(this._h4) + } + _wrapUp() { + this._buff[this._buffLen++] = 128, d(this._buff, this._buffLen), this._buffLen > + 56 && (this._step(), d(this._buff)); + const e = 8 * this._totalLen; + this._buffDV.setUint32(56, Math.floor(e / 4294967296), !1), this._buffDV + .setUint32(60, e % 4294967296, !1), this._step() + } + _step() { + const e = h._bigBlock32, + t = this._buffDV; + for (let i = 0; i < 64; i += 4) e.setUint32(i, t.getUint32(i, !1), !1); + for (let t = 64; t < 320; t += 4) e.setUint32(t, l(e.getUint32(t - 12, ! + 1) ^ e.getUint32(t - 32, !1) ^ e.getUint32(t - 56, !1) ^ e.getUint32( + t - 64, !1), 1), !1); + let i, n, o, r = this._h0, + s = this._h1, + a = this._h2, + d = this._h3, + c = this._h4; + for (let t = 0; t < 80; t++) t < 20 ? (i = s & a | ~s & d, n = + 1518500249) : t < 40 ? (i = s ^ a ^ d, n = 1859775393) : t < 60 ? (i = + s & a | s & d | a & d, n = 2400959708) : (i = s ^ a ^ d, n = + 3395469782), o = l(r, 5) + i + c + n + e.getUint32(4 * t, !1) & + 4294967295, c = d, d = a, a = l(s, 30), s = r, r = o; + this._h0 = this._h0 + r & 4294967295, this._h1 = this._h1 + s & + 4294967295, this._h2 = this._h2 + a & 4294967295, this._h3 = this._h3 + + d & 4294967295, this._h4 = this._h4 + c & 4294967295 + } + } + h._bigBlock32 = new DataView(new ArrayBuffer(320)) + }, + 9365: (e, t, i) => { + "use strict"; + i.d(t, { + W5: () => r, + CP: () => s, + oR: () => a, + v1: () => l + }); + var n = i(7301), + o = i(1212); + class r { + constructor(e = "", t = !1) { + var i, o; + if (this.value = e, "string" != typeof this.value) throw (0, n.b1)( + "value"); + "boolean" == typeof t ? (this.isTrusted = t, this.supportThemeIcons = ! + 1) : (this.isTrusted = null !== (i = t.isTrusted) && void 0 !== i ? + i : void 0, this.supportThemeIcons = null !== (o = t.supportThemeIcons) && + void 0 !== o && o) + } + appendText(e, t = 0) { + var i; + return this.value += (i = this.supportThemeIcons ? (0, o.Qo)(e) : e, i + .replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&")).replace(/([ \t]+)/g, ((e, + t) => " ".repeat(t.length))).replace(/^>/gm, "\\>").replace( + /\n/g, 1 === t ? "\\\n" : "\n\n"), this + } + appendMarkdown(e) { + return this.value += e, this + } + appendCodeblock(e, t) { + return this.value += "\n```", this.value += e, this.value += "\n", + this.value += t, this.value += "\n```\n", this + } + } + + function s(e) { + return (t = e) instanceof r || t && "object" == typeof t && !("string" != + typeof t.value || "boolean" != typeof t.isTrusted && void 0 !== t.isTrusted || + "boolean" != typeof t.supportThemeIcons && void 0 !== t.supportThemeIcons + ) ? !e.value : !Array.isArray(e) || e.every(s); + var t + } + + function a(e) { + return e ? e.replace(/\\([\\`*_{}[\]()#+\-.!])/g, "$1") : e + } + + function l(e) { + const t = [], + i = e.split("|").map((e => e.trim())); + e = i[0]; + const n = i[1]; + if (n) { + const e = /height=(\d+)/.exec(n), + i = /width=(\d+)/.exec(n), + o = e ? e[1] : "", + r = i ? i[1] : "", + s = isFinite(parseInt(r)), + a = isFinite(parseInt(o)); + s && t.push(`width="${r}"`), a && t.push(`height="${o}"`) + } + return { + href: e, + dimensions: t + } + } + }, + 1212: (e, t, i) => { + "use strict"; + i.d(t, { + Qo: () => d, + f$: () => h, + x$: () => g, + Ho: () => p, + Gt: () => m + }); + var n = i(3046), + o = i(5392), + r = i(7295); + const s = "$(", + a = new RegExp( + `\\$\\(${n.dT.iconNameExpression}(?:${n.dT.iconModifierExpression})?\\)`, + "g"), + l = new RegExp(`(\\\\)?${a.source}`, "g"); + + function d(e) { + return e.replace(l, ((e, t) => t ? e : `\\${e}`)) + } + const c = new RegExp(`\\\\${a.source}`, "g"); + + function h(e) { + return e.replace(c, (e => `\\${e}`)) + } + const u = new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`, "g"); + + function g(e) { + return -1 === e.indexOf(s) ? e : e.replace(u, ((e, t, i, n) => i ? e : t || + n || "")) + } + + function p(e) { + const t = e.indexOf(s); + return -1 === t ? { + text: e + } : function(e, t) { + const i = []; + let n = ""; + + function o(e) { + if (e) { + n += e; + for (const t of e) i.push(c) + } + } + let r, a, l = -1, + d = "", + c = 0, + h = t; + const u = e.length; + for (o(e.substr(0, t)); h < u;) r = e[h], a = e[h + 1], r === s[0] && + a === s[1] ? (l = h, o(d), d = s, h++) : ")" === r && -1 !== l ? (c += + h - l + 1, l = -1, d = "") : -1 !== l ? /^[a-z0-9\-]$/i.test(r) ? d += + r : (o(d), l = -1, d = "") : o(r), h++; + return o(d), { + text: n, + iconOffsets: i + } + }(e, t) + } + + function m(e, t, i = !1) { + const { + text: n, + iconOffsets: s + } = t; + if (!s || 0 === s.length) return (0, o.Oh)(e, n, i); + const a = (0, r.j3)(n, " "), + l = n.length - a.length, + d = (0, o.Oh)(e, a, i); + if (d) + for (const e of d) { + const t = s[e.start + l] + l; + e.start += t, e.end += t + } + return d + } + }, + 4742: (e, t, i) => { + "use strict"; + i.d(t, { + R: () => n, + a: () => o + }); + class n { + constructor(e) { + this._prefix = e, this._lastId = 0 + } + nextId() { + return this._prefix + ++this._lastId + } + } + const o = new n("id#") + }, + 3725: (e, t, i) => { + "use strict"; + var n; + i.d(t, { + $: () => n + }), + function(e) { + e.is = function(e) { + return e && "object" == typeof e && "function" == typeof e[Symbol.iterator] + }; + const t = Object.freeze([]); + e.empty = function() { + return t + }, e.single = function*(e) { + yield e + }, e.from = function(e) { + return e || t + }, e.isEmpty = function(e) { + return !e || !0 === e[Symbol.iterator]().next().done + }, e.first = function(e) { + return e[Symbol.iterator]().next().value + }, e.some = function(e, t) { + for (const i of e) + if (t(i)) return !0; + return !1 + }, e.find = function(e, t) { + for (const i of e) + if (t(i)) return i + }, e.filter = function*(e, t) { + for (const i of e) t(i) && (yield i) + }, e.map = function*(e, t) { + let i = 0; + for (const n of e) yield t(n, i++) + }, e.concat = function*(...e) { + for (const t of e) + for (const e of t) yield e + }, e.concatNested = function*(e) { + for (const t of e) + for (const e of t) yield e + }, e.reduce = function(e, t, i) { + let n = i; + for (const i of e) n = t(n, i); + return n + }, e.slice = function*(e, t, i = e.length) { + for (t < 0 && (t += e.length), i < 0 ? i += e.length : i > e.length && + (i = e.length); t < i; t++) yield e[t] + }, e.consume = function(t, i = Number.POSITIVE_INFINITY) { + const n = []; + if (0 === i) return [n, t]; + const o = t[Symbol.iterator](); + for (let t = 0; t < i; t++) { + const t = o.next(); + if (t.done) return [n, e.empty()]; + n.push(t.value) + } + return [n, { + [Symbol.iterator]: () => o + }] + }, e.equals = function(e, t, i = ((e, t) => e === t)) { + const n = e[Symbol.iterator](), + o = t[Symbol.iterator](); + for (;;) { + const e = n.next(), + t = o.next(); + if (e.done !== t.done) return !1; + if (e.done) return !0; + if (!i(e.value, t.value)) return !1 + } + } + }(n || (n = {})) + }, + 2258: (e, t, i) => { + "use strict"; + i.d(t, { + kL: () => l, + gx: () => d, + gm: () => c, + QC: () => u, + BQ: () => p, + f1: () => m + }); + var n = i(7301); + class o { + constructor() { + this._keyCodeToStr = [], this._strToKeyCode = Object.create(null) + } + define(e, t) { + this._keyCodeToStr[e] = t, this._strToKeyCode[t.toLowerCase()] = e + } + keyCodeToStr(e) { + return this._keyCodeToStr[e] + } + strToKeyCode(e) { + return this._strToKeyCode[e.toLowerCase()] || 0 + } + } + const r = new o, + s = new o, + a = new o; + var l; + + function d(e, t) { + return (e | (65535 & t) << 16 >>> 0) >>> 0 + } + + function c(e, t) { + if (0 === e) return null; + const i = (65535 & e) >>> 0, + n = (4294901760 & e) >>> 16; + return new g(0 !== n ? [h(i, t), h(n, t)] : [h(i, t)]) + } + + function h(e, t) { + const i = !!(2048 & e), + n = !!(256 & e); + return new u(2 === t ? n : i, !!(1024 & e), !!(512 & e), 2 === t ? i : n, + 255 & e) + }! function() { + function e(e, t, i = t, n = i) { + r.define(e, t), s.define(e, i), a.define(e, n) + } + e(0, "unknown"), e(1, "Backspace"), e(2, "Tab"), e(3, "Enter"), e(4, + "Shift"), e(5, "Ctrl"), e(6, "Alt"), e(7, "PauseBreak"), e(8, + "CapsLock"), e(9, "Escape"), e(10, "Space"), e(11, "PageUp"), e(12, + "PageDown"), e(13, "End"), e(14, "Home"), e(15, "LeftArrow", "Left"), + e(16, "UpArrow", "Up"), e(17, "RightArrow", "Right"), e(18, "DownArrow", + "Down"), e(19, "Insert"), e(20, "Delete"), e(21, "0"), e(22, "1"), e( + 23, "2"), e(24, "3"), e(25, "4"), e(26, "5"), e(27, "6"), e(28, "7"), + e(29, "8"), e(30, "9"), e(31, "A"), e(32, "B"), e(33, "C"), e(34, "D"), + e(35, "E"), e(36, "F"), e(37, "G"), e(38, "H"), e(39, "I"), e(40, "J"), + e(41, "K"), e(42, "L"), e(43, "M"), e(44, "N"), e(45, "O"), e(46, "P"), + e(47, "Q"), e(48, "R"), e(49, "S"), e(50, "T"), e(51, "U"), e(52, "V"), + e(53, "W"), e(54, "X"), e(55, "Y"), e(56, "Z"), e(57, "Meta"), e(58, + "ContextMenu"), e(59, "F1"), e(60, "F2"), e(61, "F3"), e(62, "F4"), e( + 63, "F5"), e(64, "F6"), e(65, "F7"), e(66, "F8"), e(67, "F9"), e(68, + "F10"), e(69, "F11"), e(70, "F12"), e(71, "F13"), e(72, "F14"), e(73, + "F15"), e(74, "F16"), e(75, "F17"), e(76, "F18"), e(77, "F19"), e(78, + "NumLock"), e(79, "ScrollLock"), e(80, ";", ";", "OEM_1"), e(81, "=", + "=", "OEM_PLUS"), e(82, ",", ",", "OEM_COMMA"), e(83, "-", "-", + "OEM_MINUS"), e(84, ".", ".", "OEM_PERIOD"), e(85, "/", "/", "OEM_2"), + e(86, "`", "`", "OEM_3"), e(110, "ABNT_C1"), e(111, "ABNT_C2"), e(87, + "[", "[", "OEM_4"), e(88, "\\", "\\", "OEM_5"), e(89, "]", "]", + "OEM_6"), e(90, "'", "'", "OEM_7"), e(91, "OEM_8"), e(92, "OEM_102"), + e(93, "NumPad0"), e(94, "NumPad1"), e(95, "NumPad2"), e(96, "NumPad3"), + e(97, "NumPad4"), e(98, "NumPad5"), e(99, "NumPad6"), e(100, "NumPad7"), + e(101, "NumPad8"), e(102, "NumPad9"), e(103, "NumPad_Multiply"), e(104, + "NumPad_Add"), e(105, "NumPad_Separator"), e(106, "NumPad_Subtract"), + e(107, "NumPad_Decimal"), e(108, "NumPad_Divide") + }(), + function(e) { + e.toString = function(e) { + return r.keyCodeToStr(e) + }, e.fromString = function(e) { + return r.strToKeyCode(e) + }, e.toUserSettingsUS = function(e) { + return s.keyCodeToStr(e) + }, e.toUserSettingsGeneral = function(e) { + return a.keyCodeToStr(e) + }, e.fromUserSettings = function(e) { + return s.strToKeyCode(e) || a.strToKeyCode(e) + } + }(l || (l = {})); + class u { + constructor(e, t, i, n, o) { + this.ctrlKey = e, this.shiftKey = t, this.altKey = i, this.metaKey = n, + this.keyCode = o + } + equals(e) { + return this.ctrlKey === e.ctrlKey && this.shiftKey === e.shiftKey && + this.altKey === e.altKey && this.metaKey === e.metaKey && this.keyCode === + e.keyCode + } + isModifierKey() { + return 0 === this.keyCode || 5 === this.keyCode || 57 === this.keyCode || + 6 === this.keyCode || 4 === this.keyCode + } + toChord() { + return new g([this]) + } + isDuplicateModifierCase() { + return this.ctrlKey && 5 === this.keyCode || this.shiftKey && 4 === + this.keyCode || this.altKey && 6 === this.keyCode || this.metaKey && + 57 === this.keyCode + } + } + class g { + constructor(e) { + if (0 === e.length) throw (0, n.b1)("parts"); + this.parts = e + } + } + class p { + constructor(e, t, i, n, o, r) { + this.ctrlKey = e, this.shiftKey = t, this.altKey = i, this.metaKey = n, + this.keyLabel = o, this.keyAriaLabel = r + } + } + class m {} + }, + 8030: (e, t, i) => { + "use strict"; + i.d(t, { + xo: () => r, + X4: () => s + }); + var n = i(3580); + class o { + constructor(e, t, i = t) { + this.modifierLabels = [null], this.modifierLabels[2] = e, this.modifierLabels[ + 1] = t, this.modifierLabels[3] = i + } + toLabel(e, t, i) { + if (0 === t.length) return null; + const n = []; + for (let o = 0, r = t.length; o < r; o++) { + const r = t[o], + s = i(r); + if (null === s) return null; + n[o] = a(r, s, this.modifierLabels[e]) + } + return n.join(" ") + } + } + const r = new o({ + ctrlKey: "⌃", + shiftKey: "⇧", + altKey: "⌥", + metaKey: "⌘", + separator: "" + }, { + ctrlKey: n.N({ + key: "ctrlKey", + comment: [ + "This is the short form for the Control key on the keyboard" + ] + }, "Ctrl"), + shiftKey: n.N({ + key: "shiftKey", + comment: [ + "This is the short form for the Shift key on the keyboard" + ] + }, "Shift"), + altKey: n.N({ + key: "altKey", + comment: ["This is the short form for the Alt key on the keyboard"] + }, "Alt"), + metaKey: n.N({ + key: "windowsKey", + comment: [ + "This is the short form for the Windows key on the keyboard" + ] + }, "Windows"), + separator: "+" + }, { + ctrlKey: n.N({ + key: "ctrlKey", + comment: [ + "This is the short form for the Control key on the keyboard" + ] + }, "Ctrl"), + shiftKey: n.N({ + key: "shiftKey", + comment: [ + "This is the short form for the Shift key on the keyboard" + ] + }, "Shift"), + altKey: n.N({ + key: "altKey", + comment: ["This is the short form for the Alt key on the keyboard"] + }, "Alt"), + metaKey: n.N({ + key: "superKey", + comment: [ + "This is the short form for the Super key on the keyboard" + ] + }, "Super"), + separator: "+" + }), + s = new o({ + ctrlKey: n.N({ + key: "ctrlKey.long", + comment: [ + "This is the long form for the Control key on the keyboard" + ] + }, "Control"), + shiftKey: n.N({ + key: "shiftKey.long", + comment: ["This is the long form for the Shift key on the keyboard"] + }, "Shift"), + altKey: n.N({ + key: "altKey.long", + comment: ["This is the long form for the Alt key on the keyboard"] + }, "Alt"), + metaKey: n.N({ + key: "cmdKey.long", + comment: [ + "This is the long form for the Command key on the keyboard" + ] + }, "Command"), + separator: "+" + }, { + ctrlKey: n.N({ + key: "ctrlKey.long", + comment: [ + "This is the long form for the Control key on the keyboard" + ] + }, "Control"), + shiftKey: n.N({ + key: "shiftKey.long", + comment: ["This is the long form for the Shift key on the keyboard"] + }, "Shift"), + altKey: n.N({ + key: "altKey.long", + comment: ["This is the long form for the Alt key on the keyboard"] + }, "Alt"), + metaKey: n.N({ + key: "windowsKey.long", + comment: [ + "This is the long form for the Windows key on the keyboard" + ] + }, "Windows"), + separator: "+" + }, { + ctrlKey: n.N({ + key: "ctrlKey.long", + comment: [ + "This is the long form for the Control key on the keyboard" + ] + }, "Control"), + shiftKey: n.N({ + key: "shiftKey.long", + comment: ["This is the long form for the Shift key on the keyboard"] + }, "Shift"), + altKey: n.N({ + key: "altKey.long", + comment: ["This is the long form for the Alt key on the keyboard"] + }, "Alt"), + metaKey: n.N({ + key: "superKey.long", + comment: ["This is the long form for the Super key on the keyboard"] + }, "Super"), + separator: "+" + }); + + function a(e, t, i) { + if (null === t) return ""; + const n = []; + return e.ctrlKey && n.push(i.ctrlKey), e.shiftKey && n.push(i.shiftKey), + e.altKey && n.push(i.altKey), e.metaKey && n.push(i.metaKey), "" !== t && + n.push(t), n.join(i.separator) + } + }, + 8843: (e, t, i) => { + "use strict"; + i.d(t, { + p: () => l, + D: () => d + }); + var n = i(5527), + o = i(6663), + r = i(1432), + s = i(5935), + a = i(666); + + function l(e) { + if (!e) return; + "string" == typeof e && (e = a.o.file(e)); + const t = (0, s.EZ)(e) || (e.scheme === o.lg.file ? e.fsPath : e.path); + return r.ED && (0, n.vY)(t) ? d(t) : t + } + + function d(e) { + return (0, n.oP)(e) ? e.charAt(0).toUpperCase() + e.slice(1) : e + } + }, + 5976: (e, t, i) => { + "use strict"; + i.d(t, { + dk: () => r, + Wf: () => a, + B9: () => l, + F8: () => d, + OF: () => c, + SL: () => h, + JT: () => u, + XK: () => g, + Jz: () => p + }); + var n = i(8289), + o = i(3725); + + function r(e) { + return e + } + class s extends Error { + constructor(e) { + super( + `Encountered errors while disposing of store. Errors: [${e.join(", ")}]` + ), this.errors = e + } + } + + function a(e) { + return "function" == typeof e.dispose && 0 === e.dispose.length + } + + function l(e) { + if (o.$.is(e)) { + let t = []; + for (const i of e) + if (i) try { + i.dispose() + } catch (e) { + t.push(e) + } + if (1 === t.length) throw t[0]; + if (t.length > 1) throw new s(t); + return Array.isArray(e) ? [] : e + } + if (e) return e.dispose(), e + } + + function d(...e) { + const t = c((() => l(e))); + return t + } + + function c(e) { + const t = { + dispose: (0, n.I)((() => { + e() + })) + }; + return t + } + class h { + constructor() { + this._toDispose = new Set, this._isDisposed = !1 + } + dispose() { + this._isDisposed || (this._isDisposed = !0, this.clear()) + } + clear() { + try { + l(this._toDispose.values()) + } finally { + this._toDispose.clear() + } + } + add(e) { + if (!e) return e; + if (e === this) throw new Error( + "Cannot register a disposable on itself!"); + return this._isDisposed ? h.DISABLE_DISPOSED_WARNING || console.warn( + new Error( + "Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!" + ).stack) : this._toDispose.add(e), e + } + } + h.DISABLE_DISPOSED_WARNING = !1; + class u { + constructor() { + this._store = new h, this._store + } + dispose() { + this._store.dispose() + } + _register(e) { + if (e === this) throw new Error( + "Cannot register a disposable on itself!"); + return this._store.add(e) + } + } + u.None = Object.freeze({ + dispose() {} + }); + class g { + constructor() { + this._isDisposed = !1 + } + get value() { + return this._isDisposed ? void 0 : this._value + } + set value(e) { + var t; + this._isDisposed || e === this._value || (null === (t = this._value) || + void 0 === t || t.dispose(), this._value = e) + } + clear() { + this.value = void 0 + } + dispose() { + var e; + this._isDisposed = !0, null === (e = this._value) || void 0 === e || e + .dispose(), this._value = void 0 + } + clearAndLeak() { + const e = this._value; + return this._value = void 0, e + } + } + class p { + constructor(e) { + this.object = e + } + dispose() {} + } + }, + 1741: (e, t, i) => { + "use strict"; + i.d(t, { + S: () => o + }); + class n { + constructor(e) { + this.element = e, this.next = n.Undefined, this.prev = n.Undefined + } + } + n.Undefined = new n(void 0); + class o { + constructor() { + this._first = n.Undefined, this._last = n.Undefined, this._size = 0 + } + get size() { + return this._size + } + isEmpty() { + return this._first === n.Undefined + } + clear() { + let e = this._first; + for (; e !== n.Undefined;) { + const t = e.next; + e.prev = n.Undefined, e.next = n.Undefined, e = t + } + this._first = n.Undefined, this._last = n.Undefined, this._size = 0 + } + unshift(e) { + return this._insert(e, !1) + } + push(e) { + return this._insert(e, !0) + } + _insert(e, t) { + const i = new n(e); + if (this._first === n.Undefined) this._first = i, this._last = i; + else if (t) { + const e = this._last; + this._last = i, i.prev = e, e.next = i + } else { + const e = this._first; + this._first = i, i.next = e, e.prev = i + } + this._size += 1; + let o = !1; + return () => { + o || (o = !0, this._remove(i)) + } + } + shift() { + if (this._first !== n.Undefined) { + const e = this._first.element; + return this._remove(this._first), e + } + } + pop() { + if (this._last !== n.Undefined) { + const e = this._last.element; + return this._remove(this._last), e + } + } + _remove(e) { + if (e.prev !== n.Undefined && e.next !== n.Undefined) { + const t = e.prev; + t.next = e.next, e.next.prev = t + } else e.prev === n.Undefined && e.next === n.Undefined ? (this._first = + n.Undefined, this._last = n.Undefined) : e.next === n.Undefined ? ( + this._last = this._last.prev, this._last.next = n.Undefined) : e.prev === + n.Undefined && (this._first = this._first.next, this._first.prev = n.Undefined); + this._size -= 1 + } * [Symbol.iterator]() { + let e = this._first; + for (; e !== n.Undefined;) yield e.element, e = e.next + } + } + }, + 3702: (e, t, i) => { + "use strict"; + i.d(t, { + Id: () => u, + Y9: () => g, + z6: () => m + }); + var n, o, r = i(7295), + s = i(666); + class a { + constructor() { + this._value = "", this._pos = 0 + } + reset(e) { + return this._value = e, this._pos = 0, this + } + next() { + return this._pos += 1, this + } + hasNext() { + return this._pos < this._value.length - 1 + } + cmp(e) { + return e.charCodeAt(0) - this._value.charCodeAt(this._pos) + } + value() { + return this._value[this._pos] + } + } + class l { + constructor(e = !0) { + this._caseSensitive = e + } + reset(e) { + return this._value = e, this._from = 0, this._to = 0, this.next() + } + hasNext() { + return this._to < this._value.length + } + next() { + this._from = this._to; + let e = !0; + for (; this._to < this._value.length; this._to++) + if (46 === this._value.charCodeAt(this._to)) { + if (!e) break; + this._from++ + } else e = !1; + return this + } + cmp(e) { + return this._caseSensitive ? (0, r.TT)(e, this._value, 0, e.length, + this._from, this._to) : (0, r.j_)(e, this._value, 0, e.length, this._from, + this._to) + } + value() { + return this._value.substring(this._from, this._to) + } + } + class d { + constructor(e = !0, t = !0) { + this._splitOnBackslash = e, this._caseSensitive = t + } + reset(e) { + return this._value = e.replace(/\\$|\/$/, ""), this._from = 0, this._to = + 0, this.next() + } + hasNext() { + return this._to < this._value.length + } + next() { + this._from = this._to; + let e = !0; + for (; this._to < this._value.length; this._to++) { + const t = this._value.charCodeAt(this._to); + if (47 === t || this._splitOnBackslash && 92 === t) { + if (!e) break; + this._from++ + } else e = !1 + } + return this + } + cmp(e) { + return this._caseSensitive ? (0, r.TT)(e, this._value, 0, e.length, + this._from, this._to) : (0, r.j_)(e, this._value, 0, e.length, this._from, + this._to) + } + value() { + return this._value.substring(this._from, this._to) + } + } + class c { + constructor(e) { + this._ignorePathCasing = e, this._states = [], this._stateIdx = 0 + } + reset(e) { + return this._value = e, this._states = [], this._value.scheme && this._states + .push(1), this._value.authority && this._states.push(2), this._value.path && + (this._pathIterator = new d(!1, !this._ignorePathCasing(e)), this._pathIterator + .reset(e.path), this._pathIterator.value() && this._states.push(3)), + this._value.query && this._states.push(4), this._value.fragment && + this._states.push(5), this._stateIdx = 0, this + } + next() { + return 3 === this._states[this._stateIdx] && this._pathIterator.hasNext() ? + this._pathIterator.next() : this._stateIdx += 1, this + } + hasNext() { + return 3 === this._states[this._stateIdx] && this._pathIterator.hasNext() || + this._stateIdx < this._states.length - 1 + } + cmp(e) { + if (1 === this._states[this._stateIdx]) return (0, r.zY)(e, this._value + .scheme); + if (2 === this._states[this._stateIdx]) return (0, r.zY)(e, this._value + .authority); + if (3 === this._states[this._stateIdx]) return this._pathIterator.cmp( + e); + if (4 === this._states[this._stateIdx]) return (0, r.qu)(e, this._value + .query); + if (5 === this._states[this._stateIdx]) return (0, r.qu)(e, this._value + .fragment); + throw new Error + } + value() { + if (1 === this._states[this._stateIdx]) return this._value.scheme; + if (2 === this._states[this._stateIdx]) return this._value.authority; + if (3 === this._states[this._stateIdx]) return this._pathIterator.value(); + if (4 === this._states[this._stateIdx]) return this._value.query; + if (5 === this._states[this._stateIdx]) return this._value.fragment; + throw new Error + } + } + class h { + isEmpty() { + return !(this.left || this.mid || this.right || this.value) + } + } + class u { + constructor(e) { + this._iter = e + } + static forUris(e = (() => !1)) { + return new u(new c(e)) + } + static forStrings() { + return new u(new a) + } + static forConfigKeys() { + return new u(new l) + } + clear() { + this._root = void 0 + } + set(e, t) { + const i = this._iter.reset(e); + let n; + for (this._root || (this._root = new h, this._root.segment = i.value()), + n = this._root;;) { + const e = i.cmp(n.segment); + if (e > 0) n.left || (n.left = new h, n.left.segment = i.value()), n = + n.left; + else if (e < 0) n.right || (n.right = new h, n.right.segment = i.value()), + n = n.right; + else { + if (!i.hasNext()) break; + i.next(), n.mid || (n.mid = new h, n.mid.segment = i.value()), n = n + .mid + } + } + const o = n.value; + return n.value = t, n.key = e, o + } + get(e) { + var t; + return null === (t = this._getNode(e)) || void 0 === t ? void 0 : t.value + } + _getNode(e) { + const t = this._iter.reset(e); + let i = this._root; + for (; i;) { + const e = t.cmp(i.segment); + if (e > 0) i = i.left; + else if (e < 0) i = i.right; + else { + if (!t.hasNext()) break; + t.next(), i = i.mid + } + } + return i + } + has(e) { + const t = this._getNode(e); + return !(void 0 === (null == t ? void 0 : t.value) && void 0 === (null == + t ? void 0 : t.mid)) + } + delete(e) { + return this._delete(e, !1) + } + deleteSuperstr(e) { + return this._delete(e, !0) + } + _delete(e, t) { + const i = this._iter.reset(e), + n = []; + let o = this._root; + for (; o;) { + const e = i.cmp(o.segment); + if (e > 0) n.push([1, o]), o = o.left; + else if (e < 0) n.push([-1, o]), o = o.right; + else { + if (!i.hasNext()) { + for (t ? (o.left = void 0, o.mid = void 0, o.right = void 0) : o.value = + void 0; n.length > 0 && o.isEmpty();) { + let [e, t] = n.pop(); + switch (e) { + case 1: + t.left = void 0; + break; + case 0: + t.mid = void 0; + break; + case -1: + t.right = void 0 + } + o = t + } + break + } + i.next(), n.push([0, o]), o = o.mid + } + } + } + findSubstr(e) { + const t = this._iter.reset(e); + let i, n = this._root; + for (; n;) { + const e = t.cmp(n.segment); + if (e > 0) n = n.left; + else if (e < 0) n = n.right; + else { + if (!t.hasNext()) break; + t.next(), i = n.value || i, n = n.mid + } + } + return n && n.value || i + } + findSuperstr(e) { + const t = this._iter.reset(e); + let i = this._root; + for (; i;) { + const e = t.cmp(i.segment); + if (e > 0) i = i.left; + else if (e < 0) i = i.right; + else { + if (!t.hasNext()) return i.mid ? this._entries(i.mid) : void 0; + t.next(), i = i.mid + } + } + } + forEach(e) { + for (const [t, i] of this) e(i, t) + } * [Symbol.iterator]() { + yield * this._entries(this._root) + } * _entries(e) { + if (!e) return; + const t = [e]; + for (; t.length > 0;) { + const e = t.pop(); + e && (e.value && (yield [e.key, e.value]), e.left && t.push(e.left), + e.mid && t.push(e.mid), e.right && t.push(e.right)) + } + } + } + class g { + constructor(e, t) { + this[n] = "ResourceMap", e instanceof g ? (this.map = new Map(e.map), + this.toKey = null != t ? t : g.defaultToKey) : (this.map = new Map, + this.toKey = null != e ? e : g.defaultToKey) + } + set(e, t) { + return this.map.set(this.toKey(e), t), this + } + get(e) { + return this.map.get(this.toKey(e)) + } + has(e) { + return this.map.has(this.toKey(e)) + } + get size() { + return this.map.size + } + clear() { + this.map.clear() + } + delete(e) { + return this.map.delete(this.toKey(e)) + } + forEach(e, t) { + void 0 !== t && (e = e.bind(t)); + for (let [t, i] of this.map) e(i, s.o.parse(t), this) + } + values() { + return this.map.values() + } * keys() { + for (let e of this.map.keys()) yield s.o.parse(e) + } * entries() { + for (let e of this.map.entries()) yield [s.o.parse(e[0]), e[1]] + } * [(n = Symbol.toStringTag, Symbol.iterator)]() { + for (let e of this.map) yield [s.o.parse(e[0]), e[1]] + } + } + g.defaultToKey = e => e.toString(); + class p { + constructor() { + this[o] = "LinkedMap", this._map = new Map, this._head = void 0, this._tail = + void 0, this._size = 0, this._state = 0 + } + clear() { + this._map.clear(), this._head = void 0, this._tail = void 0, this._size = + 0, this._state++ + } + isEmpty() { + return !this._head && !this._tail + } + get size() { + return this._size + } + get first() { + var e; + return null === (e = this._head) || void 0 === e ? void 0 : e.value + } + get last() { + var e; + return null === (e = this._tail) || void 0 === e ? void 0 : e.value + } + has(e) { + return this._map.has(e) + } + get(e, t = 0) { + const i = this._map.get(e); + if (i) return 0 !== t && this.touch(i, t), i.value + } + set(e, t, i = 0) { + let n = this._map.get(e); + return n ? (n.value = t, 0 !== i && this.touch(n, i)) : (n = { + key: e, + value: t, + next: void 0, + previous: void 0 + }, 1 === i ? this.addItemFirst(n) : this.addItemLast(n), this._map.set( + e, n), this._size++), this + } + delete(e) { + return !!this.remove(e) + } + remove(e) { + const t = this._map.get(e); + if (t) return this._map.delete(e), this.removeItem(t), this._size--, t + .value + } + shift() { + if (!this._head && !this._tail) return; + if (!this._head || !this._tail) throw new Error("Invalid list"); + const e = this._head; + return this._map.delete(e.key), this.removeItem(e), this._size--, e.value + } + forEach(e, t) { + const i = this._state; + let n = this._head; + for (; n;) { + if (t ? e.bind(t)(n.value, n.key, this) : e(n.value, n.key, this), + this._state !== i) throw new Error( + "LinkedMap got modified during iteration."); + n = n.next + } + } + keys() { + const e = this, + t = this._state; + let i = this._head; + const n = { + [Symbol.iterator]: () => n, next() { + if (e._state !== t) throw new Error( + "LinkedMap got modified during iteration."); + if (i) { + const e = { + value: i.key, + done: !1 + }; + return i = i.next, e + } + return { + value: void 0, + done: !0 + } + } + }; + return n + } + values() { + const e = this, + t = this._state; + let i = this._head; + const n = { + [Symbol.iterator]: () => n, next() { + if (e._state !== t) throw new Error( + "LinkedMap got modified during iteration."); + if (i) { + const e = { + value: i.value, + done: !1 + }; + return i = i.next, e + } + return { + value: void 0, + done: !0 + } + } + }; + return n + } + entries() { + const e = this, + t = this._state; + let i = this._head; + const n = { + [Symbol.iterator]: () => n, next() { + if (e._state !== t) throw new Error( + "LinkedMap got modified during iteration."); + if (i) { + const e = { + value: [i.key, i.value], + done: !1 + }; + return i = i.next, e + } + return { + value: void 0, + done: !0 + } + } + }; + return n + }[(o = Symbol.toStringTag, Symbol.iterator)]() { + return this.entries() + } + trimOld(e) { + if (e >= this.size) return; + if (0 === e) return void this.clear(); + let t = this._head, + i = this.size; + for (; t && i > e;) this._map.delete(t.key), t = t.next, i--; + this._head = t, this._size = i, t && (t.previous = void 0), this._state++ + } + addItemFirst(e) { + if (this._head || this._tail) { + if (!this._head) throw new Error("Invalid list"); + e.next = this._head, this._head.previous = e + } else this._tail = e; + this._head = e, this._state++ + } + addItemLast(e) { + if (this._head || this._tail) { + if (!this._tail) throw new Error("Invalid list"); + e.previous = this._tail, this._tail.next = e + } else this._head = e; + this._tail = e, this._state++ + } + removeItem(e) { + if (e === this._head && e === this._tail) this._head = void 0, this._tail = + void 0; + else if (e === this._head) { + if (!e.next) throw new Error("Invalid list"); + e.next.previous = void 0, this._head = e.next + } else if (e === this._tail) { + if (!e.previous) throw new Error("Invalid list"); + e.previous.next = void 0, this._tail = e.previous + } else { + const t = e.next, + i = e.previous; + if (!t || !i) throw new Error("Invalid list"); + t.previous = i, i.next = t + } + e.next = void 0, e.previous = void 0, this._state++ + } + touch(e, t) { + if (!this._head || !this._tail) throw new Error("Invalid list"); + if (1 === t || 2 === t) + if (1 === t) { + if (e === this._head) return; + const t = e.next, + i = e.previous; + e === this._tail ? (i.next = void 0, this._tail = i) : (t.previous = + i, i.next = t), e.previous = void 0, e.next = this._head, this._head + .previous = e, this._head = e, this._state++ + } else if (2 === t) { + if (e === this._tail) return; + const t = e.next, + i = e.previous; + e === this._head ? (t.previous = void 0, this._head = t) : (t.previous = + i, i.next = t), e.next = void 0, e.previous = this._tail, this._tail + .next = e, this._tail = e, this._state++ + } + } + toJSON() { + const e = []; + return this.forEach(((t, i) => { + e.push([i, t]) + })), e + } + fromJSON(e) { + this.clear(); + for (const [t, i] of e) this.set(t, i) + } + } + class m extends p { + constructor(e, t = 1) { + super(), this._limit = e, this._ratio = Math.min(Math.max(0, t), 1) + } + get limit() { + return this._limit + } + set limit(e) { + this._limit = e, this.checkTrim() + } + get(e, t = 2) { + return super.get(e, t) + } + peek(e) { + return super.get(e, 0) + } + set(e, t) { + return super.set(e, t, 2), this.checkTrim(), this + } + checkTrim() { + this.size > this._limit && this.trimOld(Math.round(this._limit * this._ratio)) + } + } + }, + 3720: function(e) { + e.exports = function() { + "use strict"; + + function e(e, t) { + for (var i = 0; i < t.length; i++) { + var n = t[i]; + n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && + (n.writable = !0), Object.defineProperty(e, n.key, n) + } + } + + function t(e, t) { + (null == t || t > e.length) && (t = e.length); + for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i]; + return n + } + + function i(e, i) { + var n = "undefined" != typeof Symbol && e[Symbol.iterator] || e[ + "@@iterator"]; + if (n) return (n = n.call(e)).next.bind(n); + if (Array.isArray(e) || (n = function(e, i) { + if (e) { + if ("string" == typeof e) return t(e, i); + var n = Object.prototype.toString.call(e).slice(8, -1); + return "Object" === n && e.constructor && (n = e.constructor.name), + "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || + /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? t(e, i) : + void 0 + } + }(e)) || i && e && "number" == typeof e.length) { + n && (e = n); + var o = 0; + return function() { + return o >= e.length ? { + done: !0 + } : { + done: !1, + value: e[o++] + } + } + } + throw new TypeError( + "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ) + } + var n = { + exports: {} + }; + + function o() { + return { + baseUrl: null, + breaks: !1, + extensions: null, + gfm: !0, + headerIds: !0, + headerPrefix: "", + highlight: null, + langPrefix: "language-", + mangle: !0, + pedantic: !1, + renderer: null, + sanitize: !1, + sanitizer: null, + silent: !1, + smartLists: !1, + smartypants: !1, + tokenizer: null, + walkTokens: null, + xhtml: !1 + } + } + n.exports = { + defaults: { + baseUrl: null, + breaks: !1, + extensions: null, + gfm: !0, + headerIds: !0, + headerPrefix: "", + highlight: null, + langPrefix: "language-", + mangle: !0, + pedantic: !1, + renderer: null, + sanitize: !1, + sanitizer: null, + silent: !1, + smartLists: !1, + smartypants: !1, + tokenizer: null, + walkTokens: null, + xhtml: !1 + }, + getDefaults: o, + changeDefaults: function(e) { + n.exports.defaults = e + } + }; + var r = /[&<>"']/, + s = /[&<>"']/g, + a = /[<>"']|&(?!#?\w+;)/, + l = /[<>"']|&(?!#?\w+;)/g, + d = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" + }, + c = function(e) { + return d[e] + }; + var h = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi; + + function u(e) { + return e.replace(h, (function(e, t) { + return "colon" === (t = t.toLowerCase()) ? ":" : "#" === t.charAt( + 0) ? "x" === t.charAt(1) ? String.fromCharCode(parseInt(t.substring( + 2), 16)) : String.fromCharCode(+t.substring(1)) : "" + })) + } + var g = /(^|[^\[])\^/g; + var p = /[^\w:]/g, + m = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; + var f = {}, + _ = /^[^:]+:\/*[^/]*$/, + b = /^([^:]+:)[\s\S]*$/, + v = /^([^:]+:\/*[^/]*)[\s\S]*$/; + + function w(e, t) { + f[" " + e] || (_.test(e) ? f[" " + e] = e + "/" : f[" " + e] = C(e, + "/", !0)); + var i = -1 === (e = f[" " + e]).indexOf(":"); + return "//" === t.substring(0, 2) ? i ? t : e.replace(b, "$1") + t : + "/" === t.charAt(0) ? i ? t : e.replace(v, "$1") + t : e + t + } + + function C(e, t, i) { + var n = e.length; + if (0 === n) return ""; + for (var o = 0; o < n;) { + var r = e.charAt(n - o - 1); + if (r !== t || i) { + if (r === t || !i) break; + o++ + } else o++ + } + return e.substr(0, n - o) + } + var y = function(e, t) { + if (t) { + if (r.test(e)) return e.replace(s, c) + } else if (a.test(e)) return e.replace(l, c); + return e + }, + S = u, + x = function(e, t) { + e = e.source || e, t = t || ""; + var i = { + replace: function(t, n) { + return n = (n = n.source || n).replace(g, "$1"), e = e.replace(t, + n), i + }, + getRegex: function() { + return new RegExp(e, t) + } + }; + return i + }, + k = function(e, t, i) { + if (e) { + var n; + try { + n = decodeURIComponent(u(i)).replace(p, "").toLowerCase() + } catch (e) { + return null + } + if (0 === n.indexOf("javascript:") || 0 === n.indexOf("vbscript:") || + 0 === n.indexOf("data:")) return null + } + t && !m.test(i) && (i = w(t, i)); + try { + i = encodeURI(i).replace(/%25/g, "%") + } catch (e) { + return null + } + return i + }, + L = { + exec: function() {} + }, + N = function(e) { + for (var t, i, n = 1; n < arguments.length; n++) + for (i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, + i) && (e[i] = t[i]); + return e + }, + D = function(e, t) { + var i = e.replace(/\|/g, (function(e, t, i) { + for (var n = !1, o = t; --o >= 0 && "\\" === i[o];) n = !n; + return n ? "|" : " |" + })).split(/ \|/), + n = 0; + if (i[0].trim() || i.shift(), i[i.length - 1].trim() || i.pop(), i.length > + t) i.splice(t); + else + for (; i.length < t;) i.push(""); + for (; n < i.length; n++) i[n] = i[n].trim().replace(/\\\|/g, "|"); + return i + }, + E = C, + I = function(e, t) { + if (-1 === e.indexOf(t[1])) return -1; + for (var i = e.length, n = 0, o = 0; o < i; o++) + if ("\\" === e[o]) o++; + else if (e[o] === t[0]) n++; + else if (e[o] === t[1] && --n < 0) return o; + return -1 + }, + T = function(e) { + e && e.sanitize && !e.silent && console.warn( + "marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options" + ) + }, + M = function(e, t) { + if (t < 1) return ""; + for (var i = ""; t > 1;) 1 & t && (i += e), t >>= 1, e += e; + return i + e + }, + A = n.exports.defaults, + R = E, + O = D, + P = y, + F = I; + + function B(e, t, i, n) { + var o = t.href, + r = t.title ? P(t.title) : null, + s = e[1].replace(/\\([\[\]])/g, "$1"); + return "!" !== e[0].charAt(0) ? (n.state.inLink = !0, { + type: "link", + raw: i, + href: o, + title: r, + text: s, + tokens: n.inlineTokens(s, []) + }) : { + type: "image", + raw: i, + href: o, + title: r, + text: P(s) + } + } + var W = function() { + function e(e) { + this.options = e || A + } + var t = e.prototype; + return t.space = function(e) { + var t = this.rules.block.newline.exec(e); + if (t) return t[0].length > 1 ? { + type: "space", + raw: t[0] + } : { + raw: "\n" + } + }, t.code = function(e) { + var t = this.rules.block.code.exec(e); + if (t) { + var i = t[0].replace(/^ {1,4}/gm, ""); + return { + type: "code", + raw: t[0], + codeBlockStyle: "indented", + text: this.options.pedantic ? i : R(i, "\n") + } + } + }, t.fences = function(e) { + var t = this.rules.block.fences.exec(e); + if (t) { + var i = t[0], + n = function(e, t) { + var i = e.match(/^(\s+)(?:```)/); + if (null === i) return t; + var n = i[1]; + return t.split("\n").map((function(e) { + var t = e.match(/^\s+/); + return null === t ? e : t[0].length >= n.length ? e.slice(n.length) : + e + })).join("\n") + }(i, t[3] || ""); + return { + type: "code", + raw: i, + lang: t[2] ? t[2].trim() : t[2], + text: n + } + } + }, t.heading = function(e) { + var t = this.rules.block.heading.exec(e); + if (t) { + var i = t[2].trim(); + if (/#$/.test(i)) { + var n = R(i, "#"); + this.options.pedantic ? i = n.trim() : n && !/ $/.test(n) || (i = + n.trim()) + } + var o = { + type: "heading", + raw: t[0], + depth: t[1].length, + text: i, + tokens: [] + }; + return this.lexer.inline(o.text, o.tokens), o + } + }, t.hr = function(e) { + var t = this.rules.block.hr.exec(e); + if (t) return { + type: "hr", + raw: t[0] + } + }, t.blockquote = function(e) { + var t = this.rules.block.blockquote.exec(e); + if (t) { + var i = t[0].replace(/^ *> ?/gm, ""); + return { + type: "blockquote", + raw: t[0], + tokens: this.lexer.blockTokens(i, []), + text: i + } + } + }, t.list = function(e) { + var t = this.rules.block.list.exec(e); + if (t) { + var i, n, o, r, s, a, l, d, c, h, u = t[1].trim(), + g = u.length > 1, + p = { + type: "list", + raw: "", + ordered: g, + start: g ? +u.slice(0, -1) : "", + loose: !1, + items: [] + }; + u = g ? "\\d{1,9}\\" + u.slice(-1) : "\\" + u, this.options.pedantic && + (u = g ? u : "[*+-]"); + for (var m = new RegExp("^( {0,3}" + u + + ")((?: [^\\n]*| *)(?:\\n[^\\n]*)*(?:\\n|$))"); e && !this.rules.block + .hr.test(e) && (t = m.exec(e));) { + c = t[2].split("\n"), this.options.pedantic ? (r = 2, h = c[0].trimLeft()) : + (r = t[2].search(/[^ ]/), r = t[1].length + (r > 4 ? 1 : r), h = + c[0].slice(r - t[1].length)), a = !1, i = t[0], !c[0] && /^ *$/ + .test(c[1]) && (i = t[1] + c.slice(0, 2).join("\n") + "\n", p.loose = ! + 0, c = []); + var f = new RegExp("^ {0," + Math.min(3, r - 1) + + "}(?:[*+-]|\\d{1,9}[.)])"); + for (s = 1; s < c.length; s++) { + if (d = c[s], this.options.pedantic && (d = d.replace( + /^ {1,4}(?=( {4})*[^ ])/g, " ")), f.test(d)) { + i = t[1] + c.slice(0, s).join("\n") + "\n"; + break + } + if (a) { + if (!(d.search(/[^ ]/) >= r) && d.trim()) { + i = t[1] + c.slice(0, s).join("\n") + "\n"; + break + } + h += "\n" + d.slice(r) + } else d.trim() || (a = !0), d.search(/[^ ]/) >= r ? h += "\n" + + d.slice(r) : h += "\n" + d + } + p.loose || (l ? p.loose = !0 : /\n *\n *$/.test(i) && (l = !0)), + this.options.gfm && (n = /^\[[ xX]\] /.exec(h)) && (o = "[ ] " !== + n[0], h = h.replace(/^\[[ xX]\] +/, "")), p.items.push({ + type: "list_item", + raw: i, + task: !!n, + checked: o, + loose: !1, + text: h + }), p.raw += i, e = e.slice(i.length) + } + p.items[p.items.length - 1].raw = i.trimRight(), p.items[p.items.length - + 1].text = h.trimRight(), p.raw = p.raw.trimRight(); + var _ = p.items.length; + for (s = 0; s < _; s++) this.lexer.state.top = !1, p.items[s].tokens = + this.lexer.blockTokens(p.items[s].text, []), p.items[s].tokens.some( + (function(e) { + return "space" === e.type + })) && (p.loose = !0, p.items[s].loose = !0); + return p + } + }, t.html = function(e) { + var t = this.rules.block.html.exec(e); + if (t) { + var i = { + type: "html", + raw: t[0], + pre: !this.options.sanitizer && ("pre" === t[1] || "script" === + t[1] || "style" === t[1]), + text: t[0] + }; + return this.options.sanitize && (i.type = "paragraph", i.text = + this.options.sanitizer ? this.options.sanitizer(t[0]) : P(t[0]), + i.tokens = [], this.lexer.inline(i.text, i.tokens)), i + } + }, t.def = function(e) { + var t = this.rules.block.def.exec(e); + if (t) return t[3] && (t[3] = t[3].substring(1, t[3].length - 1)), { + type: "def", + tag: t[1].toLowerCase().replace(/\s+/g, " "), + raw: t[0], + href: t[2], + title: t[3] + } + }, t.table = function(e) { + var t = this.rules.block.table.exec(e); + if (t) { + var i = { + type: "table", + header: O(t[1]).map((function(e) { + return { + text: e + } + })), + align: t[2].replace(/^ *|\| *$/g, "").split(/ *\| */), + rows: t[3] ? t[3].replace(/\n$/, "").split("\n") : [] + }; + if (i.header.length === i.align.length) { + i.raw = t[0]; + var n, o, r, s, a = i.align.length; + for (n = 0; n < a; n++) /^ *-+: *$/.test(i.align[n]) ? i.align[n] = + "right" : /^ *:-+: *$/.test(i.align[n]) ? i.align[n] = "center" : + /^ *:-+ *$/.test(i.align[n]) ? i.align[n] = "left" : i.align[n] = + null; + for (a = i.rows.length, n = 0; n < a; n++) i.rows[n] = O(i.rows[n], + i.header.length).map((function(e) { + return { + text: e + } + })); + for (a = i.header.length, o = 0; o < a; o++) i.header[o].tokens = [], + this.lexer.inlineTokens(i.header[o].text, i.header[o].tokens); + for (a = i.rows.length, o = 0; o < a; o++) + for (s = i.rows[o], r = 0; r < s.length; r++) s[r].tokens = [], + this.lexer.inlineTokens(s[r].text, s[r].tokens); + return i + } + } + }, t.lheading = function(e) { + var t = this.rules.block.lheading.exec(e); + if (t) { + var i = { + type: "heading", + raw: t[0], + depth: "=" === t[2].charAt(0) ? 1 : 2, + text: t[1], + tokens: [] + }; + return this.lexer.inline(i.text, i.tokens), i + } + }, t.paragraph = function(e) { + var t = this.rules.block.paragraph.exec(e); + if (t) { + var i = { + type: "paragraph", + raw: t[0], + text: "\n" === t[1].charAt(t[1].length - 1) ? t[1].slice(0, -1) : t[ + 1], + tokens: [] + }; + return this.lexer.inline(i.text, i.tokens), i + } + }, t.text = function(e) { + var t = this.rules.block.text.exec(e); + if (t) { + var i = { + type: "text", + raw: t[0], + text: t[0], + tokens: [] + }; + return this.lexer.inline(i.text, i.tokens), i + } + }, t.escape = function(e) { + var t = this.rules.inline.escape.exec(e); + if (t) return { + type: "escape", + raw: t[0], + text: P(t[1]) + } + }, t.tag = function(e) { + var t = this.rules.inline.tag.exec(e); + if (t) return !this.lexer.state.inLink && /^/i.test( + t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && + /^<(pre|code|kbd|script)(\s|>)/i.test(t[0]) ? this.lexer.state.inRawBlock = ! + 0 : this.lexer.state.inRawBlock && + /^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0]) && (this.lexer.state + .inRawBlock = !1), { + type: this.options.sanitize ? "text" : "html", + raw: t[0], + inLink: this.lexer.state.inLink, + inRawBlock: this.lexer.state.inRawBlock, + text: this.options.sanitize ? this.options.sanitizer ? this.options + .sanitizer(t[0]) : P(t[0]) : t[0] + } + }, t.link = function(e) { + var t = this.rules.inline.link.exec(e); + if (t) { + var i = t[2].trim(); + if (!this.options.pedantic && /^$/.test(i)) return; + var n = R(i.slice(0, -1), "\\"); + if ((i.length - n.length) % 2 == 0) return + } else { + var o = F(t[2], "()"); + if (o > -1) { + var r = (0 === t[0].indexOf("!") ? 5 : 4) + t[1].length + o; + t[2] = t[2].substring(0, o), t[0] = t[0].substring(0, r).trim(), + t[3] = "" + } + } + var s = t[2], + a = ""; + if (this.options.pedantic) { + var l = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s); + l && (s = l[1], a = l[3]) + } else a = t[3] ? t[3].slice(1, -1) : ""; + return s = s.trim(), /^$/.test(i) ? s.slice(1) : s.slice(1, -1)), B(t, { + href: s ? s.replace(this.rules.inline._escapes, "$1") : s, + title: a ? a.replace(this.rules.inline._escapes, "$1") : a + }, t[0], this.lexer) + } + }, t.reflink = function(e, t) { + var i; + if ((i = this.rules.inline.reflink.exec(e)) || (i = this.rules.inline + .nolink.exec(e))) { + var n = (i[2] || i[1]).replace(/\s+/g, " "); + if (!(n = t[n.toLowerCase()]) || !n.href) { + var o = i[0].charAt(0); + return { + type: "text", + raw: o, + text: o + } + } + return B(i, n, i[0], this.lexer) + } + }, t.emStrong = function(e, t, i) { + void 0 === i && (i = ""); + var n = this.rules.inline.emStrong.lDelim.exec(e); + if (n && (!n[3] || !i.match( + /(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/ + ))) { + var o = n[1] || n[2] || ""; + if (!o || o && ("" === i || this.rules.inline.punctuation.exec(i))) { + var r, s, a = n[0].length - 1, + l = a, + d = 0, + c = "*" === n[0][0] ? this.rules.inline.emStrong.rDelimAst : + this.rules.inline.emStrong.rDelimUnd; + for (c.lastIndex = 0, t = t.slice(-1 * e.length + a); null != (n = + c.exec(t));) + if (r = n[1] || n[2] || n[3] || n[4] || n[5] || n[6]) + if (s = r.length, n[3] || n[4]) l += s; + else if (!((n[5] || n[6]) && a % 3) || (a + s) % 3) { + if (!((l -= s) > 0)) { + if (s = Math.min(s, s + l + d), Math.min(a, s) % 2) { + var h = e.slice(1, a + n.index + s); + return { + type: "em", + raw: e.slice(0, a + n.index + s + 1), + text: h, + tokens: this.lexer.inlineTokens(h, []) + } + } + var u = e.slice(2, a + n.index + s - 1); + return { + type: "strong", + raw: e.slice(0, a + n.index + s + 1), + text: u, + tokens: this.lexer.inlineTokens(u, []) + } + } + } else d += s + } + } + }, t.codespan = function(e) { + var t = this.rules.inline.code.exec(e); + if (t) { + var i = t[2].replace(/\n/g, " "), + n = /[^ ]/.test(i), + o = /^ /.test(i) && / $/.test(i); + return n && o && (i = i.substring(1, i.length - 1)), i = P(i, !0), { + type: "codespan", + raw: t[0], + text: i + } + } + }, t.br = function(e) { + var t = this.rules.inline.br.exec(e); + if (t) return { + type: "br", + raw: t[0] + } + }, t.del = function(e) { + var t = this.rules.inline.del.exec(e); + if (t) return { + type: "del", + raw: t[0], + text: t[2], + tokens: this.lexer.inlineTokens(t[2], []) + } + }, t.autolink = function(e, t) { + var i, n, o = this.rules.inline.autolink.exec(e); + if (o) return n = "@" === o[2] ? "mailto:" + (i = P(this.options.mangle ? + t(o[1]) : o[1])) : i = P(o[1]), { + type: "link", + raw: o[0], + text: i, + href: n, + tokens: [{ + type: "text", + raw: i, + text: i + }] + } + }, t.url = function(e, t) { + var i; + if (i = this.rules.inline.url.exec(e)) { + var n, o; + if ("@" === i[2]) o = "mailto:" + (n = P(this.options.mangle ? t(i[ + 0]) : i[0])); + else { + var r; + do { + r = i[0], i[0] = this.rules.inline._backpedal.exec(i[0])[0] + } while (r !== i[0]); + n = P(i[0]), o = "www." === i[1] ? "http://" + n : n + } + return { + type: "link", + raw: i[0], + text: n, + href: o, + tokens: [{ + type: "text", + raw: n, + text: n + }] + } + } + }, t.inlineText = function(e, t) { + var i, n = this.rules.inline.text.exec(e); + if (n) return i = this.lexer.state.inRawBlock ? this.options.sanitize ? + this.options.sanitizer ? this.options.sanitizer(n[0]) : P(n[0]) : + n[0] : P(this.options.smartypants ? t(n[0]) : n[0]), { + type: "text", + raw: n[0], + text: i + } + }, e + }(), + z = L, + V = x, + H = N, + U = { + newline: /^(?: *(?:\n|$))+/, + code: /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, + fences: /^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/, + hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/, + heading: /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, + blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, + list: /^( {0,3}bull)( [^\n]+?)?(?:\n|$)/, + html: "^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", + def: /^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/, + table: z, + lheading: /^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/, + _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/, + text: /^[^\n]+/, + _label: /(?!\s*\])(?:\\[\[\]]|[^\[\]])+/, + _title: /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/ + }; + U.def = V(U.def).replace("label", U._label).replace("title", U._title).getRegex(), + U.bullet = /(?:[*+-]|\d{1,9}[.)])/, U.listItemStart = V( + /^( *)(bull) */).replace("bull", U.bullet).getRegex(), U.list = V(U.list) + .replace(/bull/g, U.bullet).replace("hr", + "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace( + "def", "\\n+(?=" + U.def.source + ")").getRegex(), U._tag = + "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", + U._comment = /|$)/, U.html = V(U.html, "i").replace( + "comment", U._comment).replace("tag", U._tag).replace("attribute", + / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/ + ).getRegex(), U.paragraph = V(U._paragraph).replace("hr", U.hr).replace( + "heading", " {0,3}#{1,6} ").replace("|lheading", "").replace( + "blockquote", " {0,3}>").replace("fences", + " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", + " {0,3}(?:[*+-]|1[.)]) ").replace("html", + ")|<(?:script|pre|style|textarea|!--)").replace( + "tag", U._tag).getRegex(), U.blockquote = V(U.blockquote).replace( + "paragraph", U.paragraph).getRegex(), U.normal = H({}, U), U.gfm = H({}, + U.normal, { + table: "^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)\\|?(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)" + }), U.gfm.table = V(U.gfm.table).replace("hr", U.hr).replace( + "heading", " {0,3}#{1,6} ").replace("blockquote", " {0,3}>").replace( + "code", " {4}[^\\n]").replace("fences", + " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", + " {0,3}(?:[*+-]|1[.)]) ").replace("html", + ")|<(?:script|pre|style|textarea|!--)").replace( + "tag", U._tag).getRegex(), U.pedantic = H({}, U.normal, { + html: V( + "^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))" + ).replace("comment", U._comment).replace(/tag/g, + "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b" + ).getRegex(), + def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, + heading: /^(#{1,6})(.*)(?:\n+|$)/, + fences: z, + paragraph: V(U.normal._paragraph).replace("hr", U.hr).replace( + "heading", " *#{1,6} *[^\n]").replace("lheading", U.lheading).replace( + "blockquote", " {0,3}>").replace("|fences", "").replace("|list", + "").replace("|html", "").getRegex() + }); + var j = { + escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, + autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, + url: z, + tag: "^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^", + link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/, + reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/, + nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/, + reflinkSearch: "reflink|nolink(?!\\()", + emStrong: { + lDelim: /^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/, + rDelimAst: /\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/, + rDelimUnd: /\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/ + }, + code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, + br: /^( {2,}|\\)\n(?!\s*$)/, + del: z, + text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~" + }; + j.punctuation = V(j.punctuation).replace(/punctuation/g, j._punctuation) + .getRegex(), j.blockSkip = /\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g, + j.escapedEmSt = /\\\*|\\_/g, j._comment = V(U._comment).replace( + "(?:-->|$)", "-->").getRegex(), j.emStrong.lDelim = V(j.emStrong.lDelim) + .replace(/punct/g, j._punctuation).getRegex(), j.emStrong.rDelimAst = + V(j.emStrong.rDelimAst, "g").replace(/punct/g, j._punctuation).getRegex(), + j.emStrong.rDelimUnd = V(j.emStrong.rDelimUnd, "g").replace(/punct/g, + j._punctuation).getRegex(), j._escapes = + /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g, j._scheme = + /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/, j._email = + /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/, + j.autolink = V(j.autolink).replace("scheme", j._scheme).replace( + "email", j._email).getRegex(), j._attribute = + /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/, + j.tag = V(j.tag).replace("comment", j._comment).replace("attribute", j + ._attribute).getRegex(), j._label = + /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, j._href = + /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/, j._title = + /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/, j.link = + V(j.link).replace("label", j._label).replace("href", j._href).replace( + "title", j._title).getRegex(), j.reflink = V(j.reflink).replace( + "label", j._label).getRegex(), j.reflinkSearch = V(j.reflinkSearch, + "g").replace("reflink", j.reflink).replace("nolink", j.nolink).getRegex(), + j.normal = H({}, j), j.pedantic = H({}, j.normal, { + strong: { + start: /^__|\*\*/, + middle: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, + endAst: /\*\*(?!\*)/g, + endUnd: /__(?!_)/g + }, + em: { + start: /^_|\*/, + middle: /^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/, + endAst: /\*(?!\*)/g, + endUnd: /_(?!_)/g + }, + link: V(/^!?\[(label)\]\((.*?)\)/).replace("label", j._label).getRegex(), + reflink: V(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", j._label) + .getRegex() + }), j.gfm = H({}, j.normal, { + escape: V(j.escape).replace("])", "~|])").getRegex(), + _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/, + url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, + _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/, + del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/, + text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\ .5 && (i = + "x" + i.toString(16)), n += "&#" + i + ";"; + return n + } + var J = function() { + function t(e) { + this.tokens = [], this.tokens.links = Object.create(null), this.options = + e || q, this.options.tokenizer = this.options.tokenizer || new $, + this.tokenizer = this.options.tokenizer, this.tokenizer.options = + this.options, this.tokenizer.lexer = this, this.inlineQueue = [], + this.state = { + inLink: !1, + inRawBlock: !1, + top: !0 + }; + var t = { + block: Z.normal, + inline: G.normal + }; + this.options.pedantic ? (t.block = Z.pedantic, t.inline = G.pedantic) : + this.options.gfm && (t.block = Z.gfm, this.options.breaks ? t.inline = + G.breaks : t.inline = G.gfm), this.tokenizer.rules = t + } + t.lex = function(e, i) { + return new t(i).lex(e) + }, t.lexInline = function(e, i) { + return new t(i).inlineTokens(e) + }; + var i, n, o, r = t.prototype; + return r.lex = function(e) { + var t; + for (e = e.replace(/\r\n|\r/g, "\n").replace(/\t/g, " "), this.blockTokens( + e, this.tokens); t = this.inlineQueue.shift();) this.inlineTokens( + t.src, t.tokens); + return this.tokens + }, r.blockTokens = function(e, t) { + var i, n, o, r, s = this; + for (void 0 === t && (t = []), this.options.pedantic && (e = e.replace( + /^ +$/gm, "")); e;) + if (!(this.options.extensions && this.options.extensions.block && + this.options.extensions.block.some((function(n) { + return !!(i = n.call({ + lexer: s + }, e, t)) && (e = e.substring(i.raw.length), t.push(i), !0) + })))) + if (i = this.tokenizer.space(e)) e = e.substring(i.raw.length), i + .type && t.push(i); + else if (i = this.tokenizer.code(e)) e = e.substring(i.raw.length), ! + (n = t[t.length - 1]) || "paragraph" !== n.type && "text" !== n.type ? + t.push(i) : (n.raw += "\n" + i.raw, n.text += "\n" + i.text, this.inlineQueue[ + this.inlineQueue.length - 1].src = n.text); + else if (i = this.tokenizer.fences(e)) e = e.substring(i.raw.length), + t.push(i); + else if (i = this.tokenizer.heading(e)) e = e.substring(i.raw.length), + t.push(i); + else if (i = this.tokenizer.hr(e)) e = e.substring(i.raw.length), t + .push(i); + else if (i = this.tokenizer.blockquote(e)) e = e.substring(i.raw.length), + t.push(i); + else if (i = this.tokenizer.list(e)) e = e.substring(i.raw.length), + t.push(i); + else if (i = this.tokenizer.html(e)) e = e.substring(i.raw.length), + t.push(i); + else if (i = this.tokenizer.def(e)) e = e.substring(i.raw.length), ! + (n = t[t.length - 1]) || "paragraph" !== n.type && "text" !== n.type ? + this.tokens.links[i.tag] || (this.tokens.links[i.tag] = { + href: i.href, + title: i.title + }) : (n.raw += "\n" + i.raw, n.text += "\n" + i.raw, this.inlineQueue[ + this.inlineQueue.length - 1].src = n.text); + else if (i = this.tokenizer.table(e)) e = e.substring(i.raw.length), + t.push(i); + else if (i = this.tokenizer.lheading(e)) e = e.substring(i.raw.length), + t.push(i); + else if (o = e, this.options.extensions && this.options.extensions.startBlock && + function() { + var t = 1 / 0, + i = e.slice(1), + n = void 0; + s.options.extensions.startBlock.forEach((function(e) { + "number" == typeof(n = e.call({ + lexer: this + }, i)) && n >= 0 && (t = Math.min(t, n)) + })), t < 1 / 0 && t >= 0 && (o = e.substring(0, t + 1)) + }(), this.state.top && (i = this.tokenizer.paragraph(o))) n = t[t.length - + 1], r && "paragraph" === n.type ? (n.raw += "\n" + i.raw, n.text += + "\n" + i.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue + .length - 1].src = n.text) : t.push(i), r = o.length !== e.length, + e = e.substring(i.raw.length); + else if (i = this.tokenizer.text(e)) e = e.substring(i.raw.length), ( + n = t[t.length - 1]) && "text" === n.type ? (n.raw += "\n" + i.raw, + n.text += "\n" + i.text, this.inlineQueue.pop(), this.inlineQueue[ + this.inlineQueue.length - 1].src = n.text) : t.push(i); + else if (e) { + var a = "Infinite loop on byte: " + e.charCodeAt(0); + if (this.options.silent) { + console.error(a); + break + } + throw new Error(a) + } + return this.state.top = !0, t + }, r.inline = function(e, t) { + this.inlineQueue.push({ + src: e, + tokens: t + }) + }, r.inlineTokens = function(e, t) { + var i, n, o, r = this; + void 0 === t && (t = []); + var s, a, l, d = e; + if (this.tokens.links) { + var c = Object.keys(this.tokens.links); + if (c.length > 0) + for (; null != (s = this.tokenizer.rules.inline.reflinkSearch.exec( + d));) c.includes(s[0].slice(s[0].lastIndexOf("[") + 1, -1)) && + (d = d.slice(0, s.index) + "[" + Y("a", s[0].length - 2) + "]" + + d.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)) + } + for (; null != (s = this.tokenizer.rules.inline.blockSkip.exec(d));) + d = d.slice(0, s.index) + "[" + Y("a", s[0].length - 2) + "]" + d.slice( + this.tokenizer.rules.inline.blockSkip.lastIndex); + for (; null != (s = this.tokenizer.rules.inline.escapedEmSt.exec(d));) + d = d.slice(0, s.index) + "++" + d.slice(this.tokenizer.rules.inline + .escapedEmSt.lastIndex); + for (; e;) + if (a || (l = ""), a = !1, !(this.options.extensions && this.options + .extensions.inline && this.options.extensions.inline.some(( + function(n) { + return !!(i = n.call({ + lexer: r + }, e, t)) && (e = e.substring(i.raw.length), t.push(i), !0) + })))) + if (i = this.tokenizer.escape(e)) e = e.substring(i.raw.length), + t.push(i); + else if (i = this.tokenizer.tag(e)) e = e.substring(i.raw.length), ( + n = t[t.length - 1]) && "text" === i.type && "text" === n.type ? + (n.raw += i.raw, n.text += i.text) : t.push(i); + else if (i = this.tokenizer.link(e)) e = e.substring(i.raw.length), + t.push(i); + else if (i = this.tokenizer.reflink(e, this.tokens.links)) e = e.substring( + i.raw.length), (n = t[t.length - 1]) && "text" === i.type && + "text" === n.type ? (n.raw += i.raw, n.text += i.text) : t.push(i); + else if (i = this.tokenizer.emStrong(e, d, l)) e = e.substring(i.raw + .length), t.push(i); + else if (i = this.tokenizer.codespan(e)) e = e.substring(i.raw.length), + t.push(i); + else if (i = this.tokenizer.br(e)) e = e.substring(i.raw.length), t + .push(i); + else if (i = this.tokenizer.del(e)) e = e.substring(i.raw.length), + t.push(i); + else if (i = this.tokenizer.autolink(e, X)) e = e.substring(i.raw.length), + t.push(i); + else if (this.state.inLink || !(i = this.tokenizer.url(e, X))) { + if (o = e, this.options.extensions && this.options.extensions.startInline && + function() { + var t = 1 / 0, + i = e.slice(1), + n = void 0; + r.options.extensions.startInline.forEach((function(e) { + "number" == typeof(n = e.call({ + lexer: this + }, i)) && n >= 0 && (t = Math.min(t, n)) + })), t < 1 / 0 && t >= 0 && (o = e.substring(0, t + 1)) + }(), i = this.tokenizer.inlineText(o, Q)) e = e.substring(i.raw.length), + "_" !== i.raw.slice(-1) && (l = i.raw.slice(-1)), a = !0, (n = t[ + t.length - 1]) && "text" === n.type ? (n.raw += i.raw, n.text += + i.text) : t.push(i); + else if (e) { + var h = "Infinite loop on byte: " + e.charCodeAt(0); + if (this.options.silent) { + console.error(h); + break + } + throw new Error(h) + } + } else e = e.substring(i.raw.length), t.push(i); + return t + }, i = t, o = [{ + key: "rules", + get: function() { + return { + block: Z, + inline: G + } + } + }], (n = null) && e(i.prototype, n), o && e(i, o), t + }(), + ee = n.exports.defaults, + te = k, + ie = y, + ne = function() { + function e(e) { + this.options = e || ee + } + var t = e.prototype; + return t.code = function(e, t, i) { + var n = (t || "").match(/\S*/)[0]; + if (this.options.highlight) { + var o = this.options.highlight(e, n); + null != o && o !== e && (i = !0, e = o) + } + return e = e.replace(/\n$/, "") + "\n", n ? '
' + (i ? e : ie(e, !0)) +
+									"
\n" : "
" + (i ? e : ie(e, !0)) +
+									"
\n" + }, t.blockquote = function(e) { + return "
\n" + e + "
\n" + }, t.html = function(e) { + return e + }, t.heading = function(e, t, i, n) { + return this.options.headerIds ? "' + e + "\n" : "" + e + + "\n" + }, t.hr = function() { + return this.options.xhtml ? "
\n" : "
\n" + }, t.list = function(e, t, i) { + var n = t ? "ol" : "ul"; + return "<" + n + (t && 1 !== i ? ' start="' + i + '"' : "") + ">\n" + + e + "\n" + }, t.listitem = function(e) { + return "
  • " + e + "
  • \n" + }, t.checkbox = function(e) { + return " " + }, t.paragraph = function(e) { + return "

    " + e + "

    \n" + }, t.table = function(e, t) { + return t && (t = "" + t + ""), "\n\n" + + e + "\n" + t + "
    \n" + }, t.tablerow = function(e) { + return "\n" + e + "\n" + }, t.tablecell = function(e, t) { + var i = t.header ? "th" : "td"; + return (t.align ? "<" + i + ' align="' + t.align + '">' : "<" + i + + ">") + e + "\n" + }, t.strong = function(e) { + return "" + e + "" + }, t.em = function(e) { + return "" + e + "" + }, t.codespan = function(e) { + return "" + e + "" + }, t.br = function() { + return this.options.xhtml ? "
    " : "
    " + }, t.del = function(e) { + return "" + e + "" + }, t.link = function(e, t, i) { + if (null === (e = te(this.options.sanitize, this.options.baseUrl, e))) + return i; + var n = '
    " + i + "" + }, t.image = function(e, t, i) { + if (null === (e = te(this.options.sanitize, this.options.baseUrl, e))) + return i; + var n = '' + i + '" : ">") + }, t.text = function(e) { + return e + }, e + }(), + oe = function() { + function e() {} + var t = e.prototype; + return t.strong = function(e) { + return e + }, t.em = function(e) { + return e + }, t.codespan = function(e) { + return e + }, t.del = function(e) { + return e + }, t.html = function(e) { + return e + }, t.text = function(e) { + return e + }, t.link = function(e, t, i) { + return "" + i + }, t.image = function(e, t, i) { + return "" + i + }, t.br = function() { + return "" + }, e + }(), + re = function() { + function e() { + this.seen = {} + } + var t = e.prototype; + return t.serialize = function(e) { + return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi, "").replace( + /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, + "").replace(/\s/g, "-") + }, t.getNextSafeSlug = function(e, t) { + var i = e, + n = 0; + if (this.seen.hasOwnProperty(i)) { + n = this.seen[e]; + do { + i = e + "-" + ++n + } while (this.seen.hasOwnProperty(i)) + } + return t || (this.seen[e] = n, this.seen[i] = 0), i + }, t.slug = function(e, t) { + void 0 === t && (t = {}); + var i = this.serialize(e); + return this.getNextSafeSlug(i, t.dryrun) + }, e + }(), + se = ne, + ae = oe, + le = re, + de = n.exports.defaults, + ce = S, + he = function() { + function e(e) { + this.options = e || de, this.options.renderer = this.options.renderer || + new se, this.renderer = this.options.renderer, this.renderer.options = + this.options, this.textRenderer = new ae, this.slugger = new le + } + e.parse = function(t, i) { + return new e(i).parse(t) + }, e.parseInline = function(t, i) { + return new e(i).parseInline(t) + }; + var t = e.prototype; + return t.parse = function(e, t) { + void 0 === t && (t = !0); + var i, n, o, r, s, a, l, d, c, h, u, g, p, m, f, _, b, v, w, C = "", + y = e.length; + for (i = 0; i < y; i++) + if (h = e[i], !(this.options.extensions && this.options.extensions + .renderers && this.options.extensions.renderers[h.type]) || !1 === + (w = this.options.extensions.renderers[h.type].call({ + parser: this + }, h)) && ["space", "hr", "heading", "code", "table", + "blockquote", "list", "html", "paragraph", "text" + ].includes(h.type)) switch (h.type) { + case "space": + continue; + case "hr": + C += this.renderer.hr(); + continue; + case "heading": + C += this.renderer.heading(this.parseInline(h.tokens), h.depth, + ce(this.parseInline(h.tokens, this.textRenderer)), this.slugger + ); + continue; + case "code": + C += this.renderer.code(h.text, h.lang, h.escaped); + continue; + case "table": + for (d = "", l = "", r = h.header.length, n = 0; n < r; n++) l += + this.renderer.tablecell(this.parseInline(h.header[n].tokens), { + header: !0, + align: h.align[n] + }); + for (d += this.renderer.tablerow(l), c = "", r = h.rows.length, + n = 0; n < r; n++) { + for (l = "", s = (a = h.rows[n]).length, o = 0; o < s; o++) l += + this.renderer.tablecell(this.parseInline(a[o].tokens), { + header: !1, + align: h.align[o] + }); + c += this.renderer.tablerow(l) + } + C += this.renderer.table(d, c); + continue; + case "blockquote": + c = this.parse(h.tokens), C += this.renderer.blockquote(c); + continue; + case "list": + for (u = h.ordered, g = h.start, p = h.loose, r = h.items.length, + c = "", n = 0; n < r; n++) _ = (f = h.items[n]).checked, b = f + .task, m = "", f.task && (v = this.renderer.checkbox(_), p ? f + .tokens.length > 0 && "paragraph" === f.tokens[0].type ? (f.tokens[ + 0].text = v + " " + f.tokens[0].text, f.tokens[0].tokens && + f.tokens[0].tokens.length > 0 && "text" === f.tokens[0].tokens[ + 0].type && (f.tokens[0].tokens[0].text = v + " " + f.tokens[ + 0].tokens[0].text)) : f.tokens.unshift({ + type: "text", + text: v + }) : m += v), m += this.parse(f.tokens, p), c += this.renderer + .listitem(m, b, _); + C += this.renderer.list(c, u, g); + continue; + case "html": + C += this.renderer.html(h.text); + continue; + case "paragraph": + C += this.renderer.paragraph(this.parseInline(h.tokens)); + continue; + case "text": + for (c = h.tokens ? this.parseInline(h.tokens) : h.text; i + 1 < + y && "text" === e[i + 1].type;) c += "\n" + ((h = e[++i]).tokens ? + this.parseInline(h.tokens) : h.text); + C += t ? this.renderer.paragraph(c) : c; + continue; + default: + var S = 'Token with "' + h.type + '" type was not found.'; + if (this.options.silent) return void console.error(S); + throw new Error(S) + } else C += w || ""; + return C + }, t.parseInline = function(e, t) { + t = t || this.renderer; + var i, n, o, r = "", + s = e.length; + for (i = 0; i < s; i++) + if (n = e[i], !(this.options.extensions && this.options.extensions + .renderers && this.options.extensions.renderers[n.type]) || !1 === + (o = this.options.extensions.renderers[n.type].call({ + parser: this + }, n)) && ["escape", "html", "link", "image", "strong", "em", + "codespan", "br", "del", "text" + ].includes(n.type)) switch (n.type) { + case "escape": + case "text": + r += t.text(n.text); + break; + case "html": + r += t.html(n.text); + break; + case "link": + r += t.link(n.href, n.title, this.parseInline(n.tokens, t)); + break; + case "image": + r += t.image(n.href, n.title, n.text); + break; + case "strong": + r += t.strong(this.parseInline(n.tokens, t)); + break; + case "em": + r += t.em(this.parseInline(n.tokens, t)); + break; + case "codespan": + r += t.codespan(n.text); + break; + case "br": + r += t.br(); + break; + case "del": + r += t.del(this.parseInline(n.tokens, t)); + break; + default: + var a = 'Token with "' + n.type + '" type was not found.'; + if (this.options.silent) return void console.error(a); + throw new Error(a) + } else r += o || ""; + return r + }, e + }(), + ue = J, + ge = he, + pe = W, + me = ne, + fe = oe, + _e = re, + be = N, + ve = T, + we = y, + Ce = n.exports.getDefaults, + ye = n.exports.changeDefaults, + Se = n.exports.defaults; + + function xe(e, t, i) { + if (null == e) throw new Error( + "marked(): input parameter is undefined or null"); + if ("string" != typeof e) throw new Error( + "marked(): input parameter is of type " + Object.prototype.toString.call( + e) + ", string expected"); + if ("function" == typeof t && (i = t, t = null), t = be({}, xe.defaults, + t || {}), ve(t), i) { + var n, o = t.highlight; + try { + n = ue.lex(e, t) + } catch (e) { + return i(e) + } + var r = function(e) { + var r; + if (!e) try { + t.walkTokens && xe.walkTokens(n, t.walkTokens), r = ge.parse(n, t) + } catch (t) { + e = t + } + return t.highlight = o, e ? i(e) : i(null, r) + }; + if (!o || o.length < 3) return r(); + if (delete t.highlight, !n.length) return r(); + var s = 0; + return xe.walkTokens(n, (function(e) { + "code" === e.type && (s++, setTimeout((function() { + o(e.text, e.lang, (function(t, i) { + if (t) return r(t); + null != i && i !== e.text && (e.text = i, e.escaped = !0), + 0 == --s && r() + })) + }), 0)) + })), void(0 === s && r()) + } + try { + var a = ue.lex(e, t); + return t.walkTokens && xe.walkTokens(a, t.walkTokens), ge.parse(a, t) + } catch (e) { + if (e.message += + "\nPlease report this to https://github.com/markedjs/marked.", t.silent + ) return "

    An error occurred:

    " + we(e.message + "", !0) +
    +								"
    "; + throw e + } + } + return xe.options = xe.setOptions = function(e) { + return be(xe.defaults, e), ye(xe.defaults), xe + }, xe.getDefaults = Ce, xe.defaults = Se, xe.use = function() { + for (var e = this, t = arguments.length, i = new Array(t), n = 0; n < + t; n++) i[n] = arguments[n]; + var o, r = be.apply(void 0, [{}].concat(i)), + s = xe.defaults.extensions || { + renderers: {}, + childTokens: {} + }; + i.forEach((function(t) { + if (t.extensions && (o = !0, t.extensions.forEach((function(e) { + if (!e.name) throw new Error("extension name required"); + if (e.renderer) { + var t = s.renderers ? s.renderers[e.name] : null; + s.renderers[e.name] = t ? function() { + for (var i = arguments.length, n = new Array(i), o = 0; o < + i; o++) n[o] = arguments[o]; + var r = e.renderer.apply(this, n); + return !1 === r && (r = t.apply(this, n)), r + } : e.renderer + } + if (e.tokenizer) { + if (!e.level || "block" !== e.level && "inline" !== e.level) + throw new Error( + "extension level must be 'block' or 'inline'"); + s[e.level] ? s[e.level].unshift(e.tokenizer) : s[e.level] = [ + e.tokenizer + ], e.start && ("block" === e.level ? s.startBlock ? s.startBlock + .push(e.start) : s.startBlock = [e.start] : "inline" === + e.level && (s.startInline ? s.startInline.push(e.start) : + s.startInline = [e.start])) + } + e.childTokens && (s.childTokens[e.name] = e.childTokens) + }))), t.renderer && function() { + var e = xe.defaults.renderer || new me, + i = function(i) { + var n = e[i]; + e[i] = function() { + for (var o = arguments.length, r = new Array(o), s = 0; s < + o; s++) r[s] = arguments[s]; + var a = t.renderer[i].apply(e, r); + return !1 === a && (a = n.apply(e, r)), a + } + }; + for (var n in t.renderer) i(n); + r.renderer = e + }(), t.tokenizer && function() { + var e = xe.defaults.tokenizer || new pe, + i = function(i) { + var n = e[i]; + e[i] = function() { + for (var o = arguments.length, r = new Array(o), s = 0; s < + o; s++) r[s] = arguments[s]; + var a = t.tokenizer[i].apply(e, r); + return !1 === a && (a = n.apply(e, r)), a + } + }; + for (var n in t.tokenizer) i(n); + r.tokenizer = e + }(), t.walkTokens) { + var i = xe.defaults.walkTokens; + r.walkTokens = function(n) { + t.walkTokens.call(e, n), i && i(n) + } + } + o && (r.extensions = s), xe.setOptions(r) + })) + }, xe.walkTokens = function(e, t) { + for (var n, o = function() { + var e = n.value; + switch (t(e), e.type) { + case "table": + for (var o, r = i(e.header); !(o = r()).done;) { + var s = o.value; + xe.walkTokens(s.tokens, t) + } + for (var a, l = i(e.rows); !(a = l()).done;) + for (var d, c = i(a.value); !(d = c()).done;) { + var h = d.value; + xe.walkTokens(h.tokens, t) + } + break; + case "list": + xe.walkTokens(e.items, t); + break; + default: + xe.defaults.extensions && xe.defaults.extensions.childTokens && + xe.defaults.extensions.childTokens[e.type] ? xe.defaults.extensions + .childTokens[e.type].forEach((function(i) { + xe.walkTokens(e[i], t) + })) : e.tokens && xe.walkTokens(e.tokens, t) + } + }, r = i(e); !(n = r()).done;) o() + }, xe.parseInline = function(e, t) { + if (null == e) throw new Error( + "marked.parseInline(): input parameter is undefined or null"); + if ("string" != typeof e) throw new Error( + "marked.parseInline(): input parameter is of type " + Object.prototype + .toString.call(e) + ", string expected"); + t = be({}, xe.defaults, t || {}), ve(t); + try { + var i = ue.lexInline(e, t); + return t.walkTokens && xe.walkTokens(i, t.walkTokens), ge.parseInline( + i, t) + } catch (e) { + if (e.message += + "\nPlease report this to https://github.com/markedjs/marked.", t.silent + ) return "

    An error occurred:

    " + we(e.message + "", !0) +
    +									"
    "; + throw e + } + }, xe.Parser = ge, xe.parser = ge.parse, xe.Renderer = me, xe.TextRenderer = + fe, xe.Lexer = ue, xe.lexer = ue.lex, xe.Tokenizer = pe, xe.Slugger = + _e, xe.parse = xe, xe + }() + }, + 3897: (e, t, i) => { + "use strict"; + i.d(t, { + Q: () => r + }); + var n = i(3060), + o = i(666); + + function r(e) { + let t = JSON.parse(e); + return t = s(t), t + } + + function s(e, t = 0) { + if (!e || t > 200) return e; + if ("object" == typeof e) { + switch (e.$mid) { + case 1: + return o.o.revive(e); + case 2: + return new RegExp(e.source, e.flags) + } + if (e instanceof n.KN || e instanceof Uint8Array) return e; + if (Array.isArray(e)) + for (let i = 0; i < e.length; ++i) e[i] = s(e[i], t + 1); + else + for (const i in e) Object.hasOwnProperty.call(e, i) && (e[i] = s(e[i], + t + 1)) + } + return e + } + }, + 1170: (e, t, i) => { + "use strict"; + i.d(t, { + vW: () => n, + sA: () => u, + G8: () => g + }); + var n, o = i(4118), + r = i(6663), + s = i(8721), + a = i(5935), + l = i(7295); + ! function(e) { + e.text = "text/plain", e.binary = "application/octet-stream", e.unknown = + "application/unknown", e.markdown = "text/markdown" + }(n || (n = {})); + let d = [], + c = [], + h = []; + + function u(e, t = !1) { + const i = function(e) { + return { + id: e.id, + mime: e.mime, + filename: e.filename, + extension: e.extension, + filepattern: e.filepattern, + firstline: e.firstline, + userConfigured: e.userConfigured, + filenameLowercase: e.filename ? e.filename.toLowerCase() : void 0, + extensionLowercase: e.extension ? e.extension.toLowerCase() : void 0, + filepatternLowercase: e.filepattern ? (0, o.Qc)(e.filepattern.toLowerCase()) : void 0, + filepatternOnPath: !!e.filepattern && e.filepattern.indexOf(s.KR.sep) >= + 0 + } + }(e); + d.push(i), i.userConfigured ? h.push(i) : c.push(i), t && !i.userConfigured && + d.forEach((e => { + e.mime === i.mime || e.userConfigured || (i.extension && e.extension === + i.extension && console.warn( + `Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>` + ), i.filename && e.filename === i.filename && console.warn( + `Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>` + ), i.filepattern && e.filepattern === i.filepattern && console.warn( + `Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>` + ), i.firstline && e.firstline === i.firstline && console.warn( + `Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>` + )) + })) + } + + function g(e, t) { + let i; + if (e) switch (e.scheme) { + case r.lg.file: + i = e.fsPath; + break; + case r.lg.data: + i = a.Vb.parseMetaData(e).get(a.Vb.META_DATA_LABEL); + break; + default: + i = e.path + } + if (!i) return [n.unknown]; + i = i.toLowerCase(); + const o = (0, s.EZ)(i), + u = p(i, o, h); + if (u) return [u, n.text]; + const g = p(i, o, c); + if (g) return [g, n.text]; + if (t) { + const e = function(e) { + if ((0, l.uS)(e) && (e = e.substr(1)), e.length > 0) + for (let t = d.length - 1; t >= 0; t--) { + const i = d[t]; + if (!i.firstline) continue; + const n = e.match(i.firstline); + if (n && n.length > 0) return i.mime + } + return null + }(t); + if (e) return [e, n.text] + } + return [n.unknown] + } + + function p(e, t, i) { + var n; + let o = null, + r = null, + s = null; + for (let a = i.length - 1; a >= 0; a--) { + const l = i[a]; + if (t === l.filenameLowercase) { + o = l; + break + } + if (l.filepattern && (!r || l.filepattern.length > r.filepattern.length)) { + const i = l.filepatternOnPath ? e : t; + (null === (n = l.filepatternLowercase) || void 0 === n ? void 0 : n.call( + l, i)) && (r = l) + } + l.extension && (!s || l.extension.length > s.extension.length) && t.endsWith( + l.extensionLowercase) && (s = l) + } + return o ? o.mime : r ? r.mime : s ? s.mime : null + } + }, + 6663: (e, t, i) => { + "use strict"; + i.d(t, { + lg: () => n, + WX: () => s, + Gi: () => l + }); + var n, o = i(1432), + r = i(666); + ! function(e) { + e.inMemory = "inmemory", e.vscode = "vscode", e.internal = "private", e.walkThrough = + "walkThrough", e.walkThroughSnippet = "walkThroughSnippet", e.http = + "http", e.https = "https", e.file = "file", e.mailto = "mailto", e.untitled = + "untitled", e.data = "data", e.command = "command", e.vscodeRemote = + "vscode-remote", e.vscodeRemoteResource = "vscode-remote-resource", e.userData = + "vscode-userdata", e.vscodeCustomEditor = "vscode-custom-editor", e.vscodeNotebook = + "vscode-notebook", e.vscodeNotebookCell = "vscode-notebook-cell", e.vscodeNotebookCellMetadata = + "vscode-notebook-cell-metadata", e.vscodeNotebookCellOutput = + "vscode-notebook-cell-output", e.vscodeInteractive = + "vscode-interactive", e.vscodeInteractiveInput = + "vscode-interactive-input", e.vscodeSettings = "vscode-settings", e.vscodeWorkspaceTrust = + "vscode-workspace-trust", e.vscodeTerminal = "vscode-terminal", e.webviewPanel = + "webview-panel", e.vscodeWebview = "vscode-webview", e.extension = + "extension", e.vscodeFileResource = "vscode-file", e.tmp = "tmp" + }(n || (n = {})); + const s = new class { + constructor() { + this._hosts = Object.create(null), this._ports = Object.create(null), + this._connectionTokens = Object.create(null), this._preferredWebSchema = + "http", this._delegate = null + } + setPreferredWebSchema(e) { + this._preferredWebSchema = e + } + rewrite(e) { + if (this._delegate) return this._delegate(e); + const t = e.authority; + let i = this._hosts[t]; + i && -1 !== i.indexOf(":") && (i = `[${i}]`); + const s = this._ports[t], + a = this._connectionTokens[t]; + let l = `path=${encodeURIComponent(e.path)}`; + return "string" == typeof a && (l += `&tkn=${encodeURIComponent(a)}`), + r.o.from({ + scheme: o.$L ? this._preferredWebSchema : n.vscodeRemoteResource, + authority: `${i}:${s}`, + path: "/vscode-remote-resource", + query: l + }) + } + }; + class a { + asBrowserUri(e, t) { + const i = this.toUri(e, t); + return i.scheme === n.vscodeRemote ? s.rewrite(i) : i.scheme === n.file && + (o.tY || "function" == typeof o.li.importScripts && o.li.origin === + `${n.vscodeFileResource}://${a.FALLBACK_AUTHORITY}`) ? i.with({ + scheme: n.vscodeFileResource, + authority: i.authority || a.FALLBACK_AUTHORITY, + query: null, + fragment: null + }) : i + } + toUri(e, t) { + return r.o.isUri(e) ? e : r.o.parse(t.toUrl(e)) + } + } + a.FALLBACK_AUTHORITY = "vscode-app"; + const l = new a + }, + 9870: (e, t, i) => { + "use strict"; + + function n(e, t, i) { + return Math.min(Math.max(e, t), i) + } + i.d(t, { + u: () => n, + n: () => o + }); + class o { + constructor() { + this._n = 1, this._val = 0 + } + update(e) { + return this._val = this._val + (e - this._val) / this._n, this._n += 1, + this + } + get value() { + return this._val + } + } + }, + 6248: (e, t, i) => { + "use strict"; + i.d(t, { + I8: () => o, + _A: () => r, + rs: () => a, + jB: () => d, + fS: () => c, + CJ: () => h + }); + var n = i(8401); + + function o(e) { + if (!e || "object" != typeof e) return e; + if (e instanceof RegExp) return e; + const t = Array.isArray(e) ? [] : {}; + return Object.keys(e).forEach((i => { + e[i] && "object" == typeof e[i] ? t[i] = o(e[i]) : t[i] = e[i] + })), t + } + + function r(e) { + if (!e || "object" != typeof e) return e; + const t = [e]; + for (; t.length > 0;) { + const e = t.shift(); + Object.freeze(e); + for (const i in e) + if (s.call(e, i)) { + const n = e[i]; + "object" != typeof n || Object.isFrozen(n) || t.push(n) + } + } + return e + } + const s = Object.prototype.hasOwnProperty; + + function a(e, t) { + return l(e, t, new Set) + } + + function l(e, t, i) { + if ((0, n.Jp)(e)) return e; + const o = t(e); + if (void 0 !== o) return o; + if ((0, n.kJ)(e)) { + const n = []; + for (const o of e) n.push(l(o, t, i)); + return n + } + if ((0, n.Kn)(e)) { + if (i.has(e)) throw new Error("Cannot clone recursive data-structure"); + i.add(e); + const n = {}; + for (let o in e) s.call(e, o) && (n[o] = l(e[o], t, i)); + return i.delete(e), n + } + return e + } + + function d(e, t, i = !0) { + return (0, n.Kn)(e) ? ((0, n.Kn)(t) && Object.keys(t).forEach((o => { + o in e ? i && ((0, n.Kn)(e[o]) && (0, n.Kn)(t[o]) ? d(e[o], t[o], i) : + e[o] = t[o]) : e[o] = t[o] + })), e) : t + } + + function c(e, t) { + if (e === t) return !0; + if (null == e || null == t) return !1; + if (typeof e != typeof t) return !1; + if ("object" != typeof e) return !1; + if (Array.isArray(e) !== Array.isArray(t)) return !1; + let i, n; + if (Array.isArray(e)) { + if (e.length !== t.length) return !1; + for (i = 0; i < e.length; i++) + if (!c(e[i], t[i])) return !1 + } else { + const o = []; + for (n in e) o.push(n); + o.sort(); + const r = []; + for (n in t) r.push(n); + if (r.sort(), !c(o, r)) return !1; + for (i = 0; i < o.length; i++) + if (!c(e[o[i]], t[o[i]])) return !1 + } + return !0 + } + + function h(e, t, i) { + const n = t(e); + return void 0 === n ? i : n + } + }, + 8721: (e, t, i) => { + "use strict"; + i.d(t, { + EZ: () => k, + XX: () => x, + DZ: () => L, + Fv: () => C, + KR: () => w, + Gf: () => S, + DB: () => y, + ir: () => N, + Ku: () => v + }); + var n = i(1432); + let o; + if (void 0 !== n.li.vscode && void 0 !== n.li.vscode.process) { + const e = n.li.vscode.process; + o = {get platform() { + return e.platform + }, + get arch() { + return e.arch + }, + get env() { + return e.env + }, + cwd: () => e.cwd(), + nextTick: e => (0, n.xS)(e) + } + } else o = "undefined" != typeof process ? {get platform() { + return process.platform + }, + get arch() { + return process.arch + }, + get env() { + return process.env + }, + cwd: () => process.env.VSCODE_CWD || process.cwd(), + nextTick: e => process.nextTick(e) + } : {get platform() { + return n.ED ? "win32" : n.dz ? "darwin" : "linux" + }, + get arch() {}, + nextTick: e => (0, n.xS)(e), + get env() { + return {} + }, + cwd: () => "/" + }; + const r = o.cwd, + s = o.env, + a = o.platform, + l = 46, + d = 47, + c = 92, + h = 58; + class u extends Error { + constructor(e, t, i) { + let n; + "string" == typeof t && 0 === t.indexOf("not ") ? (n = "must not be", + t = t.replace(/^not /, "")) : n = "must be"; + const o = -1 !== e.indexOf(".") ? "property" : "argument"; + let r = `The "${e}" ${o} ${n} of type ${t}`; + r += ". Received type " + typeof i, super(r), this.code = + "ERR_INVALID_ARG_TYPE" + } + } + + function g(e, t) { + if ("string" != typeof e) throw new u(t, "string", e) + } + + function p(e) { + return e === d || e === c + } + + function m(e) { + return e === d + } + + function f(e) { + return e >= 65 && e <= 90 || e >= 97 && e <= 122 + } + + function _(e, t, i, n) { + let o = "", + r = 0, + s = -1, + a = 0, + c = 0; + for (let h = 0; h <= e.length; ++h) { + if (h < e.length) c = e.charCodeAt(h); + else { + if (n(c)) break; + c = d + } + if (n(c)) { + if (s === h - 1 || 1 === a); + else if (2 === a) { + if (o.length < 2 || 2 !== r || o.charCodeAt(o.length - 1) !== l || o.charCodeAt( + o.length - 2) !== l) { + if (o.length > 2) { + const e = o.lastIndexOf(i); - 1 === e ? (o = "", r = 0) : (o = o.slice( + 0, e), r = o.length - 1 - o.lastIndexOf(i)), s = h, a = 0; + continue + } + if (0 !== o.length) { + o = "", r = 0, s = h, a = 0; + continue + } + } + t && (o += o.length > 0 ? `${i}..` : "..", r = 2) + } else o.length > 0 ? o += `${i}${e.slice(s+1,h)}` : o = e.slice(s + 1, + h), r = h - s - 1; + s = h, a = 0 + } else c === l && -1 !== a ? ++a : a = -1 + } + return o + } + + function b(e, t) { + if (null === t || "object" != typeof t) throw new u("pathObject", + "Object", t); + const i = t.dir || t.root, + n = t.base || `${t.name||""}${t.ext||""}`; + return i ? i === t.root ? `${i}${n}` : `${i}${e}${n}` : n + } + const v = { + resolve(...e) { + let t = "", + i = "", + n = !1; + for (let o = e.length - 1; o >= -1; o--) { + let a; + if (o >= 0) { + if (a = e[o], g(a, "path"), 0 === a.length) continue + } else 0 === t.length ? a = r() : (a = s[`=${t}`] || r(), (void 0 === + a || a.slice(0, 2).toLowerCase() !== t.toLowerCase() && a.charCodeAt( + 2) === c) && (a = `${t}\\`)); + const l = a.length; + let d = 0, + u = "", + m = !1; + const _ = a.charCodeAt(0); + if (1 === l) p(_) && (d = 1, m = !0); + else if (p(_)) + if (m = !0, p(a.charCodeAt(1))) { + let e = 2, + t = e; + for (; e < l && !p(a.charCodeAt(e));) e++; + if (e < l && e !== t) { + const i = a.slice(t, e); + for (t = e; e < l && p(a.charCodeAt(e));) e++; + if (e < l && e !== t) { + for (t = e; e < l && !p(a.charCodeAt(e));) e++; + e !== l && e === t || (u = `\\\\${i}\\${a.slice(t,e)}`, d = e) + } + } + } else d = 1; + else f(_) && a.charCodeAt(1) === h && (u = a.slice(0, 2), d = 2, l > + 2 && p(a.charCodeAt(2)) && (m = !0, d = 3)); + if (u.length > 0) + if (t.length > 0) { + if (u.toLowerCase() !== t.toLowerCase()) continue + } else t = u; + if (n) { + if (t.length > 0) break + } else if (i = `${a.slice(d)}\\${i}`, n = m, m && t.length > 0) break + } + return i = _(i, !n, "\\", p), n ? `${t}\\${i}` : `${t}${i}` || "." + }, normalize(e) { + g(e, "path"); + const t = e.length; + if (0 === t) return "."; + let i, n = 0, + o = !1; + const r = e.charCodeAt(0); + if (1 === t) return m(r) ? "\\" : e; + if (p(r)) + if (o = !0, p(e.charCodeAt(1))) { + let o = 2, + r = o; + for (; o < t && !p(e.charCodeAt(o));) o++; + if (o < t && o !== r) { + const s = e.slice(r, o); + for (r = o; o < t && p(e.charCodeAt(o));) o++; + if (o < t && o !== r) { + for (r = o; o < t && !p(e.charCodeAt(o));) o++; + if (o === t) return `\\\\${s}\\${e.slice(r)}\\`; + o !== r && (i = `\\\\${s}\\${e.slice(r,o)}`, n = o) + } + } + } else n = 1; + else f(r) && e.charCodeAt(1) === h && (i = e.slice(0, 2), n = 2, t > + 2 && p(e.charCodeAt(2)) && (o = !0, n = 3)); + let s = n < t ? _(e.slice(n), !o, "\\", p) : ""; + return 0 !== s.length || o || (s = "."), s.length > 0 && p(e.charCodeAt( + t - 1)) && (s += "\\"), void 0 === i ? o ? `\\${s}` : s : o ? + `${i}\\${s}` : `${i}${s}` + }, isAbsolute(e) { + g(e, "path"); + const t = e.length; + if (0 === t) return !1; + const i = e.charCodeAt(0); + return p(i) || t > 2 && f(i) && e.charCodeAt(1) === h && p(e.charCodeAt( + 2)) + }, join(...e) { + if (0 === e.length) return "."; + let t, i; + for (let n = 0; n < e.length; ++n) { + const o = e[n]; + g(o, "path"), o.length > 0 && (void 0 === t ? t = i = o : t += + `\\${o}`) + } + if (void 0 === t) return "."; + let n = !0, + o = 0; + if ("string" == typeof i && p(i.charCodeAt(0))) { + ++o; + const e = i.length; + e > 1 && p(i.charCodeAt(1)) && (++o, e > 2 && (p(i.charCodeAt(2)) ? + ++o : n = !1)) + } + if (n) { + for (; o < t.length && p(t.charCodeAt(o));) o++; + o >= 2 && (t = `\\${t.slice(o)}`) + } + return v.normalize(t) + }, relative(e, t) { + if (g(e, "from"), g(t, "to"), e === t) return ""; + const i = v.resolve(e), + n = v.resolve(t); + if (i === n) return ""; + if ((e = i.toLowerCase()) === (t = n.toLowerCase())) return ""; + let o = 0; + for (; o < e.length && e.charCodeAt(o) === c;) o++; + let r = e.length; + for (; r - 1 > o && e.charCodeAt(r - 1) === c;) r--; + const s = r - o; + let a = 0; + for (; a < t.length && t.charCodeAt(a) === c;) a++; + let l = t.length; + for (; l - 1 > a && t.charCodeAt(l - 1) === c;) l--; + const d = l - a, + h = s < d ? s : d; + let u = -1, + p = 0; + for (; p < h; p++) { + const i = e.charCodeAt(o + p); + if (i !== t.charCodeAt(a + p)) break; + i === c && (u = p) + } + if (p !== h) { + if (-1 === u) return n + } else { + if (d > h) { + if (t.charCodeAt(a + p) === c) return n.slice(a + p + 1); + if (2 === p) return n.slice(a + p) + } + s > h && (e.charCodeAt(o + p) === c ? u = p : 2 === p && (u = 3)), - + 1 === u && (u = 0) + } + let m = ""; + for (p = o + u + 1; p <= r; ++p) p !== r && e.charCodeAt(p) !== c || + (m += 0 === m.length ? ".." : "\\.."); + return a += u, m.length > 0 ? `${m}${n.slice(a,l)}` : (n.charCodeAt(a) === + c && ++a, n.slice(a, l)) + }, toNamespacedPath(e) { + if ("string" != typeof e) return e; + if (0 === e.length) return ""; + const t = v.resolve(e); + if (t.length <= 2) return e; + if (t.charCodeAt(0) === c) { + if (t.charCodeAt(1) === c) { + const e = t.charCodeAt(2); + if (63 !== e && e !== l) return `\\\\?\\UNC\\${t.slice(2)}` + } + } else if (f(t.charCodeAt(0)) && t.charCodeAt(1) === h && t.charCodeAt( + 2) === c) return `\\\\?\\${t}`; + return e + }, dirname(e) { + g(e, "path"); + const t = e.length; + if (0 === t) return "."; + let i = -1, + n = 0; + const o = e.charCodeAt(0); + if (1 === t) return p(o) ? e : "."; + if (p(o)) { + if (i = n = 1, p(e.charCodeAt(1))) { + let o = 2, + r = o; + for (; o < t && !p(e.charCodeAt(o));) o++; + if (o < t && o !== r) { + for (r = o; o < t && p(e.charCodeAt(o));) o++; + if (o < t && o !== r) { + for (r = o; o < t && !p(e.charCodeAt(o));) o++; + if (o === t) return e; + o !== r && (i = n = o + 1) + } + } + } + } else f(o) && e.charCodeAt(1) === h && (i = t > 2 && p(e.charCodeAt( + 2)) ? 3 : 2, n = i); + let r = -1, + s = !0; + for (let i = t - 1; i >= n; --i) + if (p(e.charCodeAt(i))) { + if (!s) { + r = i; + break + } + } else s = !1; + if (-1 === r) { + if (-1 === i) return "."; + r = i + } + return e.slice(0, r) + }, basename(e, t) { + void 0 !== t && g(t, "ext"), g(e, "path"); + let i, n = 0, + o = -1, + r = !0; + if (e.length >= 2 && f(e.charCodeAt(0)) && e.charCodeAt(1) === h && ( + n = 2), void 0 !== t && t.length > 0 && t.length <= e.length) { + if (t === e) return ""; + let s = t.length - 1, + a = -1; + for (i = e.length - 1; i >= n; --i) { + const l = e.charCodeAt(i); + if (p(l)) { + if (!r) { + n = i + 1; + break + } + } else -1 === a && (r = !1, a = i + 1), s >= 0 && (l === t.charCodeAt( + s) ? -1 == --s && (o = i) : (s = -1, o = a)) + } + return n === o ? o = a : -1 === o && (o = e.length), e.slice(n, o) + } + for (i = e.length - 1; i >= n; --i) + if (p(e.charCodeAt(i))) { + if (!r) { + n = i + 1; + break + } + } else -1 === o && (r = !1, o = i + 1); + return -1 === o ? "" : e.slice(n, o) + }, extname(e) { + g(e, "path"); + let t = 0, + i = -1, + n = 0, + o = -1, + r = !0, + s = 0; + e.length >= 2 && e.charCodeAt(1) === h && f(e.charCodeAt(0)) && (t = + n = 2); + for (let a = e.length - 1; a >= t; --a) { + const t = e.charCodeAt(a); + if (p(t)) { + if (!r) { + n = a + 1; + break + } + } else -1 === o && (r = !1, o = a + 1), t === l ? -1 === i ? i = a : + 1 !== s && (s = 1) : -1 !== i && (s = -1) + } + return -1 === i || -1 === o || 0 === s || 1 === s && i === o - 1 && i === + n + 1 ? "" : e.slice(i, o) + }, format: b.bind(null, "\\"), parse(e) { + g(e, "path"); + const t = { + root: "", + dir: "", + base: "", + ext: "", + name: "" + }; + if (0 === e.length) return t; + const i = e.length; + let n = 0, + o = e.charCodeAt(0); + if (1 === i) return p(o) ? (t.root = t.dir = e, t) : (t.base = t.name = + e, t); + if (p(o)) { + if (n = 1, p(e.charCodeAt(1))) { + let t = 2, + o = t; + for (; t < i && !p(e.charCodeAt(t));) t++; + if (t < i && t !== o) { + for (o = t; t < i && p(e.charCodeAt(t));) t++; + if (t < i && t !== o) { + for (o = t; t < i && !p(e.charCodeAt(t));) t++; + t === i ? n = t : t !== o && (n = t + 1) + } + } + } + } else if (f(o) && e.charCodeAt(1) === h) { + if (i <= 2) return t.root = t.dir = e, t; + if (n = 2, p(e.charCodeAt(2))) { + if (3 === i) return t.root = t.dir = e, t; + n = 3 + } + } + n > 0 && (t.root = e.slice(0, n)); + let r = -1, + s = n, + a = -1, + d = !0, + c = e.length - 1, + u = 0; + for (; c >= n; --c) + if (o = e.charCodeAt(c), p(o)) { + if (!d) { + s = c + 1; + break + } + } else -1 === a && (d = !1, a = c + 1), o === l ? -1 === r ? r = c : + 1 !== u && (u = 1) : -1 !== r && (u = -1); + return -1 !== a && (-1 === r || 0 === u || 1 === u && r === a - 1 && + r === s + 1 ? t.base = t.name = e.slice(s, a) : (t.name = e.slice(s, + r), t.base = e.slice(s, a), t.ext = e.slice(r, a))), t.dir = s > 0 && + s !== n ? e.slice(0, s - 1) : t.root, t + }, sep: "\\", delimiter: ";", win32: null, posix: null + }, + w = { + resolve(...e) { + let t = "", + i = !1; + for (let n = e.length - 1; n >= -1 && !i; n--) { + const o = n >= 0 ? e[n] : r(); + g(o, "path"), 0 !== o.length && (t = `${o}/${t}`, i = o.charCodeAt(0) === + d) + } + return t = _(t, !i, "/", m), i ? `/${t}` : t.length > 0 ? t : "." + }, normalize(e) { + if (g(e, "path"), 0 === e.length) return "."; + const t = e.charCodeAt(0) === d, + i = e.charCodeAt(e.length - 1) === d; + return 0 === (e = _(e, !t, "/", m)).length ? t ? "/" : i ? "./" : "." : + (i && (e += "/"), t ? `/${e}` : e) + }, isAbsolute: e => (g(e, "path"), e.length > 0 && e.charCodeAt(0) === + d), join(...e) { + if (0 === e.length) return "."; + let t; + for (let i = 0; i < e.length; ++i) { + const n = e[i]; + g(n, "path"), n.length > 0 && (void 0 === t ? t = n : t += `/${n}`) + } + return void 0 === t ? "." : w.normalize(t) + }, relative(e, t) { + if (g(e, "from"), g(t, "to"), e === t) return ""; + if ((e = w.resolve(e)) === (t = w.resolve(t))) return ""; + const i = e.length, + n = i - 1, + o = t.length - 1, + r = n < o ? n : o; + let s = -1, + a = 0; + for (; a < r; a++) { + const i = e.charCodeAt(1 + a); + if (i !== t.charCodeAt(1 + a)) break; + i === d && (s = a) + } + if (a === r) + if (o > r) { + if (t.charCodeAt(1 + a) === d) return t.slice(1 + a + 1); + if (0 === a) return t.slice(1 + a) + } else n > r && (e.charCodeAt(1 + a) === d ? s = a : 0 === a && (s = + 0)); + let l = ""; + for (a = 1 + s + 1; a <= i; ++a) a !== i && e.charCodeAt(a) !== d || + (l += 0 === l.length ? ".." : "/.."); + return `${l}${t.slice(1+s)}` + }, toNamespacedPath: e => e, dirname(e) { + if (g(e, "path"), 0 === e.length) return "."; + const t = e.charCodeAt(0) === d; + let i = -1, + n = !0; + for (let t = e.length - 1; t >= 1; --t) + if (e.charCodeAt(t) === d) { + if (!n) { + i = t; + break + } + } else n = !1; + return -1 === i ? t ? "/" : "." : t && 1 === i ? "//" : e.slice(0, i) + }, basename(e, t) { + void 0 !== t && g(t, "ext"), g(e, "path"); + let i, n = 0, + o = -1, + r = !0; + if (void 0 !== t && t.length > 0 && t.length <= e.length) { + if (t === e) return ""; + let s = t.length - 1, + a = -1; + for (i = e.length - 1; i >= 0; --i) { + const l = e.charCodeAt(i); + if (l === d) { + if (!r) { + n = i + 1; + break + } + } else -1 === a && (r = !1, a = i + 1), s >= 0 && (l === t.charCodeAt( + s) ? -1 == --s && (o = i) : (s = -1, o = a)) + } + return n === o ? o = a : -1 === o && (o = e.length), e.slice(n, o) + } + for (i = e.length - 1; i >= 0; --i) + if (e.charCodeAt(i) === d) { + if (!r) { + n = i + 1; + break + } + } else -1 === o && (r = !1, o = i + 1); + return -1 === o ? "" : e.slice(n, o) + }, extname(e) { + g(e, "path"); + let t = -1, + i = 0, + n = -1, + o = !0, + r = 0; + for (let s = e.length - 1; s >= 0; --s) { + const a = e.charCodeAt(s); + if (a !== d) - 1 === n && (o = !1, n = s + 1), a === l ? -1 === t ? + t = s : 1 !== r && (r = 1) : -1 !== t && (r = -1); + else if (!o) { + i = s + 1; + break + } + } + return -1 === t || -1 === n || 0 === r || 1 === r && t === n - 1 && t === + i + 1 ? "" : e.slice(t, n) + }, format: b.bind(null, "/"), parse(e) { + g(e, "path"); + const t = { + root: "", + dir: "", + base: "", + ext: "", + name: "" + }; + if (0 === e.length) return t; + const i = e.charCodeAt(0) === d; + let n; + i ? (t.root = "/", n = 1) : n = 0; + let o = -1, + r = 0, + s = -1, + a = !0, + c = e.length - 1, + h = 0; + for (; c >= n; --c) { + const t = e.charCodeAt(c); + if (t !== d) - 1 === s && (a = !1, s = c + 1), t === l ? -1 === o ? + o = c : 1 !== h && (h = 1) : -1 !== o && (h = -1); + else if (!a) { + r = c + 1; + break + } + } + if (-1 !== s) { + const n = 0 === r && i ? 1 : r; - 1 === o || 0 === h || 1 === h && o === + s - 1 && o === r + 1 ? t.base = t.name = e.slice(n, s) : (t.name = + e.slice(n, o), t.base = e.slice(n, s), t.ext = e.slice(o, s)) + } + return r > 0 ? t.dir = e.slice(0, r - 1) : i && (t.dir = "/"), t + }, sep: "/", delimiter: ":", win32: null, posix: null + }; + w.win32 = v.win32 = v, w.posix = v.posix = w; + const C = "win32" === a ? v.normalize : w.normalize, + y = "win32" === a ? v.resolve : w.resolve, + S = "win32" === a ? v.relative : w.relative, + x = "win32" === a ? v.dirname : w.dirname, + k = "win32" === a ? v.basename : w.basename, + L = "win32" === a ? v.extname : w.extname, + N = "win32" === a ? v.sep : w.sep + }, + 1432: (e, t, i) => { + "use strict"; + var n; + i.d(t, { + li: () => f, + ED: () => w, + dz: () => C, + IJ: () => y, + tY: () => S, + $L: () => x, + gn: () => k, + WE: () => L, + xS: () => N, + OS: () => D, + r: () => T + }); + const o = "en"; + let r, s, a, l = !1, + d = !1, + c = !1, + h = !1, + u = !1, + g = !1, + p = !1, + m = null; + const f = "object" == typeof self ? self : "object" == typeof i.g ? i.g : {}; + let _; + void 0 !== f.vscode && void 0 !== f.vscode.process ? _ = f.vscode.process : + "undefined" != typeof process && (_ = process); + const b = "string" == typeof(null === (n = null == _ ? void 0 : _.versions) || + void 0 === n ? void 0 : n.electron) && "renderer" === _.type; + if ("object" != typeof navigator || b) + if ("object" == typeof _) { + l = "win32" === _.platform, d = "darwin" === _.platform, c = "linux" === + _.platform, h = c && !!_.env.SNAP && !!_.env.SNAP_REVISION, r = o, m = + o; + const e = _.env.VSCODE_NLS_CONFIG; + if (e) try { + const t = JSON.parse(e), + i = t.availableLanguages["*"]; + r = t.locale, m = i || o, s = t._translationsConfigFile + } catch (e) {} + u = !0 + } else console.error("Unable to resolve platform."); + else a = navigator.userAgent, l = a.indexOf("Windows") >= 0, d = a.indexOf( + "Macintosh") >= 0, p = (a.indexOf("Macintosh") >= 0 || a.indexOf("iPad") >= + 0 || a.indexOf("iPhone") >= 0) && !!navigator.maxTouchPoints && + navigator.maxTouchPoints > 0, c = a.indexOf("Linux") >= 0, g = !0, r = + navigator.language, m = r; + let v = 0; + d ? v = 1 : l ? v = 3 : c && (v = 2); + const w = l, + C = d, + y = c, + S = u, + x = g, + k = p, + L = a, + N = function() { + if (f.setImmediate) return f.setImmediate.bind(f); + if ("function" == typeof f.postMessage && !f.importScripts) { + let e = []; + f.addEventListener("message", (t => { + if (t.data && t.data.vscodeSetImmediateId) + for (let i = 0, n = e.length; i < n; i++) { + const n = e[i]; + if (n.id === t.data.vscodeSetImmediateId) return e.splice(i, 1), + void n.callback() + } + })); + let t = 0; + return i => { + const n = ++t; + e.push({ + id: n, + callback: i + }), f.postMessage({ + vscodeSetImmediateId: n + }, "*") + } + } + if ("function" == typeof(null == _ ? void 0 : _.nextTick)) return _.nextTick + .bind(_); + const e = Promise.resolve(); + return t => e.then(t) + }(), + D = d || p ? 2 : l ? 1 : 3; + let E = !0, + I = !1; + + function T() { + if (!I) { + I = !0; + const e = new Uint8Array(2); + e[0] = 1, e[1] = 2; + const t = new Uint16Array(e.buffer); + E = 513 === t[0] + } + return E + } + }, + 1134: (e, t, i) => { + "use strict"; + var n; + i.d(t, { + e: () => n + }), + function(e) { + function t(e, t) { + if (e.start >= t.end || t.start >= e.end) return { + start: 0, + end: 0 + }; + const i = Math.max(e.start, t.start), + n = Math.min(e.end, t.end); + return n - i <= 0 ? { + start: 0, + end: 0 + } : { + start: i, + end: n + } + } + + function i(e) { + return e.end - e.start <= 0 + } + e.intersect = t, e.isEmpty = i, e.intersects = function(e, n) { + return !i(t(e, n)) + }, e.relativeComplement = function(e, t) { + const n = [], + o = { + start: e.start, + end: Math.min(t.start, e.end) + }, + r = { + start: Math.max(t.end, e.start), + end: e.end + }; + return i(o) || n.push(o), i(r) || n.push(r), n + } + }(n || (n = {})) + }, + 5935: (e, t, i) => { + "use strict"; + i.d(t, { + z_: () => l, + SF: () => d, + Xy: () => c, + Hx: () => h, + EZ: () => u, + XX: () => g, + Vo: () => p, + AH: () => m, + i3: () => f, + Vb: () => _ + }); + var n = i(5527), + o = i(6663), + r = i(8721), + s = i(7295), + a = i(666); + + function l(e) { + return (0, a.q)(e, !0) + } + const d = new class { + constructor(e) { + this._ignorePathCasing = e + } + compare(e, t, i = !1) { + return e === t ? 0 : (0, s.qu)(this.getComparisonKey(e, i), this.getComparisonKey( + t, i)) + } + isEqual(e, t, i = !1) { + return e === t || !(!e || !t) && this.getComparisonKey(e, i) === this + .getComparisonKey(t, i) + } + getComparisonKey(e, t = !1) { + return e.with({ + path: this._ignorePathCasing(e) ? e.path.toLowerCase() : void 0, + fragment: t ? null : void 0 + }).toString() + } + joinPath(e, ...t) { + return a.o.joinPath(e, ...t) + } + basenameOrAuthority(e) { + return u(e) || e.authority + } + basename(e) { + return r.KR.basename(e.path) + } + dirname(e) { + if (0 === e.path.length) return e; + let t; + return e.scheme === o.lg.file ? t = a.o.file(r.XX(l(e))).path : (t = + r.KR.dirname(e.path), e.authority && t.length && 47 !== t.charCodeAt( + 0) && (console.error( + `dirname("${e.toString})) resulted in a relative path`), t = "/")), + e.with({ + path: t + }) + } + normalizePath(e) { + if (!e.path.length) return e; + let t; + return t = e.scheme === o.lg.file ? a.o.file(r.Fv(l(e))).path : r.KR.normalize( + e.path), e.with({ + path: t + }) + } + resolvePath(e, t) { + if (e.scheme === o.lg.file) { + const i = a.o.file(r.DB(l(e), t)); + return e.with({ + authority: i.authority, + path: i.path + }) + } + return t = n.fn(t), e.with({ + path: r.KR.resolve(e.path, t) + }) + } + }((() => !1)), + c = d.isEqual.bind(d), + h = d.basenameOrAuthority.bind(d), + u = d.basename.bind(d), + g = d.dirname.bind(d), + p = d.joinPath.bind(d), + m = d.normalizePath.bind(d), + f = d.resolvePath.bind(d); + var _; + ! function(e) { + e.META_DATA_LABEL = "label", e.META_DATA_DESCRIPTION = "description", e.META_DATA_SIZE = + "size", e.META_DATA_MIME = "mime", e.parseMetaData = function(t) { + const i = new Map; + t.path.substring(t.path.indexOf(";") + 1, t.path.lastIndexOf(";")).split( + ";").forEach((e => { + const [t, n] = e.split(":"); + t && n && i.set(t, n) + })); + const n = t.path.substring(0, t.path.indexOf(";")); + return n && i.set(e.META_DATA_MIME, n), i + } + }(_ || (_ = {})) + }, + 6633: (e, t, i) => { + "use strict"; + i.d(t, { + Rm: () => s + }); + var n = i(4669), + o = i(5976); + class r { + constructor(e, t, i, n, o, r) { + this._scrollStateBrand = void 0, e |= 0, t |= 0, i |= 0, n |= 0, o |= + 0, r |= 0, this.rawScrollLeft = i, this.rawScrollTop = r, e < 0 && (e = + 0), i + e > t && (i = t - e), i < 0 && (i = 0), n < 0 && (n = 0), r + + n > o && (r = o - n), r < 0 && (r = 0), this.width = e, this.scrollWidth = + t, this.scrollLeft = i, this.height = n, this.scrollHeight = o, this.scrollTop = + r + } + equals(e) { + return this.rawScrollLeft === e.rawScrollLeft && this.rawScrollTop === + e.rawScrollTop && this.width === e.width && this.scrollWidth === e.scrollWidth && + this.scrollLeft === e.scrollLeft && this.height === e.height && this.scrollHeight === + e.scrollHeight && this.scrollTop === e.scrollTop + } + withScrollDimensions(e, t) { + return new r(void 0 !== e.width ? e.width : this.width, void 0 !== e.scrollWidth ? + e.scrollWidth : this.scrollWidth, t ? this.rawScrollLeft : this.scrollLeft, + void 0 !== e.height ? e.height : this.height, void 0 !== e.scrollHeight ? + e.scrollHeight : this.scrollHeight, t ? this.rawScrollTop : this.scrollTop + ) + } + withScrollPosition(e) { + return new r(this.width, this.scrollWidth, void 0 !== e.scrollLeft ? e + .scrollLeft : this.rawScrollLeft, this.height, this.scrollHeight, + void 0 !== e.scrollTop ? e.scrollTop : this.rawScrollTop) + } + createScrollEvent(e, t) { + const i = this.width !== e.width, + n = this.scrollWidth !== e.scrollWidth, + o = this.scrollLeft !== e.scrollLeft, + r = this.height !== e.height, + s = this.scrollHeight !== e.scrollHeight, + a = this.scrollTop !== e.scrollTop; + return { + inSmoothScrolling: t, + oldWidth: e.width, + oldScrollWidth: e.scrollWidth, + oldScrollLeft: e.scrollLeft, + width: this.width, + scrollWidth: this.scrollWidth, + scrollLeft: this.scrollLeft, + oldHeight: e.height, + oldScrollHeight: e.scrollHeight, + oldScrollTop: e.scrollTop, + height: this.height, + scrollHeight: this.scrollHeight, + scrollTop: this.scrollTop, + widthChanged: i, + scrollWidthChanged: n, + scrollLeftChanged: o, + heightChanged: r, + scrollHeightChanged: s, + scrollTopChanged: a + } + } + } + class s extends o.JT { + constructor(e, t) { + super(), this._scrollableBrand = void 0, this._onScroll = this._register( + new n.Q5), this.onScroll = this._onScroll.event, this._smoothScrollDuration = + e, this._scheduleAtNextAnimationFrame = t, this._state = new r(0, 0, + 0, 0, 0, 0), this._smoothScrolling = null + } + dispose() { + this._smoothScrolling && (this._smoothScrolling.dispose(), this._smoothScrolling = + null), super.dispose() + } + setSmoothScrollDuration(e) { + this._smoothScrollDuration = e + } + validateScrollPosition(e) { + return this._state.withScrollPosition(e) + } + getScrollDimensions() { + return this._state + } + setScrollDimensions(e, t) { + const i = this._state.withScrollDimensions(e, t); + this._setState(i, Boolean(this._smoothScrolling)), this._smoothScrolling && + this._smoothScrolling.acceptScrollDimensions(this._state) + } + getFutureScrollPosition() { + return this._smoothScrolling ? this._smoothScrolling.to : this._state + } + getCurrentScrollPosition() { + return this._state + } + setScrollPositionNow(e) { + const t = this._state.withScrollPosition(e); + this._smoothScrolling && (this._smoothScrolling.dispose(), this._smoothScrolling = + null), this._setState(t, !1) + } + setScrollPositionSmooth(e, t) { + if (0 === this._smoothScrollDuration) return this.setScrollPositionNow( + e); + if (this._smoothScrolling) { + e = { + scrollLeft: void 0 === e.scrollLeft ? this._smoothScrolling.to.scrollLeft : e + .scrollLeft, + scrollTop: void 0 === e.scrollTop ? this._smoothScrolling.to.scrollTop : e + .scrollTop + }; + const i = this._state.withScrollPosition(e); + if (this._smoothScrolling.to.scrollLeft === i.scrollLeft && this._smoothScrolling + .to.scrollTop === i.scrollTop) return; + let n; + n = t ? new d(this._smoothScrolling.from, i, this._smoothScrolling.startTime, + this._smoothScrolling.duration) : this._smoothScrolling.combine( + this._state, i, this._smoothScrollDuration), this._smoothScrolling + .dispose(), this._smoothScrolling = n + } else { + const t = this._state.withScrollPosition(e); + this._smoothScrolling = d.start(this._state, t, this._smoothScrollDuration) + } + this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame( + (() => { + this._smoothScrolling && (this._smoothScrolling.animationFrameDisposable = + null, this._performSmoothScrolling()) + })) + } + _performSmoothScrolling() { + if (!this._smoothScrolling) return; + const e = this._smoothScrolling.tick(), + t = this._state.withScrollPosition(e); + return this._setState(t, !0), this._smoothScrolling ? e.isDone ? ( + this._smoothScrolling.dispose(), void(this._smoothScrolling = null) + ) : void(this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame( + (() => { + this._smoothScrolling && (this._smoothScrolling.animationFrameDisposable = + null, this._performSmoothScrolling()) + }))) : void 0 + } + _setState(e, t) { + const i = this._state; + i.equals(e) || (this._state = e, this._onScroll.fire(this._state.createScrollEvent( + i, t))) + } + } + class a { + constructor(e, t, i) { + this.scrollLeft = e, this.scrollTop = t, this.isDone = i + } + } + + function l(e, t) { + const i = t - e; + return function(t) { + return e + i * (1 - (n = 1 - t, Math.pow(n, 3))); + var n + } + } + class d { + constructor(e, t, i, n) { + this.from = e, this.to = t, this.duration = n, this.startTime = i, + this.animationFrameDisposable = null, this._initAnimations() + } + _initAnimations() { + this.scrollLeft = this._initAnimation(this.from.scrollLeft, this.to.scrollLeft, + this.to.width), this.scrollTop = this._initAnimation(this.from.scrollTop, + this.to.scrollTop, this.to.height) + } + _initAnimation(e, t, i) { + if (Math.abs(e - t) > 2.5 * i) { + let s, a; + return e < t ? (s = e + .75 * i, a = t - .75 * i) : (s = e - .75 * i, + a = t + .75 * i), n = l(e, s), o = l(a, t), r = .33, + function(e) { + return e < r ? n(e / r) : o((e - r) / (1 - r)) + } + } + var n, o, r; + return l(e, t) + } + dispose() { + null !== this.animationFrameDisposable && (this.animationFrameDisposable + .dispose(), this.animationFrameDisposable = null) + } + acceptScrollDimensions(e) { + this.to = e.withScrollPosition(this.to), this._initAnimations() + } + tick() { + return this._tick(Date.now()) + } + _tick(e) { + const t = (e - this.startTime) / this.duration; + if (t < 1) { + const e = this.scrollLeft(t), + i = this.scrollTop(t); + return new a(e, i, !1) + } + return new a(this.to.scrollLeft, this.to.scrollTop, !0) + } + combine(e, t, i) { + return d.start(e, t, i) + } + static start(e, t, i) { + i += 10; + const n = Date.now() - 10; + return new d(e, t, n, i) + } + } + }, + 4603: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => r + }); + var n, o = i(7295); + ! function(e) { + e[e.Ignore = 0] = "Ignore", e[e.Info = 1] = "Info", e[e.Warning = 2] = + "Warning", e[e.Error = 3] = "Error" + }(n || (n = {})), + function(e) { + const t = "error", + i = "warning", + n = "info"; + e.fromValue = function(r) { + return r ? o.qq(t, r) ? e.Error : o.qq(i, r) || o.qq("warn", r) ? e.Warning : + o.qq(n, r) ? e.Info : e.Ignore : e.Ignore + }, e.toString = function(o) { + switch (o) { + case e.Error: + return t; + case e.Warning: + return i; + case e.Info: + return n; + default: + return "ignore" + } + } + }(n || (n = {})); + const r = n + }, + 4013: (e, t, i) => { + "use strict"; + i.d(t, { + G: () => r + }); + var n = i(1432); + const o = n.li.performance && "function" == typeof n.li.performance.now; + class r { + constructor(e) { + this._highResolution = o && e, this._startTime = this._now(), this._stopTime = - + 1 + } + static create(e = !0) { + return new r(e) + } + stop() { + this._stopTime = this._now() + } + elapsed() { + return -1 !== this._stopTime ? this._stopTime - this._startTime : this + ._now() - this._startTime + } + _now() { + return this._highResolution ? n.li.performance.now() : Date.now() + } + } + }, + 7295: (e, t, i) => { + "use strict"; + + function n(e) { + return !e || "string" != typeof e || 0 === e.trim().length + } + i.d(t, { + m5: () => n, + WU: () => r, + YU: () => s, + ec: () => a, + fy: () => l, + j3: () => d, + oL: () => c, + un: () => h, + R1: () => u, + GF: () => g, + IO: () => p, + mr: () => m, + uq: () => f, + LC: () => _, + V8: () => b, + ow: () => v, + qu: () => w, + TT: () => C, + zY: () => y, + j_: () => S, + mK: () => x, + df: () => k, + qq: () => N, + ok: () => E, + Mh: () => I, + P1: () => T, + ZG: () => M, + YK: () => A, + rL: () => R, + ZH: () => O, + vH: () => F, + HO: () => B, + Ut: () => z, + RP: () => H, + $i: () => j, + Qe: () => K, + ab: () => $, + xe: () => q, + K7: () => Z, + C8: () => G, + c1: () => Y, + uS: () => Q, + Kw: () => X, + PJ: () => J, + S6: () => ee, + fi: () => te, + oH: () => ne + }); + const o = /{(\d+)}/g; + + function r(e, ...t) { + return 0 === t.length ? e : e.replace(o, (function(e, i) { + const n = parseInt(i, 10); + return isNaN(n) || n < 0 || n >= t.length ? e : t[n] + })) + } + + function s(e) { + return e.replace(/[<>&]/g, (function(e) { + switch (e) { + case "<": + return "<"; + case ">": + return ">"; + case "&": + return "&"; + default: + return e + } + })) + } + + function a(e) { + return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&") + } + + function l(e, t = " ") { + return c(d(e, t), t) + } + + function d(e, t) { + if (!e || !t) return e; + const i = t.length; + if (0 === i || 0 === e.length) return e; + let n = 0; + for (; e.indexOf(t, n) === n;) n += i; + return e.substring(n) + } + + function c(e, t) { + if (!e || !t) return e; + const i = t.length, + n = e.length; + if (0 === i || 0 === n) return e; + let o = n, + r = -1; + for (; r = e.lastIndexOf(t, o - 1), -1 !== r && r + i === o;) { + if (0 === r) return ""; + o = r + } + return e.substring(0, o) + } + + function h(e) { + return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&").replace( + /[\*]/g, ".*") + } + + function u(e) { + return e.replace(/\*/g, "") + } + + function g(e, t, i = {}) { + if (!e) throw new Error("Cannot create regex from empty string"); + t || (e = a(e)), i.wholeWord && (/\B/.test(e.charAt(0)) || (e = "\\b" + + e), /\B/.test(e.charAt(e.length - 1)) || (e += "\\b")); + let n = ""; + return i.global && (n += "g"), i.matchCase || (n += "i"), i.multiline && + (n += "m"), i.unicode && (n += "u"), new RegExp(e, n) + } + + function p(e) { + return "^" !== e.source && "^$" !== e.source && "$" !== e.source && + "^\\s*$" !== e.source && !(!e.exec("") || 0 !== e.lastIndex) + } + + function m(e) { + return (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? + "m" : "") + (e.unicode ? "u" : "") + } + + function f(e) { + return e.split(/\r\n|\r|\n/) + } + + function _(e) { + for (let t = 0, i = e.length; t < i; t++) { + const i = e.charCodeAt(t); + if (32 !== i && 9 !== i) return t + } + return -1 + } + + function b(e, t = 0, i = e.length) { + for (let n = t; n < i; n++) { + const i = e.charCodeAt(n); + if (32 !== i && 9 !== i) return e.substring(t, n) + } + return e.substring(t, i) + } + + function v(e, t = e.length - 1) { + for (let i = t; i >= 0; i--) { + const t = e.charCodeAt(i); + if (32 !== t && 9 !== t) return i + } + return -1 + } + + function w(e, t) { + return e < t ? -1 : e > t ? 1 : 0 + } + + function C(e, t, i = 0, n = e.length, o = 0, r = t.length) { + for (; i < n && o < r; i++, o++) { + let n = e.charCodeAt(i), + r = t.charCodeAt(o); + if (n < r) return -1; + if (n > r) return 1 + } + const s = n - i, + a = r - o; + return s < a ? -1 : s > a ? 1 : 0 + } + + function y(e, t) { + return S(e, t, 0, e.length, 0, t.length) + } + + function S(e, t, i = 0, n = e.length, o = 0, r = t.length) { + for (; i < n && o < r; i++, o++) { + let s = e.charCodeAt(i), + a = t.charCodeAt(o); + if (s === a) continue; + const l = s - a; + if (!(32 === l && k(a) || -32 === l && k(s))) return x(s) && x(a) ? l : + C(e.toLowerCase(), t.toLowerCase(), i, n, o, r) + } + const s = n - i, + a = r - o; + return s < a ? -1 : s > a ? 1 : 0 + } + + function x(e) { + return e >= 97 && e <= 122 + } + + function k(e) { + return e >= 65 && e <= 90 + } + + function L(e) { + return x(e) || k(e) + } + + function N(e, t) { + return e.length === t.length && D(e, t) + } + + function D(e, t, i = e.length) { + for (let n = 0; n < i; n++) { + const i = e.charCodeAt(n), + o = t.charCodeAt(n); + if (i !== o) + if (L(i) && L(o)) { + const e = Math.abs(i - o); + if (0 !== e && 32 !== e) return !1 + } else if (String.fromCharCode(i).toLowerCase() !== String.fromCharCode( + o).toLowerCase()) return !1 + } + return !0 + } + + function E(e, t) { + const i = t.length; + return !(t.length > e.length) && D(e, t, i) + } + + function I(e, t) { + let i, n = Math.min(e.length, t.length); + for (i = 0; i < n; i++) + if (e.charCodeAt(i) !== t.charCodeAt(i)) return i; + return n + } + + function T(e, t) { + let i, n = Math.min(e.length, t.length); + const o = e.length - 1, + r = t.length - 1; + for (i = 0; i < n; i++) + if (e.charCodeAt(o - i) !== t.charCodeAt(r - i)) return i; + return n + } + + function M(e) { + return 55296 <= e && e <= 56319 + } + + function A(e) { + return 56320 <= e && e <= 57343 + } + + function R(e, t) { + return t - 56320 + (e - 55296 << 10) + 65536 + } + + function O(e, t, i) { + const n = e.charCodeAt(i); + if (M(n) && i + 1 < t) { + const t = e.charCodeAt(i + 1); + if (A(t)) return R(n, t) + } + return n + } + + function P(e, t) { + const i = e.charCodeAt(t - 1); + if (A(i) && t > 1) { + const n = e.charCodeAt(t - 2); + if (M(n)) return R(n, i) + } + return i + } + + function F(e, t) { + const i = ie.getInstance(), + n = t, + o = e.length, + r = O(e, o, t); + t += r >= 65536 ? 2 : 1; + let s = i.getGraphemeBreakType(r); + for (; t < o;) { + const n = O(e, o, t), + r = i.getGraphemeBreakType(n); + if (te(s, r)) break; + t += n >= 65536 ? 2 : 1, s = r + } + return t - n + } + + function B(e, t) { + const i = ie.getInstance(), + n = t, + o = P(e, t); + t -= o >= 65536 ? 2 : 1; + let r = i.getGraphemeBreakType(o); + for (; t > 0;) { + const n = P(e, t), + o = i.getGraphemeBreakType(n); + if (te(o, r)) break; + t -= n >= 65536 ? 2 : 1, r = o + } + return n - t + } + const W = + /(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/; + + function z(e) { + return W.test(e) + } + const V = + /(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/; + + function H(e) { + return V.test(e) + } + const U = /^[\t\n\r\x20-\x7E]*$/; + + function j(e) { + return U.test(e) + } + const K = /[\u2028\u2029]/; + + function $(e) { + return K.test(e) + } + + function q(e) { + for (let t = 0, i = e.length; t < i; t++) + if (Z(e.charCodeAt(t))) return !0; + return !1 + } + + function Z(e) { + return (e = +e) >= 11904 && e <= 55215 || e >= 63744 && e <= 64255 || e >= + 65281 && e <= 65374 + } + + function G(e) { + return e >= 127462 && e <= 127487 || 8986 === e || 8987 === e || 9200 === + e || 9203 === e || e >= 9728 && e <= 10175 || 11088 === e || 11093 === + e || e >= 127744 && e <= 128591 || e >= 128640 && e <= 128764 || e >= + 128992 && e <= 129003 || e >= 129280 && e <= 129535 || e >= 129648 && e <= + 129750 + } + const Y = String.fromCharCode(65279); + + function Q(e) { + return !!(e && e.length > 0 && 65279 === e.charCodeAt(0)) + } + + function X(e, t = !1) { + return !!e && (t && (e = e.replace(/\\./g, "")), e.toLowerCase() !== e) + } + + function J(e) { + return (e %= 52) < 26 ? String.fromCharCode(97 + e) : String.fromCharCode( + 65 + e - 26) + } + + function ee(e) { + return ie.getInstance().getGraphemeBreakType(e) + } + + function te(e, t) { + return 0 === e ? 5 !== t && 7 !== t : !(2 === e && 3 === t || 4 !== e && + 2 !== e && 3 !== e && 4 !== t && 2 !== t && 3 !== t && (8 === e && (8 === + t || 9 === t || 11 === t || 12 === t) || !(11 !== e && 9 !== e || 9 !== + t && 10 !== t) || (12 === e || 10 === e) && 10 === t || 5 === t || + 13 === t || 7 === t || 1 === e || 13 === e && 14 === t || 6 === e && + 6 === t)) + } + class ie { + constructor() { + this._data = JSON.parse( + "[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]" + ) + } + static getInstance() { + return ie._INSTANCE || (ie._INSTANCE = new ie), ie._INSTANCE + } + getGraphemeBreakType(e) { + if (e < 32) return 10 === e ? 3 : 13 === e ? 2 : 4; + if (e < 127) return 0; + const t = this._data, + i = t.length / 3; + let n = 1; + for (; n <= i;) + if (e < t[3 * n]) n *= 2; + else { + if (!(e > t[3 * n + 1])) return t[3 * n + 2]; + n = 2 * n + 1 + } + return 0 + } + } + + function ne(e, t) { + if (0 === e) return 0; + const i = function(e, t) { + let i = P(t, e); + for (e -= oe(i); re(i) || 65039 === i || 8419 === i;) { + if (0 === e) return; + i = P(t, e), e -= oe(i) + } + if (G(i)) { + if (e >= 0) { + const i = P(t, e); + 8205 === i && (e -= oe(i)) + } + return e + } + }(e, t); + return void 0 !== i ? i : e - oe(P(t, e)) + } + + function oe(e) { + return e >= 65536 ? 2 : 1 + } + + function re(e) { + return 127995 <= e && e <= 127999 + } + ie._INSTANCE = null + }, + 8401: (e, t, i) => { + "use strict"; + + function n(e) { + return Array.isArray(e) + } + + function o(e) { + return "string" == typeof e + } + + function r(e) { + return !("object" != typeof e || null === e || Array.isArray(e) || e instanceof RegExp || + e instanceof Date) + } + + function s(e) { + return "number" == typeof e && !isNaN(e) + } + + function a(e) { + return !0 === e || !1 === e + } + + function l(e) { + return void 0 === e + } + + function d(e) { + return l(e) || null === e + } + + function c(e, t) { + if (!e) throw new Error(t ? `Unexpected type, expected '${t}'` : + "Unexpected type") + } + + function h(e) { + if (d(e)) throw new Error( + "Assertion Failed: argument is undefined or null"); + return e + } + + function u(e) { + return "function" == typeof e + } + + function g(e, t) { + const i = Math.min(e.length, t.length); + for (let n = 0; n < i; n++) p(e[n], t[n]) + } + + function p(e, t) { + if (o(t)) { + if (typeof e !== t) throw new Error( + `argument does not match constraint: typeof ${t}`) + } else if (u(t)) { + try { + if (e instanceof t) return + } catch (e) {} + if (!d(e) && e.constructor === t) return; + if (1 === t.length && !0 === t.call(void 0, e)) return; + throw new Error( + "argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true" + ) + } + } + + function m(e) { + const t = []; + for (const i of + function(e) { + let t = [], + i = Object.getPrototypeOf(e); + for (; Object.prototype !== i;) t = t.concat(Object.getOwnPropertyNames( + i)), i = Object.getPrototypeOf(i); + return t + }(e)) "function" == typeof e[i] && t.push(i); + return t + } + + function f(e, t) { + const i = e => function() { + const i = Array.prototype.slice.call(arguments, 0); + return t(e, i) + }; + let n = {}; + for (const t of e) n[t] = i(t); + return n + } + + function _(e) { + return null === e ? void 0 : e + } + + function b(e, t = "Unreachable") { + throw new Error(t) + } + i.d(t, { + kJ: () => n, + HD: () => o, + Kn: () => r, + hj: () => s, + jn: () => a, + o8: () => l, + Jp: () => d, + p_: () => c, + cW: () => h, + mf: () => u, + D8: () => g, + $E: () => m, + IU: () => f, + f6: () => _, + vE: () => b + }) + }, + 5427: (e, t, i) => { + "use strict"; + + function n(e) { + return e < 0 ? 0 : e > 255 ? 255 : 0 | e + } + + function o(e) { + return e < 0 ? 0 : e > 4294967295 ? 4294967295 : 0 | e + } + i.d(t, { + K: () => n, + A: () => o + }) + }, + 666: (e, t, i) => { + "use strict"; + i.d(t, { + o: () => u, + q: () => b + }); + var n = i(8721), + o = i(1432); + const r = /^\w[\w\d+.-]*$/, + s = /^\//, + a = /^\/\//; + + function l(e, t) { + if (!e.scheme && t) throw new Error( + `[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}` + ); + if (e.scheme && !r.test(e.scheme)) throw new Error( + "[UriError]: Scheme contains illegal characters."); + if (e.path) + if (e.authority) { + if (!s.test(e.path)) throw new Error( + '[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character' + ) + } else if (a.test(e.path)) throw new Error( + '[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")' + ) + } + const d = "", + c = "/", + h = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; + class u { + constructor(e, t, i, n, o, r = !1) { + "object" == typeof e ? (this.scheme = e.scheme || d, this.authority = + e.authority || d, this.path = e.path || d, this.query = e.query || d, + this.fragment = e.fragment || d) : (this.scheme = function(e, t) { + return e || t ? e : "file" + }(e, r), this.authority = t || d, this.path = function(e, t) { + switch (e) { + case "https": + case "http": + case "file": + t ? t[0] !== c && (t = c + t) : t = c + } + return t + }(this.scheme, i || d), this.query = n || d, this.fragment = o || d, + l(this, r)) + } + static isUri(e) { + return e instanceof u || !!e && "string" == typeof e.authority && + "string" == typeof e.fragment && "string" == typeof e.path && + "string" == typeof e.query && "string" == typeof e.scheme && "string" == + typeof e.fsPath && "function" == typeof e.with && "function" == + typeof e.toString + } + get fsPath() { + return b(this, !1) + } + with(e) { + if (!e) return this; + let { + scheme: t, + authority: i, + path: n, + query: o, + fragment: r + } = e; + return void 0 === t ? t = this.scheme : null === t && (t = d), void 0 === + i ? i = this.authority : null === i && (i = d), void 0 === n ? n = + this.path : null === n && (n = d), void 0 === o ? o = this.query : + null === o && (o = d), void 0 === r ? r = this.fragment : null === r && + (r = d), t === this.scheme && i === this.authority && n === this.path && + o === this.query && r === this.fragment ? this : new p(t, i, n, o, r) + } + static parse(e, t = !1) { + const i = h.exec(e); + return i ? new p(i[2] || d, y(i[4] || d), y(i[5] || d), y(i[7] || d), + y(i[9] || d), t) : new p(d, d, d, d, d) + } + static file(e) { + let t = d; + if (o.ED && (e = e.replace(/\\/g, c)), e[0] === c && e[1] === c) { + const i = e.indexOf(c, 2); - 1 === i ? (t = e.substring(2), e = c) : + (t = e.substring(2, i), e = e.substring(i) || c) + } + return new p("file", t, e, d, d) + } + static from(e) { + const t = new p(e.scheme, e.authority, e.path, e.query, e.fragment); + return l(t, !0), t + } + static joinPath(e, ...t) { + if (!e.path) throw new Error( + "[UriError]: cannot call joinPath on URI without path"); + let i; + return i = o.ED && "file" === e.scheme ? u.file(n.Ku.join(b(e, !0), .. + .t)).path : n.KR.join(e.path, ...t), e.with({ + path: i + }) + } + toString(e = !1) { + return v(this, e) + } + toJSON() { + return this + } + static revive(e) { + if (e) { + if (e instanceof u) return e; { + const t = new p(e); + return t._formatted = e.external, t._fsPath = e._sep === g ? e.fsPath : + null, t + } + } + return e + } + } + const g = o.ED ? 1 : void 0; + class p extends u { + constructor() { + super(...arguments), this._formatted = null, this._fsPath = null + } + get fsPath() { + return this._fsPath || (this._fsPath = b(this, !1)), this._fsPath + } + toString(e = !1) { + return e ? v(this, !0) : (this._formatted || (this._formatted = v(this, ! + 1)), this._formatted) + } + toJSON() { + const e = { + $mid: 1 + }; + return this._fsPath && (e.fsPath = this._fsPath, e._sep = g), this._formatted && + (e.external = this._formatted), this.path && (e.path = this.path), + this.scheme && (e.scheme = this.scheme), this.authority && (e.authority = + this.authority), this.query && (e.query = this.query), this.fragment && + (e.fragment = this.fragment), e + } + } + const m = { + 58: "%3A", + 47: "%2F", + 63: "%3F", + 35: "%23", + 91: "%5B", + 93: "%5D", + 64: "%40", + 33: "%21", + 36: "%24", + 38: "%26", + 39: "%27", + 40: "%28", + 41: "%29", + 42: "%2A", + 43: "%2B", + 44: "%2C", + 59: "%3B", + 61: "%3D", + 32: "%20" + }; + + function f(e, t) { + let i, n = -1; + for (let o = 0; o < e.length; o++) { + const r = e.charCodeAt(o); + if (r >= 97 && r <= 122 || r >= 65 && r <= 90 || r >= 48 && r <= 57 || + 45 === r || 46 === r || 95 === r || 126 === r || t && 47 === r) - 1 !== + n && (i += encodeURIComponent(e.substring(n, o)), n = -1), void 0 !== + i && (i += e.charAt(o)); + else { + void 0 === i && (i = e.substr(0, o)); + const t = m[r]; + void 0 !== t ? (-1 !== n && (i += encodeURIComponent(e.substring(n, o)), + n = -1), i += t) : -1 === n && (n = o) + } + } + return -1 !== n && (i += encodeURIComponent(e.substring(n))), void 0 !== + i ? i : e + } + + function _(e) { + let t; + for (let i = 0; i < e.length; i++) { + const n = e.charCodeAt(i); + 35 === n || 63 === n ? (void 0 === t && (t = e.substr(0, i)), t += m[n]) : + void 0 !== t && (t += e[i]) + } + return void 0 !== t ? t : e + } + + function b(e, t) { + let i; + return i = e.authority && e.path.length > 1 && "file" === e.scheme ? + `//${e.authority}${e.path}` : 47 === e.path.charCodeAt(0) && (e.path.charCodeAt( + 1) >= 65 && e.path.charCodeAt(1) <= 90 || e.path.charCodeAt(1) >= 97 && + e.path.charCodeAt(1) <= 122) && 58 === e.path.charCodeAt(2) ? t ? e.path + .substr(1) : e.path[1].toLowerCase() + e.path.substr(2) : e.path, o.ED && + (i = i.replace(/\//g, "\\")), i + } + + function v(e, t) { + const i = t ? _ : f; + let n = "", + { + scheme: o, + authority: r, + path: s, + query: a, + fragment: l + } = e; + if (o && (n += o, n += ":"), (r || "file" === o) && (n += c, n += c), r) { + let e = r.indexOf("@"); + if (-1 !== e) { + const t = r.substr(0, e); + r = r.substr(e + 1), e = t.indexOf(":"), -1 === e ? n += i(t, !1) : (n += + i(t.substr(0, e), !1), n += ":", n += i(t.substr(e + 1), !1)), n += + "@" + } + r = r.toLowerCase(), e = r.indexOf(":"), -1 === e ? n += i(r, !1) : (n += + i(r.substr(0, e), !1), n += r.substr(e)) + } + if (s) { + if (s.length >= 3 && 47 === s.charCodeAt(0) && 58 === s.charCodeAt(2)) { + const e = s.charCodeAt(1); + e >= 65 && e <= 90 && (s = + `/${String.fromCharCode(e+32)}:${s.substr(3)}`) + } else if (s.length >= 2 && 58 === s.charCodeAt(1)) { + const e = s.charCodeAt(0); + e >= 65 && e <= 90 && (s = + `${String.fromCharCode(e+32)}:${s.substr(2)}`) + } + n += i(s, !0) + } + return a && (n += "?", n += i(a, !1)), l && (n += "#", n += t ? l : f(l, ! + 1)), n + } + + function w(e) { + try { + return decodeURIComponent(e) + } catch (t) { + return e.length > 3 ? e.substr(0, 3) + w(e.substr(3)) : e + } + } + const C = /(%[0-9A-Za-z][0-9A-Za-z])+/g; + + function y(e) { + return e.match(C) ? e.replace(C, (e => w(e))) : e + } + }, + 7746: (e, t, i) => { + "use strict"; + i.d(t, { + X5: () => n, + Jq: () => o, + jG: () => r + }); + const n = { + ctrlCmd: !1, + alt: !1 + }; + var o, r; + ! function(e) { + e[e.Blur = 1] = "Blur", e[e.Gesture = 2] = "Gesture", e[e.Other = 3] = + "Other" + }(o || (o = {})), + function(e) { + e[e.NONE = 0] = "NONE", e[e.FIRST = 1] = "FIRST", e[e.SECOND = 2] = + "SECOND", e[e.LAST = 3] = "LAST" + }(r || (r = {})) + }, + 5552: (e, t, i) => { + "use strict"; + i.d(t, { + H: () => a + }); + var n = i(9587), + o = {}, + r = {}, + s = function() { + function e(e) { + var t = this; + this._languageId = e, this._loadingTriggered = !1, this._lazyLoadPromise = + new Promise((function(e, i) { + t._lazyLoadPromiseResolve = e, t._lazyLoadPromiseReject = i + })) + } + return e.getOrCreate = function(t) { + return r[t] || (r[t] = new e(t)), r[t] + }, e.prototype.whenLoaded = function() { + return this._lazyLoadPromise + }, e.prototype.load = function() { + var e = this; + return this._loadingTriggered || (this._loadingTriggered = !0, o[this + ._languageId].loader().then((function(t) { + return e._lazyLoadPromiseResolve(t) + }), (function(t) { + return e._lazyLoadPromiseReject(t) + }))), this._lazyLoadPromise + }, e + }(); + + function a(e) { + var t = e.id; + o[t] = e, n.Mj.register(e); + var i = s.getOrCreate(t); + n.Mj.setMonarchTokensProvider(t, i.whenLoaded().then((function(e) { + return e.language + }))), n.Mj.onLanguage(t, (function() { + i.load().then((function(e) { + n.Mj.setLanguageConfiguration(t, e.conf) + })) + })) + } + }, + 6292: (e, t, i) => { + "use strict"; + i.r(t), (0, i(5552).H)({ + id: "css", + extensions: [".css"], + aliases: ["CSS", "css"], + mimetypes: ["text/css"], + loader: function() { + return i.e(75).then(i.bind(i, 2075)) + } + }) + }, + 9587: (e, t, i) => { + "use strict"; + i.d(t, { + Mj: () => n.languages + }); + var n = i(158) + }, + 902: (e, t, i) => { + "use strict"; + i.r(t), (0, i(5552).H)({ + id: "html", + extensions: [".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", + ".asp", ".aspx", ".jshtm" + ], + aliases: ["HTML", "htm", "html", "xhtml"], + mimetypes: ["text/html", "text/x-jshtm", "text/template", + "text/ng-template" + ], + loader: function() { + return i.e(571).then(i.bind(i, 2571)) + } + }) + }, + 3763: (e, t, i) => { + "use strict"; + i.r(t), (0, i(5552).H)({ + id: "javascript", + extensions: [".js", ".es6", ".jsx", ".mjs"], + firstLine: "^#!.*\\bnode", + filenames: ["jakefile"], + aliases: ["JavaScript", "javascript", "js"], + mimetypes: ["text/javascript"], + loader: function() { + return i.e(134).then(i.bind(i, 5810)) + } + }) + }, + 7365: (e, t, i) => { + "use strict"; + i.r(t), (0, i(5552).H)({ + id: "markdown", + extensions: [".md", ".markdown", ".mdown", ".mkdn", ".mkd", ".mdwn", + ".mdtxt", ".mdtext" + ], + aliases: ["Markdown", "markdown"], + loader: function() { + return i.e(954).then(i.bind(i, 2954)) + } + }) + }, + 9723: (e, t, i) => { + "use strict"; + i.r(t), (0, i(5552).H)({ + id: "php", + extensions: [".php", ".php4", ".php5", ".phtml", ".ctp"], + aliases: ["PHP", "php"], + mimetypes: ["application/x-php"], + loader: function() { + return i.e(835).then(i.bind(i, 7835)) + } + }) + }, + 5161: (e, t, i) => { + "use strict"; + i.r(t), (0, i(5552).H)({ + id: "python", + extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"], + aliases: ["Python", "py"], + firstLine: "^#!/.*\\bpython[0-9.-]*\\b", + loader: function() { + return i.e(287).then(i.bind(i, 7287)) + } + }) + }, + 6628: (e, t, i) => { + "use strict"; + i.r(t), (0, i(5552).H)({ + id: "shell", + extensions: [".sh", ".bash"], + aliases: ["Shell", "sh"], + loader: function() { + return i.e(670).then(i.bind(i, 8670)) + } + }) + }, + 8307: (e, t, i) => { + "use strict"; + i.r(t), (0, i(5552).H)({ + id: "typescript", + extensions: [".ts", ".tsx"], + aliases: ["TypeScript", "ts", "typescript"], + mimetypes: ["text/typescript"], + loader: function() { + return i.e(717).then(i.bind(i, 6717)) + } + }) + }, + 1905: (e, t, i) => { + "use strict"; + i.r(t), (0, i(5552).H)({ + id: "xml", + extensions: [".xml", ".dtd", ".ascx", ".csproj", ".config", ".wxi", + ".wxl", ".wxs", ".xaml", ".svg", ".svgz", ".opf", ".xsl" + ], + firstLine: "(\\<\\?xml.*)|(\\ { + "use strict"; + i.r(t), (0, i(5552).H)({ + id: "yaml", + extensions: [".yaml", ".yml"], + aliases: ["YAML", "yaml", "YML", "yml"], + mimetypes: ["application/x-yaml", "text/x-yaml"], + loader: function() { + return i.e(585).then(i.bind(i, 3585)) + } + }) + }, + 9052: (e, t, i) => { + "use strict"; + i.d(t, { + V: () => f, + P: () => p + }); + var n = i(6268), + o = i(4669), + r = i(5976), + s = i(1432); + class a { + constructor(e, t) { + this.chr = e, this.type = t, this.width = 0 + } + fulfill(e) { + this.width = e + } + } + class l { + constructor(e, t) { + this._bareFontInfo = e, this._requests = t, this._container = null, + this._testElements = null + } + read() { + this._createDomElements(), document.body.appendChild(this._container), + this._readFromDomElements(), document.body.removeChild(this._container), + this._container = null, this._testElements = null + } + _createDomElements() { + const e = document.createElement("div"); + e.style.position = "absolute", e.style.top = "-50000px", e.style.width = + "50000px"; + const t = document.createElement("div"); + t.style.fontFamily = this._bareFontInfo.getMassagedFontFamily(), t.style + .fontWeight = this._bareFontInfo.fontWeight, t.style.fontSize = this._bareFontInfo + .fontSize + "px", t.style.fontFeatureSettings = this._bareFontInfo.fontFeatureSettings, + t.style.lineHeight = this._bareFontInfo.lineHeight + "px", t.style.letterSpacing = + this._bareFontInfo.letterSpacing + "px", e.appendChild(t); + const i = document.createElement("div"); + i.style.fontFamily = this._bareFontInfo.getMassagedFontFamily(), i.style + .fontWeight = "bold", i.style.fontSize = this._bareFontInfo.fontSize + + "px", i.style.fontFeatureSettings = this._bareFontInfo.fontFeatureSettings, + i.style.lineHeight = this._bareFontInfo.lineHeight + "px", i.style.letterSpacing = + this._bareFontInfo.letterSpacing + "px", e.appendChild(i); + const n = document.createElement("div"); + n.style.fontFamily = this._bareFontInfo.getMassagedFontFamily(), n.style + .fontWeight = this._bareFontInfo.fontWeight, n.style.fontSize = this._bareFontInfo + .fontSize + "px", n.style.fontFeatureSettings = this._bareFontInfo.fontFeatureSettings, + n.style.lineHeight = this._bareFontInfo.lineHeight + "px", n.style.letterSpacing = + this._bareFontInfo.letterSpacing + "px", n.style.fontStyle = "italic", + e.appendChild(n); + const o = []; + for (const e of this._requests) { + let r; + 0 === e.type && (r = t), 2 === e.type && (r = i), 1 === e.type && (r = + n), r.appendChild(document.createElement("br")); + const s = document.createElement("span"); + l._render(s, e), r.appendChild(s), o.push(s) + } + this._container = e, this._testElements = o + } + static _render(e, t) { + if (" " === t.chr) { + let t = " "; + for (let e = 0; e < 8; e++) t += t; + e.innerText = t + } else { + let i = t.chr; + for (let e = 0; e < 8; e++) i += i; + e.textContent = i + } + } + _readFromDomElements() { + for (let e = 0, t = this._requests.length; e < t; e++) { + const t = this._requests[e], + i = this._testElements[e]; + t.fulfill(i.offsetWidth / 256) + } + } + } + var d = i(4534), + c = i(6345), + h = i(4141), + u = i(7374); + class g { + constructor() { + this._keys = Object.create(null), this._values = Object.create(null) + } + has(e) { + const t = e.getId(); + return !!this._values[t] + } + get(e) { + const t = e.getId(); + return this._values[t] + } + put(e, t) { + const i = e.getId(); + this._keys[i] = e, this._values[i] = t + } + remove(e) { + const t = e.getId(); + delete this._keys[t], delete this._values[t] + } + getValues() { + return Object.keys(this._keys).map((e => this._values[e])) + } + } + + function p() { + m.INSTANCE.clearCache() + } + class m extends r.JT { + constructor() { + super(), this._onDidChange = this._register(new o.Q5), this.onDidChange = + this._onDidChange.event, this._cache = new g, this._evictUntrustedReadingsTimeout = - + 1 + } + dispose() { + -1 !== this._evictUntrustedReadingsTimeout && (clearTimeout(this._evictUntrustedReadingsTimeout), + this._evictUntrustedReadingsTimeout = -1), super.dispose() + } + clearCache() { + this._cache = new g, this._onDidChange.fire() + } + _writeToCache(e, t) { + this._cache.put(e, t), t.isTrusted || -1 !== this._evictUntrustedReadingsTimeout || + (this._evictUntrustedReadingsTimeout = setTimeout((() => { + this._evictUntrustedReadingsTimeout = -1, this._evictUntrustedReadings() + }), 5e3)) + } + _evictUntrustedReadings() { + const e = this._cache.getValues(); + let t = !1; + for (const i of e) i.isTrusted || (t = !0, this._cache.remove(i)); + t && this._onDidChange.fire() + } + readConfiguration(e) { + if (!this._cache.has(e)) { + let t = m._actualReadConfiguration(e); + (t.typicalHalfwidthCharacterWidth <= 2 || t.typicalFullwidthCharacterWidth <= + 2 || t.spaceWidth <= 2 || t.maxDigitWidth <= 2) && (t = new u.pR({ + zoomLevel: n.px(), + pixelRatio: n.mX(), + fontFamily: t.fontFamily, + fontWeight: t.fontWeight, + fontSize: t.fontSize, + fontFeatureSettings: t.fontFeatureSettings, + lineHeight: t.lineHeight, + letterSpacing: t.letterSpacing, + isMonospace: t.isMonospace, + typicalHalfwidthCharacterWidth: Math.max(t.typicalHalfwidthCharacterWidth, + 5), + typicalFullwidthCharacterWidth: Math.max(t.typicalFullwidthCharacterWidth, + 5), + canUseHalfwidthRightwardsArrow: t.canUseHalfwidthRightwardsArrow, + spaceWidth: Math.max(t.spaceWidth, 5), + middotWidth: Math.max(t.middotWidth, 5), + wsmiddotWidth: Math.max(t.wsmiddotWidth, 5), + maxDigitWidth: Math.max(t.maxDigitWidth, 5) + }, !1)), this._writeToCache(e, t) + } + return this._cache.get(e) + } + static createRequest(e, t, i, n) { + const o = new a(e, t); + return i.push(o), n && n.push(o), o + } + static _actualReadConfiguration(e) { + const t = [], + i = [], + o = this.createRequest("n", 0, t, i), + r = this.createRequest("m", 0, t, null), + s = this.createRequest(" ", 0, t, i), + a = this.createRequest("0", 0, t, i), + d = this.createRequest("1", 0, t, i), + c = this.createRequest("2", 0, t, i), + g = this.createRequest("3", 0, t, i), + p = this.createRequest("4", 0, t, i), + m = this.createRequest("5", 0, t, i), + f = this.createRequest("6", 0, t, i), + _ = this.createRequest("7", 0, t, i), + b = this.createRequest("8", 0, t, i), + v = this.createRequest("9", 0, t, i), + w = this.createRequest("→", 0, t, i), + C = this.createRequest("→", 0, t, null), + y = this.createRequest("·", 0, t, i), + S = this.createRequest(String.fromCharCode(11825), 0, t, null); + this.createRequest("|", 0, t, i), this.createRequest("/", 0, t, i), + this.createRequest("-", 0, t, i), this.createRequest("_", 0, t, i), + this.createRequest("i", 0, t, i), this.createRequest("l", 0, t, i), + this.createRequest("m", 0, t, i), this.createRequest("|", 1, t, i), + this.createRequest("_", 1, t, i), this.createRequest("i", 1, t, i), + this.createRequest("l", 1, t, i), this.createRequest("m", 1, t, i), + this.createRequest("n", 1, t, i), this.createRequest("|", 2, t, i), + this.createRequest("_", 2, t, i), this.createRequest("i", 2, t, i), + this.createRequest("l", 2, t, i), this.createRequest("m", 2, t, i), + this.createRequest("n", 2, t, i), + function(e, t) { + new l(e, t).read() + }(e, t); + const x = Math.max(a.width, d.width, c.width, g.width, p.width, m.width, + f.width, _.width, b.width, v.width); + let k = e.fontFeatureSettings === h.n0.OFF; + const L = i[0].width; + for (let e = 1, t = i.length; k && e < t; e++) { + const t = L - i[e].width; + if (t < -.001 || t > .001) { + k = !1; + break + } + } + let N = !0; + k && C.width !== L && (N = !1), C.width > w.width && (N = !1); + const D = n.WP() > 2e3; + return new u.pR({ + zoomLevel: n.px(), + pixelRatio: n.mX(), + fontFamily: e.fontFamily, + fontWeight: e.fontWeight, + fontSize: e.fontSize, + fontFeatureSettings: e.fontFeatureSettings, + lineHeight: e.lineHeight, + letterSpacing: e.letterSpacing, + isMonospace: k, + typicalHalfwidthCharacterWidth: o.width, + typicalFullwidthCharacterWidth: r.width, + canUseHalfwidthRightwardsArrow: N, + spaceWidth: s.width, + middotWidth: y.width, + wsmiddotWidth: S.width, + maxDigitWidth: x + }, D) + } + } + m.INSTANCE = new m; + class f extends c.fv { + constructor(e, t, i = null, o) { + super(e, t), this.accessibilityService = o, this._elementSizeObserver = + this._register(new d.I(i, t.dimension, (() => this._recomputeOptions()))), + this._register(m.INSTANCE.onDidChange((() => this._recomputeOptions()))), + this._validatedOptions.get(10) && this._elementSizeObserver.startObserving(), + this._register(n.fX((e => this._recomputeOptions()))), this._register( + this.accessibilityService.onDidChangeScreenReaderOptimized((() => + this._recomputeOptions()))), this._recomputeOptions() + } + static applyFontInfoSlow(e, t) { + e.style.fontFamily = t.getMassagedFontFamily(), e.style.fontWeight = + t.fontWeight, e.style.fontSize = t.fontSize + "px", e.style.fontFeatureSettings = + t.fontFeatureSettings, e.style.lineHeight = t.lineHeight + "px", e.style + .letterSpacing = t.letterSpacing + "px" + } + static applyFontInfo(e, t) { + e.setFontFamily(t.getMassagedFontFamily()), e.setFontWeight(t.fontWeight), + e.setFontSize(t.fontSize), e.setFontFeatureSettings(t.fontFeatureSettings), + e.setLineHeight(t.lineHeight), e.setLetterSpacing(t.letterSpacing) + } + observeReferenceElement(e) { + this._elementSizeObserver.observe(e) + } + updatePixelRatio() { + this._recomputeOptions() + } + static _getExtraEditorClassName() { + let e = ""; + return n.G6 || n.MG || (e += "no-user-select "), n.G6 && (e += + "no-minimap-shadow "), s.dz && (e += "mac "), e + } + _getEnvConfiguration() { + return { + extraEditorClassName: f._getExtraEditorClassName(), + outerWidth: this._elementSizeObserver.getWidth(), + outerHeight: this._elementSizeObserver.getHeight(), + emptySelectionClipboard: n.Pf || n.vU, + pixelRatio: n.mX(), + zoomLevel: n.px(), + accessibilitySupport: this.accessibilityService.isScreenReaderOptimized() ? + 2 : this.accessibilityService.getAccessibilitySupport() + } + } + readConfiguration(e) { + return m.INSTANCE.readConfiguration(e) + } + } + }, + 4534: (e, t, i) => { + "use strict"; + i.d(t, { + I: () => o + }); + var n = i(5976); + class o extends n.JT { + constructor(e, t, i) { + super(), this.referenceDomElement = e, this.changeCallback = i, this.width = - + 1, this.height = -1, this.resizeObserver = null, this.measureReferenceDomElementToken = - + 1, this.measureReferenceDomElement(!1, t) + } + dispose() { + this.stopObserving(), super.dispose() + } + getWidth() { + return this.width + } + getHeight() { + return this.height + } + startObserving() { + "undefined" != typeof ResizeObserver ? !this.resizeObserver && this.referenceDomElement && + (this.resizeObserver = new ResizeObserver((e => { + e && e[0] && e[0].contentRect ? this.observe({ + width: e[0].contentRect.width, + height: e[0].contentRect.height + }) : this.observe() + })), this.resizeObserver.observe(this.referenceDomElement)) : -1 === + this.measureReferenceDomElementToken && (this.measureReferenceDomElementToken = + setInterval((() => this.observe()), 100)) + } + stopObserving() { + this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = + null), -1 !== this.measureReferenceDomElementToken && ( + clearInterval(this.measureReferenceDomElementToken), this.measureReferenceDomElementToken = - + 1) + } + observe(e) { + this.measureReferenceDomElement(!0, e) + } + measureReferenceDomElement(e, t) { + let i = 0, + n = 0; + t ? (i = t.width, n = t.height) : this.referenceDomElement && (i = + this.referenceDomElement.clientWidth, n = this.referenceDomElement.clientHeight + ), i = Math.max(5, i), n = Math.max(5, n), this.width === i && this.height === + n || (this.width = i, this.height = n, e && this.changeCallback()) + } + } + }, + 8728: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + CoreEditingCommands: () => N, + CoreEditorCommand: () => y, + CoreNavigationCommands: () => m, + EditorScroll_: () => g, + RevealLine_: () => p + }); + var n = i(3580), + o = i(6268), + r = i(8401), + s = i(6346), + a = i(6830), + l = i(1640), + d = i(3181), + c = i(187), + h = i(4314); + class u { + static columnSelect(e, t, i, n, o, r) { + let s = Math.abs(o - i) + 1, + a = i > o, + l = n > r, + u = n < r, + g = []; + for (let o = 0; o < s; o++) { + let s = i + (a ? -o : o), + p = d.io.columnFromVisibleColumn2(e, t, s, n), + m = d.io.columnFromVisibleColumn2(e, t, s, r), + f = d.io.visibleColumnFromColumn2(e, t, new c.L(s, p)), + _ = d.io.visibleColumnFromColumn2(e, t, new c.L(s, m)); + if (u) { + if (f > r) continue; + if (_ < n) continue + } + if (l) { + if (_ > n) continue; + if (f < r) continue + } + g.push(new d.rS(new h.e(s, p, s, p), 0, new c.L(s, m), 0)) + } + if (0 === g.length) + for (let e = 0; e < s; e++) { + const n = i + (a ? -e : e), + o = t.getLineMaxColumn(n); + g.push(new d.rS(new h.e(n, o, n, o), 0, new c.L(n, o), 0)) + } + return { + viewStates: g, + reversed: a, + fromLineNumber: i, + fromVisualColumn: n, + toLineNumber: o, + toVisualColumn: r + } + } + static columnSelectLeft(e, t, i) { + let n = i.toViewVisualColumn; + return n > 0 && n--, u.columnSelect(e, t, i.fromViewLineNumber, i.fromViewVisualColumn, + i.toViewLineNumber, n) + } + static columnSelectRight(e, t, i) { + let n = 0; + const o = Math.min(i.fromViewLineNumber, i.toViewLineNumber), + r = Math.max(i.fromViewLineNumber, i.toViewLineNumber); + for (let i = o; i <= r; i++) { + const o = t.getLineMaxColumn(i), + r = d.io.visibleColumnFromColumn2(e, t, new c.L(i, o)); + n = Math.max(n, r) + } + let s = i.toViewVisualColumn; + return s < n && s++, this.columnSelect(e, t, i.fromViewLineNumber, i.fromViewVisualColumn, + i.toViewLineNumber, s) + } + static columnSelectUp(e, t, i, n) { + const o = n ? e.pageSize : 1, + r = Math.max(1, i.toViewLineNumber - o); + return this.columnSelect(e, t, i.fromViewLineNumber, i.fromViewVisualColumn, + r, i.toViewVisualColumn) + } + static columnSelectDown(e, t, i, n) { + const o = n ? e.pageSize : 1, + r = Math.min(t.getLineCount(), i.toViewLineNumber + o); + return this.columnSelect(e, t, i.fromViewLineNumber, i.fromViewVisualColumn, + r, i.toViewVisualColumn) + } + } + var g, p, m, f = i(1380), + _ = i(3814), + b = i(3582), + v = i(9102), + w = i(8819), + C = i(9989); + class y extends a._l { + runEditorCommand(e, t, i) { + const n = t._getViewModel(); + n && this.runCoreEditorCommand(n, i || {}) + } + }! function(e) { + e.description = { + description: "Scroll editor in the given direction", + args: [{ + name: "Editor scroll argument object", + description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t", + constraint: function(e) { + if (!r.Kn(e)) return !1; + const t = e; + return !(!r.HD(t.to) || !r.o8(t.by) && !r.HD(t.by) || !r.o8(t.value) && + !r.hj(t.value) || !r.o8(t.revealCursor) && !r.jn(t.revealCursor) + ) + }, + schema: { + type: "object", + required: ["to"], + properties: { + to: { + type: "string", + enum: ["up", "down"] + }, + by: { + type: "string", + enum: ["line", "wrappedLine", "page", "halfPage"] + }, + value: { + type: "number", + default: 1 + }, + revealCursor: { + type: "boolean" + } + } + } + }] + }, e.RawDirection = { + Up: "up", + Down: "down" + }, e.RawUnit = { + Line: "line", + WrappedLine: "wrappedLine", + Page: "page", + HalfPage: "halfPage" + }, e.parse = function(t) { + let i, n; + switch (t.to) { + case e.RawDirection.Up: + i = 1; + break; + case e.RawDirection.Down: + i = 2; + break; + default: + return null + } + switch (t.by) { + case e.RawUnit.Line: + n = 1; + break; + case e.RawUnit.WrappedLine: + n = 2; + break; + case e.RawUnit.Page: + n = 3; + break; + case e.RawUnit.HalfPage: + n = 4; + break; + default: + n = 2 + } + return { + direction: i, + unit: n, + value: Math.floor(t.value || 1), + revealCursor: !!t.revealCursor, + select: !!t.select + } + } + }(g || (g = {})), + function(e) { + e.description = { + description: "Reveal the given line at the given logical position", + args: [{ + name: "Reveal line argument object", + description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t", + constraint: function(e) { + if (!r.Kn(e)) return !1; + const t = e; + return !(!r.hj(t.lineNumber) && !r.HD(t.lineNumber) || !r.o8(t.at) && + !r.HD(t.at)) + }, + schema: { + type: "object", + required: ["lineNumber"], + properties: { + lineNumber: { + type: ["number", "string"] + }, + at: { + type: "string", + enum: ["top", "center", "bottom"] + } + } + } + }] + }, e.RawAtArgument = { + Top: "top", + Center: "center", + Bottom: "bottom" + } + }(p || (p = {})); + class S { + constructor(e) { + e.addImplementation(1e4, "code-editor", ((e, t) => { + const i = e.get(l.$).getFocusedCodeEditor(); + return !(!i || !i.hasTextFocus()) && this._runEditorCommand(e, i, + t) + })), e.addImplementation(1e3, "generic-dom-input-textarea", ((e, t) => { + const i = document.activeElement; + return !!(i && ["input", "textarea"].indexOf(i.tagName.toLowerCase()) >= + 0) && (this.runDOMCommand(), !0) + })), e.addImplementation(0, "generic-dom", ((e, t) => { + const i = e.get(l.$).getActiveCodeEditor(); + return !!i && (i.focus(), this._runEditorCommand(e, i, t)) + })) + } + _runEditorCommand(e, t, i) { + return this.runEditorCommand(e, t, i) || !0 + } + }! function(e) { + class t extends y { + constructor(e) { + super(e), this._inSelectionMode = e.inSelectionMode + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, [_.P.moveTo( + e, e.getPrimaryCursorState(), this._inSelectionMode, t.position, + t.viewPosition)]), e.revealPrimaryCursor(t.source, !0) + } + } + e.MoveTo = (0, a.fK)(new t({ + id: "_moveTo", + inSelectionMode: !1, + precondition: void 0 + })), e.MoveToSelect = (0, a.fK)(new t({ + id: "_moveToSelect", + inSelectionMode: !0, + precondition: void 0 + })); + class i extends y { + runCoreEditorCommand(e, t) { + e.model.pushStackElement(); + const i = this._getColumnSelectResult(e, e.getPrimaryCursorState(), e + .getCursorColumnSelectData(), t); + e.setCursorStates(t.source, 3, i.viewStates.map((e => d.Vi.fromViewState( + e)))), e.setCursorColumnSelectData({ + isReal: !0, + fromViewLineNumber: i.fromLineNumber, + fromViewVisualColumn: i.fromVisualColumn, + toViewLineNumber: i.toLineNumber, + toViewVisualColumn: i.toVisualColumn + }), i.reversed ? e.revealTopMostCursor(t.source) : e.revealBottomMostCursor( + t.source) + } + } + e.ColumnSelect = (0, a.fK)(new class extends i { + constructor() { + super({ + id: "columnSelect", + precondition: void 0 + }) + } + _getColumnSelectResult(e, t, i, n) { + const o = e.model.validatePosition(n.position), + r = e.coordinatesConverter.validateViewPosition(new c.L(n.viewPosition + .lineNumber, n.viewPosition.column), o); + let s = n.doColumnSelect ? i.fromViewLineNumber : r.lineNumber, + a = n.doColumnSelect ? i.fromViewVisualColumn : n.mouseColumn - 1; + return u.columnSelect(e.cursorConfig, e, s, a, r.lineNumber, n.mouseColumn - + 1) + } + }), e.CursorColumnSelectLeft = (0, a.fK)(new class extends i { + constructor() { + super({ + id: "cursorColumnSelectLeft", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 3599, + linux: { + primary: 0 + } + } + }) + } + _getColumnSelectResult(e, t, i, n) { + return u.columnSelectLeft(e.cursorConfig, e, i) + } + }), e.CursorColumnSelectRight = (0, a.fK)(new class extends i { + constructor() { + super({ + id: "cursorColumnSelectRight", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 3601, + linux: { + primary: 0 + } + } + }) + } + _getColumnSelectResult(e, t, i, n) { + return u.columnSelectRight(e.cursorConfig, e, i) + } + }); + class r extends i { + constructor(e) { + super(e), this._isPaged = e.isPaged + } + _getColumnSelectResult(e, t, i, n) { + return u.columnSelectUp(e.cursorConfig, e, i, this._isPaged) + } + } + e.CursorColumnSelectUp = (0, a.fK)(new r({ + isPaged: !1, + id: "cursorColumnSelectUp", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 3600, + linux: { + primary: 0 + } + } + })), e.CursorColumnSelectPageUp = (0, a.fK)(new r({ + isPaged: !0, + id: "cursorColumnSelectPageUp", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 3595, + linux: { + primary: 0 + } + } + })); + class l extends i { + constructor(e) { + super(e), this._isPaged = e.isPaged + } + _getColumnSelectResult(e, t, i, n) { + return u.columnSelectDown(e.cursorConfig, e, i, this._isPaged) + } + } + e.CursorColumnSelectDown = (0, a.fK)(new l({ + isPaged: !1, + id: "cursorColumnSelectDown", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 3602, + linux: { + primary: 0 + } + } + })), e.CursorColumnSelectPageDown = (0, a.fK)(new l({ + isPaged: !0, + id: "cursorColumnSelectPageDown", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 3596, + linux: { + primary: 0 + } + } + })); + class m extends y { + constructor() { + super({ + id: "cursorMove", + precondition: void 0, + description: _.N.description + }) + } + runCoreEditorCommand(e, t) { + const i = _.N.parse(t); + i && this._runCursorMove(e, t.source, i) + } + _runCursorMove(e, t, i) { + e.model.pushStackElement(), e.setCursorStates(t, 3, m._move(e, e.getCursorStates(), + i)), e.revealPrimaryCursor(t, !0) + } + static _move(e, t, i) { + const n = i.select, + o = i.value; + switch (i.direction) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + return _.P.simpleMove(e, t, i.direction, n, o, i.unit); + case 11: + case 13: + case 12: + case 14: + return _.P.viewportMove(e, t, i.direction, n, o); + default: + return null + } + } + } + e.CursorMoveImpl = m, e.CursorMove = (0, a.fK)(new m); + class f extends y { + constructor(e) { + super(e), this._staticArgs = e.args + } + runCoreEditorCommand(e, t) { + let i = this._staticArgs; - 1 === this._staticArgs.value && (i = { + direction: this._staticArgs.direction, + unit: this._staticArgs.unit, + select: this._staticArgs.select, + value: e.cursorConfig.pageSize + }), e.model.pushStackElement(), e.setCursorStates(t.source, 3, _.P.simpleMove( + e, e.getCursorStates(), i.direction, i.select, i.value, i.unit)), e + .revealPrimaryCursor(t.source, !0) + } + } + e.CursorLeft = (0, a.fK)(new f({ + args: { + direction: 0, + unit: 0, + select: !1, + value: 1 + }, + id: "cursorLeft", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 15, + mac: { + primary: 15, + secondary: [288] + } + } + })), e.CursorLeftSelect = (0, a.fK)(new f({ + args: { + direction: 0, + unit: 0, + select: !0, + value: 1 + }, + id: "cursorLeftSelect", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 1039 + } + })), e.CursorRight = (0, a.fK)(new f({ + args: { + direction: 1, + unit: 0, + select: !1, + value: 1 + }, + id: "cursorRight", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 17, + mac: { + primary: 17, + secondary: [292] + } + } + })), e.CursorRightSelect = (0, a.fK)(new f({ + args: { + direction: 1, + unit: 0, + select: !0, + value: 1 + }, + id: "cursorRightSelect", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 1041 + } + })), e.CursorUp = (0, a.fK)(new f({ + args: { + direction: 2, + unit: 2, + select: !1, + value: 1 + }, + id: "cursorUp", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 16, + mac: { + primary: 16, + secondary: [302] + } + } + })), e.CursorUpSelect = (0, a.fK)(new f({ + args: { + direction: 2, + unit: 2, + select: !0, + value: 1 + }, + id: "cursorUpSelect", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 1040, + secondary: [3088], + mac: { + primary: 1040 + }, + linux: { + primary: 1040 + } + } + })), e.CursorPageUp = (0, a.fK)(new f({ + args: { + direction: 2, + unit: 2, + select: !1, + value: -1 + }, + id: "cursorPageUp", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 11 + } + })), e.CursorPageUpSelect = (0, a.fK)(new f({ + args: { + direction: 2, + unit: 2, + select: !0, + value: -1 + }, + id: "cursorPageUpSelect", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 1035 + } + })), e.CursorDown = (0, a.fK)(new f({ + args: { + direction: 3, + unit: 2, + select: !1, + value: 1 + }, + id: "cursorDown", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 18, + mac: { + primary: 18, + secondary: [300] + } + } + })), e.CursorDownSelect = (0, a.fK)(new f({ + args: { + direction: 3, + unit: 2, + select: !0, + value: 1 + }, + id: "cursorDownSelect", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 1042, + secondary: [3090], + mac: { + primary: 1042 + }, + linux: { + primary: 1042 + } + } + })), e.CursorPageDown = (0, a.fK)(new f({ + args: { + direction: 3, + unit: 2, + select: !1, + value: -1 + }, + id: "cursorPageDown", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 12 + } + })), e.CursorPageDownSelect = (0, a.fK)(new f({ + args: { + direction: 3, + unit: 2, + select: !0, + value: -1 + }, + id: "cursorPageDownSelect", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 1036 + } + })), e.CreateCursor = (0, a.fK)(new class extends y { + constructor() { + super({ + id: "createCursor", + precondition: void 0 + }) + } + runCoreEditorCommand(e, t) { + let i; + i = t.wholeLine ? _.P.line(e, e.getPrimaryCursorState(), !1, t.position, + t.viewPosition) : _.P.moveTo(e, e.getPrimaryCursorState(), !1, t.position, + t.viewPosition); + const n = e.getCursorStates(); + if (n.length > 1) { + const o = i.modelState ? i.modelState.position : null, + r = i.viewState ? i.viewState.position : null; + for (let i = 0, s = n.length; i < s; i++) { + const s = n[i]; + if ((!o || s.modelState.selection.containsPosition(o)) && (!r || + s.viewState.selection.containsPosition(r))) return n.splice(i, + 1), e.model.pushStackElement(), void e.setCursorStates(t.source, + 3, n) + } + } + n.push(i), e.model.pushStackElement(), e.setCursorStates(t.source, + 3, n) + } + }), e.LastCursorMoveToSelect = (0, a.fK)(new class extends y { + constructor() { + super({ + id: "_lastCursorMoveToSelect", + precondition: void 0 + }) + } + runCoreEditorCommand(e, t) { + const i = e.getLastAddedCursorIndex(), + n = e.getCursorStates(), + o = n.slice(0); + o[i] = _.P.moveTo(e, n[i], !0, t.position, t.viewPosition), e.model + .pushStackElement(), e.setCursorStates(t.source, 3, o) + } + }); + class b extends y { + constructor(e) { + super(e), this._inSelectionMode = e.inSelectionMode + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, _.P.moveToBeginningOfLine( + e, e.getCursorStates(), this._inSelectionMode)), e.revealPrimaryCursor( + t.source, !0) + } + } + e.CursorHome = (0, a.fK)(new b({ + inSelectionMode: !1, + id: "cursorHome", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 14, + mac: { + primary: 14, + secondary: [2063] + } + } + })), e.CursorHomeSelect = (0, a.fK)(new b({ + inSelectionMode: !0, + id: "cursorHomeSelect", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 1038, + mac: { + primary: 1038, + secondary: [3087] + } + } + })); + class w extends y { + constructor(e) { + super(e), this._inSelectionMode = e.inSelectionMode + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, this._exec( + e.getCursorStates())), e.revealPrimaryCursor(t.source, !0) + } + _exec(e) { + const t = []; + for (let i = 0, n = e.length; i < n; i++) { + const n = e[i], + o = n.modelState.position.lineNumber; + t[i] = d.Vi.fromModelState(n.modelState.move(this._inSelectionMode, + o, 1, 0)) + } + return t + } + } + e.CursorLineStart = (0, a.fK)(new w({ + inSelectionMode: !1, + id: "cursorLineStart", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 0, + mac: { + primary: 287 + } + } + })), e.CursorLineStartSelect = (0, a.fK)(new w({ + inSelectionMode: !0, + id: "cursorLineStartSelect", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 0, + mac: { + primary: 1311 + } + } + })); + class C extends y { + constructor(e) { + super(e), this._inSelectionMode = e.inSelectionMode + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, _.P.moveToEndOfLine( + e, e.getCursorStates(), this._inSelectionMode, t.sticky || !1)), e.revealPrimaryCursor( + t.source, !0) + } + } + e.CursorEnd = (0, a.fK)(new C({ + inSelectionMode: !1, + id: "cursorEnd", + precondition: void 0, + kbOpts: { + args: { + sticky: !1 + }, + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 13, + mac: { + primary: 13, + secondary: [2065] + } + }, + description: { + description: "Go to End", + args: [{ + name: "args", + schema: { + type: "object", + properties: { + sticky: { + description: n.N("stickydesc", + "Stick to the end even when going to longer lines"), + type: "boolean", + default: !1 + } + } + } + }] + } + })), e.CursorEndSelect = (0, a.fK)(new C({ + inSelectionMode: !0, + id: "cursorEndSelect", + precondition: void 0, + kbOpts: { + args: { + sticky: !1 + }, + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 1037, + mac: { + primary: 1037, + secondary: [3089] + } + }, + description: { + description: "Select to End", + args: [{ + name: "args", + schema: { + type: "object", + properties: { + sticky: { + description: n.N("stickydesc", + "Stick to the end even when going to longer lines"), + type: "boolean", + default: !1 + } + } + } + }] + } + })); + class x extends y { + constructor(e) { + super(e), this._inSelectionMode = e.inSelectionMode + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, this._exec( + e, e.getCursorStates())), e.revealPrimaryCursor(t.source, !0) + } + _exec(e, t) { + const i = []; + for (let n = 0, o = t.length; n < o; n++) { + const o = t[n], + r = o.modelState.position.lineNumber, + s = e.model.getLineMaxColumn(r); + i[n] = d.Vi.fromModelState(o.modelState.move(this._inSelectionMode, + r, s, 0)) + } + return i + } + } + e.CursorLineEnd = (0, a.fK)(new x({ + inSelectionMode: !1, + id: "cursorLineEnd", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 0, + mac: { + primary: 291 + } + } + })), e.CursorLineEndSelect = (0, a.fK)(new x({ + inSelectionMode: !0, + id: "cursorLineEndSelect", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 0, + mac: { + primary: 1315 + } + } + })); + class k extends y { + constructor(e) { + super(e), this._inSelectionMode = e.inSelectionMode + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, _.P.moveToBeginningOfBuffer( + e, e.getCursorStates(), this._inSelectionMode)), e.revealPrimaryCursor( + t.source, !0) + } + } + e.CursorTop = (0, a.fK)(new k({ + inSelectionMode: !1, + id: "cursorTop", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 2062, + mac: { + primary: 2064 + } + } + })), e.CursorTopSelect = (0, a.fK)(new k({ + inSelectionMode: !0, + id: "cursorTopSelect", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 3086, + mac: { + primary: 3088 + } + } + })); + class L extends y { + constructor(e) { + super(e), this._inSelectionMode = e.inSelectionMode + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, _.P.moveToEndOfBuffer( + e, e.getCursorStates(), this._inSelectionMode)), e.revealPrimaryCursor( + t.source, !0) + } + } + e.CursorBottom = (0, a.fK)(new L({ + inSelectionMode: !1, + id: "cursorBottom", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 2061, + mac: { + primary: 2066 + } + } + })), e.CursorBottomSelect = (0, a.fK)(new L({ + inSelectionMode: !0, + id: "cursorBottomSelect", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 3085, + mac: { + primary: 3090 + } + } + })); + class N extends y { + constructor() { + super({ + id: "editorScroll", + precondition: void 0, + description: g.description + }) + } + runCoreEditorCommand(e, t) { + const i = g.parse(t); + i && this._runEditorScroll(e, t.source, i) + } + _runEditorScroll(e, t, i) { + const n = this._computeDesiredScrollTop(e, i); + if (i.revealCursor) { + const o = e.getCompletelyVisibleViewRangeAtScrollTop(n); + e.setCursorStates(t, 3, [_.P.findPositionInViewportIfOutside(e, e.getPrimaryCursorState(), + o, i.select)]) + } + e.setScrollTop(n, 0) + } + _computeDesiredScrollTop(e, t) { + if (1 === t.unit) { + const i = e.getCompletelyVisibleViewRange(), + n = e.coordinatesConverter.convertViewRangeToModelRange(i); + let o; + o = 1 === t.direction ? Math.max(1, n.startLineNumber - t.value) : + Math.min(e.model.getLineCount(), n.startLineNumber + t.value); + const r = e.coordinatesConverter.convertModelPositionToViewPosition( + new c.L(o, 1)); + return e.getVerticalOffsetForLineNumber(r.lineNumber) + } + let i; + i = 3 === t.unit ? e.cursorConfig.pageSize * t.value : 4 === t.unit ? + Math.round(e.cursorConfig.pageSize / 2) * t.value : t.value; + const n = (1 === t.direction ? -1 : 1) * i; + return e.getScrollTop() + n * e.cursorConfig.lineHeight + } + } + e.EditorScrollImpl = N, e.EditorScroll = (0, a.fK)(new N), e.ScrollLineUp = + (0, a.fK)(new class extends y { + constructor() { + super({ + id: "scrollLineUp", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 2064, + mac: { + primary: 267 + } + } + }) + } + runCoreEditorCommand(t, i) { + e.EditorScroll._runEditorScroll(t, i.source, { + direction: 1, + unit: 2, + value: 1, + revealCursor: !1, + select: !1 + }) + } + }), e.ScrollPageUp = (0, a.fK)(new class extends y { + constructor() { + super({ + id: "scrollPageUp", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 2059, + win: { + primary: 523 + }, + linux: { + primary: 523 + } + } + }) + } + runCoreEditorCommand(t, i) { + e.EditorScroll._runEditorScroll(t, i.source, { + direction: 1, + unit: 3, + value: 1, + revealCursor: !1, + select: !1 + }) + } + }), e.ScrollLineDown = (0, a.fK)(new class extends y { + constructor() { + super({ + id: "scrollLineDown", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 2066, + mac: { + primary: 268 + } + } + }) + } + runCoreEditorCommand(t, i) { + e.EditorScroll._runEditorScroll(t, i.source, { + direction: 2, + unit: 2, + value: 1, + revealCursor: !1, + select: !1 + }) + } + }), e.ScrollPageDown = (0, a.fK)(new class extends y { + constructor() { + super({ + id: "scrollPageDown", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 2060, + win: { + primary: 524 + }, + linux: { + primary: 524 + } + } + }) + } + runCoreEditorCommand(t, i) { + e.EditorScroll._runEditorScroll(t, i.source, { + direction: 2, + unit: 3, + value: 1, + revealCursor: !1, + select: !1 + }) + } + }); + class D extends y { + constructor(e) { + super(e), this._inSelectionMode = e.inSelectionMode + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, [_.P.word( + e, e.getPrimaryCursorState(), this._inSelectionMode, t.position)]), + e.revealPrimaryCursor(t.source, !0) + } + } + e.WordSelect = (0, a.fK)(new D({ + inSelectionMode: !1, + id: "_wordSelect", + precondition: void 0 + })), e.WordSelectDrag = (0, a.fK)(new D({ + inSelectionMode: !0, + id: "_wordSelectDrag", + precondition: void 0 + })), e.LastCursorWordSelect = (0, a.fK)(new class extends y { + constructor() { + super({ + id: "lastCursorWordSelect", + precondition: void 0 + }) + } + runCoreEditorCommand(e, t) { + const i = e.getLastAddedCursorIndex(), + n = e.getCursorStates(), + o = n.slice(0), + r = n[i]; + o[i] = _.P.word(e, r, r.modelState.hasSelection(), t.position), e.model + .pushStackElement(), e.setCursorStates(t.source, 3, o) + } + }); + class E extends y { + constructor(e) { + super(e), this._inSelectionMode = e.inSelectionMode + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, [_.P.line( + e, e.getPrimaryCursorState(), this._inSelectionMode, t.position, + t.viewPosition)]), e.revealPrimaryCursor(t.source, !1) + } + } + e.LineSelect = (0, a.fK)(new E({ + inSelectionMode: !1, + id: "_lineSelect", + precondition: void 0 + })), e.LineSelectDrag = (0, a.fK)(new E({ + inSelectionMode: !0, + id: "_lineSelectDrag", + precondition: void 0 + })); + class I extends y { + constructor(e) { + super(e), this._inSelectionMode = e.inSelectionMode + } + runCoreEditorCommand(e, t) { + const i = e.getLastAddedCursorIndex(), + n = e.getCursorStates(), + o = n.slice(0); + o[i] = _.P.line(e, n[i], this._inSelectionMode, t.position, t.viewPosition), + e.model.pushStackElement(), e.setCursorStates(t.source, 3, o) + } + } + e.LastCursorLineSelect = (0, a.fK)(new I({ + inSelectionMode: !1, + id: "lastCursorLineSelect", + precondition: void 0 + })), e.LastCursorLineSelectDrag = (0, a.fK)(new I({ + inSelectionMode: !0, + id: "lastCursorLineSelectDrag", + precondition: void 0 + })), e.ExpandLineSelection = (0, a.fK)(new class extends y { + constructor() { + super({ + id: "expandLineSelection", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 2090 + } + }) + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, _.P.expandLineSelection( + e, e.getCursorStates())), e.revealPrimaryCursor(t.source, !0) + } + }), e.CancelSelection = (0, a.fK)(new class extends y { + constructor() { + super({ + id: "cancelSelection", + precondition: v.u.hasNonEmptySelection, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 9, + secondary: [1033] + } + }) + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, [_.P.cancelSelection( + e, e.getPrimaryCursorState())]), e.revealPrimaryCursor(t.source, ! + 0) + } + }), e.RemoveSecondaryCursors = (0, a.fK)(new class extends y { + constructor() { + super({ + id: "removeSecondaryCursors", + precondition: v.u.hasMultipleSelections, + kbOpts: { + weight: 1, + kbExpr: v.u.textInputFocus, + primary: 9, + secondary: [1033] + } + }) + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, [e.getPrimaryCursorState()]), + e.revealPrimaryCursor(t.source, !0), (0, s.i7)(n.N("removedCursor", + "Removed secondary cursors")) + } + }), e.RevealLine = (0, a.fK)(new class extends y { + constructor() { + super({ + id: "revealLine", + precondition: void 0, + description: p.description + }) + } + runCoreEditorCommand(e, t) { + const i = t, + n = i.lineNumber || 0; + let o = "number" == typeof n ? n + 1 : parseInt(n) + 1; + o < 1 && (o = 1); + const r = e.model.getLineCount(); + o > r && (o = r); + const s = new h.e(o, 1, o, e.model.getLineMaxColumn(o)); + let a = 0; + if (i.at) switch (i.at) { + case p.RawAtArgument.Top: + a = 3; + break; + case p.RawAtArgument.Center: + a = 1; + break; + case p.RawAtArgument.Bottom: + a = 4 + } + const l = e.coordinatesConverter.convertModelRangeToViewRange(s); + e.revealRange(t.source, !1, l, a, 0) + } + }), e.SelectAll = new class extends S { + constructor() { + super(a.Sq) + } + runDOMCommand() { + o.vU && (document.activeElement.focus(), document.activeElement.select()), + document.execCommand("selectAll") + } + runEditorCommand(e, t, i) { + const n = t._getViewModel(); + n && this.runCoreEditorCommand(n, i) + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates("keyboard", 3, [_.P.selectAll( + e, e.getPrimaryCursorState())]) + } + }, e.SetSelection = (0, a.fK)(new class extends y { + constructor() { + super({ + id: "setSelection", + precondition: void 0 + }) + } + runCoreEditorCommand(e, t) { + e.model.pushStackElement(), e.setCursorStates(t.source, 3, [d.Vi.fromModelSelection( + t.selection)]) + } + }) + }(m || (m = {})); + const x = w.Ao.and(v.u.textInputFocus, v.u.columnSelection); + + function k(e, t) { + C.W.registerKeybindingRule({ + id: e, + primary: t, + when: x, + weight: 1 + }) + } + + function L(e) { + return e.register(), e + } + var N; + k(m.CursorColumnSelectLeft.id, 1039), k(m.CursorColumnSelectRight.id, + 1041), k(m.CursorColumnSelectUp.id, 1040), k(m.CursorColumnSelectPageUp + .id, 1035), k(m.CursorColumnSelectDown.id, 1042), k(m.CursorColumnSelectPageDown + .id, 1036), + function(e) { + class t extends a._l { + runEditorCommand(e, t, i) { + const n = t._getViewModel(); + n && this.runCoreEditingCommand(t, n, i || {}) + } + } + e.CoreEditingCommand = t, e.LineBreakInsert = (0, a.fK)(new class extends t { + constructor() { + super({ + id: "lineBreakInsert", + precondition: v.u.writable, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 0, + mac: { + primary: 301 + } + } + }) + } + runCoreEditingCommand(e, t, i) { + e.pushUndoStop(), e.executeCommands(this.id, b.u.lineBreakInsert(t + .cursorConfig, t.model, t.getCursorStates().map((e => e.modelState + .selection)))) + } + }), e.Outdent = (0, a.fK)(new class extends t { + constructor() { + super({ + id: "outdent", + precondition: v.u.writable, + kbOpts: { + weight: 0, + kbExpr: w.Ao.and(v.u.editorTextFocus, v.u.tabDoesNotMoveFocus), + primary: 1026 + } + }) + } + runCoreEditingCommand(e, t, i) { + e.pushUndoStop(), e.executeCommands(this.id, b.u.outdent(t.cursorConfig, + t.model, t.getCursorStates().map((e => e.modelState.selection)) + )), e.pushUndoStop() + } + }), e.Tab = (0, a.fK)(new class extends t { + constructor() { + super({ + id: "tab", + precondition: v.u.writable, + kbOpts: { + weight: 0, + kbExpr: w.Ao.and(v.u.editorTextFocus, v.u.tabDoesNotMoveFocus), + primary: 2 + } + }) + } + runCoreEditingCommand(e, t, i) { + e.pushUndoStop(), e.executeCommands(this.id, b.u.tab(t.cursorConfig, + t.model, t.getCursorStates().map((e => e.modelState.selection)) + )), e.pushUndoStop() + } + }), e.DeleteLeft = (0, a.fK)(new class extends t { + constructor() { + super({ + id: "deleteLeft", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 1, + secondary: [1025], + mac: { + primary: 1, + secondary: [1025, 294, 257] + } + } + }) + } + runCoreEditingCommand(e, t, i) { + const [n, o] = f.A.deleteLeft(t.getPrevEditOperationType(), t.cursorConfig, + t.model, t.getCursorStates().map((e => e.modelState.selection)), + t.getCursorAutoClosedCharacters()); + n && e.pushUndoStop(), e.executeCommands(this.id, o), t.setPrevEditOperationType( + 2) + } + }), e.DeleteRight = (0, a.fK)(new class extends t { + constructor() { + super({ + id: "deleteRight", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: v.u.textInputFocus, + primary: 20, + mac: { + primary: 20, + secondary: [290, 276] + } + } + }) + } + runCoreEditingCommand(e, t, i) { + const [n, o] = f.A.deleteRight(t.getPrevEditOperationType(), t.cursorConfig, + t.model, t.getCursorStates().map((e => e.modelState.selection))); + n && e.pushUndoStop(), e.executeCommands(this.id, o), t.setPrevEditOperationType( + 3) + } + }), e.Undo = new class extends S { + constructor() { + super(a.n_) + } + runDOMCommand() { + document.execCommand("undo") + } + runEditorCommand(e, t, i) { + if (t.hasModel() && !0 !== t.getOption(80)) return t.getModel().undo() + } + }, e.Redo = new class extends S { + constructor() { + super(a.kz) + } + runDOMCommand() { + document.execCommand("redo") + } + runEditorCommand(e, t, i) { + if (t.hasModel() && !0 !== t.getOption(80)) return t.getModel().redo() + } + } + }(N || (N = {})); + class D extends a.mY { + constructor(e, t, i) { + super({ + id: e, + precondition: void 0, + description: i + }), this._handlerId = t + } + runCommand(e, t) { + const i = e.get(l.$).getFocusedCodeEditor(); + i && i.trigger("keyboard", this._handlerId, t) + } + } + + function E(e, t) { + L(new D("default:" + e, e)), L(new D(e, e, t)) + } + E("type", { + description: "Type", + args: [{ + name: "args", + schema: { + type: "object", + required: ["text"], + properties: { + text: { + type: "string" + } + } + } + }] + }), E("replacePreviousChar"), E("compositionType"), E("compositionStart"), + E("compositionEnd"), E("paste"), E("cut") + }, + 5715: (e, t, i) => { + "use strict"; + i.d(t, { + pd: () => n, + RA: () => m, + Nl: () => f, + Fz: () => _ + }); + var n, o = i(6268), + r = i(5321), + s = i(5393), + a = i(4669), + l = i(5976), + d = i(1170), + c = i(1432), + h = i(7295), + u = i(5887), + g = i(187), + p = i(3860); + ! function(e) { + e.Tap = "-monaco-textarea-synthetic-tap" + }(n || (n = {})); + const m = { + forceCopyWithSyntaxHighlighting: !1 + }; + class f { + constructor() { + this._lastState = null + } + set(e, t) { + this._lastState = { + lastCopiedValue: e, + data: t + } + } + get(e) { + return this._lastState && this._lastState.lastCopiedValue === e ? this + ._lastState.data : (this._lastState = null, null) + } + } + f.INSTANCE = new f; + class _ extends l.JT { + constructor(e, t) { + super(), this.textArea = t, this._onFocus = this._register(new a.Q5), + this.onFocus = this._onFocus.event, this._onBlur = this._register( + new a.Q5), this.onBlur = this._onBlur.event, this._onKeyDown = this + ._register(new a.Q5), this.onKeyDown = this._onKeyDown.event, this._onKeyUp = + this._register(new a.Q5), this.onKeyUp = this._onKeyUp.event, this._onCut = + this._register(new a.Q5), this.onCut = this._onCut.event, this._onPaste = + this._register(new a.Q5), this.onPaste = this._onPaste.event, this._onType = + this._register(new a.Q5), this.onType = this._onType.event, this._onCompositionStart = + this._register(new a.Q5), this.onCompositionStart = this._onCompositionStart + .event, this._onCompositionUpdate = this._register(new a.Q5), this.onCompositionUpdate = + this._onCompositionUpdate.event, this._onCompositionEnd = this._register( + new a.Q5), this.onCompositionEnd = this._onCompositionEnd.event, + this._onSelectionChangeRequest = this._register(new a.Q5), this.onSelectionChangeRequest = + this._onSelectionChangeRequest.event, this._host = e, this._textArea = + this._register(new v(t)), this._asyncTriggerCut = this._register(new s + .pY((() => this._onCut.fire()), 0)), this._asyncFocusGainWriteScreenReaderContent = + this._register(new s.pY((() => this.writeScreenReaderContent( + "asyncFocusGain")), 0)), this._textAreaState = u.un.EMPTY, this._selectionChangeListener = + null, this.writeScreenReaderContent("ctor"), this._hasFocus = !1, + this._isDoingComposition = !1, this._nextCommand = 0; + let i = null; + this._register(r.mu(t.domNode, "keydown", (e => { + (109 === e.keyCode || this._isDoingComposition && 1 === e.keyCode) && + e.stopPropagation(), e.equals(9) && e.preventDefault(), i = e, + this._onKeyDown.fire(e) + }))), this._register(r.mu(t.domNode, "keyup", (e => { + this._onKeyUp.fire(e) + }))), this._register(r.nm(t.domNode, "compositionstart", (e => { + if (u.al && console.log("[compositionstart]", e), !this._isDoingComposition) { + if (this._isDoingComposition = !0, c.dz && this._textAreaState.selectionStart === + this._textAreaState.selectionEnd && this._textAreaState.selectionStart > + 0 && this._textAreaState.value.substr(this._textAreaState.selectionStart - + 1, 1) === e.data && (i && i.equals(109) && ("ArrowRight" === + i.code || "ArrowLeft" === i.code) || o.vU)) return u.al && + console.log( + "[compositionstart] Handling long press case on macOS + arrow key or Firefox", + e), this._textAreaState = new u.un(this._textAreaState.value, + this._textAreaState.selectionStart - 1, this._textAreaState.selectionEnd, + this._textAreaState.selectionStartPosition ? new g.L(this._textAreaState + .selectionStartPosition.lineNumber, this._textAreaState.selectionStartPosition + .column - 1) : null, this._textAreaState.selectionEndPosition + ), void this._onCompositionStart.fire({ + revealDeltaColumns: -1 + }); + o.Dt ? this._onCompositionStart.fire({ + revealDeltaColumns: -this._textAreaState.selectionStart + }) : (this._setAndWriteTextAreaState("compositionstart", u.un.EMPTY), + this._onCompositionStart.fire({ + revealDeltaColumns: 0 + })) + } + }))); + const l = e => { + const t = this._textAreaState, + i = u.un.readFromTextArea(this._textArea); + return [i, u.un.deduceInput(t, i, e)] + }, + d = () => { + const e = this._textAreaState, + t = u.un.readFromTextArea(this._textArea); + return [t, u.un.deduceAndroidCompositionInput(e, t)] + }, + p = e => { + const t = this._textAreaState, + i = u.un.selectedText(e); + return [i, { + text: i.value, + replacePrevCharCnt: t.selectionEnd - t.selectionStart, + replaceNextCharCnt: 0, + positionDelta: 0 + }] + }; + this._register(r.nm(t.domNode, "compositionupdate", (e => { + if (u.al && console.log("[compositionupdate]", e), o.Dt) { + const [t, i] = d(); + return this._textAreaState = t, this._onType.fire(i), void this + ._onCompositionUpdate.fire(e) + } + const [t, i] = p(e.data || ""); + this._textAreaState = t, this._onType.fire(i), this._onCompositionUpdate + .fire(e) + }))), this._register(r.nm(t.domNode, "compositionend", (e => { + if (u.al && console.log("[compositionend]", e), !this._isDoingComposition) + return; + if (this._isDoingComposition = !1, o.Dt) { + const [e, t] = d(); + return this._textAreaState = e, this._onType.fire(t), void this + ._onCompositionEnd.fire() + } + const [t, i] = p(e.data || ""); + this._textAreaState = t, this._onType.fire(i), (o.i7 || o.vU) && + (this._textAreaState = u.un.readFromTextArea(this._textArea)), + this._onCompositionEnd.fire() + }))), this._register(r.nm(t.domNode, "input", (() => { + if (this._textArea.setIgnoreSelectionChangeTime( + "received input event"), this._isDoingComposition) return; + const [e, t] = l(c.dz); + 0 === t.replacePrevCharCnt && 1 === t.text.length && h.ZG(t.text + .charCodeAt(0)) || (this._textAreaState = e, 0 === this._nextCommand ? + "" === t.text && 0 === t.replacePrevCharCnt || this._onType.fire( + t) : ("" === t.text && 0 === t.replacePrevCharCnt || this._firePaste( + t.text, null), this._nextCommand = 0)) + }))), this._register(r.nm(t.domNode, "cut", (e => { + this._textArea.setIgnoreSelectionChangeTime("received cut event"), + this._ensureClipboardGetsEditorSelection(e), this._asyncTriggerCut + .schedule() + }))), this._register(r.nm(t.domNode, "copy", (e => { + this._ensureClipboardGetsEditorSelection(e) + }))), this._register(r.nm(t.domNode, "paste", (e => { + if (this._textArea.setIgnoreSelectionChangeTime( + "received paste event"), b.canUseTextData(e)) { + const [t, i] = b.getTextData(e); + "" !== t && this._firePaste(t, i) + } else this._textArea.getSelectionStart() !== this._textArea.getSelectionEnd() && + this._setAndWriteTextAreaState("paste", u.un.EMPTY), this._nextCommand = + 1 + }))), this._register(r.nm(t.domNode, "focus", (() => { + const e = this._hasFocus; + this._setHasFocus(!0), o.G6 && !e && this._hasFocus && this._asyncFocusGainWriteScreenReaderContent + .schedule() + }))), this._register(r.nm(t.domNode, "blur", (() => { + this._isDoingComposition && (this._isDoingComposition = !1, this + .writeScreenReaderContent("blurWithoutCompositionEnd"), this._onCompositionEnd + .fire()), this._setHasFocus(!1) + }))), this._register(r.nm(t.domNode, n.Tap, (() => { + o.Dt && this._isDoingComposition && (this._isDoingComposition = ! + 1, this.writeScreenReaderContent("tapWithoutCompositionEnd"), + this._onCompositionEnd.fire()) + }))) + } + _installSelectionChangeListener() { + let e = 0; + return r.nm(document, "selectionchange", (t => { + if (!this._hasFocus) return; + if (this._isDoingComposition) return; + if (!o.i7) return; + const i = Date.now(), + n = i - e; + if (e = i, n < 5) return; + const r = i - this._textArea.getIgnoreSelectionChangeTime(); + if (this._textArea.resetSelectionChangeTime(), r < 100) return; + if (!this._textAreaState.selectionStartPosition || !this._textAreaState + .selectionEndPosition) return; + const s = this._textArea.getValue(); + if (this._textAreaState.value !== s) return; + const a = this._textArea.getSelectionStart(), + l = this._textArea.getSelectionEnd(); + if (this._textAreaState.selectionStart === a && this._textAreaState + .selectionEnd === l) return; + const d = this._textAreaState.deduceEditorPosition(a), + c = this._host.deduceModelPosition(d[0], d[1], d[2]), + h = this._textAreaState.deduceEditorPosition(l), + u = this._host.deduceModelPosition(h[0], h[1], h[2]), + g = new p.Y(c.lineNumber, c.column, u.lineNumber, u.column); + this._onSelectionChangeRequest.fire(g) + })) + } + dispose() { + super.dispose(), this._selectionChangeListener && (this._selectionChangeListener + .dispose(), this._selectionChangeListener = null) + } + focusTextArea() { + this._setHasFocus(!0), this.refreshFocusState() + } + isFocused() { + return this._hasFocus + } + refreshFocusState() { + const e = r.Ay(this.textArea.domNode); + e ? this._setHasFocus(e.activeElement === this.textArea.domNode) : r.Uw( + this.textArea.domNode) ? this._setHasFocus(document.activeElement === + this.textArea.domNode) : this._setHasFocus(!1) + } + _setHasFocus(e) { + this._hasFocus !== e && (this._hasFocus = e, this._selectionChangeListener && + (this._selectionChangeListener.dispose(), this._selectionChangeListener = + null), this._hasFocus && (this._selectionChangeListener = this._installSelectionChangeListener()), + this._hasFocus && this.writeScreenReaderContent("focusgain"), this._hasFocus ? + this._onFocus.fire() : this._onBlur.fire()) + } + _setAndWriteTextAreaState(e, t) { + this._hasFocus || (t = t.collapseSelection()), t.writeToTextArea(e, + this._textArea, this._hasFocus), this._textAreaState = t + } + writeScreenReaderContent(e) { + this._isDoingComposition || this._setAndWriteTextAreaState(e, this._host + .getScreenReaderContent(this._textAreaState)) + } + _ensureClipboardGetsEditorSelection(e) { + const t = this._host.getDataToCopy(b.canUseTextData(e)), + i = { + version: 1, + isFromEmptySelection: t.isFromEmptySelection, + multicursorText: t.multicursorText, + mode: t.mode + }; + f.INSTANCE.set(o.vU ? t.text.replace(/\r\n/g, "\n") : t.text, i), b.canUseTextData( + e) ? b.setTextData(e, t.text, t.html, i) : this._setAndWriteTextAreaState( + "copy or cut", u.un.selectedText(t.text)) + } + _firePaste(e, t) { + t || (t = f.INSTANCE.get(e)), this._onPaste.fire({ + text: e, + metadata: t + }) + } + } + class b { + static canUseTextData(e) { + return !!e.clipboardData || !!window.clipboardData + } + static getTextData(e) { + if (e.clipboardData) { + e.preventDefault(); + const t = e.clipboardData.getData(d.vW.text); + let i = null; + const n = e.clipboardData.getData("vscode-editor-data"); + if ("string" == typeof n) try { + i = JSON.parse(n), 1 !== i.version && (i = null) + } catch (e) {} + return [t, i] + } + if (window.clipboardData) return e.preventDefault(), [window.clipboardData + .getData("Text"), null + ]; + throw new Error( + "ClipboardEventUtils.getTextData: Cannot use text data!") + } + static setTextData(e, t, i, n) { + if (e.clipboardData) return e.clipboardData.setData(d.vW.text, t), + "string" == typeof i && e.clipboardData.setData("text/html", i), e.clipboardData + .setData("vscode-editor-data", JSON.stringify(n)), void e.preventDefault(); + if (window.clipboardData) return window.clipboardData.setData("Text", + t), void e.preventDefault(); + throw new Error( + "ClipboardEventUtils.setTextData: Cannot use text data!") + } + } + class v extends l.JT { + constructor(e) { + super(), this._actual = e, this._ignoreSelectionChangeTime = 0 + } + setIgnoreSelectionChangeTime(e) { + this._ignoreSelectionChangeTime = Date.now() + } + getIgnoreSelectionChangeTime() { + return this._ignoreSelectionChangeTime + } + resetSelectionChangeTime() { + this._ignoreSelectionChangeTime = 0 + } + getValue() { + return this._actual.domNode.value + } + setValue(e, t) { + const i = this._actual.domNode; + i.value !== t && (this.setIgnoreSelectionChangeTime("setValue"), i.value = + t) + } + getSelectionStart() { + return "backward" === this._actual.domNode.selectionDirection ? this._actual + .domNode.selectionEnd : this._actual.domNode.selectionStart + } + getSelectionEnd() { + return "backward" === this._actual.domNode.selectionDirection ? this._actual + .domNode.selectionStart : this._actual.domNode.selectionEnd + } + setSelectionRange(e, t, i) { + const n = this._actual.domNode; + let s = null; + const a = r.Ay(n); + s = a ? a.activeElement : document.activeElement; + const l = s === n, + d = n.selectionStart, + c = n.selectionEnd; + if (l && d === t && c === i) o.vU && window.parent !== window && n.focus(); + else { + if (l) return this.setIgnoreSelectionChangeTime("setSelectionRange"), + n.setSelectionRange(t, i), void(o.vU && window.parent !== window && + n.focus()); + try { + const e = r.vL(n); + this.setIgnoreSelectionChangeTime("setSelectionRange"), n.focus(), + n.setSelectionRange(t, i), r._0(n, e) + } catch (e) {} + } + } + } + }, + 5887: (e, t, i) => { + "use strict"; + i.d(t, { + al: () => s, + un: () => a, + ee: () => l + }); + var n = i(7295), + o = i(187), + r = i(4314); + const s = !1; + class a { + constructor(e, t, i, n, o) { + this.value = e, this.selectionStart = t, this.selectionEnd = i, this.selectionStartPosition = + n, this.selectionEndPosition = o + } + toString() { + return "[ <" + this.value + ">, selectionStart: " + this.selectionStart + + ", selectionEnd: " + this.selectionEnd + "]" + } + static readFromTextArea(e) { + return new a(e.getValue(), e.getSelectionStart(), e.getSelectionEnd(), + null, null) + } + collapseSelection() { + return new a(this.value, this.value.length, this.value.length, null, + null) + } + writeToTextArea(e, t, i) { + s && console.log("writeToTextArea " + e + ": " + this.toString()), t.setValue( + e, this.value), i && t.setSelectionRange(e, this.selectionStart, + this.selectionEnd) + } + deduceEditorPosition(e) { + if (e <= this.selectionStart) { + const t = this.value.substring(e, this.selectionStart); + return this._finishDeduceEditorPosition(this.selectionStartPosition, + t, -1) + } + if (e >= this.selectionEnd) { + const t = this.value.substring(this.selectionEnd, e); + return this._finishDeduceEditorPosition(this.selectionEndPosition, t, + 1) + } + const t = this.value.substring(this.selectionStart, e); + if (-1 === t.indexOf(String.fromCharCode(8230))) return this._finishDeduceEditorPosition( + this.selectionStartPosition, t, 1); + const i = this.value.substring(e, this.selectionEnd); + return this._finishDeduceEditorPosition(this.selectionEndPosition, i, - + 1) + } + _finishDeduceEditorPosition(e, t, i) { + let n = 0, + o = -1; + for (; - 1 !== (o = t.indexOf("\n", o + 1));) n++; + return [e, i * t.length, n] + } + static selectedText(e) { + return new a(e, 0, e.length, null, null) + } + static deduceInput(e, t, i) { + if (!e) return { + text: "", + replacePrevCharCnt: 0, + replaceNextCharCnt: 0, + positionDelta: 0 + }; + s && (console.log("------------------------deduceInput"), console.log( + "PREVIOUS STATE: " + e.toString()), console.log("CURRENT STATE: " + + t.toString())); + let o = e.value, + r = e.selectionStart, + a = e.selectionEnd, + l = t.value, + d = t.selectionStart, + c = t.selectionEnd; + const h = o.substring(a), + u = l.substring(c), + g = n.P1(h, u); + l = l.substring(0, l.length - g), o = o.substring(0, o.length - g); + const p = o.substring(0, r), + m = l.substring(0, d), + f = n.Mh(p, m); + if (l = l.substring(f), o = o.substring(f), d -= f, r -= f, c -= f, a -= + f, s && (console.log("AFTER DIFFING PREVIOUS STATE: <" + o + + ">, selectionStart: " + r + ", selectionEnd: " + a), console.log( + "AFTER DIFFING CURRENT STATE: <" + l + ">, selectionStart: " + d + + ", selectionEnd: " + c)), i && d === c && o.length > 0) { + let e = null; + if (d === l.length ? l.startsWith(o) && (e = l.substring(o.length)) : + l.endsWith(o) && (e = l.substring(0, l.length - o.length)), null !== + e && e.length > 0 && (/\uFE0F/.test(e) || n.RP(e))) return { + text: e, + replacePrevCharCnt: 0, + replaceNextCharCnt: 0, + positionDelta: 0 + } + } + if (d === c) { + if (o === l && 0 === r && a === o.length && d === l.length && -1 === + l.indexOf("\n") && n.xe(l)) return { + text: "", + replacePrevCharCnt: 0, + replaceNextCharCnt: 0, + positionDelta: 0 + }; + const e = p.length - f; + return s && console.log("REMOVE PREVIOUS: " + (p.length - f) + + " chars"), { + text: l, + replacePrevCharCnt: e, + replaceNextCharCnt: 0, + positionDelta: 0 + } + } + return { + text: l, + replacePrevCharCnt: a - r, + replaceNextCharCnt: 0, + positionDelta: 0 + } + } + static deduceAndroidCompositionInput(e, t) { + if (!e) return { + text: "", + replacePrevCharCnt: 0, + replaceNextCharCnt: 0, + positionDelta: 0 + }; + if (s && (console.log( + "------------------------deduceAndroidCompositionInput"), console.log( + "PREVIOUS STATE: " + e.toString()), console.log("CURRENT STATE: " + + t.toString())), e.value === t.value) return { + text: "", + replacePrevCharCnt: 0, + replaceNextCharCnt: 0, + positionDelta: t.selectionEnd - e.selectionEnd + }; + const i = Math.min(n.Mh(e.value, t.value), e.selectionEnd), + o = Math.min(n.P1(e.value, t.value), e.value.length - e.selectionEnd), + r = e.value.substring(i, e.value.length - o), + a = t.value.substring(i, t.value.length - o), + l = e.selectionStart - i, + d = e.selectionEnd - i, + c = t.selectionStart - i, + h = t.selectionEnd - i; + return s && (console.log("AFTER DIFFING PREVIOUS STATE: <" + r + + ">, selectionStart: " + l + ", selectionEnd: " + d), console.log( + "AFTER DIFFING CURRENT STATE: <" + a + ">, selectionStart: " + c + + ", selectionEnd: " + h)), { + text: a, + replacePrevCharCnt: d, + replaceNextCharCnt: r.length - d, + positionDelta: h - a.length + } + } + } + a.EMPTY = new a("", 0, 0, null, null); + class l { + static _getPageOfLine(e, t) { + return Math.floor((e - 1) / t) + } + static _getRangeForPage(e, t) { + const i = e * t, + n = i + 1, + o = i + t; + return new r.e(n, 1, o + 1, 1) + } + static fromEditorSelection(e, t, i, n, s) { + const d = l._getPageOfLine(i.startLineNumber, n), + c = l._getRangeForPage(d, n), + h = l._getPageOfLine(i.endLineNumber, n), + u = l._getRangeForPage(h, n), + g = c.intersectRanges(new r.e(1, 1, i.startLineNumber, i.startColumn)); + let p = t.getValueInRange(g, 1); + const m = t.getLineCount(), + f = t.getLineMaxColumn(m), + _ = u.intersectRanges(new r.e(i.endLineNumber, i.endColumn, m, f)); + let b, v = t.getValueInRange(_, 1); + if (d === h || d + 1 === h) b = t.getValueInRange(i, 1); + else { + const e = c.intersectRanges(i), + n = u.intersectRanges(i); + b = t.getValueInRange(e, 1) + String.fromCharCode(8230) + t.getValueInRange( + n, 1) + } + if (s) { + const e = 500; + p.length > e && (p = p.substring(p.length - e, p.length)), v.length > + e && (v = v.substring(0, e)), b.length > 2 * e && (b = b.substring(0, + e) + String.fromCharCode(8230) + b.substring(b.length - e, b.length)) + } + return new a(p + b + v, p.length, p.length + b.length, new o.L(i.startLineNumber, + i.startColumn), new o.L(i.endLineNumber, i.endColumn)) + } + } + }, + 9925: (e, t, i) => { + "use strict"; + i.d(t, { + yy: () => f, + Dl: () => _, + ZF: () => v, + YQ: () => b + }); + var n = i(7295), + o = i(4314), + r = i(1050), + s = i(5976), + a = i(6830), + l = i(8819), + d = i(1741), + c = i(2065), + h = i(5026), + u = i(3580); + const g = (0, c.yh)("IEditorCancelService"), + p = new l.uy("cancellableOperation", !1, (0, u.N)("cancellableOperation", + "Whether the editor runs a cancellable operation, e.g. like 'Peek References'" + )); + (0, h.z)(g, class { + constructor() { + this._tokens = new WeakMap + } + add(e, t) { + let i, n = this._tokens.get(e); + return n || (n = e.invokeWithinContext((e => ({ + key: p.bindTo(e.get(l.i6)), + tokens: new d.S + }))), this._tokens.set(e, n)), n.key.set(!0), i = n.tokens.push(t), () => { + i && (i(), n.key.set(!n.tokens.isEmpty()), i = void 0) + } + } + cancel(e) { + const t = this._tokens.get(e); + if (!t) return; + const i = t.tokens.pop(); + i && (i.cancel(), t.key.set(!t.tokens.isEmpty())) + } + }, !0); + class m extends r.A { + constructor(e, t) { + super(t), this.editor = e, this._unregister = e.invokeWithinContext(( + t => t.get(g).add(e, this))) + } + dispose() { + this._unregister(), super.dispose() + } + }(0, a.fK)(new class extends a._l { + constructor() { + super({ + id: "editor.cancelOperation", + kbOpts: { + weight: 100, + primary: 9 + }, + precondition: p + }) + } + runEditorCommand(e, t) { + e.get(g).cancel(t) + } + }); + class f { + constructor(e, t) { + if (this.flags = t, 0 != (1 & this.flags)) { + const t = e.getModel(); + this.modelVersionId = t ? n.WU("{0}#{1}", t.uri.toString(), t.getVersionId()) : + null + } else this.modelVersionId = null; + 0 != (4 & this.flags) ? this.position = e.getPosition() : this.position = + null, 0 != (2 & this.flags) ? this.selection = e.getSelection() : + this.selection = null, 0 != (8 & this.flags) ? (this.scrollLeft = e.getScrollLeft(), + this.scrollTop = e.getScrollTop()) : (this.scrollLeft = -1, this.scrollTop = - + 1) + } + _equals(e) { + if (!(e instanceof f)) return !1; + const t = e; + return this.modelVersionId === t.modelVersionId && this.scrollLeft === + t.scrollLeft && this.scrollTop === t.scrollTop && !(!this.position && + t.position || this.position && !t.position || this.position && t.position && + !this.position.equals(t.position)) && !(!this.selection && t.selection || + this.selection && !t.selection || this.selection && t.selection && ! + this.selection.equalsRange(t.selection)) + } + validate(e) { + return this._equals(new f(e, this.flags)) + } + } + class _ extends m { + constructor(e, t, i, n) { + super(e, n), this._listener = new s.SL, 4 & t && this._listener.add(e.onDidChangeCursorPosition( + (e => { + i && o.e.containsPosition(i, e.position) || this.cancel() + }))), 2 & t && this._listener.add(e.onDidChangeCursorSelection((e => { + i && o.e.containsRange(i, e.selection) || this.cancel() + }))), 8 & t && this._listener.add(e.onDidScrollChange((e => this.cancel()))), + 1 & t && (this._listener.add(e.onDidChangeModel((e => this.cancel()))), + this._listener.add(e.onDidChangeModelContent((e => this.cancel())))) + } + dispose() { + this._listener.dispose(), super.dispose() + } + } + class b extends r.A { + constructor(e, t) { + super(t), this._listener = e.onDidChangeContent((() => this.cancel())) + } + dispose() { + this._listener.dispose(), super.dispose() + } + } + class v { + constructor(e, t, i) { + this._visiblePosition = e, this._visiblePositionScrollDelta = t, this._cursorPosition = + i + } + static capture(e) { + let t = null, + i = 0; + if (0 !== e.getScrollTop()) { + const n = e.getVisibleRanges(); + if (n.length > 0) { + t = n[0].getStartPosition(); + const o = e.getTopForPosition(t.lineNumber, t.column); + i = e.getScrollTop() - o + } + } + return new v(t, i, e.getPosition()) + } + restore(e) { + if (this._visiblePosition) { + const t = e.getTopForPosition(this._visiblePosition.lineNumber, this._visiblePosition + .column); + e.setScrollTop(t + this._visiblePositionScrollDelta) + } + } + restoreRelativeVerticalPositionOfCursor(e) { + const t = e.getPosition(); + if (!this._cursorPosition || !t) return; + const i = e.getTopForLineNumber(t.lineNumber) - e.getTopForLineNumber( + this._cursorPosition.lineNumber); + e.setScrollTop(e.getScrollTop() + i) + } + } + }, + 3947: (e, t, i) => { + "use strict"; + i.d(t, { + $: () => T + }); + var n = i(5321), + o = i(4850), + r = i(8764), + s = i(3938), + a = i(6811), + l = i(7301), + d = i(4669), + c = i(9365), + h = i(1212), + u = i(4742); + let g; + ! function e(t, i, n) { + function o(s, a) { + if (!i[s]) { + if (!t[s]) { + if (r) return r(s, !0); + var l = new Error("Cannot find module '" + s + "'"); + throw l.code = "MODULE_NOT_FOUND", l + } + var d = i[s] = { + exports: {} + }; + t[s][0].call(d.exports, (function(e) { + return o(t[s][1][e] || e) + }), d, d.exports, e, t, i, n) + } + return i[s].exports + } + for (var r = void 0, s = 0; s < n.length; s++) o(n[s]); + return o + }({ + 1: [function(e, t, i) { + var n = e("./toMap"); + t.exports = { + uris: n(["background", "base", "cite", "href", "longdesc", "src", + "usemap" + ]) + } + }, { + "./toMap": 10 + }], + 2: [function(e, t, i) { + t.exports = { + allowedAttributes: { + "*": ["title", "accesskey"], + a: ["href", "name", "target", "aria-label"], + iframe: ["allowfullscreen", "frameborder", "src"], + img: ["src", "alt", "title", "aria-label"] + }, + allowedClasses: {}, + allowedSchemes: ["http", "https", "mailto"], + allowedTags: ["a", "abbr", "article", "b", "blockquote", "br", + "caption", "code", "del", "details", "div", "em", "h1", "h2", + "h3", "h4", "h5", "h6", "hr", "i", "img", "ins", "kbd", "li", + "main", "mark", "ol", "p", "pre", "section", "span", "strike", + "strong", "sub", "summary", "sup", "table", "tbody", "td", "th", + "thead", "tr", "u", "ul" + ], + filter: null + } + }, {}], + 3: [function(e, t, i) { + var n = e("./toMap"); + t.exports = { + voids: n(["area", "br", "col", "hr", "img", "wbr", "input", "base", + "basefont", "link", "meta" + ]) + } + }, { + "./toMap": 10 + }], + 4: [function(e, t, i) { + e("he"); + var n = e("assignment"), + o = e("./parser"), + r = e("./sanitizer"), + s = e("./defaults"); + + function a(e, t, i) { + var a = [], + l = !0 === i ? t : n({}, s, t), + d = r(a, l); + return o(e, d), a.join("") + } + a.defaults = s, t.exports = a, g = a + }, { + "./defaults": 2, + "./parser": 7, + "./sanitizer": 8, + assignment: 6, + he: 9 + }], + 5: [function(e, t, i) { + t.exports = function(e) { + return "string" == typeof e ? e.toLowerCase() : e + } + }, {}], + 6: [function(e, t, i) { + t.exports = function e(t) { + for (var i, n, o = Array.prototype.slice.call(arguments, 1); o.length;) + for (n in i = o.shift()) i.hasOwnProperty(n) && ( + "[object Object]" === Object.prototype.toString.call(t[n]) ? t[ + n] = e(t[n], i[n]) : t[n] = i[n]); + return t + } + }, {}], + 7: [function(e, t, i) { + var n = e("he"), + o = e("./lowercase"), + r = (e("./attributes"), e("./elements")), + s = + /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/, + a = /^<\s*\/\s*([\w:-]+)[^>]*>/, + l = + /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g, + d = /^")) >= 0 && + (t.comment && t.comment(e.substring(4, n)), e = e.substring(n + + 3), i = !1) : c.test(e) ? p(a, f) : d.test(e) && p(s, m), + function() { + if (i) { + var n, o = e.indexOf("<"); + o >= 0 ? (n = e.substring(0, o), e = e.substring(o)) : (n = e, + e = ""), t.chars && t.chars(n) + } + }(); + var o = e === u; + u = e, o && (e = "") + } + + function p(t, n) { + var o = e.match(t); + o && (e = e.substring(o[0].length), o[0].replace(t, n), i = !1) + } + + function m(e, i, s, a) { + var d = {}, + c = o(i), + u = r.voids[c] || !!a; + s.replace(l, (function(e, t, i, o, r) { + d[t] = void 0 === i && void 0 === o && void 0 === r ? void 0 : + n.decode(i || o || r || "") + })), u || h.push(c), t.start && t.start(c, d, u) + } + + function f(e, i) { + var n, r = 0, + s = o(i); + if (s) + for (r = h.length - 1; r >= 0 && h[r] !== s; r--); + if (r >= 0) { + for (n = h.length - 1; n >= r; n--) t.end && t.end(h[n]); + h.length = r + } + } + f() + } + }, { + "./attributes": 1, + "./elements": 3, + "./lowercase": 5, + he: 9 + }], + 8: [function(e, t, i) { + var n = e("he"), + o = e("./lowercase"), + r = e("./attributes"), + s = e("./elements"); + t.exports = function(e, t) { + var i, a = t || {}; + return c(), { + start: function(e, t, s) { + var c = o(e); + i.ignoring ? d(c) : -1 !== (a.allowedTags || []).indexOf(c) && + (!a.filter || a.filter({ + tag: c, + attrs: t + })) ? (l("<"), l(c), Object.keys(t).forEach((function(e) { + var i = t[e], + s = (a.allowedClasses || {})[c] || [], + d = (a.allowedAttributes || {})[c] || []; + d = d.concat((a.allowedAttributes || {})["*"] || []); + var h = o(e); + ("class" === h && -1 === d.indexOf(h) ? (i = i.split(" ") + .filter((function(e) { + return s && -1 !== s.indexOf(e) + })).join(" ").trim()).length : -1 !== d.indexOf(h) && (! + 0 !== r.uris[h] || function(e) { + var t = e[0]; + if ("#" === t || "/" === t) return !0; + var i = e.indexOf(":"); + if (-1 === i) return !0; + var n = e.indexOf("?"); + if (-1 !== n && i > n) return !0; + var o = e.indexOf("#"); + return -1 !== o && i > o || a.allowedSchemes.some(( + function(t) { + return 0 === e.indexOf(t + ":") + })) + }(i))) && (l(" "), l(e), "string" == typeof i && (l('="'), + l(n.encode(i)), l('"'))) + })), l(s ? "/>" : ">")) : d(c) + }, + end: function(e) { + var t = o(e); - 1 !== (a.allowedTags || []).indexOf(t) && !1 === + i.ignoring ? (l("")) : function(e) { + i.ignoring === e && --i.depth <= 0 && c() + }(t) + }, + chars: function(e) { + !1 === i.ignoring && l(a.transformText ? a.transformText(e) : + e) + } + }; + + function l(t) { + e.push(t) + } + + function d(e) { + s.voids[e] || (!1 === i.ignoring ? i = { + ignoring: e, + depth: 1 + } : i.ignoring === e && i.depth++) + } + + function c() { + i = { + ignoring: !1, + depth: 0 + } + } + } + }, { + "./attributes": 1, + "./elements": 3, + "./lowercase": 5, + he: 9 + }], + 9: [function(e, t, i) { + var n = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" + }, + o = { + "&": "&", + "<": "<", + ">": ">", + """: '"', + "'": "'" + }, + r = /(&|<|>|"|')/g, + s = /[&<>"']/g; + + function a(e) { + return n[e] + } + + function l(e) { + return o[e] + } + + function d(e) { + return null == e ? "" : String(e).replace(s, a) + } + + function c(e) { + return null == e ? "" : String(e).replace(r, l) + } + d.options = c.options = {}, t.exports = { + encode: d, + escape: d, + decode: c, + unescape: c, + version: "1.0.0-browser" + } + }, {}], + 10: [function(e, t, i) { + function n(e, t) { + return e[t] = !0, e + } + t.exports = function(e) { + return e.reduce(n, {}) + } + }, {}] + }, {}, [4]); + var p, m = g, + f = i(3720), + _ = i(3897), + b = i(6663), + v = i(6248), + w = i(5935), + C = i(7295), + y = i(666); + const S = null === (p = window.trustedTypes) || void 0 === p ? void 0 : p + .createPolicy("insane", { + createHTML: (e, t) => m(e, t) + }); + var x, k = i(988), + L = i(1531), + N = i(5713), + D = i(5976), + E = i(4101), + I = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let T = class e { + constructor(e, t, i) { + this._options = e, this._modeService = t, this._openerService = i, + this._onDidRenderAsync = new d.Q5, this.onDidRenderAsync = this._onDidRenderAsync + .event + } + dispose() { + this._onDidRenderAsync.dispose() + } + render(e, t, i) { + const g = new D.SL; + let p; + return p = e ? function(e, t = {}, i = {}) { + var g; + const p = (0, r.az)(t), + x = function(t) { + let i; + try { + i = (0, _.Q)(decodeURIComponent(t)) + } catch (e) {} + return i ? (i = (0, v.rs)(i, (t => e.uris && e.uris[t] ? y.o.revive( + e.uris[t]) : void 0)), encodeURIComponent(JSON.stringify(i))) : + t + }, + k = function(t, i) { + const n = e.uris && e.uris[t]; + if (!n) return t; + let o = y.o.revive(n); + return i ? t.startsWith(b.lg.data + ":") ? t : b.Gi.asBrowserUri( + o).toString(!0) : y.o.parse(t).toString() === o.toString() ? t : + (o.query && (o = o.with({ + query: x(o.query) + })), o.toString()) + }; + let L; + const N = new Promise((e => L = e)), + D = new f.Renderer; + if (D.image = (e, i, n) => { + let o = [], + r = []; + if (e) { + ({ + href: e, + dimensions: o + } = (0, c.v1)(e)), e = k(e, !0); + try { + const i = y.o.parse(e); + t.baseUrl && i.scheme === b.lg.file && (e = (0, w.i3)(t.baseUrl, + e).toString()) + } catch (e) {} + r.push(`src="${e}"`) + } + return n && r.push(`alt="${n}"`), i && r.push(`title="${i}"`), o.length && + (r = r.concat(o)), "" + }, D.link = (i, n, o) => (i === o && (o = (0, c.oR)(o)), i = k(i, ! + 1), t.baseUrl && (/^\w[\w\d+.-]*:/.test(i) || (i = (0, w.i3)(t.baseUrl, + i).toString())), n = (0, c.oR)(n), !(i = (0, c.oR)(i)) || i.match( + /^data:|javascript:/i) || i.match(/^command:/i) && !e.isTrusted || + i.match(/^command:(\/\/\/)?_workbench\.downloadResource/i) ? o : + `/g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${n||i}">${o}` + ), D.paragraph = t => (e.supportThemeIcons && (t = (0, a.T)(t).map( + (e => "string" == typeof e ? e : e.outerHTML)).join("")), + `

    ${t}

    `), t.codeBlockRenderer && (D.code = (e, i) => { + const o = t.codeBlockRenderer(i, e), + r = u.a.nextId(), + s = Promise.all([o, N]).then((e => { + const t = p.querySelector(`div[data-code="${r}"]`); + t && n.mc(t, e[0]) + })).catch((e => {})); + return t.asyncRenderCallback && s.then(t.asyncRenderCallback), + `
    ${(0,C.YU)(e)}
    ` + }), t.actionHandler) { + const e = t.actionHandler.disposables.add(new o.Y(p, "click")), + i = t.actionHandler.disposables.add(new o.Y(p, "auxclick")); + t.actionHandler.disposables.add(d.ju.any(e.event, i.event)((e => { + const i = new s.n(e); + if (!i.leftButton && !i.middleButton) return; + let n = i.target; + if ("A" === n.tagName || (n = n.parentElement, n && "A" === n + .tagName)) try { + const e = n.dataset.href; + e && t.actionHandler.callback(e, i) + } catch (e) { + (0, l.dL)(e) + } finally { + i.preventDefault() + } + }))) + } + i.sanitizer = t => (e.isTrusted ? t.match( + /^(]+>)|(<\/\s*span>)$/) : void 0) ? t : "", i.sanitize = ! + 0, i.silent = !0, i.renderer = D; + let E = null !== (g = e.value) && void 0 !== g ? g : ""; + E.length > 1e5 && (E = `${E.substr(0,1e5)}…`), e.supportThemeIcons && + (E = (0, h.f$)(E)); + const I = f.parse(E, i); + if (p.innerHTML = function(e, t) { + var i; + const n = function(e) { + const t = [b.lg.http, b.lg.https, b.lg.mailto, b.lg.data, b.lg.file, + b.lg.vscodeFileResource, b.lg.vscodeRemote, b.lg.vscodeRemoteResource + ]; + return e.isTrusted && t.push(b.lg.command), { + allowedSchemes: t, + allowedTags: ["ul", "li", "p", "code", "blockquote", "ol", + "h1", "h2", "h3", "h4", "h5", "h6", "hr", "em", "pre", + "table", "thead", "tbody", "tr", "th", "td", "div", "del", + "a", "strong", "br", "img", "span" + ], + allowedAttributes: { + a: ["href", "name", "target", "data-href"], + img: ["src", "title", "alt", "width", "height"], + div: ["class", "data-code"], + span: ["class", "style"], + th: ["align"], + td: ["align"] + }, + filter: t => !("span" === t.tag && e.isTrusted && (t.attrs.style && + 1 === Object.keys(t.attrs).length ? !t.attrs.style.match( + /^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/ + ) : !t.attrs.class || !t.attrs.class.match( + /^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/ + ))) + } + }(e); + return null !== (i = null == S ? void 0 : S.createHTML(t, n)) && + void 0 !== i ? i : m(t, n) + }(e, I), L(), t.asyncRenderCallback) + for (const e of p.getElementsByTagName("img")) { + const i = n.nm(e, "load", (() => { + i.dispose(), t.asyncRenderCallback() + })) + } + return p + }(e, Object.assign(Object.assign({}, this._getRenderOptions(e, g)), + t), i) : document.createElement("span"), { + element: p, + dispose: () => g.dispose() + } + } + _getRenderOptions(t, i) { + return { + baseUrl: this._options.baseUrl, + codeBlockRenderer: (t, i) => { + return n = this, o = void 0, s = function*() { + var n, o, r, s; + let a; + t ? a = this._modeService.getModeIdForLanguageName(t) : this._options + .editor && (a = null === (n = this._options.editor.getModel()) || + void 0 === n ? void 0 : n.getLanguageIdentifier().language), a || + (a = "plaintext"), this._modeService.triggerMode(a); + const l = null !== (o = yield E.RW.getPromise(a)) && void 0 !== + o ? o : void 0, + d = document.createElement("span"); + d.innerHTML = null !== (s = null === (r = e._ttpTokenizer) || + void 0 === r ? void 0 : r.createHTML(i, l)) && void 0 !== s ? + s : (0, N.C)(i, l); + let c = this._options.codeBlockFontFamily; + return this._options.editor && (c = this._options.editor.getOption( + 42).fontFamily), c && (d.style.fontFamily = c), d + }, new((r = void 0) || (r = Promise))((function(e, t) { + function i(e) { + try { + l(s.next(e)) + } catch (e) { + t(e) + } + } + + function a(e) { + try { + l(s.throw(e)) + } catch (e) { + t(e) + } + } + + function l(t) { + var n; + t.done ? e(t.value) : (n = t.value, n instanceof r ? n : new r( + (function(e) { + e(n) + }))).then(i, a) + } + l((s = s.apply(n, o || [])).next()) + })); + var n, o, r, s + }, + asyncRenderCallback: () => this._onDidRenderAsync.fire(), + actionHandler: { + callback: e => this._openerService.open(e, { + fromUserGesture: !0, + allowContributedOpeners: !0, + allowCommands: t.isTrusted + }).catch(l.dL), + disposables: i + } + } + } + }; + T._ttpTokenizer = null === (x = window.trustedTypes) || void 0 === x ? + void 0 : x.createPolicy("tokenizeToString", { + createHTML: (e, t) => (0, N.C)(e, t) + }), T = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([I(1, L.h), I(2, k.v4)], T) + }, + 5520: (e, t, i) => { + "use strict"; + i.d(t, { + CL: () => o, + QI: () => r, + Pi: () => s + }); + var n = i(6518); + + function o(e) { + return !(!e || "function" != typeof e.getEditorType) && e.getEditorType() === + n.g.ICodeEditor + } + + function r(e) { + return !(!e || "function" != typeof e.getEditorType) && e.getEditorType() === + n.g.IDiffEditor + } + + function s(e) { + return o(e) ? e : r(e) ? e.getModifiedEditor() : null + } + }, + 6830: (e, t, i) => { + "use strict"; + i.d(t, { + mY: () => b, + AJ: () => v, + _l: () => C, + R6: () => y, + jY: () => S, + sb: () => x, + f: () => k, + fK: () => L, + Qr: () => N, + rn: () => D, + QG: () => E, + _K: () => I, + Uc: () => n, + n_: () => A, + kz: () => R, + Sq: () => O + }); + var n, o = i(3580), + r = i(666), + s = i(1640), + a = i(187), + l = i(1200), + d = i(8216), + c = i(4144), + h = i(4565), + u = i(8819), + g = i(9989), + p = i(9872), + m = i(829), + f = i(8401), + _ = i(3557); + class b { + constructor(e) { + this.id = e.id, this.precondition = e.precondition, this._kbOpts = e.kbOpts, + this._menuOpts = e.menuOpts, this._description = e.description + } + register() { + if (Array.isArray(this._menuOpts) ? this._menuOpts.forEach(this._registerMenuItem, + this) : this._menuOpts && this._registerMenuItem(this._menuOpts), + this._kbOpts) { + const e = Array.isArray(this._kbOpts) ? this._kbOpts : [this._kbOpts]; + for (const t of e) { + let e = t.kbExpr; + this.precondition && (e = e ? u.Ao.and(e, this.precondition) : this.precondition); + const i = { + id: this.id, + weight: t.weight, + args: t.args, + when: e, + primary: t.primary, + secondary: t.secondary, + win: t.win, + linux: t.linux, + mac: t.mac + }; + g.W.registerKeybindingRule(i) + } + } + h.P.registerCommand({ + id: this.id, + handler: (e, t) => this.runCommand(e, t), + description: this._description + }) + } + _registerMenuItem(e) { + c.BH.appendMenuItem(e.menuId, { + group: e.group, + command: { + id: this.id, + title: e.title, + icon: e.icon, + precondition: this.precondition + }, + when: e.when, + order: e.order + }) + } + } + class v extends b { + constructor() { + super(...arguments), this._implementations = [] + } + addImplementation(e, t, i) { + return this._implementations.push({ + priority: e, + name: t, + implementation: i + }), this._implementations.sort(((e, t) => t.priority - e.priority)), { + dispose: () => { + for (let e = 0; e < this._implementations.length; e++) + if (this._implementations[e].implementation === i) return void this + ._implementations.splice(e, 1) + } + } + } + runCommand(e, t) { + const i = e.get(_.VZ); + i.trace( + `Executing Command '${this.id}' which has ${this._implementations.length} bound.` + ); + for (const n of this._implementations) { + const o = n.implementation(e, t); + if (o) { + if (i.trace(`Command '${this.id}' was handled by '${n.name}'.`), + "boolean" == typeof o) return; + return o + } + } + i.trace( + `The Command '${this.id}' was not handled by any implementation.`) + } + } + class w extends b { + constructor(e, t) { + super(t), this.command = e + } + runCommand(e, t) { + return this.command.runCommand(e, t) + } + } + class C extends b { + static bindToContribution(e) { + return class extends C { + constructor(e) { + super(e), this._callback = e.handler + } + runEditorCommand(t, i, n) { + e(i) && this._callback(e(i), n) + } + } + } + runCommand(e, t) { + const i = e.get(s.$), + n = i.getFocusedCodeEditor() || i.getActiveCodeEditor(); + if (n) return n.invokeWithinContext((e => { + if (e.get(u.i6).contextMatchesRules((0, f.f6)(this.precondition))) + return this.runEditorCommand(e, n, t) + })) + } + } + class y extends C { + constructor(e) { + super(y.convertOptions(e)), this.label = e.label, this.alias = e.alias + } + static convertOptions(e) { + let t; + + function i(t) { + return t.menuId || (t.menuId = c.eH.EditorContext), t.title || (t.title = + e.label), t.when = u.Ao.and(e.precondition, t.when), t + } + return t = Array.isArray(e.menuOpts) ? e.menuOpts : e.menuOpts ? [e.menuOpts] : [], + Array.isArray(e.contextMenuOpts) ? t.push(...e.contextMenuOpts.map(i)) : + e.contextMenuOpts && t.push(i(e.contextMenuOpts)), e.menuOpts = t, e + } + runEditorCommand(e, t, i) { + return this.reportTelemetry(e, t), this.run(e, t, i || {}) + } + reportTelemetry(e, t) { + e.get(m.b).publicLog2("editorActionInvoked", { + name: this.label, + id: this.id + }) + } + } + class S extends y { + constructor() { + super(...arguments), this._implementations = [] + } + addImplementation(e, t) { + return this._implementations.push([e, t]), this._implementations.sort( + ((e, t) => t[0] - e[0])), { + dispose: () => { + for (let e = 0; e < this._implementations.length; e++) + if (this._implementations[e][1] === t) return void this._implementations + .splice(e, 1) + } + } + } + run(e, t, i) { + for (const n of this._implementations) { + const o = n[1](e, t, i); + if (o) { + if ("boolean" == typeof o) return; + return o + } + } + } + } + + function x(e, t) { + h.P.registerCommand(e, (function(e, ...i) { + const [n, o] = i; + (0, f.p_)(r.o.isUri(n)), (0, f.p_)(a.L.isIPosition(o)); + const s = e.get(l.q).getModel(n); + if (s) { + const e = a.L.lift(o); + return t(s, e, ...i.slice(2)) + } + return e.get(d.S).createModelReference(n).then((e => new Promise(((n, + r) => { + try { + n(t(e.object.textEditorModel, a.L.lift(o), i.slice(2))) + } catch (e) { + r(e) + } + })).finally((() => { + e.dispose() + })))) + })) + } + + function k(e, t) { + h.P.registerCommand(e, (function(e, ...i) { + const [n] = i; + (0, f.p_)(r.o.isUri(n)); + const o = e.get(l.q).getModel(n); + return o ? t(o, ...i.slice(1)) : e.get(d.S).createModelReference(n).then( + (e => new Promise(((n, o) => { + try { + n(t(e.object.textEditorModel, i.slice(1))) + } catch (e) { + o(e) + } + })).finally((() => { + e.dispose() + })))) + })) + } + + function L(e) { + return T.INSTANCE.registerEditorCommand(e), e + } + + function N(e) { + const t = new e; + return T.INSTANCE.registerEditorAction(t), t + } + + function D(e) { + return T.INSTANCE.registerEditorAction(e), e + } + + function E(e) { + T.INSTANCE.registerEditorAction(e) + } + + function I(e, t) { + T.INSTANCE.registerEditorContribution(e, t) + }! function(e) { + e.getEditorCommand = function(e) { + return T.INSTANCE.getEditorCommand(e) + }, e.getEditorActions = function() { + return T.INSTANCE.getEditorActions() + }, e.getEditorContributions = function() { + return T.INSTANCE.getEditorContributions() + }, e.getSomeEditorContributions = function(e) { + return T.INSTANCE.getEditorContributions().filter((t => e.indexOf(t.id) >= + 0)) + }, e.getDiffEditorContributions = function() { + return T.INSTANCE.getDiffEditorContributions() + } + }(n || (n = {})); + class T { + constructor() { + this.editorContributions = [], this.diffEditorContributions = [], this + .editorActions = [], this.editorCommands = Object.create(null) + } + registerEditorContribution(e, t) { + this.editorContributions.push({ + id: e, + ctor: t + }) + } + getEditorContributions() { + return this.editorContributions.slice(0) + } + getDiffEditorContributions() { + return this.diffEditorContributions.slice(0) + } + registerEditorAction(e) { + e.register(), this.editorActions.push(e) + } + getEditorActions() { + return this.editorActions.slice(0) + } + registerEditorCommand(e) { + e.register(), this.editorCommands[e.id] = e + } + getEditorCommand(e) { + return this.editorCommands[e] || null + } + } + + function M(e) { + return e.register(), e + } + T.INSTANCE = new T, p.B.add("editor.contributions", T.INSTANCE); + const A = M(new v({ + id: "undo", + precondition: void 0, + kbOpts: { + weight: 0, + primary: 2104 + }, + menuOpts: [{ + menuId: c.eH.MenubarEditMenu, + group: "1_do", + title: o.N({ + key: "miUndo", + comment: ["&& denotes a mnemonic"] + }, "&&Undo"), + order: 1 + }, { + menuId: c.eH.CommandPalette, + group: "", + title: o.N("undo", "Undo"), + order: 1 + }] + })); + M(new w(A, { + id: "default:undo", + precondition: void 0 + })); + const R = M(new v({ + id: "redo", + precondition: void 0, + kbOpts: { + weight: 0, + primary: 2103, + secondary: [3128], + mac: { + primary: 3128 + } + }, + menuOpts: [{ + menuId: c.eH.MenubarEditMenu, + group: "1_do", + title: o.N({ + key: "miRedo", + comment: ["&& denotes a mnemonic"] + }, "&&Redo"), + order: 2 + }, { + menuId: c.eH.CommandPalette, + group: "", + title: o.N("redo", "Redo"), + order: 1 + }] + })); + M(new w(R, { + id: "default:redo", + precondition: void 0 + })); + const O = M(new v({ + id: "editor.action.selectAll", + precondition: void 0, + kbOpts: { + weight: 0, + kbExpr: null, + primary: 2079 + }, + menuOpts: [{ + menuId: c.eH.MenubarSelectionMenu, + group: "1_basic", + title: o.N({ + key: "miSelectAll", + comment: ["&& denotes a mnemonic"] + }, "&&Select All"), + order: 1 + }, { + menuId: c.eH.CommandPalette, + group: "", + title: o.N("selectAll", "Select All"), + order: 1 + }] + })) + }, + 6007: (e, t, i) => { + "use strict"; + i.d(t, { + vu: () => s, + fo: () => a, + Gl: () => l + }); + var n = i(2065), + o = i(666), + r = i(8401); + const s = (0, n.yh)("IWorkspaceEditService"); + class a { + constructor(e) { + this.metadata = e + } + static convert(e) { + return e.edits.map((e => { + if (t = e, (0, r.Kn)(t) && o.o.isUri(t.resource) && (0, r.Kn)(t.edit)) + return new l(e.resource, e.edit, e.modelVersionId, e.metadata); + var t; + if (function(e) { + return (0, r.Kn)(e) && (Boolean(e.newUri) || Boolean(e.oldUri)) + }(e)) return new d(e.oldUri, e.newUri, e.options, e.metadata); + throw new Error("Unsupported edit") + })) + } + } + class l extends a { + constructor(e, t, i, n) { + super(n), this.resource = e, this.textEdit = t, this.versionId = i + } + } + class d extends a { + constructor(e, t, i, n) { + super(n), this.oldResource = e, this.newResource = t, this.options = i + } + } + }, + 1640: (e, t, i) => { + "use strict"; + i.d(t, { + $: () => n + }); + const n = (0, i(2065).yh)("codeEditorService") + }, + 6341: (e, t, i) => { + "use strict"; + i.d(t, { + Gm: () => Vo + }); + var n = i(6479), + o = i(6830); + let r = class { + constructor(e, t) {} + dispose() {} + }; + var s, a; + r.ID = "editor.contrib.markerDecorations", r = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(s = 1, a = n.i, function(e, t) { + a(e, t, s) + })], r), (0, o._K)(r.ID, r); + var l = i(3379), + d = i.n(l), + c = i(7795), + h = i.n(c), + u = i(569), + g = i.n(u), + p = i(3565), + m = i.n(p), + f = i(9216), + _ = i.n(f), + b = i(4589), + v = i.n(b), + w = i(7337), + C = {}; + C.styleTagTransform = v(), C.setAttributes = m(), C.insert = g().bind( + null, "head"), C.domAPI = h(), C.insertStyleElement = _(), d()(w.Z, C), + w.Z && w.Z.locals && w.Z.locals; + var y = i(3580), + S = i(5321), + x = i(7301), + k = i(4669), + L = i(5976), + N = i(6663), + D = i(9052), + E = i(1640), + I = i(6268), + T = i(3860), + M = i(8626), + A = i(1432), + R = i(553), + O = i(3938), + P = i(5393), + F = i(7974); + class B { + constructor(e, t) { + this.x = e, this.y = t, this._pageCoordinatesBrand = void 0 + } + toClientCoordinates() { + return new W(this.x - S.DI.scrollX, this.y - S.DI.scrollY) + } + } + class W { + constructor(e, t) { + this.clientX = e, this.clientY = t, this._clientCoordinatesBrand = + void 0 + } + toPageCoordinates() { + return new B(this.clientX + S.DI.scrollX, this.clientY + S.DI.scrollY) + } + } + class z { + constructor(e, t, i, n) { + this.x = e, this.y = t, this.width = i, this.height = n, this._editorPagePositionBrand = + void 0 + } + } + + function V(e) { + const t = S.i(e); + return new z(t.left, t.top, t.width, t.height) + } + class H extends O.n { + constructor(e, t) { + super(e), this._editorMouseEventBrand = void 0, this.pos = new B(this + .posx, this.posy), this.editorPos = V(t) + } + } + class U { + constructor(e) { + this._editorViewDomNode = e + } + _create(e) { + return new H(e, this._editorViewDomNode) + } + onContextMenu(e, t) { + return S.nm(e, "contextmenu", (e => { + t(this._create(e)) + })) + } + onMouseUp(e, t) { + return S.nm(e, "mouseup", (e => { + t(this._create(e)) + })) + } + onMouseDown(e, t) { + return S.nm(e, "mousedown", (e => { + t(this._create(e)) + })) + } + onMouseLeave(e, t) { + return S.j_(e, (e => { + t(this._create(e)) + })) + } + onMouseMoveThrottled(e, t, i, n) { + return S.Y_(e, "mousemove", t, ((e, t) => i(e, this._create(t))), n) + } + } + class j { + constructor(e) { + this._editorViewDomNode = e + } + _create(e) { + return new H(e, this._editorViewDomNode) + } + onPointerUp(e, t) { + return S.nm(e, "pointerup", (e => { + t(this._create(e)) + })) + } + onPointerDown(e, t) { + return S.nm(e, "pointerdown", (e => { + t(this._create(e)) + })) + } + onPointerLeave(e, t) { + return S.RE(e, (e => { + t(this._create(e)) + })) + } + onPointerMoveThrottled(e, t, i, n) { + return S.Y_(e, "pointermove", t, ((e, t) => i(e, this._create(t))), n) + } + } + class K extends L.JT { + constructor(e) { + super(), this._editorViewDomNode = e, this._globalMouseMoveMonitor = + this._register(new F.Z), this._keydownListener = null + } + startMonitoring(e, t, i, n, o) { + this._keydownListener = S.mu(document, "keydown", (e => { + e.toKeybinding().isModifierKey() || this._globalMouseMoveMonitor.stopMonitoring(! + 0, e.browserEvent) + }), !0), this._globalMouseMoveMonitor.startMonitoring(e, t, ((e, t) => + i(e, new H(t, this._editorViewDomNode))), n, (e => { + this._keydownListener.dispose(), o(e) + })) + } + stopMonitoring() { + this._globalMouseMoveMonitor.stopMonitoring(!0) + } + } + class $ extends L.JT { + constructor() { + super(), this._shouldRender = !0 + } + shouldRender() { + return this._shouldRender + } + forceShouldRender() { + this._shouldRender = !0 + } + setShouldRender() { + this._shouldRender = !0 + } + onDidRender() { + this._shouldRender = !1 + } + onCompositionStart(e) { + return !1 + } + onCompositionEnd(e) { + return !1 + } + onConfigurationChanged(e) { + return !1 + } + onCursorStateChanged(e) { + return !1 + } + onDecorationsChanged(e) { + return !1 + } + onFlushed(e) { + return !1 + } + onFocusChanged(e) { + return !1 + } + onLanguageConfigurationChanged(e) { + return !1 + } + onLineMappingChanged(e) { + return !1 + } + onLinesChanged(e) { + return !1 + } + onLinesDeleted(e) { + return !1 + } + onLinesInserted(e) { + return !1 + } + onRevealRangeRequest(e) { + return !1 + } + onScrollChanged(e) { + return !1 + } + onThemeChanged(e) { + return !1 + } + onTokensChanged(e) { + return !1 + } + onTokensColorsChanged(e) { + return !1 + } + onZonesChanged(e) { + return !1 + } + handleEvents(e) { + let t = !1; + for (let i = 0, n = e.length; i < n; i++) { + let n = e[i]; + switch (n.type) { + case 0: + this.onCompositionStart(n) && (t = !0); + break; + case 1: + this.onCompositionEnd(n) && (t = !0); + break; + case 2: + this.onConfigurationChanged(n) && (t = !0); + break; + case 3: + this.onCursorStateChanged(n) && (t = !0); + break; + case 4: + this.onDecorationsChanged(n) && (t = !0); + break; + case 5: + this.onFlushed(n) && (t = !0); + break; + case 6: + this.onFocusChanged(n) && (t = !0); + break; + case 7: + this.onLanguageConfigurationChanged(n) && (t = !0); + break; + case 8: + this.onLineMappingChanged(n) && (t = !0); + break; + case 9: + this.onLinesChanged(n) && (t = !0); + break; + case 10: + this.onLinesDeleted(n) && (t = !0); + break; + case 11: + this.onLinesInserted(n) && (t = !0); + break; + case 12: + this.onRevealRangeRequest(n) && (t = !0); + break; + case 13: + this.onScrollChanged(n) && (t = !0); + break; + case 15: + this.onTokensChanged(n) && (t = !0); + break; + case 14: + this.onThemeChanged(n) && (t = !0); + break; + case 16: + this.onTokensColorsChanged(n) && (t = !0); + break; + case 17: + this.onZonesChanged(n) && (t = !0); + break; + default: + console.info("View received unknown event: "), console.info(n) + } + } + t && (this._shouldRender = !0) + } + } + class q extends $ { + constructor(e) { + super(), this._context = e, this._context.addEventHandler(this) + } + dispose() { + this._context.removeEventHandler(this), super.dispose() + } + } + class Z { + static write(e, t) { + M.Z, e.setAttribute("data-mprt", String(t)) + } + static read(e) { + const t = e.getAttribute("data-mprt"); + return null === t ? 0 : parseInt(t, 10) + } + static collect(e, t) { + let i = [], + n = 0; + for (; e && e !== document.body && e !== t;) e.nodeType === e.ELEMENT_NODE && + (i[n++] = this.read(e)), e = e.parentElement; + const o = new Uint8Array(n); + for (let e = 0; e < n; e++) o[e] = i[n - e - 1]; + return o + } + } + class G extends class { + constructor(e, t) { + this._restrictedRenderingContextBrand = void 0, this._viewLayout = e, + this.viewportData = t, this.scrollWidth = this._viewLayout.getScrollWidth(), + this.scrollHeight = this._viewLayout.getScrollHeight(), this.visibleRange = + this.viewportData.visibleRange, this.bigNumbersDelta = this.viewportData + .bigNumbersDelta; + const i = this._viewLayout.getCurrentViewport(); + this.scrollTop = i.top, this.scrollLeft = i.left, this.viewportWidth = + i.width, this.viewportHeight = i.height + } + getScrolledTopFromAbsoluteTop(e) { + return e - this.scrollTop + } + getVerticalOffsetForLineNumber(e) { + return this._viewLayout.getVerticalOffsetForLineNumber(e) + } + getDecorationsInViewport() { + return this.viewportData.getDecorationsInViewport() + } + } { + constructor(e, t, i) { + super(e, t), this._renderingContextBrand = void 0, this._viewLines = i + } + linesVisibleRangesForRange(e, t) { + return this._viewLines.linesVisibleRangesForRange(e, t) + } + visibleRangeForPosition(e) { + return this._viewLines.visibleRangeForPosition(e) + } + } + class Y { + constructor(e, t, i) { + this.outsideRenderedLine = e, this.lineNumber = t, this.ranges = i + } + } + class Q { + constructor(e, t) { + this._horizontalRangeBrand = void 0, this.left = Math.round(e), this.width = + Math.round(t) + } + static from(e) { + const t = new Array(e.length); + for (let i = 0, n = e.length; i < n; i++) { + const n = e[i]; + t[i] = new Q(n.left, n.width) + } + return t + } + toString() { + return `[${this.left},${this.width}]` + } + } + class X { + constructor(e, t) { + this._floatHorizontalRangeBrand = void 0, this.left = e, this.width = + t + } + toString() { + return `[${this.left},${this.width}]` + } + static compare(e, t) { + return e.left - t.left + } + } + class J { + constructor(e, t) { + this.outsideRenderedLine = e, this.originalLeft = t, this.left = Math.round( + this.originalLeft) + } + } + class ee { + constructor(e, t) { + this.outsideRenderedLine = e, this.ranges = t + } + } + class te { + static _createRange() { + return this._handyReadyRange || (this._handyReadyRange = document.createRange()), + this._handyReadyRange + } + static _detachRange(e, t) { + e.selectNodeContents(t) + } + static _readClientRects(e, t, i, n, o) { + const r = this._createRange(); + try { + return r.setStart(e, t), r.setEnd(i, n), r.getClientRects() + } catch (e) { + return null + } finally { + this._detachRange(r, o) + } + } + static _mergeAdjacentRanges(e) { + if (1 === e.length) return e; + e.sort(X.compare); + let t = [], + i = 0, + n = e[0]; + for (let o = 1, r = e.length; o < r; o++) { + const r = e[o]; + n.left + n.width + .9 >= r.left ? n.width = Math.max(n.width, r.left + + r.width - n.left) : (t[i++] = n, n = r) + } + return t[i++] = n, t + } + static _createHorizontalRangesFromClientRects(e, t) { + if (!e || 0 === e.length) return null; + const i = []; + for (let n = 0, o = e.length; n < o; n++) { + const o = e[n]; + i[n] = new X(Math.max(0, o.left - t), o.width) + } + return this._mergeAdjacentRanges(i) + } + static readHorizontalRanges(e, t, i, n, o, r, s) { + const a = e.children.length - 1; + if (0 > a) return null; + if ((t = Math.min(a, Math.max(0, t))) === (n = Math.min(a, Math.max(0, + n))) && i === o && 0 === i && !e.children[t].firstChild) { + const i = e.children[t].getClientRects(); + return this._createHorizontalRangesFromClientRects(i, r) + } + t !== n && n > 0 && 0 === o && (n--, o = 1073741824); + let l = e.children[t].firstChild, + d = e.children[n].firstChild; + if (l && d || (!l && 0 === i && t > 0 && (l = e.children[t - 1].firstChild, + i = 1073741824), !d && 0 === o && n > 0 && (d = e.children[n - 1].firstChild, + o = 1073741824)), !l || !d) return null; + i = Math.min(l.textContent.length, Math.max(0, i)), o = Math.min(d.textContent + .length, Math.max(0, o)); + const c = this._readClientRects(l, i, d, o, s); + return this._createHorizontalRangesFromClientRects(c, r) + } + } + var ie = i(2550), + ne = i(7736), + oe = i(2321), + re = i(4141); + const se = !!A.tY || !(A.IJ || I.vU || I.G6); + let ae = !0; + class le { + constructor(e, t) { + this._domNode = e, this._clientRectDeltaLeft = 0, this._clientRectDeltaLeftRead = ! + 1, this.endNode = t + } + get clientRectDeltaLeft() { + return this._clientRectDeltaLeftRead || (this._clientRectDeltaLeftRead = ! + 0, this._clientRectDeltaLeft = this._domNode.getBoundingClientRect() + .left), this._clientRectDeltaLeft + } + } + class de { + constructor(e, t) { + this.themeType = t; + const i = e.options, + n = i.get(42); + this.renderWhitespace = i.get(88), this.renderControlCharacters = i.get( + 82), this.spaceWidth = n.spaceWidth, this.middotWidth = n.middotWidth, + this.wsmiddotWidth = n.wsmiddotWidth, this.useMonospaceOptimizations = + n.isMonospace && !i.get(28), this.canUseHalfwidthRightwardsArrow = n.canUseHalfwidthRightwardsArrow, + this.lineHeight = i.get(58), this.stopRenderingLineAfter = i.get(105), + this.fontLigatures = i.get(43) + } + equals(e) { + return this.themeType === e.themeType && this.renderWhitespace === e.renderWhitespace && + this.renderControlCharacters === e.renderControlCharacters && this.spaceWidth === + e.spaceWidth && this.middotWidth === e.middotWidth && this.wsmiddotWidth === + e.wsmiddotWidth && this.useMonospaceOptimizations === e.useMonospaceOptimizations && + this.canUseHalfwidthRightwardsArrow === e.canUseHalfwidthRightwardsArrow && + this.lineHeight === e.lineHeight && this.stopRenderingLineAfter === e + .stopRenderingLineAfter && this.fontLigatures === e.fontLigatures + } + } + class ce { + constructor(e) { + this._options = e, this._isMaybeInvalid = !0, this._renderedViewLine = + null + } + getDomNode() { + return this._renderedViewLine && this._renderedViewLine.domNode ? this + ._renderedViewLine.domNode.domNode : null + } + setDomNode(e) { + if (!this._renderedViewLine) throw new Error( + "I have no rendered view line to set the dom node to..."); + this._renderedViewLine.domNode = (0, M.X)(e) + } + onContentChanged() { + this._isMaybeInvalid = !0 + } + onTokensChanged() { + this._isMaybeInvalid = !0 + } + onDecorationsChanged() { + this._isMaybeInvalid = !0 + } + onOptionsChanged(e) { + this._isMaybeInvalid = !0, this._options = e + } + onSelectionChanged() { + return (this._options.themeType === oe.e.HIGH_CONTRAST || "selection" === + this._options.renderWhitespace) && (this._isMaybeInvalid = !0, !0) + } + renderLine(e, t, i, n) { + if (!1 === this._isMaybeInvalid) return !1; + this._isMaybeInvalid = !1; + const o = i.getViewLineRenderingData(e), + r = this._options, + s = ie.Kp.filter(o.inlineDecorations, e, o.minColumn, o.maxColumn); + let a = null; + if (r.themeType === oe.e.HIGH_CONTRAST || "selection" === this._options + .renderWhitespace) { + const t = i.selections; + for (const i of t) { + if (i.endLineNumber < e || i.startLineNumber > e) continue; + const t = i.startLineNumber === e ? i.startColumn : o.minColumn, + n = i.endLineNumber === e ? i.endColumn : o.maxColumn; + t < n && (r.themeType === oe.e.HIGH_CONTRAST || "selection" !== this + ._options.renderWhitespace ? s.push(new ie.Kp(t, n, + "inline-selected-text", 0)) : (a || (a = []), a.push(new ne.zG(t - + 1, n - 1)))) + } + } + const l = new ne.IJ(r.useMonospaceOptimizations, r.canUseHalfwidthRightwardsArrow, + o.content, o.continuesWithWrappedLine, o.isBasicASCII, o.containsRTL, + o.minColumn - 1, o.tokens, s, o.tabSize, o.startVisibleColumn, r.spaceWidth, + r.middotWidth, r.wsmiddotWidth, r.stopRenderingLineAfter, r.renderWhitespace, + r.renderControlCharacters, r.fontLigatures !== re.n0.OFF, a); + if (this._renderedViewLine && this._renderedViewLine.input.equals(l)) + return !1; + n.appendASCIIString('
    '); + const d = (0, ne.d1)(l, n); + n.appendASCIIString("
    "); + let c = null; + return ae && se && o.isBasicASCII && r.useMonospaceOptimizations && 0 === + d.containsForeignElements && o.content.length < 300 && l.lineTokens.getCount() < + 100 && (c = new he(this._renderedViewLine ? this._renderedViewLine.domNode : + null, l, d.characterMapping)), c || (c = pe(this._renderedViewLine ? + this._renderedViewLine.domNode : null, l, d.characterMapping, d.containsRTL, + d.containsForeignElements)), this._renderedViewLine = c, !0 + } + layoutLine(e, t) { + this._renderedViewLine && this._renderedViewLine.domNode && (this._renderedViewLine + .domNode.setTop(t), this._renderedViewLine.domNode.setHeight(this._options + .lineHeight)) + } + getWidth() { + return this._renderedViewLine ? this._renderedViewLine.getWidth() : 0 + } + getWidthIsFast() { + return !this._renderedViewLine || this._renderedViewLine.getWidthIsFast() + } + needsMonospaceFontCheck() { + return !!this._renderedViewLine && this._renderedViewLine instanceof he + } + monospaceAssumptionsAreValid() { + return this._renderedViewLine && this._renderedViewLine instanceof he ? + this._renderedViewLine.monospaceAssumptionsAreValid() : ae + } + onMonospaceAssumptionsInvalidated() { + this._renderedViewLine && this._renderedViewLine instanceof he && ( + this._renderedViewLine = this._renderedViewLine.toSlowRenderedLine() + ) + } + getVisibleRangesForRange(e, t, i, n) { + if (!this._renderedViewLine) return null; + t |= 0, i |= 0, t = Math.min(this._renderedViewLine.input.lineContent.length + + 1, Math.max(1, t)), i = Math.min(this._renderedViewLine.input.lineContent + .length + 1, Math.max(1, i)); + const o = 0 | this._renderedViewLine.input.stopRenderingLineAfter; + let r = !1; - 1 !== o && t > o + 1 && i > o + 1 && (r = !0), -1 !== o && + t > o + 1 && (t = o + 1), -1 !== o && i > o + 1 && (i = o + 1); + const s = this._renderedViewLine.getVisibleRangesForRange(e, t, i, n); + return s && s.length > 0 ? new ee(r, s) : null + } + getColumnOfNodeOffset(e, t, i) { + return this._renderedViewLine ? this._renderedViewLine.getColumnOfNodeOffset( + e, t, i) : 1 + } + } + ce.CLASS_NAME = "view-line"; + class he { + constructor(e, t, i) { + this.domNode = e, this.input = t, this._characterMapping = i, this._charWidth = + t.spaceWidth + } + getWidth() { + return Math.round(this._getCharPosition(this._characterMapping.length)) + } + getWidthIsFast() { + return !0 + } + monospaceAssumptionsAreValid() { + if (!this.domNode) return ae; + const e = this.getWidth(), + t = this.domNode.domNode.firstChild.offsetWidth; + return Math.abs(e - t) >= 2 && (console.warn( + "monospace assumptions have been violated, therefore disabling monospace optimizations!" + ), ae = !1), ae + } + toSlowRenderedLine() { + return pe(this.domNode, this.input, this._characterMapping, !1, 0) + } + getVisibleRangesForRange(e, t, i, n) { + const o = this._getCharPosition(t), + r = this._getCharPosition(i); + return [new X(o, r - o)] + } + _getCharPosition(e) { + const t = this._characterMapping.getAbsoluteOffset(e); + return this._charWidth * t + } + getColumnOfNodeOffset(e, t, i) { + const n = t.textContent.length; + let o = -1; + for (; t;) t = t.previousSibling, o++; + return this._characterMapping.getColumn(new ne.Nd(o, i), n) + } + } + class ue { + constructor(e, t, i, n, o) { + if (this.domNode = e, this.input = t, this._characterMapping = i, this + ._isWhitespaceOnly = /^\s*$/.test(t.lineContent), this._containsForeignElements = + o, this._cachedWidth = -1, this._pixelOffsetCache = null, !n || 0 === + this._characterMapping.length) { + this._pixelOffsetCache = new Float32Array(Math.max(2, this._characterMapping + .length + 1)); + for (let e = 0, t = this._characterMapping.length; e <= t; e++) this._pixelOffsetCache[ + e] = -1 + } + } + _getReadingTarget(e) { + return e.domNode.firstChild + } + getWidth() { + return this.domNode ? (-1 === this._cachedWidth && (this._cachedWidth = + this._getReadingTarget(this.domNode).offsetWidth), this._cachedWidth) : + 0 + } + getWidthIsFast() { + return -1 !== this._cachedWidth + } + getVisibleRangesForRange(e, t, i, n) { + if (!this.domNode) return null; + if (null !== this._pixelOffsetCache) { + const o = this._readPixelOffset(this.domNode, e, t, n); + if (-1 === o) return null; + const r = this._readPixelOffset(this.domNode, e, i, n); + return -1 === r ? null : [new X(o, r - o)] + } + return this._readVisibleRangesForRange(this.domNode, e, t, i, n) + } + _readVisibleRangesForRange(e, t, i, n, o) { + if (i === n) { + const n = this._readPixelOffset(e, t, i, o); + return -1 === n ? null : [new X(n, 0)] + } + return this._readRawVisibleRangesForRange(e, i, n, o) + } + _readPixelOffset(e, t, i, n) { + if (0 === this._characterMapping.length) { + if (0 === this._containsForeignElements) return 0; + if (2 === this._containsForeignElements) return 0; + if (1 === this._containsForeignElements) return this.getWidth(); + const t = this._getReadingTarget(e); + return t.firstChild ? t.firstChild.offsetWidth : 0 + } + if (null !== this._pixelOffsetCache) { + const o = this._pixelOffsetCache[i]; + if (-1 !== o) return o; + const r = this._actualReadPixelOffset(e, t, i, n); + return this._pixelOffsetCache[i] = r, r + } + return this._actualReadPixelOffset(e, t, i, n) + } + _actualReadPixelOffset(e, t, i, n) { + if (0 === this._characterMapping.length) { + const t = te.readHorizontalRanges(this._getReadingTarget(e), 0, 0, 0, + 0, n.clientRectDeltaLeft, n.endNode); + return t && 0 !== t.length ? t[0].left : -1 + } + if (i === this._characterMapping.length && this._isWhitespaceOnly && 0 === + this._containsForeignElements) return this.getWidth(); + const o = this._characterMapping.getDomPosition(i), + r = te.readHorizontalRanges(this._getReadingTarget(e), o.partIndex, o + .charIndex, o.partIndex, o.charIndex, n.clientRectDeltaLeft, n.endNode + ); + if (!r || 0 === r.length) return -1; + const s = r[0].left; + if (this.input.isBasicASCII) { + const e = this._characterMapping.getAbsoluteOffset(i), + t = Math.round(this.input.spaceWidth * e); + if (Math.abs(t - s) <= 1) return t + } + return s + } + _readRawVisibleRangesForRange(e, t, i, n) { + if (1 === t && i === this._characterMapping.length) return [new X(0, + this.getWidth())]; + const o = this._characterMapping.getDomPosition(t), + r = this._characterMapping.getDomPosition(i); + return te.readHorizontalRanges(this._getReadingTarget(e), o.partIndex, + o.charIndex, r.partIndex, r.charIndex, n.clientRectDeltaLeft, n.endNode + ) + } + getColumnOfNodeOffset(e, t, i) { + const n = t.textContent.length; + let o = -1; + for (; t;) t = t.previousSibling, o++; + return this._characterMapping.getColumn(new ne.Nd(o, i), n) + } + } + class ge extends ue { + _readVisibleRangesForRange(e, t, i, n, o) { + const r = super._readVisibleRangesForRange(e, t, i, n, o); + if (!r || 0 === r.length || i === n || 1 === i && n === this._characterMapping + .length) return r; + if (!this.input.containsRTL) { + const i = this._readPixelOffset(e, t, n, o); + if (-1 !== i) { + const e = r[r.length - 1]; + e.left < i && (e.width = i - e.left) + } + } + return r + } + } + const pe = I.Pf ? function(e, t, i, n, o) { + return new ge(e, t, i, n, o) + } : function(e, t, i, n, o) { + return new ue(e, t, i, n, o) + }; + var me, fe = i(187), + _e = i(4314), + be = i(3181), + ve = i(3675); + class we { + constructor(e = null) { + this.hitTarget = e, this.type = 0 + } + } + class Ce { + constructor(e, t, i) { + this.position = e, this.spanNode = t, this.injectedText = i, this.type = + 1 + } + }! function(e) { + e.createFromDOMInfo = function(e, t, i) { + const n = e.getPositionFromDOMInfo(t, i); + return n ? new Ce(n, t, null) : new we(t) + } + }(me || (me = {})); + class ye { + constructor(e, t) { + this.lastViewCursorsRenderData = e, this.lastTextareaPosition = t + } + } + class Se { + constructor(e, t, i = 0, n = null, o = null, r = null) { + this.element = e, this.type = t, this.mouseColumn = i, this.position = + n, !o && n && (o = new _e.e(n.lineNumber, n.column, n.lineNumber, n.column)), + this.range = o, this.detail = r + } + static _typeToString(e) { + return 1 === e ? "TEXTAREA" : 2 === e ? "GUTTER_GLYPH_MARGIN" : 3 === + e ? "GUTTER_LINE_NUMBERS" : 4 === e ? "GUTTER_LINE_DECORATIONS" : 5 === + e ? "GUTTER_VIEW_ZONE" : 6 === e ? "CONTENT_TEXT" : 7 === e ? + "CONTENT_EMPTY" : 8 === e ? "CONTENT_VIEW_ZONE" : 9 === e ? + "CONTENT_WIDGET" : 10 === e ? "OVERVIEW_RULER" : 11 === e ? + "SCROLLBAR" : 12 === e ? "OVERLAY_WIDGET" : "UNKNOWN" + } + static toString(e) { + return this._typeToString(e.type) + ": " + e.position + " - " + e.range + + " - " + e.detail + } + toString() { + return Se.toString(this) + } + } + class xe { + static isTextArea(e) { + return 2 === e.length && 3 === e[0] && 6 === e[1] + } + static isChildOfViewLines(e) { + return e.length >= 4 && 3 === e[0] && 7 === e[3] + } + static isStrictChildOfViewLines(e) { + return e.length > 4 && 3 === e[0] && 7 === e[3] + } + static isChildOfScrollableElement(e) { + return e.length >= 2 && 3 === e[0] && 5 === e[1] + } + static isChildOfMinimap(e) { + return e.length >= 2 && 3 === e[0] && 8 === e[1] + } + static isChildOfContentWidgets(e) { + return e.length >= 4 && 3 === e[0] && 1 === e[3] + } + static isChildOfOverflowingContentWidgets(e) { + return e.length >= 1 && 2 === e[0] + } + static isChildOfOverlayWidgets(e) { + return e.length >= 2 && 3 === e[0] && 4 === e[1] + } + } + class ke { + constructor(e, t, i) { + this.model = e.model; + const n = e.configuration.options; + this.layoutInfo = n.get(130), this.viewDomNode = t.viewDomNode, this.lineHeight = + n.get(58), this.stickyTabStops = n.get(104), this.typicalHalfwidthCharacterWidth = + n.get(42).typicalHalfwidthCharacterWidth, this.lastRenderData = i, + this._context = e, this._viewHelper = t + } + getZoneAtCoord(e) { + return ke.getZoneAtCoord(this._context, e) + } + static getZoneAtCoord(e, t) { + const i = e.viewLayout.getWhitespaceAtVerticalOffset(t); + if (i) { + const n = i.verticalOffset + i.height / 2, + o = e.model.getLineCount(); + let r, s = null, + a = null; + return i.afterLineNumber !== o && (a = new fe.L(i.afterLineNumber + 1, + 1)), i.afterLineNumber > 0 && (s = new fe.L(i.afterLineNumber, e.model + .getLineMaxColumn(i.afterLineNumber))), r = null === a ? s : null === + s ? a : t < n ? s : a, { + viewZoneId: i.id, + afterLineNumber: i.afterLineNumber, + positionBefore: s, + positionAfter: a, + position: r + } + } + return null + } + getFullLineRangeAtCoord(e) { + if (this._context.viewLayout.isAfterLines(e)) { + const e = this._context.model.getLineCount(), + t = this._context.model.getLineMaxColumn(e); + return { + range: new _e.e(e, t, e, t), + isAfterLines: !0 + } + } + const t = this._context.viewLayout.getLineNumberAtVerticalOffset(e), + i = this._context.model.getLineMaxColumn(t); + return { + range: new _e.e(t, 1, t, i), + isAfterLines: !1 + } + } + getLineNumberAtVerticalOffset(e) { + return this._context.viewLayout.getLineNumberAtVerticalOffset(e) + } + isAfterLines(e) { + return this._context.viewLayout.isAfterLines(e) + } + isInTopPadding(e) { + return this._context.viewLayout.isInTopPadding(e) + } + isInBottomPadding(e) { + return this._context.viewLayout.isInBottomPadding(e) + } + getVerticalOffsetForLineNumber(e) { + return this._context.viewLayout.getVerticalOffsetForLineNumber(e) + } + findAttribute(e, t) { + return ke._findAttribute(e, t, this._viewHelper.viewDomNode) + } + static _findAttribute(e, t, i) { + for (; e && e !== document.body;) { + if (e.hasAttribute && e.hasAttribute(t)) return e.getAttribute(t); + if (e === i) return null; + e = e.parentNode + } + return null + } + getLineWidth(e) { + return this._viewHelper.getLineWidth(e) + } + visibleRangeForPosition(e, t) { + return this._viewHelper.visibleRangeForPosition(e, t) + } + getPositionFromDOMInfo(e, t) { + return this._viewHelper.getPositionFromDOMInfo(e, t) + } + getCurrentScrollTop() { + return this._context.viewLayout.getCurrentScrollTop() + } + getCurrentScrollLeft() { + return this._context.viewLayout.getCurrentScrollLeft() + } + } + class Le extends class { + constructor(e, t, i) { + this.editorPos = t, this.pos = i, this.mouseVerticalOffset = Math.max( + 0, e.getCurrentScrollTop() + i.y - t.y), this.mouseContentHorizontalOffset = + e.getCurrentScrollLeft() + i.x - t.x - e.layoutInfo.contentLeft, this + .isInMarginArea = i.x - t.x < e.layoutInfo.contentLeft && i.x - t.x >= + e.layoutInfo.glyphMarginLeft, this.isInContentArea = !this.isInMarginArea, + this.mouseColumn = Math.max(0, Ee._getMouseColumn(this.mouseContentHorizontalOffset, + e.typicalHalfwidthCharacterWidth)) + } + } { + constructor(e, t, i, n) { + super(e, t, i), this._ctx = e, n ? (this.target = n, this.targetPath = + Z.collect(n, e.viewDomNode)) : (this.target = null, this.targetPath = + new Uint8Array(0)) + } + toString() { + return + `pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}` + } + fulfill(e, t = null, i = null, n = null) { + let o = this.mouseColumn; + return t && t.column < this._ctx.model.getLineMaxColumn(t.lineNumber) && + (o = be.io.visibleColumnFromColumn(this._ctx.model.getLineContent(t.lineNumber), + t.column, this._ctx.model.getTextModelOptions().tabSize) + 1), new Se( + this.target, e, o, t, i, n) + } + withTarget(e) { + return new Le(this._ctx, this.editorPos, this.pos, e) + } + } + const Ne = { + isAfterLines: !0 + }; + + function De(e) { + return { + isAfterLines: !1, + horizontalDistanceToText: e + } + } + class Ee { + constructor(e, t) { + this._context = e, this._viewHelper = t + } + mouseTargetIsWidget(e) { + const t = e.target, + i = Z.collect(t, this._viewHelper.viewDomNode); + return !(!xe.isChildOfContentWidgets(i) && !xe.isChildOfOverflowingContentWidgets( + i) && !xe.isChildOfOverlayWidgets(i)) + } + createMouseTarget(e, t, i, n) { + const o = new ke(this._context, this._viewHelper, e), + r = new Le(o, t, i, n); + try { + return Ee._createMouseTarget(o, r, !1) + } catch (e) { + return r.fulfill(0) + } + } + static _createMouseTarget(e, t, i) { + if (null === t.target) { + if (i) return t.fulfill(0); + const n = Ee._doHitTest(e, t); + return 1 === n.type ? Ee.createMouseTargetFromHitTestPosition(e, t, n + .spanNode, n.position, n.injectedText) : this._createMouseTarget(e, + t.withTarget(n.hitTarget), !0) + } + const n = t; + let o = null; + return o = o || Ee._hitTestContentWidget(e, n), o = o || Ee._hitTestOverlayWidget( + e, n), o = o || Ee._hitTestMinimap(e, n), o = o || Ee._hitTestScrollbarSlider( + e, n), o = o || Ee._hitTestViewZone(e, n), o = o || Ee._hitTestMargin( + e, n), o = o || Ee._hitTestViewCursor(e, n), o = o || Ee._hitTestTextArea( + e, n), o = o || Ee._hitTestViewLines(e, n, i), o = o || Ee._hitTestScrollbar( + e, n), o || t.fulfill(0) + } + static _hitTestContentWidget(e, t) { + if (xe.isChildOfContentWidgets(t.targetPath) || xe.isChildOfOverflowingContentWidgets( + t.targetPath)) { + const i = e.findAttribute(t.target, "widgetId"); + return i ? t.fulfill(9, null, null, i) : t.fulfill(0) + } + return null + } + static _hitTestOverlayWidget(e, t) { + if (xe.isChildOfOverlayWidgets(t.targetPath)) { + const i = e.findAttribute(t.target, "widgetId"); + return i ? t.fulfill(12, null, null, i) : t.fulfill(0) + } + return null + } + static _hitTestViewCursor(e, t) { + if (t.target) { + const i = e.lastRenderData.lastViewCursorsRenderData; + for (const e of i) + if (t.target === e.domNode) return t.fulfill(6, e.position, null, { + mightBeForeignElement: !1 + }) + } + if (t.isInContentArea) { + const i = e.lastRenderData.lastViewCursorsRenderData, + n = t.mouseContentHorizontalOffset, + o = t.mouseVerticalOffset; + for (const r of i) { + if (n < r.contentLeft) continue; + if (n > r.contentLeft + r.width) continue; + const i = e.getVerticalOffsetForLineNumber(r.position.lineNumber); + if (i <= o && o <= i + r.height) return t.fulfill(6, r.position, + null, { + mightBeForeignElement: !1 + }) + } + } + return null + } + static _hitTestViewZone(e, t) { + const i = e.getZoneAtCoord(t.mouseVerticalOffset); + if (i) { + const e = t.isInContentArea ? 8 : 5; + return t.fulfill(e, i.position, null, i) + } + return null + } + static _hitTestTextArea(e, t) { + return xe.isTextArea(t.targetPath) ? e.lastRenderData.lastTextareaPosition ? + t.fulfill(6, e.lastRenderData.lastTextareaPosition, null, { + mightBeForeignElement: !1 + }) : t.fulfill(1, e.lastRenderData.lastTextareaPosition) : null + } + static _hitTestMargin(e, t) { + if (t.isInMarginArea) { + const i = e.getFullLineRangeAtCoord(t.mouseVerticalOffset), + n = i.range.getStartPosition(); + let o = Math.abs(t.pos.x - t.editorPos.x); + const r = { + isAfterLines: i.isAfterLines, + glyphMarginLeft: e.layoutInfo.glyphMarginLeft, + glyphMarginWidth: e.layoutInfo.glyphMarginWidth, + lineNumbersWidth: e.layoutInfo.lineNumbersWidth, + offsetX: o + }; + return o -= e.layoutInfo.glyphMarginLeft, o <= e.layoutInfo.glyphMarginWidth ? + t.fulfill(2, n, i.range, r) : (o -= e.layoutInfo.glyphMarginWidth, o <= + e.layoutInfo.lineNumbersWidth ? t.fulfill(3, n, i.range, r) : (o -= + e.layoutInfo.lineNumbersWidth, t.fulfill(4, n, i.range, r))) + } + return null + } + static _hitTestViewLines(e, t, i) { + if (!xe.isChildOfViewLines(t.targetPath)) return null; + if (e.isInTopPadding(t.mouseVerticalOffset)) return t.fulfill(7, new fe + .L(1, 1), null, Ne); + if (e.isAfterLines(t.mouseVerticalOffset) || e.isInBottomPadding(t.mouseVerticalOffset)) { + const i = e.model.getLineCount(), + n = e.model.getLineMaxColumn(i); + return t.fulfill(7, new fe.L(i, n), null, Ne) + } + if (i) { + if (xe.isStrictChildOfViewLines(t.targetPath)) { + const i = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset); + if (0 === e.model.getLineLength(i)) { + const n = e.getLineWidth(i), + o = De(t.mouseContentHorizontalOffset - n); + return t.fulfill(7, new fe.L(i, 1), null, o) + } + const n = e.getLineWidth(i); + if (t.mouseContentHorizontalOffset >= n) { + const o = De(t.mouseContentHorizontalOffset - n), + r = new fe.L(i, e.model.getLineMaxColumn(i)); + return t.fulfill(7, r, null, o) + } + } + return t.fulfill(0) + } + const n = Ee._doHitTest(e, t); + return 1 === n.type ? Ee.createMouseTargetFromHitTestPosition(e, t, n.spanNode, + n.position, n.injectedText) : this._createMouseTarget(e, t.withTarget( + n.hitTarget), !0) + } + static _hitTestMinimap(e, t) { + if (xe.isChildOfMinimap(t.targetPath)) { + const i = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset), + n = e.model.getLineMaxColumn(i); + return t.fulfill(11, new fe.L(i, n)) + } + return null + } + static _hitTestScrollbarSlider(e, t) { + if (xe.isChildOfScrollableElement(t.targetPath) && t.target && 1 === t + .target.nodeType) { + const i = t.target.className; + if (i && /\b(slider|scrollbar)\b/.test(i)) { + const i = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset), + n = e.model.getLineMaxColumn(i); + return t.fulfill(11, new fe.L(i, n)) + } + } + return null + } + static _hitTestScrollbar(e, t) { + if (xe.isChildOfScrollableElement(t.targetPath)) { + const i = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset), + n = e.model.getLineMaxColumn(i); + return t.fulfill(11, new fe.L(i, n)) + } + return null + } + getMouseColumn(e, t) { + const i = this._context.configuration.options, + n = i.get(130), + o = this._context.viewLayout.getCurrentScrollLeft() + t.x - e.x - n.contentLeft; + return Ee._getMouseColumn(o, i.get(42).typicalHalfwidthCharacterWidth) + } + static _getMouseColumn(e, t) { + return e < 0 ? 1 : Math.round(e / t) + 1 + } + static createMouseTargetFromHitTestPosition(e, t, i, n, o) { + const r = n.lineNumber, + s = n.column, + a = e.getLineWidth(r); + if (t.mouseContentHorizontalOffset > a) { + const e = De(t.mouseContentHorizontalOffset - a); + return t.fulfill(7, n, null, e) + } + const l = e.visibleRangeForPosition(r, s); + if (!l) return t.fulfill(0, n); + const d = l.left; + if (t.mouseContentHorizontalOffset === d) return t.fulfill(6, n, null, { + mightBeForeignElement: !!o + }); + const c = []; + if (c.push({ + offset: l.left, + column: s + }), s > 1) { + const t = e.visibleRangeForPosition(r, s - 1); + t && c.push({ + offset: t.left, + column: s - 1 + }) + } + if (s < e.model.getLineMaxColumn(r)) { + const t = e.visibleRangeForPosition(r, s + 1); + t && c.push({ + offset: t.left, + column: s + 1 + }) + } + c.sort(((e, t) => e.offset - t.offset)); + const h = t.pos.toClientCoordinates(), + u = i.getBoundingClientRect(), + g = u.left <= h.clientX && h.clientX <= u.right; + for (let e = 1; e < c.length; e++) { + const i = c[e - 1], + s = c[e]; + if (i.offset <= t.mouseContentHorizontalOffset && t.mouseContentHorizontalOffset <= + s.offset) { + const e = new _e.e(r, i.column, r, s.column); + return t.fulfill(6, n, e, { + mightBeForeignElement: !g || !!o + }) + } + } + return t.fulfill(6, n, null, { + mightBeForeignElement: !g || !!o + }) + } + static _doHitTestWithCaretRangeFromPoint(e, t) { + const i = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset), + n = e.getVerticalOffsetForLineNumber(i) + Math.floor(e.lineHeight / 2); + let o = t.pos.y + (n - t.mouseVerticalOffset); + o <= t.editorPos.y && (o = t.editorPos.y + 1), o >= t.editorPos.y + e.layoutInfo + .height && (o = t.editorPos.y + e.layoutInfo.height - 1); + const r = new B(t.pos.x, o), + s = this._actualDoHitTestWithCaretRangeFromPoint(e, r.toClientCoordinates()); + return 1 === s.type ? s : this._actualDoHitTestWithCaretRangeFromPoint( + e, t.pos.toClientCoordinates()) + } + static _actualDoHitTestWithCaretRangeFromPoint(e, t) { + const i = S.Ay(e.viewDomNode); + let n; + if (n = i ? void 0 === i.caretRangeFromPoint ? function(e, t, i) { + const n = document.createRange(); + let o = e.elementFromPoint(t, i); + if (null !== o) { + for (; o && o.firstChild && o.firstChild.nodeType !== o.firstChild.TEXT_NODE && + o.lastChild && o.lastChild.firstChild;) o = o.lastChild; + const e = o.getBoundingClientRect(), + i = window.getComputedStyle(o, null).getPropertyValue("font"), + r = o.innerText; + let s, a = e.left, + l = 0; + if (t > e.left + e.width) l = r.length; + else { + const e = Ie.getInstance(); + for (let n = 0; n < r.length + 1; n++) { + if (s = e.getCharWidth(r.charAt(n), i) / 2, a += s, t < a) { + l = n; + break + } + a += s + } + } + n.setStart(o.firstChild, l), n.setEnd(o.firstChild, l) + } + return n + }(i, t.clientX, t.clientY) : i.caretRangeFromPoint(t.clientX, t.clientY) : + document.caretRangeFromPoint(t.clientX, t.clientY), !n || !n.startContainer + ) return new we; + const o = n.startContainer; + if (o.nodeType === o.TEXT_NODE) { + const t = o.parentNode, + i = t ? t.parentNode : null, + r = i ? i.parentNode : null; + return (r && r.nodeType === r.ELEMENT_NODE ? r.className : null) === + ce.CLASS_NAME ? me.createFromDOMInfo(e, t, n.startOffset) : new we(o + .parentNode) + } + if (o.nodeType === o.ELEMENT_NODE) { + const t = o.parentNode, + i = t ? t.parentNode : null; + return (i && i.nodeType === i.ELEMENT_NODE ? i.className : null) === + ce.CLASS_NAME ? me.createFromDOMInfo(e, o, o.textContent.length) : + new we(o) + } + return new we + } + static _doHitTestWithCaretPositionFromPoint(e, t) { + const i = document.caretPositionFromPoint(t.clientX, t.clientY); + if (i.offsetNode.nodeType === i.offsetNode.TEXT_NODE) { + const t = i.offsetNode.parentNode, + n = t ? t.parentNode : null, + o = n ? n.parentNode : null; + return (o && o.nodeType === o.ELEMENT_NODE ? o.className : null) === + ce.CLASS_NAME ? me.createFromDOMInfo(e, i.offsetNode.parentNode, i.offset) : + new we(i.offsetNode.parentNode) + } + if (i.offsetNode.nodeType === i.offsetNode.ELEMENT_NODE) { + const t = i.offsetNode.parentNode, + n = t && t.nodeType === t.ELEMENT_NODE ? t.className : null, + o = t ? t.parentNode : null, + r = o && o.nodeType === o.ELEMENT_NODE ? o.className : null; + if (n === ce.CLASS_NAME) { + const t = i.offsetNode.childNodes[Math.min(i.offset, i.offsetNode.childNodes + .length - 1)]; + if (t) return me.createFromDOMInfo(e, t, 0) + } else if (r === ce.CLASS_NAME) return me.createFromDOMInfo(e, i.offsetNode, + 0) + } + return new we(i.offsetNode) + } + static _snapToSoftTabBoundary(e, t) { + const i = t.getLineContent(e.lineNumber), + { + tabSize: n + } = t.getTextModelOptions(), + o = ve.l.atomicPosition(i, e.column - 1, n, 2); + return -1 !== o ? new fe.L(e.lineNumber, o + 1) : e + } + static _doHitTest(e, t) { + let i = new we; + if ("function" == typeof document.caretRangeFromPoint ? i = this._doHitTestWithCaretRangeFromPoint( + e, t) : document.caretPositionFromPoint && (i = this._doHitTestWithCaretPositionFromPoint( + e, t.pos.toClientCoordinates())), 1 === i.type) { + const t = e.model.getInjectedTextAt(i.position), + n = e.model.normalizePosition(i.position, 2); + !t && n.equals(i.position) || (i = new Ce(n, i.spanNode, t)) + } + return 1 === i.type && e.stickyTabStops && (i = new Ce(this._snapToSoftTabBoundary( + i.position, e.model), i.spanNode, i.injectedText)), i + } + } + class Ie { + constructor() { + this._cache = {}, this._canvas = document.createElement("canvas") + } + static getInstance() { + return Ie._INSTANCE || (Ie._INSTANCE = new Ie), Ie._INSTANCE + } + getCharWidth(e, t) { + const i = e + t; + if (this._cache[i]) return this._cache[i]; + const n = this._canvas.getContext("2d"); + n.font = t; + const o = n.measureText(e).width; + return this._cache[i] = o, o + } + } + Ie._INSTANCE = null; + var Te = i(2334); + + function Me(e) { + return function(t, i) { + let n = !1; + return e && (n = e.mouseTargetIsWidget(i)), n || i.preventDefault(), i + } + } + class Ae extends $ { + constructor(e, t, i) { + super(), this._context = e, this.viewController = t, this.viewHelper = + i, this.mouseTargetFactory = new Ee(this._context, i), this._mouseDownOperation = + this._register(new Re(this._context, this.viewController, this.viewHelper, ( + (e, t) => this._createMouseTarget(e, t)), (e => this._getMouseColumn( + e)))), this.lastMouseLeaveTime = -1, this._height = this._context.configuration + .options.get(130).height; + const n = new U(this.viewHelper.viewDomNode); + this._register(n.onContextMenu(this.viewHelper.viewDomNode, (e => this + ._onContextMenu(e, !0)))), this._register(n.onMouseMoveThrottled( + this.viewHelper.viewDomNode, (e => this._onMouseMove(e)), Me(this.mouseTargetFactory), + Ae.MOUSE_MOVE_MINIMUM_TIME)), this._register(n.onMouseUp(this.viewHelper + .viewDomNode, (e => this._onMouseUp(e)))), this._register(n.onMouseLeave( + this.viewHelper.viewDomNode, (e => this._onMouseLeave(e)))), this._register( + n.onMouseDown(this.viewHelper.viewDomNode, (e => this._onMouseDown(e))) + ), this._register(S.nm(this.viewHelper.viewDomNode, S.tw.MOUSE_WHEEL, ( + e => { + if (this.viewController.emitMouseWheel(e), !this._context.configuration + .options.get(67)) return; + const t = new O.q(e); + if (A.dz ? (e.metaKey || e.ctrlKey) && !e.shiftKey && !e.altKey : + e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey) { + const e = Te.C.getZoomLevel(), + i = t.deltaY > 0 ? 1 : -1; + Te.C.setZoomLevel(e + i), t.preventDefault(), t.stopPropagation() + } + }), { + capture: !0, + passive: !1 + })), this._context.addEventHandler(this) + } + dispose() { + this._context.removeEventHandler(this), super.dispose() + } + onConfigurationChanged(e) { + if (e.hasChanged(130)) { + const e = this._context.configuration.options.get(130).height; + this._height !== e && (this._height = e, this._mouseDownOperation.onHeightChanged()) + } + return !1 + } + onCursorStateChanged(e) { + return this._mouseDownOperation.onCursorStateChanged(e), !1 + } + onFocusChanged(e) { + return !1 + } + onScrollChanged(e) { + return this._mouseDownOperation.onScrollChanged(), !1 + } + getTargetAtClientPoint(e, t) { + const i = new W(e, t).toPageCoordinates(), + n = V(this.viewHelper.viewDomNode); + return i.y < n.y || i.y > n.y + n.height || i.x < n.x || i.x > n.x + n + .width ? null : this.mouseTargetFactory.createMouseTarget(this.viewHelper + .getLastRenderData(), n, i, null) + } + _createMouseTarget(e, t) { + let i = e.target; + if (!this.viewHelper.viewDomNode.contains(i)) { + const t = S.Ay(this.viewHelper.viewDomNode); + t && (i = t.elementsFromPoint(e.posx, e.posy).find((e => this.viewHelper + .viewDomNode.contains(e)))) + } + return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), + e.editorPos, e.pos, t ? i : null) + } + _getMouseColumn(e) { + return this.mouseTargetFactory.getMouseColumn(e.editorPos, e.pos) + } + _onContextMenu(e, t) { + this.viewController.emitContextMenu({ + event: e, + target: this._createMouseTarget(e, t) + }) + } + _onMouseMove(e) { + this._mouseDownOperation.isActive() || e.timestamp < this.lastMouseLeaveTime || + this.viewController.emitMouseMove({ + event: e, + target: this._createMouseTarget(e, !0) + }) + } + _onMouseLeave(e) { + this.lastMouseLeaveTime = (new Date).getTime(), this.viewController.emitMouseLeave({ + event: e, + target: null + }) + } + _onMouseUp(e) { + this.viewController.emitMouseUp({ + event: e, + target: this._createMouseTarget(e, !0) + }) + } + _onMouseDown(e) { + const t = this._createMouseTarget(e, !0), + i = 6 === t.type || 7 === t.type, + n = 2 === t.type || 3 === t.type || 4 === t.type, + o = 3 === t.type, + r = this._context.configuration.options.get(98), + s = 8 === t.type || 5 === t.type, + a = 9 === t.type; + let l = e.leftButton || e.middleButton; + A.dz && e.leftButton && e.ctrlKey && (l = !1); + const d = () => { + e.preventDefault(), this.viewHelper.focusTextArea() + }; + if (l && (i || o && r)) d(), this._mouseDownOperation.start(t.type, e); + else if (n) e.preventDefault(); + else if (s) { + const i = t.detail; + this.viewHelper.shouldSuppressMouseDownOnViewZone(i.viewZoneId) && (d(), + this._mouseDownOperation.start(t.type, e), e.preventDefault()) + } else a && this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail) && + (d(), e.preventDefault()); + this.viewController.emitMouseDown({ + event: e, + target: t + }) + } + } + Ae.MOUSE_MOVE_MINIMUM_TIME = 100; + class Re extends L.JT { + constructor(e, t, i, n, o) { + super(), this._context = e, this._viewController = t, this._viewHelper = + i, this._createMouseTarget = n, this._getMouseColumn = o, this._mouseMoveMonitor = + this._register(new K(this._viewHelper.viewDomNode)), this._onScrollTimeout = + this._register(new P._F), this._mouseState = new Oe, this._currentSelection = + new T.Y(1, 1, 1, 1), this._isActive = !1, this._lastMouseEvent = + null + } + dispose() { + super.dispose() + } + isActive() { + return this._isActive + } + _onMouseDownThenMove(e) { + this._lastMouseEvent = e, this._mouseState.setModifiers(e); + const t = this._findMousePosition(e, !0); + t && (this._mouseState.isDragAndDrop ? this._viewController.emitMouseDrag({ + event: e, + target: t + }) : this._dispatchMouse(t, !0)) + } + start(e, t) { + this._lastMouseEvent = t, this._mouseState.setStartedOnLineNumbers(3 === + e), this._mouseState.setStartButtons(t), this._mouseState.setModifiers( + t); + const i = this._findMousePosition(t, !0); + if (!i || !i.position) return; + this._mouseState.trySetCount(t.detail, i.position), t.detail = this._mouseState + .count; + const n = this._context.configuration.options; + if (!n.get(80) && n.get(30) && !n.get(17) && !this._mouseState.altKey && + t.detail < 2 && !this._isActive && !this._currentSelection.isEmpty() && + 6 === i.type && i.position && this._currentSelection.containsPosition( + i.position)) return this._mouseState.isDragAndDrop = !0, this._isActive = ! + 0, void this._mouseMoveMonitor.startMonitoring(t.target, t.buttons, + Me(null), (e => this._onMouseDownThenMove(e)), (e => { + const t = this._findMousePosition(this._lastMouseEvent, !0); + e && e instanceof KeyboardEvent ? this._viewController.emitMouseDropCanceled() : + this._viewController.emitMouseDrop({ + event: this._lastMouseEvent, + target: t ? this._createMouseTarget(this._lastMouseEvent, !0) : null + }), this._stop() + })); + this._mouseState.isDragAndDrop = !1, this._dispatchMouse(i, t.shiftKey), + this._isActive || (this._isActive = !0, this._mouseMoveMonitor.startMonitoring( + t.target, t.buttons, Me(null), (e => this._onMouseDownThenMove(e)), ( + () => this._stop()))) + } + _stop() { + this._isActive = !1, this._onScrollTimeout.cancel() + } + onHeightChanged() { + this._mouseMoveMonitor.stopMonitoring() + } + onScrollChanged() { + this._isActive && this._onScrollTimeout.setIfNotSet((() => { + if (!this._lastMouseEvent) return; + const e = this._findMousePosition(this._lastMouseEvent, !1); + e && (this._mouseState.isDragAndDrop || this._dispatchMouse(e, !0)) + }), 10) + } + onCursorStateChanged(e) { + this._currentSelection = e.selections[0] + } + _getPositionOutsideEditor(e) { + const t = e.editorPos, + i = this._context.model, + n = this._context.viewLayout, + o = this._getMouseColumn(e); + if (e.posy < t.y) { + const i = Math.max(n.getCurrentScrollTop() - (t.y - e.posy), 0), + r = ke.getZoneAtCoord(this._context, i); + if (r) { + const e = this._helpPositionJumpOverViewZone(r); + if (e) return new Se(null, 13, o, e) + } + const s = n.getLineNumberAtVerticalOffset(i); + return new Se(null, 13, o, new fe.L(s, 1)) + } + if (e.posy > t.y + t.height) { + const r = n.getCurrentScrollTop() + (e.posy - t.y), + s = ke.getZoneAtCoord(this._context, r); + if (s) { + const e = this._helpPositionJumpOverViewZone(s); + if (e) return new Se(null, 13, o, e) + } + const a = n.getLineNumberAtVerticalOffset(r); + return new Se(null, 13, o, new fe.L(a, i.getLineMaxColumn(a))) + } + const r = n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop() + ( + e.posy - t.y)); + return e.posx < t.x ? new Se(null, 13, o, new fe.L(r, 1)) : e.posx > + t.x + t.width ? new Se(null, 13, o, new fe.L(r, i.getLineMaxColumn(r))) : + null + } + _findMousePosition(e, t) { + const i = this._getPositionOutsideEditor(e); + if (i) return i; + const n = this._createMouseTarget(e, t); + if (!n.position) return null; + if (8 === n.type || 5 === n.type) { + const e = this._helpPositionJumpOverViewZone(n.detail); + if (e) return new Se(n.element, n.type, n.mouseColumn, e, null, n.detail) + } + return n + } + _helpPositionJumpOverViewZone(e) { + const t = new fe.L(this._currentSelection.selectionStartLineNumber, + this._currentSelection.selectionStartColumn), + i = e.positionBefore, + n = e.positionAfter; + return i && n ? i.isBefore(t) ? i : n : null + } + _dispatchMouse(e, t) { + e.position && this._viewController.dispatchMouse({ + position: e.position, + mouseColumn: e.mouseColumn, + startedOnLineNumbers: this._mouseState.startedOnLineNumbers, + inSelectionMode: t, + mouseDownCount: this._mouseState.count, + altKey: this._mouseState.altKey, + ctrlKey: this._mouseState.ctrlKey, + metaKey: this._mouseState.metaKey, + shiftKey: this._mouseState.shiftKey, + leftButton: this._mouseState.leftButton, + middleButton: this._mouseState.middleButton + }) + } + } + class Oe { + constructor() { + this._altKey = !1, this._ctrlKey = !1, this._metaKey = !1, this._shiftKey = ! + 1, this._leftButton = !1, this._middleButton = !1, this._startedOnLineNumbers = ! + 1, this._lastMouseDownPosition = null, this._lastMouseDownPositionEqualCount = + 0, this._lastMouseDownCount = 0, this._lastSetMouseDownCountTime = 0, + this.isDragAndDrop = !1 + } + get altKey() { + return this._altKey + } + get ctrlKey() { + return this._ctrlKey + } + get metaKey() { + return this._metaKey + } + get shiftKey() { + return this._shiftKey + } + get leftButton() { + return this._leftButton + } + get middleButton() { + return this._middleButton + } + get startedOnLineNumbers() { + return this._startedOnLineNumbers + } + get count() { + return this._lastMouseDownCount + } + setModifiers(e) { + this._altKey = e.altKey, this._ctrlKey = e.ctrlKey, this._metaKey = e.metaKey, + this._shiftKey = e.shiftKey + } + setStartButtons(e) { + this._leftButton = e.leftButton, this._middleButton = e.middleButton + } + setStartedOnLineNumbers(e) { + this._startedOnLineNumbers = e + } + trySetCount(e, t) { + const i = (new Date).getTime(); + i - this._lastSetMouseDownCountTime > Oe.CLEAR_MOUSE_DOWN_COUNT_TIME && + (e = 1), this._lastSetMouseDownCountTime = i, e > this._lastMouseDownCount + + 1 && (e = this._lastMouseDownCount + 1), this._lastMouseDownPosition && + this._lastMouseDownPosition.equals(t) ? this._lastMouseDownPositionEqualCount++ + : this._lastMouseDownPositionEqualCount = 1, this._lastMouseDownPosition = + t, this._lastMouseDownCount = Math.min(e, this._lastMouseDownPositionEqualCount) + } + } + Oe.CLEAR_MOUSE_DOWN_COUNT_TIME = 400; + var Pe = i(161), + Fe = i(5715); + class Be extends Ae { + constructor(e, t, i) { + super(e, t, i), this._register(R.o.addTarget(this.viewHelper.linesContentDomNode)), + this._register(S.nm(this.viewHelper.linesContentDomNode, R.t.Tap, (e => + this.onTap(e)))), this._register(S.nm(this.viewHelper.linesContentDomNode, + R.t.Change, (e => this.onChange(e)))), this._register(S.nm(this.viewHelper + .linesContentDomNode, R.t.Contextmenu, (e => this._onContextMenu( + new H(e, this.viewHelper.viewDomNode), !1)))), this._lastPointerType = + "mouse", this._register(S.nm(this.viewHelper.linesContentDomNode, + "pointerdown", (e => { + const t = e.pointerType; + this._lastPointerType = "mouse" !== t ? "touch" === t ? "touch" : + "pen" : "mouse" + }))); + const n = new j(this.viewHelper.viewDomNode); + this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode, ( + e => this._onMouseMove(e)), Me(this.mouseTargetFactory), Ae.MOUSE_MOVE_MINIMUM_TIME)), + this._register(n.onPointerUp(this.viewHelper.viewDomNode, (e => this._onMouseUp( + e)))), this._register(n.onPointerLeave(this.viewHelper.viewDomNode, ( + e => this._onMouseLeave(e)))), this._register(n.onPointerDown(this.viewHelper + .viewDomNode, (e => this._onMouseDown(e)))) + } + onTap(e) { + if (!e.initialTarget || !this.viewHelper.linesContentDomNode.contains( + e.initialTarget)) return; + e.preventDefault(), this.viewHelper.focusTextArea(); + const t = this._createMouseTarget(new H(e, this.viewHelper.viewDomNode), ! + 1); + t.position && this.viewController.dispatchMouse({ + position: t.position, + mouseColumn: t.position.column, + startedOnLineNumbers: !1, + mouseDownCount: e.tapCount, + inSelectionMode: !1, + altKey: !1, + ctrlKey: !1, + metaKey: !1, + shiftKey: !1, + leftButton: !1, + middleButton: !1 + }) + } + onChange(e) { + "touch" === this._lastPointerType && this._context.model.deltaScrollNow(- + e.translationX, -e.translationY) + } + _onMouseDown(e) { + "touch" !== e.browserEvent.pointerType && super._onMouseDown(e) + } + } + class We extends Ae { + constructor(e, t, i) { + super(e, t, i), this._register(R.o.addTarget(this.viewHelper.linesContentDomNode)), + this._register(S.nm(this.viewHelper.linesContentDomNode, R.t.Tap, (e => + this.onTap(e)))), this._register(S.nm(this.viewHelper.linesContentDomNode, + R.t.Change, (e => this.onChange(e)))), this._register(S.nm(this.viewHelper + .linesContentDomNode, R.t.Contextmenu, (e => this._onContextMenu( + new H(e, this.viewHelper.viewDomNode), !1)))) + } + onTap(e) { + e.preventDefault(), this.viewHelper.focusTextArea(); + const t = this._createMouseTarget(new H(e, this.viewHelper.viewDomNode), ! + 1); + if (t.position) { + const e = document.createEvent("CustomEvent"); + e.initEvent(Fe.pd.Tap, !1, !0), this.viewHelper.dispatchTextAreaEvent( + e), this.viewController.moveTo(t.position) + } + } + onChange(e) { + this._context.model.deltaScrollNow(-e.translationX, -e.translationY) + } + } + class ze extends L.JT { + constructor(e, t, i) { + super(), A.gn && Pe.D.pointerEvents ? this.handler = this._register( + new Be(e, t, i)) : window.TouchEvent ? this.handler = this._register( + new We(e, t, i)) : this.handler = this._register(new Ae(e, t, i)) + } + getTargetAtClientPoint(e, t) { + return this.handler.getTargetAtClientPoint(e, t) + } + } + var Ve = i(504), + He = {}; + He.styleTagTransform = v(), He.setAttributes = m(), He.insert = g().bind( + null, "head"), He.domAPI = h(), He.insertStyleElement = _(), d()(Ve.Z, + He), Ve.Z && Ve.Z.locals && Ve.Z.locals; + var Ue = i(7295), + je = i(5887), + Ke = i(6184), + $e = {}; + $e.styleTagTransform = v(), $e.setAttributes = m(), $e.insert = g().bind( + null, "head"), $e.domAPI = h(), $e.insertStyleElement = _(), d()(Ke.Z, + $e), Ke.Z && Ke.Z.locals && Ke.Z.locals; + class qe extends $ {} + var Ze = i(7869), + Ge = i(7781); + class Ye extends qe { + constructor(e) { + super(), this._context = e, this._readConfig(), this._lastCursorModelPosition = + new fe.L(1, 1), this._renderResult = null, this._activeLineNumber = 1, + this._context.addEventHandler(this) + } + _readConfig() { + const e = this._context.configuration.options; + this._lineHeight = e.get(58); + const t = e.get(59); + this._renderLineNumbers = t.renderType, this._renderCustomLineNumbers = + t.renderFn, this._renderFinalNewline = e.get(84); + const i = e.get(130); + this._lineNumbersLeft = i.lineNumbersLeft, this._lineNumbersWidth = i.lineNumbersWidth + } + dispose() { + this._context.removeEventHandler(this), this._renderResult = null, + super.dispose() + } + onConfigurationChanged(e) { + return this._readConfig(), !0 + } + onCursorStateChanged(e) { + const t = e.selections[0].getPosition(); + this._lastCursorModelPosition = this._context.model.coordinatesConverter + .convertViewPositionToModelPosition(t); + let i = !1; + return this._activeLineNumber !== t.lineNumber && (this._activeLineNumber = + t.lineNumber, i = !0), 2 !== this._renderLineNumbers && 3 !== this._renderLineNumbers || + (i = !0), i + } + onFlushed(e) { + return !0 + } + onLinesChanged(e) { + return !0 + } + onLinesDeleted(e) { + return !0 + } + onLinesInserted(e) { + return !0 + } + onScrollChanged(e) { + return e.scrollTopChanged + } + onZonesChanged(e) { + return !0 + } + _getLineRenderLineNumber(e) { + const t = this._context.model.coordinatesConverter.convertViewPositionToModelPosition( + new fe.L(e, 1)); + if (1 !== t.column) return ""; + const i = t.lineNumber; + if (this._renderCustomLineNumbers) return this._renderCustomLineNumbers( + i); + if (2 === this._renderLineNumbers) { + const e = Math.abs(this._lastCursorModelPosition.lineNumber - i); + return 0 === e ? '' + i + + "" : String(e) + } + return 3 === this._renderLineNumbers ? this._lastCursorModelPosition.lineNumber === + i || i % 10 == 0 ? String(i) : "" : String(i) + } + prepareRender(e) { + if (0 === this._renderLineNumbers) return void(this._renderResult = + null); + const t = A.IJ ? this._lineHeight % 2 == 0 ? " lh-even" : " lh-odd" : + "", + i = e.visibleRange.startLineNumber, + n = e.visibleRange.endLineNumber, + o = '
    ', + r = this._context.model.getLineCount(), + s = []; + for (let e = i; e <= n; e++) { + const n = e - i; + if (!this._renderFinalNewline && e === r && 0 === this._context.model + .getLineLength(e)) { + s[n] = ""; + continue + } + const a = this._getLineRenderLineNumber(e); + a ? e === this._activeLineNumber ? s[n] = + '
    ' + a + "
    " : s[n] = o + a + "
    " : s[n] = "" + } + this._renderResult = s + } + render(e, t) { + if (!this._renderResult) return ""; + const i = t - e; + return i < 0 || i >= this._renderResult.length ? "" : this._renderResult[ + i] + } + } + Ye.CLASS_NAME = "line-numbers", (0, Ge.Ic)(((e, t) => { + const i = e.getColor(Ze.hw); + i && t.addRule(`.monaco-editor .line-numbers { color: ${i}; }`); + const n = e.getColor(Ze.DD); + n && t.addRule( + `.monaco-editor .line-numbers.active-line-number { color: ${n}; }`) + })); + class Qe extends q { + constructor(e) { + super(e); + const t = this._context.configuration.options, + i = t.get(130); + this._canUseLayerHinting = !t.get(27), this._contentLeft = i.contentLeft, + this._glyphMarginLeft = i.glyphMarginLeft, this._glyphMarginWidth = i + .glyphMarginWidth, this._domNode = (0, M.X)(document.createElement( + "div")), this._domNode.setClassName(Qe.OUTER_CLASS_NAME), this._domNode + .setPosition("absolute"), this._domNode.setAttribute("role", + "presentation"), this._domNode.setAttribute("aria-hidden", "true"), + this._glyphMarginBackgroundDomNode = (0, M.X)(document.createElement( + "div")), this._glyphMarginBackgroundDomNode.setClassName(Qe.CLASS_NAME), + this._domNode.appendChild(this._glyphMarginBackgroundDomNode) + } + dispose() { + super.dispose() + } + getDomNode() { + return this._domNode + } + onConfigurationChanged(e) { + const t = this._context.configuration.options, + i = t.get(130); + return this._canUseLayerHinting = !t.get(27), this._contentLeft = i.contentLeft, + this._glyphMarginLeft = i.glyphMarginLeft, this._glyphMarginWidth = i + .glyphMarginWidth, !0 + } + onScrollChanged(e) { + return super.onScrollChanged(e) || e.scrollTopChanged + } + prepareRender(e) {} + render(e) { + this._domNode.setLayerHinting(this._canUseLayerHinting), this._domNode + .setContain("strict"); + const t = e.scrollTop - e.bigNumbersDelta; + this._domNode.setTop(-t); + const i = Math.min(e.scrollHeight, 1e6); + this._domNode.setHeight(i), this._domNode.setWidth(this._contentLeft), + this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft), + this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth), + this._glyphMarginBackgroundDomNode.setHeight(i) + } + } + Qe.CLASS_NAME = "glyph-margin", Qe.OUTER_CLASS_NAME = "margin"; + var Xe = i(9410), + Je = i(1185); + class et { + constructor(e, t, i) { + this._visibleTextAreaBrand = void 0, this.top = e, this.left = t, this + .width = i + } + setWidth(e) { + return new et(this.top, this.left, e) + } + } + const tt = I.vU; + class it extends q { + constructor(e, t, i) { + super(e), this._primaryCursorPosition = new fe.L(1, 1), this._primaryCursorVisibleRange = + null, this._viewController = t, this._viewHelper = i, this._scrollLeft = + 0, this._scrollTop = 0; + const n = this._context.configuration.options, + o = n.get(130); + this._setAccessibilityOptions(n), this._contentLeft = o.contentLeft, + this._contentWidth = o.contentWidth, this._contentHeight = o.height, + this._fontInfo = n.get(42), this._lineHeight = n.get(58), this._emptySelectionClipboard = + n.get(31), this._copyWithSyntaxHighlighting = n.get(20), this._visibleTextArea = + null, this._selections = [new T.Y(1, 1, 1, 1)], this._modelSelections = [ + new T.Y(1, 1, 1, 1) + ], this._lastRenderPosition = null, this.textArea = (0, M.X)(document + .createElement("textarea")), Z.write(this.textArea, 6), this.textArea + .setClassName(`inputarea ${Je.S}`), this.textArea.setAttribute("wrap", + "off"), this.textArea.setAttribute("autocorrect", "off"), this.textArea + .setAttribute("autocapitalize", "off"), this.textArea.setAttribute( + "autocomplete", "off"), this.textArea.setAttribute("spellcheck", + "false"), this.textArea.setAttribute("aria-label", this._getAriaLabel( + n)), this.textArea.setAttribute("tabindex", String(n.get(112))), + this.textArea.setAttribute("role", "textbox"), this.textArea.setAttribute( + "aria-roledescription", y.N("editor", "editor")), this.textArea.setAttribute( + "aria-multiline", "true"), this.textArea.setAttribute( + "aria-haspopup", "false"), this.textArea.setAttribute( + "aria-autocomplete", "both"), n.get(29) && n.get(80) && this.textArea + .setAttribute("readonly", "true"), this.textAreaCover = (0, M.X)( + document.createElement("div")), this.textAreaCover.setPosition( + "absolute"); + const r = { + getLineCount: () => this._context.model.getLineCount(), + getLineMaxColumn: e => this._context.model.getLineMaxColumn(e), + getValueInRange: (e, t) => this._context.model.getValueInRange(e, t) + }, + s = { + getDataToCopy: e => { + const t = this._context.model.getPlainTextToCopy(this._modelSelections, + this._emptySelectionClipboard, A.ED), + i = this._context.model.getEOL(), + n = this._emptySelectionClipboard && 1 === this._modelSelections.length && + this._modelSelections[0].isEmpty(), + o = Array.isArray(t) ? t : null, + r = Array.isArray(t) ? t.join(i) : t; + let s, a = null; + if (e && (Fe.RA.forceCopyWithSyntaxHighlighting || this._copyWithSyntaxHighlighting && + r.length < 65536)) { + const e = this._context.model.getRichTextToCopy(this._modelSelections, + this._emptySelectionClipboard); + e && (s = e.html, a = e.mode) + } + return { + isFromEmptySelection: n, + multicursorText: o, + text: r, + html: s, + mode: a + } + }, + getScreenReaderContent: e => { + if (1 === this._accessibilitySupport) { + if (A.dz) { + const e = this._selections[0]; + if (e.isEmpty()) { + const t = e.getStartPosition(); + let i = this._getWordBeforePosition(t); + if (0 === i.length && (i = this._getCharacterBeforePosition(t)), + i.length > 0) return new je.un(i, i.length, i.length, t, t) + } + } + return je.un.EMPTY + } + if (I.Dt) { + const e = this._selections[0]; + if (e.isEmpty()) { + const t = e.getStartPosition(), + [i, n] = this._getAndroidWordAtPosition(t); + if (i.length > 0) return new je.un(i, n, n, t, t) + } + return je.un.EMPTY + } + return je.ee.fromEditorSelection(e, r, this._selections[0], this._accessibilityPageSize, + 0 === this._accessibilitySupport) + }, + deduceModelPosition: (e, t, i) => this._context.model.deduceModelPositionRelativeToViewPosition( + e, t, i) + }; + this._textAreaInput = this._register(new Fe.Fz(s, this.textArea)), + this._register(this._textAreaInput.onKeyDown((e => { + this._viewController.emitKeyDown(e) + }))), this._register(this._textAreaInput.onKeyUp((e => { + this._viewController.emitKeyUp(e) + }))), this._register(this._textAreaInput.onPaste((e => { + let t = !1, + i = null, + n = null; + e.metadata && (t = this._emptySelectionClipboard && !!e.metadata.isFromEmptySelection, + i = void 0 !== e.metadata.multicursorText ? e.metadata.multicursorText : + null, n = e.metadata.mode), this._viewController.paste(e.text, + t, i, n) + }))), this._register(this._textAreaInput.onCut((() => { + this._viewController.cut() + }))), this._register(this._textAreaInput.onType((e => { + e.replacePrevCharCnt || e.replaceNextCharCnt || e.positionDelta ? + (je.al && console.log( + ` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}` + ), this._viewController.compositionType(e.text, e.replacePrevCharCnt, + e.replaceNextCharCnt, e.positionDelta)) : (je.al && console.log( + ` => type: <<${e.text}>>`), this._viewController.type(e.text)) + }))), this._register(this._textAreaInput.onSelectionChangeRequest((e => { + this._viewController.setSelection(e) + }))), this._register(this._textAreaInput.onCompositionStart((e => { + const t = this._selections[0].startLineNumber, + i = this._selections[0].startColumn + e.revealDeltaColumns; + this._context.model.revealRange("keyboard", !0, new _e.e(t, i, t, + i), 0, 1); + const n = this._viewHelper.visibleRangeForPositionRelativeToEditor( + t, i); + n && (this._visibleTextArea = new et(this._context.viewLayout.getVerticalOffsetForLineNumber( + t), n.left, tt ? 0 : 1), this._render()), this.textArea.setClassName( + `inputarea ${Je.S} ime-input`), this._viewController.compositionStart(), + this._context.model.onCompositionStart() + }))), this._register(this._textAreaInput.onCompositionUpdate((e => { + this._visibleTextArea && (this._visibleTextArea = this._visibleTextArea + .setWidth(function(e, t) { + const i = document.createElement("canvas").getContext("2d"); + var n; + i.font = ("normal", + `normal normal ${(n=t).fontWeight} ${n.fontSize}px / ${n.lineHeight}px ${n.fontFamily}` + ); + const o = i.measureText(e); + return I.vU ? o.width + 2 : o.width + }(e.data, this._fontInfo)), this._render()) + }))), this._register(this._textAreaInput.onCompositionEnd((() => { + this._visibleTextArea = null, this._render(), this.textArea.setClassName( + `inputarea ${Je.S}`), this._viewController.compositionEnd(), + this._context.model.onCompositionEnd() + }))), this._register(this._textAreaInput.onFocus((() => { + this._context.model.setHasFocus(!0) + }))), this._register(this._textAreaInput.onBlur((() => { + this._context.model.setHasFocus(!1) + }))) + } + dispose() { + super.dispose() + } + _getAndroidWordAtPosition(e) { + const t = this._context.model.getLineContent(e.lineNumber), + i = (0, Xe.u)('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?'); + let n = !0, + o = e.column, + r = !0, + s = e.column, + a = 0; + for (; a < 50 && (n || r);) { + if (n && o <= 1 && (n = !1), n) { + const e = t.charCodeAt(o - 2); + 0 !== i.get(e) ? n = !1 : o-- + } + if (r && s > t.length && (r = !1), r) { + const e = t.charCodeAt(s - 1); + 0 !== i.get(e) ? r = !1 : s++ + } + a++ + } + return [t.substring(o - 1, s - 1), e.column - o] + } + _getWordBeforePosition(e) { + const t = this._context.model.getLineContent(e.lineNumber), + i = (0, Xe.u)(this._context.configuration.options.get(116)); + let n = e.column, + o = 0; + for (; n > 1;) { + const r = t.charCodeAt(n - 2); + if (0 !== i.get(r) || o > 50) return t.substring(n - 1, e.column - 1); + o++, n-- + } + return t.substring(0, e.column - 1) + } + _getCharacterBeforePosition(e) { + if (e.column > 1) { + const t = this._context.model.getLineContent(e.lineNumber).charAt(e.column - + 2); + if (!Ue.ZG(t.charCodeAt(0))) return t + } + return "" + } + _getAriaLabel(e) { + return 1 === e.get(2) ? y.N("accessibilityOffAriaLabel", + "The editor is not accessible at this time. Press {0} for options.", + A.IJ ? "Shift+Alt+F1" : "Alt+F1") : e.get(4) + } + _setAccessibilityOptions(e) { + this._accessibilitySupport = e.get(2); + const t = e.get(3); + 2 === this._accessibilitySupport && t === re.BH.accessibilityPageSize.defaultValue ? + this._accessibilityPageSize = 500 : this._accessibilityPageSize = t + } + onConfigurationChanged(e) { + const t = this._context.configuration.options, + i = t.get(130); + return this._setAccessibilityOptions(t), this._contentLeft = i.contentLeft, + this._contentWidth = i.contentWidth, this._contentHeight = i.height, + this._fontInfo = t.get(42), this._lineHeight = t.get(58), this._emptySelectionClipboard = + t.get(31), this._copyWithSyntaxHighlighting = t.get(20), this.textArea + .setAttribute("aria-label", this._getAriaLabel(t)), this.textArea.setAttribute( + "tabindex", String(t.get(112))), (e.hasChanged(29) || e.hasChanged( + 80)) && (t.get(29) && t.get(80) ? this.textArea.setAttribute( + "readonly", "true") : this.textArea.removeAttribute("readonly")), e.hasChanged( + 2) && this._textAreaInput.writeScreenReaderContent( + "strategy changed"), !0 + } + onCursorStateChanged(e) { + return this._selections = e.selections.slice(0), this._modelSelections = + e.modelSelections.slice(0), this._textAreaInput.writeScreenReaderContent( + "selection changed"), !0 + } + onDecorationsChanged(e) { + return !0 + } + onFlushed(e) { + return !0 + } + onLinesChanged(e) { + return !0 + } + onLinesDeleted(e) { + return !0 + } + onLinesInserted(e) { + return !0 + } + onScrollChanged(e) { + return this._scrollLeft = e.scrollLeft, this._scrollTop = e.scrollTop, ! + 0 + } + onZonesChanged(e) { + return !0 + } + isFocused() { + return this._textAreaInput.isFocused() + } + focusTextArea() { + this._textAreaInput.focusTextArea() + } + getLastRenderData() { + return this._lastRenderPosition + } + setAriaOptions(e) { + e.activeDescendant ? (this.textArea.setAttribute("aria-haspopup", + "true"), this.textArea.setAttribute("aria-autocomplete", "list"), + this.textArea.setAttribute("aria-activedescendant", e.activeDescendant) + ) : (this.textArea.setAttribute("aria-haspopup", "false"), this.textArea + .setAttribute("aria-autocomplete", "both"), this.textArea.removeAttribute( + "aria-activedescendant")), e.role && this.textArea.setAttribute( + "role", e.role) + } + prepareRender(e) { + this._primaryCursorPosition = new fe.L(this._selections[0].positionLineNumber, + this._selections[0].positionColumn), this._primaryCursorVisibleRange = + e.visibleRangeForPosition(this._primaryCursorPosition) + } + render(e) { + this._textAreaInput.writeScreenReaderContent("render"), this._render() + } + _render() { + if (this._visibleTextArea) return void this._renderInsideEditor(null, + this._visibleTextArea.top - this._scrollTop, this._contentLeft + + this._visibleTextArea.left - this._scrollLeft, this._visibleTextArea + .width, this._lineHeight); + if (!this._primaryCursorVisibleRange) return void this._renderAtTopLeft(); + const e = this._contentLeft + this._primaryCursorVisibleRange.left - + this._scrollLeft; + if (e < this._contentLeft || e > this._contentLeft + this._contentWidth) + return void this._renderAtTopLeft(); + const t = this._context.viewLayout.getVerticalOffsetForLineNumber(this + ._selections[0].positionLineNumber) - this._scrollTop; + t < 0 || t > this._contentHeight ? this._renderAtTopLeft() : A.dz ? + this._renderInsideEditor(this._primaryCursorPosition, t, e, tt ? 0 : + 1, this._lineHeight) : this._renderInsideEditor(this._primaryCursorPosition, + t, e, tt ? 0 : 1, tt ? 0 : 1) + } + _renderInsideEditor(e, t, i, n, o) { + this._lastRenderPosition = e; + const r = this.textArea, + s = this.textAreaCover; + D.V.applyFontInfo(r, this._fontInfo), r.setTop(t), r.setLeft(i), r.setWidth( + n), r.setHeight(o), s.setTop(0), s.setLeft(0), s.setWidth(0), s.setHeight( + 0) + } + _renderAtTopLeft() { + this._lastRenderPosition = null; + const e = this.textArea, + t = this.textAreaCover; + if (D.V.applyFontInfo(e, this._fontInfo), e.setTop(0), e.setLeft(0), t + .setTop(0), t.setLeft(0), tt) return e.setWidth(0), e.setHeight(0), t + .setWidth(0), void t.setHeight(0); + e.setWidth(1), e.setHeight(1), t.setWidth(1), t.setHeight(1); + const i = this._context.configuration.options; + i.get(48) ? t.setClassName("monaco-editor-background textAreaCover " + + Qe.OUTER_CLASS_NAME) : 0 !== i.get(59).renderType ? t.setClassName( + "monaco-editor-background textAreaCover " + Ye.CLASS_NAME) : t.setClassName( + "monaco-editor-background textAreaCover") + } + } + var nt = i(8728); + class ot { + constructor(e, t, i, n) { + this.configuration = e, this.viewModel = t, this.userInputEvents = i, + this.commandDelegate = n + } + paste(e, t, i, n) { + this.commandDelegate.paste(e, t, i, n) + } + type(e) { + this.commandDelegate.type(e) + } + compositionType(e, t, i, n) { + this.commandDelegate.compositionType(e, t, i, n) + } + compositionStart() { + this.commandDelegate.startComposition() + } + compositionEnd() { + this.commandDelegate.endComposition() + } + cut() { + this.commandDelegate.cut() + } + setSelection(e) { + nt.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel, { + source: "keyboard", + selection: e + }) + } + _validateViewColumn(e) { + const t = this.viewModel.getLineMinColumn(e.lineNumber); + return e.column < t ? new fe.L(e.lineNumber, t) : e + } + _hasMulticursorModifier(e) { + switch (this.configuration.options.get(69)) { + case "altKey": + return e.altKey; + case "ctrlKey": + return e.ctrlKey; + case "metaKey": + return e.metaKey; + default: + return !1 + } + } + _hasNonMulticursorModifier(e) { + switch (this.configuration.options.get(69)) { + case "altKey": + return e.ctrlKey || e.metaKey; + case "ctrlKey": + return e.altKey || e.metaKey; + case "metaKey": + return e.ctrlKey || e.altKey; + default: + return !1 + } + } + dispatchMouse(e) { + const t = this.configuration.options, + i = A.IJ && t.get(96), + n = t.get(17); + e.middleButton && !i ? this._columnSelect(e.position, e.mouseColumn, e + .inSelectionMode) : e.startedOnLineNumbers ? this._hasMulticursorModifier( + e) ? e.inSelectionMode ? this._lastCursorLineSelect(e.position) : + this._createCursor(e.position, !0) : e.inSelectionMode ? this._lineSelectDrag( + e.position) : this._lineSelect(e.position) : e.mouseDownCount >= 4 ? + this._selectAll() : 3 === e.mouseDownCount ? this._hasMulticursorModifier( + e) ? e.inSelectionMode ? this._lastCursorLineSelectDrag(e.position) : + this._lastCursorLineSelect(e.position) : e.inSelectionMode ? this._lineSelectDrag( + e.position) : this._lineSelect(e.position) : 2 === e.mouseDownCount ? + this._hasMulticursorModifier(e) ? this._lastCursorWordSelect(e.position) : + e.inSelectionMode ? this._wordSelectDrag(e.position) : this._wordSelect( + e.position) : this._hasMulticursorModifier(e) ? this._hasNonMulticursorModifier( + e) || (e.shiftKey ? this._columnSelect(e.position, e.mouseColumn, !0) : + e.inSelectionMode ? this._lastCursorMoveToSelect(e.position) : this._createCursor( + e.position, !1)) : e.inSelectionMode ? e.altKey || n ? this._columnSelect( + e.position, e.mouseColumn, !0) : this._moveToSelect(e.position) : + this.moveTo(e.position) + } + _usualArgs(e) { + return e = this._validateViewColumn(e), { + source: "mouse", + position: this._convertViewToModelPosition(e), + viewPosition: e + } + } + moveTo(e) { + nt.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel, + this._usualArgs(e)) + } + _moveToSelect(e) { + nt.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel, + this._usualArgs(e)) + } + _columnSelect(e, t, i) { + e = this._validateViewColumn(e), nt.CoreNavigationCommands.ColumnSelect + .runCoreEditorCommand(this.viewModel, { + source: "mouse", + position: this._convertViewToModelPosition(e), + viewPosition: e, + mouseColumn: t, + doColumnSelect: i + }) + } + _createCursor(e, t) { + e = this._validateViewColumn(e), nt.CoreNavigationCommands.CreateCursor + .runCoreEditorCommand(this.viewModel, { + source: "mouse", + position: this._convertViewToModelPosition(e), + viewPosition: e, + wholeLine: t + }) + } + _lastCursorMoveToSelect(e) { + nt.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand( + this.viewModel, this._usualArgs(e)) + } + _wordSelect(e) { + nt.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel, + this._usualArgs(e)) + } + _wordSelectDrag(e) { + nt.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel, + this._usualArgs(e)) + } + _lastCursorWordSelect(e) { + nt.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand( + this.viewModel, this._usualArgs(e)) + } + _lineSelect(e) { + nt.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel, + this._usualArgs(e)) + } + _lineSelectDrag(e) { + nt.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel, + this._usualArgs(e)) + } + _lastCursorLineSelect(e) { + nt.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand( + this.viewModel, this._usualArgs(e)) + } + _lastCursorLineSelectDrag(e) { + nt.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand( + this.viewModel, this._usualArgs(e)) + } + _selectAll() { + nt.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel, { + source: "mouse" + }) + } + _convertViewToModelPosition(e) { + return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition( + e) + } + emitKeyDown(e) { + this.userInputEvents.emitKeyDown(e) + } + emitKeyUp(e) { + this.userInputEvents.emitKeyUp(e) + } + emitContextMenu(e) { + this.userInputEvents.emitContextMenu(e) + } + emitMouseMove(e) { + this.userInputEvents.emitMouseMove(e) + } + emitMouseLeave(e) { + this.userInputEvents.emitMouseLeave(e) + } + emitMouseUp(e) { + this.userInputEvents.emitMouseUp(e) + } + emitMouseDown(e) { + this.userInputEvents.emitMouseDown(e) + } + emitMouseDrag(e) { + this.userInputEvents.emitMouseDrag(e) + } + emitMouseDrop(e) { + this.userInputEvents.emitMouseDrop(e) + } + emitMouseDropCanceled() { + this.userInputEvents.emitMouseDropCanceled() + } + emitMouseWheel(e) { + this.userInputEvents.emitMouseWheel(e) + } + } + class rt { + constructor(e) { + this.onKeyDown = null, this.onKeyUp = null, this.onContextMenu = null, + this.onMouseMove = null, this.onMouseLeave = null, this.onMouseDown = + null, this.onMouseUp = null, this.onMouseDrag = null, this.onMouseDrop = + null, this.onMouseDropCanceled = null, this.onMouseWheel = null, this + ._coordinatesConverter = e + } + emitKeyDown(e) { + this.onKeyDown && this.onKeyDown(e) + } + emitKeyUp(e) { + this.onKeyUp && this.onKeyUp(e) + } + emitContextMenu(e) { + this.onContextMenu && this.onContextMenu(this._convertViewToModelMouseEvent( + e)) + } + emitMouseMove(e) { + this.onMouseMove && this.onMouseMove(this._convertViewToModelMouseEvent( + e)) + } + emitMouseLeave(e) { + this.onMouseLeave && this.onMouseLeave(this._convertViewToModelMouseEvent( + e)) + } + emitMouseDown(e) { + this.onMouseDown && this.onMouseDown(this._convertViewToModelMouseEvent( + e)) + } + emitMouseUp(e) { + this.onMouseUp && this.onMouseUp(this._convertViewToModelMouseEvent(e)) + } + emitMouseDrag(e) { + this.onMouseDrag && this.onMouseDrag(this._convertViewToModelMouseEvent( + e)) + } + emitMouseDrop(e) { + this.onMouseDrop && this.onMouseDrop(this._convertViewToModelMouseEvent( + e)) + } + emitMouseDropCanceled() { + this.onMouseDropCanceled && this.onMouseDropCanceled() + } + emitMouseWheel(e) { + this.onMouseWheel && this.onMouseWheel(e) + } + _convertViewToModelMouseEvent(e) { + return e.target ? { + event: e.event, + target: this._convertViewToModelMouseTarget(e.target) + } : e + } + _convertViewToModelMouseTarget(e) { + return rt.convertViewToModelMouseTarget(e, this._coordinatesConverter) + } + static convertViewToModelMouseTarget(e, t) { + return new st(e.element, e.type, e.mouseColumn, e.position ? t.convertViewPositionToModelPosition( + e.position) : null, e.range ? t.convertViewRangeToModelRange(e.range) : + null, e.detail) + } + } + class st { + constructor(e, t, i, n, o, r) { + this.element = e, this.type = t, this.mouseColumn = i, this.position = + n, this.range = o, this.detail = r + } + toString() { + return Se.toString(this) + } + } + var at, lt = i(72); + class dt { + constructor(e) { + this._createLine = e, this._set(1, []) + } + flush() { + this._set(1, []) + } + _set(e, t) { + this._lines = t, this._rendLineNumberStart = e + } + _get() { + return { + rendLineNumberStart: this._rendLineNumberStart, + lines: this._lines + } + } + getStartLineNumber() { + return this._rendLineNumberStart + } + getEndLineNumber() { + return this._rendLineNumberStart + this._lines.length - 1 + } + getCount() { + return this._lines.length + } + getLine(e) { + const t = e - this._rendLineNumberStart; + if (t < 0 || t >= this._lines.length) throw new Error( + "Illegal value for lineNumber"); + return this._lines[t] + } + onLinesDeleted(e, t) { + if (0 === this.getCount()) return null; + const i = this.getStartLineNumber(), + n = this.getEndLineNumber(); + if (t < i) { + const i = t - e + 1; + return this._rendLineNumberStart -= i, null + } + if (e > n) return null; + let o = 0, + r = 0; + for (let s = i; s <= n; s++) { + const i = s - this._rendLineNumberStart; + e <= s && s <= t && (0 === r ? (o = i, r = 1) : r++) + } + if (e < i) { + let n = 0; + n = t < i ? t - e + 1 : i - e, this._rendLineNumberStart -= n + } + return this._lines.splice(o, r) + } + onLinesChanged(e, t) { + if (0 === this.getCount()) return !1; + const i = this.getStartLineNumber(), + n = this.getEndLineNumber(); + let o = !1; + for (let r = e; r <= t; r++) r >= i && r <= n && (this._lines[r - this + ._rendLineNumberStart].onContentChanged(), o = !0); + return o + } + onLinesInserted(e, t) { + if (0 === this.getCount()) return null; + const i = t - e + 1, + n = this.getStartLineNumber(), + o = this.getEndLineNumber(); + if (e <= n) return this._rendLineNumberStart += i, null; + if (e > o) return null; + if (i + e > o) return this._lines.splice(e - this._rendLineNumberStart, + o - e + 1); + const r = []; + for (let e = 0; e < i; e++) r[e] = this._createLine(); + const s = e - this._rendLineNumberStart, + a = this._lines.slice(0, s), + l = this._lines.slice(s, this._lines.length - i), + d = this._lines.slice(this._lines.length - i, this._lines.length); + return this._lines = a.concat(r).concat(l), d + } + onTokensChanged(e) { + if (0 === this.getCount()) return !1; + const t = this.getStartLineNumber(), + i = this.getEndLineNumber(); + let n = !1; + for (let o = 0, r = e.length; o < r; o++) { + const r = e[o]; + if (r.toLineNumber < t || r.fromLineNumber > i) continue; + const s = Math.max(t, r.fromLineNumber), + a = Math.min(i, r.toLineNumber); + for (let e = s; e <= a; e++) { + const t = e - this._rendLineNumberStart; + this._lines[t].onTokensChanged(), n = !0 + } + } + return n + } + } + class ct { + constructor(e) { + this._host = e, this.domNode = this._createDomNode(), this._linesCollection = + new dt((() => this._host.createVisibleLine())) + } + _createDomNode() { + const e = (0, M.X)(document.createElement("div")); + return e.setClassName("view-layer"), e.setPosition("absolute"), e.domNode + .setAttribute("role", "presentation"), e.domNode.setAttribute( + "aria-hidden", "true"), e + } + onConfigurationChanged(e) { + return !!e.hasChanged(130) + } + onFlushed(e) { + return this._linesCollection.flush(), !0 + } + onLinesChanged(e) { + return this._linesCollection.onLinesChanged(e.fromLineNumber, e.toLineNumber) + } + onLinesDeleted(e) { + const t = this._linesCollection.onLinesDeleted(e.fromLineNumber, e.toLineNumber); + if (t) + for (let e = 0, i = t.length; e < i; e++) { + const i = t[e].getDomNode(); + i && this.domNode.domNode.removeChild(i) + } + return !0 + } + onLinesInserted(e) { + const t = this._linesCollection.onLinesInserted(e.fromLineNumber, e.toLineNumber); + if (t) + for (let e = 0, i = t.length; e < i; e++) { + const i = t[e].getDomNode(); + i && this.domNode.domNode.removeChild(i) + } + return !0 + } + onScrollChanged(e) { + return e.scrollTopChanged + } + onTokensChanged(e) { + return this._linesCollection.onTokensChanged(e.ranges) + } + onZonesChanged(e) { + return !0 + } + getStartLineNumber() { + return this._linesCollection.getStartLineNumber() + } + getEndLineNumber() { + return this._linesCollection.getEndLineNumber() + } + getVisibleLine(e) { + return this._linesCollection.getLine(e) + } + renderLines(e) { + const t = this._linesCollection._get(), + i = new ht(this.domNode.domNode, this._host, e), + n = { + rendLineNumberStart: t.rendLineNumberStart, + lines: t.lines, + linesLength: t.lines.length + }, + o = i.render(n, e.startLineNumber, e.endLineNumber, e.relativeVerticalOffset); + this._linesCollection._set(o.rendLineNumberStart, o.lines) + } + } + class ht { + constructor(e, t, i) { + this.domNode = e, this.host = t, this.viewportData = i + } + render(e, t, i, n) { + const o = { + rendLineNumberStart: e.rendLineNumberStart, + lines: e.lines.slice(0), + linesLength: e.linesLength + }; + if (o.rendLineNumberStart + o.linesLength - 1 < t || i < o.rendLineNumberStart) { + o.rendLineNumberStart = t, o.linesLength = i - t + 1, o.lines = []; + for (let e = t; e <= i; e++) o.lines[e - t] = this.host.createVisibleLine(); + return this._finishRendering(o, !0, n), o + } + if (this._renderUntouchedLines(o, Math.max(t - o.rendLineNumberStart, + 0), Math.min(i - o.rendLineNumberStart, o.linesLength - 1), n, t), o + .rendLineNumberStart > t) { + const e = t, + r = Math.min(i, o.rendLineNumberStart - 1); + e <= r && (this._insertLinesBefore(o, e, r, n, t), o.linesLength += r - + e + 1) + } else if (o.rendLineNumberStart < t) { + const e = Math.min(o.linesLength, t - o.rendLineNumberStart); + e > 0 && (this._removeLinesBefore(o, e), o.linesLength -= e) + } + if (o.rendLineNumberStart = t, o.rendLineNumberStart + o.linesLength - + 1 < i) { + const e = o.rendLineNumberStart + o.linesLength, + r = i; + e <= r && (this._insertLinesAfter(o, e, r, n, t), o.linesLength += r - + e + 1) + } else if (o.rendLineNumberStart + o.linesLength - 1 > i) { + const e = Math.max(0, i - o.rendLineNumberStart + 1), + t = o.linesLength - 1 - e + 1; + t > 0 && (this._removeLinesAfter(o, t), o.linesLength -= t) + } + return this._finishRendering(o, !1, n), o + } + _renderUntouchedLines(e, t, i, n, o) { + const r = e.rendLineNumberStart, + s = e.lines; + for (let e = t; e <= i; e++) { + const t = r + e; + s[e].layoutLine(t, n[t - o]) + } + } + _insertLinesBefore(e, t, i, n, o) { + const r = []; + let s = 0; + for (let e = t; e <= i; e++) r[s++] = this.host.createVisibleLine(); + e.lines = r.concat(e.lines) + } + _removeLinesBefore(e, t) { + for (let i = 0; i < t; i++) { + const t = e.lines[i].getDomNode(); + t && this.domNode.removeChild(t) + } + e.lines.splice(0, t) + } + _insertLinesAfter(e, t, i, n, o) { + const r = []; + let s = 0; + for (let e = t; e <= i; e++) r[s++] = this.host.createVisibleLine(); + e.lines = e.lines.concat(r) + } + _removeLinesAfter(e, t) { + const i = e.linesLength - t; + for (let n = 0; n < t; n++) { + const t = e.lines[i + n].getDomNode(); + t && this.domNode.removeChild(t) + } + e.lines.splice(i, t) + } + _finishRenderingNewLines(e, t, i, n) { + ht._ttPolicy && (i = ht._ttPolicy.createHTML(i)); + const o = this.domNode.lastChild; + t || !o ? this.domNode.innerHTML = i : o.insertAdjacentHTML("afterend", + i); + let r = this.domNode.lastChild; + for (let t = e.linesLength - 1; t >= 0; t--) { + const i = e.lines[t]; + n[t] && (i.setDomNode(r), r = r.previousSibling) + } + } + _finishRenderingInvalidLines(e, t, i) { + const n = document.createElement("div"); + ht._ttPolicy && (t = ht._ttPolicy.createHTML(t)), n.innerHTML = t; + for (let t = 0; t < e.linesLength; t++) { + const o = e.lines[t]; + if (i[t]) { + const e = n.firstChild, + t = o.getDomNode(); + t.parentNode.replaceChild(e, t), o.setDomNode(e) + } + } + } + _finishRendering(e, t, i) { + const n = ht._sb, + o = e.linesLength, + r = e.lines, + s = e.rendLineNumberStart, + a = []; { + n.reset(); + let l = !1; + for (let e = 0; e < o; e++) { + const t = r[e]; + a[e] = !1, t.getDomNode() || t.renderLine(e + s, i[e], this.viewportData, + n) && (a[e] = !0, l = !0) + } + l && this._finishRenderingNewLines(e, t, n.build(), a) + } { + n.reset(); + let t = !1; + const l = []; + for (let e = 0; e < o; e++) { + const o = r[e]; + (l[e] = !1, a[e]) || o.renderLine(e + s, i[e], this.viewportData, n) && + (l[e] = !0, t = !0) + } + t && this._finishRenderingInvalidLines(e, n.build(), l) + } + } + } + ht._ttPolicy = null === (at = window.trustedTypes) || void 0 === at ? + void 0 : at.createPolicy("editorViewLayer", { + createHTML: e => e + }), ht._sb = (0, lt.l$)(1e5); + class ut extends q { + constructor(e) { + super(e), this._visibleLines = new ct(this), this.domNode = this._visibleLines + .domNode, this._dynamicOverlays = [], this._isFocused = !1, this.domNode + .setClassName("view-overlays") + } + shouldRender() { + if (super.shouldRender()) return !0; + for (let e = 0, t = this._dynamicOverlays.length; e < t; e++) + if (this._dynamicOverlays[e].shouldRender()) return !0; + return !1 + } + dispose() { + super.dispose(); + for (let e = 0, t = this._dynamicOverlays.length; e < t; e++) this._dynamicOverlays[ + e].dispose(); + this._dynamicOverlays = [] + } + getDomNode() { + return this.domNode + } + createVisibleLine() { + return new gt(this._context.configuration, this._dynamicOverlays) + } + addDynamicOverlay(e) { + this._dynamicOverlays.push(e) + } + onConfigurationChanged(e) { + this._visibleLines.onConfigurationChanged(e); + const t = this._visibleLines.getStartLineNumber(), + i = this._visibleLines.getEndLineNumber(); + for (let n = t; n <= i; n++) this._visibleLines.getVisibleLine(n).onConfigurationChanged( + e); + return !0 + } + onFlushed(e) { + return this._visibleLines.onFlushed(e) + } + onFocusChanged(e) { + return this._isFocused = e.isFocused, !0 + } + onLinesChanged(e) { + return this._visibleLines.onLinesChanged(e) + } + onLinesDeleted(e) { + return this._visibleLines.onLinesDeleted(e) + } + onLinesInserted(e) { + return this._visibleLines.onLinesInserted(e) + } + onScrollChanged(e) { + return this._visibleLines.onScrollChanged(e) || !0 + } + onTokensChanged(e) { + return this._visibleLines.onTokensChanged(e) + } + onZonesChanged(e) { + return this._visibleLines.onZonesChanged(e) + } + prepareRender(e) { + const t = this._dynamicOverlays.filter((e => e.shouldRender())); + for (let i = 0, n = t.length; i < n; i++) { + const n = t[i]; + n.prepareRender(e), n.onDidRender() + } + } + render(e) { + this._viewOverlaysRender(e), this.domNode.toggleClassName("focused", + this._isFocused) + } + _viewOverlaysRender(e) { + this._visibleLines.renderLines(e.viewportData) + } + } + class gt { + constructor(e, t) { + this._configuration = e, this._lineHeight = this._configuration.options + .get(58), this._dynamicOverlays = t, this._domNode = null, this._renderedContent = + null + } + getDomNode() { + return this._domNode ? this._domNode.domNode : null + } + setDomNode(e) { + this._domNode = (0, M.X)(e) + } + onContentChanged() {} + onTokensChanged() {} + onConfigurationChanged(e) { + this._lineHeight = this._configuration.options.get(58) + } + renderLine(e, t, i, n) { + let o = ""; + for (let t = 0, n = this._dynamicOverlays.length; t < n; t++) o += + this._dynamicOverlays[t].render(i.startLineNumber, e); + return this._renderedContent !== o && (this._renderedContent = o, n.appendASCIIString( + '
    '), n.appendASCIIString( + o), n.appendASCIIString("
    "), !0) + } + layoutLine(e, t) { + this._domNode && (this._domNode.setTop(t), this._domNode.setHeight( + this._lineHeight)) + } + } + class pt extends ut { + constructor(e) { + super(e); + const t = this._context.configuration.options.get(130); + this._contentWidth = t.contentWidth, this.domNode.setHeight(0) + } + onConfigurationChanged(e) { + const t = this._context.configuration.options.get(130); + return this._contentWidth = t.contentWidth, super.onConfigurationChanged( + e) || !0 + } + onScrollChanged(e) { + return super.onScrollChanged(e) || e.scrollWidthChanged + } + _viewOverlaysRender(e) { + super._viewOverlaysRender(e), this.domNode.setWidth(Math.max(e.scrollWidth, + this._contentWidth)) + } + } + class mt extends ut { + constructor(e) { + super(e); + const t = this._context.configuration.options, + i = t.get(130); + this._contentLeft = i.contentLeft, this.domNode.setClassName( + "margin-view-overlays"), this.domNode.setWidth(1), D.V.applyFontInfo( + this.domNode, t.get(42)) + } + onConfigurationChanged(e) { + const t = this._context.configuration.options; + D.V.applyFontInfo(this.domNode, t.get(42)); + const i = t.get(130); + return this._contentLeft = i.contentLeft, super.onConfigurationChanged( + e) || !0 + } + onScrollChanged(e) { + return super.onScrollChanged(e) || e.scrollHeightChanged + } + _viewOverlaysRender(e) { + super._viewOverlaysRender(e); + const t = Math.min(e.scrollHeight, 1e6); + this.domNode.setHeight(t), this.domNode.setWidth(this._contentLeft) + } + } + class ft { + constructor(e, t) { + this._coordinateBrand = void 0, this.top = e, this.left = t + } + } + class _t extends q { + constructor(e, t) { + super(e), this._viewDomNode = t, this._widgets = {}, this.domNode = (0, + M.X)(document.createElement("div")), Z.write(this.domNode, 1), this.domNode + .setClassName("contentWidgets"), this.domNode.setPosition("absolute"), + this.domNode.setTop(0), this.overflowingContentWidgetsDomNode = (0, M + .X)(document.createElement("div")), Z.write(this.overflowingContentWidgetsDomNode, + 2), this.overflowingContentWidgetsDomNode.setClassName( + "overflowingContentWidgets") + } + dispose() { + super.dispose(), this._widgets = {} + } + onConfigurationChanged(e) { + const t = Object.keys(this._widgets); + for (const i of t) this._widgets[i].onConfigurationChanged(e); + return !0 + } + onDecorationsChanged(e) { + return !0 + } + onFlushed(e) { + return !0 + } + onLineMappingChanged(e) { + const t = Object.keys(this._widgets); + for (const i of t) this._widgets[i].onLineMappingChanged(e); + return !0 + } + onLinesChanged(e) { + return !0 + } + onLinesDeleted(e) { + return !0 + } + onLinesInserted(e) { + return !0 + } + onScrollChanged(e) { + return !0 + } + onZonesChanged(e) { + return !0 + } + addWidget(e) { + const t = new bt(this._context, this._viewDomNode, e); + this._widgets[t.id] = t, t.allowEditorOverflow ? this.overflowingContentWidgetsDomNode + .appendChild(t.domNode) : this.domNode.appendChild(t.domNode), this.setShouldRender() + } + setWidgetPosition(e, t, i) { + this._widgets[e.getId()].setPosition(t, i), this.setShouldRender() + } + removeWidget(e) { + const t = e.getId(); + if (this._widgets.hasOwnProperty(t)) { + const e = this._widgets[t]; + delete this._widgets[t]; + const i = e.domNode.domNode; + i.parentNode.removeChild(i), i.removeAttribute( + "monaco-visible-content-widget"), this.setShouldRender() + } + } + shouldSuppressMouseDownOnWidget(e) { + return !!this._widgets.hasOwnProperty(e) && this._widgets[e].suppressMouseDown + } + onBeforeRender(e) { + const t = Object.keys(this._widgets); + for (const i of t) this._widgets[i].onBeforeRender(e) + } + prepareRender(e) { + const t = Object.keys(this._widgets); + for (const i of t) this._widgets[i].prepareRender(e) + } + render(e) { + const t = Object.keys(this._widgets); + for (const i of t) this._widgets[i].render(e) + } + } + class bt { + constructor(e, t, i) { + this._context = e, this._viewDomNode = t, this._actual = i, this.domNode = + (0, M.X)(this._actual.getDomNode()), this.id = this._actual.getId(), + this.allowEditorOverflow = this._actual.allowEditorOverflow || !1, + this.suppressMouseDown = this._actual.suppressMouseDown || !1; + const n = this._context.configuration.options, + o = n.get(130); + this._fixedOverflowWidgets = n.get(35), this._contentWidth = o.contentWidth, + this._contentLeft = o.contentLeft, this._lineHeight = n.get(58), this + ._range = null, this._viewRange = null, this._preference = [], this._cachedDomNodeClientWidth = - + 1, this._cachedDomNodeClientHeight = -1, this._maxWidth = this._getMaxWidth(), + this._isVisible = !1, this._renderData = null, this.domNode.setPosition( + this._fixedOverflowWidgets && this.allowEditorOverflow ? "fixed" : + "absolute"), this.domNode.setVisibility("hidden"), this.domNode.setAttribute( + "widgetId", this.id), this.domNode.setMaxWidth(this._maxWidth) + } + onConfigurationChanged(e) { + const t = this._context.configuration.options; + if (this._lineHeight = t.get(58), e.hasChanged(130)) { + const e = t.get(130); + this._contentLeft = e.contentLeft, this._contentWidth = e.contentWidth, + this._maxWidth = this._getMaxWidth() + } + } + onLineMappingChanged(e) { + this._setPosition(this._range) + } + _setPosition(e) { + if (this._range = e, this._viewRange = null, this._range) { + const e = this._context.model.validateModelRange(this._range); + (this._context.model.coordinatesConverter.modelPositionIsVisible(e.getStartPosition()) || + this._context.model.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()) + ) && (this._viewRange = this._context.model.coordinatesConverter.convertModelRangeToViewRange( + e)) + } + } + _getMaxWidth() { + return this.allowEditorOverflow ? window.innerWidth || document.documentElement + .clientWidth || document.body.clientWidth : this._contentWidth + } + setPosition(e, t) { + this._setPosition(e), this._preference = t, this._cachedDomNodeClientWidth = - + 1, this._cachedDomNodeClientHeight = -1 + } + _layoutBoxInViewport(e, t, i, n, o) { + const r = e.top, + s = r, + a = t.top + this._lineHeight, + l = r - n, + d = s >= n, + c = a, + h = o.viewportHeight - a >= n; + let u = e.left, + g = t.left; + return u + i > o.scrollLeft + o.viewportWidth && (u = o.scrollLeft + o + .viewportWidth - i), g + i > o.scrollLeft + o.viewportWidth && (g = + o.scrollLeft + o.viewportWidth - i), u < o.scrollLeft && (u = o.scrollLeft), + g < o.scrollLeft && (g = o.scrollLeft), { + fitsAbove: d, + aboveTop: l, + aboveLeft: u, + fitsBelow: h, + belowTop: c, + belowLeft: g + } + } + _layoutHorizontalSegmentInPage(e, t, i, n) { + const o = Math.max(0, t.left - n), + r = Math.min(t.left + t.width + n, e.width); + let s = t.left + i - S.DI.scrollX; + if (s + n > r) { + const e = s - (r - n); + s -= e, i -= e + } + if (s < o) { + const e = s - o; + s -= e, i -= e + } + return [i, s] + } + _layoutBoxInPage(e, t, i, n, o) { + const r = e.top - n, + s = t.top + this._lineHeight, + a = S.i(this._viewDomNode.domNode), + l = a.top + r - S.DI.scrollY, + d = a.top + s - S.DI.scrollY, + c = S.D6(document.body), + [h, u] = this._layoutHorizontalSegmentInPage(c, a, e.left - o.scrollLeft + + this._contentLeft, i), + [g, p] = this._layoutHorizontalSegmentInPage(c, a, t.left - o.scrollLeft + + this._contentLeft, i), + m = l >= 22, + f = d + n <= c.height - 22; + return this._fixedOverflowWidgets ? { + fitsAbove: m, + aboveTop: Math.max(l, 22), + aboveLeft: u, + fitsBelow: f, + belowTop: d, + belowLeft: p + } : { + fitsAbove: m, + aboveTop: r, + aboveLeft: h, + fitsBelow: f, + belowTop: s, + belowLeft: g + } + } + _prepareRenderWidgetAtExactPositionOverflowing(e) { + return new ft(e.top, e.left + this._contentLeft) + } + _getTopAndBottomLeft(e) { + if (!this._viewRange) return [null, null]; + const t = e.linesVisibleRangesForRange(this._viewRange, !1); + if (!t || 0 === t.length) return [null, null]; + let i = t[0], + n = t[0]; + for (const e of t) e.lineNumber < i.lineNumber && (i = e), e.lineNumber > + n.lineNumber && (n = e); + let o = 1073741824; + for (const e of i.ranges) e.left < o && (o = e.left); + let r = 1073741824; + for (const e of n.ranges) e.left < r && (r = e.left); + const s = e.getVerticalOffsetForLineNumber(i.lineNumber) - e.scrollTop, + a = new ft(s, o), + l = e.getVerticalOffsetForLineNumber(n.lineNumber) - e.scrollTop; + return [a, new ft(l, r)] + } + _prepareRenderWidget(e) { + const [t, i] = this._getTopAndBottomLeft(e); + if (!t || !i) return null; + if (-1 === this._cachedDomNodeClientWidth || -1 === this._cachedDomNodeClientHeight) { + let e = null; + if ("function" == typeof this._actual.beforeRender && (e = vt(this._actual + .beforeRender, this._actual)), e) this._cachedDomNodeClientWidth = + e.width, this._cachedDomNodeClientHeight = e.height; + else { + const e = this.domNode.domNode; + this._cachedDomNodeClientWidth = e.clientWidth, this._cachedDomNodeClientHeight = + e.clientHeight + } + } + let n; + if (n = this.allowEditorOverflow ? this._layoutBoxInPage(t, i, this._cachedDomNodeClientWidth, + this._cachedDomNodeClientHeight, e) : this._layoutBoxInViewport(t, i, + this._cachedDomNodeClientWidth, this._cachedDomNodeClientHeight, e), + this._preference) + for (let e = 1; e <= 2; e++) + for (const i of this._preference) + if (1 === i) { + if (!n) return null; + if (2 === e || n.fitsAbove) return { + coordinate: new ft(n.aboveTop, n.aboveLeft), + position: 1 + } + } else { + if (2 !== i) return this.allowEditorOverflow ? { + coordinate: this._prepareRenderWidgetAtExactPositionOverflowing( + t), + position: 0 + } : { + coordinate: t, + position: 0 + }; + if (!n) return null; + if (2 === e || n.fitsBelow) return { + coordinate: new ft(n.belowTop, n.belowLeft), + position: 2 + } + } + return null + } + onBeforeRender(e) { + this._viewRange && this._preference && (this._viewRange.endLineNumber < + e.startLineNumber || this._viewRange.startLineNumber > e.endLineNumber || + this.domNode.setMaxWidth(this._maxWidth)) + } + prepareRender(e) { + this._renderData = this._prepareRenderWidget(e) + } + render(e) { + if (!this._renderData) return this._isVisible && (this.domNode.removeAttribute( + "monaco-visible-content-widget"), this._isVisible = !1, this.domNode + .setVisibility("hidden")), void("function" == typeof this._actual.afterRender && + vt(this._actual.afterRender, this._actual, null)); + this.allowEditorOverflow ? (this.domNode.setTop(this._renderData.coordinate + .top), this.domNode.setLeft(this._renderData.coordinate.left)) : ( + this.domNode.setTop(this._renderData.coordinate.top + e.scrollTop - + e.bigNumbersDelta), this.domNode.setLeft(this._renderData.coordinate + .left)), this._isVisible || (this.domNode.setVisibility("inherit"), + this.domNode.setAttribute("monaco-visible-content-widget", "true"), + this._isVisible = !0), "function" == typeof this._actual.afterRender && + vt(this._actual.afterRender, this._actual, this._renderData.position) + } + } + + function vt(e, t, ...i) { + try { + return e.call(t, ...i) + } catch (e) { + return null + } + } + var wt = i(1260), + Ct = {}; + Ct.styleTagTransform = v(), Ct.setAttributes = m(), Ct.insert = g().bind( + null, "head"), Ct.domAPI = h(), Ct.insertStyleElement = _(), d()(wt.Z, + Ct), wt.Z && wt.Z.locals && wt.Z.locals; + var yt = i(9488); + let St = !0; + class xt extends qe { + constructor(e) { + super(), this._context = e; + const t = this._context.configuration.options, + i = t.get(130); + this._lineHeight = t.get(58), this._renderLineHighlight = t.get(85), + this._renderLineHighlightOnlyWhenFocus = t.get(86), this._contentLeft = + i.contentLeft, this._contentWidth = i.contentWidth, this._selectionIsEmpty = ! + 0, this._focused = !1, this._cursorLineNumbers = [1], this._selections = [ + new T.Y(1, 1, 1, 1) + ], this._renderData = null, this._context.addEventHandler(this) + } + dispose() { + this._context.removeEventHandler(this), super.dispose() + } + _readFromSelections() { + let e = !1; + const t = St ? this._selections.slice(0, 1) : this._selections, + i = t.map((e => e.positionLineNumber)); + i.sort(((e, t) => e - t)), yt.fS(this._cursorLineNumbers, i) || (this._cursorLineNumbers = + i, e = !0); + const n = t.every((e => e.isEmpty())); + return this._selectionIsEmpty !== n && (this._selectionIsEmpty = n, e = ! + 0), e + } + onThemeChanged(e) { + return this._readFromSelections() + } + onConfigurationChanged(e) { + const t = this._context.configuration.options, + i = t.get(130); + return this._lineHeight = t.get(58), this._renderLineHighlight = t.get( + 85), this._renderLineHighlightOnlyWhenFocus = t.get(86), this._contentLeft = + i.contentLeft, this._contentWidth = i.contentWidth, !0 + } + onCursorStateChanged(e) { + return this._selections = e.selections, this._readFromSelections() + } + onFlushed(e) { + return !0 + } + onLinesDeleted(e) { + return !0 + } + onLinesInserted(e) { + return !0 + } + onScrollChanged(e) { + return e.scrollWidthChanged || e.scrollTopChanged + } + onZonesChanged(e) { + return !0 + } + onFocusChanged(e) { + return !!this._renderLineHighlightOnlyWhenFocus && (this._focused = e.isFocused, ! + 0) + } + prepareRender(e) { + if (!this._shouldRenderThis()) return void(this._renderData = null); + const t = this._renderOne(e), + i = e.visibleRange.startLineNumber, + n = e.visibleRange.endLineNumber, + o = this._cursorLineNumbers.length; + let r = 0; + const s = []; + for (let e = i; e <= n; e++) { + const n = e - i; + for (; r < o && this._cursorLineNumbers[r] < e;) r++; + r < o && this._cursorLineNumbers[r] === e ? s[n] = t : s[n] = "" + } + this._renderData = s + } + render(e, t) { + if (!this._renderData) return ""; + const i = t - e; + return i >= this._renderData.length ? "" : this._renderData[i] + } + } + class kt extends xt { + _renderOne(e) { + return + `
    ` + } + _shouldRenderThis() { + return ("line" === this._renderLineHighlight || "all" === this._renderLineHighlight) && + this._selectionIsEmpty && (!this._renderLineHighlightOnlyWhenFocus || + this._focused) + } + _shouldRenderOther() { + return ("gutter" === this._renderLineHighlight || "all" === this._renderLineHighlight) && + (!this._renderLineHighlightOnlyWhenFocus || this._focused) + } + } + class Lt extends xt { + _renderOne(e) { + return + `
    ` + } + _shouldRenderMargin() { + return ("gutter" === this._renderLineHighlight || "all" === this._renderLineHighlight) && + (!this._renderLineHighlightOnlyWhenFocus || this._focused) + } + _shouldRenderThis() { + return !0 + } + _shouldRenderOther() { + return ("line" === this._renderLineHighlight || "all" === this._renderLineHighlight) && + this._selectionIsEmpty && (!this._renderLineHighlightOnlyWhenFocus || + this._focused) + } + }(0, Ge.Ic)(((e, t) => { + St = !1; + const i = e.getColor(Ze.Kh); + if (i && (t.addRule( + `.monaco-editor .view-overlays .current-line { background-color: ${i}; }` + ), t.addRule( + `.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }` + )), !i || i.isTransparent() || e.defines(Ze.Mm)) { + const i = e.getColor(Ze.Mm); + i && (St = !0, t.addRule( + `.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }` + ), t.addRule( + `.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }` + ), "hc" === e.type && (t.addRule( + ".monaco-editor .view-overlays .current-line { border-width: 1px; }" + ), t.addRule( + ".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }" + ))) + } + })); + var Nt = i(5686), + Dt = {}; + Dt.styleTagTransform = v(), Dt.setAttributes = m(), Dt.insert = g().bind( + null, "head"), Dt.domAPI = h(), Dt.insertStyleElement = _(), d()(Nt.Z, + Dt), Nt.Z && Nt.Z.locals && Nt.Z.locals; + class Et extends qe { + constructor(e) { + super(), this._context = e; + const t = this._context.configuration.options; + this._lineHeight = t.get(58), this._typicalHalfwidthCharacterWidth = t + .get(42).typicalHalfwidthCharacterWidth, this._renderResult = null, + this._context.addEventHandler(this) + } + dispose() { + this._context.removeEventHandler(this), this._renderResult = null, + super.dispose() + } + onConfigurationChanged(e) { + const t = this._context.configuration.options; + return this._lineHeight = t.get(58), this._typicalHalfwidthCharacterWidth = + t.get(42).typicalHalfwidthCharacterWidth, !0 + } + onDecorationsChanged(e) { + return !0 + } + onFlushed(e) { + return !0 + } + onLinesChanged(e) { + return !0 + } + onLinesDeleted(e) { + return !0 + } + onLinesInserted(e) { + return !0 + } + onScrollChanged(e) { + return e.scrollTopChanged || e.scrollWidthChanged + } + onZonesChanged(e) { + return !0 + } + prepareRender(e) { + const t = e.getDecorationsInViewport(); + let i = [], + n = 0; + for (let e = 0, o = t.length; e < o; e++) { + const o = t[e]; + o.options.className && (i[n++] = o) + } + i = i.sort(((e, t) => { + if (e.options.zIndex < t.options.zIndex) return -1; + if (e.options.zIndex > t.options.zIndex) return 1; + const i = e.options.className, + n = t.options.className; + return i < n ? -1 : i > n ? 1 : _e.e.compareRangesUsingStarts(e.range, + t.range) + })); + const o = e.visibleRange.startLineNumber, + r = e.visibleRange.endLineNumber, + s = []; + for (let e = o; e <= r; e++) s[e - o] = ""; + this._renderWholeLineDecorations(e, i, s), this._renderNormalDecorations( + e, i, s), this._renderResult = s + } + _renderWholeLineDecorations(e, t, i) { + const n = String(this._lineHeight), + o = e.visibleRange.startLineNumber, + r = e.visibleRange.endLineNumber; + for (let e = 0, s = t.length; e < s; e++) { + const s = t[e]; + if (!s.options.isWholeLine) continue; + const a = '
    ', + l = Math.max(s.range.startLineNumber, o), + d = Math.min(s.range.endLineNumber, r); + for (let e = l; e <= d; e++) i[e - o] += a + } + } + _renderNormalDecorations(e, t, i) { + const n = String(this._lineHeight), + o = e.visibleRange.startLineNumber; + let r = null, + s = !1, + a = null; + for (let l = 0, d = t.length; l < d; l++) { + const d = t[l]; + if (d.options.isWholeLine) continue; + const c = d.options.className, + h = Boolean(d.options.showIfCollapsed); + let u = d.range; + h && 1 === u.endColumn && u.endLineNumber !== u.startLineNumber && (u = + new _e.e(u.startLineNumber, u.startColumn, u.endLineNumber - 1, + this._context.model.getLineMaxColumn(u.endLineNumber - 1))), r === + c && s === h && _e.e.areIntersectingOrTouching(a, u) ? a = _e.e.plusRange( + a, u) : (null !== r && this._renderNormalDecoration(e, a, r, s, n, + o, i), r = c, s = h, a = u) + } + null !== r && this._renderNormalDecoration(e, a, r, s, n, o, i) + } + _renderNormalDecoration(e, t, i, n, o, r, s) { + const a = e.linesVisibleRangesForRange(t, "findMatch" === i); + if (a) + for (let e = 0, t = a.length; e < t; e++) { + const t = a[e]; + if (t.outsideRenderedLine) continue; + const l = t.lineNumber - r; + if (n && 1 === t.ranges.length) { + const e = t.ranges[0]; + 0 === e.width && (t.ranges[0] = new Q(e.left, this._typicalHalfwidthCharacterWidth)) + } + for (let e = 0, n = t.ranges.length; e < n; e++) { + const n = t.ranges[e], + r = '
    '; + s[l] += r + } + } + } + render(e, t) { + if (!this._renderResult) return ""; + const i = t - e; + return i < 0 || i >= this._renderResult.length ? "" : this._renderResult[ + i] + } + } + var It = i(6781); + class Tt extends q { + constructor(e, t, i, n) { + super(e); + const o = this._context.configuration.options, + r = o.get(92), + s = o.get(66), + a = o.get(33), + l = o.get(95), + d = { + listenOnDomNode: i.domNode, + className: "editor-scrollable " + (0, Ge.m6)(e.theme.type), + useShadows: !1, + lazyRender: !0, + vertical: r.vertical, + horizontal: r.horizontal, + verticalHasArrows: r.verticalHasArrows, + horizontalHasArrows: r.horizontalHasArrows, + verticalScrollbarSize: r.verticalScrollbarSize, + verticalSliderSize: r.verticalSliderSize, + horizontalScrollbarSize: r.horizontalScrollbarSize, + horizontalSliderSize: r.horizontalSliderSize, + handleMouseWheel: r.handleMouseWheel, + alwaysConsumeMouseWheel: r.alwaysConsumeMouseWheel, + arrowSize: r.arrowSize, + mouseWheelScrollSensitivity: s, + fastScrollSensitivity: a, + scrollPredominantAxis: l, + scrollByPage: r.scrollByPage + }; + this.scrollbar = this._register(new It.$Z(t.domNode, d, this._context.viewLayout + .getScrollable())), Z.write(this.scrollbar.getDomNode(), 5), this.scrollbarDomNode = + (0, M.X)(this.scrollbar.getDomNode()), this.scrollbarDomNode.setPosition( + "absolute"), this._setLayout(); + const c = (e, t, i) => { + const n = {}; + if (t) { + const t = e.scrollTop; + t && (n.scrollTop = this._context.viewLayout.getCurrentScrollTop() + + t, e.scrollTop = 0) + } + if (i) { + const t = e.scrollLeft; + t && (n.scrollLeft = this._context.viewLayout.getCurrentScrollLeft() + + t, e.scrollLeft = 0) + } + this._context.model.setScrollPosition(n, 1) + }; + this._register(S.nm(i.domNode, "scroll", (e => c(i.domNode, !0, !0)))), + this._register(S.nm(t.domNode, "scroll", (e => c(t.domNode, !0, !1)))), + this._register(S.nm(n.domNode, "scroll", (e => c(n.domNode, !0, !1)))), + this._register(S.nm(this.scrollbarDomNode.domNode, "scroll", (e => c( + this.scrollbarDomNode.domNode, !0, !1)))) + } + dispose() { + super.dispose() + } + _setLayout() { + const e = this._context.configuration.options, + t = e.get(130); + this.scrollbarDomNode.setLeft(t.contentLeft), "right" === e.get(64).side ? + this.scrollbarDomNode.setWidth(t.contentWidth + t.minimap.minimapWidth) : + this.scrollbarDomNode.setWidth(t.contentWidth), this.scrollbarDomNode + .setHeight(t.height) + } + getOverviewRulerLayoutInfo() { + return this.scrollbar.getOverviewRulerLayoutInfo() + } + getDomNode() { + return this.scrollbarDomNode + } + delegateVerticalScrollbarMouseDown(e) { + this.scrollbar.delegateVerticalScrollbarMouseDown(e) + } + onConfigurationChanged(e) { + if (e.hasChanged(92) || e.hasChanged(66) || e.hasChanged(33)) { + const e = this._context.configuration.options, + t = e.get(92), + i = e.get(66), + n = e.get(33), + o = e.get(95), + r = { + vertical: t.vertical, + horizontal: t.horizontal, + verticalScrollbarSize: t.verticalScrollbarSize, + horizontalScrollbarSize: t.horizontalScrollbarSize, + scrollByPage: t.scrollByPage, + handleMouseWheel: t.handleMouseWheel, + mouseWheelScrollSensitivity: i, + fastScrollSensitivity: n, + scrollPredominantAxis: o + }; + this.scrollbar.updateOptions(r) + } + return e.hasChanged(130) && this._setLayout(), !0 + } + onScrollChanged(e) { + return !0 + } + onThemeChanged(e) { + return this.scrollbar.updateClassName("editor-scrollable " + (0, Ge.m6) + (this._context.theme.type)), !0 + } + prepareRender(e) {} + render(e) { + this.scrollbar.renderNow() + } + } + var Mt = i(4827), + At = {}; + At.styleTagTransform = v(), At.setAttributes = m(), At.insert = g().bind( + null, "head"), At.domAPI = h(), At.insertStyleElement = _(), d()(Mt.Z, + At), Mt.Z && Mt.Z.locals && Mt.Z.locals; + class Rt { + constructor(e, t, i) { + this._decorationToRenderBrand = void 0, this.startLineNumber = +e, + this.endLineNumber = +t, this.className = String(i) + } + } + class Ot extends qe { + _render(e, t, i) { + const n = []; + for (let i = e; i <= t; i++) n[i - e] = []; + if (0 === i.length) return n; + i.sort(((e, t) => e.className === t.className ? e.startLineNumber === + t.startLineNumber ? e.endLineNumber - t.endLineNumber : e.startLineNumber - + t.startLineNumber : e.className < t.className ? -1 : 1)); + let o = null, + r = 0; + for (let s = 0, a = i.length; s < a; s++) { + const a = i[s], + l = a.className; + let d = Math.max(a.startLineNumber, e) - e; + const c = Math.min(a.endLineNumber, t) - e; + o === l ? (d = Math.max(r + 1, d), r = Math.max(r, c)) : (o = l, r = + c); + for (let e = d; e <= r; e++) n[e].push(o) + } + return n + } + } + class Pt extends Ot { + constructor(e) { + super(), this._context = e; + const t = this._context.configuration.options, + i = t.get(130); + this._lineHeight = t.get(58), this._glyphMargin = t.get(48), this._glyphMarginLeft = + i.glyphMarginLeft, this._glyphMarginWidth = i.glyphMarginWidth, this._renderResult = + null, this._context.addEventHandler(this) + } + dispose() { + this._context.removeEventHandler(this), this._renderResult = null, + super.dispose() + } + onConfigurationChanged(e) { + const t = this._context.configuration.options, + i = t.get(130); + return this._lineHeight = t.get(58), this._glyphMargin = t.get(48), + this._glyphMarginLeft = i.glyphMarginLeft, this._glyphMarginWidth = i + .glyphMarginWidth, !0 + } + onDecorationsChanged(e) { + return !0 + } + onFlushed(e) { + return !0 + } + onLinesChanged(e) { + return !0 + } + onLinesDeleted(e) { + return !0 + } + onLinesInserted(e) { + return !0 + } + onScrollChanged(e) { + return e.scrollTopChanged + } + onZonesChanged(e) { + return !0 + } + _getDecorations(e) { + const t = e.getDecorationsInViewport(); + let i = [], + n = 0; + for (let e = 0, o = t.length; e < o; e++) { + const o = t[e], + r = o.options.glyphMarginClassName; + r && (i[n++] = new Rt(o.range.startLineNumber, o.range.endLineNumber, + r)) + } + return i + } + prepareRender(e) { + if (!this._glyphMargin) return void(this._renderResult = null); + const t = e.visibleRange.startLineNumber, + i = e.visibleRange.endLineNumber, + n = this._render(t, i, this._getDecorations(e)), + o = this._lineHeight.toString(), + r = '" style="left:' + this._glyphMarginLeft.toString() + "px;width:" + + this._glyphMarginWidth.toString() + "px;height:" + o + 'px;">', + s = []; + for (let e = t; e <= i; e++) { + const i = e - t, + o = n[i]; + 0 === o.length ? s[i] = "" : s[i] = '
    = this._renderResult.length ? "" : this._renderResult[ + i] + } + } + var Ft = i(6848), + Bt = {}; + Bt.styleTagTransform = v(), Bt.setAttributes = m(), Bt.insert = g().bind( + null, "head"), Bt.domAPI = h(), Bt.insertStyleElement = _(), d()(Ft.Z, + Bt), Ft.Z && Ft.Z.locals && Ft.Z.locals; + class Wt extends qe { + constructor(e) { + super(), this._context = e, this._primaryLineNumber = 0; + const t = this._context.configuration.options, + i = t.get(131), + n = t.get(42); + this._lineHeight = t.get(58), this._spaceWidth = n.spaceWidth, this._enabled = + t.get(83), this._activeIndentEnabled = t.get(51), this._maxIndentLeft = - + 1 === i.wrappingColumn ? -1 : i.wrappingColumn * n.typicalHalfwidthCharacterWidth, + this._renderResult = null, this._context.addEventHandler(this) + } + dispose() { + this._context.removeEventHandler(this), this._renderResult = null, + super.dispose() + } + onConfigurationChanged(e) { + const t = this._context.configuration.options, + i = t.get(131), + n = t.get(42); + return this._lineHeight = t.get(58), this._spaceWidth = n.spaceWidth, + this._enabled = t.get(83), this._activeIndentEnabled = t.get(51), + this._maxIndentLeft = -1 === i.wrappingColumn ? -1 : i.wrappingColumn * + n.typicalHalfwidthCharacterWidth, !0 + } + onCursorStateChanged(e) { + const t = e.selections[0], + i = t.isEmpty() ? t.positionLineNumber : 0; + return this._primaryLineNumber !== i && (this._primaryLineNumber = i, ! + 0) + } + onDecorationsChanged(e) { + return !0 + } + onFlushed(e) { + return !0 + } + onLinesChanged(e) { + return !0 + } + onLinesDeleted(e) { + return !0 + } + onLinesInserted(e) { + return !0 + } + onScrollChanged(e) { + return e.scrollTopChanged + } + onZonesChanged(e) { + return !0 + } + onLanguageConfigurationChanged(e) { + return !0 + } + prepareRender(e) { + if (!this._enabled) return void(this._renderResult = null); + const t = e.visibleRange.startLineNumber, + i = e.visibleRange.endLineNumber, + { + indentSize: n + } = this._context.model.getTextModelOptions(), + o = n * this._spaceWidth, + r = e.scrollWidth, + s = this._lineHeight, + a = this._context.model.getLinesIndentGuides(t, i); + let l = 0, + d = 0, + c = 0; + if (this._activeIndentEnabled && this._primaryLineNumber) { + const e = this._context.model.getActiveIndentGuide(this._primaryLineNumber, + t, i); + l = e.startLineNumber, d = e.endLineNumber, c = e.indent + } + const h = []; + for (let n = t; n <= i; n++) { + const i = l <= n && n <= d, + u = n - t, + g = a[u]; + let p = ""; + if (g >= 1) { + const t = e.visibleRangeForPosition(new fe.L(n, 1)); + let a = t ? t.left : 0; + for (let e = 1; e <= g && (p += + `
    `, + a += o, !(a > r || this._maxIndentLeft > 0 && a > this._maxIndentLeft) + ); e++); + } + h[u] = p + } + this._renderResult = h + } + render(e, t) { + if (!this._renderResult) return ""; + const i = t - e; + return i < 0 || i >= this._renderResult.length ? "" : this._renderResult[ + i] + } + }(0, Ge.Ic)(((e, t) => { + const i = e.getColor(Ze.tR); + i && t.addRule( + `.monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ${i} inset; }` + ); + const n = e.getColor(Ze.Ym) || i; + n && t.addRule( + `.monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ${n} inset; }` + ) + })); + var zt = i(9565), + Vt = {}; + Vt.styleTagTransform = v(), Vt.setAttributes = m(), Vt.insert = g().bind( + null, "head"), Vt.domAPI = h(), Vt.insertStyleElement = _(), d()(zt.Z, + Vt), zt.Z && zt.Z.locals && zt.Z.locals; + class Ht { + constructor() { + this._currentVisibleRange = new _e.e(1, 1, 1, 1) + } + getCurrentVisibleRange() { + return this._currentVisibleRange + } + setCurrentVisibleRange(e) { + this._currentVisibleRange = e + } + } + class Ut { + constructor(e, t, i, n, o, r) { + this.lineNumber = e, this.startColumn = t, this.endColumn = i, this.startScrollTop = + n, this.stopScrollTop = o, this.scrollType = r, this.type = "range", + this.minLineNumber = e, this.maxLineNumber = e + } + } + class jt { + constructor(e, t, i, n) { + this.selections = e, this.startScrollTop = t, this.stopScrollTop = i, + this.scrollType = n, this.type = "selections"; + let o = e[0].startLineNumber, + r = e[0].endLineNumber; + for (let t = 1, i = e.length; t < i; t++) { + const i = e[t]; + o = Math.min(o, i.startLineNumber), r = Math.max(r, i.endLineNumber) + } + this.minLineNumber = o, this.maxLineNumber = r + } + } + class Kt extends q { + constructor(e, t) { + super(e), this._linesContent = t, this._textRangeRestingSpot = + document.createElement("div"), this._visibleLines = new ct(this), + this.domNode = this._visibleLines.domNode; + const i = this._context.configuration, + n = this._context.configuration.options, + o = n.get(42), + r = n.get(131); + this._lineHeight = n.get(58), this._typicalHalfwidthCharacterWidth = o + .typicalHalfwidthCharacterWidth, this._isViewportWrapping = r.isViewportWrapping, + this._revealHorizontalRightPadding = n.get(89), this._cursorSurroundingLines = + n.get(24), this._cursorSurroundingLinesStyle = n.get(25), this._canUseLayerHinting = ! + n.get(27), this._viewLineOptions = new de(i, this._context.theme.type), + Z.write(this.domNode, 7), this.domNode.setClassName( + `view-lines ${Je.S}`), D.V.applyFontInfo(this.domNode, o), this._maxLineWidth = + 0, this._asyncUpdateLineWidths = new P.pY((() => { + this._updateLineWidthsSlow() + }), 200), this._asyncCheckMonospaceFontAssumptions = new P.pY((() => { + this._checkMonospaceFontAssumptions() + }), 2e3), this._lastRenderedData = new Ht, this._horizontalRevealRequest = + null + } + dispose() { + this._asyncUpdateLineWidths.dispose(), this._asyncCheckMonospaceFontAssumptions + .dispose(), super.dispose() + } + getDomNode() { + return this.domNode + } + createVisibleLine() { + return new ce(this._viewLineOptions) + } + onConfigurationChanged(e) { + this._visibleLines.onConfigurationChanged(e), e.hasChanged(131) && ( + this._maxLineWidth = 0); + const t = this._context.configuration.options, + i = t.get(42), + n = t.get(131); + return this._lineHeight = t.get(58), this._typicalHalfwidthCharacterWidth = + i.typicalHalfwidthCharacterWidth, this._isViewportWrapping = n.isViewportWrapping, + this._revealHorizontalRightPadding = t.get(89), this._cursorSurroundingLines = + t.get(24), this._cursorSurroundingLinesStyle = t.get(25), this._canUseLayerHinting = ! + t.get(27), D.V.applyFontInfo(this.domNode, i), this._onOptionsMaybeChanged(), + e.hasChanged(130) && (this._maxLineWidth = 0), !0 + } + _onOptionsMaybeChanged() { + const e = this._context.configuration, + t = new de(e, this._context.theme.type); + if (!this._viewLineOptions.equals(t)) { + this._viewLineOptions = t; + const e = this._visibleLines.getStartLineNumber(), + i = this._visibleLines.getEndLineNumber(); + for (let t = e; t <= i; t++) this._visibleLines.getVisibleLine(t).onOptionsChanged( + this._viewLineOptions); + return !0 + } + return !1 + } + onCursorStateChanged(e) { + const t = this._visibleLines.getStartLineNumber(), + i = this._visibleLines.getEndLineNumber(); + let n = !1; + for (let e = t; e <= i; e++) n = this._visibleLines.getVisibleLine(e).onSelectionChanged() || + n; + return n + } + onDecorationsChanged(e) { + { + const e = this._visibleLines.getStartLineNumber(), + t = this._visibleLines.getEndLineNumber(); + for (let i = e; i <= t; i++) this._visibleLines.getVisibleLine(i).onDecorationsChanged() + } + return !0 + } + onFlushed(e) { + const t = this._visibleLines.onFlushed(e); + return this._maxLineWidth = 0, t + } + onLinesChanged(e) { + return this._visibleLines.onLinesChanged(e) + } + onLinesDeleted(e) { + return this._visibleLines.onLinesDeleted(e) + } + onLinesInserted(e) { + return this._visibleLines.onLinesInserted(e) + } + onRevealRangeRequest(e) { + const t = this._computeScrollTopToRevealRange(this._context.viewLayout + .getFutureViewport(), e.source, e.range, e.selections, e.verticalType + ); + if (-1 === t) return !1; + let i = this._context.viewLayout.validateScrollPosition({ + scrollTop: t + }); + e.revealHorizontal ? e.range && e.range.startLineNumber !== e.range.endLineNumber ? + i = { + scrollTop: i.scrollTop, + scrollLeft: 0 + } : e.range ? this._horizontalRevealRequest = new Ut(e.range.startLineNumber, + e.range.startColumn, e.range.endColumn, this._context.viewLayout.getCurrentScrollTop(), + i.scrollTop, e.scrollType) : e.selections && e.selections.length > 0 && + (this._horizontalRevealRequest = new jt(e.selections, this._context.viewLayout + .getCurrentScrollTop(), i.scrollTop, e.scrollType)) : this._horizontalRevealRequest = + null; + const n = Math.abs(this._context.viewLayout.getCurrentScrollTop() - i.scrollTop) <= + this._lineHeight ? 1 : e.scrollType; + return this._context.model.setScrollPosition(i, n), !0 + } + onScrollChanged(e) { + if (this._horizontalRevealRequest && e.scrollLeftChanged && (this._horizontalRevealRequest = + null), this._horizontalRevealRequest && e.scrollTopChanged) { + const t = Math.min(this._horizontalRevealRequest.startScrollTop, this + ._horizontalRevealRequest.stopScrollTop), + i = Math.max(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest + .stopScrollTop); + (e.scrollTop < t || e.scrollTop > i) && (this._horizontalRevealRequest = + null) + } + return this.domNode.setWidth(e.scrollWidth), this._visibleLines.onScrollChanged( + e) || !0 + } + onTokensChanged(e) { + return this._visibleLines.onTokensChanged(e) + } + onZonesChanged(e) { + return this._context.model.setMaxLineWidth(this._maxLineWidth), this._visibleLines + .onZonesChanged(e) + } + onThemeChanged(e) { + return this._onOptionsMaybeChanged() + } + getPositionFromDOMInfo(e, t) { + const i = this._getViewLineDomNode(e); + if (null === i) return null; + const n = this._getLineNumberFor(i); + if (-1 === n) return null; + if (n < 1 || n > this._context.model.getLineCount()) return null; + if (1 === this._context.model.getLineMaxColumn(n)) return new fe.L(n, + 1); + const o = this._visibleLines.getStartLineNumber(), + r = this._visibleLines.getEndLineNumber(); + if (n < o || n > r) return null; + let s = this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n, + e, t); + const a = this._context.model.getLineMinColumn(n); + return s < a && (s = a), new fe.L(n, s) + } + _getViewLineDomNode(e) { + for (; e && 1 === e.nodeType;) { + if (e.className === ce.CLASS_NAME) return e; + e = e.parentElement + } + return null + } + _getLineNumberFor(e) { + const t = this._visibleLines.getStartLineNumber(), + i = this._visibleLines.getEndLineNumber(); + for (let n = t; n <= i; n++) + if (e === this._visibleLines.getVisibleLine(n).getDomNode()) return n; + return -1 + } + getLineWidth(e) { + const t = this._visibleLines.getStartLineNumber(), + i = this._visibleLines.getEndLineNumber(); + return e < t || e > i ? -1 : this._visibleLines.getVisibleLine(e).getWidth() + } + linesVisibleRangesForRange(e, t) { + if (this.shouldRender()) return null; + const i = e.endLineNumber, + n = _e.e.intersectRanges(e, this._lastRenderedData.getCurrentVisibleRange()); + if (!n) return null; + let o = [], + r = 0; + const s = new le(this.domNode.domNode, this._textRangeRestingSpot); + let a = 0; + t && (a = this._context.model.coordinatesConverter.convertViewPositionToModelPosition( + new fe.L(n.startLineNumber, 1)).lineNumber); + const l = this._visibleLines.getStartLineNumber(), + d = this._visibleLines.getEndLineNumber(); + for (let e = n.startLineNumber; e <= n.endLineNumber; e++) { + if (e < l || e > d) continue; + const c = e === n.startLineNumber ? n.startColumn : 1, + h = e === n.endLineNumber ? n.endColumn : this._context.model.getLineMaxColumn( + e), + u = this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e, + c, h, s); + if (u) { + if (t && e < i) { + const t = a; + a = this._context.model.coordinatesConverter.convertViewPositionToModelPosition( + new fe.L(e + 1, 1)).lineNumber, t !== a && (u.ranges[u.ranges.length - + 1].width += this._typicalHalfwidthCharacterWidth) + } + o[r++] = new Y(u.outsideRenderedLine, e, Q.from(u.ranges)) + } + } + return 0 === r ? null : o + } + _visibleRangesForLineRange(e, t, i) { + return this.shouldRender() || e < this._visibleLines.getStartLineNumber() || + e > this._visibleLines.getEndLineNumber() ? null : this._visibleLines + .getVisibleLine(e).getVisibleRangesForRange(e, t, i, new le(this.domNode + .domNode, this._textRangeRestingSpot)) + } + visibleRangeForPosition(e) { + const t = this._visibleRangesForLineRange(e.lineNumber, e.column, e.column); + return t ? new J(t.outsideRenderedLine, t.ranges[0].left) : null + } + updateLineWidths() { + this._updateLineWidths(!1) + } + _updateLineWidthsFast() { + return this._updateLineWidths(!0) + } + _updateLineWidthsSlow() { + this._updateLineWidths(!1) + } + _updateLineWidths(e) { + const t = this._visibleLines.getStartLineNumber(), + i = this._visibleLines.getEndLineNumber(); + let n = 1, + o = !0; + for (let r = t; r <= i; r++) { + const t = this._visibleLines.getVisibleLine(r); + !e || t.getWidthIsFast() ? n = Math.max(n, t.getWidth()) : o = !1 + } + return o && 1 === t && i === this._context.model.getLineCount() && ( + this._maxLineWidth = 0), this._ensureMaxLineWidth(n), o + } + _checkMonospaceFontAssumptions() { + let e = -1, + t = -1; + const i = this._visibleLines.getStartLineNumber(), + n = this._visibleLines.getEndLineNumber(); + for (let o = i; o <= n; o++) { + const i = this._visibleLines.getVisibleLine(o); + if (i.needsMonospaceFontCheck()) { + const n = i.getWidth(); + n > t && (t = n, e = o) + } + } + if (-1 !== e && !this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid()) + for (let e = i; e <= n; e++) this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated() + } + prepareRender() { + throw new Error("Not supported") + } + render() { + throw new Error("Not supported") + } + renderText(e) { + if (this._visibleLines.renderLines(e), this._lastRenderedData.setCurrentVisibleRange( + e.visibleRange), this.domNode.setWidth(this._context.viewLayout.getScrollWidth()), + this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(), + 1e6)), this._horizontalRevealRequest) { + const t = this._horizontalRevealRequest; + if (e.startLineNumber <= t.minLineNumber && t.maxLineNumber <= e.endLineNumber) { + this._horizontalRevealRequest = null, this.onDidRender(); + const e = this._computeScrollLeftToReveal(t); + e && (this._isViewportWrapping || this._ensureMaxLineWidth(e.maxHorizontalOffset), + this._context.model.setScrollPosition({ + scrollLeft: e.scrollLeft + }, t.scrollType)) + } + } + if (this._updateLineWidthsFast() || this._asyncUpdateLineWidths.schedule(), + A.IJ && !this._asyncCheckMonospaceFontAssumptions.isScheduled()) { + const e = this._visibleLines.getStartLineNumber(), + t = this._visibleLines.getEndLineNumber(); + for (let i = e; i <= t; i++) + if (this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()) { + this._asyncCheckMonospaceFontAssumptions.schedule(); + break + } + } + this._linesContent.setLayerHinting(this._canUseLayerHinting), this._linesContent + .setContain("strict"); + const t = this._context.viewLayout.getCurrentScrollTop() - e.bigNumbersDelta; + this._linesContent.setTop(-t), this._linesContent.setLeft(-this._context + .viewLayout.getCurrentScrollLeft()) + } + _ensureMaxLineWidth(e) { + const t = Math.ceil(e); + this._maxLineWidth < t && (this._maxLineWidth = t, this._context.model + .setMaxLineWidth(this._maxLineWidth)) + } + _computeScrollTopToRevealRange(e, t, i, n, o) { + const r = e.top, + s = e.height, + a = r + s; + let l, d, c, h; + if (n && n.length > 0) { + let e = n[0].startLineNumber, + t = n[0].endLineNumber; + for (let i = 1, o = n.length; i < o; i++) { + const o = n[i]; + e = Math.min(e, o.startLineNumber), t = Math.max(t, o.endLineNumber) + } + l = !1, d = this._context.viewLayout.getVerticalOffsetForLineNumber(e), + c = this._context.viewLayout.getVerticalOffsetForLineNumber(t) + + this._lineHeight + } else { + if (!i) return -1; + l = !0, d = this._context.viewLayout.getVerticalOffsetForLineNumber(i + .startLineNumber), c = this._context.viewLayout.getVerticalOffsetForLineNumber( + i.endLineNumber) + this._lineHeight + } + if ("mouse" !== t || "default" !== this._cursorSurroundingLinesStyle) { + const e = Math.min(s / this._lineHeight / 2, this._cursorSurroundingLines); + d -= e * this._lineHeight, c += Math.max(0, e - 1) * this._lineHeight + } + if (0 !== o && 4 !== o || (c += this._lineHeight), c - d > s) { + if (!l) return -1; + h = d + } else if (5 === o || 6 === o) + if (6 === o && r <= d && c <= a) h = r; + else { + const e = d - Math.max(5 * this._lineHeight, .2 * s), + t = c - s; + h = Math.max(t, e) + } else if (1 === o || 2 === o) + if (2 === o && r <= d && c <= a) h = r; + else { + const e = (d + c) / 2; + h = Math.max(0, e - s / 2) + } else h = this._computeMinimumScrolling(r, a, d, c, 3 === o, 4 === o); + return h + } + _computeScrollLeftToReveal(e) { + const t = this._context.viewLayout.getCurrentViewport(), + i = t.left, + n = i + t.width; + let o = 1073741824, + r = 0; + if ("range" === e.type) { + const t = this._visibleRangesForLineRange(e.lineNumber, e.startColumn, + e.endColumn); + if (!t) return null; + for (const e of t.ranges) o = Math.min(o, Math.round(e.left)), r = + Math.max(r, Math.round(e.left + e.width)) + } else + for (const t of e.selections) { + if (t.startLineNumber !== t.endLineNumber) return null; + const e = this._visibleRangesForLineRange(t.startLineNumber, t.startColumn, + t.endColumn); + if (!e) return null; + for (const t of e.ranges) o = Math.min(o, Math.round(t.left)), r = + Math.max(r, Math.round(t.left + t.width)) + } + return o = Math.max(0, o - Kt.HORIZONTAL_EXTRA_PX), r += this._revealHorizontalRightPadding, + "selections" === e.type && r - o > t.width ? null : { + scrollLeft: this._computeMinimumScrolling(i, n, o, r), + maxHorizontalOffset: r + } + } + _computeMinimumScrolling(e, t, i, n, o, r) { + o = !!o, r = !!r; + const s = (t |= 0) - (e |= 0); + return (n |= 0) - (i |= 0) < s ? o ? i : r ? Math.max(0, n - s) : i < + e ? i : n > t ? Math.max(0, n - s) : e : i + } + } + Kt.HORIZONTAL_EXTRA_PX = 30; + var $t = i(4444), + qt = {}; + qt.styleTagTransform = v(), qt.setAttributes = m(), qt.insert = g().bind( + null, "head"), qt.domAPI = h(), qt.insertStyleElement = _(), d()($t.Z, + qt), $t.Z && $t.Z.locals && $t.Z.locals; + class Zt extends Ot { + constructor(e) { + super(), this._context = e; + const t = this._context.configuration.options.get(130); + this._decorationsLeft = t.decorationsLeft, this._decorationsWidth = t.decorationsWidth, + this._renderResult = null, this._context.addEventHandler(this) + } + dispose() { + this._context.removeEventHandler(this), this._renderResult = null, + super.dispose() + } + onConfigurationChanged(e) { + const t = this._context.configuration.options.get(130); + return this._decorationsLeft = t.decorationsLeft, this._decorationsWidth = + t.decorationsWidth, !0 + } + onDecorationsChanged(e) { + return !0 + } + onFlushed(e) { + return !0 + } + onLinesChanged(e) { + return !0 + } + onLinesDeleted(e) { + return !0 + } + onLinesInserted(e) { + return !0 + } + onScrollChanged(e) { + return e.scrollTopChanged + } + onZonesChanged(e) { + return !0 + } + _getDecorations(e) { + const t = e.getDecorationsInViewport(); + let i = [], + n = 0; + for (let e = 0, o = t.length; e < o; e++) { + const o = t[e], + r = o.options.linesDecorationsClassName; + r && (i[n++] = new Rt(o.range.startLineNumber, o.range.endLineNumber, + r)); + const s = o.options.firstLineDecorationClassName; + s && (i[n++] = new Rt(o.range.startLineNumber, o.range.startLineNumber, + s)) + } + return i + } + prepareRender(e) { + const t = e.visibleRange.startLineNumber, + i = e.visibleRange.endLineNumber, + n = this._render(t, i, this._getDecorations(e)), + o = '" style="left:' + this._decorationsLeft.toString() + "px;width:" + + this._decorationsWidth.toString() + 'px;">
    ', + r = []; + for (let e = t; e <= i; e++) { + const i = e - t, + s = n[i]; + let a = ""; + for (let e = 0, t = s.length; e < t; e++) a += '
    '; + o[i] = s + } + this._renderResult = o + } + render(e, t) { + return this._renderResult ? this._renderResult[t - e] : "" + } + } + var Xt = i(563), + Jt = {}; + Jt.styleTagTransform = v(), Jt.setAttributes = m(), Jt.insert = g().bind( + null, "head"), Jt.domAPI = h(), Jt.insertStyleElement = _(), d()(Xt.Z, + Jt), Xt.Z && Xt.Z.locals && Xt.Z.locals; + class ei { + constructor(e, t, i, n) { + this._rgba8Brand = void 0, this.r = ei._clamp(e), this.g = ei._clamp(t), + this.b = ei._clamp(i), this.a = ei._clamp(n) + } + equals(e) { + return this.r === e.r && this.g === e.g && this.b === e.b && this.a === + e.a + } + static _clamp(e) { + return e < 0 ? 0 : e > 255 ? 255 : 0 | e + } + } + ei.Empty = new ei(0, 0, 0, 0); + var ti = i(4101); + class ii extends L.JT { + constructor() { + super(), this._onDidChange = new k.Q5, this.onDidChange = this._onDidChange + .event, this._updateColorMap(), this._register(ti.RW.onDidChange((e => { + e.changedColorMap && this._updateColorMap() + }))) + } + static getInstance() { + return this._INSTANCE || (this._INSTANCE = (0, L.dk)(new ii)), this._INSTANCE + } + _updateColorMap() { + const e = ti.RW.getColorMap(); + if (!e) return this._colors = [ei.Empty], void(this._backgroundIsLight = ! + 0); + this._colors = [ei.Empty]; + for (let t = 1; t < e.length; t++) { + const i = e[t].rgba; + this._colors[t] = new ei(i.r, i.g, i.b, Math.round(255 * i.a)) + } + let t = e[2].getRelativeLuminance(); + this._backgroundIsLight = t >= .5, this._onDidChange.fire(void 0) + } + getColor(e) { + return (e < 1 || e >= this._colors.length) && (e = 2), this._colors[e] + } + backgroundIsLight() { + return this._backgroundIsLight + } + } + ii._INSTANCE = null; + var ni = i(3824), + oi = i(3910); + const ri = (() => { + const e = []; + for (let t = 32; t <= 126; t++) e.push(t); + return e.push(65533), e + })(); + var si = i(5427); + class ai { + constructor(e, t) { + this.scale = t, this._minimapCharRendererBrand = void 0, this.charDataNormal = + ai.soften(e, .8), this.charDataLight = ai.soften(e, 50 / 60) + } + static soften(e, t) { + let i = new Uint8ClampedArray(e.length); + for (let n = 0, o = e.length; n < o; n++) i[n] = (0, si.K)(e[n] * t); + return i + } + renderChar(e, t, i, n, o, r, s, a, l) { + const d = 1 * this.scale, + c = 2 * this.scale, + h = l ? 1 : c; + if (t + d > e.width || i + h > e.height) return void console.warn( + "bad render request outside image data"); + const u = a ? this.charDataLight : this.charDataNormal, + g = ((e, t) => (e -= 32) < 0 || e > 96 ? t <= 2 ? (e + 96) % 96 : 95 : + e)(n, s), + p = 4 * e.width, + m = r.r, + f = r.g, + _ = r.b, + b = o.r - m, + v = o.g - f, + w = o.b - _, + C = e.data; + let y = g * d * c, + S = i * p + 4 * t; + for (let e = 0; e < h; e++) { + let e = S; + for (let t = 0; t < d; t++) { + const t = u[y++] / 255; + C[e++] = m + b * t, C[e++] = f + v * t, C[e++] = _ + w * t, e++ + } + S += p + } + } + blockRenderChar(e, t, i, n, o, r, s) { + const a = 1 * this.scale, + l = 2 * this.scale, + d = s ? 1 : l; + if (t + a > e.width || i + d > e.height) return void console.warn( + "bad render request outside image data"); + const c = 4 * e.width, + h = o.r, + u = o.g, + g = o.b, + p = h + .5 * (n.r - h), + m = u + .5 * (n.g - u), + f = g + .5 * (n.b - g), + _ = e.data; + let b = i * c + 4 * t; + for (let e = 0; e < d; e++) { + let e = b; + for (let t = 0; t < a; t++) _[e++] = p, _[e++] = m, _[e++] = f, e++; + b += c + } + } + } + var li = i(8289); + const di = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15 + }, + ci = e => { + const t = new Uint8ClampedArray(e.length / 2); + for (let i = 0; i < e.length; i += 2) t[i >> 1] = di[e[i]] << 4 | 15 & + di[e[i + 1]]; + return t + }, + hi = { + 1: (0, li.I)((() => ci( + "0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792" + ))), + 2: (0, li.I)((() => ci( + "000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126" + ))) + }; + class ui { + static create(e, t) { + if (this.lastCreated && e === this.lastCreated.scale && t === this.lastFontFamily) + return this.lastCreated; + let i; + return i = hi[e] ? new ai(hi[e](), e) : ui.createFromSampleData(ui.createSampleData( + t).data, e), this.lastFontFamily = t, this.lastCreated = i, i + } + static createSampleData(e) { + const t = document.createElement("canvas"), + i = t.getContext("2d"); + t.style.height = "16px", t.height = 16, t.width = 960, t.style.width = + "960px", i.fillStyle = "#ffffff", i.font = `bold 16px ${e}`, i.textBaseline = + "middle"; + let n = 0; + for (const e of ri) i.fillText(String.fromCharCode(e), n, 8), n += 10; + return i.getImageData(0, 0, 960, 16) + } + static createFromSampleData(e, t) { + if (61440 !== e.length) throw new Error( + "Unexpected source in MinimapCharRenderer"); + let i = ui._downsample(e, t); + return new ai(i, t) + } + static _downsampleChar(e, t, i, n, o) { + const r = 1 * o, + s = 2 * o; + let a = n, + l = 0; + for (let n = 0; n < s; n++) { + const o = n / s * 16, + d = (n + 1) / s * 16; + for (let n = 0; n < r; n++) { + const s = n / r * 10, + c = (n + 1) / r * 10; + let h = 0, + u = 0; + for (let i = o; i < d; i++) { + const n = t + 3840 * Math.floor(i), + o = 1 - (i - Math.floor(i)); + for (let t = s; t < c; t++) { + const i = 1 - (t - Math.floor(t)), + r = n + 4 * Math.floor(t), + s = i * o; + u += s, h += e[r] * e[r + 3] / 255 * s + } + } + const g = h / u; + l = Math.max(l, g), i[a++] = (0, si.K)(g) + } + } + return l + } + static _downsample(e, t) { + const i = 2 * t * 1 * t, + n = 96 * i, + o = new Uint8ClampedArray(n); + let r = 0, + s = 0, + a = 0; + for (let n = 0; n < 96; n++) a = Math.max(a, this._downsampleChar(e, s, + o, r, t)), r += i, s += 40; + if (a > 0) { + const e = 255 / a; + for (let t = 0; t < n; t++) o[t] *= e + } + return o + } + } + var gi = i(4973); + class pi { + constructor(e, t, i) { + const n = e.options, + o = n.get(128), + r = n.get(130), + s = r.minimap, + a = n.get(42), + l = n.get(64); + this.renderMinimap = s.renderMinimap, this.size = l.size, this.minimapHeightIsEditorHeight = + s.minimapHeightIsEditorHeight, this.scrollBeyondLastLine = n.get(94), + this.showSlider = l.showSlider, this.pixelRatio = o, this.typicalHalfwidthCharacterWidth = + a.typicalHalfwidthCharacterWidth, this.lineHeight = n.get(58), this.minimapLeft = + s.minimapLeft, this.minimapWidth = s.minimapWidth, this.minimapHeight = + r.height, this.canvasInnerWidth = s.minimapCanvasInnerWidth, this.canvasInnerHeight = + s.minimapCanvasInnerHeight, this.canvasOuterWidth = s.minimapCanvasOuterWidth, + this.canvasOuterHeight = s.minimapCanvasOuterHeight, this.isSampling = + s.minimapIsSampling, this.editorHeight = r.height, this.fontScale = s + .minimapScale, this.minimapLineHeight = s.minimapLineHeight, this.minimapCharWidth = + 1 * this.fontScale, this.charRenderer = (0, li.I)((() => ui.create( + this.fontScale, a.fontFamily))), this.backgroundColor = pi._getMinimapBackground( + t, i) + } + static _getMinimapBackground(e, t) { + const i = e.getColor(oi.kV); + return i ? new ei(i.rgba.r, i.rgba.g, i.rgba.b, i.rgba.a) : t.getColor( + 2) + } + equals(e) { + return this.renderMinimap === e.renderMinimap && this.size === e.size && + this.minimapHeightIsEditorHeight === e.minimapHeightIsEditorHeight && + this.scrollBeyondLastLine === e.scrollBeyondLastLine && this.showSlider === + e.showSlider && this.pixelRatio === e.pixelRatio && this.typicalHalfwidthCharacterWidth === + e.typicalHalfwidthCharacterWidth && this.lineHeight === e.lineHeight && + this.minimapLeft === e.minimapLeft && this.minimapWidth === e.minimapWidth && + this.minimapHeight === e.minimapHeight && this.canvasInnerWidth === e + .canvasInnerWidth && this.canvasInnerHeight === e.canvasInnerHeight && + this.canvasOuterWidth === e.canvasOuterWidth && this.canvasOuterHeight === + e.canvasOuterHeight && this.isSampling === e.isSampling && this.editorHeight === + e.editorHeight && this.fontScale === e.fontScale && this.minimapLineHeight === + e.minimapLineHeight && this.minimapCharWidth === e.minimapCharWidth && + this.backgroundColor && this.backgroundColor.equals(e.backgroundColor) + } + } + class mi { + constructor(e, t, i, n, o, r, s, a) { + this.scrollTop = e, this.scrollHeight = t, this.sliderNeeded = i, this + ._computedSliderRatio = n, this.sliderTop = o, this.sliderHeight = r, + this.startLineNumber = s, this.endLineNumber = a + } + getDesiredScrollTopFromDelta(e) { + return Math.round(this.scrollTop + e / this._computedSliderRatio) + } + getDesiredScrollTopFromTouchLocation(e) { + return Math.round((e - this.sliderHeight / 2) / this._computedSliderRatio) + } + static create(e, t, i, n, o, r, s, a, l, d, c) { + const h = e.pixelRatio, + u = e.minimapLineHeight, + g = Math.floor(e.canvasInnerHeight / u), + p = e.lineHeight; + if (e.minimapHeightIsEditorHeight) { + const t = a * e.lineHeight + (e.scrollBeyondLastLine ? o - e.lineHeight : + 0), + i = Math.max(1, Math.floor(o * o / t)), + n = Math.max(0, e.minimapHeight - i), + r = n / (d - o), + c = l * r, + h = n > 0, + u = Math.floor(e.canvasInnerHeight / e.minimapLineHeight); + return new mi(l, d, h, r, c, i, 1, Math.min(s, u)) + } + let m, f; + if (r && i !== s) { + const e = i - t + 1; + m = Math.floor(e * u / h) + } else { + const e = o / p; + m = Math.floor(e * u / h) + } + f = e.scrollBeyondLastLine ? (s - 1) * u / h : Math.max(0, s * u / h - + m), f = Math.min(e.minimapHeight - m, f); + const _ = f / (d - o), + b = l * _; + let v = 0; + if (e.scrollBeyondLastLine && (v = o / p - 1), g >= s + v) return new mi( + l, d, f > 0, _, b, m, 1, s); { + let e = Math.max(1, Math.floor(t - b * h / u)); + c && c.scrollHeight === d && (c.scrollTop > l && (e = Math.min(e, c.startLineNumber)), + c.scrollTop < l && (e = Math.max(e, c.startLineNumber))); + const i = Math.min(s, e + g - 1); + return new mi(l, d, !0, _, (t - e + (l - n) / p) * u / h, m, e, i) + } + } + } + class fi { + constructor(e) { + this.dy = e + } + onContentChanged() { + this.dy = -1 + } + onTokensChanged() { + this.dy = -1 + } + } + fi.INVALID = new fi(-1); + class _i { + constructor(e, t, i) { + this.renderedLayout = e, this._imageData = t, this._renderedLines = + new dt((() => fi.INVALID)), this._renderedLines._set(e.startLineNumber, + i) + } + linesEquals(e) { + if (!this.scrollEquals(e)) return !1; + const t = this._renderedLines._get().lines; + for (let e = 0, i = t.length; e < i; e++) + if (-1 === t[e].dy) return !1; + return !0 + } + scrollEquals(e) { + return this.renderedLayout.startLineNumber === e.startLineNumber && + this.renderedLayout.endLineNumber === e.endLineNumber + } + _get() { + const e = this._renderedLines._get(); + return { + imageData: this._imageData, + rendLineNumberStart: e.rendLineNumberStart, + lines: e.lines + } + } + onLinesChanged(e, t) { + return this._renderedLines.onLinesChanged(e, t) + } + onLinesDeleted(e, t) { + this._renderedLines.onLinesDeleted(e, t) + } + onLinesInserted(e, t) { + this._renderedLines.onLinesInserted(e, t) + } + onTokensChanged(e) { + return this._renderedLines.onTokensChanged(e) + } + } + class bi { + constructor(e, t, i, n) { + this._backgroundFillData = bi._createBackgroundFillData(t, i, n), this + ._buffers = [e.createImageData(t, i), e.createImageData(t, i)], this._lastUsedBuffer = + 0 + } + getBuffer() { + this._lastUsedBuffer = 1 - this._lastUsedBuffer; + const e = this._buffers[this._lastUsedBuffer]; + return e.data.set(this._backgroundFillData), e + } + static _createBackgroundFillData(e, t, i) { + const n = i.r, + o = i.g, + r = i.b, + s = new Uint8ClampedArray(e * t * 4); + let a = 0; + for (let i = 0; i < t; i++) + for (let t = 0; t < e; t++) s[a] = n, s[a + 1] = o, s[a + 2] = r, s[a + + 3] = 255, a += 4; + return s + } + } + class vi { + constructor(e, t) { + this.samplingRatio = e, this.minimapLines = t + } + static compute(e, t, i) { + if (0 === e.renderMinimap || !e.isSampling) return [null, []]; + const n = e.pixelRatio, + o = e.lineHeight, + r = e.scrollBeyondLastLine, + { + minimapLineCount: s + } = re.gk.computeContainedMinimapLineCount({ + viewLineCount: t, + scrollBeyondLastLine: r, + height: e.editorHeight, + lineHeight: o, + pixelRatio: n + }), + a = t / s, + l = a / 2; + if (!i || 0 === i.minimapLines.length) { + let e = []; + if (e[0] = 1, s > 1) { + for (let t = 0, i = s - 1; t < i; t++) e[t] = Math.round(t * a + l); + e[s - 1] = t + } + return [new vi(a, e), []] + } + const d = i.minimapLines, + c = d.length; + let h = [], + u = 0, + g = 0, + p = 1, + m = [], + f = null; + for (let e = 0; e < s; e++) { + const i = Math.max(p, Math.round(e * a)), + n = Math.max(i, Math.round((e + 1) * a)); + for (; u < c && d[u] < i;) { + if (m.length < 10) { + const e = u + 1 + g; + f && "deleted" === f.type && f._oldIndex === u - 1 ? f.deleteToLineNumber++ + : (f = { + type: "deleted", + _oldIndex: u, + deleteFromLineNumber: e, + deleteToLineNumber: e + }, m.push(f)), g-- + } + u++ + } + let o; + if (u < c && d[u] <= n) o = d[u], u++; + else if (o = 0 === e ? 1 : e + 1 === s ? t : Math.round(e * a + l), m + .length < 10) { + const t = u + 1 + g; + f && "inserted" === f.type && f._i === e - 1 ? f.insertToLineNumber++ + : (f = { + type: "inserted", + _i: e, + insertFromLineNumber: t, + insertToLineNumber: t + }, m.push(f)), g++ + } + h[e] = o, p = o + } + if (m.length < 10) + for (; u < c;) { + const e = u + 1 + g; + f && "deleted" === f.type && f._oldIndex === u - 1 ? f.deleteToLineNumber++ + : (f = { + type: "deleted", + _oldIndex: u, + deleteFromLineNumber: e, + deleteToLineNumber: e + }, m.push(f)), g--, u++ + } else m = [{ + type: "flush" + }]; + return [new vi(a, h), m] + } + modelLineToMinimapLine(e) { + return Math.min(this.minimapLines.length, Math.max(1, Math.round(e / + this.samplingRatio))) + } + modelLineRangeToMinimapLineRange(e, t) { + let i = this.modelLineToMinimapLine(e) - 1; + for (; i > 0 && this.minimapLines[i - 1] >= e;) i--; + let n = this.modelLineToMinimapLine(t) - 1; + for (; n + 1 < this.minimapLines.length && this.minimapLines[n + 1] <= + t;) n++; + if (i === n) { + const n = this.minimapLines[i]; + if (n < e || n > t) return null + } + return [i + 1, n + 1] + } + decorationLineRangeToMinimapLineRange(e, t) { + let i = this.modelLineToMinimapLine(e), + n = this.modelLineToMinimapLine(t); + return e !== t && n === i && (n === this.minimapLines.length ? i > 1 && + i-- : n++), [i, n] + } + onLinesDeleted(e) { + const t = e.toLineNumber - e.fromLineNumber + 1; + let i = this.minimapLines.length, + n = 0; + for (let o = this.minimapLines.length - 1; o >= 0 && !(this.minimapLines[ + o] < e.fromLineNumber); o--) this.minimapLines[o] <= e.toLineNumber ? + (this.minimapLines[o] = Math.max(1, e.fromLineNumber - 1), i = Math.min( + i, o), n = Math.max(n, o)) : this.minimapLines[o] -= t; + return [i, n] + } + onLinesInserted(e) { + const t = e.toLineNumber - e.fromLineNumber + 1; + for (let i = this.minimapLines.length - 1; i >= 0 && !(this.minimapLines[ + i] < e.fromLineNumber); i--) this.minimapLines[i] += t + } + } + class wi extends q { + constructor(e) { + super(e), this.tokensColorTracker = ii.getInstance(), this._selections = [], + this._minimapSelections = null, this.options = new pi(this._context.configuration, + this._context.theme, this.tokensColorTracker); + const [t] = vi.compute(this.options, this._context.model.getLineCount(), + null); + this._samplingState = t, this._shouldCheckSampling = !1, this._actual = + new Ci(e.theme, this) + } + dispose() { + this._actual.dispose(), super.dispose() + } + getDomNode() { + return this._actual.getDomNode() + } + _onOptionsMaybeChanged() { + const e = new pi(this._context.configuration, this._context.theme, + this.tokensColorTracker); + return !this.options.equals(e) && (this.options = e, this._recreateLineSampling(), + this._actual.onDidChangeOptions(), !0) + } + onConfigurationChanged(e) { + return this._onOptionsMaybeChanged() + } + onCursorStateChanged(e) { + return this._selections = e.selections, this._minimapSelections = null, + this._actual.onSelectionChanged() + } + onDecorationsChanged(e) { + return !!e.affectsMinimap && this._actual.onDecorationsChanged() + } + onFlushed(e) { + return this._samplingState && (this._shouldCheckSampling = !0), this._actual + .onFlushed() + } + onLinesChanged(e) { + if (this._samplingState) { + const t = this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber, + e.toLineNumber); + return !!t && this._actual.onLinesChanged(t[0], t[1]) + } + return this._actual.onLinesChanged(e.fromLineNumber, e.toLineNumber) + } + onLinesDeleted(e) { + if (this._samplingState) { + const [t, i] = this._samplingState.onLinesDeleted(e); + return t <= i && this._actual.onLinesChanged(t + 1, i + 1), this._shouldCheckSampling = ! + 0, !0 + } + return this._actual.onLinesDeleted(e.fromLineNumber, e.toLineNumber) + } + onLinesInserted(e) { + return this._samplingState ? (this._samplingState.onLinesInserted(e), + this._shouldCheckSampling = !0, !0) : this._actual.onLinesInserted(e + .fromLineNumber, e.toLineNumber) + } + onScrollChanged(e) { + return this._actual.onScrollChanged() + } + onThemeChanged(e) { + return this._context.model.invalidateMinimapColorCache(), this._actual + .onThemeChanged(), this._onOptionsMaybeChanged(), !0 + } + onTokensChanged(e) { + if (this._samplingState) { + let t = []; + for (const i of e.ranges) { + const e = this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber, + i.toLineNumber); + e && t.push({ + fromLineNumber: e[0], + toLineNumber: e[1] + }) + } + return !!t.length && this._actual.onTokensChanged(t) + } + return this._actual.onTokensChanged(e.ranges) + } + onTokensColorsChanged(e) { + return this._onOptionsMaybeChanged(), this._actual.onTokensColorsChanged() + } + onZonesChanged(e) { + return this._actual.onZonesChanged() + } + prepareRender(e) { + this._shouldCheckSampling && (this._shouldCheckSampling = !1, this._recreateLineSampling()) + } + render(e) { + let t = e.visibleRange.startLineNumber, + i = e.visibleRange.endLineNumber; + this._samplingState && (t = this._samplingState.modelLineToMinimapLine( + t), i = this._samplingState.modelLineToMinimapLine(i)); + const n = { + viewportContainsWhitespaceGaps: e.viewportData.whitespaceViewportData + .length > 0, + scrollWidth: e.scrollWidth, + scrollHeight: e.scrollHeight, + viewportStartLineNumber: t, + viewportEndLineNumber: i, + viewportStartLineNumberVerticalOffset: e.getVerticalOffsetForLineNumber( + t), + scrollTop: e.scrollTop, + scrollLeft: e.scrollLeft, + viewportWidth: e.viewportWidth, + viewportHeight: e.viewportHeight + }; + this._actual.render(n) + } + _recreateLineSampling() { + this._minimapSelections = null; + const e = Boolean(this._samplingState), + [t, i] = vi.compute(this.options, this._context.model.getLineCount(), + this._samplingState); + if (this._samplingState = t, e && this._samplingState) + for (const e of i) switch (e.type) { + case "deleted": + this._actual.onLinesDeleted(e.deleteFromLineNumber, e.deleteToLineNumber); + break; + case "inserted": + this._actual.onLinesInserted(e.insertFromLineNumber, e.insertToLineNumber); + break; + case "flush": + this._actual.onFlushed() + } + } + getLineCount() { + return this._samplingState ? this._samplingState.minimapLines.length : + this._context.model.getLineCount() + } + getRealLineCount() { + return this._context.model.getLineCount() + } + getLineContent(e) { + return this._samplingState ? this._context.model.getLineContent(this._samplingState + .minimapLines[e - 1]) : this._context.model.getLineContent(e) + } + getMinimapLinesRenderingData(e, t, i) { + if (this._samplingState) { + let n = []; + for (let o = 0, r = t - e + 1; o < r; o++) i[o] ? n[o] = this._context + .model.getViewLineData(this._samplingState.minimapLines[e + o - 1]) : + n[o] = null; + return n + } + return this._context.model.getMinimapLinesRenderingData(e, t, i).data + } + getSelections() { + if (null === this._minimapSelections) + if (this._samplingState) { + this._minimapSelections = []; + for (const e of this._selections) { + const [t, i] = this._samplingState.decorationLineRangeToMinimapLineRange( + e.startLineNumber, e.endLineNumber); + this._minimapSelections.push(new T.Y(t, e.startColumn, i, e.endColumn)) + } + } else this._minimapSelections = this._selections; + return this._minimapSelections + } + getMinimapDecorationsInViewport(e, t) { + let i; + if (this._samplingState) { + const n = this._samplingState.minimapLines[e - 1], + o = this._samplingState.minimapLines[t - 1]; + i = new _e.e(n, 1, o, this._context.model.getLineMaxColumn(o)) + } else i = new _e.e(e, 1, t, this._context.model.getLineMaxColumn(t)); + const n = this._context.model.getDecorationsInViewport(i); + if (this._samplingState) { + let e = []; + for (const t of n) { + if (!t.options.minimap) continue; + const i = t.range, + n = this._samplingState.modelLineToMinimapLine(i.startLineNumber), + o = this._samplingState.modelLineToMinimapLine(i.endLineNumber); + e.push(new ni.$l(new _e.e(n, i.startColumn, o, i.endColumn), t.options)) + } + return e + } + return n + } + getOptions() { + return this._context.model.getTextModelOptions() + } + revealLineNumber(e) { + this._samplingState && (e = this._samplingState.minimapLines[e - 1]), + this._context.model.revealRange("mouse", !1, new _e.e(e, 1, e, 1), 1, + 0) + } + setScrollTop(e) { + this._context.model.setScrollPosition({ + scrollTop: e + }, 1) + } + } + class Ci extends L.JT { + constructor(e, t) { + super(), this._renderDecorations = !1, this._gestureInProgress = !1, + this._theme = e, this._model = t, this._lastRenderData = null, this._buffers = + null, this._selectionColor = this._theme.getColor(oi.ov), this._domNode = + (0, M.X)(document.createElement("div")), Z.write(this._domNode, 8), + this._domNode.setClassName(this._getMinimapDomNodeClassName()), this + ._domNode.setPosition("absolute"), this._domNode.setAttribute("role", + "presentation"), this._domNode.setAttribute("aria-hidden", "true"), + this._shadow = (0, M.X)(document.createElement("div")), this._shadow + .setClassName("minimap-shadow-hidden"), this._domNode.appendChild( + this._shadow), this._canvas = (0, M.X)(document.createElement( + "canvas")), this._canvas.setPosition("absolute"), this._canvas.setLeft( + 0), this._domNode.appendChild(this._canvas), this._decorationsCanvas = + (0, M.X)(document.createElement("canvas")), this._decorationsCanvas.setPosition( + "absolute"), this._decorationsCanvas.setClassName( + "minimap-decorations-layer"), this._decorationsCanvas.setLeft(0), + this._domNode.appendChild(this._decorationsCanvas), this._slider = ( + 0, M.X)(document.createElement("div")), this._slider.setPosition( + "absolute"), this._slider.setClassName("minimap-slider"), this._slider + .setLayerHinting(!0), this._slider.setContain("strict"), this._domNode + .appendChild(this._slider), this._sliderHorizontal = (0, M.X)( + document.createElement("div")), this._sliderHorizontal.setPosition( + "absolute"), this._sliderHorizontal.setClassName( + "minimap-slider-horizontal"), this._slider.appendChild(this._sliderHorizontal), + this._applyLayout(), this._mouseDownListener = S.mu(this._domNode.domNode, + "mousedown", (e => { + if (e.preventDefault(), 0 === this._model.options.renderMinimap) + return; + if (!this._lastRenderData) return; + if ("proportional" !== this._model.options.size) { + if (e.leftButton && this._lastRenderData) { + const t = S.i(this._slider.domNode), + i = t.top + t.height / 2; + this._startSliderDragging(e.buttons, e.posx, i, e.posy, this._lastRenderData + .renderedLayout) + } + return + } + const t = this._model.options.minimapLineHeight, + i = this._model.options.canvasInnerHeight / this._model.options.canvasOuterHeight * + e.browserEvent.offsetY; + let n = Math.floor(i / t) + this._lastRenderData.renderedLayout.startLineNumber; + n = Math.min(n, this._model.getLineCount()), this._model.revealLineNumber( + n) + })), this._sliderMouseMoveMonitor = new F.Z, this._sliderMouseDownListener = + S.mu(this._slider.domNode, "mousedown", (e => { + e.preventDefault(), e.stopPropagation(), e.leftButton && this._lastRenderData && + this._startSliderDragging(e.buttons, e.posx, e.posy, e.posy, + this._lastRenderData.renderedLayout) + })), this._gestureDisposable = R.o.addTarget(this._domNode.domNode), + this._sliderTouchStartListener = S.nm(this._domNode.domNode, R.t.Start, ( + e => { + e.preventDefault(), e.stopPropagation(), this._lastRenderData && + (this._slider.toggleClassName("active", !0), this._gestureInProgress = ! + 0, this.scrollDueToTouchEvent(e)) + }), { + passive: !1 + }), this._sliderTouchMoveListener = S.nm(this._domNode.domNode, R.t.Change, ( + e => { + e.preventDefault(), e.stopPropagation(), this._lastRenderData && + this._gestureInProgress && this.scrollDueToTouchEvent(e) + }), { + passive: !1 + }), this._sliderTouchEndListener = S.mu(this._domNode.domNode, R.t.End, ( + e => { + e.preventDefault(), e.stopPropagation(), this._gestureInProgress = ! + 1, this._slider.toggleClassName("active", !1) + })) + } + _startSliderDragging(e, t, i, n, o) { + this._slider.toggleClassName("active", !0); + const r = (e, n) => { + const r = Math.abs(n - t); + if (A.ED && r > 140) return void this._model.setScrollTop(o.scrollTop); + const s = e - i; + this._model.setScrollTop(o.getDesiredScrollTopFromDelta(s)) + }; + n !== i && r(n, t), this._sliderMouseMoveMonitor.startMonitoring(this + ._slider.domNode, e, F.e, (e => r(e.posy, e.posx)), (() => { + this._slider.toggleClassName("active", !1) + })) + } + scrollDueToTouchEvent(e) { + const t = this._domNode.domNode.getBoundingClientRect().top, + i = this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation( + e.pageY - t); + this._model.setScrollTop(i) + } + dispose() { + this._mouseDownListener.dispose(), this._sliderMouseMoveMonitor.dispose(), + this._sliderMouseDownListener.dispose(), this._gestureDisposable.dispose(), + this._sliderTouchStartListener.dispose(), this._sliderTouchMoveListener + .dispose(), this._sliderTouchEndListener.dispose(), super.dispose() + } + _getMinimapDomNodeClassName() { + return "always" === this._model.options.showSlider ? + "minimap slider-always" : "minimap slider-mouseover" + } + getDomNode() { + return this._domNode + } + _applyLayout() { + this._domNode.setLeft(this._model.options.minimapLeft), this._domNode + .setWidth(this._model.options.minimapWidth), this._domNode.setHeight( + this._model.options.minimapHeight), this._shadow.setHeight(this._model + .options.minimapHeight), this._canvas.setWidth(this._model.options.canvasOuterWidth), + this._canvas.setHeight(this._model.options.canvasOuterHeight), this._canvas + .domNode.width = this._model.options.canvasInnerWidth, this._canvas.domNode + .height = this._model.options.canvasInnerHeight, this._decorationsCanvas + .setWidth(this._model.options.canvasOuterWidth), this._decorationsCanvas + .setHeight(this._model.options.canvasOuterHeight), this._decorationsCanvas + .domNode.width = this._model.options.canvasInnerWidth, this._decorationsCanvas + .domNode.height = this._model.options.canvasInnerHeight, this._slider + .setWidth(this._model.options.minimapWidth) + } + _getBuffer() { + return this._buffers || this._model.options.canvasInnerWidth > 0 && + this._model.options.canvasInnerHeight > 0 && (this._buffers = new bi( + this._canvas.domNode.getContext("2d"), this._model.options.canvasInnerWidth, + this._model.options.canvasInnerHeight, this._model.options.backgroundColor + )), this._buffers ? this._buffers.getBuffer() : null + } + onDidChangeOptions() { + this._lastRenderData = null, this._buffers = null, this._applyLayout(), + this._domNode.setClassName(this._getMinimapDomNodeClassName()) + } + onSelectionChanged() { + return this._renderDecorations = !0, !0 + } + onDecorationsChanged() { + return this._renderDecorations = !0, !0 + } + onFlushed() { + return this._lastRenderData = null, !0 + } + onLinesChanged(e, t) { + return !!this._lastRenderData && this._lastRenderData.onLinesChanged( + e, t) + } + onLinesDeleted(e, t) { + return this._lastRenderData && this._lastRenderData.onLinesDeleted(e, + t), !0 + } + onLinesInserted(e, t) { + return this._lastRenderData && this._lastRenderData.onLinesInserted(e, + t), !0 + } + onScrollChanged() { + return this._renderDecorations = !0, !0 + } + onThemeChanged() { + return this._selectionColor = this._theme.getColor(oi.ov), this._renderDecorations = ! + 0, !0 + } + onTokensChanged(e) { + return !!this._lastRenderData && this._lastRenderData.onTokensChanged( + e) + } + onTokensColorsChanged() { + return this._lastRenderData = null, this._buffers = null, !0 + } + onZonesChanged() { + return this._lastRenderData = null, !0 + } + render(e) { + if (0 === this._model.options.renderMinimap) return this._shadow.setClassName( + "minimap-shadow-hidden"), this._sliderHorizontal.setWidth(0), void this + ._sliderHorizontal.setHeight(0); + e.scrollLeft + e.viewportWidth >= e.scrollWidth ? this._shadow.setClassName( + "minimap-shadow-hidden") : this._shadow.setClassName( + "minimap-shadow-visible"); + const t = mi.create(this._model.options, e.viewportStartLineNumber, e + .viewportEndLineNumber, e.viewportStartLineNumberVerticalOffset, e.viewportHeight, + e.viewportContainsWhitespaceGaps, this._model.getLineCount(), this._model + .getRealLineCount(), e.scrollTop, e.scrollHeight, this._lastRenderData ? + this._lastRenderData.renderedLayout : null); + this._slider.setDisplay(t.sliderNeeded ? "block" : "none"), this._slider + .setTop(t.sliderTop), this._slider.setHeight(t.sliderHeight); + const i = e.scrollLeft / this._model.options.typicalHalfwidthCharacterWidth, + n = Math.min(this._model.options.minimapWidth, Math.round(i * this._model + .options.minimapCharWidth / this._model.options.pixelRatio)); + this._sliderHorizontal.setLeft(n), this._sliderHorizontal.setWidth( + this._model.options.minimapWidth - n), this._sliderHorizontal.setTop( + 0), this._sliderHorizontal.setHeight(t.sliderHeight), this.renderDecorations( + t), this._lastRenderData = this.renderLines(t) + } + renderDecorations(e) { + if (this._renderDecorations) { + this._renderDecorations = !1; + const t = this._model.getSelections(), + i = this._model.getMinimapDecorationsInViewport(e.startLineNumber, + e.endLineNumber), + { + canvasInnerWidth: n, + canvasInnerHeight: o + } = this._model.options, + r = this._model.options.minimapLineHeight, + s = this._model.options.minimapCharWidth, + a = this._model.getOptions().tabSize, + l = this._decorationsCanvas.domNode.getContext("2d"); + l.clearRect(0, 0, n, o); + const d = new Map; + for (let i = 0; i < t.length; i++) { + const n = t[i]; + for (let t = n.startLineNumber; t <= n.endLineNumber; t++) this.renderDecorationOnLine( + l, d, n, this._selectionColor, e, t, r, r, a, s) + } + for (let t = 0; t < i.length; t++) { + const n = i[t]; + if (!n.options.minimap) continue; + const o = n.options.minimap.getColor(this._theme); + for (let t = n.range.startLineNumber; t <= n.range.endLineNumber; t++) + switch (n.options.minimap.position) { + case gi.F5.Inline: + this.renderDecorationOnLine(l, d, n.range, o, e, t, r, r, a, s); + continue; + case gi.F5.Gutter: + const i = (t - e.startLineNumber) * r, + c = 2; + this.renderDecoration(l, o, c, i, 2, r); + continue + } + } + } + } + renderDecorationOnLine(e, t, i, n, o, r, s, a, l, d) { + const c = (r - o.startLineNumber) * a; + if (c + s < 0 || c > this._model.options.canvasInnerHeight) return; + let h = t.get(r); + const u = !h; + if (!h) { + const e = this._model.getLineContent(r); + h = [re.y0]; + for (let t = 1; t < e.length + 1; t++) { + const i = e.charCodeAt(t - 1), + n = 9 === i ? l * d : Ue.K7(i) ? 2 * d : d; + h[t] = h[t - 1] + n + } + t.set(r, h) + } + const { + startColumn: g, + endColumn: p, + startLineNumber: m, + endLineNumber: f + } = i, _ = m === r ? h[g - 1] : re.y0, b = f > r ? h.length - 1 : p - + 1; + if (b > 0) { + const t = h[b] - _ || 2; + this.renderDecoration(e, n, _, c, t, s) + } + u && this.renderLineHighlight(e, n, c, s) + } + renderLineHighlight(e, t, i, n) { + e.fillStyle = t && t.transparent(.5).toString() || "", e.fillRect(re.y0, + i, e.canvas.width, n) + } + renderDecoration(e, t, i, n, o, r) { + e.fillStyle = t && t.toString() || "", e.fillRect(i, n, o, r) + } + renderLines(e) { + const t = e.startLineNumber, + i = e.endLineNumber, + n = this._model.options.minimapLineHeight; + if (this._lastRenderData && this._lastRenderData.linesEquals(e)) { + const t = this._lastRenderData._get(); + return new _i(e, t.imageData, t.lines) + } + const o = this._getBuffer(); + if (!o) return null; + let [r, s, a] = Ci._renderUntouchedLines(o, t, i, n, this._lastRenderData); + const l = this._model.getMinimapLinesRenderingData(t, i, a), + d = this._model.getOptions().tabSize, + c = this._model.options.backgroundColor, + h = this._model.tokensColorTracker, + u = h.backgroundIsLight(), + g = this._model.options.renderMinimap, + p = this._model.options.charRenderer(), + m = this._model.options.fontScale, + f = this._model.options.minimapCharWidth, + _ = (1 === g ? 2 : 3) * m, + b = n > _ ? Math.floor((n - _) / 2) : 0; + let v = 0; + const w = []; + for (let e = 0, r = i - t + 1; e < r; e++) a[e] && Ci._renderLine(o, + c, u, g, f, h, p, v, b, d, l[e], m, n), w[e] = new fi(v), v += n; + const C = -1 === r ? 0 : r, + y = (-1 === s ? o.height : s) - C; + return this._canvas.domNode.getContext("2d").putImageData(o, 0, 0, 0, + C, o.width, y), new _i(e, o, w) + } + static _renderUntouchedLines(e, t, i, n, o) { + const r = []; + if (!o) { + for (let e = 0, n = i - t + 1; e < n; e++) r[e] = !0; + return [-1, -1, r] + } + const s = o._get(), + a = s.imageData.data, + l = s.rendLineNumberStart, + d = s.lines, + c = d.length, + h = e.width, + u = e.data, + g = (i - t + 1) * n * h * 4; + let p = -1, + m = -1, + f = -1, + _ = -1, + b = -1, + v = -1, + w = 0; + for (let e = t; e <= i; e++) { + const i = e - t, + o = e - l, + s = o >= 0 && o < c ? d[o].dy : -1; + if (-1 === s) { + r[i] = !0, w += n; + continue + } + const C = s * h * 4, + y = (s + n) * h * 4, + S = w * h * 4, + x = (w + n) * h * 4; + _ === C && v === S ? (_ = y, v = x) : (-1 !== f && (u.set(a.subarray( + f, _), b), -1 === p && 0 === f && f === b && (p = _), -1 === m && + _ === g && f === b && (m = f)), f = C, _ = y, b = S, v = x), r[i] = ! + 1, w += n + } + return -1 !== f && (u.set(a.subarray(f, _), b), -1 === p && 0 === f && + f === b && (p = _), -1 === m && _ === g && f === b && (m = f)), [-1 === + p ? -1 : p / (4 * h), -1 === m ? -1 : m / (4 * h), r + ] + } + static _renderLine(e, t, i, n, o, r, s, a, l, d, c, h, u) { + const g = c.content, + p = c.tokens, + m = e.width - o, + f = 1 === u; + let _ = re.y0, + b = 0, + v = 0; + for (let c = 0, u = p.getCount(); c < u; c++) { + const u = p.getEndOffset(c), + w = p.getForeground(c), + C = r.getColor(w); + for (; b < u; b++) { + if (_ > m) return; + const r = g.charCodeAt(b); + if (9 === r) { + const e = d - (b + v) % d; + v += e - 1, _ += e * o + } else if (32 === r) _ += o; + else { + const d = Ue.K7(r) ? 2 : 1; + for (let c = 0; c < d; c++) + if (2 === n ? s.blockRenderChar(e, _, a + l, C, t, i, f) : s.renderChar( + e, _, a + l, r, C, t, h, i, f), _ += o, _ > m) return + } + } + } + } + }(0, Ge.Ic)(((e, t) => { + const i = e.getColor(oi.kV); + i && t.addRule( + `.monaco-editor .minimap > canvas { opacity: ${i.rgba.a}; will-change: opacity; }` + ); + const n = e.getColor(oi.CA); + n && t.addRule( + `.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${n}; }` + ); + const o = e.getColor(oi.Xy); + o && t.addRule( + `.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${o}; }` + ); + const r = e.getColor(oi.br); + r && t.addRule( + `.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${r}; }` + ); + const s = e.getColor(oi._w); + s && t.addRule( + `.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }` + ) + })); + var yi = i(9822), + Si = {}; + Si.styleTagTransform = v(), Si.setAttributes = m(), Si.insert = g().bind( + null, "head"), Si.domAPI = h(), Si.insertStyleElement = _(), d()(yi.Z, + Si), yi.Z && yi.Z.locals && yi.Z.locals; + class xi extends q { + constructor(e) { + super(e); + const t = this._context.configuration.options.get(130); + this._widgets = {}, this._verticalScrollbarWidth = t.verticalScrollbarWidth, + this._minimapWidth = t.minimap.minimapWidth, this._horizontalScrollbarHeight = + t.horizontalScrollbarHeight, this._editorHeight = t.height, this._editorWidth = + t.width, this._domNode = (0, M.X)(document.createElement("div")), Z.write( + this._domNode, 4), this._domNode.setClassName("overlayWidgets") + } + dispose() { + super.dispose(), this._widgets = {} + } + getDomNode() { + return this._domNode + } + onConfigurationChanged(e) { + const t = this._context.configuration.options.get(130); + return this._verticalScrollbarWidth = t.verticalScrollbarWidth, this._minimapWidth = + t.minimap.minimapWidth, this._horizontalScrollbarHeight = t.horizontalScrollbarHeight, + this._editorHeight = t.height, this._editorWidth = t.width, !0 + } + addWidget(e) { + const t = (0, M.X)(e.getDomNode()); + this._widgets[e.getId()] = { + widget: e, + preference: null, + domNode: t + }, t.setPosition("absolute"), t.setAttribute("widgetId", e.getId()), + this._domNode.appendChild(t), this.setShouldRender() + } + setWidgetPosition(e, t) { + const i = this._widgets[e.getId()]; + return i.preference !== t && (i.preference = t, this.setShouldRender(), ! + 0) + } + removeWidget(e) { + const t = e.getId(); + if (this._widgets.hasOwnProperty(t)) { + const e = this._widgets[t].domNode.domNode; + delete this._widgets[t], e.parentNode.removeChild(e), this.setShouldRender() + } + } + _renderWidget(e) { + const t = e.domNode; + if (null !== e.preference) + if (0 === e.preference) t.setTop(0), t.setRight(2 * this._verticalScrollbarWidth + + this._minimapWidth); + else if (1 === e.preference) { + const e = t.domNode.clientHeight; + t.setTop(this._editorHeight - e - 2 * this._horizontalScrollbarHeight), + t.setRight(2 * this._verticalScrollbarWidth + this._minimapWidth) + } else 2 === e.preference && (t.setTop(0), t.domNode.style.right = + "50%"); + else t.unsetTop() + } + prepareRender(e) {} + render(e) { + this._domNode.setWidth(this._editorWidth); + const t = Object.keys(this._widgets); + for (let e = 0, i = t.length; e < i; e++) { + const i = t[e]; + this._renderWidget(this._widgets[i]) + } + } + } + var ki = i(1264); + class Li { + constructor(e, t) { + const i = e.options; + this.lineHeight = i.get(58), this.pixelRatio = i.get(128), this.overviewRulerLanes = + i.get(73), this.renderBorder = i.get(72); + const n = t.getColor(Ze.zw); + this.borderColor = n ? n.toString() : null, this.hideCursor = i.get(50); + const o = t.getColor(Ze.n0); + this.cursorColor = o ? o.transparent(.7).toString() : null, this.themeType = + t.type; + const r = i.get(64), + s = r.enabled, + a = r.side, + l = s ? t.getColor(Ze.e_) || ti.RW.getDefaultBackground() : null; + this.backgroundColor = null === l || "left" === a ? null : ki.Il.Format + .CSS.formatHex(l); + const d = i.get(130).overviewRuler; + this.top = d.top, this.right = d.right, this.domWidth = d.width, this.domHeight = + d.height, 0 === this.overviewRulerLanes ? (this.canvasWidth = 0, this + .canvasHeight = 0) : (this.canvasWidth = this.domWidth * this.pixelRatio | + 0, this.canvasHeight = this.domHeight * this.pixelRatio | 0); + const [c, h] = this._initLanes(1, this.canvasWidth, this.overviewRulerLanes); + this.x = c, this.w = h + } + _initLanes(e, t, i) { + const n = t - e; + if (i >= 3) { + const t = Math.floor(n / 3), + i = Math.floor(n / 3), + o = n - t - i, + r = e + t; + return [ + [0, e, r, e, e + t + o, e, r, e], + [0, t, o, t + o, i, t + o + i, o + i, t + o + i] + ] + } + if (2 === i) { + const t = Math.floor(n / 2), + i = n - t; + return [ + [0, e, e, e, e + t, e, e, e], + [0, t, t, t, i, t + i, t + i, t + i] + ] + } + return [ + [0, e, e, e, e, e, e, e], + [0, n, n, n, n, n, n, n] + ] + } + equals(e) { + return this.lineHeight === e.lineHeight && this.pixelRatio === e.pixelRatio && + this.overviewRulerLanes === e.overviewRulerLanes && this.renderBorder === + e.renderBorder && this.borderColor === e.borderColor && this.hideCursor === + e.hideCursor && this.cursorColor === e.cursorColor && this.themeType === + e.themeType && this.backgroundColor === e.backgroundColor && this.top === + e.top && this.right === e.right && this.domWidth === e.domWidth && + this.domHeight === e.domHeight && this.canvasWidth === e.canvasWidth && + this.canvasHeight === e.canvasHeight + } + } + class Ni extends q { + constructor(e) { + super(e), this._domNode = (0, M.X)(document.createElement("canvas")), + this._domNode.setClassName("decorationsOverviewRuler"), this._domNode + .setPosition("absolute"), this._domNode.setLayerHinting(!0), this._domNode + .setContain("strict"), this._domNode.setAttribute("aria-hidden", + "true"), this._updateSettings(!1), this._tokensColorTrackerListener = + ti.RW.onDidChange((e => { + e.changedColorMap && this._updateSettings(!0) + })), this._cursorPositions = [] + } + dispose() { + super.dispose(), this._tokensColorTrackerListener.dispose() + } + _updateSettings(e) { + const t = new Li(this._context.configuration, this._context.theme); + return !(this._settings && this._settings.equals(t) || (this._settings = + t, this._domNode.setTop(this._settings.top), this._domNode.setRight( + this._settings.right), this._domNode.setWidth(this._settings.domWidth), + this._domNode.setHeight(this._settings.domHeight), this._domNode.domNode + .width = this._settings.canvasWidth, this._domNode.domNode.height = + this._settings.canvasHeight, e && this._render(), 0)) + } + onConfigurationChanged(e) { + return this._updateSettings(!1) + } + onCursorStateChanged(e) { + this._cursorPositions = []; + for (let t = 0, i = e.selections.length; t < i; t++) this._cursorPositions[ + t] = e.selections[t].getPosition(); + return this._cursorPositions.sort(fe.L.compare), !0 + } + onDecorationsChanged(e) { + return !!e.affectsOverviewRuler + } + onFlushed(e) { + return !0 + } + onScrollChanged(e) { + return e.scrollHeightChanged + } + onZonesChanged(e) { + return !0 + } + onThemeChanged(e) { + return this._context.model.invalidateOverviewRulerColorCache(), this._updateSettings(! + 1) + } + getDomNode() { + return this._domNode.domNode + } + prepareRender(e) {} + render(e) { + this._render() + } + _render() { + if (0 === this._settings.overviewRulerLanes) return void this._domNode + .setBackgroundColor(this._settings.backgroundColor ? this._settings.backgroundColor : + ""); + const e = this._settings.canvasWidth, + t = this._settings.canvasHeight, + i = this._settings.lineHeight, + n = this._context.viewLayout, + o = t / this._context.viewLayout.getScrollHeight(), + r = this._context.model.getAllOverviewRulerDecorations(this._context.theme), + s = 6 * this._settings.pixelRatio | 0, + a = s / 2 | 0, + l = this._domNode.domNode.getContext("2d"); + null === this._settings.backgroundColor ? l.clearRect(0, 0, e, t) : (l + .fillStyle = this._settings.backgroundColor, l.fillRect(0, 0, e, t)); + const d = this._settings.x, + c = this._settings.w, + h = Object.keys(r); + h.sort(); + for (let e = 0, u = h.length; e < u; e++) { + const u = h[e], + g = r[u]; + l.fillStyle = u; + let p = 0, + m = 0, + f = 0; + for (let e = 0, r = g.length; e < r; e++) { + const r = g[3 * e], + h = g[3 * e + 1], + u = g[3 * e + 2]; + let _ = n.getVerticalOffsetForLineNumber(h) * o | 0, + b = (n.getVerticalOffsetForLineNumber(u) + i) * o | 0; + if (b - _ < s) { + let e = (_ + b) / 2 | 0; + e < a ? e = a : e + a > t && (e = t - a), _ = e - a, b = e + a + } + _ > f + 1 || r !== p ? (0 !== e && l.fillRect(d[p], m, c[p], f - m), + p = r, m = _, f = b) : b > f && (f = b) + } + l.fillRect(d[p], m, c[p], f - m) + } + if (!this._settings.hideCursor && this._settings.cursorColor) { + const e = 2 * this._settings.pixelRatio | 0, + i = e / 2 | 0, + r = this._settings.x[7], + s = this._settings.w[7]; + l.fillStyle = this._settings.cursorColor; + let a = -100, + d = -100; + for (let c = 0, h = this._cursorPositions.length; c < h; c++) { + const h = this._cursorPositions[c]; + let u = n.getVerticalOffsetForLineNumber(h.lineNumber) * o | 0; + u < i ? u = i : u + i > t && (u = t - i); + const g = u - i, + p = g + e; + g > d + 1 ? (0 !== c && l.fillRect(r, a, s, d - a), a = g, d = p) : + p > d && (d = p) + } + l.fillRect(r, a, s, d - a) + } + this._settings.renderBorder && this._settings.borderColor && this._settings + .overviewRulerLanes > 0 && (l.beginPath(), l.lineWidth = 1, l.strokeStyle = + this._settings.borderColor, l.moveTo(0, 0), l.lineTo(0, t), l.stroke(), + l.moveTo(0, 0), l.lineTo(e, 0), l.stroke()) + } + } + var Di = i(2003); + class Ei extends $ { + constructor(e, t) { + super(), this._context = e; + const i = this._context.configuration.options; + this._domNode = (0, M.X)(document.createElement("canvas")), this._domNode + .setClassName(t), this._domNode.setPosition("absolute"), this._domNode + .setLayerHinting(!0), this._domNode.setContain("strict"), this._zoneManager = + new Di.Tj((e => this._context.viewLayout.getVerticalOffsetForLineNumber( + e))), this._zoneManager.setDOMWidth(0), this._zoneManager.setDOMHeight( + 0), this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()), + this._zoneManager.setLineHeight(i.get(58)), this._zoneManager.setPixelRatio( + i.get(128)), this._context.addEventHandler(this) + } + dispose() { + this._context.removeEventHandler(this), super.dispose() + } + onConfigurationChanged(e) { + const t = this._context.configuration.options; + return e.hasChanged(58) && (this._zoneManager.setLineHeight(t.get(58)), + this._render()), e.hasChanged(128) && (this._zoneManager.setPixelRatio( + t.get(128)), this._domNode.setWidth(this._zoneManager.getDOMWidth()), + this._domNode.setHeight(this._zoneManager.getDOMHeight()), this._domNode + .domNode.width = this._zoneManager.getCanvasWidth(), this._domNode.domNode + .height = this._zoneManager.getCanvasHeight(), this._render()), !0 + } + onFlushed(e) { + return this._render(), !0 + } + onScrollChanged(e) { + return e.scrollHeightChanged && (this._zoneManager.setOuterHeight(e.scrollHeight), + this._render()), !0 + } + onZonesChanged(e) { + return this._render(), !0 + } + getDomNode() { + return this._domNode.domNode + } + setLayout(e) { + this._domNode.setTop(e.top), this._domNode.setRight(e.right); + let t = !1; + t = this._zoneManager.setDOMWidth(e.width) || t, t = this._zoneManager + .setDOMHeight(e.height) || t, t && (this._domNode.setWidth(this._zoneManager + .getDOMWidth()), this._domNode.setHeight(this._zoneManager.getDOMHeight()), + this._domNode.domNode.width = this._zoneManager.getCanvasWidth(), + this._domNode.domNode.height = this._zoneManager.getCanvasHeight(), + this._render()) + } + setZones(e) { + this._zoneManager.setZones(e), this._render() + } + _render() { + if (0 === this._zoneManager.getOuterHeight()) return !1; + const e = this._zoneManager.getCanvasWidth(), + t = this._zoneManager.getCanvasHeight(), + i = this._zoneManager.resolveColorZones(), + n = this._zoneManager.getId2Color(), + o = this._domNode.domNode.getContext("2d"); + return o.clearRect(0, 0, e, t), i.length > 0 && this._renderOneLane(o, + i, n, e), !0 + } + _renderOneLane(e, t, i, n) { + let o = 0, + r = 0, + s = 0; + for (const a of t) { + const t = a.colorId, + l = a.from, + d = a.to; + t !== o ? (e.fillRect(0, r, n, s - r), o = t, e.fillStyle = i[o], r = + l, s = d) : s >= l ? s = Math.max(s, d) : (e.fillRect(0, r, n, s - + r), r = l, s = d) + } + e.fillRect(0, r, n, s - r) + } + } + var Ii = i(9443), + Ti = {}; + Ti.styleTagTransform = v(), Ti.setAttributes = m(), Ti.insert = g().bind( + null, "head"), Ti.domAPI = h(), Ti.insertStyleElement = _(), d()(Ii.Z, + Ti), Ii.Z && Ii.Z.locals && Ii.Z.locals; + class Mi extends q { + constructor(e) { + super(e), this.domNode = (0, M.X)(document.createElement("div")), this + .domNode.setAttribute("role", "presentation"), this.domNode.setAttribute( + "aria-hidden", "true"), this.domNode.setClassName("view-rulers"), + this._renderedRulers = []; + const t = this._context.configuration.options; + this._rulers = t.get(91), this._typicalHalfwidthCharacterWidth = t.get( + 42).typicalHalfwidthCharacterWidth + } + dispose() { + super.dispose() + } + onConfigurationChanged(e) { + const t = this._context.configuration.options; + return this._rulers = t.get(91), this._typicalHalfwidthCharacterWidth = + t.get(42).typicalHalfwidthCharacterWidth, !0 + } + onScrollChanged(e) { + return e.scrollHeightChanged + } + prepareRender(e) {} + _ensureRulersCount() { + const e = this._renderedRulers.length, + t = this._rulers.length; + if (e === t) return; + if (e < t) { + const { + tabSize: i + } = this._context.model.getTextModelOptions(), n = i; + let o = t - e; + for (; o > 0;) { + const e = (0, M.X)(document.createElement("div")); + e.setClassName("view-ruler"), e.setWidth(n), this.domNode.appendChild( + e), this._renderedRulers.push(e), o-- + } + return + } + let i = e - t; + for (; i > 0;) { + const e = this._renderedRulers.pop(); + this.domNode.removeChild(e), i-- + } + } + render(e) { + this._ensureRulersCount(); + for (let t = 0, i = this._rulers.length; t < i; t++) { + const i = this._renderedRulers[t], + n = this._rulers[t]; + i.setBoxShadow(n.color ? `1px 0 0 0 ${n.color} inset` : ""), i.setHeight( + Math.min(e.scrollHeight, 1e6)), i.setLeft(n.column * this._typicalHalfwidthCharacterWidth) + } + } + }(0, Ge.Ic)(((e, t) => { + const i = e.getColor(Ze.zk); + i && t.addRule( + `.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`) + })); + var Ai = i(9649), + Ri = {}; + Ri.styleTagTransform = v(), Ri.setAttributes = m(), Ri.insert = g().bind( + null, "head"), Ri.domAPI = h(), Ri.insertStyleElement = _(), d()(Ai.Z, + Ri), Ai.Z && Ai.Z.locals && Ai.Z.locals; + class Oi extends q { + constructor(e) { + super(e), this._scrollTop = 0, this._width = 0, this._updateWidth(), + this._shouldShow = !1; + const t = this._context.configuration.options.get(92); + this._useShadows = t.useShadows, this._domNode = (0, M.X)(document.createElement( + "div")), this._domNode.setAttribute("role", "presentation"), this._domNode + .setAttribute("aria-hidden", "true") + } + dispose() { + super.dispose() + } + _updateShouldShow() { + const e = this._useShadows && this._scrollTop > 0; + return this._shouldShow !== e && (this._shouldShow = e, !0) + } + getDomNode() { + return this._domNode + } + _updateWidth() { + const e = this._context.configuration.options.get(130); + 0 === e.minimap.renderMinimap || e.minimap.minimapWidth > 0 && 0 === e + .minimap.minimapLeft ? this._width = e.width : this._width = e.width - + e.minimap.minimapWidth - e.verticalScrollbarWidth + } + onConfigurationChanged(e) { + const t = this._context.configuration.options.get(92); + return this._useShadows = t.useShadows, this._updateWidth(), this._updateShouldShow(), ! + 0 + } + onScrollChanged(e) { + return this._scrollTop = e.scrollTop, this._updateShouldShow() + } + prepareRender(e) {} + render(e) { + this._domNode.setWidth(this._width), this._domNode.setClassName(this._shouldShow ? + "scroll-decoration" : "") + } + }(0, Ge.Ic)(((e, t) => { + const i = e.getColor(oi._w); + i && t.addRule( + `.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }` + ) + })); + var Pi = i(2595), + Fi = {}; + Fi.styleTagTransform = v(), Fi.setAttributes = m(), Fi.insert = g().bind( + null, "head"), Fi.domAPI = h(), Fi.insertStyleElement = _(), d()(Pi.Z, + Fi), Pi.Z && Pi.Z.locals && Pi.Z.locals; + class Bi { + constructor(e) { + this.left = e.left, this.width = e.width, this.startStyle = null, this + .endStyle = null + } + } + class Wi { + constructor(e, t) { + this.lineNumber = e, this.ranges = t + } + } + + function zi(e) { + return new Bi(e) + } + + function Vi(e) { + return new Wi(e.lineNumber, e.ranges.map(zi)) + } + class Hi extends qe { + constructor(e) { + super(), this._previousFrameVisibleRangesWithStyle = [], this._context = + e; + const t = this._context.configuration.options; + this._lineHeight = t.get(58), this._roundedSelection = t.get(90), this + ._typicalHalfwidthCharacterWidth = t.get(42).typicalHalfwidthCharacterWidth, + this._selections = [], this._renderResult = null, this._context.addEventHandler( + this) + } + dispose() { + this._context.removeEventHandler(this), this._renderResult = null, + super.dispose() + } + onConfigurationChanged(e) { + const t = this._context.configuration.options; + return this._lineHeight = t.get(58), this._roundedSelection = t.get(90), + this._typicalHalfwidthCharacterWidth = t.get(42).typicalHalfwidthCharacterWidth, ! + 0 + } + onCursorStateChanged(e) { + return this._selections = e.selections.slice(0), !0 + } + onDecorationsChanged(e) { + return !0 + } + onFlushed(e) { + return !0 + } + onLinesChanged(e) { + return !0 + } + onLinesDeleted(e) { + return !0 + } + onLinesInserted(e) { + return !0 + } + onScrollChanged(e) { + return e.scrollTopChanged + } + onZonesChanged(e) { + return !0 + } + _visibleRangesHaveGaps(e) { + for (let t = 0, i = e.length; t < i; t++) + if (e[t].ranges.length > 1) return !0; + return !1 + } + _enrichVisibleRangesWithStyle(e, t, i) { + const n = this._typicalHalfwidthCharacterWidth / 4; + let o = null, + r = null; + if (i && i.length > 0 && t.length > 0) { + const n = t[0].lineNumber; + if (n === e.startLineNumber) + for (let e = 0; !o && e < i.length; e++) i[e].lineNumber === n && (o = + i[e].ranges[0]); + const s = t[t.length - 1].lineNumber; + if (s === e.endLineNumber) + for (let e = i.length - 1; !r && e >= 0; e--) i[e].lineNumber === s && + (r = i[e].ranges[0]); + o && !o.startStyle && (o = null), r && !r.startStyle && (r = null) + } + for (let e = 0, i = t.length; e < i; e++) { + const s = t[e].ranges[0], + a = s.left, + l = s.left + s.width, + d = { + top: 0, + bottom: 0 + }, + c = { + top: 0, + bottom: 0 + }; + if (e > 0) { + const i = t[e - 1].ranges[0].left, + o = t[e - 1].ranges[0].left + t[e - 1].ranges[0].width; + Ui(a - i) < n ? d.top = 2 : a > i && (d.top = 1), Ui(l - o) < n ? c.top = + 2 : i < l && l < o && (c.top = 1) + } else o && (d.top = o.startStyle.top, c.top = o.endStyle.top); + if (e + 1 < i) { + const i = t[e + 1].ranges[0].left, + o = t[e + 1].ranges[0].left + t[e + 1].ranges[0].width; + Ui(a - i) < n ? d.bottom = 2 : i < a && a < o && (d.bottom = 1), Ui( + l - o) < n ? c.bottom = 2 : l < o && (c.bottom = 1) + } else r && (d.bottom = r.startStyle.bottom, c.bottom = r.endStyle.bottom); + s.startStyle = d, s.endStyle = c + } + } + _getVisibleRangesWithStyle(e, t, i) { + const n = (t.linesVisibleRangesForRange(e, !0) || []).map(Vi); + return !this._visibleRangesHaveGaps(n) && this._roundedSelection && + this._enrichVisibleRangesWithStyle(t.visibleRange, n, i), n + } + _createSelectionPiece(e, t, i, n, o) { + return '
    ' + } + _actualRenderOneSelection(e, t, i, n) { + if (0 === n.length) return; + const o = !!n[0].ranges[0].startStyle, + r = this._lineHeight.toString(), + s = (this._lineHeight - 1).toString(), + a = n[0].lineNumber, + l = n[n.length - 1].lineNumber; + for (let d = 0, c = n.length; d < c; d++) { + const c = n[d], + h = c.lineNumber, + u = h - t, + g = !i || h !== l && h !== a ? r : s, + p = i && h === a ? 1 : 0; + let m = "", + f = ""; + for (let e = 0, t = c.ranges.length; e < t; e++) { + const t = c.ranges[e]; + if (o) { + const e = t.startStyle, + i = t.endStyle; + if (1 === e.top || 1 === e.bottom) { + m += this._createSelectionPiece(p, g, Hi.SELECTION_CLASS_NAME, t.left - + Hi.ROUNDED_PIECE_WIDTH, Hi.ROUNDED_PIECE_WIDTH); + let i = Hi.EDITOR_BACKGROUND_CLASS_NAME; + 1 === e.top && (i += " " + Hi.SELECTION_TOP_RIGHT), 1 === e.bottom && + (i += " " + Hi.SELECTION_BOTTOM_RIGHT), m += this._createSelectionPiece( + p, g, i, t.left - Hi.ROUNDED_PIECE_WIDTH, Hi.ROUNDED_PIECE_WIDTH + ) + } + if (1 === i.top || 1 === i.bottom) { + m += this._createSelectionPiece(p, g, Hi.SELECTION_CLASS_NAME, t.left + + t.width, Hi.ROUNDED_PIECE_WIDTH); + let e = Hi.EDITOR_BACKGROUND_CLASS_NAME; + 1 === i.top && (e += " " + Hi.SELECTION_TOP_LEFT), 1 === i.bottom && + (e += " " + Hi.SELECTION_BOTTOM_LEFT), m += this._createSelectionPiece( + p, g, e, t.left + t.width, Hi.ROUNDED_PIECE_WIDTH) + } + } + let i = Hi.SELECTION_CLASS_NAME; + if (o) { + const e = t.startStyle, + n = t.endStyle; + 0 === e.top && (i += " " + Hi.SELECTION_TOP_LEFT), 0 === e.bottom && + (i += " " + Hi.SELECTION_BOTTOM_LEFT), 0 === n.top && (i += " " + + Hi.SELECTION_TOP_RIGHT), 0 === n.bottom && (i += " " + Hi.SELECTION_BOTTOM_RIGHT) + } + f += this._createSelectionPiece(p, g, i, t.left, t.width) + } + e[u][0] += m, e[u][1] += f + } + } + prepareRender(e) { + const t = [], + i = e.visibleRange.startLineNumber, + n = e.visibleRange.endLineNumber; + for (let e = i; e <= n; e++) t[e - i] = ["", ""]; + const o = []; + for (let n = 0, r = this._selections.length; n < r; n++) { + const r = this._selections[n]; + if (r.isEmpty()) { + o[n] = null; + continue + } + const s = this._getVisibleRangesWithStyle(r, e, this._previousFrameVisibleRangesWithStyle[ + n]); + o[n] = s, this._actualRenderOneSelection(t, i, this._selections.length > + 1, s) + } + this._previousFrameVisibleRangesWithStyle = o, this._renderResult = t.map( + (([e, t]) => e + t)) + } + render(e, t) { + if (!this._renderResult) return ""; + const i = t - e; + return i < 0 || i >= this._renderResult.length ? "" : this._renderResult[ + i] + } + } + + function Ui(e) { + return e < 0 ? -e : e + } + Hi.SELECTION_CLASS_NAME = "selected-text", Hi.SELECTION_TOP_LEFT = + "top-left-radius", Hi.SELECTION_BOTTOM_LEFT = "bottom-left-radius", Hi.SELECTION_TOP_RIGHT = + "top-right-radius", Hi.SELECTION_BOTTOM_RIGHT = "bottom-right-radius", + Hi.EDITOR_BACKGROUND_CLASS_NAME = "monaco-editor-background", Hi.ROUNDED_PIECE_WIDTH = + 10, (0, Ge.Ic)(((e, t) => { + const i = e.getColor(oi.hE); + i && t.addRule( + `.monaco-editor .focused .selected-text { background-color: ${i}; }` + ); + const n = e.getColor(oi.ES); + n && t.addRule( + `.monaco-editor .selected-text { background-color: ${n}; }`); + const o = e.getColor(oi.yb); + o && !o.isTransparent() && t.addRule( + `.monaco-editor .view-line span.inline-selected-text { color: ${o}; }` + ) + })); + var ji = i(4057), + Ki = {}; + Ki.styleTagTransform = v(), Ki.setAttributes = m(), Ki.insert = g().bind( + null, "head"), Ki.domAPI = h(), Ki.insertStyleElement = _(), d()(ji.Z, + Ki), ji.Z && ji.Z.locals && ji.Z.locals; + class $i { + constructor(e, t, i, n, o, r) { + this.top = e, this.left = t, this.width = i, this.height = n, this.textContent = + o, this.textContentClassName = r + } + } + class qi { + constructor(e) { + this._context = e; + const t = this._context.configuration.options, + i = t.get(42); + this._cursorStyle = t.get(23), this._lineHeight = t.get(58), this._typicalHalfwidthCharacterWidth = + i.typicalHalfwidthCharacterWidth, this._lineCursorWidth = Math.min(t.get( + 26), this._typicalHalfwidthCharacterWidth), this._isVisible = !0, + this._domNode = (0, M.X)(document.createElement("div")), this._domNode + .setClassName(`cursor ${Je.S}`), this._domNode.setHeight(this._lineHeight), + this._domNode.setTop(0), this._domNode.setLeft(0), D.V.applyFontInfo( + this._domNode, i), this._domNode.setDisplay("none"), this._position = + new fe.L(1, 1), this._lastRenderedContent = "", this._renderData = + null + } + getDomNode() { + return this._domNode + } + getPosition() { + return this._position + } + show() { + this._isVisible || (this._domNode.setVisibility("inherit"), this._isVisible = ! + 0) + } + hide() { + this._isVisible && (this._domNode.setVisibility("hidden"), this._isVisible = ! + 1) + } + onConfigurationChanged(e) { + const t = this._context.configuration.options, + i = t.get(42); + return this._cursorStyle = t.get(23), this._lineHeight = t.get(58), + this._typicalHalfwidthCharacterWidth = i.typicalHalfwidthCharacterWidth, + this._lineCursorWidth = Math.min(t.get(26), this._typicalHalfwidthCharacterWidth), + D.V.applyFontInfo(this._domNode, i), !0 + } + onCursorPositionChanged(e) { + return this._position = e, !0 + } + _prepareRender(e) { + let t = ""; + if (this._cursorStyle === re.d2.Line || this._cursorStyle === re.d2.LineThin) { + const i = e.visibleRangeForPosition(this._position); + if (!i || i.outsideRenderedLine) return null; + let n; + if (this._cursorStyle === re.d2.Line) { + if (n = S.Uh(this._lineCursorWidth > 0 ? this._lineCursorWidth : 2), + n > 2) { + const e = this._context.model.getLineContent(this._position.lineNumber), + i = Ue.vH(e, this._position.column - 1); + t = e.substr(this._position.column - 1, i) + } + } else n = S.Uh(1); + let o = i.left; + n >= 2 && o >= 1 && (o -= 1); + const r = e.getVerticalOffsetForLineNumber(this._position.lineNumber) - + e.bigNumbersDelta; + return new $i(r, o, n, this._lineHeight, t, "") + } + const i = this._context.model.getLineContent(this._position.lineNumber), + n = Ue.vH(i, this._position.column - 1), + o = e.linesVisibleRangesForRange(new _e.e(this._position.lineNumber, + this._position.column, this._position.lineNumber, this._position.column + + n), !1); + if (!o || 0 === o.length) return null; + const r = o[0]; + if (r.outsideRenderedLine || 0 === r.ranges.length) return null; + const s = r.ranges[0], + a = s.width < 1 ? this._typicalHalfwidthCharacterWidth : s.width; + let l = ""; + if (this._cursorStyle === re.d2.Block) { + const e = this._context.model.getViewLineData(this._position.lineNumber); + t = i.substr(this._position.column - 1, n); + const o = e.tokens.findTokenIndexAtOffset(this._position.column - 1); + l = e.tokens.getClassName(o) + } + let d = e.getVerticalOffsetForLineNumber(this._position.lineNumber) - + e.bigNumbersDelta, + c = this._lineHeight; + return this._cursorStyle !== re.d2.Underline && this._cursorStyle !== + re.d2.UnderlineThin || (d += this._lineHeight - 2, c = 2), new $i(d, + s.left, a, c, t, l) + } + prepareRender(e) { + this._renderData = this._prepareRender(e) + } + render(e) { + return this._renderData ? (this._lastRenderedContent !== this._renderData + .textContent && (this._lastRenderedContent = this._renderData.textContent, + this._domNode.domNode.textContent = this._lastRenderedContent), + this._domNode.setClassName( + `cursor ${Je.S} ${this._renderData.textContentClassName}`), this._domNode + .setDisplay("block"), this._domNode.setTop(this._renderData.top), + this._domNode.setLeft(this._renderData.left), this._domNode.setWidth( + this._renderData.width), this._domNode.setLineHeight(this._renderData + .height), this._domNode.setHeight(this._renderData.height), { + domNode: this._domNode.domNode, + position: this._position, + contentLeft: this._renderData.left, + height: this._renderData.height, + width: 2 + }) : (this._domNode.setDisplay("none"), null) + } + } + class Zi extends q { + constructor(e) { + super(e); + const t = this._context.configuration.options; + this._readOnly = t.get(80), this._cursorBlinking = t.get(21), this._cursorStyle = + t.get(23), this._cursorSmoothCaretAnimation = t.get(22), this._selectionIsEmpty = ! + 0, this._isComposingInput = !1, this._isVisible = !1, this._primaryCursor = + new qi(this._context), this._secondaryCursors = [], this._renderData = [], + this._domNode = (0, M.X)(document.createElement("div")), this._domNode + .setAttribute("role", "presentation"), this._domNode.setAttribute( + "aria-hidden", "true"), this._updateDomClassName(), this._domNode.appendChild( + this._primaryCursor.getDomNode()), this._startCursorBlinkAnimation = + new P._F, this._cursorFlatBlinkInterval = new P.zh, this._blinkingEnabled = ! + 1, this._editorHasFocus = !1, this._updateBlinking() + } + dispose() { + super.dispose(), this._startCursorBlinkAnimation.dispose(), this._cursorFlatBlinkInterval + .dispose() + } + getDomNode() { + return this._domNode + } + onCompositionStart(e) { + return this._isComposingInput = !0, this._updateBlinking(), !0 + } + onCompositionEnd(e) { + return this._isComposingInput = !1, this._updateBlinking(), !0 + } + onConfigurationChanged(e) { + const t = this._context.configuration.options; + this._readOnly = t.get(80), this._cursorBlinking = t.get(21), this._cursorStyle = + t.get(23), this._cursorSmoothCaretAnimation = t.get(22), this._updateBlinking(), + this._updateDomClassName(), this._primaryCursor.onConfigurationChanged( + e); + for (let t = 0, i = this._secondaryCursors.length; t < i; t++) this._secondaryCursors[ + t].onConfigurationChanged(e); + return !0 + } + _onCursorPositionChanged(e, t) { + if (this._primaryCursor.onCursorPositionChanged(e), this._updateBlinking(), + this._secondaryCursors.length < t.length) { + const e = t.length - this._secondaryCursors.length; + for (let t = 0; t < e; t++) { + const e = new qi(this._context); + this._domNode.domNode.insertBefore(e.getDomNode().domNode, this._primaryCursor + .getDomNode().domNode.nextSibling), this._secondaryCursors.push(e) + } + } else if (this._secondaryCursors.length > t.length) { + const e = this._secondaryCursors.length - t.length; + for (let t = 0; t < e; t++) this._domNode.removeChild(this._secondaryCursors[ + 0].getDomNode()), this._secondaryCursors.splice(0, 1) + } + for (let e = 0; e < t.length; e++) this._secondaryCursors[e].onCursorPositionChanged( + t[e]) + } + onCursorStateChanged(e) { + const t = []; + for (let i = 0, n = e.selections.length; i < n; i++) t[i] = e.selections[ + i].getPosition(); + this._onCursorPositionChanged(t[0], t.slice(1)); + const i = e.selections[0].isEmpty(); + return this._selectionIsEmpty !== i && (this._selectionIsEmpty = i, + this._updateDomClassName()), !0 + } + onDecorationsChanged(e) { + return !0 + } + onFlushed(e) { + return !0 + } + onFocusChanged(e) { + return this._editorHasFocus = e.isFocused, this._updateBlinking(), !1 + } + onLinesChanged(e) { + return !0 + } + onLinesDeleted(e) { + return !0 + } + onLinesInserted(e) { + return !0 + } + onScrollChanged(e) { + return !0 + } + onTokensChanged(e) { + const t = t => { + for (let i = 0, n = e.ranges.length; i < n; i++) + if (e.ranges[i].fromLineNumber <= t.lineNumber && t.lineNumber <= e + .ranges[i].toLineNumber) return !0; + return !1 + }; + if (t(this._primaryCursor.getPosition())) return !0; + for (const e of this._secondaryCursors) + if (t(e.getPosition())) return !0; + return !1 + } + onZonesChanged(e) { + return !0 + } + _getCursorBlinking() { + return this._isComposingInput ? 0 : this._editorHasFocus ? this._readOnly ? + 5 : this._cursorBlinking : 0 + } + _updateBlinking() { + this._startCursorBlinkAnimation.cancel(), this._cursorFlatBlinkInterval + .cancel(); + const e = this._getCursorBlinking(), + t = 0 === e, + i = 5 === e; + t ? this._hide() : this._show(), this._blinkingEnabled = !1, this._updateDomClassName(), + t || i || (1 === e ? this._cursorFlatBlinkInterval.cancelAndSet((() => { + this._isVisible ? this._hide() : this._show() + }), Zi.BLINK_INTERVAL) : this._startCursorBlinkAnimation.setIfNotSet( + (() => { + this._blinkingEnabled = !0, this._updateDomClassName() + }), Zi.BLINK_INTERVAL)) + } + _updateDomClassName() { + this._domNode.setClassName(this._getClassName()) + } + _getClassName() { + let e = "cursors-layer"; + switch (this._selectionIsEmpty || (e += " has-selection"), this._cursorStyle) { + case re.d2.Line: + e += " cursor-line-style"; + break; + case re.d2.Block: + e += " cursor-block-style"; + break; + case re.d2.Underline: + e += " cursor-underline-style"; + break; + case re.d2.LineThin: + e += " cursor-line-thin-style"; + break; + case re.d2.BlockOutline: + e += " cursor-block-outline-style"; + break; + case re.d2.UnderlineThin: + e += " cursor-underline-thin-style"; + break; + default: + e += " cursor-line-style" + } + if (this._blinkingEnabled) switch (this._getCursorBlinking()) { + case 1: + e += " cursor-blink"; + break; + case 2: + e += " cursor-smooth"; + break; + case 3: + e += " cursor-phase"; + break; + case 4: + e += " cursor-expand"; + break; + default: + e += " cursor-solid" + } else e += " cursor-solid"; + return this._cursorSmoothCaretAnimation && (e += + " cursor-smooth-caret-animation"), e + } + _show() { + this._primaryCursor.show(); + for (let e = 0, t = this._secondaryCursors.length; e < t; e++) this._secondaryCursors[ + e].show(); + this._isVisible = !0 + } + _hide() { + this._primaryCursor.hide(); + for (let e = 0, t = this._secondaryCursors.length; e < t; e++) this._secondaryCursors[ + e].hide(); + this._isVisible = !1 + } + prepareRender(e) { + this._primaryCursor.prepareRender(e); + for (let t = 0, i = this._secondaryCursors.length; t < i; t++) this._secondaryCursors[ + t].prepareRender(e) + } + render(e) { + let t = [], + i = 0; + const n = this._primaryCursor.render(e); + n && (t[i++] = n); + for (let n = 0, o = this._secondaryCursors.length; n < o; n++) { + const o = this._secondaryCursors[n].render(e); + o && (t[i++] = o) + } + this._renderData = t + } + getLastRenderData() { + return this._renderData + } + } + Zi.BLINK_INTERVAL = 500, (0, Ge.Ic)(((e, t) => { + const i = e.getColor(Ze.n0); + if (i) { + let n = e.getColor(Ze.fY); + n || (n = i.opposite()), t.addRule( + `.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }` + ), "hc" === e.type && t.addRule( + `.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }` + ) + } + })); + const Gi = () => { + throw new Error("Invalid change accessor") + }; + class Yi extends q { + constructor(e) { + super(e); + const t = this._context.configuration.options, + i = t.get(130); + this._lineHeight = t.get(58), this._contentWidth = i.contentWidth, + this._contentLeft = i.contentLeft, this.domNode = (0, M.X)(document.createElement( + "div")), this.domNode.setClassName("view-zones"), this.domNode.setPosition( + "absolute"), this.domNode.setAttribute("role", "presentation"), this + .domNode.setAttribute("aria-hidden", "true"), this.marginDomNode = (0, + M.X)(document.createElement("div")), this.marginDomNode.setClassName( + "margin-view-zones"), this.marginDomNode.setPosition("absolute"), + this.marginDomNode.setAttribute("role", "presentation"), this.marginDomNode + .setAttribute("aria-hidden", "true"), this._zones = {} + } + dispose() { + super.dispose(), this._zones = {} + } + _recomputeWhitespacesProps() { + const e = this._context.viewLayout.getWhitespaces(), + t = new Map; + for (const i of e) t.set(i.id, i); + let i = !1; + return this._context.model.changeWhitespace((e => { + const n = Object.keys(this._zones); + for (let o = 0, r = n.length; o < r; o++) { + const r = n[o], + s = this._zones[r], + a = this._computeWhitespaceProps(s.delegate), + l = t.get(r); + !l || l.afterLineNumber === a.afterViewLineNumber && l.height === + a.heightInPx || (e.changeOneWhitespace(r, a.afterViewLineNumber, + a.heightInPx), this._safeCallOnComputedHeight(s.delegate, a.heightInPx), + i = !0) + } + })), i + } + onConfigurationChanged(e) { + const t = this._context.configuration.options, + i = t.get(130); + return this._lineHeight = t.get(58), this._contentWidth = i.contentWidth, + this._contentLeft = i.contentLeft, e.hasChanged(58) && this._recomputeWhitespacesProps(), ! + 0 + } + onLineMappingChanged(e) { + return this._recomputeWhitespacesProps() + } + onLinesDeleted(e) { + return !0 + } + onScrollChanged(e) { + return e.scrollTopChanged || e.scrollWidthChanged + } + onZonesChanged(e) { + return !0 + } + onLinesInserted(e) { + return !0 + } + _getZoneOrdinal(e) { + return void 0 !== e.afterColumn ? e.afterColumn : 1e4 + } + _computeWhitespaceProps(e) { + if (0 === e.afterLineNumber) return { + afterViewLineNumber: 0, + heightInPx: this._heightInPixels(e), + minWidthInPx: this._minWidthInPixels(e) + }; + let t, i; + if (void 0 !== e.afterColumn) t = this._context.model.validateModelPosition({ + lineNumber: e.afterLineNumber, + column: e.afterColumn + }); + else { + const i = this._context.model.validateModelPosition({ + lineNumber: e.afterLineNumber, + column: 1 + }).lineNumber; + t = new fe.L(i, this._context.model.getModelLineMaxColumn(i)) + } + i = t.column === this._context.model.getModelLineMaxColumn(t.lineNumber) ? + this._context.model.validateModelPosition({ + lineNumber: t.lineNumber + 1, + column: 1 + }) : this._context.model.validateModelPosition({ + lineNumber: t.lineNumber, + column: t.column + 1 + }); + const n = this._context.model.coordinatesConverter.convertModelPositionToViewPosition( + t), + o = this._context.model.coordinatesConverter.modelPositionIsVisible(i); + return { + afterViewLineNumber: n.lineNumber, + heightInPx: o ? this._heightInPixels(e) : 0, + minWidthInPx: this._minWidthInPixels(e) + } + } + changeViewZones(e) { + let t = !1; + return this._context.model.changeWhitespace((i => { + const n = { + addZone: e => (t = !0, this._addZone(i, e)), + removeZone: e => { + e && (t = this._removeZone(i, e) || t) + }, + layoutZone: e => { + e && (t = this._layoutZone(i, e) || t) + } + }; + ! function(e, t) { + try { + e(t) + } catch (e) { + (0, x.dL)(e) + } + }(e, n), n.addZone = Gi, n.removeZone = Gi, n.layoutZone = Gi + })), t + } + _addZone(e, t) { + const i = this._computeWhitespaceProps(t), + n = { + whitespaceId: e.insertWhitespace(i.afterViewLineNumber, this._getZoneOrdinal( + t), i.heightInPx, i.minWidthInPx), + delegate: t, + isVisible: !1, + domNode: (0, M.X)(t.domNode), + marginDomNode: t.marginDomNode ? (0, M.X)(t.marginDomNode) : null + }; + return this._safeCallOnComputedHeight(n.delegate, i.heightInPx), n.domNode + .setPosition("absolute"), n.domNode.domNode.style.width = "100%", n.domNode + .setDisplay("none"), n.domNode.setAttribute("monaco-view-zone", n.whitespaceId), + this.domNode.appendChild(n.domNode), n.marginDomNode && (n.marginDomNode + .setPosition("absolute"), n.marginDomNode.domNode.style.width = + "100%", n.marginDomNode.setDisplay("none"), n.marginDomNode.setAttribute( + "monaco-view-zone", n.whitespaceId), this.marginDomNode.appendChild( + n.marginDomNode)), this._zones[n.whitespaceId] = n, this.setShouldRender(), + n.whitespaceId + } + _removeZone(e, t) { + if (this._zones.hasOwnProperty(t)) { + const i = this._zones[t]; + return delete this._zones[t], e.removeWhitespace(i.whitespaceId), i.domNode + .removeAttribute("monaco-visible-view-zone"), i.domNode.removeAttribute( + "monaco-view-zone"), i.domNode.domNode.parentNode.removeChild(i.domNode + .domNode), i.marginDomNode && (i.marginDomNode.removeAttribute( + "monaco-visible-view-zone"), i.marginDomNode.removeAttribute( + "monaco-view-zone"), i.marginDomNode.domNode.parentNode.removeChild( + i.marginDomNode.domNode)), this.setShouldRender(), !0 + } + return !1 + } + _layoutZone(e, t) { + if (this._zones.hasOwnProperty(t)) { + const i = this._zones[t], + n = this._computeWhitespaceProps(i.delegate); + return e.changeOneWhitespace(i.whitespaceId, n.afterViewLineNumber, n + .heightInPx), this._safeCallOnComputedHeight(i.delegate, n.heightInPx), + this.setShouldRender(), !0 + } + return !1 + } + shouldSuppressMouseDownOnViewZone(e) { + if (this._zones.hasOwnProperty(e)) { + const t = this._zones[e]; + return Boolean(t.delegate.suppressMouseDown) + } + return !1 + } + _heightInPixels(e) { + return "number" == typeof e.heightInPx ? e.heightInPx : "number" == + typeof e.heightInLines ? this._lineHeight * e.heightInLines : this._lineHeight + } + _minWidthInPixels(e) { + return "number" == typeof e.minWidthInPx ? e.minWidthInPx : 0 + } + _safeCallOnComputedHeight(e, t) { + if ("function" == typeof e.onComputedHeight) try { + e.onComputedHeight(t) + } catch (e) { + (0, x.dL)(e) + } + } + _safeCallOnDomNodeTop(e, t) { + if ("function" == typeof e.onDomNodeTop) try { + e.onDomNodeTop(t) + } catch (e) { + (0, x.dL)(e) + } + } + prepareRender(e) {} + render(e) { + const t = e.viewportData.whitespaceViewportData, + i = {}; + let n = !1; + for (let e = 0, o = t.length; e < o; e++) i[t[e].id] = t[e], n = !0; + const o = Object.keys(this._zones); + for (let t = 0, n = o.length; t < n; t++) { + const n = o[t], + r = this._zones[n]; + let s = 0, + a = 0, + l = "none"; + i.hasOwnProperty(n) ? (s = i[n].verticalOffset - e.bigNumbersDelta, a = + i[n].height, l = "block", r.isVisible || (r.domNode.setAttribute( + "monaco-visible-view-zone", "true"), r.isVisible = !0), this._safeCallOnDomNodeTop( + r.delegate, e.getScrolledTopFromAbsoluteTop(i[n].verticalOffset))) : + (r.isVisible && (r.domNode.removeAttribute( + "monaco-visible-view-zone"), r.isVisible = !1), this._safeCallOnDomNodeTop( + r.delegate, e.getScrolledTopFromAbsoluteTop(-1e6))), r.domNode.setTop( + s), r.domNode.setHeight(a), r.domNode.setDisplay(l), r.marginDomNode && + (r.marginDomNode.setTop(s), r.marginDomNode.setHeight(a), r.marginDomNode + .setDisplay(l)) + } + n && (this.domNode.setWidth(Math.max(e.scrollWidth, this._contentWidth)), + this.marginDomNode.setWidth(this._contentLeft)) + } + } + class Qi { + constructor(e) { + this._theme = e + } + get type() { + return this._theme.type + } + update(e) { + this._theme = e + } + getColor(e) { + return this._theme.getColor(e) + } + } + class Xi { + constructor(e, t, i) { + this.configuration = e, this.theme = new Qi(t), this.model = i, this.viewLayout = + i.viewLayout + } + addEventHandler(e) { + this.model.addViewEventHandler(e) + } + removeEventHandler(e) { + this.model.removeViewEventHandler(e) + } + } + class Ji { + constructor(e, t, i, n) { + this.selections = e, this.startLineNumber = 0 | t.startLineNumber, + this.endLineNumber = 0 | t.endLineNumber, this.relativeVerticalOffset = + t.relativeVerticalOffset, this.bigNumbersDelta = 0 | t.bigNumbersDelta, + this.whitespaceViewportData = i, this._model = n, this.visibleRange = + new _e.e(t.startLineNumber, this._model.getLineMinColumn(t.startLineNumber), + t.endLineNumber, this._model.getLineMaxColumn(t.endLineNumber)) + } + getViewLineRenderingData(e) { + return this._model.getViewLineRenderingData(this.visibleRange, e) + } + getDecorationsInViewport() { + return this._model.getDecorationsInViewport(this.visibleRange) + } + } + class en extends $ { + constructor(e, t, i, n, o, r) { + super(), this._selections = [new T.Y(1, 1, 1, 1)], this._renderAnimationFrame = + null; + const s = new ot(t, n, o, e); + this._context = new Xi(t, i.getColorTheme(), n), this._configPixelRatio = + this._context.configuration.options.get(128), this._context.addEventHandler( + this), this._register(i.onDidColorThemeChange((e => { + this._context.theme.update(e), this._context.model.onDidColorThemeChange(), + this.render(!0, !1) + }))), this._viewParts = [], this._textAreaHandler = new it(this._context, + s, this._createTextAreaHandlerHelper()), this._viewParts.push(this._textAreaHandler), + this._linesContent = (0, M.X)(document.createElement("div")), this._linesContent + .setClassName("lines-content monaco-editor-background"), this._linesContent + .setPosition("absolute"), this.domNode = (0, M.X)(document.createElement( + "div")), this.domNode.setClassName(this._getEditorClassName()), this + .domNode.setAttribute("role", "code"), this._overflowGuardContainer = + (0, M.X)(document.createElement("div")), Z.write(this._overflowGuardContainer, + 3), this._overflowGuardContainer.setClassName("overflow-guard"), + this._scrollbar = new Tt(this._context, this._linesContent, this.domNode, + this._overflowGuardContainer), this._viewParts.push(this._scrollbar), + this._viewLines = new Kt(this._context, this._linesContent), this._viewZones = + new Yi(this._context), this._viewParts.push(this._viewZones); + const a = new Ni(this._context); + this._viewParts.push(a); + const l = new Oi(this._context); + this._viewParts.push(l); + const d = new pt(this._context); + this._viewParts.push(d), d.addDynamicOverlay(new kt(this._context)), d + .addDynamicOverlay(new Hi(this._context)), d.addDynamicOverlay(new Wt( + this._context)), d.addDynamicOverlay(new Et(this._context)); + const c = new mt(this._context); + this._viewParts.push(c), c.addDynamicOverlay(new Lt(this._context)), c + .addDynamicOverlay(new Pt(this._context)), c.addDynamicOverlay(new Qt( + this._context)), c.addDynamicOverlay(new Zt(this._context)), c.addDynamicOverlay( + new Ye(this._context)); + const h = new Qe(this._context); + h.getDomNode().appendChild(this._viewZones.marginDomNode), h.getDomNode() + .appendChild(c.getDomNode()), this._viewParts.push(h), this._contentWidgets = + new _t(this._context, this.domNode), this._viewParts.push(this._contentWidgets), + this._viewCursors = new Zi(this._context), this._viewParts.push(this._viewCursors), + this._overlayWidgets = new xi(this._context), this._viewParts.push( + this._overlayWidgets); + const u = new Mi(this._context); + this._viewParts.push(u); + const g = new wi(this._context); + if (this._viewParts.push(g), a) { + const e = this._scrollbar.getOverviewRulerLayoutInfo(); + e.parent.insertBefore(a.getDomNode(), e.insertBefore) + } + this._linesContent.appendChild(d.getDomNode()), this._linesContent.appendChild( + u.domNode), this._linesContent.appendChild(this._viewZones.domNode), + this._linesContent.appendChild(this._viewLines.getDomNode()), this._linesContent + .appendChild(this._contentWidgets.domNode), this._linesContent.appendChild( + this._viewCursors.getDomNode()), this._overflowGuardContainer.appendChild( + h.getDomNode()), this._overflowGuardContainer.appendChild(this._scrollbar + .getDomNode()), this._overflowGuardContainer.appendChild(l.getDomNode()), + this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea), + this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover), + this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()), + this._overflowGuardContainer.appendChild(g.getDomNode()), this.domNode + .appendChild(this._overflowGuardContainer), r ? r.appendChild(this._contentWidgets + .overflowingContentWidgetsDomNode.domNode) : this.domNode.appendChild( + this._contentWidgets.overflowingContentWidgetsDomNode), this._applyLayout(), + this._pointerHandler = this._register(new ze(this._context, s, this._createPointerHandlerHelper())) + } + _flushAccumulatedAndRenderNow() { + this._renderNow() + } + _createPointerHandlerHelper() { + return { + viewDomNode: this.domNode.domNode, + linesContentDomNode: this._linesContent.domNode, + focusTextArea: () => { + this.focus() + }, + dispatchTextAreaEvent: e => { + this._textAreaHandler.textArea.domNode.dispatchEvent(e) + }, + getLastRenderData: () => { + const e = this._viewCursors.getLastRenderData() || [], + t = this._textAreaHandler.getLastRenderData(); + return new ye(e, t) + }, + shouldSuppressMouseDownOnViewZone: e => this._viewZones.shouldSuppressMouseDownOnViewZone( + e), + shouldSuppressMouseDownOnWidget: e => this._contentWidgets.shouldSuppressMouseDownOnWidget( + e), + getPositionFromDOMInfo: (e, t) => (this._flushAccumulatedAndRenderNow(), + this._viewLines.getPositionFromDOMInfo(e, t)), + visibleRangeForPosition: (e, t) => (this._flushAccumulatedAndRenderNow(), + this._viewLines.visibleRangeForPosition(new fe.L(e, t))), + getLineWidth: e => (this._flushAccumulatedAndRenderNow(), this._viewLines + .getLineWidth(e)) + } + } + _createTextAreaHandlerHelper() { + return { + visibleRangeForPositionRelativeToEditor: (e, t) => (this._flushAccumulatedAndRenderNow(), + this._viewLines.visibleRangeForPosition(new fe.L(e, t))) + } + } + _applyLayout() { + const e = this._context.configuration.options.get(130); + this.domNode.setWidth(e.width), this.domNode.setHeight(e.height), this + ._overflowGuardContainer.setWidth(e.width), this._overflowGuardContainer + .setHeight(e.height), this._linesContent.setWidth(1e6), this._linesContent + .setHeight(1e6) + } + _getEditorClassName() { + const e = this._textAreaHandler.isFocused() ? " focused" : ""; + return this._context.configuration.options.get(127) + " " + (0, Ge.m6) + (this._context.theme.type) + e + } + handleEvents(e) { + super.handleEvents(e), this._scheduleRender() + } + onConfigurationChanged(e) { + return this._configPixelRatio = this._context.configuration.options.get( + 128), this.domNode.setClassName(this._getEditorClassName()), this._applyLayout(), ! + 1 + } + onCursorStateChanged(e) { + return this._selections = e.selections, !1 + } + onFocusChanged(e) { + return this.domNode.setClassName(this._getEditorClassName()), !1 + } + onThemeChanged(e) { + return this.domNode.setClassName(this._getEditorClassName()), !1 + } + dispose() { + null !== this._renderAnimationFrame && (this._renderAnimationFrame.dispose(), + this._renderAnimationFrame = null), this._contentWidgets.overflowingContentWidgetsDomNode + .domNode.remove(), this._context.removeEventHandler(this), this._viewLines + .dispose(); + for (const e of this._viewParts) e.dispose(); + super.dispose() + } + _scheduleRender() { + null === this._renderAnimationFrame && (this._renderAnimationFrame = S + .lI(this._onRenderScheduled.bind(this), 100)) + } + _onRenderScheduled() { + this._renderAnimationFrame = null, this._flushAccumulatedAndRenderNow() + } + _renderNow() { + ! function(e) { + try { + e() + } catch (e) { + (0, x.dL)(e) + } + }((() => this._actualRender())) + } + _getViewPartsToRender() { + let e = [], + t = 0; + for (const i of this._viewParts) i.shouldRender() && (e[t++] = i); + return e + } + _actualRender() { + if (!S.Uw(this.domNode.domNode)) return; + let e = this._getViewPartsToRender(); + if (!this._viewLines.shouldRender() && 0 === e.length) return; + const t = this._context.viewLayout.getLinesViewportData(); + this._context.model.setViewport(t.startLineNumber, t.endLineNumber, t.centeredLineNumber); + const i = new Ji(this._selections, t, this._context.viewLayout.getWhitespaceViewportData(), + this._context.model); + this._contentWidgets.shouldRender() && this._contentWidgets.onBeforeRender( + i), this._viewLines.shouldRender() && (this._viewLines.renderText(i), + this._viewLines.onDidRender(), e = this._getViewPartsToRender()); + const n = new G(this._context.viewLayout, i, this._viewLines); + for (const t of e) t.prepareRender(n); + for (const t of e) t.render(n), t.onDidRender(); + Math.abs(I.mX() - this._configPixelRatio) > .001 && this._context.configuration + .updatePixelRatio() + } + delegateVerticalScrollbarMouseDown(e) { + this._scrollbar.delegateVerticalScrollbarMouseDown(e) + } + restoreState(e) { + this._context.model.setScrollPosition({ + scrollTop: e.scrollTop + }, 1), this._context.model.tokenizeViewport(), this._renderNow(), + this._viewLines.updateLineWidths(), this._context.model.setScrollPosition({ + scrollLeft: e.scrollLeft + }, 1) + } + getOffsetForColumn(e, t) { + const i = this._context.model.validateModelPosition({ + lineNumber: e, + column: t + }), + n = this._context.model.coordinatesConverter.convertModelPositionToViewPosition( + i); + this._flushAccumulatedAndRenderNow(); + const o = this._viewLines.visibleRangeForPosition(new fe.L(n.lineNumber, + n.column)); + return o ? o.left : -1 + } + getTargetAtClientPoint(e, t) { + const i = this._pointerHandler.getTargetAtClientPoint(e, t); + return i ? rt.convertViewToModelMouseTarget(i, this._context.model.coordinatesConverter) : + null + } + createOverviewRuler(e) { + return new Ei(this._context, e) + } + change(e) { + this._viewZones.changeViewZones(e), this._scheduleRender() + } + render(e, t) { + if (t) { + this._viewLines.forceShouldRender(); + for (const e of this._viewParts) e.forceShouldRender() + } + e ? this._flushAccumulatedAndRenderNow() : this._scheduleRender() + } + focus() { + this._textAreaHandler.focusTextArea() + } + isFocused() { + return this._textAreaHandler.isFocused() + } + setAriaOptions(e) { + this._textAreaHandler.setAriaOptions(e) + } + addContentWidget(e) { + this._contentWidgets.addWidget(e.widget), this.layoutContentWidget(e), + this._scheduleRender() + } + layoutContentWidget(e) { + let t = e.position && e.position.range || null; + if (null === t) { + const i = e.position ? e.position.position : null; + null !== i && (t = new _e.e(i.lineNumber, i.column, i.lineNumber, i.column)) + } + const i = e.position ? e.position.preference : null; + this._contentWidgets.setWidgetPosition(e.widget, t, i), this._scheduleRender() + } + removeContentWidget(e) { + this._contentWidgets.removeWidget(e.widget), this._scheduleRender() + } + addOverlayWidget(e) { + this._overlayWidgets.addWidget(e.widget), this.layoutOverlayWidget(e), + this._scheduleRender() + } + layoutOverlayWidget(e) { + const t = e.position ? e.position.preference : null; + this._overlayWidgets.setWidgetPosition(e.widget, t) && this._scheduleRender() + } + removeOverlayWidget(e) { + this._overlayWidgets.removeWidget(e.widget), this._scheduleRender() + } + } + class tn { + constructor(e) { + this._selTrackedRange = null, this._trackSelection = !0, this._setState( + e, new be.rS(new _e.e(1, 1, 1, 1), 0, new fe.L(1, 1), 0), new be.rS( + new _e.e(1, 1, 1, 1), 0, new fe.L(1, 1), 0)) + } + dispose(e) { + this._removeTrackedRange(e) + } + startTrackingSelection(e) { + this._trackSelection = !0, this._updateTrackedRange(e) + } + stopTrackingSelection(e) { + this._trackSelection = !1, this._removeTrackedRange(e) + } + _updateTrackedRange(e) { + this._trackSelection && (this._selTrackedRange = e.model._setTrackedRange( + this._selTrackedRange, this.modelState.selection, 0)) + } + _removeTrackedRange(e) { + this._selTrackedRange = e.model._setTrackedRange(this._selTrackedRange, + null, 0) + } + asCursorState() { + return new be.Vi(this.modelState, this.viewState) + } + readSelectionFromMarkers(e) { + const t = e.model._getTrackedRange(this._selTrackedRange); + return 0 === this.modelState.selection.getDirection() ? new T.Y(t.startLineNumber, + t.startColumn, t.endLineNumber, t.endColumn) : new T.Y(t.endLineNumber, + t.endColumn, t.startLineNumber, t.startColumn) + } + ensureValidState(e) { + this._setState(e, this.modelState, this.viewState) + } + setState(e, t, i) { + this._setState(e, t, i) + } + static _validatePositionWithCache(e, t, i, n) { + return t.equals(i) ? n : e.normalizePosition(t, 2) + } + static _validateViewState(e, t) { + const i = t.position, + n = t.selectionStart.getStartPosition(), + o = t.selectionStart.getEndPosition(), + r = e.normalizePosition(i, 2), + s = this._validatePositionWithCache(e, n, i, r), + a = this._validatePositionWithCache(e, o, n, s); + return i.equals(r) && n.equals(s) && o.equals(a) ? t : new be.rS(_e.e.fromPositions( + s, a), t.selectionStartLeftoverVisibleColumns + n.column - s.column, + r, t.leftoverVisibleColumns + i.column - r.column) + } + _setState(e, t, i) { + if (i && (i = tn._validateViewState(e.viewModel, i)), t) { + const i = e.model.validateRange(t.selectionStart), + n = t.selectionStart.equalsRange(i) ? t.selectionStartLeftoverVisibleColumns : + 0, + o = e.model.validatePosition(t.position), + r = t.position.equals(o) ? t.leftoverVisibleColumns : 0; + t = new be.rS(i, n, o, r) + } else { + if (!i) return; + const n = e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange( + i.selectionStart)), + o = e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition( + i.position)); + t = new be.rS(n, i.selectionStartLeftoverVisibleColumns, o, i.leftoverVisibleColumns) + } + if (i) { + const n = e.coordinatesConverter.validateViewRange(i.selectionStart, + t.selectionStart), + o = e.coordinatesConverter.validateViewPosition(i.position, t.position); + i = new be.rS(n, t.selectionStartLeftoverVisibleColumns, o, t.leftoverVisibleColumns) + } else { + const n = e.coordinatesConverter.convertModelPositionToViewPosition( + new fe.L(t.selectionStart.startLineNumber, t.selectionStart.startColumn) + ), + o = e.coordinatesConverter.convertModelPositionToViewPosition(new fe + .L(t.selectionStart.endLineNumber, t.selectionStart.endColumn)), + r = new _e.e(n.lineNumber, n.column, o.lineNumber, o.column), + s = e.coordinatesConverter.convertModelPositionToViewPosition(t.position); + i = new be.rS(r, t.selectionStartLeftoverVisibleColumns, s, t.leftoverVisibleColumns) + } + this.modelState = t, this.viewState = i, this._updateTrackedRange(e) + } + } + class nn { + constructor(e) { + this.context = e, this.primaryCursor = new tn(e), this.secondaryCursors = [], + this.lastAddedCursorIndex = 0 + } + dispose() { + this.primaryCursor.dispose(this.context), this.killSecondaryCursors() + } + startTrackingSelections() { + this.primaryCursor.startTrackingSelection(this.context); + for (let e = 0, t = this.secondaryCursors.length; e < t; e++) this.secondaryCursors[ + e].startTrackingSelection(this.context) + } + stopTrackingSelections() { + this.primaryCursor.stopTrackingSelection(this.context); + for (let e = 0, t = this.secondaryCursors.length; e < t; e++) this.secondaryCursors[ + e].stopTrackingSelection(this.context) + } + updateContext(e) { + this.context = e + } + ensureValidState() { + this.primaryCursor.ensureValidState(this.context); + for (let e = 0, t = this.secondaryCursors.length; e < t; e++) this.secondaryCursors[ + e].ensureValidState(this.context) + } + readSelectionFromMarkers() { + let e = []; + e[0] = this.primaryCursor.readSelectionFromMarkers(this.context); + for (let t = 0, i = this.secondaryCursors.length; t < i; t++) e[t + 1] = + this.secondaryCursors[t].readSelectionFromMarkers(this.context); + return e + } + getAll() { + let e = []; + e[0] = this.primaryCursor.asCursorState(); + for (let t = 0, i = this.secondaryCursors.length; t < i; t++) e[t + 1] = + this.secondaryCursors[t].asCursorState(); + return e + } + getViewPositions() { + let e = []; + e[0] = this.primaryCursor.viewState.position; + for (let t = 0, i = this.secondaryCursors.length; t < i; t++) e[t + 1] = + this.secondaryCursors[t].viewState.position; + return e + } + getTopMostViewPosition() { + let e = this.primaryCursor.viewState.position; + for (let t = 0, i = this.secondaryCursors.length; t < i; t++) { + const i = this.secondaryCursors[t].viewState.position; + i.isBefore(e) && (e = i) + } + return e + } + getBottomMostViewPosition() { + let e = this.primaryCursor.viewState.position; + for (let t = 0, i = this.secondaryCursors.length; t < i; t++) { + const i = this.secondaryCursors[t].viewState.position; + e.isBeforeOrEqual(i) && (e = i) + } + return e + } + getSelections() { + let e = []; + e[0] = this.primaryCursor.modelState.selection; + for (let t = 0, i = this.secondaryCursors.length; t < i; t++) e[t + 1] = + this.secondaryCursors[t].modelState.selection; + return e + } + getViewSelections() { + let e = []; + e[0] = this.primaryCursor.viewState.selection; + for (let t = 0, i = this.secondaryCursors.length; t < i; t++) e[t + 1] = + this.secondaryCursors[t].viewState.selection; + return e + } + setSelections(e) { + this.setStates(be.Vi.fromModelSelections(e)) + } + getPrimaryCursor() { + return this.primaryCursor.asCursorState() + } + setStates(e) { + null !== e && (this.primaryCursor.setState(this.context, e[0].modelState, + e[0].viewState), this._setSecondaryStates(e.slice(1))) + } + _setSecondaryStates(e) { + const t = this.secondaryCursors.length, + i = e.length; + if (t < i) { + let e = i - t; + for (let t = 0; t < e; t++) this._addSecondaryCursor() + } else if (t > i) { + let e = t - i; + for (let t = 0; t < e; t++) this._removeSecondaryCursor(this.secondaryCursors + .length - 1) + } + for (let t = 0; t < i; t++) this.secondaryCursors[t].setState(this.context, + e[t].modelState, e[t].viewState) + } + killSecondaryCursors() { + this._setSecondaryStates([]) + } + _addSecondaryCursor() { + this.secondaryCursors.push(new tn(this.context)), this.lastAddedCursorIndex = + this.secondaryCursors.length + } + getLastAddedCursorIndex() { + return 0 === this.secondaryCursors.length || 0 === this.lastAddedCursorIndex ? + 0 : this.lastAddedCursorIndex + } + _removeSecondaryCursor(e) { + this.lastAddedCursorIndex >= e + 1 && this.lastAddedCursorIndex--, + this.secondaryCursors[e].dispose(this.context), this.secondaryCursors + .splice(e, 1) + } + _getAll() { + let e = []; + e[0] = this.primaryCursor; + for (let t = 0, i = this.secondaryCursors.length; t < i; t++) e[t + 1] = + this.secondaryCursors[t]; + return e + } + normalize() { + if (0 === this.secondaryCursors.length) return; + let e = this._getAll(), + t = []; + for (let i = 0, n = e.length; i < n; i++) t.push({ + index: i, + selection: e[i].modelState.selection + }); + t.sort(((e, t) => e.selection.startLineNumber === t.selection.startLineNumber ? + e.selection.startColumn - t.selection.startColumn : e.selection.startLineNumber - + t.selection.startLineNumber)); + for (let i = 0; i < t.length - 1; i++) { + const n = t[i], + o = t[i + 1], + r = n.selection, + s = o.selection; + if (!this.context.cursorConfig.multiCursorMergeOverlapping) continue; + let a; + if (a = s.isEmpty() || r.isEmpty() ? s.getStartPosition().isBeforeOrEqual( + r.getEndPosition()) : s.getStartPosition().isBefore(r.getEndPosition()), + a) { + const r = n.index < o.index ? i : i + 1, + s = n.index < o.index ? i + 1 : i, + a = t[s].index, + l = t[r].index, + d = t[s].selection, + c = t[r].selection; + if (!d.equalsSelection(c)) { + const i = d.plusRange(c), + n = d.selectionStartLineNumber === d.startLineNumber && d.selectionStartColumn === + d.startColumn, + o = c.selectionStartLineNumber === c.startLineNumber && c.selectionStartColumn === + c.startColumn; + let s, h; + a === this.lastAddedCursorIndex ? (s = n, this.lastAddedCursorIndex = + l) : s = o, h = s ? new T.Y(i.startLineNumber, i.startColumn, i.endLineNumber, + i.endColumn) : new T.Y(i.endLineNumber, i.endColumn, i.startLineNumber, + i.startColumn), t[r].selection = h; + const u = be.Vi.fromModelSelection(h); + e[l].setState(this.context, u.modelState, u.viewState) + } + for (const e of t) e.index > a && e.index--; + e.splice(a, 1), t.splice(s, 1), this._removeSecondaryCursor(a - 1), + i-- + } + } + } + } + var on = i(1380), + rn = i(3582), + sn = i(3256); + class an { + constructor() { + this.type = 0 + } + } + class ln { + constructor() { + this.type = 1 + } + } + class dn { + constructor(e) { + this.type = 2, this._source = e + } + hasChanged(e) { + return this._source.hasChanged(e) + } + } + class cn { + constructor(e, t) { + this.type = 3, this.selections = e, this.modelSelections = t + } + } + class hn { + constructor(e) { + this.type = 4, e ? (this.affectsMinimap = e.affectsMinimap, this.affectsOverviewRuler = + e.affectsOverviewRuler) : (this.affectsMinimap = !0, this.affectsOverviewRuler = ! + 0) + } + } + class un { + constructor() { + this.type = 5 + } + } + class gn { + constructor(e) { + this.type = 6, this.isFocused = e + } + } + class pn { + constructor() { + this.type = 7 + } + } + class mn { + constructor() { + this.type = 8 + } + } + class fn { + constructor(e, t) { + this.type = 9, this.fromLineNumber = e, this.toLineNumber = t + } + } + class _n { + constructor(e, t) { + this.type = 10, this.fromLineNumber = e, this.toLineNumber = t + } + } + class bn { + constructor(e, t) { + this.type = 11, this.fromLineNumber = e, this.toLineNumber = t + } + } + class vn { + constructor(e, t, i, n, o, r) { + this.type = 12, this.source = e, this.range = t, this.selections = i, + this.verticalType = n, this.revealHorizontal = o, this.scrollType = r + } + } + class wn { + constructor(e) { + this.type = 13, this.scrollWidth = e.scrollWidth, this.scrollLeft = e.scrollLeft, + this.scrollHeight = e.scrollHeight, this.scrollTop = e.scrollTop, + this.scrollWidthChanged = e.scrollWidthChanged, this.scrollLeftChanged = + e.scrollLeftChanged, this.scrollHeightChanged = e.scrollHeightChanged, + this.scrollTopChanged = e.scrollTopChanged + } + } + class Cn { + constructor() { + this.type = 14 + } + } + class yn { + constructor(e) { + this.type = 15, this.ranges = e + } + } + class Sn { + constructor() { + this.type = 16 + } + } + class xn { + constructor() { + this.type = 17 + } + } + class kn extends L.JT { + constructor() { + super(), this._onEvent = this._register(new k.Q5), this.onEvent = + this._onEvent.event, this._eventHandlers = [], this._viewEventQueue = + null, this._isConsumingViewEventQueue = !1, this._collector = null, + this._collectorCnt = 0, this._outgoingEvents = [] + } + emitOutgoingEvent(e) { + this._addOutgoingEvent(e), this._emitOutgoingEvents() + } + _addOutgoingEvent(e) { + for (let t = 0, i = this._outgoingEvents.length; t < i; t++) + if (this._outgoingEvents[t].kind === e.kind) return void(this._outgoingEvents[ + t] = this._outgoingEvents[t].merge(e)); + this._outgoingEvents.push(e) + } + _emitOutgoingEvents() { + for (; this._outgoingEvents.length > 0;) { + if (this._collector || this._isConsumingViewEventQueue) return; + const e = this._outgoingEvents.shift(); + e.isNoOp() || this._onEvent.fire(e) + } + } + addViewEventHandler(e) { + for (let t = 0, i = this._eventHandlers.length; t < i; t++) this._eventHandlers[ + t] === e && console.warn( + "Detected duplicate listener in ViewEventDispatcher", e); + this._eventHandlers.push(e) + } + removeViewEventHandler(e) { + for (let t = 0; t < this._eventHandlers.length; t++) + if (this._eventHandlers[t] === e) { + this._eventHandlers.splice(t, 1); + break + } + } + beginEmitViewEvents() { + return this._collectorCnt++, 1 === this._collectorCnt && (this._collector = + new Ln), this._collector + } + endEmitViewEvents() { + if (this._collectorCnt--, 0 === this._collectorCnt) { + const e = this._collector.outgoingEvents, + t = this._collector.viewEvents; + this._collector = null; + for (const t of e) this._addOutgoingEvent(t); + t.length > 0 && this._emitMany(t) + } + this._emitOutgoingEvents() + } + emitSingleViewEvent(e) { + try { + this.beginEmitViewEvents().emitViewEvent(e) + } finally { + this.endEmitViewEvents() + } + } + _emitMany(e) { + this._viewEventQueue ? this._viewEventQueue = this._viewEventQueue.concat( + e) : this._viewEventQueue = e, this._isConsumingViewEventQueue || + this._consumeViewEventQueue() + } + _consumeViewEventQueue() { + try { + this._isConsumingViewEventQueue = !0, this._doConsumeQueue() + } finally { + this._isConsumingViewEventQueue = !1 + } + } + _doConsumeQueue() { + for (; this._viewEventQueue;) { + const e = this._viewEventQueue; + this._viewEventQueue = null; + const t = this._eventHandlers.slice(0); + for (const i of t) i.handleEvents(e) + } + } + } + class Ln { + constructor() { + this.viewEvents = [], this.outgoingEvents = [] + } + emitViewEvent(e) { + this.viewEvents.push(e) + } + emitOutgoingEvent(e) { + this.outgoingEvents.push(e) + } + } + class Nn { + constructor(e, t, i, n) { + this.kind = 0, this._oldContentWidth = e, this._oldContentHeight = t, + this.contentWidth = i, this.contentHeight = n, this.contentWidthChanged = + this._oldContentWidth !== this.contentWidth, this.contentHeightChanged = + this._oldContentHeight !== this.contentHeight + } + isNoOp() { + return !this.contentWidthChanged && !this.contentHeightChanged + } + merge(e) { + return 0 !== e.kind ? this : new Nn(this._oldContentWidth, this._oldContentHeight, + e.contentWidth, e.contentHeight) + } + } + class Dn { + constructor(e, t) { + this.kind = 1, this.oldHasFocus = e, this.hasFocus = t + } + isNoOp() { + return this.oldHasFocus === this.hasFocus + } + merge(e) { + return 1 !== e.kind ? this : new Dn(this.oldHasFocus, e.hasFocus) + } + } + class En { + constructor(e, t, i, n, o, r, s, a) { + this.kind = 2, this._oldScrollWidth = e, this._oldScrollLeft = t, this + ._oldScrollHeight = i, this._oldScrollTop = n, this.scrollWidth = o, + this.scrollLeft = r, this.scrollHeight = s, this.scrollTop = a, this.scrollWidthChanged = + this._oldScrollWidth !== this.scrollWidth, this.scrollLeftChanged = + this._oldScrollLeft !== this.scrollLeft, this.scrollHeightChanged = + this._oldScrollHeight !== this.scrollHeight, this.scrollTopChanged = + this._oldScrollTop !== this.scrollTop + } + isNoOp() { + return !(this.scrollWidthChanged || this.scrollLeftChanged || this.scrollHeightChanged || + this.scrollTopChanged) + } + merge(e) { + return 2 !== e.kind ? this : new En(this._oldScrollWidth, this._oldScrollLeft, + this._oldScrollHeight, this._oldScrollTop, e.scrollWidth, e.scrollLeft, + e.scrollHeight, e.scrollTop) + } + } + class In { + constructor() { + this.kind = 3 + } + isNoOp() { + return !1 + } + merge(e) { + return this + } + } + class Tn { + constructor(e, t, i, n, o, r, s) { + this.kind = 5, this.oldSelections = e, this.selections = t, this.oldModelVersionId = + i, this.modelVersionId = n, this.source = o, this.reason = r, this.reachedMaxCursorCount = + s + } + static _selectionsAreEqual(e, t) { + if (!e && !t) return !0; + if (!e || !t) return !1; + const i = e.length; + if (i !== t.length) return !1; + for (let n = 0; n < i; n++) + if (!e[n].equalsSelection(t[n])) return !1; + return !0 + } + isNoOp() { + return Tn._selectionsAreEqual(this.oldSelections, this.selections) && + this.oldModelVersionId === this.modelVersionId + } + merge(e) { + return 5 !== e.kind ? this : new Tn(this.oldSelections, e.selections, + this.oldModelVersionId, e.modelVersionId, e.source, e.reason, this.reachedMaxCursorCount || + e.reachedMaxCursorCount) + } + } + class Mn { + constructor() { + this.kind = 4 + } + isNoOp() { + return !1 + } + merge(e) { + return this + } + } + class An { + constructor(e, t) { + this.modelVersionId = e.getVersionId(), this.cursorState = t.getCursorStates() + } + equals(e) { + if (!e) return !1; + if (this.modelVersionId !== e.modelVersionId) return !1; + if (this.cursorState.length !== e.cursorState.length) return !1; + for (let t = 0, i = this.cursorState.length; t < i; t++) + if (!this.cursorState[t].equals(e.cursorState[t])) return !1; + return !0 + } + } + class Rn { + constructor(e, t, i) { + this._model = e, this._autoClosedCharactersDecorations = t, this._autoClosedEnclosingDecorations = + i + } + static getAllAutoClosedCharacters(e) { + let t = []; + for (const i of e) t = t.concat(i.getAutoClosedCharactersRanges()); + return t + } + dispose() { + this._autoClosedCharactersDecorations = this._model.deltaDecorations( + this._autoClosedCharactersDecorations, []), this._autoClosedEnclosingDecorations = + this._model.deltaDecorations(this._autoClosedEnclosingDecorations, []) + } + getAutoClosedCharactersRanges() { + let e = []; + for (let t = 0; t < this._autoClosedCharactersDecorations.length; t++) { + const i = this._model.getDecorationRange(this._autoClosedCharactersDecorations[ + t]); + i && e.push(i) + } + return e + } + isValid(e) { + let t = []; + for (let e = 0; e < this._autoClosedEnclosingDecorations.length; e++) { + const i = this._model.getDecorationRange(this._autoClosedEnclosingDecorations[ + e]); + if (i && (t.push(i), i.startLineNumber !== i.endLineNumber)) return ! + 1 + } + t.sort(_e.e.compareRangesUsingStarts), e.sort(_e.e.compareRangesUsingStarts); + for (let i = 0; i < e.length; i++) { + if (i >= t.length) return !1; + if (!t[i].strictContainsRange(e[i])) return !1 + } + return !0 + } + } + class On extends L.JT { + constructor(e, t, i, n) { + super(), this._model = e, this._knownModelVersionId = this._model.getVersionId(), + this._viewModel = t, this._coordinatesConverter = i, this.context = + new be.zp(this._model, this._viewModel, this._coordinatesConverter, + n), this._cursors = new nn(this.context), this._hasFocus = !1, this + ._isHandling = !1, this._isDoingComposition = !1, this._selectionsWhenCompositionStarted = + null, this._columnSelectData = null, this._autoClosedActions = [], + this._prevEditOperationType = 0 + } + dispose() { + this._cursors.dispose(), this._autoClosedActions = (0, L.B9)(this._autoClosedActions), + super.dispose() + } + updateConfiguration(e) { + this.context = new be.zp(this._model, this._viewModel, this._coordinatesConverter, + e), this._cursors.updateContext(this.context) + } + onLineMappingChanged(e) { + this._knownModelVersionId === this._model.getVersionId() && this.setStates( + e, "viewModel", 0, this.getCursorStates()) + } + setHasFocus(e) { + this._hasFocus = e + } + _validateAutoClosedActions() { + if (this._autoClosedActions.length > 0) { + let e = this._cursors.getSelections(); + for (let t = 0; t < this._autoClosedActions.length; t++) { + const i = this._autoClosedActions[t]; + i.isValid(e) || (i.dispose(), this._autoClosedActions.splice(t, 1), + t--) + } + } + } + getPrimaryCursorState() { + return this._cursors.getPrimaryCursor() + } + getLastAddedCursorIndex() { + return this._cursors.getLastAddedCursorIndex() + } + getCursorStates() { + return this._cursors.getAll() + } + setStates(e, t, i, n) { + let o = !1; + null !== n && n.length > On.MAX_CURSOR_COUNT && (n = n.slice(0, On.MAX_CURSOR_COUNT), + o = !0); + const r = new An(this._model, this); + return this._cursors.setStates(n), this._cursors.normalize(), this._columnSelectData = + null, this._validateAutoClosedActions(), this._emitStateChangedIfNecessary( + e, t, i, r, o) + } + setCursorColumnSelectData(e) { + this._columnSelectData = e + } + revealPrimary(e, t, i, n) { + const o = this._cursors.getViewPositions(); + if (o.length > 1) this._emitCursorRevealRange(e, t, null, this._cursors + .getViewSelections(), 0, i, n); + else { + const r = o[0], + s = new _e.e(r.lineNumber, r.column, r.lineNumber, r.column); + this._emitCursorRevealRange(e, t, s, null, 0, i, n) + } + } + _revealPrimaryCursor(e, t, i, n, o) { + const r = this._cursors.getViewPositions(); + if (r.length > 1) this._emitCursorRevealRange(e, t, null, this._cursors + .getViewSelections(), i, n, o); + else { + const s = r[0], + a = new _e.e(s.lineNumber, s.column, s.lineNumber, s.column); + this._emitCursorRevealRange(e, t, a, null, i, n, o) + } + } + _emitCursorRevealRange(e, t, i, n, o, r, s) { + e.emitViewEvent(new vn(t, i, n, o, r, s)) + } + saveState() { + let e = []; + const t = this._cursors.getSelections(); + for (let i = 0, n = t.length; i < n; i++) { + const n = t[i]; + e.push({ + inSelectionMode: !n.isEmpty(), + selectionStart: { + lineNumber: n.selectionStartLineNumber, + column: n.selectionStartColumn + }, + position: { + lineNumber: n.positionLineNumber, + column: n.positionColumn + } + }) + } + return e + } + restoreState(e, t) { + let i = []; + for (let e = 0, n = t.length; e < n; e++) { + const n = t[e]; + let o = 1, + r = 1; + n.position && n.position.lineNumber && (o = n.position.lineNumber), + n.position && n.position.column && (r = n.position.column); + let s = o, + a = r; + n.selectionStart && n.selectionStart.lineNumber && (s = n.selectionStart + .lineNumber), n.selectionStart && n.selectionStart.column && (a = + n.selectionStart.column), i.push({ + selectionStartLineNumber: s, + selectionStartColumn: a, + positionLineNumber: o, + positionColumn: r + }) + } + this.setStates(e, "restoreState", 0, be.Vi.fromModelSelections(i)), + this.revealPrimary(e, "restoreState", !0, 1) + } + onModelContentChanged(e, t) { + if (t instanceof sn.D8) { + if (this._isHandling) return; + this._isHandling = !0; + try { + this.setStates(e, "modelChange", 0, this.getCursorStates()) + } finally { + this._isHandling = !1 + } + } else { + if (this._knownModelVersionId = t.versionId, this._isHandling) return + ; + const i = t.containsEvent(1); + if (this._prevEditOperationType = 0, i) this._cursors.dispose(), + this._cursors = new nn(this.context), this._validateAutoClosedActions(), + this._emitStateChangedIfNecessary(e, "model", 1, null, !1); + else if (this._hasFocus && t.resultingSelection && t.resultingSelection + .length > 0) { + const i = be.Vi.fromModelSelections(t.resultingSelection); + this.setStates(e, "modelChange", t.isUndoing ? 5 : t.isRedoing ? 6 : + 2, i) && this._revealPrimaryCursor(e, "modelChange", 0, !0, 0) + } else { + const t = this._cursors.readSelectionFromMarkers(); + this.setStates(e, "modelChange", 2, be.Vi.fromModelSelections(t)) + } + } + } + getSelection() { + return this._cursors.getPrimaryCursor().modelState.selection + } + getTopMostViewPosition() { + return this._cursors.getTopMostViewPosition() + } + getBottomMostViewPosition() { + return this._cursors.getBottomMostViewPosition() + } + getCursorColumnSelectData() { + if (this._columnSelectData) return this._columnSelectData; + const e = this._cursors.getPrimaryCursor(), + t = e.viewState.selectionStart.getStartPosition(), + i = e.viewState.position; + return { + isReal: !1, + fromViewLineNumber: t.lineNumber, + fromViewVisualColumn: be.io.visibleColumnFromColumn2(this.context.cursorConfig, + this._viewModel, t), + toViewLineNumber: i.lineNumber, + toViewVisualColumn: be.io.visibleColumnFromColumn2(this.context.cursorConfig, + this._viewModel, i) + } + } + getSelections() { + return this._cursors.getSelections() + } + setSelections(e, t, i, n) { + this.setStates(e, t, n, be.Vi.fromModelSelections(i)) + } + getPrevEditOperationType() { + return this._prevEditOperationType + } + setPrevEditOperationType(e) { + this._prevEditOperationType = e + } + _pushAutoClosedAction(e, t) { + let i = [], + n = []; + for (let o = 0, r = e.length; o < r; o++) i.push({ + range: e[o], + options: { + description: "auto-closed-character", + inlineClassName: "auto-closed-character", + stickiness: 1 + } + }), n.push({ + range: t[o], + options: { + description: "auto-closed-enclosing", + stickiness: 1 + } + }); + const o = this._model.deltaDecorations([], i), + r = this._model.deltaDecorations([], n); + this._autoClosedActions.push(new Rn(this._model, o, r)) + } + _executeEditOperation(e) { + if (!e) return; + e.shouldPushStackElementBefore && this._model.pushStackElement(); + const t = class { + static executeCommands(e, t, i) { + const n = { + model: e, + selectionsBefore: t, + trackedRanges: [], + trackedRangesDirection: [] + }, + o = this._innerExecuteCommands(n, i); + for (let e = 0, t = n.trackedRanges.length; e < t; e++) n.model._setTrackedRange( + n.trackedRanges[e], null, 0); + return o + } + static _innerExecuteCommands(e, t) { + if (this._arrayIsEmpty(t)) return null; + const i = this._getEditOperations(e, t); + if (0 === i.operations.length) return null; + const n = i.operations, + o = this._getLoserCursorMap(n); + if (o.hasOwnProperty("0")) return console.warn( + "Ignoring commands"), null; + let r = []; + for (let e = 0, t = n.length; e < t; e++) o.hasOwnProperty(n[e].identifier + .major.toString()) || r.push(n[e]); + i.hadTrackedEditOperation && r.length > 0 && (r[0]._isTracked = ! + 0); + let s = e.model.pushEditOperations(e.selectionsBefore, r, (i => { + let n = []; + for (let t = 0; t < e.selectionsBefore.length; t++) n[t] = []; + for (const e of i) e.identifier && n[e.identifier.major].push( + e); + const o = (e, t) => e.identifier.minor - t.identifier.minor; + let r = []; + for (let i = 0; i < e.selectionsBefore.length; i++) n[i].length > + 0 ? (n[i].sort(o), r[i] = t[i].computeCursorState(e.model, { + getInverseEditOperations: () => n[i], + getTrackedSelection: t => { + const i = parseInt(t, 10), + n = e.model._getTrackedRange(e.trackedRanges[i]); + return 0 === e.trackedRangesDirection[i] ? new T.Y(n.startLineNumber, + n.startColumn, n.endLineNumber, n.endColumn) : new T.Y( + n.endLineNumber, n.endColumn, n.startLineNumber, n.startColumn + ) + } + })) : r[i] = e.selectionsBefore[i]; + return r + })); + s || (s = e.selectionsBefore); + let a = []; + for (let e in o) o.hasOwnProperty(e) && a.push(parseInt(e, 10)); + a.sort(((e, t) => t - e)); + for (const e of a) s.splice(e, 1); + return s + } + static _arrayIsEmpty(e) { + for (let t = 0, i = e.length; t < i; t++) + if (e[t]) return !1; + return !0 + } + static _getEditOperations(e, t) { + let i = [], + n = !1; + for (let o = 0, r = t.length; o < r; o++) { + const r = t[o]; + if (r) { + const t = this._getEditOperationsFromCommand(e, o, r); + i = i.concat(t.operations), n = n || t.hadTrackedEditOperation + } + } + return { + operations: i, + hadTrackedEditOperation: n + } + } + static _getEditOperationsFromCommand(e, t, i) { + let n = [], + o = 0; + const r = (e, r, s = !1) => { + _e.e.isEmpty(e) && "" === r || n.push({ + identifier: { + major: t, + minor: o++ + }, + range: e, + text: r, + forceMoveMarkers: s, + isAutoWhitespaceEdit: i.insertsAutoWhitespace + }) + }; + let s = !1; + const a = { + addEditOperation: r, + addTrackedEditOperation: (e, t, i) => { + s = !0, r(e, t, i) + }, + trackSelection: (t, i) => { + const n = T.Y.liftSelection(t); + let o; + if (n.isEmpty()) + if ("boolean" == typeof i) o = i ? 2 : 3; + else { + const t = e.model.getLineMaxColumn(n.startLineNumber); + o = n.startColumn === t ? 2 : 3 + } else o = 1; + const r = e.trackedRanges.length, + s = e.model._setTrackedRange(null, n, o); + return e.trackedRanges[r] = s, e.trackedRangesDirection[r] = + n.getDirection(), r.toString() + } + }; + try { + i.getEditOperations(e.model, a) + } catch (e) { + return (0, x.dL)(e), { + operations: [], + hadTrackedEditOperation: !1 + } + } + return { + operations: n, + hadTrackedEditOperation: s + } + } + static _getLoserCursorMap(e) { + (e = e.slice(0)).sort(((e, t) => -_e.e.compareRangesUsingEnds(e.range, + t.range))); + let t = {}; + for (let i = 1; i < e.length; i++) { + const n = e[i - 1], + o = e[i]; + if (_e.e.getStartPosition(n.range).isBefore(_e.e.getEndPosition( + o.range))) { + let r; + r = n.identifier.major > o.identifier.major ? n.identifier.major : + o.identifier.major, t[r.toString()] = !0; + for (let t = 0; t < e.length; t++) e[t].identifier.major === r && + (e.splice(t, 1), t < i && i--, t--); + i > 0 && i-- + } + } + return t + } + }.executeCommands(this._model, this._cursors.getSelections(), e.commands); + if (t) { + this._interpretCommandResult(t); + let i = [], + n = []; + for (let t = 0; t < e.commands.length; t++) { + const o = e.commands[t]; + o instanceof rn.g && o.enclosingRange && o.closeCharacterRange && ( + i.push(o.closeCharacterRange), n.push(o.enclosingRange)) + } + i.length > 0 && this._pushAutoClosedAction(i, n), this._prevEditOperationType = + e.type + } + e.shouldPushStackElementAfter && this._model.pushStackElement() + } + _interpretCommandResult(e) { + e && 0 !== e.length || (e = this._cursors.readSelectionFromMarkers()), + this._columnSelectData = null, this._cursors.setSelections(e), this._cursors + .normalize() + } + _emitStateChangedIfNecessary(e, t, i, n, o) { + const r = new An(this._model, this); + if (r.equals(n)) return !1; + const s = this._cursors.getSelections(), + a = this._cursors.getViewSelections(); + if (e.emitViewEvent(new cn(a, s)), !n || n.cursorState.length !== r.cursorState + .length || r.cursorState.some(((e, t) => !e.modelState.equals(n.cursorState[ + t].modelState)))) { + const a = n ? n.cursorState.map((e => e.modelState.selection)) : + null, + l = n ? n.modelVersionId : 0; + e.emitOutgoingEvent(new Tn(a, s, l, r.modelVersionId, t || + "keyboard", i, o)) + } + return !0 + } + _findAutoClosingPairs(e) { + if (!e.length) return null; + let t = []; + for (let i = 0, n = e.length; i < n; i++) { + const n = e[i]; + if (!n.text || n.text.indexOf("\n") >= 0) return null; + const o = n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/); + if (!o) return null; + const r = o[1], + s = this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar + .get(r); + if (!s || 1 !== s.length) return null; + const a = s[0].open, + l = n.text.length - o[2].length - 1, + d = n.text.lastIndexOf(a, l - 1); + if (-1 === d) return null; + t.push([d, l]) + } + return t + } + executeEdits(e, t, i, n) { + let o = null; + "snippet" === t && (o = this._findAutoClosingPairs(i)), o && (i[0]._isTracked = ! + 0); + let r = [], + s = []; + const a = this._model.pushEditOperations(this.getSelections(), i, (e => { + if (o) + for (let t = 0, i = o.length; t < i; t++) { + const [i, n] = o[t], a = e[t], l = a.range.startLineNumber, d = + a.range.startColumn - 1 + i, c = a.range.startColumn - 1 + n; + r.push(new _e.e(l, c + 1, l, c + 2)), s.push(new _e.e(l, d + 1, + l, c + 2)) + } + const t = n(e); + return t && (this._isHandling = !0), t + })); + a && (this._isHandling = !1, this.setSelections(e, t, a, 0)), r.length > + 0 && this._pushAutoClosedAction(r, s) + } + _executeEdit(e, t, i, n = 0) { + if (this.context.cursorConfig.readOnly) return; + const o = new An(this._model, this); + this._cursors.stopTrackingSelections(), this._isHandling = !0; + try { + this._cursors.ensureValidState(), e() + } catch (e) { + (0, x.dL)(e) + } + this._isHandling = !1, this._cursors.startTrackingSelections(), this._validateAutoClosedActions(), + this._emitStateChangedIfNecessary(t, i, n, o, !1) && this._revealPrimaryCursor( + t, i, 0, !0, 0) + } + setIsDoingComposition(e) { + this._isDoingComposition = e + } + getAutoClosedCharacters() { + return Rn.getAllAutoClosedCharacters(this._autoClosedActions) + } + startComposition(e) { + this._selectionsWhenCompositionStarted = this.getSelections().slice(0) + } + endComposition(e, t) { + this._executeEdit((() => { + "keyboard" === t && (this._executeEditOperation(rn.u.compositionEndWithInterceptors( + this._prevEditOperationType, this.context.cursorConfig, this._model, + this._selectionsWhenCompositionStarted, this.getSelections(), + this.getAutoClosedCharacters())), this._selectionsWhenCompositionStarted = + null) + }), e, t) + } + type(e, t, i) { + this._executeEdit((() => { + if ("keyboard" === i) { + const e = t.length; + let i = 0; + for (; i < e;) { + const e = Ue.vH(t, i), + n = t.substr(i, e); + this._executeEditOperation(rn.u.typeWithInterceptors(this._isDoingComposition, + this._prevEditOperationType, this.context.cursorConfig, this + ._model, this.getSelections(), this.getAutoClosedCharacters(), + n)), i += e + } + } else this._executeEditOperation(rn.u.typeWithoutInterceptors( + this._prevEditOperationType, this.context.cursorConfig, this._model, + this.getSelections(), t)) + }), e, i) + } + compositionType(e, t, i, n, o, r) { + if (0 !== t.length || 0 !== i || 0 !== n) this._executeEdit((() => { + this._executeEditOperation(rn.u.compositionType(this._prevEditOperationType, + this.context.cursorConfig, this._model, this.getSelections(), + t, i, n, o)) + }), e, r); + else if (0 !== o) { + const t = this.getSelections().map((e => { + const t = e.getPosition(); + return new T.Y(t.lineNumber, t.column + o, t.lineNumber, t.column + + o) + })); + this.setSelections(e, r, t, 0) + } + } + paste(e, t, i, n, o) { + this._executeEdit((() => { + this._executeEditOperation(rn.u.paste(this.context.cursorConfig, + this._model, this.getSelections(), t, i, n || [])) + }), e, o, 4) + } + cut(e, t) { + this._executeEdit((() => { + this._executeEditOperation(on.A.cut(this.context.cursorConfig, + this._model, this.getSelections())) + }), e, t) + } + executeCommand(e, t, i) { + this._executeEdit((() => { + this._cursors.killSecondaryCursors(), this._executeEditOperation( + new be.Tp(0, [t], { + shouldPushStackElementBefore: !1, + shouldPushStackElementAfter: !1 + })) + }), e, i) + } + executeCommands(e, t, i) { + this._executeEdit((() => { + this._executeEditOperation(new be.Tp(0, t, { + shouldPushStackElementBefore: !1, + shouldPushStackElementAfter: !1 + })) + }), e, i) + } + } + On.MAX_CURSOR_COUNT = 1e4; + var Pn = i(653), + Fn = i(6518), + Bn = i(9102), + Wn = i(5713), + zn = i(6633); + class Vn { + constructor() { + this._hasPending = !1, this._inserts = [], this._changes = [], this._removes = [] + } + insert(e) { + this._hasPending = !0, this._inserts.push(e) + } + change(e) { + this._hasPending = !0, this._changes.push(e) + } + remove(e) { + this._hasPending = !0, this._removes.push(e) + } + mustCommit() { + return this._hasPending + } + commit(e) { + if (!this._hasPending) return; + const t = this._inserts, + i = this._changes, + n = this._removes; + this._hasPending = !1, this._inserts = [], this._changes = [], this._removes = [], + e._commitPendingChanges(t, i, n) + } + } + class Hn { + constructor(e, t, i, n, o) { + this.id = e, this.afterLineNumber = t, this.ordinal = i, this.height = + n, this.minWidth = o, this.prefixSum = 0 + } + } + class Un { + constructor(e, t, i, n) { + this._instanceId = Ue.PJ(++Un.INSTANCE_COUNT), this._pendingChanges = + new Vn, this._lastWhitespaceId = 0, this._arr = [], this._prefixSumValidIndex = - + 1, this._minWidth = -1, this._lineCount = e, this._lineHeight = t, + this._paddingTop = i, this._paddingBottom = n + } + static findInsertionIndex(e, t, i) { + let n = 0, + o = e.length; + for (; n < o;) { + const r = n + o >>> 1; + t === e[r].afterLineNumber ? i < e[r].ordinal ? o = r : n = r + 1 : t < + e[r].afterLineNumber ? o = r : n = r + 1 + } + return n + } + setLineHeight(e) { + this._checkPendingChanges(), this._lineHeight = e + } + setPadding(e, t) { + this._paddingTop = e, this._paddingBottom = t + } + onFlushed(e) { + this._checkPendingChanges(), this._lineCount = e + } + changeWhitespace(e) { + let t = !1; + try { + e({ + insertWhitespace: (e, i, n, o) => { + t = !0, e |= 0, i |= 0, n |= 0, o |= 0; + const r = this._instanceId + ++this._lastWhitespaceId; + return this._pendingChanges.insert(new Hn(r, e, i, n, o)), r + }, + changeOneWhitespace: (e, i, n) => { + t = !0, i |= 0, n |= 0, this._pendingChanges.change({ + id: e, + newAfterLineNumber: i, + newHeight: n + }) + }, + removeWhitespace: e => { + t = !0, this._pendingChanges.remove({ + id: e + }) + } + }) + } finally { + this._pendingChanges.commit(this) + } + return t + } + _commitPendingChanges(e, t, i) { + if ((e.length > 0 || i.length > 0) && (this._minWidth = -1), e.length + + t.length + i.length <= 1) { + for (const t of e) this._insertWhitespace(t); + for (const e of t) this._changeOneWhitespace(e.id, e.newAfterLineNumber, + e.newHeight); + for (const e of i) { + const t = this._findWhitespaceIndex(e.id); - 1 !== t && this._removeWhitespace( + t) + } + return + } + const n = new Set; + for (const e of i) n.add(e.id); + const o = new Map; + for (const e of t) o.set(e.id, e); + const r = e => { + let t = []; + for (const i of e) + if (!n.has(i.id)) { + if (o.has(i.id)) { + const e = o.get(i.id); + i.afterLineNumber = e.newAfterLineNumber, i.height = e.newHeight + } + t.push(i) + } + return t + }, + s = r(this._arr).concat(r(e)); + s.sort(((e, t) => e.afterLineNumber === t.afterLineNumber ? e.ordinal - + t.ordinal : e.afterLineNumber - t.afterLineNumber)), this._arr = s, + this._prefixSumValidIndex = -1 + } + _checkPendingChanges() { + this._pendingChanges.mustCommit() && this._pendingChanges.commit(this) + } + _insertWhitespace(e) { + const t = Un.findInsertionIndex(this._arr, e.afterLineNumber, e.ordinal); + this._arr.splice(t, 0, e), this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, + t - 1) + } + _findWhitespaceIndex(e) { + const t = this._arr; + for (let i = 0, n = t.length; i < n; i++) + if (t[i].id === e) return i; + return -1 + } + _changeOneWhitespace(e, t, i) { + const n = this._findWhitespaceIndex(e); + if (-1 !== n && (this._arr[n].height !== i && (this._arr[n].height = i, + this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, n - + 1)), this._arr[n].afterLineNumber !== t)) { + const e = this._arr[n]; + this._removeWhitespace(n), e.afterLineNumber = t, this._insertWhitespace( + e) + } + } + _removeWhitespace(e) { + this._arr.splice(e, 1), this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, + e - 1) + } + onLinesDeleted(e, t) { + this._checkPendingChanges(), e |= 0, t |= 0, this._lineCount -= t - e + + 1; + for (let i = 0, n = this._arr.length; i < n; i++) { + const n = this._arr[i].afterLineNumber; + e <= n && n <= t ? this._arr[i].afterLineNumber = e - 1 : n > t && ( + this._arr[i].afterLineNumber -= t - e + 1) + } + } + onLinesInserted(e, t) { + this._checkPendingChanges(), e |= 0, t |= 0, this._lineCount += t - e + + 1; + for (let i = 0, n = this._arr.length; i < n; i++) e <= this._arr[i].afterLineNumber && + (this._arr[i].afterLineNumber += t - e + 1) + } + getWhitespacesTotalHeight() { + return this._checkPendingChanges(), 0 === this._arr.length ? 0 : this.getWhitespacesAccumulatedHeight( + this._arr.length - 1) + } + getWhitespacesAccumulatedHeight(e) { + this._checkPendingChanges(), e |= 0; + let t = Math.max(0, this._prefixSumValidIndex + 1); + 0 === t && (this._arr[0].prefixSum = this._arr[0].height, t++); + for (let i = t; i <= e; i++) this._arr[i].prefixSum = this._arr[i - 1] + .prefixSum + this._arr[i].height; + return this._prefixSumValidIndex = Math.max(this._prefixSumValidIndex, + e), this._arr[e].prefixSum + } + getLinesTotalHeight() { + return this._checkPendingChanges(), this._lineHeight * this._lineCount + + this.getWhitespacesTotalHeight() + this._paddingTop + this._paddingBottom + } + getWhitespaceAccumulatedHeightBeforeLineNumber(e) { + this._checkPendingChanges(), e |= 0; + const t = this._findLastWhitespaceBeforeLineNumber(e); + return -1 === t ? 0 : this.getWhitespacesAccumulatedHeight(t) + } + _findLastWhitespaceBeforeLineNumber(e) { + e |= 0; + const t = this._arr; + let i = 0, + n = t.length - 1; + for (; i <= n;) { + const o = i + ((n - i | 0) / 2 | 0) | 0; + if (t[o].afterLineNumber < e) { + if (o + 1 >= t.length || t[o + 1].afterLineNumber >= e) return o; + i = o + 1 | 0 + } else n = o - 1 | 0 + } + return -1 + } + _findFirstWhitespaceAfterLineNumber(e) { + e |= 0; + const t = this._findLastWhitespaceBeforeLineNumber(e) + 1; + return t < this._arr.length ? t : -1 + } + getFirstWhitespaceIndexAfterLineNumber(e) { + return this._checkPendingChanges(), e |= 0, this._findFirstWhitespaceAfterLineNumber( + e) + } + getVerticalOffsetForLineNumber(e) { + let t; + return this._checkPendingChanges(), t = (e |= 0) > 1 ? this._lineHeight * + (e - 1) : 0, t + this.getWhitespaceAccumulatedHeightBeforeLineNumber( + e) + this._paddingTop + } + getWhitespaceMinWidth() { + if (this._checkPendingChanges(), -1 === this._minWidth) { + let e = 0; + for (let t = 0, i = this._arr.length; t < i; t++) e = Math.max(e, + this._arr[t].minWidth); + this._minWidth = e + } + return this._minWidth + } + isAfterLines(e) { + return this._checkPendingChanges(), e > this.getLinesTotalHeight() + } + isInTopPadding(e) { + return 0 !== this._paddingTop && (this._checkPendingChanges(), e < + this._paddingTop) + } + isInBottomPadding(e) { + return 0 !== this._paddingBottom && (this._checkPendingChanges(), e >= + this.getLinesTotalHeight() - this._paddingBottom) + } + getLineNumberAtOrAfterVerticalOffset(e) { + if (this._checkPendingChanges(), (e |= 0) < 0) return 1; + const t = 0 | this._lineCount, + i = this._lineHeight; + let n = 1, + o = t; + for (; n < o;) { + const t = (n + o) / 2 | 0, + r = 0 | this.getVerticalOffsetForLineNumber(t); + if (e >= r + i) n = t + 1; + else { + if (e >= r) return t; + o = t + } + } + return n > t ? t : n + } + getLinesViewportData(e, t) { + this._checkPendingChanges(), e |= 0, t |= 0; + const i = this._lineHeight, + n = 0 | this.getLineNumberAtOrAfterVerticalOffset(e), + o = 0 | this.getVerticalOffsetForLineNumber(n); + let r = 0 | this._lineCount, + s = 0 | this.getFirstWhitespaceIndexAfterLineNumber(n); + const a = 0 | this.getWhitespacesCount(); + let l, d; - 1 === s ? (s = a, d = r + 1, l = 0) : (d = 0 | this.getAfterLineNumberForWhitespaceIndex( + s), l = 0 | this.getHeightForWhitespaceIndex(s)); + let c = o, + h = c; + const u = 5e5; + let g = 0; + o >= u && (g = Math.floor(o / u) * u, g = Math.floor(g / i) * i, h -= + g); + const p = [], + m = e + (t - e) / 2; + let f = -1; + for (let e = n; e <= r; e++) { + if (-1 === f) { + const t = c, + n = c + i; + (t <= m && m < n || t > m) && (f = e) + } + for (c += i, p[e - n] = h, h += i; d === e;) h += l, c += l, s++, s >= + a ? d = r + 1 : (d = 0 | this.getAfterLineNumberForWhitespaceIndex(s), + l = 0 | this.getHeightForWhitespaceIndex(s)); + if (c >= t) { + r = e; + break + } + } - 1 === f && (f = r); + const _ = 0 | this.getVerticalOffsetForLineNumber(r); + let b = n, + v = r; + return b < v && o < e && b++, b < v && _ + i > t && v--, { + bigNumbersDelta: g, + startLineNumber: n, + endLineNumber: r, + relativeVerticalOffset: p, + centeredLineNumber: f, + completelyVisibleStartLineNumber: b, + completelyVisibleEndLineNumber: v + } + } + getVerticalOffsetForWhitespaceIndex(e) { + this._checkPendingChanges(), e |= 0; + const t = this.getAfterLineNumberForWhitespaceIndex(e); + let i, n; + return i = t >= 1 ? this._lineHeight * t : 0, n = e > 0 ? this.getWhitespacesAccumulatedHeight( + e - 1) : 0, i + n + this._paddingTop + } + getWhitespaceIndexAtOrAfterVerticallOffset(e) { + this._checkPendingChanges(), e |= 0; + let t = 0, + i = this.getWhitespacesCount() - 1; + if (i < 0) return -1; + if (e >= this.getVerticalOffsetForWhitespaceIndex(i) + this.getHeightForWhitespaceIndex( + i)) return -1; + for (; t < i;) { + const n = Math.floor((t + i) / 2), + o = this.getVerticalOffsetForWhitespaceIndex(n); + if (e >= o + this.getHeightForWhitespaceIndex(n)) t = n + 1; + else { + if (e >= o) return n; + i = n + } + } + return t + } + getWhitespaceAtVerticalOffset(e) { + this._checkPendingChanges(), e |= 0; + const t = this.getWhitespaceIndexAtOrAfterVerticallOffset(e); + if (t < 0) return null; + if (t >= this.getWhitespacesCount()) return null; + const i = this.getVerticalOffsetForWhitespaceIndex(t); + if (i > e) return null; + const n = this.getHeightForWhitespaceIndex(t); + return { + id: this.getIdForWhitespaceIndex(t), + afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(t), + verticalOffset: i, + height: n + } + } + getWhitespaceViewportData(e, t) { + this._checkPendingChanges(), e |= 0, t |= 0; + const i = this.getWhitespaceIndexAtOrAfterVerticallOffset(e), + n = this.getWhitespacesCount() - 1; + if (i < 0) return []; + let o = []; + for (let e = i; e <= n; e++) { + const i = this.getVerticalOffsetForWhitespaceIndex(e), + n = this.getHeightForWhitespaceIndex(e); + if (i >= t) break; + o.push({ + id: this.getIdForWhitespaceIndex(e), + afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(e), + verticalOffset: i, + height: n + }) + } + return o + } + getWhitespaces() { + return this._checkPendingChanges(), this._arr.slice(0) + } + getWhitespacesCount() { + return this._checkPendingChanges(), this._arr.length + } + getIdForWhitespaceIndex(e) { + return this._checkPendingChanges(), e |= 0, this._arr[e].id + } + getAfterLineNumberForWhitespaceIndex(e) { + return this._checkPendingChanges(), e |= 0, this._arr[e].afterLineNumber + } + getHeightForWhitespaceIndex(e) { + return this._checkPendingChanges(), e |= 0, this._arr[e].height + } + } + Un.INSTANCE_COUNT = 0; + class jn { + constructor(e, t, i, n) { + (e |= 0) < 0 && (e = 0), (t |= 0) < 0 && (t = 0), (i |= 0) < 0 && (i = + 0), (n |= 0) < 0 && (n = 0), this.width = e, this.contentWidth = t, + this.scrollWidth = Math.max(e, t), this.height = i, this.contentHeight = + n, this.scrollHeight = Math.max(i, n) + } + equals(e) { + return this.width === e.width && this.contentWidth === e.contentWidth && + this.height === e.height && this.contentHeight === e.contentHeight + } + } + class Kn extends L.JT { + constructor(e, t) { + super(), this._onDidContentSizeChange = this._register(new k.Q5), + this.onDidContentSizeChange = this._onDidContentSizeChange.event, + this._dimensions = new jn(0, 0, 0, 0), this._scrollable = this._register( + new zn.Rm(e, t)), this.onDidScroll = this._scrollable.onScroll + } + getScrollable() { + return this._scrollable + } + setSmoothScrollDuration(e) { + this._scrollable.setSmoothScrollDuration(e) + } + validateScrollPosition(e) { + return this._scrollable.validateScrollPosition(e) + } + getScrollDimensions() { + return this._dimensions + } + setScrollDimensions(e) { + if (this._dimensions.equals(e)) return; + const t = this._dimensions; + this._dimensions = e, this._scrollable.setScrollDimensions({ + width: e.width, + scrollWidth: e.scrollWidth, + height: e.height, + scrollHeight: e.scrollHeight + }, !0); + const i = t.contentWidth !== e.contentWidth, + n = t.contentHeight !== e.contentHeight; + (i || n) && this._onDidContentSizeChange.fire(new Nn(t.contentWidth, + t.contentHeight, e.contentWidth, e.contentHeight)) + } + getFutureScrollPosition() { + return this._scrollable.getFutureScrollPosition() + } + getCurrentScrollPosition() { + return this._scrollable.getCurrentScrollPosition() + } + setScrollPositionNow(e) { + this._scrollable.setScrollPositionNow(e) + } + setScrollPositionSmooth(e) { + this._scrollable.setScrollPositionSmooth(e) + } + } + class $n extends L.JT { + constructor(e, t, i) { + super(), this._configuration = e; + const n = this._configuration.options, + o = n.get(130), + r = n.get(74); + this._linesLayout = new Un(t, n.get(58), r.top, r.bottom), this._scrollable = + this._register(new Kn(0, i)), this._configureSmoothScrollDuration(), + this._scrollable.setScrollDimensions(new jn(o.contentWidth, 0, o.height, + 0)), this.onDidScroll = this._scrollable.onDidScroll, this.onDidContentSizeChange = + this._scrollable.onDidContentSizeChange, this._updateHeight() + } + dispose() { + super.dispose() + } + getScrollable() { + return this._scrollable.getScrollable() + } + onHeightMaybeChanged() { + this._updateHeight() + } + _configureSmoothScrollDuration() { + this._scrollable.setSmoothScrollDuration(this._configuration.options.get( + 103) ? 125 : 0) + } + onConfigurationChanged(e) { + const t = this._configuration.options; + if (e.hasChanged(58) && this._linesLayout.setLineHeight(t.get(58)), e + .hasChanged(74)) { + const e = t.get(74); + this._linesLayout.setPadding(e.top, e.bottom) + } + if (e.hasChanged(130)) { + const e = t.get(130), + i = e.contentWidth, + n = e.height, + o = this._scrollable.getScrollDimensions(), + r = o.contentWidth; + this._scrollable.setScrollDimensions(new jn(i, o.contentWidth, n, + this._getContentHeight(i, n, r))) + } else this._updateHeight(); + e.hasChanged(103) && this._configureSmoothScrollDuration() + } + onFlushed(e) { + this._linesLayout.onFlushed(e) + } + onLinesDeleted(e, t) { + this._linesLayout.onLinesDeleted(e, t) + } + onLinesInserted(e, t) { + this._linesLayout.onLinesInserted(e, t) + } + _getHorizontalScrollbarHeight(e, t) { + const i = this._configuration.options.get(92); + return 2 === i.horizontal || e >= t ? 0 : i.horizontalScrollbarSize + } + _getContentHeight(e, t, i) { + const n = this._configuration.options; + let o = this._linesLayout.getLinesTotalHeight(); + return n.get(94) ? o += Math.max(0, t - n.get(58) - n.get(74).bottom) : + o += this._getHorizontalScrollbarHeight(e, i), o + } + _updateHeight() { + const e = this._scrollable.getScrollDimensions(), + t = e.width, + i = e.height, + n = e.contentWidth; + this._scrollable.setScrollDimensions(new jn(t, e.contentWidth, i, + this._getContentHeight(t, i, n))) + } + getCurrentViewport() { + const e = this._scrollable.getScrollDimensions(), + t = this._scrollable.getCurrentScrollPosition(); + return new ni.l_(t.scrollTop, t.scrollLeft, e.width, e.height) + } + getFutureViewport() { + const e = this._scrollable.getScrollDimensions(), + t = this._scrollable.getFutureScrollPosition(); + return new ni.l_(t.scrollTop, t.scrollLeft, e.width, e.height) + } + _computeContentWidth(e) { + const t = this._configuration.options, + i = t.get(131), + n = t.get(42); + if (i.isViewportWrapping) { + const i = t.get(130), + o = t.get(64); + return e > i.contentWidth + n.typicalHalfwidthCharacterWidth && o.enabled && + "right" === o.side ? e + i.verticalScrollbarWidth : e + } { + const i = t.get(93) * n.typicalHalfwidthCharacterWidth, + o = this._linesLayout.getWhitespaceMinWidth(); + return Math.max(e + i, o) + } + } + setMaxLineWidth(e) { + const t = this._scrollable.getScrollDimensions(); + this._scrollable.setScrollDimensions(new jn(t.width, this._computeContentWidth( + e), t.height, t.contentHeight)), this._updateHeight() + } + saveState() { + const e = this._scrollable.getFutureScrollPosition(); + let t = e.scrollTop, + i = this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t); + return { + scrollTop: t, + scrollTopWithoutViewZones: t - this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber( + i), + scrollLeft: e.scrollLeft + } + } + changeWhitespace(e) { + const t = this._linesLayout.changeWhitespace(e); + return t && this.onHeightMaybeChanged(), t + } + getVerticalOffsetForLineNumber(e) { + return this._linesLayout.getVerticalOffsetForLineNumber(e) + } + isAfterLines(e) { + return this._linesLayout.isAfterLines(e) + } + isInTopPadding(e) { + return this._linesLayout.isInTopPadding(e) + } + isInBottomPadding(e) { + return this._linesLayout.isInBottomPadding(e) + } + getLineNumberAtVerticalOffset(e) { + return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e) + } + getWhitespaceAtVerticalOffset(e) { + return this._linesLayout.getWhitespaceAtVerticalOffset(e) + } + getLinesViewportData() { + const e = this.getCurrentViewport(); + return this._linesLayout.getLinesViewportData(e.top, e.top + e.height) + } + getLinesViewportDataAtScrollTop(e) { + const t = this._scrollable.getScrollDimensions(); + return e + t.height > t.scrollHeight && (e = t.scrollHeight - t.height), + e < 0 && (e = 0), this._linesLayout.getLinesViewportData(e, e + t.height) + } + getWhitespaceViewportData() { + const e = this.getCurrentViewport(); + return this._linesLayout.getWhitespaceViewportData(e.top, e.top + e.height) + } + getWhitespaces() { + return this._linesLayout.getWhitespaces() + } + getContentWidth() { + return this._scrollable.getScrollDimensions().contentWidth + } + getScrollWidth() { + return this._scrollable.getScrollDimensions().scrollWidth + } + getContentHeight() { + return this._scrollable.getScrollDimensions().contentHeight + } + getScrollHeight() { + return this._scrollable.getScrollDimensions().scrollHeight + } + getCurrentScrollLeft() { + return this._scrollable.getCurrentScrollPosition().scrollLeft + } + getCurrentScrollTop() { + return this._scrollable.getCurrentScrollPosition().scrollTop + } + validateScrollPosition(e) { + return this._scrollable.validateScrollPosition(e) + } + setScrollPosition(e, t) { + 1 === t ? this._scrollable.setScrollPositionNow(e) : this._scrollable + .setScrollPositionSmooth(e) + } + deltaScrollNow(e, t) { + const i = this._scrollable.getCurrentScrollPosition(); + this._scrollable.setScrollPositionNow({ + scrollLeft: i.scrollLeft + e, + scrollTop: i.scrollTop + t + }) + } + } + var qn = i(8411), + Zn = i(6281), + Gn = i(3544); + class Yn { + constructor(e) { + this._lines = e + } + convertViewPositionToModelPosition(e) { + return this._lines.convertViewPositionToModelPosition(e.lineNumber, e.column) + } + convertViewRangeToModelRange(e) { + return this._lines.convertViewRangeToModelRange(e) + } + validateViewPosition(e, t) { + return this._lines.validateViewPosition(e.lineNumber, e.column, t) + } + validateViewRange(e, t) { + return this._lines.validateViewRange(e, t) + } + convertModelPositionToViewPosition(e, t) { + return this._lines.convertModelPositionToViewPosition(e.lineNumber, e.column, + t) + } + convertModelRangeToViewRange(e, t) { + return this._lines.convertModelRangeToViewRange(e, t) + } + modelPositionIsVisible(e) { + return this._lines.modelPositionIsVisible(e.lineNumber, e.column) + } + getModelLineViewLineCount(e) { + return this._lines.getModelLineViewLineCount(e) + } + } + class Qn { + constructor(e) { + this._counts = e, this._isValid = !1, this._validEndIndex = -1, this._modelToView = [], + this._viewToModel = [] + } + _invalidate(e) { + this._isValid = !1, this._validEndIndex = Math.min(this._validEndIndex, + e - 1) + } + _ensureValid() { + if (!this._isValid) { + for (let e = this._validEndIndex + 1, t = this._counts.length; e < t; e++) { + const t = this._counts[e], + i = e > 0 ? this._modelToView[e - 1] : 0; + this._modelToView[e] = i + t; + for (let n = 0; n < t; n++) this._viewToModel[i + n] = e + } + this._modelToView.length = this._counts.length, this._viewToModel.length = + this._modelToView[this._modelToView.length - 1], this._isValid = !0, + this._validEndIndex = this._counts.length - 1 + } + } + changeValue(e, t) { + this._counts[e] !== t && (this._counts[e] = t, this._invalidate(e)) + } + removeValues(e, t) { + this._counts.splice(e, t), this._invalidate(e) + } + insertValues(e, t) { + this._counts = yt.Zv(this._counts, e, t), this._invalidate(e) + } + getTotalValue() { + return this._ensureValid(), this._viewToModel.length + } + getAccumulatedValue(e) { + return this._ensureValid(), this._modelToView[e] + } + getIndexOf(e) { + this._ensureValid(); + const t = this._viewToModel[e], + i = t > 0 ? this._modelToView[t - 1] : 0; + return new Gn.T(t, e - i) + } + } + class Xn { + constructor(e, t, i, n, o, r, s, a, l) { + this._editorId = e, this.model = t, this._validModelVersionId = -1, + this._domLineBreaksComputerFactory = i, this._monospaceLineBreaksComputerFactory = + n, this.fontInfo = o, this.tabSize = r, this.wrappingStrategy = s, + this.wrappingColumn = a, this.wrappingIndent = l, this._constructLines(! + 0, null) + } + dispose() { + this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, []) + } + createCoordinatesConverter() { + return new Yn(this) + } + _constructLines(e, t) { + this.lines = [], e && (this.hiddenAreasIds = []); + const i = this.model.getLinesContent(), + n = this.model.getInjectedTextDecorations(this._editorId), + o = i.length, + r = this.createLineBreaksComputer(), + s = new yt.H9(sn.gk.fromDecorations(n)); + for (let e = 0; e < o; e++) { + const n = s.takeWhile((t => t.lineNumber === e + 1)); + r.addRequest(i[e], n, t ? t[e] : null) + } + const a = r.finalize(); + let l = [], + d = this.hiddenAreasIds.map((e => this.model.getDecorationRange(e))).sort( + _e.e.compareRangesUsingStarts), + c = 1, + h = 0, + u = -1, + g = u + 1 < d.length ? h + 1 : o + 2; + for (let e = 0; e < o; e++) { + let t = e + 1; + t === g && (u++, c = d[u].startLineNumber, h = d[u].endLineNumber, g = + u + 1 < d.length ? h + 1 : o + 2); + let i = t >= c && t <= h, + n = ro(a[e], !i); + l[e] = n.getViewLineCount(), this.lines[e] = n + } + this._validModelVersionId = this.model.getVersionId(), this.prefixSumComputer = + new Qn(l) + } + getHiddenAreas() { + return this.hiddenAreasIds.map((e => this.model.getDecorationRange(e))) + } + _reduceRanges(e) { + if (0 === e.length) return []; + let t = e.map((e => this.model.validateRange(e))).sort(_e.e.compareRangesUsingStarts), + i = [], + n = t[0].startLineNumber, + o = t[0].endLineNumber; + for (let e = 1, r = t.length; e < r; e++) { + let r = t[e]; + r.startLineNumber > o + 1 ? (i.push(new _e.e(n, 1, o, 1)), n = r.startLineNumber, + o = r.endLineNumber) : r.endLineNumber > o && (o = r.endLineNumber) + } + return i.push(new _e.e(n, 1, o, 1)), i + } + setHiddenAreas(e) { + let t = this._reduceRanges(e), + i = this.hiddenAreasIds.map((e => this.model.getDecorationRange(e))).sort( + _e.e.compareRangesUsingStarts); + if (t.length === i.length) { + let e = !1; + for (let n = 0; n < t.length; n++) + if (!t[n].equalsRange(i[n])) { + e = !0; + break + } + if (!e) return !1 + } + let n = []; + for (const e of t) n.push({ + range: e, + options: Zn.qx.EMPTY + }); + this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, + n); + let o = t, + r = 1, + s = 0, + a = -1, + l = a + 1 < o.length ? s + 1 : this.lines.length + 2, + d = !1; + for (let e = 0; e < this.lines.length; e++) { + let t = e + 1; + t === l && (a++, r = o[a].startLineNumber, s = o[a].endLineNumber, l = + a + 1 < o.length ? s + 1 : this.lines.length + 2); + let i = !1; + if (t >= r && t <= s ? this.lines[e].isVisible() && (this.lines[e] = + this.lines[e].setVisible(!1), i = !0) : (d = !0, this.lines[e].isVisible() || + (this.lines[e] = this.lines[e].setVisible(!0), i = !0)), i) { + let t = this.lines[e].getViewLineCount(); + this.prefixSumComputer.changeValue(e, t) + } + } + return d || this.setHiddenAreas([]), !0 + } + modelPositionIsVisible(e, t) { + return !(e < 1 || e > this.lines.length) && this.lines[e - 1].isVisible() + } + getModelLineViewLineCount(e) { + return e < 1 || e > this.lines.length ? 1 : this.lines[e - 1].getViewLineCount() + } + setTabSize(e) { + return this.tabSize !== e && (this.tabSize = e, this._constructLines(! + 1, null), !0) + } + setWrappingSettings(e, t, i, n) { + const o = this.fontInfo.equals(e), + r = this.wrappingStrategy === t, + s = this.wrappingColumn === i, + a = this.wrappingIndent === n; + if (o && r && s && a) return !1; + const l = o && r && !s && a; + this.fontInfo = e, this.wrappingStrategy = t, this.wrappingColumn = i, + this.wrappingIndent = n; + let d = null; + if (l) { + d = []; + for (let e = 0, t = this.lines.length; e < t; e++) d[e] = this.lines[ + e].getLineBreakData() + } + return this._constructLines(!1, d), !0 + } + createLineBreaksComputer() { + return ("advanced" === this.wrappingStrategy ? this._domLineBreaksComputerFactory : + this._monospaceLineBreaksComputerFactory).createLineBreaksComputer( + this.fontInfo, this.tabSize, this.wrappingColumn, this.wrappingIndent + ) + } + onModelFlushed() { + this._constructLines(!0, null) + } + onModelLinesDeleted(e, t, i) { + if (!e || e <= this._validModelVersionId) return null; + let n = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + + 1, + o = this.prefixSumComputer.getAccumulatedValue(i - 1); + return this.lines.splice(t - 1, i - t + 1), this.prefixSumComputer.removeValues( + t - 1, i - t + 1), new _n(n, o) + } + onModelLinesInserted(e, t, i, n) { + if (!e || e <= this._validModelVersionId) return null; + const o = t > 2 && !this.lines[t - 2].isVisible(); + let r = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + + 1, + s = 0, + a = [], + l = []; + for (let e = 0, t = n.length; e < t; e++) { + let t = ro(n[e], !o); + a.push(t); + let i = t.getViewLineCount(); + s += i, l[e] = i + } + return this.lines = this.lines.slice(0, t - 1).concat(a).concat(this.lines + .slice(t - 1)), this.prefixSumComputer.insertValues(t - 1, l), new bn( + r, r + s - 1) + } + onModelLineChanged(e, t, i) { + if (null !== e && e <= this._validModelVersionId) return [!1, null, + null, null + ]; + let n = t - 1, + o = this.lines[n].getViewLineCount(), + r = ro(i, this.lines[n].isVisible()); + this.lines[n] = r; + let s = this.lines[n].getViewLineCount(), + a = !1, + l = 0, + d = -1, + c = 0, + h = -1, + u = 0, + g = -1; + return o > s ? (l = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue( + t - 2) + 1, d = l + s - 1, u = d + 1, g = u + (o - s) - 1, a = !0) : + o < s ? (l = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue( + t - 2) + 1, d = l + o - 1, c = d + 1, h = c + (s - o) - 1, a = !0) : + (l = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + + 1, d = l + s - 1), this.prefixSumComputer.changeValue(n, s), [a, l <= + d ? new fn(l, d) : null, c <= h ? new bn(c, h) : null, u <= g ? new _n( + u, g) : null + ] + } + acceptVersionId(e) { + this._validModelVersionId = e, 1 !== this.lines.length || this.lines[0] + .isVisible() || this.setHiddenAreas([]) + } + getViewLineCount() { + return this.prefixSumComputer.getTotalValue() + } + _toValidViewLineNumber(e) { + if (e < 1) return 1; + const t = this.getViewLineCount(); + return e > t ? t : 0 | e + } + getActiveIndentGuide(e, t, i) { + e = this._toValidViewLineNumber(e), t = this._toValidViewLineNumber(t), + i = this._toValidViewLineNumber(i); + const n = this.convertViewPositionToModelPosition(e, this.getViewLineMinColumn( + e)), + o = this.convertViewPositionToModelPosition(t, this.getViewLineMinColumn( + t)), + r = this.convertViewPositionToModelPosition(i, this.getViewLineMinColumn( + i)), + s = this.model.getActiveIndentGuide(n.lineNumber, o.lineNumber, r.lineNumber), + a = this.convertModelPositionToViewPosition(s.startLineNumber, 1), + l = this.convertModelPositionToViewPosition(s.endLineNumber, this.model + .getLineMaxColumn(s.endLineNumber)); + return { + startLineNumber: a.lineNumber, + endLineNumber: l.lineNumber, + indent: s.indent + } + } + getViewLinesIndentGuides(e, t) { + e = this._toValidViewLineNumber(e), t = this._toValidViewLineNumber(t); + const i = this.convertViewPositionToModelPosition(e, this.getViewLineMinColumn( + e)), + n = this.convertViewPositionToModelPosition(t, this.getViewLineMaxColumn( + t)); + let o = [], + r = [], + s = []; + const a = i.lineNumber - 1, + l = n.lineNumber - 1; + let d = null; + for (let e = a; e <= l; e++) { + const t = this.lines[e]; + if (t.isVisible()) { + let n = t.getViewLineNumberOfModelPosition(0, e === a ? i.column : 1), + o = t.getViewLineNumberOfModelPosition(0, this.model.getLineMaxColumn( + e + 1)), + l = o - n + 1, + c = 0; + l > 1 && 1 === t.getViewLineMinColumn(this.model, e + 1, o) && (c = + 0 === n ? 1 : 2), r.push(l), s.push(c), null === d && (d = new fe.L( + e + 1, 0)) + } else null !== d && (o = o.concat(this.model.getLinesIndentGuides(d.lineNumber, + e)), d = null) + } + null !== d && (o = o.concat(this.model.getLinesIndentGuides(d.lineNumber, + n.lineNumber)), d = null); + const c = t - e + 1; + let h = new Array(c), + u = 0; + for (let e = 0, t = o.length; e < t; e++) { + let t, i = o[e], + n = Math.min(c - u, r[e]), + a = s[e]; + t = 2 === a ? 0 : 1 === a ? 1 : n; + for (let e = 0; e < n; e++) e === t && (i = 0), h[u++] = i + } + return h + } + getViewLineContent(e) { + e = this._toValidViewLineNumber(e); + let t = this.prefixSumComputer.getIndexOf(e - 1), + i = t.index, + n = t.remainder; + return this.lines[i].getViewLineContent(this.model, i + 1, n) + } + getViewLineLength(e) { + e = this._toValidViewLineNumber(e); + let t = this.prefixSumComputer.getIndexOf(e - 1), + i = t.index, + n = t.remainder; + return this.lines[i].getViewLineLength(this.model, i + 1, n) + } + getViewLineMinColumn(e) { + e = this._toValidViewLineNumber(e); + let t = this.prefixSumComputer.getIndexOf(e - 1), + i = t.index, + n = t.remainder; + return this.lines[i].getViewLineMinColumn(this.model, i + 1, n) + } + getViewLineMaxColumn(e) { + e = this._toValidViewLineNumber(e); + let t = this.prefixSumComputer.getIndexOf(e - 1), + i = t.index, + n = t.remainder; + return this.lines[i].getViewLineMaxColumn(this.model, i + 1, n) + } + getViewLineData(e) { + e = this._toValidViewLineNumber(e); + let t = this.prefixSumComputer.getIndexOf(e - 1), + i = t.index, + n = t.remainder; + return this.lines[i].getViewLineData(this.model, i + 1, n) + } + getViewLinesData(e, t, i) { + e = this._toValidViewLineNumber(e), t = this._toValidViewLineNumber(t); + let n = this.prefixSumComputer.getIndexOf(e - 1), + o = e, + r = n.index, + s = n.remainder, + a = []; + for (let n = r, l = this.model.getLineCount(); n < l; n++) { + let l = this.lines[n]; + if (!l.isVisible()) continue; + let d = n === r ? s : 0, + c = l.getViewLineCount() - d, + h = !1; + o + c > t && (h = !0, c = t - o + 1); + let u = d + c; + if (l.getViewLinesData(this.model, n + 1, d, u, o - e, i, a), o += c, + h) break + } + return a + } + validateViewPosition(e, t, i) { + e = this._toValidViewLineNumber(e); + let n = this.prefixSumComputer.getIndexOf(e - 1), + o = n.index, + r = n.remainder, + s = this.lines[o], + a = s.getViewLineMinColumn(this.model, o + 1, r), + l = s.getViewLineMaxColumn(this.model, o + 1, r); + t < a && (t = a), t > l && (t = l); + let d = s.getModelColumnOfViewPosition(r, t); + return this.model.validatePosition(new fe.L(o + 1, d)).equals(i) ? new fe + .L(e, t) : this.convertModelPositionToViewPosition(i.lineNumber, i.column) + } + validateViewRange(e, t) { + const i = this.validateViewPosition(e.startLineNumber, e.startColumn, + t.getStartPosition()), + n = this.validateViewPosition(e.endLineNumber, e.endColumn, t.getEndPosition()); + return new _e.e(i.lineNumber, i.column, n.lineNumber, n.column) + } + convertViewPositionToModelPosition(e, t) { + e = this._toValidViewLineNumber(e); + let i = this.prefixSumComputer.getIndexOf(e - 1), + n = i.index, + o = i.remainder, + r = this.lines[n].getModelColumnOfViewPosition(o, t); + return this.model.validatePosition(new fe.L(n + 1, r)) + } + convertViewRangeToModelRange(e) { + const t = this.convertViewPositionToModelPosition(e.startLineNumber, e + .startColumn), + i = this.convertViewPositionToModelPosition(e.endLineNumber, e.endColumn); + return new _e.e(t.lineNumber, t.column, i.lineNumber, i.column) + } + convertModelPositionToViewPosition(e, t, i = 2) { + const n = this.model.validatePosition(new fe.L(e, t)), + o = n.lineNumber, + r = n.column; + let s = o - 1, + a = !1; + for (; s > 0 && !this.lines[s].isVisible();) s--, a = !0; + if (0 === s && !this.lines[s].isVisible()) return new fe.L(1, 1); + const l = 1 + (0 === s ? 0 : this.prefixSumComputer.getAccumulatedValue( + s - 1)); + let d; + return d = a ? this.lines[s].getViewPositionOfModelPosition(l, this.model + .getLineMaxColumn(s + 1), i) : this.lines[o - 1].getViewPositionOfModelPosition( + l, r, i), d + } + convertModelRangeToViewRange(e, t = 0) { + if (e.isEmpty()) { + const i = this.convertModelPositionToViewPosition(e.startLineNumber, + e.startColumn, t); + return _e.e.fromPositions(i) + } { + const t = this.convertModelPositionToViewPosition(e.startLineNumber, + e.startColumn, 1), + i = this.convertModelPositionToViewPosition(e.endLineNumber, e.endColumn, + 0); + return new _e.e(t.lineNumber, t.column, i.lineNumber, i.column) + } + } + _getViewLineNumberForModelPosition(e, t) { + let i = e - 1; + if (this.lines[i].isVisible()) { + const e = 1 + (0 === i ? 0 : this.prefixSumComputer.getAccumulatedValue( + i - 1)); + return this.lines[i].getViewLineNumberOfModelPosition(e, t) + } + for (; i > 0 && !this.lines[i].isVisible();) i--; + if (0 === i && !this.lines[i].isVisible()) return 1; + const n = 1 + (0 === i ? 0 : this.prefixSumComputer.getAccumulatedValue( + i - 1)); + return this.lines[i].getViewLineNumberOfModelPosition(n, this.model.getLineMaxColumn( + i + 1)) + } + getAllOverviewRulerDecorations(e, t, i) { + const n = this.model.getOverviewRulerDecorations(e, t), + o = new lo; + for (const e of n) { + const t = e.options.overviewRuler, + n = t ? t.position : 0; + if (0 === n) continue; + const r = t.getColor(i), + s = this._getViewLineNumberForModelPosition(e.range.startLineNumber, + e.range.startColumn), + a = this._getViewLineNumberForModelPosition(e.range.endLineNumber, e + .range.endColumn); + o.accept(r, s, a, n) + } + return o.result + } + getDecorationsInRange(e, t, i) { + const n = this.convertViewPositionToModelPosition(e.startLineNumber, e + .startColumn), + o = this.convertViewPositionToModelPosition(e.endLineNumber, e.endColumn); + if (o.lineNumber - n.lineNumber <= e.endLineNumber - e.startLineNumber) + return this.model.getDecorationsInRange(new _e.e(n.lineNumber, 1, o.lineNumber, + o.column), t, i); + let r = []; + const s = n.lineNumber - 1, + a = o.lineNumber - 1; + let l = null; + for (let e = s; e <= a; e++) + if (this.lines[e].isVisible()) null === l && (l = new fe.L(e + 1, e === + s ? n.column : 1)); + else if (null !== l) { + const n = this.model.getLineMaxColumn(e); + r = r.concat(this.model.getDecorationsInRange(new _e.e(l.lineNumber, + l.column, e, n), t, i)), l = null + } + null !== l && (r = r.concat(this.model.getDecorationsInRange(new _e.e( + l.lineNumber, l.column, o.lineNumber, o.column), t, i)), l = null), + r.sort(((e, t) => { + const i = _e.e.compareRangesUsingStarts(e.range, t.range); + return 0 === i ? e.id < t.id ? -1 : e.id > t.id ? 1 : 0 : i + })); + let d = [], + c = 0, + h = null; + for (const e of r) { + const t = e.id; + h !== t && (h = t, d[c++] = e) + } + return d + } + getInjectedTextAt(e) { + const t = this._toValidViewLineNumber(e.lineNumber), + i = this.prefixSumComputer.getIndexOf(t - 1), + n = i.index, + o = i.remainder; + return this.lines[n].getInjectedTextAt(o, e.column) + } + normalizePosition(e, t) { + const i = this._toValidViewLineNumber(e.lineNumber), + n = this.prefixSumComputer.getIndexOf(i - 1), + o = n.index, + r = n.remainder; + return this.lines[o].normalizePosition(this.model, o + 1, r, e, t) + } + getLineIndentColumn(e) { + const t = this._toValidViewLineNumber(e), + i = this.prefixSumComputer.getIndexOf(t - 1), + n = i.index; + return 0 === i.remainder ? this.model.getLineIndentColumn(n + 1) : 0 + } + } + class Jn { + constructor() {} + isVisible() { + return !0 + } + setVisible(e) { + return e ? this : eo.INSTANCE + } + getLineBreakData() { + return null + } + getViewLineCount() { + return 1 + } + getViewLineContent(e, t, i) { + return e.getLineContent(t) + } + getViewLineLength(e, t, i) { + return e.getLineLength(t) + } + getViewLineMinColumn(e, t, i) { + return e.getLineMinColumn(t) + } + getViewLineMaxColumn(e, t, i) { + return e.getLineMaxColumn(t) + } + getViewLineData(e, t, i) { + let n = e.getLineTokens(t), + o = n.getLineContent(); + return new ni.IP(o, !1, 1, o.length + 1, 0, n.inflate(), null) + } + getViewLinesData(e, t, i, n, o, r, s) { + r[o] ? s[o] = this.getViewLineData(e, t, 0) : s[o] = null + } + getModelColumnOfViewPosition(e, t) { + return t + } + getViewPositionOfModelPosition(e, t) { + return new fe.L(e, t) + } + getViewLineNumberOfModelPosition(e, t) { + return e + } + normalizePosition(e, t, i, n, o) { + return n + } + getInjectedTextAt(e, t) { + return null + } + } + Jn.INSTANCE = new Jn; + class eo { + constructor() {} + isVisible() { + return !1 + } + setVisible(e) { + return e ? Jn.INSTANCE : this + } + getLineBreakData() { + return null + } + getViewLineCount() { + return 0 + } + getViewLineContent(e, t, i) { + throw new Error("Not supported") + } + getViewLineLength(e, t, i) { + throw new Error("Not supported") + } + getViewLineMinColumn(e, t, i) { + throw new Error("Not supported") + } + getViewLineMaxColumn(e, t, i) { + throw new Error("Not supported") + } + getViewLineData(e, t, i) { + throw new Error("Not supported") + } + getViewLinesData(e, t, i, n, o, r, s) { + throw new Error("Not supported") + } + getModelColumnOfViewPosition(e, t) { + throw new Error("Not supported") + } + getViewPositionOfModelPosition(e, t) { + throw new Error("Not supported") + } + getViewLineNumberOfModelPosition(e, t) { + throw new Error("Not supported") + } + normalizePosition(e, t, i, n, o) { + throw new Error("Not supported") + } + getInjectedTextAt(e, t) { + throw new Error("Not supported") + } + } + eo.INSTANCE = new eo; + class to { + constructor(e, t) { + this._lineBreakData = e, this._isVisible = t + } + isVisible() { + return this._isVisible + } + setVisible(e) { + return this._isVisible = e, this + } + getLineBreakData() { + return this._lineBreakData + } + getViewLineCount() { + return this._isVisible ? this._lineBreakData.breakOffsets.length : 0 + } + getInputStartOffsetOfOutputLineIndex(e) { + return this._lineBreakData.getInputOffsetOfOutputPosition(e, 0) + } + getInputEndOffsetOfOutputLineIndex(e, t, i) { + return i + 1 === this._lineBreakData.breakOffsets.length ? e.getLineMaxColumn( + t) - 1 : this._lineBreakData.getInputOffsetOfOutputPosition(i + 1, 0) + } + getViewLineContent(e, t, i) { + if (!this._isVisible) throw new Error("Not supported"); + const n = i > 0 ? this._lineBreakData.breakOffsets[i - 1] : 0, + o = i < this._lineBreakData.breakOffsets.length ? this._lineBreakData + .breakOffsets[i] : this._lineBreakData.breakOffsets[this._lineBreakData + .breakOffsets.length - 1]; + let r; + if (null !== this._lineBreakData.injectionOffsets) { + const i = this._lineBreakData.injectionOffsets.map(((e, t) => new sn.gk( + 0, 0, e + 1, this._lineBreakData.injectionOptions[t], 0))); + r = sn.gk.applyInjectedText(e.getLineContent(t), i).substring(n, o) + } else r = e.getValueInRange({ + startLineNumber: t, + startColumn: n + 1, + endLineNumber: t, + endColumn: o + 1 + }); + return i > 0 && (r = no(this._lineBreakData.wrappedTextIndentLength) + + r), r + } + getViewLineLength(e, t, i) { + if (!this._isVisible) throw new Error("Not supported"); + const n = i > 0 ? this._lineBreakData.breakOffsets[i - 1] : 0; + let o = (i < this._lineBreakData.breakOffsets.length ? this._lineBreakData + .breakOffsets[i] : this._lineBreakData.breakOffsets[this._lineBreakData + .breakOffsets.length - 1]) - n; + return i > 0 && (o = this._lineBreakData.wrappedTextIndentLength + o), + o + } + getViewLineMinColumn(e, t, i) { + if (!this._isVisible) throw new Error("Not supported"); + return this._getViewLineMinColumn(i) + } + _getViewLineMinColumn(e) { + return e > 0 ? this._lineBreakData.wrappedTextIndentLength + 1 : 1 + } + getViewLineMaxColumn(e, t, i) { + if (!this._isVisible) throw new Error("Not supported"); + return this.getViewLineLength(e, t, i) + 1 + } + getViewLineData(e, t, i) { + if (!this._isVisible) throw new Error("Not supported"); + const n = this._lineBreakData, + o = i > 0 ? n.wrappedTextIndentLength : 0, + r = n.injectionOffsets, + s = n.injectionOptions; + let a, l, d; + if (r) { + const c = e.getLineTokens(t).withInserted(r.map(((e, t) => ({ + offset: e, + text: s[t].content, + tokenMetadata: qn.A.defaultTokenMetadata + })))), + h = i > 0 ? n.breakOffsets[i - 1] : 0, + u = n.breakOffsets[i]; + a = c.getLineContent().substring(h, u), l = c.sliceAndInflate(h, u, o), + d = new Array; + let g = 0; + for (let e = 0; e < r.length; e++) { + const t = s[e].content.length, + o = r[e] + g, + a = r[e] + g + t; + if (o > u) break; + if (h < a) { + const t = s[e]; + if (t.inlineClassName) { + const e = i > 0 ? n.wrappedTextIndentLength : 0, + r = e + Math.max(o - h, 0), + s = e + Math.min(a - h, u); + r !== s && d.push(new ni.Wx(r, s, t.inlineClassName, t.inlineClassNameAffectsLetterSpacing)) + } + } + g += t + } + } else { + const n = this.getInputStartOffsetOfOutputLineIndex(i), + r = this.getInputEndOffsetOfOutputLineIndex(e, t, i), + s = e.getLineTokens(t); + a = e.getValueInRange({ + startLineNumber: t, + startColumn: n + 1, + endLineNumber: t, + endColumn: r + 1 + }), l = s.sliceAndInflate(n, r, o), d = null + } + i > 0 && (a = no(n.wrappedTextIndentLength) + a); + const c = i > 0 ? n.wrappedTextIndentLength + 1 : 1, + h = a.length + 1, + u = i + 1 < this.getViewLineCount(), + g = 0 === i ? 0 : n.breakOffsetsVisibleColumn[i - 1]; + return new ni.IP(a, u, c, h, g, l, d) + } + getViewLinesData(e, t, i, n, o, r, s) { + if (!this._isVisible) throw new Error("Not supported"); + for (let a = i; a < n; a++) { + let n = o + a - i; + r[n] ? s[n] = this.getViewLineData(e, t, a) : s[n] = null + } + } + getModelColumnOfViewPosition(e, t) { + if (!this._isVisible) throw new Error("Not supported"); + let i = t - 1; + return e > 0 && (i < this._lineBreakData.wrappedTextIndentLength ? i = + 0 : i -= this._lineBreakData.wrappedTextIndentLength), this._lineBreakData + .getInputOffsetOfOutputPosition(e, i) + 1 + } + getViewPositionOfModelPosition(e, t, i = 2) { + if (!this._isVisible) throw new Error("Not supported"); + let n = this._lineBreakData.getOutputPositionOfInputOffset(t - 1, i), + o = n.outputLineIndex, + r = n.outputOffset + 1; + return o > 0 && (r += this._lineBreakData.wrappedTextIndentLength), + new fe.L(e + o, r) + } + getViewLineNumberOfModelPosition(e, t) { + if (!this._isVisible) throw new Error("Not supported"); + return e + this._lineBreakData.getOutputPositionOfInputOffset(t - 1).outputLineIndex + } + normalizePosition(e, t, i, n, o) { + if (null !== this._lineBreakData.injectionOffsets) { + const e = n.lineNumber - i, + t = this._lineBreakData.outputPositionToOffsetInUnwrappedLine(i, n.column - + 1), + r = this._lineBreakData.normalizeOffsetAroundInjections(t, o); + if (r !== t) return this._lineBreakData.getOutputPositionOfOffsetInUnwrappedLine( + r, o).toPosition(e, this._lineBreakData.wrappedTextIndentLength) + } + if (0 === o) { + if (i > 0 && n.column === this._getViewLineMinColumn(i)) return new fe + .L(n.lineNumber - 1, this.getViewLineMaxColumn(e, t, i - 1)) + } else if (1 === o && i < this.getViewLineCount() - 1 && n.column === + this.getViewLineMaxColumn(e, t, i)) return new fe.L(n.lineNumber + 1, + this._getViewLineMinColumn(i + 1)); + return n + } + getInjectedTextAt(e, t) { + return this._lineBreakData.getInjectedText(e, t - 1) + } + } + let io = [""]; + + function no(e) { + if (e >= io.length) + for (let t = 1; t <= e; t++) io[t] = oo(t); + return io[e] + } + + function oo(e) { + return new Array(e + 1).join(" ") + } + + function ro(e, t) { + return null === e ? t ? Jn.INSTANCE : eo.INSTANCE : new to(e, t) + } + class so { + constructor(e) { + this._lines = e + } + _validPosition(e) { + return this._lines.model.validatePosition(e) + } + _validRange(e) { + return this._lines.model.validateRange(e) + } + convertViewPositionToModelPosition(e) { + return this._validPosition(e) + } + convertViewRangeToModelRange(e) { + return this._validRange(e) + } + validateViewPosition(e, t) { + return this._validPosition(t) + } + validateViewRange(e, t) { + return this._validRange(t) + } + convertModelPositionToViewPosition(e) { + return this._validPosition(e) + } + convertModelRangeToViewRange(e) { + return this._validRange(e) + } + modelPositionIsVisible(e) { + const t = this._lines.model.getLineCount(); + return !(e.lineNumber < 1 || e.lineNumber > t) + } + getModelLineViewLineCount(e) { + return 1 + } + } + class ao { + constructor(e) { + this.model = e + } + dispose() {} + createCoordinatesConverter() { + return new so(this) + } + getHiddenAreas() { + return [] + } + setHiddenAreas(e) { + return !1 + } + setTabSize(e) { + return !1 + } + setWrappingSettings(e, t, i, n) { + return !1 + } + createLineBreaksComputer() { + let e = []; + return { + addRequest: (t, i, n) => { + e.push(null) + }, + finalize: () => e + } + } + onModelFlushed() {} + onModelLinesDeleted(e, t, i) { + return new _n(t, i) + } + onModelLinesInserted(e, t, i, n) { + return new bn(t, i) + } + onModelLineChanged(e, t, i) { + return [!1, new fn(t, t), null, null] + } + acceptVersionId(e) {} + getViewLineCount() { + return this.model.getLineCount() + } + getActiveIndentGuide(e, t, i) { + return { + startLineNumber: e, + endLineNumber: e, + indent: 0 + } + } + getViewLinesIndentGuides(e, t) { + const i = t - e + 1; + let n = new Array(i); + for (let e = 0; e < i; e++) n[e] = 0; + return n + } + getViewLineContent(e) { + return this.model.getLineContent(e) + } + getViewLineLength(e) { + return this.model.getLineLength(e) + } + getViewLineMinColumn(e) { + return this.model.getLineMinColumn(e) + } + getViewLineMaxColumn(e) { + return this.model.getLineMaxColumn(e) + } + getViewLineData(e) { + let t = this.model.getLineTokens(e), + i = t.getLineContent(); + return new ni.IP(i, !1, 1, i.length + 1, 0, t.inflate(), null) + } + getViewLinesData(e, t, i) { + const n = this.model.getLineCount(); + e = Math.min(Math.max(1, e), n), t = Math.min(Math.max(1, t), n); + let o = []; + for (let n = e; n <= t; n++) { + let t = n - e; + i[t] || (o[t] = null), o[t] = this.getViewLineData(n) + } + return o + } + getAllOverviewRulerDecorations(e, t, i) { + const n = this.model.getOverviewRulerDecorations(e, t), + o = new lo; + for (const e of n) { + const t = e.options.overviewRuler, + n = t ? t.position : 0; + if (0 === n) continue; + const r = t.getColor(i), + s = e.range.startLineNumber, + a = e.range.endLineNumber; + o.accept(r, s, a, n) + } + return o.result + } + getDecorationsInRange(e, t, i) { + return this.model.getDecorationsInRange(e, t, i) + } + normalizePosition(e, t) { + return this.model.normalizePosition(e, t) + } + getLineIndentColumn(e) { + return this.model.getLineIndentColumn(e) + } + getInjectedTextAt(e) { + return null + } + } + class lo { + constructor() { + this.result = Object.create(null) + } + accept(e, t, i, n) { + let o = this.result[e]; + if (o) { + const e = o[o.length - 3], + r = o[o.length - 1]; + if (e === n && r + 1 >= t) return void(i > r && (o[o.length - 1] = i)); + o.push(n, t, i) + } else this.result[e] = [n, t, i] + } + } + class co { + constructor(e, t, i, n, o) { + this.editorId = e, this.model = t, this.configuration = i, this._linesCollection = + n, this._coordinatesConverter = o, this._decorationsCache = Object.create( + null), this._cachedModelDecorationsResolver = null, this._cachedModelDecorationsResolverViewRange = + null + } + _clearCachedModelDecorationsResolver() { + this._cachedModelDecorationsResolver = null, this._cachedModelDecorationsResolverViewRange = + null + } + dispose() { + this._decorationsCache = Object.create(null), this._clearCachedModelDecorationsResolver() + } + reset() { + this._decorationsCache = Object.create(null), this._clearCachedModelDecorationsResolver() + } + onModelDecorationsChanged() { + this._decorationsCache = Object.create(null), this._clearCachedModelDecorationsResolver() + } + onLineMappingChanged() { + this._decorationsCache = Object.create(null), this._clearCachedModelDecorationsResolver() + } + _getOrCreateViewModelDecoration(e) { + const t = e.id; + let i = this._decorationsCache[t]; + if (!i) { + const n = e.range, + o = e.options; + let r; + if (o.isWholeLine) { + const e = this._coordinatesConverter.convertModelPositionToViewPosition( + new fe.L(n.startLineNumber, 1), 0), + t = this._coordinatesConverter.convertModelPositionToViewPosition( + new fe.L(n.endLineNumber, this.model.getLineMaxColumn(n.endLineNumber)), + 1); + r = new _e.e(e.lineNumber, e.column, t.lineNumber, t.column) + } else r = this._coordinatesConverter.convertModelRangeToViewRange(n, + 1); + i = new ni.$l(r, o), this._decorationsCache[t] = i + } + return i + } + getDecorationsViewportData(e) { + let t = null !== this._cachedModelDecorationsResolver; + return t = t && e.equalsRange(this._cachedModelDecorationsResolverViewRange), + t || (this._cachedModelDecorationsResolver = this._getDecorationsViewportData( + e), this._cachedModelDecorationsResolverViewRange = e), this._cachedModelDecorationsResolver + } + _getDecorationsViewportData(e) { + const t = this._linesCollection.getDecorationsInRange(e, this.editorId, ( + 0, re.$J)(this.configuration.options)), + i = e.startLineNumber, + n = e.endLineNumber; + let o = [], + r = 0, + s = []; + for (let e = i; e <= n; e++) s[e - i] = []; + for (let e = 0, a = t.length; e < a; e++) { + let a = t[e], + l = a.options, + d = this._getOrCreateViewModelDecoration(a), + c = d.range; + if (o[r++] = d, l.inlineClassName) { + let e = new ni.$t(c, l.inlineClassName, l.inlineClassNameAffectsLetterSpacing ? + 3 : 0), + t = Math.max(i, c.startLineNumber), + o = Math.min(n, c.endLineNumber); + for (let n = t; n <= o; n++) s[n - i].push(e) + } + if (l.beforeContentClassName && i <= c.startLineNumber && c.startLineNumber <= + n) { + let e = new ni.$t(new _e.e(c.startLineNumber, c.startColumn, c.startLineNumber, + c.startColumn), l.beforeContentClassName, 1); + s[c.startLineNumber - i].push(e) + } + if (l.afterContentClassName && i <= c.endLineNumber && c.endLineNumber <= + n) { + let e = new ni.$t(new _e.e(c.endLineNumber, c.endColumn, c.endLineNumber, + c.endColumn), l.afterContentClassName, 2); + s[c.endLineNumber - i].push(e) + } + } + return { + decorations: o, + inlineDecorations: s + } + } + } + class ho extends L.JT { + constructor(e, t, i, n, o, r) { + if (super(), this._editorId = e, this._configuration = t, this.model = + i, this._eventDispatcher = new kn, this.onEvent = this._eventDispatcher + .onEvent, this.cursorConfig = new be.LM(this.model.getLanguageIdentifier(), + this.model.getOptions(), this._configuration), this._tokenizeViewportSoon = + this._register(new P.pY((() => this.tokenizeViewport()), 50)), this._updateConfigurationViewLineCount = + this._register(new P.pY((() => this._updateConfigurationViewLineCountNow()), + 0)), this._hasFocus = !1, this._viewportStartLine = -1, this._viewportStartLineTrackedRange = + null, this._viewportStartLineDelta = 0, this.model.isTooLargeForTokenization() + ) this._lines = new ao(this.model); + else { + const e = this._configuration.options, + t = e.get(42), + i = e.get(124), + r = e.get(131), + s = e.get(123); + this._lines = new Xn(this._editorId, this.model, n, o, t, this.model + .getOptions().tabSize, i, r.wrappingColumn, s) + } + this.coordinatesConverter = this._lines.createCoordinatesConverter(), + this._cursor = this._register(new On(i, this, this.coordinatesConverter, + this.cursorConfig)), this.viewLayout = this._register(new $n(this._configuration, + this.getLineCount(), r)), this._register(this.viewLayout.onDidScroll( + (e => { + e.scrollTopChanged && this._tokenizeViewportSoon.schedule(), + this._eventDispatcher.emitSingleViewEvent(new wn(e)), this._eventDispatcher + .emitOutgoingEvent(new En(e.oldScrollWidth, e.oldScrollLeft, e.oldScrollHeight, + e.oldScrollTop, e.scrollWidth, e.scrollLeft, e.scrollHeight, + e.scrollTop)) + }))), this._register(this.viewLayout.onDidContentSizeChange((e => { + this._eventDispatcher.emitOutgoingEvent(e) + }))), this._decorations = new co(this._editorId, this.model, this._configuration, + this._lines, this.coordinatesConverter), this._registerModelEvents(), + this._register(this._configuration.onDidChangeFast((e => { + try { + const t = this._eventDispatcher.beginEmitViewEvents(); + this._onConfigurationChanged(t, e) + } finally { + this._eventDispatcher.endEmitViewEvents() + } + }))), this._register(ii.getInstance().onDidChange((() => { + this._eventDispatcher.emitSingleViewEvent(new Sn) + }))), this._updateConfigurationViewLineCountNow() + } + dispose() { + super.dispose(), this._decorations.dispose(), this._lines.dispose(), + this.invalidateMinimapColorCache(), this._viewportStartLineTrackedRange = + this.model._setTrackedRange(this._viewportStartLineTrackedRange, + null, 1), this._eventDispatcher.dispose() + } + createLineBreaksComputer() { + return this._lines.createLineBreaksComputer() + } + addViewEventHandler(e) { + this._eventDispatcher.addViewEventHandler(e) + } + removeViewEventHandler(e) { + this._eventDispatcher.removeViewEventHandler(e) + } + _updateConfigurationViewLineCountNow() { + this._configuration.setViewLineCount(this._lines.getViewLineCount()) + } + tokenizeViewport() { + const e = this.viewLayout.getLinesViewportData(), + t = this.coordinatesConverter.convertViewPositionToModelPosition(new fe + .L(e.startLineNumber, 1)), + i = this.coordinatesConverter.convertViewPositionToModelPosition(new fe + .L(e.endLineNumber, 1)); + this.model.tokenizeViewport(t.lineNumber, i.lineNumber) + } + setHasFocus(e) { + this._hasFocus = e, this._cursor.setHasFocus(e), this._eventDispatcher + .emitSingleViewEvent(new gn(e)), this._eventDispatcher.emitOutgoingEvent( + new Dn(!e, e)) + } + onCompositionStart() { + this._eventDispatcher.emitSingleViewEvent(new an) + } + onCompositionEnd() { + this._eventDispatcher.emitSingleViewEvent(new ln) + } + onDidColorThemeChange() { + this._eventDispatcher.emitSingleViewEvent(new Cn) + } + _onConfigurationChanged(e, t) { + let i = null; + if (-1 !== this._viewportStartLine) { + let e = new fe.L(this._viewportStartLine, this.getLineMinColumn(this + ._viewportStartLine)); + i = this.coordinatesConverter.convertViewPositionToModelPosition(e) + } + let n = !1; + const o = this._configuration.options, + r = o.get(42), + s = o.get(124), + a = o.get(131), + l = o.get(123); + if (this._lines.setWrappingSettings(r, s, a.wrappingColumn, l) && (e.emitViewEvent( + new un), e.emitViewEvent(new mn), e.emitViewEvent(new hn(null)), + this._cursor.onLineMappingChanged(e), this._decorations.onLineMappingChanged(), + this.viewLayout.onFlushed(this.getLineCount()), 0 !== this.viewLayout + .getCurrentScrollTop() && (n = !0), this._updateConfigurationViewLineCount + .schedule()), t.hasChanged(80) && (this._decorations.reset(), e.emitViewEvent( + new hn(null))), e.emitViewEvent(new dn(t)), this.viewLayout.onConfigurationChanged( + t), n && i) { + const e = this.coordinatesConverter.convertModelPositionToViewPosition( + i), + t = this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber); + this.viewLayout.setScrollPosition({ + scrollTop: t + this._viewportStartLineDelta + }, 1) + } + be.LM.shouldRecreate(t) && (this.cursorConfig = new be.LM(this.model.getLanguageIdentifier(), + this.model.getOptions(), this._configuration), this._cursor.updateConfiguration( + this.cursorConfig)) + } + _registerModelEvents() { + this._register(this.model.onDidChangeContentOrInjectedText((e => { + try { + const t = this._eventDispatcher.beginEmitViewEvents(); + let i = !1, + n = !1; + const o = e.changes, + r = e instanceof sn.dQ ? e.versionId : null, + s = this._lines.createLineBreaksComputer(); + for (const e of o) switch (e.changeType) { + case 4: + for (let t = 0; t < e.detail.length; t++) { + const i = e.detail[t]; + let n = e.injectedTexts[t]; + n && (n = n.filter((e => !e.ownerId || e.ownerId === this._editorId))), + s.addRequest(i, n, null) + } + break; + case 2: + { + let t = null; + e.injectedText && (t = e.injectedText.filter((e => !e.ownerId || + e.ownerId === this._editorId))), s.addRequest(e.detail, t, + null); + break + } + } + const a = s.finalize(); + let l = 0; + for (const e of o) switch (e.changeType) { + case 1: + this._lines.onModelFlushed(), t.emitViewEvent(new un), this._decorations + .reset(), this.viewLayout.onFlushed(this.getLineCount()), i = ! + 0; + break; + case 3: + { + const n = this._lines.onModelLinesDeleted(r, e.fromLineNumber, + e.toLineNumber); + null !== n && (t.emitViewEvent(n), this.viewLayout.onLinesDeleted( + n.fromLineNumber, n.toLineNumber)), i = !0; + break + } + case 4: + { + const n = a.slice(l, l + e.detail.length); + l += e.detail.length; + const o = this._lines.onModelLinesInserted(r, e.fromLineNumber, + e.toLineNumber, n); + null !== o && (t.emitViewEvent(o), this.viewLayout.onLinesInserted( + o.fromLineNumber, o.toLineNumber)), i = !0; + break + } + case 2: + { + const i = a[l]; + l++; + const [o, s, d, c] = this._lines.onModelLineChanged(r, e.lineNumber, + i); + n = o, s && t.emitViewEvent(s), d && (t.emitViewEvent(d), + this.viewLayout.onLinesInserted(d.fromLineNumber, d.toLineNumber) + ), c && (t.emitViewEvent(c), this.viewLayout.onLinesDeleted( + c.fromLineNumber, c.toLineNumber)); + break + } + } + null !== r && this._lines.acceptVersionId(r), this.viewLayout.onHeightMaybeChanged(), ! + i && n && (t.emitViewEvent(new mn), t.emitViewEvent(new hn( + null)), this._cursor.onLineMappingChanged(t), this._decorations + .onLineMappingChanged()) + } finally { + this._eventDispatcher.endEmitViewEvents() + } + if (this._viewportStartLine = -1, this._configuration.setMaxLineNumber( + this.model.getLineCount()), this._updateConfigurationViewLineCountNow(), ! + this._hasFocus && this.model.getAttachedEditorCount() >= 2 && + this._viewportStartLineTrackedRange) { + const e = this.model._getTrackedRange(this._viewportStartLineTrackedRange); + if (e) { + const t = this.coordinatesConverter.convertModelPositionToViewPosition( + e.getStartPosition()), + i = this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber); + this.viewLayout.setScrollPosition({ + scrollTop: i + this._viewportStartLineDelta + }, 1) + } + } + try { + const t = this._eventDispatcher.beginEmitViewEvents(); + this._cursor.onModelContentChanged(t, e) + } finally { + this._eventDispatcher.endEmitViewEvents() + } + }))), this._register(this.model.onDidChangeTokens((e => { + let t = []; + for (let i = 0, n = e.ranges.length; i < n; i++) { + const n = e.ranges[i], + o = this.coordinatesConverter.convertModelPositionToViewPosition( + new fe.L(n.fromLineNumber, 1)).lineNumber, + r = this.coordinatesConverter.convertModelPositionToViewPosition( + new fe.L(n.toLineNumber, this.model.getLineMaxColumn(n.toLineNumber)) + ).lineNumber; + t[i] = { + fromLineNumber: o, + toLineNumber: r + } + } + this._eventDispatcher.emitSingleViewEvent(new yn(t)), e.tokenizationSupportChanged && + this._tokenizeViewportSoon.schedule() + }))), this._register(this.model.onDidChangeLanguageConfiguration((e => { + this._eventDispatcher.emitSingleViewEvent(new pn), this.cursorConfig = + new be.LM(this.model.getLanguageIdentifier(), this.model.getOptions(), + this._configuration), this._cursor.updateConfiguration(this.cursorConfig) + }))), this._register(this.model.onDidChangeLanguage((e => { + this.cursorConfig = new be.LM(this.model.getLanguageIdentifier(), + this.model.getOptions(), this._configuration), this._cursor.updateConfiguration( + this.cursorConfig) + }))), this._register(this.model.onDidChangeOptions((e => { + if (this._lines.setTabSize(this.model.getOptions().tabSize)) { + try { + const e = this._eventDispatcher.beginEmitViewEvents(); + e.emitViewEvent(new un), e.emitViewEvent(new mn), e.emitViewEvent( + new hn(null)), this._cursor.onLineMappingChanged(e), this._decorations + .onLineMappingChanged(), this.viewLayout.onFlushed(this.getLineCount()) + } finally { + this._eventDispatcher.endEmitViewEvents() + } + this._updateConfigurationViewLineCount.schedule() + } + this.cursorConfig = new be.LM(this.model.getLanguageIdentifier(), + this.model.getOptions(), this._configuration), this._cursor.updateConfiguration( + this.cursorConfig) + }))), this._register(this.model.onDidChangeDecorations((e => { + this._decorations.onModelDecorationsChanged(), this._eventDispatcher + .emitSingleViewEvent(new hn(e)) + }))) + } + setHiddenAreas(e) { + try { + const t = this._eventDispatcher.beginEmitViewEvents(); + this._lines.setHiddenAreas(e) && (t.emitViewEvent(new un), t.emitViewEvent( + new mn), t.emitViewEvent(new hn(null)), this._cursor.onLineMappingChanged( + t), this._decorations.onLineMappingChanged(), this.viewLayout.onFlushed( + this.getLineCount()), this.viewLayout.onHeightMaybeChanged()) + } finally { + this._eventDispatcher.endEmitViewEvents() + } + this._updateConfigurationViewLineCount.schedule() + } + getVisibleRangesPlusViewportAboveBelow() { + const e = this._configuration.options.get(130), + t = this._configuration.options.get(58), + i = Math.max(20, Math.round(e.height / t)), + n = this.viewLayout.getLinesViewportData(), + o = Math.max(1, n.completelyVisibleStartLineNumber - i), + r = Math.min(this.getLineCount(), n.completelyVisibleEndLineNumber + + i); + return this._toModelVisibleRanges(new _e.e(o, this.getLineMinColumn(o), + r, this.getLineMaxColumn(r))) + } + getVisibleRanges() { + const e = this.getCompletelyVisibleViewRange(); + return this._toModelVisibleRanges(e) + } + _toModelVisibleRanges(e) { + const t = this.coordinatesConverter.convertViewRangeToModelRange(e), + i = this._lines.getHiddenAreas(); + if (0 === i.length) return [t]; + let n = [], + o = 0, + r = t.startLineNumber, + s = t.startColumn, + a = t.endLineNumber, + l = t.endColumn; + for (let e = 0, t = i.length; e < t; e++) { + const t = i[e].startLineNumber, + l = i[e].endLineNumber; + l < r || t > a || (r < t && (n[o++] = new _e.e(r, s, t - 1, this.model + .getLineMaxColumn(t - 1))), r = l + 1, s = 1) + } + return (r < a || r === a && s < l) && (n[o++] = new _e.e(r, s, a, l)), + n + } + getCompletelyVisibleViewRange() { + const e = this.viewLayout.getLinesViewportData(), + t = e.completelyVisibleStartLineNumber, + i = e.completelyVisibleEndLineNumber; + return new _e.e(t, this.getLineMinColumn(t), i, this.getLineMaxColumn( + i)) + } + getCompletelyVisibleViewRangeAtScrollTop(e) { + const t = this.viewLayout.getLinesViewportDataAtScrollTop(e), + i = t.completelyVisibleStartLineNumber, + n = t.completelyVisibleEndLineNumber; + return new _e.e(i, this.getLineMinColumn(i), n, this.getLineMaxColumn( + n)) + } + saveState() { + const e = this.viewLayout.saveState(), + t = e.scrollTop, + i = this.viewLayout.getLineNumberAtVerticalOffset(t), + n = this.coordinatesConverter.convertViewPositionToModelPosition(new fe + .L(i, this.getLineMinColumn(i))), + o = this.viewLayout.getVerticalOffsetForLineNumber(i) - t; + return { + scrollLeft: e.scrollLeft, + firstPosition: n, + firstPositionDeltaTop: o + } + } + reduceRestoreState(e) { + if (void 0 === e.firstPosition) return this._reduceRestoreStateCompatibility( + e); + const t = this.model.validatePosition(e.firstPosition), + i = this.coordinatesConverter.convertModelPositionToViewPosition(t), + n = this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber) - e + .firstPositionDeltaTop; + return { + scrollLeft: e.scrollLeft, + scrollTop: n + } + } + _reduceRestoreStateCompatibility(e) { + return { + scrollLeft: e.scrollLeft, + scrollTop: e.scrollTopWithoutViewZones + } + } + getTabSize() { + return this.model.getOptions().tabSize + } + getTextModelOptions() { + return this.model.getOptions() + } + getLineCount() { + return this._lines.getViewLineCount() + } + setViewport(e, t, i) { + this._viewportStartLine = e; + let n = this.coordinatesConverter.convertViewPositionToModelPosition( + new fe.L(e, this.getLineMinColumn(e))); + this._viewportStartLineTrackedRange = this.model._setTrackedRange( + this._viewportStartLineTrackedRange, new _e.e(n.lineNumber, n.column, + n.lineNumber, n.column), 1); + const o = this.viewLayout.getVerticalOffsetForLineNumber(e), + r = this.viewLayout.getCurrentScrollTop(); + this._viewportStartLineDelta = r - o + } + getActiveIndentGuide(e, t, i) { + return this._lines.getActiveIndentGuide(e, t, i) + } + getLinesIndentGuides(e, t) { + return this._lines.getViewLinesIndentGuides(e, t) + } + getLineContent(e) { + return this._lines.getViewLineContent(e) + } + getLineLength(e) { + return this._lines.getViewLineLength(e) + } + getLineMinColumn(e) { + return this._lines.getViewLineMinColumn(e) + } + getLineMaxColumn(e) { + return this._lines.getViewLineMaxColumn(e) + } + getLineFirstNonWhitespaceColumn(e) { + const t = Ue.LC(this.getLineContent(e)); + return -1 === t ? 0 : t + 1 + } + getLineLastNonWhitespaceColumn(e) { + const t = Ue.ow(this.getLineContent(e)); + return -1 === t ? 0 : t + 2 + } + getDecorationsInViewport(e) { + return this._decorations.getDecorationsViewportData(e).decorations + } + getInjectedTextAt(e) { + return this._lines.getInjectedTextAt(e) + } + getViewLineRenderingData(e, t) { + let i = this.model.mightContainRTL(), + n = this.model.mightContainNonBasicASCII(), + o = this.getTabSize(), + r = this._lines.getViewLineData(t), + s = this._decorations.getDecorationsViewportData(e).inlineDecorations[ + t - e.startLineNumber]; + return r.inlineDecorations && (s = [...s, ...r.inlineDecorations.map( + (e => e.toInlineDecoration(t)))]), new ni.wA(r.minColumn, r.maxColumn, + r.content, r.continuesWithWrappedLine, i, n, r.tokens, s, o, r.startVisibleColumn + ) + } + getViewLineData(e) { + return this._lines.getViewLineData(e) + } + getMinimapLinesRenderingData(e, t, i) { + let n = this._lines.getViewLinesData(e, t, i); + return new ni.ud(this.getTabSize(), n) + } + getAllOverviewRulerDecorations(e) { + return this._lines.getAllOverviewRulerDecorations(this._editorId, (0, + re.$J)(this._configuration.options), e) + } + invalidateOverviewRulerColorCache() { + const e = this.model.getOverviewRulerDecorations(); + for (const t of e) { + const e = t.options.overviewRuler; + e && e.invalidateCachedColor() + } + } + invalidateMinimapColorCache() { + const e = this.model.getAllDecorations(); + for (const t of e) { + const e = t.options.minimap; + e && e.invalidateCachedColor() + } + } + getValueInRange(e, t) { + const i = this.coordinatesConverter.convertViewRangeToModelRange(e); + return this.model.getValueInRange(i, t) + } + getModelLineMaxColumn(e) { + return this.model.getLineMaxColumn(e) + } + validateModelPosition(e) { + return this.model.validatePosition(e) + } + validateModelRange(e) { + return this.model.validateRange(e) + } + deduceModelPositionRelativeToViewPosition(e, t, i) { + const n = this.coordinatesConverter.convertViewPositionToModelPosition( + e); + 2 === this.model.getEOL().length && (t < 0 ? t -= i : t += i); + const o = this.model.getOffsetAt(n) + t; + return this.model.getPositionAt(o) + } + getEOL() { + return this.model.getEOL() + } + getPlainTextToCopy(e, t, i) { + const n = i ? "\r\n" : this.model.getEOL(); + (e = e.slice(0)).sort(_e.e.compareRangesUsingStarts); + let o = !1, + r = !1; + for (const t of e) t.isEmpty() ? o = !0 : r = !0; + if (!r) { + if (!t) return ""; + const i = e.map((e => e.startLineNumber)); + let o = ""; + for (let e = 0; e < i.length; e++) e > 0 && i[e - 1] === i[e] || (o += + this.model.getLineContent(i[e]) + n); + return o + } + if (o && t) { + let t = [], + n = 0; + for (const o of e) { + const e = o.startLineNumber; + o.isEmpty() ? e !== n && t.push(this.model.getLineContent(e)) : t.push( + this.model.getValueInRange(o, i ? 2 : 0)), n = e + } + return 1 === t.length ? t[0] : t + } + let s = []; + for (const t of e) t.isEmpty() || s.push(this.model.getValueInRange(t, + i ? 2 : 0)); + return 1 === s.length ? s[0] : s + } + getRichTextToCopy(e, t) { + const i = this.model.getLanguageIdentifier(); + if (1 === i.id) return null; + if (1 !== e.length) return null; + let n = e[0]; + if (n.isEmpty()) { + if (!t) return null; + const e = n.startLineNumber; + n = new _e.e(e, this.model.getLineMinColumn(e), e, this.model.getLineMaxColumn( + e)) + } + const o = this._configuration.options.get(42), + r = this._getColorMap(); + let s; + return /[:;\\\/<>]/.test(o.fontFamily) || o.fontFamily === re.hL.fontFamily ? + s = re.hL.fontFamily : (s = o.fontFamily, s = s.replace(/"/g, "'"), + /[,']/.test(s) || /[+ ]/.test(s) && (s = `'${s}'`), s = + `${s}, ${re.hL.fontFamily}`), { + mode: i.language, + html: `
    ` + + this._getHTMLToCopy(n, r) + "
    " + } + } + _getHTMLToCopy(e, t) { + const i = e.startLineNumber, + n = e.startColumn, + o = e.endLineNumber, + r = e.endColumn, + s = this.getTabSize(); + let a = ""; + for (let e = i; e <= o; e++) { + const l = this.model.getLineTokens(e), + d = l.getLineContent(), + c = e === i ? n - 1 : 0, + h = e === o ? r - 1 : d.length; + a += "" === d ? "
    " : (0, Wn.F)(d, l.inflate(), t, c, h, s, A.ED) + } + return a + } + _getColorMap() { + let e = ti.RW.getColorMap(), + t = ["#000000"]; + if (e) + for (let i = 1, n = e.length; i < n; i++) t[i] = ki.Il.Format.CSS.formatHex( + e[i]); + return t + } + pushStackElement() { + this.model.pushStackElement() + } + getPrimaryCursorState() { + return this._cursor.getPrimaryCursorState() + } + getLastAddedCursorIndex() { + return this._cursor.getLastAddedCursorIndex() + } + getCursorStates() { + return this._cursor.getCursorStates() + } + setCursorStates(e, t, i) { + this._withViewEventsCollector((n => this._cursor.setStates(n, e, t, i))) + } + getCursorColumnSelectData() { + return this._cursor.getCursorColumnSelectData() + } + getCursorAutoClosedCharacters() { + return this._cursor.getAutoClosedCharacters() + } + setCursorColumnSelectData(e) { + this._cursor.setCursorColumnSelectData(e) + } + getPrevEditOperationType() { + return this._cursor.getPrevEditOperationType() + } + setPrevEditOperationType(e) { + this._cursor.setPrevEditOperationType(e) + } + getSelection() { + return this._cursor.getSelection() + } + getSelections() { + return this._cursor.getSelections() + } + getPosition() { + return this._cursor.getPrimaryCursorState().modelState.position + } + setSelections(e, t, i = 0) { + this._withViewEventsCollector((n => this._cursor.setSelections(n, e, + t, i))) + } + saveCursorState() { + return this._cursor.saveState() + } + restoreCursorState(e) { + this._withViewEventsCollector((t => this._cursor.restoreState(t, e))) + } + _executeCursorEdit(e) { + this._cursor.context.cursorConfig.readOnly ? this._eventDispatcher.emitOutgoingEvent( + new Mn) : this._withViewEventsCollector(e) + } + executeEdits(e, t, i) { + this._executeCursorEdit((n => this._cursor.executeEdits(n, e, t, i))) + } + startComposition() { + this._cursor.setIsDoingComposition(!0), this._executeCursorEdit((e => + this._cursor.startComposition(e))) + } + endComposition(e) { + this._cursor.setIsDoingComposition(!1), this._executeCursorEdit((t => + this._cursor.endComposition(t, e))) + } + type(e, t) { + this._executeCursorEdit((i => this._cursor.type(i, e, t))) + } + compositionType(e, t, i, n, o) { + this._executeCursorEdit((r => this._cursor.compositionType(r, e, t, i, + n, o))) + } + paste(e, t, i, n) { + this._executeCursorEdit((o => this._cursor.paste(o, e, t, i, n))) + } + cut(e) { + this._executeCursorEdit((t => this._cursor.cut(t, e))) + } + executeCommand(e, t) { + this._executeCursorEdit((i => this._cursor.executeCommand(i, e, t))) + } + executeCommands(e, t) { + this._executeCursorEdit((i => this._cursor.executeCommands(i, e, t))) + } + revealPrimaryCursor(e, t) { + this._withViewEventsCollector((i => this._cursor.revealPrimary(i, e, + t, 0))) + } + revealTopMostCursor(e) { + const t = this._cursor.getTopMostViewPosition(), + i = new _e.e(t.lineNumber, t.column, t.lineNumber, t.column); + this._withViewEventsCollector((t => t.emitViewEvent(new vn(e, i, null, + 0, !0, 0)))) + } + revealBottomMostCursor(e) { + const t = this._cursor.getBottomMostViewPosition(), + i = new _e.e(t.lineNumber, t.column, t.lineNumber, t.column); + this._withViewEventsCollector((t => t.emitViewEvent(new vn(e, i, null, + 0, !0, 0)))) + } + revealRange(e, t, i, n, o) { + this._withViewEventsCollector((r => r.emitViewEvent(new vn(e, i, null, + n, t, o)))) + } + getVerticalOffsetForLineNumber(e) { + return this.viewLayout.getVerticalOffsetForLineNumber(e) + } + getScrollTop() { + return this.viewLayout.getCurrentScrollTop() + } + setScrollTop(e, t) { + this.viewLayout.setScrollPosition({ + scrollTop: e + }, t) + } + setScrollPosition(e, t) { + this.viewLayout.setScrollPosition(e, t) + } + deltaScrollNow(e, t) { + this.viewLayout.deltaScrollNow(e, t) + } + changeWhitespace(e) { + this.viewLayout.changeWhitespace(e) && (this._eventDispatcher.emitSingleViewEvent( + new xn), this._eventDispatcher.emitOutgoingEvent(new In)) + } + setMaxLineWidth(e) { + this.viewLayout.setMaxLineWidth(e) + } + _withViewEventsCollector(e) { + try { + e(this._eventDispatcher.beginEmitViewEvents()) + } finally { + this._eventDispatcher.endEmitViewEvents() + } + } + normalizePosition(e, t) { + return this._lines.normalizePosition(e, t) + } + getLineIndentColumn(e) { + return this._lines.getLineIndentColumn(e) + } + } + var uo = i(4565), + go = i(8819), + po = i(2065), + mo = i(972), + fo = i(9422), + _o = i(1106), + bo = i(8401), + vo = i(4906); + class wo extends vo.N { + constructor(e, t) { + super(0); + for (let t = 0; t < e.length; t++) this.set(e.charCodeAt(t), 1); + for (let e = 0; e < t.length; e++) this.set(t.charCodeAt(e), 2) + } + get(e) { + return e >= 0 && e < 256 ? this._asciiMap[e] : e >= 12352 && e <= + 12543 || e >= 13312 && e <= 19903 || e >= 19968 && e <= 40959 ? 3 : + this._map.get(e) || this._defaultValue + } + } + let Co = [], + yo = []; + class So { + constructor(e, t) { + this.classifier = new wo(e, t) + } + static create(e) { + return new So(e.get(119), e.get(118)) + } + createLineBreaksComputer(e, t, i, n) { + t |= 0, i = +i; + const o = [], + r = [], + s = []; + return { + addRequest: (e, t, i) => { + o.push(e), r.push(t), s.push(i) + }, + finalize: () => { + const a = e.typicalFullwidthCharacterWidth / e.typicalHalfwidthCharacterWidth; + let l = []; + for (let e = 0, d = o.length; e < d; e++) { + const d = r[e], + c = s[e]; + !c || c.injectionOptions || d ? l[e] = ko(this.classifier, o[e], d, + t, i, a, n) : l[e] = xo(this.classifier, c, o[e], t, i, a, n) + } + return Co.length = 0, yo.length = 0, l + } + } + } + } + + function xo(e, t, i, n, o, r, s) { + if (-1 === o) return null; + const a = i.length; + if (a <= 1) return null; + const l = t.breakOffsets, + d = t.breakOffsetsVisibleColumn, + c = Eo(i, n, o, r, s), + h = o - c; + let u = Co, + g = yo, + p = 0, + m = 0, + f = 0, + _ = o; + const b = l.length; + let v = 0; + if (v >= 0) { + let e = Math.abs(d[v] - _); + for (; v + 1 < b;) { + const t = Math.abs(d[v + 1] - _); + if (t >= e) break; + e = t, v++ + } + } + for (; v < b;) { + let t = v < 0 ? 0 : l[v], + o = v < 0 ? 0 : d[v]; + m > t && (t = m, o = f); + let s = 0, + c = 0, + w = 0, + C = 0; + if (o <= _) { + let f = o, + b = 0 === t ? 0 : i.charCodeAt(t - 1), + v = 0 === t ? 0 : e.get(b), + y = !0; + for (let o = t; o < a; o++) { + const t = o, + a = i.charCodeAt(o); + let l, d; + if (Ue.ZG(a) ? (o++, l = 0, d = 2) : (l = e.get(a), d = Lo(a, f, n, r)), + t > m && Do(0, v, a, l) && (s = t, c = f), f += d, f > _) { + t > m ? (w = t, C = f - d) : (w = o + 1, C = f), f - c > h && (s = 0), + y = !1; + break + } + b = a, v = l + } + if (y) { + p > 0 && (u[p] = l[l.length - 1], g[p] = d[l.length - 1], p++); + break + } + } + if (0 === s) { + let a = o, + l = i.charCodeAt(t), + d = e.get(l), + u = !1; + for (let n = t - 1; n >= m; n--) { + const t = n + 1, + o = i.charCodeAt(n); + if (9 === o) { + u = !0; + break + } + let g, p; + if (Ue.YK(o) ? (n--, g = 0, p = 2) : (g = e.get(o), p = Ue.K7(o) ? r : + 1), a <= _) { + if (0 === w && (w = t, C = a), a <= _ - h) break; + if (Do(0, g, l, d)) { + s = t, c = a; + break + } + } + a -= p, l = o, d = g + } + if (0 !== s) { + const e = h - (C - c); + if (e <= n) { + const t = i.charCodeAt(w); + let o; + o = Ue.ZG(t) ? 2 : Lo(t, C, n, r), e - o < 0 && (s = 0) + } + } + if (u) { + v--; + continue + } + } + if (0 === s && (s = w, c = C), s <= m) { + const e = i.charCodeAt(m); + Ue.ZG(e) ? (s = m + 2, c = f + 2) : (s = m + 1, c = f + Lo(e, f, n, r)) + } + for (m = s, u[p] = s, f = c, g[p] = c, p++, _ = c + h; v < 0 || v < b && + d[v] < c;) v++; + let y = Math.abs(d[v] - _); + for (; v + 1 < b;) { + const e = Math.abs(d[v + 1] - _); + if (e >= y) break; + y = e, v++ + } + } + return 0 === p ? null : (u.length = p, g.length = p, Co = t.breakOffsets, + yo = t.breakOffsetsVisibleColumn, t.breakOffsets = u, t.breakOffsetsVisibleColumn = + g, t.wrappedTextIndentLength = c, t) + } + + function ko(e, t, i, n, o, r, s) { + const a = sn.gk.applyInjectedText(t, i); + let l, d; + if (i && i.length > 0 ? (l = i.map((e => e.options)), d = i.map((e => e.column - + 1))) : (l = null, d = null), -1 === o) return l ? new ni.le([a.length], [], + 0, d, l) : null; + const c = a.length; + if (c <= 1) return l ? new ni.le([a.length], [], 0, d, l) : null; + const h = Eo(a, n, o, r, s), + u = o - h; + let g = [], + p = [], + m = 0, + f = 0, + _ = 0, + b = o, + v = a.charCodeAt(0), + w = e.get(v), + C = Lo(v, 0, n, r), + y = 1; + Ue.ZG(v) && (C += 1, v = a.charCodeAt(1), w = e.get(v), y++); + for (let t = y; t < c; t++) { + const i = t, + o = a.charCodeAt(t); + let s, l; + Ue.ZG(o) ? (t++, s = 0, l = 2) : (s = e.get(o), l = Lo(o, C, n, r)), Do( + 0, w, o, s) && (f = i, _ = C), C += l, C > b && ((0 === f || C - _ > + u) && (f = i, _ = C - l), g[m] = f, p[m] = _, m++, b = _ + u, f = 0), + v = o, w = s + } + return 0 !== m || i && 0 !== i.length ? (g[m] = c, p[m] = C, new ni.le(g, + p, h, d, l)) : null + } + + function Lo(e, t, i, n) { + return 9 === e ? i - t % i : Ue.K7(e) || e < 32 ? n : 1 + } + + function No(e, t) { + return t - e % t + } + + function Do(e, t, i, n) { + return 32 !== i && (2 === t || 3 === t && 2 !== n || 1 === n || 3 === n && + 1 !== t) + } + + function Eo(e, t, i, n, o) { + let r = 0; + if (0 !== o) { + const s = Ue.LC(e); + if (-1 !== s) { + for (let i = 0; i < s; i++) r += 9 === e.charCodeAt(i) ? No(r, t) : 1; + const a = 3 === o ? 2 : 2 === o ? 1 : 0; + for (let e = 0; e < a; e++) r += No(r, t); + r + n > i && (r = 0) + } + } + return r + } + var Io; + const To = null === (Io = window.trustedTypes) || void 0 === Io ? void 0 : + Io.createPolicy("domLineBreaksComputer", { + createHTML: e => e + }); + class Mo { + static create() { + return new Mo + } + constructor() {} + createLineBreaksComputer(e, t, i, n) { + t |= 0, i = +i; + let o = [], + r = []; + return { + addRequest: (e, t, i) => { + o.push(e), r.push(t) + }, + finalize: () => function(e, t, i, n, o, r) { + var s; + + function a(t) { + const i = r[t]; + if (i) { + const n = sn.gk.applyInjectedText(e[t], i), + o = i.map((e => e.options)), + r = i.map((e => e.column - 1)); + return new ni.le([n.length], [], 0, r, o) + } + return null + } + if (-1 === n) { + const t = []; + for (let i = 0, n = e.length; i < n; i++) t[i] = a(i); + return t + } + const l = Math.round(n * t.typicalHalfwidthCharacterWidth); + 2 !== o && 3 !== o || (o = 1); + const d = document.createElement("div"); + D.V.applyFontInfoSlow(d, t); + const c = (0, lt.l$)(1e4), + h = [], + u = [], + g = [], + p = [], + m = []; + for (let n = 0; n < e.length; n++) { + const s = sn.gk.applyInjectedText(e[n], r[n]); + let a = 0, + d = 0, + f = l; + if (0 !== o) + if (a = Ue.LC(s), -1 === a) a = 0; + else { + for (let e = 0; e < a; e++) d += 9 === s.charCodeAt(e) ? i - d % + i : 1; + const e = Math.ceil(t.spaceWidth * d); + e + t.typicalFullwidthCharacterWidth > l ? (a = 0, d = 0) : f = + l - e + } + const _ = s.substr(a), + b = Ao(_, d, i, f, c); + h[n] = a, u[n] = d, g[n] = _, p[n] = b[0], m[n] = b[1] + } + const f = c.build(), + _ = null !== (s = null == To ? void 0 : To.createHTML(f)) && void 0 !== + s ? s : f; + d.innerHTML = _, d.style.position = "absolute", d.style.top = + "10000", d.style.wordWrap = "break-word", document.body.appendChild( + d); + let b = document.createRange(); + const v = Array.prototype.slice.call(d.children, 0); + let w = []; + for (let t = 0; t < e.length; t++) { + const e = Ro(b, v[t], g[t], p[t]); + if (null === e) { + w[t] = a(t); + continue + } + const i = h[t], + n = u[t], + o = m[t], + s = []; + for (let t = 0, i = e.length; t < i; t++) s[t] = o[e[t]]; + if (0 !== i) + for (let t = 0, n = e.length; t < n; t++) e[t] += i; + let l, d; + const c = r[t]; + c ? (l = c.map((e => e.options)), d = c.map((e => e.column - 1))) : + (l = null, d = null), w[t] = new ni.le(e, s, n, d, l) + } + return document.body.removeChild(d), w + }(o, e, t, i, n, r) + } + } + } + + function Ao(e, t, i, n, o) { + o.appendASCIIString('
    '); + const r = e.length; + let s = t, + a = 0, + l = [], + d = [], + c = 0 < r ? e.charCodeAt(0) : 0; + o.appendASCIIString(""); + for (let t = 0; t < r; t++) { + 0 !== t && t % 16384 == 0 && o.appendASCIIString(""), l[t] = + a, d[t] = s; + const n = c; + c = t + 1 < r ? e.charCodeAt(t + 1) : 0; + let h = 1, + u = 1; + switch (n) { + case 9: + h = i - s % i, u = h; + for (let e = 1; e <= h; e++) e < h ? o.write1(160) : o.appendASCII(32); + break; + case 32: + 32 === c ? o.write1(160) : o.appendASCII(32); + break; + case 60: + o.appendASCIIString("<"); + break; + case 62: + o.appendASCIIString(">"); + break; + case 38: + o.appendASCIIString("&"); + break; + case 0: + o.appendASCIIString("�"); + break; + case 65279: + case 8232: + case 8233: + case 133: + o.write1(65533); + break; + default: + Ue.K7(n) && u++, n < 32 ? o.write1(9216 + n) : o.write1(n) + } + a += h, s += u + } + return o.appendASCIIString(""), l[e.length] = a, d[e.length] = s, + o.appendASCIIString("
    "), [l, d] + } + + function Ro(e, t, i, n) { + if (i.length <= 1) return null; + const o = Array.prototype.slice.call(t.children, 0), + r = []; + try { + Oo(e, o, n, 0, null, i.length - 1, null, r) + } catch (e) { + return console.log(e), null + } + return 0 === r.length ? null : (r.push(i.length), r) + } + + function Oo(e, t, i, n, o, r, s, a) { + if (n === r) return; + if (o = o || Po(e, t, i[n], i[n + 1]), s = s || Po(e, t, i[r], i[r + 1]), + Math.abs(o[0].top - s[0].top) <= .1) return; + if (n + 1 === r) return void a.push(r); + const l = n + (r - n) / 2 | 0, + d = Po(e, t, i[l], i[l + 1]); + Oo(e, t, i, n, o, l, d, a), Oo(e, t, i, l, d, r, s, a) + } + + function Po(e, t, i, n) { + return e.setStart(t[i / 16384 | 0].firstChild, i % 16384), e.setEnd(t[n / + 16384 | 0].firstChild, n % 16384), e.getClientRects() + } + var Fo = i(5795), + Bo = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let Wo = 0; + class zo { + constructor(e, t, i, n, o) { + this.model = e, this.viewModel = t, this.view = i, this.hasRealView = + n, this.listenersToRemove = o + } + dispose() { + (0, L.B9)(this.listenersToRemove), this.model.onBeforeDetached(), this + .hasRealView && this.view.dispose(), this.viewModel.dispose() + } + } + let Vo = class e extends L.JT { + constructor(e, t, i, n, r, s, a, l, d, c) { + super(), this._onDidDispose = this._register(new k.Q5), this.onDidDispose = + this._onDidDispose.event, this._onDidChangeModelContent = this._register( + new k.Q5), this.onDidChangeModelContent = this._onDidChangeModelContent + .event, this._onDidChangeModelLanguage = this._register(new k.Q5), + this.onDidChangeModelLanguage = this._onDidChangeModelLanguage.event, + this._onDidChangeModelLanguageConfiguration = this._register(new k.Q5), + this.onDidChangeModelLanguageConfiguration = this._onDidChangeModelLanguageConfiguration + .event, this._onDidChangeModelOptions = this._register(new k.Q5), + this.onDidChangeModelOptions = this._onDidChangeModelOptions.event, + this._onDidChangeModelDecorations = this._register(new k.Q5), this.onDidChangeModelDecorations = + this._onDidChangeModelDecorations.event, this._onDidChangeConfiguration = + this._register(new k.Q5), this.onDidChangeConfiguration = this._onDidChangeConfiguration + .event, this._onDidChangeModel = this._register(new k.Q5), this.onDidChangeModel = + this._onDidChangeModel.event, this._onDidChangeCursorPosition = this + ._register(new k.Q5), this.onDidChangeCursorPosition = this._onDidChangeCursorPosition + .event, this._onDidChangeCursorSelection = this._register(new k.Q5), + this.onDidChangeCursorSelection = this._onDidChangeCursorSelection.event, + this._onDidAttemptReadOnlyEdit = this._register(new k.Q5), this.onDidAttemptReadOnlyEdit = + this._onDidAttemptReadOnlyEdit.event, this._onDidLayoutChange = this + ._register(new k.Q5), this.onDidLayoutChange = this._onDidLayoutChange + .event, this._editorTextFocus = this._register(new Ho), this.onDidFocusEditorText = + this._editorTextFocus.onDidChangeToTrue, this.onDidBlurEditorText = + this._editorTextFocus.onDidChangeToFalse, this._editorWidgetFocus = + this._register(new Ho), this.onDidFocusEditorWidget = this._editorWidgetFocus + .onDidChangeToTrue, this.onDidBlurEditorWidget = this._editorWidgetFocus + .onDidChangeToFalse, this._onWillType = this._register(new k.Q5), + this.onWillType = this._onWillType.event, this._onDidType = this._register( + new k.Q5), this.onDidType = this._onDidType.event, this._onDidCompositionStart = + this._register(new k.Q5), this.onDidCompositionStart = this._onDidCompositionStart + .event, this._onDidCompositionEnd = this._register(new k.Q5), this.onDidCompositionEnd = + this._onDidCompositionEnd.event, this._onDidPaste = this._register( + new k.Q5), this.onDidPaste = this._onDidPaste.event, this._onMouseUp = + this._register(new k.Q5), this.onMouseUp = this._onMouseUp.event, + this._onMouseDown = this._register(new k.Q5), this.onMouseDown = + this._onMouseDown.event, this._onMouseDrag = this._register(new k.Q5), + this.onMouseDrag = this._onMouseDrag.event, this._onMouseDrop = this + ._register(new k.Q5), this.onMouseDrop = this._onMouseDrop.event, + this._onMouseDropCanceled = this._register(new k.Q5), this.onMouseDropCanceled = + this._onMouseDropCanceled.event, this._onContextMenu = this._register( + new k.Q5), this.onContextMenu = this._onContextMenu.event, this._onMouseMove = + this._register(new k.Q5), this.onMouseMove = this._onMouseMove.event, + this._onMouseLeave = this._register(new k.Q5), this.onMouseLeave = + this._onMouseLeave.event, this._onMouseWheel = this._register(new k.Q5), + this.onMouseWheel = this._onMouseWheel.event, this._onKeyUp = this._register( + new k.Q5), this.onKeyUp = this._onKeyUp.event, this._onKeyDown = + this._register(new k.Q5), this.onKeyDown = this._onKeyDown.event, + this._onDidContentSizeChange = this._register(new k.Q5), this.onDidContentSizeChange = + this._onDidContentSizeChange.event, this._onDidScrollChange = this._register( + new k.Q5), this.onDidScrollChange = this._onDidScrollChange.event, + this._onDidChangeViewZones = this._register(new k.Q5), this.onDidChangeViewZones = + this._onDidChangeViewZones.event; + const h = Object.assign({}, t); + let u; + this._domElement = e, this._overflowWidgetsDomNode = h.overflowWidgetsDomNode, + delete h.overflowWidgetsDomNode, this._id = ++Wo, this._decorationTypeKeysToIds = {}, + this._decorationTypeSubtypes = {}, this.isSimpleWidget = i.isSimpleWidget || + !1, this._telemetryData = i.telemetryData, this._configuration = + this._register(this._createConfiguration(h, c)), this._register(this + ._configuration.onDidChange((e => { + this._onDidChangeConfiguration.fire(e); + const t = this._configuration.options; + if (e.hasChanged(130)) { + const e = t.get(130); + this._onDidLayoutChange.fire(e) + } + }))), this._contextKeyService = this._register(a.createScoped(this._domElement)), + this._notificationService = d, this._codeEditorService = r, this._commandService = + s, this._themeService = l, this._register(new Uo(this, this._contextKeyService)), + this._register(new jo(this, this._contextKeyService)), this._instantiationService = + n.createChild(new mo.y([go.i6, this._contextKeyService])), this._modelData = + null, this._contributions = {}, this._actions = {}, this._focusTracker = + new Ko(e), this._register(this._focusTracker.onChange((() => { + this._editorWidgetFocus.setValue(this._focusTracker.hasFocus()) + }))), this._contentWidgets = {}, this._overlayWidgets = {}, u = + Array.isArray(i.contributions) ? i.contributions : o.Uc.getEditorContributions(); + for (const e of u) + if (this._contributions[e.id])(0, x.dL)(new Error( + `Cannot have two contributions with the same id ${e.id}`)); + else try { + const t = this._instantiationService.createInstance(e.ctor, this); + this._contributions[e.id] = t + } catch (e) { + (0, x.dL)(e) + } + o.Uc.getEditorActions().forEach((e => { + if (this._actions[e.id]) return void(0, x.dL)(new Error( + `Cannot have two actions with the same id ${e.id}`)); + const t = new Pn.p(e.id, e.label, e.alias, (0, bo.f6)(e.precondition), ( + () => this._instantiationService.invokeFunction((t => Promise.resolve( + e.runEditorCommand(t, this, null))))), this._contextKeyService); + this._actions[t.id] = t + })), this._codeEditorService.addCodeEditor(this) + } + _createConfiguration(e, t) { + return new D.V(this.isSimpleWidget, e, this._domElement, t) + } + getId() { + return this.getEditorType() + ":" + this._id + } + getEditorType() { + return Fn.g.ICodeEditor + } + dispose() { + this._codeEditorService.removeCodeEditor(this), this._focusTracker.dispose(); + const e = Object.keys(this._contributions); + for (let t = 0, i = e.length; t < i; t++) { + const i = e[t]; + this._contributions[i].dispose() + } + this._contributions = {}, this._actions = {}, this._contentWidgets = {}, + this._overlayWidgets = {}, this._removeDecorationTypes(), this._postDetachModelCleanup( + this._detachModel()), this._onDidDispose.fire(), super.dispose() + } + invokeWithinContext(e) { + return this._instantiationService.invokeFunction(e) + } + updateOptions(e) { + this._configuration.updateOptions(e) + } + getOptions() { + return this._configuration.options + } + getOption(e) { + return this._configuration.options.get(e) + } + getRawOptions() { + return this._configuration.getRawOptions() + } + getOverflowWidgetsDomNode() { + return this._overflowWidgetsDomNode + } + getConfiguredWordAtPosition(e) { + return this._modelData ? Fo.w.getWordAtPosition(this._modelData.model, + this._configuration.options.get(116), e) : null + } + getValue(e = null) { + if (!this._modelData) return ""; + const t = !(!e || !e.preserveBOM); + let i = 0; + return e && e.lineEnding && "\n" === e.lineEnding ? i = 1 : e && e.lineEnding && + "\r\n" === e.lineEnding && (i = 2), this._modelData.model.getValue(i, + t) + } + setValue(e) { + this._modelData && this._modelData.model.setValue(e) + } + getModel() { + return this._modelData ? this._modelData.model : null + } + setModel(e = null) { + const t = e; + if (null === this._modelData && null === t) return; + if (this._modelData && this._modelData.model === t) return; + const i = this.hasTextFocus(), + n = this._detachModel(); + this._attachModel(t), i && this.hasModel() && this.focus(); + const o = { + oldModelUrl: n ? n.uri : null, + newModelUrl: t ? t.uri : null + }; + this._removeDecorationTypes(), this._onDidChangeModel.fire(o), this._postDetachModelCleanup( + n) + } + _removeDecorationTypes() { + if (this._decorationTypeKeysToIds = {}, this._decorationTypeSubtypes) { + for (let e in this._decorationTypeSubtypes) { + const t = this._decorationTypeSubtypes[e]; + for (let i in t) this._removeDecorationType(e + "-" + i) + } + this._decorationTypeSubtypes = {} + } + } + getVisibleRanges() { + return this._modelData ? this._modelData.viewModel.getVisibleRanges() : [] + } + getVisibleRangesPlusViewportAboveBelow() { + return this._modelData ? this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow() : [] + } + getWhitespaces() { + return this._modelData ? this._modelData.viewModel.viewLayout.getWhitespaces() : [] + } + static _getVerticalOffsetForPosition(e, t, i) { + const n = e.model.validatePosition({ + lineNumber: t, + column: i + }), + o = e.viewModel.coordinatesConverter.convertModelPositionToViewPosition( + n); + return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber) + } + getTopForLineNumber(t) { + return this._modelData ? e._getVerticalOffsetForPosition(this._modelData, + t, 1) : -1 + } + getTopForPosition(t, i) { + return this._modelData ? e._getVerticalOffsetForPosition(this._modelData, + t, i) : -1 + } + setHiddenAreas(e) { + this._modelData && this._modelData.viewModel.setHiddenAreas(e.map((e => + _e.e.lift(e)))) + } + getVisibleColumnFromPosition(e) { + if (!this._modelData) return e.column; + const t = this._modelData.model.validatePosition(e), + i = this._modelData.model.getOptions().tabSize; + return be.io.visibleColumnFromColumn(this._modelData.model.getLineContent( + t.lineNumber), t.column, i) + 1 + } + getPosition() { + return this._modelData ? this._modelData.viewModel.getPosition() : + null + } + setPosition(e) { + if (this._modelData) { + if (!fe.L.isIPosition(e)) throw new Error("Invalid arguments"); + this._modelData.viewModel.setSelections("api", [{ + selectionStartLineNumber: e.lineNumber, + selectionStartColumn: e.column, + positionLineNumber: e.lineNumber, + positionColumn: e.column + }]) + } + } + _sendRevealRange(e, t, i, n) { + if (!this._modelData) return; + if (!_e.e.isIRange(e)) throw new Error("Invalid arguments"); + const o = this._modelData.model.validateRange(e), + r = this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange( + o); + this._modelData.viewModel.revealRange("api", i, r, t, n) + } + revealLine(e, t = 0) { + this._revealLine(e, 0, t) + } + revealLineInCenter(e, t = 0) { + this._revealLine(e, 1, t) + } + revealLineInCenterIfOutsideViewport(e, t = 0) { + this._revealLine(e, 2, t) + } + revealLineNearTop(e, t = 0) { + this._revealLine(e, 5, t) + } + _revealLine(e, t, i) { + if ("number" != typeof e) throw new Error("Invalid arguments"); + this._sendRevealRange(new _e.e(e, 1, e, 1), t, !1, i) + } + revealPosition(e, t = 0) { + this._revealPosition(e, 0, !0, t) + } + revealPositionInCenter(e, t = 0) { + this._revealPosition(e, 1, !0, t) + } + revealPositionInCenterIfOutsideViewport(e, t = 0) { + this._revealPosition(e, 2, !0, t) + } + revealPositionNearTop(e, t = 0) { + this._revealPosition(e, 5, !0, t) + } + _revealPosition(e, t, i, n) { + if (!fe.L.isIPosition(e)) throw new Error("Invalid arguments"); + this._sendRevealRange(new _e.e(e.lineNumber, e.column, e.lineNumber, + e.column), t, i, n) + } + getSelection() { + return this._modelData ? this._modelData.viewModel.getSelection() : + null + } + getSelections() { + return this._modelData ? this._modelData.viewModel.getSelections() : + null + } + setSelection(e) { + const t = T.Y.isISelection(e), + i = _e.e.isIRange(e); + if (!t && !i) throw new Error("Invalid arguments"); + if (t) this._setSelectionImpl(e); + else if (i) { + const t = { + selectionStartLineNumber: e.startLineNumber, + selectionStartColumn: e.startColumn, + positionLineNumber: e.endLineNumber, + positionColumn: e.endColumn + }; + this._setSelectionImpl(t) + } + } + _setSelectionImpl(e) { + if (!this._modelData) return; + const t = new T.Y(e.selectionStartLineNumber, e.selectionStartColumn, + e.positionLineNumber, e.positionColumn); + this._modelData.viewModel.setSelections("api", [t]) + } + revealLines(e, t, i = 0) { + this._revealLines(e, t, 0, i) + } + revealLinesInCenter(e, t, i = 0) { + this._revealLines(e, t, 1, i) + } + revealLinesInCenterIfOutsideViewport(e, t, i = 0) { + this._revealLines(e, t, 2, i) + } + revealLinesNearTop(e, t, i = 0) { + this._revealLines(e, t, 5, i) + } + _revealLines(e, t, i, n) { + if ("number" != typeof e || "number" != typeof t) throw new Error( + "Invalid arguments"); + this._sendRevealRange(new _e.e(e, 1, t, 1), i, !1, n) + } + revealRange(e, t = 0, i = !1, n = !0) { + this._revealRange(e, i ? 1 : 0, n, t) + } + revealRangeInCenter(e, t = 0) { + this._revealRange(e, 1, !0, t) + } + revealRangeInCenterIfOutsideViewport(e, t = 0) { + this._revealRange(e, 2, !0, t) + } + revealRangeNearTop(e, t = 0) { + this._revealRange(e, 5, !0, t) + } + revealRangeNearTopIfOutsideViewport(e, t = 0) { + this._revealRange(e, 6, !0, t) + } + revealRangeAtTop(e, t = 0) { + this._revealRange(e, 3, !0, t) + } + _revealRange(e, t, i, n) { + if (!_e.e.isIRange(e)) throw new Error("Invalid arguments"); + this._sendRevealRange(_e.e.lift(e), t, i, n) + } + setSelections(e, t = "api", i = 0) { + if (this._modelData) { + if (!e || 0 === e.length) throw new Error("Invalid arguments"); + for (let t = 0, i = e.length; t < i; t++) + if (!T.Y.isISelection(e[t])) throw new Error("Invalid arguments"); + this._modelData.viewModel.setSelections(t, e, i) + } + } + getContentWidth() { + return this._modelData ? this._modelData.viewModel.viewLayout.getContentWidth() : + -1 + } + getScrollWidth() { + return this._modelData ? this._modelData.viewModel.viewLayout.getScrollWidth() : + -1 + } + getScrollLeft() { + return this._modelData ? this._modelData.viewModel.viewLayout.getCurrentScrollLeft() : + -1 + } + getContentHeight() { + return this._modelData ? this._modelData.viewModel.viewLayout.getContentHeight() : + -1 + } + getScrollHeight() { + return this._modelData ? this._modelData.viewModel.viewLayout.getScrollHeight() : + -1 + } + getScrollTop() { + return this._modelData ? this._modelData.viewModel.viewLayout.getCurrentScrollTop() : + -1 + } + setScrollLeft(e, t = 1) { + if (this._modelData) { + if ("number" != typeof e) throw new Error("Invalid arguments"); + this._modelData.viewModel.setScrollPosition({ + scrollLeft: e + }, t) + } + } + setScrollTop(e, t = 1) { + if (this._modelData) { + if ("number" != typeof e) throw new Error("Invalid arguments"); + this._modelData.viewModel.setScrollPosition({ + scrollTop: e + }, t) + } + } + setScrollPosition(e, t = 1) { + this._modelData && this._modelData.viewModel.setScrollPosition(e, t) + } + saveViewState() { + if (!this._modelData) return null; + const e = {}, + t = Object.keys(this._contributions); + for (const i of t) { + const t = this._contributions[i]; + "function" == typeof t.saveViewState && (e[i] = t.saveViewState()) + } + return { + cursorState: this._modelData.viewModel.saveCursorState(), + viewState: this._modelData.viewModel.saveState(), + contributionsState: e + } + } + restoreViewState(e) { + if (!this._modelData || !this._modelData.hasRealView) return; + const t = e; + if (t && t.cursorState && t.viewState) { + const e = t.cursorState; + Array.isArray(e) ? this._modelData.viewModel.restoreCursorState(e) : + this._modelData.viewModel.restoreCursorState([e]); + const i = t.contributionsState || {}, + n = Object.keys(this._contributions); + for (let e = 0, t = n.length; e < t; e++) { + const t = n[e], + o = this._contributions[t]; + "function" == typeof o.restoreViewState && o.restoreViewState(i[t]) + } + const o = this._modelData.viewModel.reduceRestoreState(t.viewState); + this._modelData.view.restoreState(o) + } + } + getContribution(e) { + return this._contributions[e] || null + } + getActions() { + const e = [], + t = Object.keys(this._actions); + for (let i = 0, n = t.length; i < n; i++) { + const n = t[i]; + e.push(this._actions[n]) + } + return e + } + getSupportedActions() { + let e = this.getActions(); + return e = e.filter((e => e.isSupported())), e + } + getAction(e) { + return this._actions[e] || null + } + trigger(e, t, i) { + switch (i = i || {}, t) { + case "compositionStart": + return void this._startComposition(); + case "compositionEnd": + return void this._endComposition(e); + case "type": + { + const t = i; + return void this._type(e, t.text || "") + } + case "replacePreviousChar": + { + const t = i; + return void this._compositionType(e, t.text || "", t.replaceCharCnt || + 0, 0, 0) + } + case "compositionType": + { + const t = i; + return void this._compositionType(e, t.text || "", t.replacePrevCharCnt || + 0, t.replaceNextCharCnt || 0, t.positionDelta || 0) + } + case "paste": + { + const t = i; + return void this._paste(e, t.text || "", t.pasteOnNewLine || !1, t + .multicursorText || null, t.mode || null) + } + case "cut": + return void this._cut(e) + } + const n = this.getAction(t); + n ? Promise.resolve(n.run()).then(void 0, x.dL) : this._modelData && + (this._triggerEditorCommand(e, t, i) || this._triggerCommand(t, i)) + } + _triggerCommand(e, t) { + this._commandService.executeCommand(e, t) + } + _startComposition() { + this._modelData && (this._modelData.viewModel.startComposition(), + this._onDidCompositionStart.fire()) + } + _endComposition(e) { + this._modelData && (this._modelData.viewModel.endComposition(e), this + ._onDidCompositionEnd.fire()) + } + _type(e, t) { + this._modelData && 0 !== t.length && ("keyboard" === e && this._onWillType + .fire(t), this._modelData.viewModel.type(t, e), "keyboard" === e && + this._onDidType.fire(t)) + } + _compositionType(e, t, i, n, o) { + this._modelData && this._modelData.viewModel.compositionType(t, i, n, + o, e) + } + _paste(e, t, i, n, o) { + if (!this._modelData || 0 === t.length) return; + const r = this._modelData.viewModel.getSelection().getStartPosition(); + this._modelData.viewModel.paste(t, i, n, e); + const s = this._modelData.viewModel.getSelection().getStartPosition(); + "keyboard" === e && this._onDidPaste.fire({ + range: new _e.e(r.lineNumber, r.column, s.lineNumber, s.column), + mode: o + }) + } + _cut(e) { + this._modelData && this._modelData.viewModel.cut(e) + } + _triggerEditorCommand(e, t, i) { + const n = o.Uc.getEditorCommand(t); + return !!n && ((i = i || {}).source = e, this._instantiationService.invokeFunction( + (e => { + Promise.resolve(n.runEditorCommand(e, this, i)).then(void 0, x.dL) + })), !0) + } + _getViewModel() { + return this._modelData ? this._modelData.viewModel : null + } + pushUndoStop() { + return !!this._modelData && !this._configuration.options.get(80) && ( + this._modelData.model.pushStackElement(), !0) + } + popUndoStop() { + return !!this._modelData && !this._configuration.options.get(80) && ( + this._modelData.model.popStackElement(), !0) + } + executeEdits(e, t, i) { + if (!this._modelData) return !1; + if (this._configuration.options.get(80)) return !1; + let n; + return n = i ? Array.isArray(i) ? () => i : i : () => null, this._modelData + .viewModel.executeEdits(e, t, n), !0 + } + executeCommand(e, t) { + this._modelData && this._modelData.viewModel.executeCommand(t, e) + } + executeCommands(e, t) { + this._modelData && this._modelData.viewModel.executeCommands(t, e) + } + changeDecorations(e) { + return this._modelData ? this._modelData.model.changeDecorations(e, + this._id) : null + } + getLineDecorations(e) { + return this._modelData ? this._modelData.model.getLineDecorations(e, + this._id, (0, re.$J)(this._configuration.options)) : null + } + deltaDecorations(e, t) { + return this._modelData ? 0 === e.length && 0 === t.length ? e : this._modelData + .model.deltaDecorations(e, t, this._id) : [] + } + removeDecorations(e) { + const t = this._decorationTypeKeysToIds[e]; + t && this.deltaDecorations(t, []), this._decorationTypeKeysToIds.hasOwnProperty( + e) && delete this._decorationTypeKeysToIds[e], this._decorationTypeSubtypes + .hasOwnProperty(e) && delete this._decorationTypeSubtypes[e] + } + getLayoutInfo() { + return this._configuration.options.get(130) + } + createOverviewRuler(e) { + return this._modelData && this._modelData.hasRealView ? this._modelData + .view.createOverviewRuler(e) : null + } + getContainerDomNode() { + return this._domElement + } + getDomNode() { + return this._modelData && this._modelData.hasRealView ? this._modelData + .view.domNode.domNode : null + } + delegateVerticalScrollbarMouseDown(e) { + this._modelData && this._modelData.hasRealView && this._modelData.view + .delegateVerticalScrollbarMouseDown(e) + } + layout(e) { + this._configuration.observeReferenceElement(e), this.render() + } + focus() { + this._modelData && this._modelData.hasRealView && this._modelData.view + .focus() + } + hasTextFocus() { + return !(!this._modelData || !this._modelData.hasRealView) && this._modelData + .view.isFocused() + } + hasWidgetFocus() { + return this._focusTracker && this._focusTracker.hasFocus() + } + addContentWidget(e) { + const t = { + widget: e, + position: e.getPosition() + }; + this._contentWidgets.hasOwnProperty(e.getId()) && console.warn( + "Overwriting a content widget with the same id."), this._contentWidgets[ + e.getId()] = t, this._modelData && this._modelData.hasRealView && + this._modelData.view.addContentWidget(t) + } + layoutContentWidget(e) { + const t = e.getId(); + if (this._contentWidgets.hasOwnProperty(t)) { + const i = this._contentWidgets[t]; + i.position = e.getPosition(), this._modelData && this._modelData.hasRealView && + this._modelData.view.layoutContentWidget(i) + } + } + removeContentWidget(e) { + const t = e.getId(); + if (this._contentWidgets.hasOwnProperty(t)) { + const e = this._contentWidgets[t]; + delete this._contentWidgets[t], this._modelData && this._modelData.hasRealView && + this._modelData.view.removeContentWidget(e) + } + } + addOverlayWidget(e) { + const t = { + widget: e, + position: e.getPosition() + }; + this._overlayWidgets.hasOwnProperty(e.getId()) && console.warn( + "Overwriting an overlay widget with the same id."), this._overlayWidgets[ + e.getId()] = t, this._modelData && this._modelData.hasRealView && + this._modelData.view.addOverlayWidget(t) + } + layoutOverlayWidget(e) { + const t = e.getId(); + if (this._overlayWidgets.hasOwnProperty(t)) { + const i = this._overlayWidgets[t]; + i.position = e.getPosition(), this._modelData && this._modelData.hasRealView && + this._modelData.view.layoutOverlayWidget(i) + } + } + removeOverlayWidget(e) { + const t = e.getId(); + if (this._overlayWidgets.hasOwnProperty(t)) { + const e = this._overlayWidgets[t]; + delete this._overlayWidgets[t], this._modelData && this._modelData.hasRealView && + this._modelData.view.removeOverlayWidget(e) + } + } + changeViewZones(e) { + this._modelData && this._modelData.hasRealView && this._modelData.view + .change(e) + } + getTargetAtClientPoint(e, t) { + return this._modelData && this._modelData.hasRealView ? this._modelData + .view.getTargetAtClientPoint(e, t) : null + } + getScrolledVisiblePosition(t) { + if (!this._modelData || !this._modelData.hasRealView) return null; + const i = this._modelData.model.validatePosition(t), + n = this._configuration.options, + o = n.get(130); + return { + top: e._getVerticalOffsetForPosition(this._modelData, i.lineNumber, + i.column) - this.getScrollTop(), + left: this._modelData.view.getOffsetForColumn(i.lineNumber, i.column) + + o.glyphMarginWidth + o.lineNumbersWidth + o.decorationsWidth - this + .getScrollLeft(), + height: n.get(58) + } + } + getOffsetForColumn(e, t) { + return this._modelData && this._modelData.hasRealView ? this._modelData + .view.getOffsetForColumn(e, t) : -1 + } + render(e = !1) { + this._modelData && this._modelData.hasRealView && this._modelData.view + .render(!0, e) + } + setAriaOptions(e) { + this._modelData && this._modelData.hasRealView && this._modelData.view + .setAriaOptions(e) + } + applyFontInfo(e) { + D.V.applyFontInfoSlow(e, this._configuration.options.get(42)) + } + _attachModel(e) { + if (!e) return void(this._modelData = null); + const t = []; + this._domElement.setAttribute("data-mode-id", e.getLanguageIdentifier() + .language), this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()), + this._configuration.setMaxLineNumber(e.getLineCount()), e.onBeforeAttached(); + const i = new ho(this._id, this._configuration, e, Mo.create(), So.create( + this._configuration.options), (e => S.jL(e))); + t.push(e.onDidChangeDecorations((e => this._onDidChangeModelDecorations + .fire(e)))), t.push(e.onDidChangeLanguage((t => { + this._domElement.setAttribute("data-mode-id", e.getLanguageIdentifier() + .language), this._onDidChangeModelLanguage.fire(t) + }))), t.push(e.onDidChangeLanguageConfiguration((e => this._onDidChangeModelLanguageConfiguration + .fire(e)))), t.push(e.onDidChangeContent((e => this._onDidChangeModelContent + .fire(e)))), t.push(e.onDidChangeOptions((e => this._onDidChangeModelOptions + .fire(e)))), t.push(e.onWillDispose((() => this.setModel(null)))), + t.push(i.onEvent((e => { + switch (e.kind) { + case 0: + this._onDidContentSizeChange.fire(e); + break; + case 1: + this._editorTextFocus.setValue(e.hasFocus); + break; + case 2: + this._onDidScrollChange.fire(e); + break; + case 3: + this._onDidChangeViewZones.fire(); + break; + case 4: + this._onDidAttemptReadOnlyEdit.fire(); + break; + case 5: + { + e.reachedMaxCursorCount && this._notificationService.warn(y.N( + "cursors.maximum", + "The number of cursors has been limited to {0}.", On.MAX_CURSOR_COUNT + )); + const t = []; + for (let i = 0, n = e.selections.length; i < n; i++) t[i] = e + .selections[i].getPosition(); + const i = { + position: t[0], + secondaryPositions: t.slice(1), + reason: e.reason, + source: e.source + }; + this._onDidChangeCursorPosition.fire(i); + const n = { + selection: e.selections[0], + secondarySelections: e.selections.slice(1), + modelVersionId: e.modelVersionId, + oldSelections: e.oldSelections, + oldModelVersionId: e.oldModelVersionId, + source: e.source, + reason: e.reason + }; + this._onDidChangeCursorSelection.fire(n); + break + } + } + }))); + const [n, o] = this._createView(i); + if (o) { + this._domElement.appendChild(n.domNode.domNode); + let t = Object.keys(this._contentWidgets); + for (let e = 0, i = t.length; e < i; e++) { + const i = t[e]; + n.addContentWidget(this._contentWidgets[i]) + } + t = Object.keys(this._overlayWidgets); + for (let e = 0, i = t.length; e < i; e++) { + const i = t[e]; + n.addOverlayWidget(this._overlayWidgets[i]) + } + n.render(!1, !0), n.domNode.domNode.setAttribute("data-uri", e.uri.toString()) + } + this._modelData = new zo(e, i, n, o, t) + } + _createView(e) { + let t; + t = this.isSimpleWidget ? { + paste: (e, t, i, n) => { + this._paste("keyboard", e, t, i, n) + }, + type: e => { + this._type("keyboard", e) + }, + compositionType: (e, t, i, n) => { + this._compositionType("keyboard", e, t, i, n) + }, + startComposition: () => { + this._startComposition() + }, + endComposition: () => { + this._endComposition("keyboard") + }, + cut: () => { + this._cut("keyboard") + } + } : { + paste: (e, t, i, n) => { + const o = { + text: e, + pasteOnNewLine: t, + multicursorText: i, + mode: n + }; + this._commandService.executeCommand("paste", o) + }, + type: e => { + const t = { + text: e + }; + this._commandService.executeCommand("type", t) + }, + compositionType: (e, t, i, n) => { + if (i || n) { + const o = { + text: e, + replacePrevCharCnt: t, + replaceNextCharCnt: i, + positionDelta: n + }; + this._commandService.executeCommand("compositionType", o) + } else { + const i = { + text: e, + replaceCharCnt: t + }; + this._commandService.executeCommand("replacePreviousChar", i) + } + }, + startComposition: () => { + this._commandService.executeCommand("compositionStart", {}) + }, + endComposition: () => { + this._commandService.executeCommand("compositionEnd", {}) + }, + cut: () => { + this._commandService.executeCommand("cut", {}) + } + }; + const i = new rt(e.coordinatesConverter); + return i.onKeyDown = e => this._onKeyDown.fire(e), i.onKeyUp = e => + this._onKeyUp.fire(e), i.onContextMenu = e => this._onContextMenu.fire( + e), i.onMouseMove = e => this._onMouseMove.fire(e), i.onMouseLeave = + e => this._onMouseLeave.fire(e), i.onMouseDown = e => this._onMouseDown + .fire(e), i.onMouseUp = e => this._onMouseUp.fire(e), i.onMouseDrag = + e => this._onMouseDrag.fire(e), i.onMouseDrop = e => this._onMouseDrop + .fire(e), i.onMouseDropCanceled = e => this._onMouseDropCanceled.fire( + e), i.onMouseWheel = e => this._onMouseWheel.fire(e), [new en(t, + this._configuration, this._themeService, e, i, this._overflowWidgetsDomNode + ), !0] + } + _postDetachModelCleanup(e) { + e && e.removeAllDecorationsWithOwnerId(this._id) + } + _detachModel() { + if (!this._modelData) return null; + const e = this._modelData.model, + t = this._modelData.hasRealView ? this._modelData.view.domNode.domNode : + null; + return this._modelData.dispose(), this._modelData = null, this._domElement + .removeAttribute("data-mode-id"), t && this._domElement.contains(t) && + this._domElement.removeChild(t), e + } + _removeDecorationType(e) { + this._codeEditorService.removeDecorationType(e) + } + hasModel() { + return null !== this._modelData + } + }; + Vo = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([Bo(3, po.TG), Bo(4, E.$), Bo(5, uo.H), Bo(6, go.i6), Bo(7, Ge.XE), Bo( + 8, fo.lT), Bo(9, _o.F)], Vo); + class Ho extends L.JT { + constructor() { + super(), this._onDidChangeToTrue = this._register(new k.Q5), this.onDidChangeToTrue = + this._onDidChangeToTrue.event, this._onDidChangeToFalse = this._register( + new k.Q5), this.onDidChangeToFalse = this._onDidChangeToFalse.event, + this._value = 0 + } + setValue(e) { + const t = e ? 2 : 1; + this._value !== t && (this._value = t, 2 === this._value ? this._onDidChangeToTrue + .fire() : 1 === this._value && this._onDidChangeToFalse.fire()) + } + } + class Uo extends L.JT { + constructor(e, t) { + super(), this._editor = e, t.createKey("editorId", e.getId()), this._editorSimpleInput = + Bn.u.editorSimpleInput.bindTo(t), this._editorFocus = Bn.u.focus.bindTo( + t), this._textInputFocus = Bn.u.textInputFocus.bindTo(t), this._editorTextFocus = + Bn.u.editorTextFocus.bindTo(t), this._editorTabMovesFocus = Bn.u.tabMovesFocus + .bindTo(t), this._editorReadonly = Bn.u.readOnly.bindTo(t), this._inDiffEditor = + Bn.u.inDiffEditor.bindTo(t), this._editorColumnSelection = Bn.u.columnSelection + .bindTo(t), this._hasMultipleSelections = Bn.u.hasMultipleSelections + .bindTo(t), this._hasNonEmptySelection = Bn.u.hasNonEmptySelection.bindTo( + t), this._canUndo = Bn.u.canUndo.bindTo(t), this._canRedo = Bn.u.canRedo + .bindTo(t), this._register(this._editor.onDidChangeConfiguration((() => + this._updateFromConfig()))), this._register(this._editor.onDidChangeCursorSelection( + (() => this._updateFromSelection()))), this._register(this._editor.onDidFocusEditorWidget( + (() => this._updateFromFocus()))), this._register(this._editor.onDidBlurEditorWidget( + (() => this._updateFromFocus()))), this._register(this._editor.onDidFocusEditorText( + (() => this._updateFromFocus()))), this._register(this._editor.onDidBlurEditorText( + (() => this._updateFromFocus()))), this._register(this._editor.onDidChangeModel( + (() => this._updateFromModel()))), this._register(this._editor.onDidChangeConfiguration( + (() => this._updateFromModel()))), this._updateFromConfig(), this._updateFromSelection(), + this._updateFromFocus(), this._updateFromModel(), this._editorSimpleInput + .set(this._editor.isSimpleWidget) + } + _updateFromConfig() { + const e = this._editor.getOptions(); + this._editorTabMovesFocus.set(e.get(129)), this._editorReadonly.set(e + .get(80)), this._inDiffEditor.set(e.get(53)), this._editorColumnSelection + .set(e.get(17)) + } + _updateFromSelection() { + const e = this._editor.getSelections(); + e ? (this._hasMultipleSelections.set(e.length > 1), this._hasNonEmptySelection + .set(e.some((e => !e.isEmpty())))) : (this._hasMultipleSelections.reset(), + this._hasNonEmptySelection.reset()) + } + _updateFromFocus() { + this._editorFocus.set(this._editor.hasWidgetFocus() && !this._editor.isSimpleWidget), + this._editorTextFocus.set(this._editor.hasTextFocus() && !this._editor + .isSimpleWidget), this._textInputFocus.set(this._editor.hasTextFocus()) + } + _updateFromModel() { + const e = this._editor.getModel(); + this._canUndo.set(Boolean(e && e.canUndo())), this._canRedo.set( + Boolean(e && e.canRedo())) + } + } + class jo extends L.JT { + constructor(e, t) { + super(), this._editor = e, this._contextKeyService = t, this._langId = + Bn.u.languageId.bindTo(t), this._hasCompletionItemProvider = Bn.u.hasCompletionItemProvider + .bindTo(t), this._hasCodeActionsProvider = Bn.u.hasCodeActionsProvider + .bindTo(t), this._hasCodeLensProvider = Bn.u.hasCodeLensProvider.bindTo( + t), this._hasDefinitionProvider = Bn.u.hasDefinitionProvider.bindTo( + t), this._hasDeclarationProvider = Bn.u.hasDeclarationProvider.bindTo( + t), this._hasImplementationProvider = Bn.u.hasImplementationProvider + .bindTo(t), this._hasTypeDefinitionProvider = Bn.u.hasTypeDefinitionProvider + .bindTo(t), this._hasHoverProvider = Bn.u.hasHoverProvider.bindTo(t), + this._hasDocumentHighlightProvider = Bn.u.hasDocumentHighlightProvider + .bindTo(t), this._hasDocumentSymbolProvider = Bn.u.hasDocumentSymbolProvider + .bindTo(t), this._hasReferenceProvider = Bn.u.hasReferenceProvider.bindTo( + t), this._hasRenameProvider = Bn.u.hasRenameProvider.bindTo(t), + this._hasSignatureHelpProvider = Bn.u.hasSignatureHelpProvider.bindTo( + t), this._hasInlayHintsProvider = Bn.u.hasInlayHintsProvider.bindTo( + t), this._hasDocumentFormattingProvider = Bn.u.hasDocumentFormattingProvider + .bindTo(t), this._hasDocumentSelectionFormattingProvider = Bn.u.hasDocumentSelectionFormattingProvider + .bindTo(t), this._hasMultipleDocumentFormattingProvider = Bn.u.hasMultipleDocumentFormattingProvider + .bindTo(t), this._hasMultipleDocumentSelectionFormattingProvider = + Bn.u.hasMultipleDocumentSelectionFormattingProvider.bindTo(t), this._isInWalkThrough = + Bn.u.isInWalkThroughSnippet.bindTo(t); + const i = () => this._update(); + this._register(e.onDidChangeModel(i)), this._register(e.onDidChangeModelLanguage( + i)), this._register(ti.KZ.onDidChange(i)), this._register(ti.H9.onDidChange( + i)), this._register(ti.He.onDidChange(i)), this._register(ti.Ct.onDidChange( + i)), this._register(ti.RN.onDidChange(i)), this._register(ti.vI.onDidChange( + i)), this._register(ti.tA.onDidChange(i)), this._register(ti.xp.onDidChange( + i)), this._register(ti.vH.onDidChange(i)), this._register(ti.vJ.onDidChange( + i)), this._register(ti.FL.onDidChange(i)), this._register(ti.G0.onDidChange( + i)), this._register(ti.Az.onDidChange(i)), this._register(ti.vN.onDidChange( + i)), this._register(ti.nD.onDidChange(i)), this._register(ti.mX.onDidChange( + i)), i() + } + dispose() { + super.dispose() + } + reset() { + this._contextKeyService.bufferChangeEvents((() => { + this._langId.reset(), this._hasCompletionItemProvider.reset(), + this._hasCodeActionsProvider.reset(), this._hasCodeLensProvider.reset(), + this._hasDefinitionProvider.reset(), this._hasDeclarationProvider + .reset(), this._hasImplementationProvider.reset(), this._hasTypeDefinitionProvider + .reset(), this._hasHoverProvider.reset(), this._hasDocumentHighlightProvider + .reset(), this._hasDocumentSymbolProvider.reset(), this._hasReferenceProvider + .reset(), this._hasRenameProvider.reset(), this._hasDocumentFormattingProvider + .reset(), this._hasDocumentSelectionFormattingProvider.reset(), + this._hasSignatureHelpProvider.reset(), this._isInWalkThrough.reset() + })) + } + _update() { + const e = this._editor.getModel(); + e ? this._contextKeyService.bufferChangeEvents((() => { + this._langId.set(e.getLanguageIdentifier().language), this._hasCompletionItemProvider + .set(ti.KZ.has(e)), this._hasCodeActionsProvider.set(ti.H9.has(e)), + this._hasCodeLensProvider.set(ti.He.has(e)), this._hasDefinitionProvider + .set(ti.Ct.has(e)), this._hasDeclarationProvider.set(ti.RN.has(e)), + this._hasImplementationProvider.set(ti.vI.has(e)), this._hasTypeDefinitionProvider + .set(ti.tA.has(e)), this._hasHoverProvider.set(ti.xp.has(e)), + this._hasDocumentHighlightProvider.set(ti.vH.has(e)), this._hasDocumentSymbolProvider + .set(ti.vJ.has(e)), this._hasReferenceProvider.set(ti.FL.has(e)), + this._hasRenameProvider.set(ti.G0.has(e)), this._hasSignatureHelpProvider + .set(ti.nD.has(e)), this._hasInlayHintsProvider.set(ti.mX.has(e)), + this._hasDocumentFormattingProvider.set(ti.Az.has(e) || ti.vN.has( + e)), this._hasDocumentSelectionFormattingProvider.set(ti.vN.has( + e)), this._hasMultipleDocumentFormattingProvider.set(ti.Az.all( + e).length + ti.vN.all(e).length > 1), this._hasMultipleDocumentSelectionFormattingProvider + .set(ti.vN.all(e).length > 1), this._isInWalkThrough.set(e.uri.scheme === + N.lg.walkThroughSnippet) + })) : this.reset() + } + } + class Ko extends L.JT { + constructor(e) { + super(), this._onChange = this._register(new k.Q5), this.onChange = + this._onChange.event, this._hasFocus = !1, this._domFocusTracker = + this._register(S.go(e)), this._register(this._domFocusTracker.onDidFocus( + (() => { + this._hasFocus = !0, this._onChange.fire(void 0) + }))), this._register(this._domFocusTracker.onDidBlur((() => { + this._hasFocus = !1, this._onChange.fire(void 0) + }))) + } + hasFocus() { + return this._hasFocus + } + } + const $o = encodeURIComponent( + "" + ); + + function Zo(e) { + return $o + encodeURIComponent(e.toString()) + qo + } + const Go = encodeURIComponent( + '' + ); + (0, Ge.Ic)(((e, t) => { + const i = e.getColor(oi.b6); + i && t.addRule( + `.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }` + ); + const n = e.getColor(oi.lX); + n && t.addRule( + `.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${Zo(n)}") repeat-x bottom left; }` + ); + const o = e.getColor(oi.A2); + o && t.addRule( + `.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${o}; }` + ); + const r = e.getColor(oi.pW); + r && t.addRule( + `.monaco-editor .squiggly-warning { border-bottom: 4px double ${r}; }` + ); + const s = e.getColor(oi.uo); + s && t.addRule( + `.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${Zo(s)}") repeat-x bottom left; }` + ); + const a = e.getColor(oi.gp); + a && t.addRule( + `.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }` + ); + const l = e.getColor(oi.T8); + l && t.addRule( + `.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`); + const d = e.getColor(oi.c6); + d && t.addRule( + `.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${Zo(d)}") repeat-x bottom left; }` + ); + const c = e.getColor(oi.fe); + c && t.addRule( + `.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${c}; }` + ); + const h = e.getColor(oi.fE); + h && t.addRule( + `.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${h}; }`); + const u = e.getColor(oi.Du); + u && t.addRule( + `.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return Go+encodeURIComponent(e.toString())+Yo}(u)}") no-repeat bottom left; }` + ); + const g = e.getColor(Ze.zu); + g && t.addRule( + `.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${g.rgba.a}; }` + ); + const p = e.getColor(Ze.kp); + p && t.addRule( + `.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${p}; }` + ); + const m = e.getColor(oi.NO) || "inherit"; + t.addRule( + `.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${m}}` + ) + })) + }, + 4527: (e, t, i) => { + "use strict"; + i.d(t, { + H: () => g + }); + var n = i(6248), + o = i(1640), + r = i(6341), + s = i(4565), + a = i(8819), + l = i(2065), + d = i(9422), + c = i(7781), + h = i(1106), + u = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let g = class extends r.Gm { + constructor(e, t, i, n, o, r, s, a, l, d) { + super(e, Object.assign(Object.assign({}, i.getRawOptions()), { + overflowWidgetsDomNode: i.getOverflowWidgetsDomNode() + }), {}, n, o, r, s, a, l, d), this._parentEditor = i, this._overwriteOptions = + t, super.updateOptions(this._overwriteOptions), this._register(i.onDidChangeConfiguration( + (e => this._onParentConfigurationChanged(e)))) + } + getParentEditor() { + return this._parentEditor + } + _onParentConfigurationChanged(e) { + super.updateOptions(this._parentEditor.getRawOptions()), super.updateOptions( + this._overwriteOptions) + } + updateOptions(e) { + n.jB(this._overwriteOptions, e, !0), super.updateOptions(this._overwriteOptions) + } + }; + g = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([u(3, l.TG), u(4, o.$), u(5, s.H), u(6, a.i6), u(7, c.XE), u(8, d.lT), + u(9, h.F) + ], g) + }, + 1329: (e, t, i) => { + "use strict"; + i.d(t, { + T4: () => o, + OY: () => r, + Sj: () => s, + Uo: () => a, + hP: () => l + }); + var n = i(3860); + class o { + constructor(e, t, i = !1) { + this._range = e, this._text = t, this.insertsAutoWhitespace = i + } + getEditOperations(e, t) { + t.addTrackedEditOperation(this._range, this._text) + } + computeCursorState(e, t) { + let i = t.getInverseEditOperations()[0].range; + return new n.Y(i.endLineNumber, i.endColumn, i.endLineNumber, i.endColumn) + } + } + class r { + constructor(e, t) { + this._range = e, this._text = t + } + getEditOperations(e, t) { + t.addTrackedEditOperation(this._range, this._text) + } + computeCursorState(e, t) { + const i = t.getInverseEditOperations()[0].range; + return new n.Y(i.startLineNumber, i.startColumn, i.endLineNumber, i.endColumn) + } + } + class s { + constructor(e, t, i = !1) { + this._range = e, this._text = t, this.insertsAutoWhitespace = i + } + getEditOperations(e, t) { + t.addTrackedEditOperation(this._range, this._text) + } + computeCursorState(e, t) { + let i = t.getInverseEditOperations()[0].range; + return new n.Y(i.startLineNumber, i.startColumn, i.startLineNumber, i.startColumn) + } + } + class a { + constructor(e, t, i, n, o = !1) { + this._range = e, this._text = t, this._columnDeltaOffset = n, this._lineNumberDeltaOffset = + i, this.insertsAutoWhitespace = o + } + getEditOperations(e, t) { + t.addTrackedEditOperation(this._range, this._text) + } + computeCursorState(e, t) { + let i = t.getInverseEditOperations()[0].range; + return new n.Y(i.endLineNumber + this._lineNumberDeltaOffset, i.endColumn + + this._columnDeltaOffset, i.endLineNumber + this._lineNumberDeltaOffset, + i.endColumn + this._columnDeltaOffset) + } + } + class l { + constructor(e, t, i, n = !1) { + this._range = e, this._text = t, this._initialSelection = i, this._forceMoveMarkers = + n, this._selectionId = null + } + getEditOperations(e, t) { + t.addTrackedEditOperation(this._range, this._text, this._forceMoveMarkers), + this._selectionId = t.trackSelection(this._initialSelection) + } + computeCursorState(e, t) { + return t.getTrackedSelection(this._selectionId) + } + } + }, + 291: (e, t, i) => { + "use strict"; + i.d(t, { + U: () => c + }); + var n = i(7295), + o = i(3181), + r = i(4314), + s = i(3860), + a = i(3831); + const l = Object.create(null); + + function d(e, t) { + if (t <= 0) return ""; + l[e] || (l[e] = ["", e]); + const i = l[e]; + for (let n = i.length; n <= t; n++) i[n] = i[n - 1] + e; + return i[t] + } + class c { + constructor(e, t) { + this._opts = t, this._selection = e, this._selectionId = null, this._useLastEditRangeForCursorEndPosition = ! + 1, this._selectionStartColumnStaysPut = !1 + } + static unshiftIndent(e, t, i, n, r) { + const s = o.io.visibleColumnFromColumn(e, t, i); + if (r) { + const e = d(" ", n); + return d(e, o.io.prevIndentTabStop(s, n) / n) + } + return d("\t", o.io.prevRenderTabStop(s, i) / i) + } + static shiftIndent(e, t, i, n, r) { + const s = o.io.visibleColumnFromColumn(e, t, i); + if (r) { + const e = d(" ", n); + return d(e, o.io.nextIndentTabStop(s, n) / n) + } + return d("\t", o.io.nextRenderTabStop(s, i) / i) + } + _addEditOperation(e, t, i) { + this._useLastEditRangeForCursorEndPosition ? e.addTrackedEditOperation( + t, i) : e.addEditOperation(t, i) + } + getEditOperations(e, t) { + const i = this._selection.startLineNumber; + let s = this._selection.endLineNumber; + 1 === this._selection.endColumn && i !== s && (s -= 1); + const { + tabSize: l, + indentSize: h, + insertSpaces: u + } = this._opts, g = i === s; + if (this._opts.useTabStops) { + this._selection.isEmpty() && /^\s*$/.test(e.getLineContent(i)) && ( + this._useLastEditRangeForCursorEndPosition = !0); + let d = 0, + p = 0; + for (let m = i; m <= s; m++, d = p) { + p = 0; + let s, f = e.getLineContent(m), + _ = n.LC(f); + if ((!this._opts.isUnshift || 0 !== f.length && 0 !== _) && (g || + this._opts.isUnshift || 0 !== f.length)) { + if (-1 === _ && (_ = f.length), m > 1 && o.io.visibleColumnFromColumn( + f, _ + 1, l) % h != 0 && e.isCheapToTokenize(m - 1)) { + let t = a.zu.getEnterAction(this._opts.autoIndent, e, new r.e(m - + 1, e.getLineMaxColumn(m - 1), m - 1, e.getLineMaxColumn(m - 1))); + if (t) { + if (p = d, t.appendText) + for (let e = 0, i = t.appendText.length; e < i && p < h && 32 === + t.appendText.charCodeAt(e); e++) p++; + t.removeText && (p = Math.max(0, p - t.removeText)); + for (let e = 0; e < p && 0 !== _ && 32 === f.charCodeAt(_ - 1); e++) + _-- + } + } + this._opts.isUnshift && 0 === _ || (s = this._opts.isUnshift ? c.unshiftIndent( + f, _ + 1, l, h, u) : c.shiftIndent(f, _ + 1, l, h, u), this._addEditOperation( + t, new r.e(m, 1, m, _ + 1), s), m !== i || this._selection.isEmpty() || + (this._selectionStartColumnStaysPut = this._selection.startColumn <= + _ + 1)) + } + } + } else { + !this._opts.isUnshift && this._selection.isEmpty() && 0 === e.getLineLength( + i) && (this._useLastEditRangeForCursorEndPosition = !0); + const o = u ? d(" ", h) : "\t"; + for (let a = i; a <= s; a++) { + const s = e.getLineContent(a); + let l = n.LC(s); + if ((!this._opts.isUnshift || 0 !== s.length && 0 !== l) && (g || + this._opts.isUnshift || 0 !== s.length) && (-1 === l && (l = s.length), ! + this._opts.isUnshift || 0 !== l)) + if (this._opts.isUnshift) { + l = Math.min(l, h); + for (let e = 0; e < l; e++) + if (9 === s.charCodeAt(e)) { + l = e + 1; + break + } + this._addEditOperation(t, new r.e(a, 1, a, l + 1), "") + } else this._addEditOperation(t, new r.e(a, 1, a, 1), o), a !== i || + this._selection.isEmpty() || (this._selectionStartColumnStaysPut = + 1 === this._selection.startColumn) + } + } + this._selectionId = t.trackSelection(this._selection) + } + computeCursorState(e, t) { + if (this._useLastEditRangeForCursorEndPosition) { + let e = t.getInverseEditOperations()[0]; + return new s.Y(e.range.endLineNumber, e.range.endColumn, e.range.endLineNumber, + e.range.endColumn) + } + const i = t.getTrackedSelection(this._selectionId); + if (this._selectionStartColumnStaysPut) { + let e = this._selection.startColumn; + return i.startColumn <= e ? i : 0 === i.getDirection() ? new s.Y(i.startLineNumber, + e, i.endLineNumber, i.endColumn) : new s.Y(i.endLineNumber, i.endColumn, + i.startLineNumber, e) + } + return i + } + } + }, + 6345: (e, t, i) => { + "use strict"; + i.d(t, { + nG: () => p, + fv: () => w, + ei: () => N, + Pe: () => D + }); + var n = i(3580), + o = i(4669), + r = i(5976), + s = i(6248), + a = i(9488), + l = i(4141), + d = i(2334), + c = i(7374), + h = i(3193), + u = i(9872), + g = i(6626); + const p = new class { + constructor() { + this._tabFocus = !1, this._onDidChangeTabFocus = new o.Q5, this.onDidChangeTabFocus = + this._onDidChangeTabFocus.event + } + getTabFocusMode() { + return this._tabFocus + } + setTabFocusMode(e) { + this._tabFocus !== e && (this._tabFocus = e, this._onDidChangeTabFocus + .fire(this._tabFocus)) + } + }, + m = Object.hasOwnProperty; + class f { + constructor() { + this._values = [] + } + _read(e) { + return this._values[e] + } + get(e) { + return this._values[e] + } + _write(e, t) { + this._values[e] = t + } + } + class _ { + constructor() { + this._values = [] + } + _read(e) { + return this._values[e] + } + _write(e, t) { + this._values[e] = t + } + } + class b { + static readOptions(e) { + const t = e, + i = new _; + for (const e of l.Bc) { + const n = "_never_" === e.name ? void 0 : t[e.name]; + i._write(e.id, n) + } + return i + } + static validateOptions(e) { + const t = new l.hu; + for (const i of l.Bc) t._write(i.id, i.validate(e._read(i.id))); + return t + } + static computeOptions(e, t) { + const i = new f; + for (const n of l.Bc) i._write(n.id, n.compute(t, i, e._read(n.id))); + return i + } + static _deepEquals(e, t) { + if ("object" != typeof e || "object" != typeof t) return e === t; + if (Array.isArray(e) || Array.isArray(t)) return !(!Array.isArray(e) || + !Array.isArray(t)) && a.fS(e, t); + for (let i in e) + if (!b._deepEquals(e[i], t[i])) return !1; + return !0 + } + static checkEquals(e, t) { + const i = []; + let n = !1; + for (const o of l.Bc) { + const r = !b._deepEquals(e._read(o.id), t._read(o.id)); + i[o.id] = r, r && (n = !0) + } + return n ? new l.Bb(i) : null + } + } + + function v(e) { + const t = s.I8(e); + return function(e) { + const t = e.wordWrap; + !0 === t ? e.wordWrap = "on" : !1 === t && (e.wordWrap = "off"); + const i = e.lineNumbers; + !0 === i ? e.lineNumbers = "on" : !1 === i && (e.lineNumbers = "off"), ! + 1 === e.autoClosingBrackets && (e.autoClosingBrackets = "never", e.autoClosingQuotes = + "never", e.autoSurround = "never"), "visible" === e.cursorBlinking && + (e.cursorBlinking = "solid"); + const n = e.renderWhitespace; + !0 === n ? e.renderWhitespace = "boundary" : !1 === n && (e.renderWhitespace = + "none"); + const o = e.renderLineHighlight; + !0 === o ? e.renderLineHighlight = "line" : !1 === o && (e.renderLineHighlight = + "none"); + const r = e.acceptSuggestionOnEnter; + !0 === r ? e.acceptSuggestionOnEnter = "on" : !1 === r && (e.acceptSuggestionOnEnter = + "off"); + const s = e.tabCompletion; + !1 === s ? e.tabCompletion = "off" : !0 === s && (e.tabCompletion = + "onlySnippets"); + const a = e.suggest; + if (a && "object" == typeof a.filteredTypes && a.filteredTypes) { + const e = { + method: "showMethods", + function: "showFunctions", + constructor: "showConstructors", + deprecated: "showDeprecated", + field: "showFields", + variable: "showVariables", + class: "showClasses", + struct: "showStructs", + interface: "showInterfaces", + module: "showModules", + property: "showProperties", + event: "showEvents", + operator: "showOperators", + unit: "showUnits", + value: "showValues", + constant: "showConstants", + enum: "showEnums", + enumMember: "showEnumMembers", + keyword: "showKeywords", + text: "showWords", + color: "showColors", + file: "showFiles", + reference: "showReferences", + folder: "showFolders", + typeParameter: "showTypeParameters", + snippet: "showSnippets" + }; + (0, g.E)(e, (e => { + const t = a.filteredTypes[e.key]; + !1 === t && (a[e.value] = t) + })) + } + const l = e.hover; + !0 === l ? e.hover = { + enabled: !0 + } : !1 === l && (e.hover = { + enabled: !1 + }); + const d = e.parameterHints; + !0 === d ? e.parameterHints = { + enabled: !0 + } : !1 === d && (e.parameterHints = { + enabled: !1 + }); + const c = e.autoIndent; + !0 === c ? e.autoIndent = "full" : !1 === c && (e.autoIndent = + "advanced"); + const h = e.matchBrackets; + !0 === h ? e.matchBrackets = "always" : !1 === h && (e.matchBrackets = + "never") + }(t), t + } + class w extends r.JT { + constructor(e, t) { + super(), this._onDidChange = this._register(new o.Q5), this.onDidChange = + this._onDidChange.event, this._onDidChangeFast = this._register(new o + .Q5), this.onDidChangeFast = this._onDidChangeFast.event, this.isSimpleWidget = + e, this._isDominatedByLongLines = !1, this._computeOptionsMemory = + new l.LJ, this._viewLineCount = 1, this._lineNumbersDigitCount = 1, + this._rawOptions = v(t), this._readOptions = b.readOptions(this._rawOptions), + this._validatedOptions = b.validateOptions(this._readOptions), this._register( + d.C.onDidChangeZoomLevel((e => this._recomputeOptions()))), this._register( + p.onDidChangeTabFocus((e => this._recomputeOptions()))) + } + observeReferenceElement(e) {} + updatePixelRatio() {} + _recomputeOptions() { + const e = this.options, + t = this._computeInternalOptions(); + if (e) { + const i = b.checkEquals(e, t); + if (null === i) return; + this.options = t, this._onDidChangeFast.fire(i), this._onDidChange.fire( + i) + } else this.options = t + } + getRawOptions() { + return this._rawOptions + } + _computeInternalOptions() { + const e = this._getEnvConfiguration(), + t = c.E4.createFromValidatedSettings(this._validatedOptions, e.zoomLevel, + e.pixelRatio, this.isSimpleWidget), + i = { + memory: this._computeOptionsMemory, + outerWidth: e.outerWidth, + outerHeight: e.outerHeight, + fontInfo: this.readConfiguration(t), + extraEditorClassName: e.extraEditorClassName, + isDominatedByLongLines: this._isDominatedByLongLines, + viewLineCount: this._viewLineCount, + lineNumbersDigitCount: this._lineNumbersDigitCount, + emptySelectionClipboard: e.emptySelectionClipboard, + pixelRatio: e.pixelRatio, + tabFocusMode: p.getTabFocusMode(), + accessibilitySupport: e.accessibilitySupport + }; + return b.computeOptions(this._validatedOptions, i) + } + static _subsetEquals(e, t) { + for (const i in t) + if (m.call(t, i)) { + const n = t[i], + o = e[i]; + if (o === n) continue; + if (Array.isArray(o) && Array.isArray(n)) { + if (!a.fS(o, n)) return !1; + continue + } + if (o && "object" == typeof o && n && "object" == typeof n) { + if (!this._subsetEquals(o, n)) return !1; + continue + } + return !1 + } + return !0 + } + updateOptions(e) { + if (void 0 === e) return; + const t = v(e); + w._subsetEquals(this._rawOptions, t) || (this._rawOptions = s.jB(this + ._rawOptions, t || {}), this._readOptions = b.readOptions(this._rawOptions), + this._validatedOptions = b.validateOptions(this._readOptions), this + ._recomputeOptions()) + } + setIsDominatedByLongLines(e) { + this._isDominatedByLongLines = e, this._recomputeOptions() + } + setMaxLineNumber(e) { + const t = w._digitCount(e); + this._lineNumbersDigitCount !== t && (this._lineNumbersDigitCount = t, + this._recomputeOptions()) + } + setViewLineCount(e) { + this._viewLineCount !== e && (this._viewLineCount = e, this._recomputeOptions()) + } + static _digitCount(e) { + let t = 0; + for (; e;) e = Math.floor(e / 10), t++; + return t || 1 + } + } + const C = Object.freeze({ + id: "editor", + order: 5, + type: "object", + title: n.N("editorConfigurationTitle", "Editor"), + scope: 5 + }), + y = u.B.as(h.IP.Configuration), + S = Object.assign(Object.assign({}, C), { + properties: { + "editor.tabSize": { + type: "number", + default: l.DB.tabSize, + minimum: 1, + markdownDescription: n.N("tabSize", + "The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on." + ) + }, + "editor.insertSpaces": { + type: "boolean", + default: l.DB.insertSpaces, + markdownDescription: n.N("insertSpaces", + "Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on." + ) + }, + "editor.detectIndentation": { + type: "boolean", + default: l.DB.detectIndentation, + markdownDescription: n.N("detectIndentation", + "Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents." + ) + }, + "editor.trimAutoWhitespace": { + type: "boolean", + default: l.DB.trimAutoWhitespace, + description: n.N("trimAutoWhitespace", + "Remove trailing auto inserted whitespace.") + }, + "editor.largeFileOptimizations": { + type: "boolean", + default: l.DB.largeFileOptimizations, + description: n.N("largeFileOptimizations", + "Special handling for large files to disable certain memory intensive features." + ) + }, + "editor.wordBasedSuggestions": { + type: "boolean", + default: !0, + description: n.N("wordBasedSuggestions", + "Controls whether completions should be computed based on words in the document." + ) + }, + "editor.wordBasedSuggestionsMode": { + enum: ["currentDocument", "matchingDocuments", "allDocuments"], + default: "matchingDocuments", + enumDescriptions: [n.N("wordBasedSuggestionsMode.currentDocument", + "Only suggest words from the active document."), n.N( + "wordBasedSuggestionsMode.matchingDocuments", + "Suggest words from all open documents of the same language."), n + .N("wordBasedSuggestionsMode.allDocuments", + "Suggest words from all open documents.") + ], + description: n.N("wordBasedSuggestionsMode", + "Controls from which documents word based completions are computed." + ) + }, + "editor.semanticHighlighting.enabled": { + enum: [!0, !1, "configuredByTheme"], + enumDescriptions: [n.N("semanticHighlighting.true", + "Semantic highlighting enabled for all color themes."), n.N( + "semanticHighlighting.false", + "Semantic highlighting disabled for all color themes."), n.N( + "semanticHighlighting.configuredByTheme", + "Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting." + )], + default: "configuredByTheme", + description: n.N("semanticHighlighting.enabled", + "Controls whether the semanticHighlighting is shown for the languages that support it." + ) + }, + "editor.stablePeek": { + type: "boolean", + default: !1, + markdownDescription: n.N("stablePeek", + "Keep peek editors open even when double clicking their content or when hitting `Escape`." + ) + }, + "editor.maxTokenizationLineLength": { + type: "integer", + default: 2e4, + description: n.N("maxTokenizationLineLength", + "Lines above this length will not be tokenized for performance reasons" + ) + }, + "diffEditor.maxComputationTime": { + type: "number", + default: 5e3, + description: n.N("maxComputationTime", + "Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout." + ) + }, + "diffEditor.renderSideBySide": { + type: "boolean", + default: !0, + description: n.N("sideBySide", + "Controls whether the diff editor shows the diff side by side or inline." + ) + }, + "diffEditor.ignoreTrimWhitespace": { + type: "boolean", + default: !0, + description: n.N("ignoreTrimWhitespace", + "When enabled, the diff editor ignores changes in leading or trailing whitespace." + ) + }, + "diffEditor.renderIndicators": { + type: "boolean", + default: !0, + description: n.N("renderIndicators", + "Controls whether the diff editor shows +/- indicators for added/removed changes." + ) + }, + "diffEditor.codeLens": { + type: "boolean", + default: !1, + description: n.N("codeLens", + "Controls whether the editor shows CodeLens.") + }, + "diffEditor.wordWrap": { + type: "string", + enum: ["off", "on", "inherit"], + default: "inherit", + markdownEnumDescriptions: [n.N("wordWrap.off", + "Lines will never wrap."), n.N("wordWrap.on", + "Lines will wrap at the viewport width."), n.N("wordWrap.inherit", + "Lines will wrap according to the `#editor.wordWrap#` setting.")] + } + } + }); + for (const e of l.Bc) { + const t = e.schema; + if (void 0 !== t) + if (void 0 !== (x = t).type || void 0 !== x.anyOf) S.properties[ + `editor.${e.name}`] = t; + else + for (let e in t) m.call(t, e) && (S.properties[e] = t[e]) + } + var x; + let k = null; + + function L() { + return null === k && (k = Object.create(null), Object.keys(S.properties) + .forEach((e => { + k[e] = !0 + }))), k + } + + function N(e) { + return L()[`editor.${e}`] || !1 + } + + function D(e) { + return L()[`diffEditor.${e}`] || !1 + } + y.registerConfiguration(S) + }, + 4141: (e, t, i) => { + "use strict"; + i.d(t, { + y0: () => s, + Bb: () => a, + hu: () => l, + LJ: () => d, + O7: () => g, + NY: () => b, + d2: () => C, + n0: () => y, + gk: () => x, + $J: () => k, + hL: () => N, + DB: () => D, + Bc: () => E, + BH: () => T + }); + var n = i(3580), + o = i(1432), + r = i(7461); + const s = 8; + class a { + constructor(e) { + this._values = e + } + hasChanged(e) { + return this._values[e] + } + } + class l { + constructor() { + this._values = [] + } + _read(e) { + return this._values[e] + } + get(e) { + return this._values[e] + } + _write(e, t) { + this._values[e] = t + } + } + class d { + constructor() { + this.stableMinimapLayoutInput = null, this.stableFitMaxMinimapScale = + 0, this.stableFitRemainingWidth = 0 + } + } + class c { + constructor(e, t, i, n) { + this.id = e, this.name = t, this.defaultValue = i, this.schema = n + } + compute(e, t, i) { + return i + } + } + class h { + constructor(e, t = null) { + this.schema = void 0, this.id = e, this.name = "_never_", this.defaultValue = + void 0, this.deps = t + } + validate(e) { + return this.defaultValue + } + } + class u { + constructor(e, t, i, n) { + this.id = e, this.name = t, this.defaultValue = i, this.schema = n + } + validate(e) { + return void 0 === e ? this.defaultValue : e + } + compute(e, t, i) { + return i + } + } + + function g(e, t) { + return void 0 === e ? t : "false" !== e && Boolean(e) + } + class p extends u { + constructor(e, t, i, n) { + void 0 !== n && (n.type = "boolean", n.default = i), super(e, t, i, n) + } + validate(e) { + return g(e, this.defaultValue) + } + } + class m extends u { + constructor(e, t, i, n, o, r) { + void 0 !== r && (r.type = "integer", r.default = i, r.minimum = n, r.maximum = + o), super(e, t, i, r), this.minimum = n, this.maximum = o + } + static clampedInt(e, t, i, n) { + if (void 0 === e) return t; + let o = parseInt(e, 10); + return isNaN(o) ? t : (o = Math.max(i, o), o = Math.min(n, o), 0 | o) + } + validate(e) { + return m.clampedInt(e, this.defaultValue, this.minimum, this.maximum) + } + } + class f extends u { + constructor(e, t, i, n, o) { + void 0 !== o && (o.type = "number", o.default = i), super(e, t, i, o), + this.validationFn = n + } + static clamp(e, t, i) { + return e < t ? t : e > i ? i : e + } + static float(e, t) { + if ("number" == typeof e) return e; + if (void 0 === e) return t; + const i = parseFloat(e); + return isNaN(i) ? t : i + } + validate(e) { + return this.validationFn(f.float(e, this.defaultValue)) + } + } + class _ extends u { + static string(e, t) { + return "string" != typeof e ? t : e + } + constructor(e, t, i, n) { + void 0 !== n && (n.type = "string", n.default = i), super(e, t, i, n) + } + validate(e) { + return _.string(e, this.defaultValue) + } + } + + function b(e, t, i) { + return "string" != typeof e || -1 === i.indexOf(e) ? t : e + } + class v extends u { + constructor(e, t, i, n, o) { + void 0 !== o && (o.type = "string", o.enum = n, o.default = i), super( + e, t, i, o), this._allowedValues = n + } + validate(e) { + return b(e, this.defaultValue, this._allowedValues) + } + } + class w extends c { + constructor(e, t, i, n, o, r, s) { + void 0 !== s && (s.type = "string", s.enum = o, s.default = n), super( + e, t, i, s), this._allowedValues = o, this._convert = r + } + validate(e) { + return "string" != typeof e || -1 === this._allowedValues.indexOf(e) ? + this.defaultValue : this._convert(e) + } + } + var C; + ! function(e) { + e[e.Line = 1] = "Line", e[e.Block = 2] = "Block", e[e.Underline = 3] = + "Underline", e[e.LineThin = 4] = "LineThin", e[e.BlockOutline = 5] = + "BlockOutline", e[e.UnderlineThin = 6] = "UnderlineThin" + }(C || (C = {})); + class y extends c { + constructor() { + super(43, "fontLigatures", y.OFF, { + anyOf: [{ + type: "boolean", + description: n.N("fontLigatures", + "Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property." + ) + }, { + type: "string", + description: n.N("fontFeatureSettings", + "Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures." + ) + }], + description: n.N("fontLigaturesGeneral", + "Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property." + ), + default: !1 + }) + } + validate(e) { + return void 0 === e ? this.defaultValue : "string" == typeof e ? + "false" === e ? y.OFF : "true" === e ? y.ON : e : Boolean(e) ? y.ON : + y.OFF + } + } + y.OFF = '"liga" off, "calt" off', y.ON = '"liga" on, "calt" on'; + class S extends c { + constructor() { + super(45, "fontWeight", N.fontWeight, { + anyOf: [{ + type: "number", + minimum: S.MINIMUM_VALUE, + maximum: S.MAXIMUM_VALUE, + errorMessage: n.N("fontWeightErrorMessage", + 'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.' + ) + }, { + type: "string", + pattern: "^(normal|bold|1000|[1-9][0-9]{0,2})$" + }, { + enum: S.SUGGESTION_VALUES + }], + default: N.fontWeight, + description: n.N("fontWeight", + 'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.' + ) + }) + } + validate(e) { + return "normal" === e || "bold" === e ? e : String(m.clampedInt(e, N.fontWeight, + S.MINIMUM_VALUE, S.MAXIMUM_VALUE)) + } + } + S.SUGGESTION_VALUES = ["normal", "bold", "100", "200", "300", "400", + "500", "600", "700", "800", "900" + ], S.MINIMUM_VALUE = 1, S.MAXIMUM_VALUE = 1e3; + class x extends h { + constructor() { + super(130, [48, 57, 36, 64, 92, 59, 60, 94, 117, 120, 121, 122, 2]) + } + compute(e, t, i) { + return x.computeLayout(t, { + memory: e.memory, + outerWidth: e.outerWidth, + outerHeight: e.outerHeight, + isDominatedByLongLines: e.isDominatedByLongLines, + lineHeight: e.fontInfo.lineHeight, + viewLineCount: e.viewLineCount, + lineNumbersDigitCount: e.lineNumbersDigitCount, + typicalHalfwidthCharacterWidth: e.fontInfo.typicalHalfwidthCharacterWidth, + maxDigitWidth: e.fontInfo.maxDigitWidth, + pixelRatio: e.pixelRatio + }) + } + static computeContainedMinimapLineCount(e) { + const t = e.height / e.lineHeight, + i = e.scrollBeyondLastLine ? t - 1 : 0, + n = (e.viewLineCount + i) / (e.pixelRatio * e.height); + return { + typicalViewportLineCount: t, + extraLinesBeyondLastLine: i, + desiredRatio: n, + minimapLineCount: Math.floor(e.viewLineCount / n) + } + } + static _computeMinimapLayout(e, t) { + const i = e.outerWidth, + n = e.outerHeight, + o = e.pixelRatio; + if (!e.minimap.enabled) return { + renderMinimap: 0, + minimapLeft: 0, + minimapWidth: 0, + minimapHeightIsEditorHeight: !1, + minimapIsSampling: !1, + minimapScale: 1, + minimapLineHeight: 1, + minimapCanvasInnerWidth: 0, + minimapCanvasInnerHeight: Math.floor(o * n), + minimapCanvasOuterWidth: 0, + minimapCanvasOuterHeight: n + }; + const r = t.stableMinimapLayoutInput, + a = r && e.outerHeight === r.outerHeight && e.lineHeight === r.lineHeight && + e.typicalHalfwidthCharacterWidth === r.typicalHalfwidthCharacterWidth && + e.pixelRatio === r.pixelRatio && e.scrollBeyondLastLine === r.scrollBeyondLastLine && + e.minimap.enabled === r.minimap.enabled && e.minimap.side === r.minimap + .side && e.minimap.size === r.minimap.size && e.minimap.showSlider === + r.minimap.showSlider && e.minimap.renderCharacters === r.minimap.renderCharacters && + e.minimap.maxColumn === r.minimap.maxColumn && e.minimap.scale === r.minimap + .scale && e.verticalScrollbarWidth === r.verticalScrollbarWidth && e.isViewportWrapping === + r.isViewportWrapping, + l = e.lineHeight, + d = e.typicalHalfwidthCharacterWidth, + c = e.scrollBeyondLastLine, + h = e.minimap.renderCharacters; + let u = o >= 2 ? Math.round(2 * e.minimap.scale) : e.minimap.scale; + const g = e.minimap.maxColumn, + p = e.minimap.size, + m = e.minimap.side, + f = e.verticalScrollbarWidth, + _ = e.viewLineCount, + b = e.remainingWidth, + v = e.isViewportWrapping, + w = h ? 2 : 3; + let C = Math.floor(o * n); + const y = C / o; + let S = !1, + k = !1, + L = w * u, + N = u / o, + D = 1; + if ("fill" === p || "fit" === p) { + const { + typicalViewportLineCount: i, + extraLinesBeyondLastLine: r, + desiredRatio: s, + minimapLineCount: d + } = x.computeContainedMinimapLineCount({ + viewLineCount: _, + scrollBeyondLastLine: c, + height: n, + lineHeight: l, + pixelRatio: o + }); + if (_ / d > 1) S = !0, k = !0, u = 1, L = 1, N = u / o; + else { + let n = !1, + d = u + 1; + if ("fit" === p) { + const e = Math.ceil((_ + r) * L); + v && a && b <= t.stableFitRemainingWidth ? (n = !0, d = t.stableFitMaxMinimapScale) : + n = e > C + } + if ("fill" === p || n) { + S = !0; + const n = u; + L = Math.min(l * o, Math.max(1, Math.floor(1 / s))), v && a && b <= + t.stableFitRemainingWidth && (d = t.stableFitMaxMinimapScale), u = + Math.min(d, Math.max(1, Math.floor(L / w))), u > n && (D = Math.min( + 2, u / n)), N = u / o / D, C = Math.ceil(Math.max(i, _ + r) * L), + v ? (t.stableMinimapLayoutInput = e, t.stableFitRemainingWidth = b, + t.stableFitMaxMinimapScale = u) : (t.stableMinimapLayoutInput = + null, t.stableFitRemainingWidth = 0) + } + } + } + const E = Math.floor(g * N), + I = Math.min(E, Math.max(0, Math.floor((b - f - 2) * N / (d + N))) + + s); + let T = Math.floor(o * I); + const M = T / o; + return T = Math.floor(T * D), { + renderMinimap: h ? 1 : 2, + minimapLeft: "left" === m ? 0 : i - I - f, + minimapWidth: I, + minimapHeightIsEditorHeight: S, + minimapIsSampling: k, + minimapScale: u, + minimapLineHeight: L, + minimapCanvasInnerWidth: T, + minimapCanvasInnerHeight: C, + minimapCanvasOuterWidth: M, + minimapCanvasOuterHeight: y + } + } + static computeLayout(e, t) { + const i = 0 | t.outerWidth, + n = 0 | t.outerHeight, + o = 0 | t.lineHeight, + r = 0 | t.lineNumbersDigitCount, + s = t.typicalHalfwidthCharacterWidth, + a = t.maxDigitWidth, + l = t.pixelRatio, + c = t.viewLineCount, + h = e.get(122), + u = "inherit" === h ? e.get(121) : h, + g = "inherit" === u ? e.get(117) : u, + p = e.get(120), + f = e.get(2), + _ = t.isDominatedByLongLines, + b = e.get(48), + v = 0 !== e.get(59).renderType, + w = e.get(60), + C = e.get(94), + y = e.get(64), + S = e.get(92), + k = S.verticalScrollbarSize, + L = S.verticalHasArrows, + N = S.arrowSize, + D = S.horizontalScrollbarSize, + E = e.get(57), + I = e.get(36); + let T; + if ("string" == typeof E && /^\d+(\.\d+)?ch$/.test(E)) { + const e = parseFloat(E.substr(0, E.length - 2)); + T = m.clampedInt(e * s, 0, 0, 1e3) + } else T = m.clampedInt(E, 0, 0, 1e3); + I && (T += 16); + let M = 0; + if (v) { + const e = Math.max(r, w); + M = Math.round(e * a) + } + let A = 0; + b && (A = o); + let R = 0, + O = R + A, + P = O + M, + F = P + T; + const B = i - A - M - T; + let W = !1, + z = !1, + V = -1; + 2 !== f && ("inherit" === u && _ ? (W = !0, z = !0) : "on" === g || + "bounded" === g ? z = !0 : "wordWrapColumn" === g && (V = p)); + const H = x._computeMinimapLayout({ + outerWidth: i, + outerHeight: n, + lineHeight: o, + typicalHalfwidthCharacterWidth: s, + pixelRatio: l, + scrollBeyondLastLine: C, + minimap: y, + verticalScrollbarWidth: k, + viewLineCount: c, + remainingWidth: B, + isViewportWrapping: z + }, t.memory || new d); + 0 !== H.renderMinimap && 0 === H.minimapLeft && (R += H.minimapWidth, + O += H.minimapWidth, P += H.minimapWidth, F += H.minimapWidth); + const U = B - H.minimapWidth, + j = Math.max(1, Math.floor((U - k - 2) / s)), + K = L ? N : 0; + return z && (V = Math.max(1, j), "bounded" === g && (V = Math.min(V, p))), { + width: i, + height: n, + glyphMarginLeft: R, + glyphMarginWidth: A, + lineNumbersLeft: O, + lineNumbersWidth: M, + decorationsLeft: P, + decorationsWidth: T, + contentLeft: F, + contentWidth: U, + minimap: H, + viewportColumn: j, + isWordWrapMinified: W, + isViewportWrapping: z, + wrappingColumn: V, + verticalScrollbarWidth: k, + horizontalScrollbarHeight: D, + overviewRuler: { + top: K, + width: k, + height: n - 2 * K, + right: 0 + } + } + } + } + + function k(e) { + const t = e.get(87); + return "editable" === t ? e.get(80) : "on" !== t + } + + function L(e, t) { + if ("string" != typeof e) return t; + switch (e) { + case "hidden": + return 2; + case "visible": + return 3; + default: + return 1 + } + } + const N = { + fontFamily: o.dz ? "Menlo, Monaco, 'Courier New', monospace" : o.IJ ? + "'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'" : "Consolas, 'Courier New', monospace", + fontWeight: "normal", + fontSize: o.dz ? 12 : 14, + lineHeight: 0, + letterSpacing: 0 + }, + D = { + tabSize: 4, + indentSize: 4, + insertSpaces: !0, + detectIndentation: !0, + trimAutoWhitespace: !0, + largeFileOptimizations: !0, + bracketPairColorizationOptions: { + enabled: !1 + } + }, + E = []; + + function I(e) { + return E[e.id] = e, e + } + const T = { + acceptSuggestionOnCommitCharacter: I(new p(0, + "acceptSuggestionOnCommitCharacter", !0, { + markdownDescription: n.N("acceptSuggestionOnCommitCharacter", + "Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character." + ) + })), + acceptSuggestionOnEnter: I(new v(1, "acceptSuggestionOnEnter", "on", [ + "on", "smart", "off" + ], { + markdownEnumDescriptions: ["", n.N("acceptSuggestionOnEnterSmart", + "Only accept a suggestion with `Enter` when it makes a textual change." + ), ""], + markdownDescription: n.N("acceptSuggestionOnEnter", + "Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions." + ) + })), + accessibilitySupport: I(new class extends c { + constructor() { + super(2, "accessibilitySupport", 0, { + type: "string", + enum: ["auto", "on", "off"], + enumDescriptions: [n.N("accessibilitySupport.auto", + "The editor will use platform APIs to detect when a Screen Reader is attached." + ), n.N("accessibilitySupport.on", + "The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled." + ), n.N("accessibilitySupport.off", + "The editor will never be optimized for usage with a Screen Reader." + )], + default: "auto", + description: n.N("accessibilitySupport", + "Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping." + ) + }) + } + validate(e) { + switch (e) { + case "auto": + return 0; + case "off": + return 1; + case "on": + return 2 + } + return this.defaultValue + } + compute(e, t, i) { + return 0 === i ? e.accessibilitySupport : i + } + }), + accessibilityPageSize: I(new m(3, "accessibilityPageSize", 10, 1, + 1073741824, { + description: n.N("accessibilityPageSize", + "Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default." + ) + })), + ariaLabel: I(new _(4, "ariaLabel", n.N("editorViewAccessibleLabel", + "Editor content"))), + autoClosingBrackets: I(new v(5, "autoClosingBrackets", + "languageDefined", ["always", "languageDefined", "beforeWhitespace", + "never" + ], { + enumDescriptions: ["", n.N( + "editor.autoClosingBrackets.languageDefined", + "Use language configurations to determine when to autoclose brackets." + ), n.N("editor.autoClosingBrackets.beforeWhitespace", + "Autoclose brackets only when the cursor is to the left of whitespace." + ), ""], + description: n.N("autoClosingBrackets", + "Controls whether the editor should automatically close brackets after the user adds an opening bracket." + ) + })), + autoClosingDelete: I(new v(6, "autoClosingDelete", "auto", ["always", + "auto", "never" + ], { + enumDescriptions: ["", n.N("editor.autoClosingDelete.auto", + "Remove adjacent closing quotes or brackets only if they were automatically inserted." + ), ""], + description: n.N("autoClosingDelete", + "Controls whether the editor should remove adjacent closing quotes or brackets when deleting." + ) + })), + autoClosingOvertype: I(new v(7, "autoClosingOvertype", "auto", [ + "always", "auto", "never" + ], { + enumDescriptions: ["", n.N("editor.autoClosingOvertype.auto", + "Type over closing quotes or brackets only if they were automatically inserted." + ), ""], + description: n.N("autoClosingOvertype", + "Controls whether the editor should type over closing quotes or brackets." + ) + })), + autoClosingQuotes: I(new v(8, "autoClosingQuotes", "languageDefined", [ + "always", "languageDefined", "beforeWhitespace", "never" + ], { + enumDescriptions: ["", n.N( + "editor.autoClosingQuotes.languageDefined", + "Use language configurations to determine when to autoclose quotes." + ), n.N("editor.autoClosingQuotes.beforeWhitespace", + "Autoclose quotes only when the cursor is to the left of whitespace." + ), ""], + description: n.N("autoClosingQuotes", + "Controls whether the editor should automatically close quotes after the user adds an opening quote." + ) + })), + autoIndent: I(new w(9, "autoIndent", 4, "full", ["none", "keep", + "brackets", "advanced", "full" + ], (function(e) { + switch (e) { + case "none": + return 0; + case "keep": + return 1; + case "brackets": + return 2; + case "advanced": + return 3; + case "full": + return 4 + } + }), { + enumDescriptions: [n.N("editor.autoIndent.none", + "The editor will not insert indentation automatically."), n.N( + "editor.autoIndent.keep", + "The editor will keep the current line's indentation."), n.N( + "editor.autoIndent.brackets", + "The editor will keep the current line's indentation and honor language defined brackets." + ), n.N("editor.autoIndent.advanced", + "The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages." + ), n.N("editor.autoIndent.full", + "The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages." + )], + description: n.N("autoIndent", + "Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines." + ) + })), + automaticLayout: I(new p(10, "automaticLayout", !1)), + autoSurround: I(new v(11, "autoSurround", "languageDefined", [ + "languageDefined", "quotes", "brackets", "never" + ], { + enumDescriptions: [n.N("editor.autoSurround.languageDefined", + "Use language configurations to determine when to automatically surround selections." + ), n.N("editor.autoSurround.quotes", + "Surround with quotes but not brackets."), n.N( + "editor.autoSurround.brackets", + "Surround with brackets but not quotes."), ""], + description: n.N("autoSurround", + "Controls whether the editor should automatically surround selections when typing quotes or brackets." + ) + })), + bracketPairColorization: I(new class extends c { + constructor() { + const e = { + enabled: D.bracketPairColorizationOptions.enabled + }; + super(12, "bracketPairColorization", e, { + "editor.bracketPairColorization.enabled": { + type: "boolean", + default: e.enabled, + description: n.N("bracketPairColorization.enabled", + "Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors." + ) + } + }) + } + validate(e) { + return e && "object" == typeof e ? { + enabled: g(e.enabled, this.defaultValue.enabled) + } : this.defaultValue + } + }), + stickyTabStops: I(new p(104, "stickyTabStops", !1, { + description: n.N("stickyTabStops", + "Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops." + ) + })), + codeLens: I(new p(13, "codeLens", !0, { + description: n.N("codeLens", + "Controls whether the editor shows CodeLens.") + })), + codeLensFontFamily: I(new _(14, "codeLensFontFamily", "", { + description: n.N("codeLensFontFamily", + "Controls the font family for CodeLens.") + })), + codeLensFontSize: I(new m(15, "codeLensFontSize", 0, 0, 100, { + type: "number", + default: 0, + minimum: 0, + maximum: 100, + markdownDescription: n.N("codeLensFontSize", + "Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used." + ) + })), + colorDecorators: I(new p(16, "colorDecorators", !0, { + description: n.N("colorDecorators", + "Controls whether the editor should render the inline color decorators and color picker." + ) + })), + columnSelection: I(new p(17, "columnSelection", !1, { + description: n.N("columnSelection", + "Enable that the selection with the mouse and keys is doing column selection." + ) + })), + comments: I(new class extends c { + constructor() { + const e = { + insertSpace: !0, + ignoreEmptyLines: !0 + }; + super(18, "comments", e, { + "editor.comments.insertSpace": { + type: "boolean", + default: e.insertSpace, + description: n.N("comments.insertSpace", + "Controls whether a space character is inserted when commenting." + ) + }, + "editor.comments.ignoreEmptyLines": { + type: "boolean", + default: e.ignoreEmptyLines, + description: n.N("comments.ignoreEmptyLines", + "Controls if empty lines should be ignored with toggle, add or remove actions for line comments." + ) + } + }) + } + validate(e) { + if (!e || "object" != typeof e) return this.defaultValue; + const t = e; + return { + insertSpace: g(t.insertSpace, this.defaultValue.insertSpace), + ignoreEmptyLines: g(t.ignoreEmptyLines, this.defaultValue.ignoreEmptyLines) + } + } + }), + contextmenu: I(new p(19, "contextmenu", !0)), + copyWithSyntaxHighlighting: I(new p(20, "copyWithSyntaxHighlighting", ! + 0, { + description: n.N("copyWithSyntaxHighlighting", + "Controls whether syntax highlighting should be copied into the clipboard." + ) + })), + cursorBlinking: I(new w(21, "cursorBlinking", 1, "blink", ["blink", + "smooth", "phase", "expand", "solid" + ], (function(e) { + switch (e) { + case "blink": + return 1; + case "smooth": + return 2; + case "phase": + return 3; + case "expand": + return 4; + case "solid": + return 5 + } + }), { + description: n.N("cursorBlinking", + "Control the cursor animation style.") + })), + cursorSmoothCaretAnimation: I(new p(22, "cursorSmoothCaretAnimation", ! + 1, { + description: n.N("cursorSmoothCaretAnimation", + "Controls whether the smooth caret animation should be enabled.") + })), + cursorStyle: I(new w(23, "cursorStyle", C.Line, "line", ["line", + "block", "underline", "line-thin", "block-outline", + "underline-thin" + ], (function(e) { + switch (e) { + case "line": + return C.Line; + case "block": + return C.Block; + case "underline": + return C.Underline; + case "line-thin": + return C.LineThin; + case "block-outline": + return C.BlockOutline; + case "underline-thin": + return C.UnderlineThin + } + }), { + description: n.N("cursorStyle", "Controls the cursor style.") + })), + cursorSurroundingLines: I(new m(24, "cursorSurroundingLines", 0, 0, + 1073741824, { + description: n.N("cursorSurroundingLines", + "Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors." + ) + })), + cursorSurroundingLinesStyle: I(new v(25, "cursorSurroundingLinesStyle", + "default", ["default", "all"], { + enumDescriptions: [n.N("cursorSurroundingLinesStyle.default", + "`cursorSurroundingLines` is enforced only when triggered via the keyboard or API." + ), n.N("cursorSurroundingLinesStyle.all", + "`cursorSurroundingLines` is enforced always.")], + description: n.N("cursorSurroundingLinesStyle", + "Controls when `cursorSurroundingLines` should be enforced.") + })), + cursorWidth: I(new m(26, "cursorWidth", 0, 0, 1073741824, { + markdownDescription: n.N("cursorWidth", + "Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`." + ) + })), + disableLayerHinting: I(new p(27, "disableLayerHinting", !1)), + disableMonospaceOptimizations: I(new p(28, + "disableMonospaceOptimizations", !1)), + domReadOnly: I(new p(29, "domReadOnly", !1)), + dragAndDrop: I(new p(30, "dragAndDrop", !0, { + description: n.N("dragAndDrop", + "Controls whether the editor should allow moving selections via drag and drop." + ) + })), + emptySelectionClipboard: I(new class extends p { + constructor() { + super(31, "emptySelectionClipboard", !0, { + description: n.N("emptySelectionClipboard", + "Controls whether copying without a selection copies the current line." + ) + }) + } + compute(e, t, i) { + return i && e.emptySelectionClipboard + } + }), + extraEditorClassName: I(new _(32, "extraEditorClassName", "")), + fastScrollSensitivity: I(new f(33, "fastScrollSensitivity", 5, (e => e <= + 0 ? 5 : e), { + markdownDescription: n.N("fastScrollSensitivity", + "Scrolling speed multiplier when pressing `Alt`.") + })), + find: I(new class extends c { + constructor() { + const e = { + cursorMoveOnType: !0, + seedSearchStringFromSelection: "always", + autoFindInSelection: "never", + globalFindClipboard: !1, + addExtraSpaceOnTop: !0, + loop: !0 + }; + super(34, "find", e, { + "editor.find.cursorMoveOnType": { + type: "boolean", + default: e.cursorMoveOnType, + description: n.N("find.cursorMoveOnType", + "Controls whether the cursor should jump to find matches while typing." + ) + }, + "editor.find.seedSearchStringFromSelection": { + type: "string", + enum: ["never", "always", "selection"], + default: e.seedSearchStringFromSelection, + enumDescriptions: [n.N( + "editor.find.seedSearchStringFromSelection.never", + "Never seed search string from the editor selection."), n.N( + "editor.find.seedSearchStringFromSelection.always", + "Always seed search string from the editor selection, including word at cursor position." + ), n.N("editor.find.seedSearchStringFromSelection.selection", + "Only seed search string from the editor selection.")], + description: n.N("find.seedSearchStringFromSelection", + "Controls whether the search string in the Find Widget is seeded from the editor selection." + ) + }, + "editor.find.autoFindInSelection": { + type: "string", + enum: ["never", "always", "multiline"], + default: e.autoFindInSelection, + enumDescriptions: [n.N("editor.find.autoFindInSelection.never", + "Never turn on Find in Selection automatically (default)."), + n.N("editor.find.autoFindInSelection.always", + "Always turn on Find in Selection automatically."), n.N( + "editor.find.autoFindInSelection.multiline", + "Turn on Find in Selection automatically when multiple lines of content are selected." + ) + ], + description: n.N("find.autoFindInSelection", + "Controls the condition for turning on Find in Selection automatically." + ) + }, + "editor.find.globalFindClipboard": { + type: "boolean", + default: e.globalFindClipboard, + description: n.N("find.globalFindClipboard", + "Controls whether the Find Widget should read or modify the shared find clipboard on macOS." + ), + included: o.dz + }, + "editor.find.addExtraSpaceOnTop": { + type: "boolean", + default: e.addExtraSpaceOnTop, + description: n.N("find.addExtraSpaceOnTop", + "Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible." + ) + }, + "editor.find.loop": { + type: "boolean", + default: e.loop, + description: n.N("find.loop", + "Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found." + ) + } + }) + } + validate(e) { + if (!e || "object" != typeof e) return this.defaultValue; + const t = e; + return { + cursorMoveOnType: g(t.cursorMoveOnType, this.defaultValue.cursorMoveOnType), + seedSearchStringFromSelection: "boolean" == typeof e.seedSearchStringFromSelection ? + e.seedSearchStringFromSelection ? "always" : "never" : b(t.seedSearchStringFromSelection, + this.defaultValue.seedSearchStringFromSelection, ["never", + "always", "selection" + ]), + autoFindInSelection: "boolean" == typeof e.autoFindInSelection ? + e.autoFindInSelection ? "always" : "never" : b(t.autoFindInSelection, + this.defaultValue.autoFindInSelection, ["never", "always", + "multiline" + ]), + globalFindClipboard: g(t.globalFindClipboard, this.defaultValue.globalFindClipboard), + addExtraSpaceOnTop: g(t.addExtraSpaceOnTop, this.defaultValue.addExtraSpaceOnTop), + loop: g(t.loop, this.defaultValue.loop) + } + } + }), + fixedOverflowWidgets: I(new p(35, "fixedOverflowWidgets", !1)), + folding: I(new p(36, "folding", !0, { + description: n.N("folding", + "Controls whether the editor has code folding enabled.") + })), + foldingStrategy: I(new v(37, "foldingStrategy", "auto", ["auto", + "indentation" + ], { + enumDescriptions: [n.N("foldingStrategy.auto", + "Use a language-specific folding strategy if available, else the indentation-based one." + ), n.N("foldingStrategy.indentation", + "Use the indentation-based folding strategy.")], + description: n.N("foldingStrategy", + "Controls the strategy for computing folding ranges.") + })), + foldingHighlight: I(new p(38, "foldingHighlight", !0, { + description: n.N("foldingHighlight", + "Controls whether the editor should highlight folded ranges.") + })), + foldingImportsByDefault: I(new p(39, "foldingImportsByDefault", !1, { + description: n.N("foldingImportsByDefault", + "Controls whether the editor automatically collapses import ranges." + ) + })), + unfoldOnClickAfterEndOfLine: I(new p(40, "unfoldOnClickAfterEndOfLine", ! + 1, { + description: n.N("unfoldOnClickAfterEndOfLine", + "Controls whether clicking on the empty content after a folded line will unfold the line." + ) + })), + fontFamily: I(new _(41, "fontFamily", N.fontFamily, { + description: n.N("fontFamily", "Controls the font family.") + })), + fontInfo: I(new class extends h { + constructor() { + super(42) + } + compute(e, t, i) { + return e.fontInfo + } + }), + fontLigatures2: I(new y), + fontSize: I(new class extends u { + constructor() { + super(44, "fontSize", N.fontSize, { + type: "number", + minimum: 6, + maximum: 100, + default: N.fontSize, + description: n.N("fontSize", + "Controls the font size in pixels.") + }) + } + validate(e) { + let t = f.float(e, this.defaultValue); + return 0 === t ? N.fontSize : f.clamp(t, 6, 100) + } + compute(e, t, i) { + return e.fontInfo.fontSize + } + }), + fontWeight: I(new S), + formatOnPaste: I(new p(46, "formatOnPaste", !1, { + description: n.N("formatOnPaste", + "Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document." + ) + })), + formatOnType: I(new p(47, "formatOnType", !1, { + description: n.N("formatOnType", + "Controls whether the editor should automatically format the line after typing." + ) + })), + glyphMargin: I(new p(48, "glyphMargin", !0, { + description: n.N("glyphMargin", + "Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging." + ) + })), + gotoLocation: I(new class extends c { + constructor() { + const e = { + multiple: "peek", + multipleDefinitions: "peek", + multipleTypeDefinitions: "peek", + multipleDeclarations: "peek", + multipleImplementations: "peek", + multipleReferences: "peek", + alternativeDefinitionCommand: "editor.action.goToReferences", + alternativeTypeDefinitionCommand: "editor.action.goToReferences", + alternativeDeclarationCommand: "editor.action.goToReferences", + alternativeImplementationCommand: "", + alternativeReferenceCommand: "" + }, + t = { + type: "string", + enum: ["peek", "gotoAndPeek", "goto"], + default: e.multiple, + enumDescriptions: [n.N("editor.gotoLocation.multiple.peek", + "Show peek view of the results (default)"), n.N( + "editor.gotoLocation.multiple.gotoAndPeek", + "Go to the primary result and show a peek view"), n.N( + "editor.gotoLocation.multiple.goto", + "Go to the primary result and enable peek-less navigation to others" + )] + }, + i = ["", "editor.action.referenceSearch.trigger", + "editor.action.goToReferences", + "editor.action.peekImplementation", + "editor.action.goToImplementation", + "editor.action.peekTypeDefinition", + "editor.action.goToTypeDefinition", + "editor.action.peekDeclaration", + "editor.action.revealDeclaration", + "editor.action.peekDefinition", + "editor.action.revealDefinitionAside", + "editor.action.revealDefinition" + ]; + super(49, "gotoLocation", e, { + "editor.gotoLocation.multiple": { + deprecationMessage: n.N( + "editor.gotoLocation.multiple.deprecated", + "This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead." + ) + }, + "editor.gotoLocation.multipleDefinitions": Object.assign({ + description: n.N( + "editor.editor.gotoLocation.multipleDefinitions", + "Controls the behavior the 'Go to Definition'-command when multiple target locations exist." + ) + }, t), + "editor.gotoLocation.multipleTypeDefinitions": Object.assign({ + description: n.N( + "editor.editor.gotoLocation.multipleTypeDefinitions", + "Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist." + ) + }, t), + "editor.gotoLocation.multipleDeclarations": Object.assign({ + description: n.N( + "editor.editor.gotoLocation.multipleDeclarations", + "Controls the behavior the 'Go to Declaration'-command when multiple target locations exist." + ) + }, t), + "editor.gotoLocation.multipleImplementations": Object.assign({ + description: n.N( + "editor.editor.gotoLocation.multipleImplemenattions", + "Controls the behavior the 'Go to Implementations'-command when multiple target locations exist." + ) + }, t), + "editor.gotoLocation.multipleReferences": Object.assign({ + description: n.N( + "editor.editor.gotoLocation.multipleReferences", + "Controls the behavior the 'Go to References'-command when multiple target locations exist." + ) + }, t), + "editor.gotoLocation.alternativeDefinitionCommand": { + type: "string", + default: e.alternativeDefinitionCommand, + enum: i, + description: n.N("alternativeDefinitionCommand", + "Alternative command id that is being executed when the result of 'Go to Definition' is the current location." + ) + }, + "editor.gotoLocation.alternativeTypeDefinitionCommand": { + type: "string", + default: e.alternativeTypeDefinitionCommand, + enum: i, + description: n.N("alternativeTypeDefinitionCommand", + "Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location." + ) + }, + "editor.gotoLocation.alternativeDeclarationCommand": { + type: "string", + default: e.alternativeDeclarationCommand, + enum: i, + description: n.N("alternativeDeclarationCommand", + "Alternative command id that is being executed when the result of 'Go to Declaration' is the current location." + ) + }, + "editor.gotoLocation.alternativeImplementationCommand": { + type: "string", + default: e.alternativeImplementationCommand, + enum: i, + description: n.N("alternativeImplementationCommand", + "Alternative command id that is being executed when the result of 'Go to Implementation' is the current location." + ) + }, + "editor.gotoLocation.alternativeReferenceCommand": { + type: "string", + default: e.alternativeReferenceCommand, + enum: i, + description: n.N("alternativeReferenceCommand", + "Alternative command id that is being executed when the result of 'Go to Reference' is the current location." + ) + } + }) + } + validate(e) { + var t, i, n, o, r; + if (!e || "object" != typeof e) return this.defaultValue; + const s = e; + return { + multiple: b(s.multiple, this.defaultValue.multiple, ["peek", + "gotoAndPeek", "goto" + ]), + multipleDefinitions: null !== (t = s.multipleDefinitions) && void 0 !== + t ? t : b(s.multipleDefinitions, "peek", ["peek", "gotoAndPeek", + "goto" + ]), + multipleTypeDefinitions: null !== (i = s.multipleTypeDefinitions) && + void 0 !== i ? i : b(s.multipleTypeDefinitions, "peek", ["peek", + "gotoAndPeek", "goto" + ]), + multipleDeclarations: null !== (n = s.multipleDeclarations) && + void 0 !== n ? n : b(s.multipleDeclarations, "peek", ["peek", + "gotoAndPeek", "goto" + ]), + multipleImplementations: null !== (o = s.multipleImplementations) && + void 0 !== o ? o : b(s.multipleImplementations, "peek", ["peek", + "gotoAndPeek", "goto" + ]), + multipleReferences: null !== (r = s.multipleReferences) && void 0 !== + r ? r : b(s.multipleReferences, "peek", ["peek", "gotoAndPeek", + "goto" + ]), + alternativeDefinitionCommand: _.string(s.alternativeDefinitionCommand, + this.defaultValue.alternativeDefinitionCommand), + alternativeTypeDefinitionCommand: _.string(s.alternativeTypeDefinitionCommand, + this.defaultValue.alternativeTypeDefinitionCommand), + alternativeDeclarationCommand: _.string(s.alternativeDeclarationCommand, + this.defaultValue.alternativeDeclarationCommand), + alternativeImplementationCommand: _.string(s.alternativeImplementationCommand, + this.defaultValue.alternativeImplementationCommand), + alternativeReferenceCommand: _.string(s.alternativeReferenceCommand, + this.defaultValue.alternativeReferenceCommand) + } + } + }), + hideCursorInOverviewRuler: I(new p(50, "hideCursorInOverviewRuler", !1, { + description: n.N("hideCursorInOverviewRuler", + "Controls whether the cursor should be hidden in the overview ruler." + ) + })), + highlightActiveIndentGuide: I(new p(51, "highlightActiveIndentGuide", ! + 0, { + description: n.N("highlightActiveIndentGuide", + "Controls whether the editor should highlight the active indent guide." + ) + })), + hover: I(new class extends c { + constructor() { + const e = { + enabled: !0, + delay: 300, + sticky: !0 + }; + super(52, "hover", e, { + "editor.hover.enabled": { + type: "boolean", + default: e.enabled, + description: n.N("hover.enabled", + "Controls whether the hover is shown.") + }, + "editor.hover.delay": { + type: "number", + default: e.delay, + description: n.N("hover.delay", + "Controls the delay in milliseconds after which the hover is shown." + ) + }, + "editor.hover.sticky": { + type: "boolean", + default: e.sticky, + description: n.N("hover.sticky", + "Controls whether the hover should remain visible when mouse is moved over it." + ) + } + }) + } + validate(e) { + if (!e || "object" != typeof e) return this.defaultValue; + const t = e; + return { + enabled: g(t.enabled, this.defaultValue.enabled), + delay: m.clampedInt(t.delay, this.defaultValue.delay, 0, 1e4), + sticky: g(t.sticky, this.defaultValue.sticky) + } + } + }), + inDiffEditor: I(new p(53, "inDiffEditor", !1)), + letterSpacing: I(new f(55, "letterSpacing", N.letterSpacing, (e => f.clamp( + e, -5, 20)), { + description: n.N("letterSpacing", + "Controls the letter spacing in pixels.") + })), + lightbulb: I(new class extends c { + constructor() { + const e = { + enabled: !0 + }; + super(56, "lightbulb", e, { + "editor.lightbulb.enabled": { + type: "boolean", + default: e.enabled, + description: n.N("codeActions", + "Enables the code action lightbulb in the editor.") + } + }) + } + validate(e) { + return e && "object" == typeof e ? { + enabled: g(e.enabled, this.defaultValue.enabled) + } : this.defaultValue + } + }), + lineDecorationsWidth: I(new u(57, "lineDecorationsWidth", 10)), + lineHeight: I(new class extends f { + constructor() { + super(58, "lineHeight", N.lineHeight, (e => f.clamp(e, 0, 150)), { + markdownDescription: n.N("lineHeight", + "Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values." + ) + }) + } + compute(e, t, i) { + return e.fontInfo.lineHeight + } + }), + lineNumbers: I(new class extends c { + constructor() { + super(59, "lineNumbers", { + renderType: 1, + renderFn: null + }, { + type: "string", + enum: ["off", "on", "relative", "interval"], + enumDescriptions: [n.N("lineNumbers.off", + "Line numbers are not rendered."), n.N("lineNumbers.on", + "Line numbers are rendered as absolute number."), n.N( + "lineNumbers.relative", + "Line numbers are rendered as distance in lines to cursor position." + ), n.N("lineNumbers.interval", + "Line numbers are rendered every 10 lines.")], + default: "on", + description: n.N("lineNumbers", + "Controls the display of line numbers.") + }) + } + validate(e) { + let t = this.defaultValue.renderType, + i = this.defaultValue.renderFn; + return void 0 !== e && ("function" == typeof e ? (t = 4, i = e) : + t = "interval" === e ? 3 : "relative" === e ? 2 : "on" === e ? 1 : + 0), { + renderType: t, + renderFn: i + } + } + }), + lineNumbersMinChars: I(new m(60, "lineNumbersMinChars", 5, 1, 300)), + linkedEditing: I(new p(61, "linkedEditing", !1, { + description: n.N("linkedEditing", + "Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing." + ) + })), + links: I(new p(62, "links", !0, { + description: n.N("links", + "Controls whether the editor should detect links and make them clickable." + ) + })), + matchBrackets: I(new v(63, "matchBrackets", "always", ["always", "near", + "never" + ], { + description: n.N("matchBrackets", "Highlight matching brackets.") + })), + minimap: I(new class extends c { + constructor() { + const e = { + enabled: !0, + size: "proportional", + side: "right", + showSlider: "mouseover", + renderCharacters: !0, + maxColumn: 120, + scale: 1 + }; + super(64, "minimap", e, { + "editor.minimap.enabled": { + type: "boolean", + default: e.enabled, + description: n.N("minimap.enabled", + "Controls whether the minimap is shown.") + }, + "editor.minimap.size": { + type: "string", + enum: ["proportional", "fill", "fit"], + enumDescriptions: [n.N("minimap.size.proportional", + "The minimap has the same size as the editor contents (and might scroll)." + ), n.N("minimap.size.fill", + "The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)." + ), n.N("minimap.size.fit", + "The minimap will shrink as necessary to never be larger than the editor (no scrolling)." + )], + default: e.size, + description: n.N("minimap.size", + "Controls the size of the minimap.") + }, + "editor.minimap.side": { + type: "string", + enum: ["left", "right"], + default: e.side, + description: n.N("minimap.side", + "Controls the side where to render the minimap.") + }, + "editor.minimap.showSlider": { + type: "string", + enum: ["always", "mouseover"], + default: e.showSlider, + description: n.N("minimap.showSlider", + "Controls when the minimap slider is shown.") + }, + "editor.minimap.scale": { + type: "number", + default: e.scale, + minimum: 1, + maximum: 3, + enum: [1, 2, 3], + description: n.N("minimap.scale", + "Scale of content drawn in the minimap: 1, 2 or 3.") + }, + "editor.minimap.renderCharacters": { + type: "boolean", + default: e.renderCharacters, + description: n.N("minimap.renderCharacters", + "Render the actual characters on a line as opposed to color blocks." + ) + }, + "editor.minimap.maxColumn": { + type: "number", + default: e.maxColumn, + description: n.N("minimap.maxColumn", + "Limit the width of the minimap to render at most a certain number of columns." + ) + } + }) + } + validate(e) { + if (!e || "object" != typeof e) return this.defaultValue; + const t = e; + return { + enabled: g(t.enabled, this.defaultValue.enabled), + size: b(t.size, this.defaultValue.size, ["proportional", "fill", + "fit" + ]), + side: b(t.side, this.defaultValue.side, ["right", "left"]), + showSlider: b(t.showSlider, this.defaultValue.showSlider, [ + "always", "mouseover" + ]), + renderCharacters: g(t.renderCharacters, this.defaultValue.renderCharacters), + scale: m.clampedInt(t.scale, 1, 1, 3), + maxColumn: m.clampedInt(t.maxColumn, this.defaultValue.maxColumn, + 1, 1e4) + } + } + }), + mouseStyle: I(new v(65, "mouseStyle", "text", ["text", "default", + "copy" + ])), + mouseWheelScrollSensitivity: I(new f(66, "mouseWheelScrollSensitivity", + 1, (e => 0 === e ? 1 : e), { + markdownDescription: n.N("mouseWheelScrollSensitivity", + "A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events." + ) + })), + mouseWheelZoom: I(new p(67, "mouseWheelZoom", !1, { + markdownDescription: n.N("mouseWheelZoom", + "Zoom the font of the editor when using mouse wheel and holding `Ctrl`." + ) + })), + multiCursorMergeOverlapping: I(new p(68, "multiCursorMergeOverlapping", ! + 0, { + description: n.N("multiCursorMergeOverlapping", + "Merge multiple cursors when they are overlapping.") + })), + multiCursorModifier: I(new w(69, "multiCursorModifier", "altKey", "alt", [ + "ctrlCmd", "alt" + ], (function(e) { + return "ctrlCmd" === e ? o.dz ? "metaKey" : "ctrlKey" : "altKey" + }), { + markdownEnumDescriptions: [n.N("multiCursorModifier.ctrlCmd", + "Maps to `Control` on Windows and Linux and to `Command` on macOS." + ), n.N("multiCursorModifier.alt", + "Maps to `Alt` on Windows and Linux and to `Option` on macOS.")], + markdownDescription: n.N({ + key: "multiCursorModifier", + comment: [ + "- `ctrlCmd` refers to a value the setting can take and should not be localized.", + "- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized." + ] + }, + "The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier)." + ) + })), + multiCursorPaste: I(new v(70, "multiCursorPaste", "spread", ["spread", + "full" + ], { + markdownEnumDescriptions: [n.N("multiCursorPaste.spread", + "Each cursor pastes a single line of the text."), n.N( + "multiCursorPaste.full", "Each cursor pastes the full text.")], + markdownDescription: n.N("multiCursorPaste", + "Controls pasting when the line count of the pasted text matches the cursor count." + ) + })), + occurrencesHighlight: I(new p(71, "occurrencesHighlight", !0, { + description: n.N("occurrencesHighlight", + "Controls whether the editor should highlight semantic symbol occurrences." + ) + })), + overviewRulerBorder: I(new p(72, "overviewRulerBorder", !0, { + description: n.N("overviewRulerBorder", + "Controls whether a border should be drawn around the overview ruler." + ) + })), + overviewRulerLanes: I(new m(73, "overviewRulerLanes", 3, 0, 3)), + padding: I(new class extends c { + constructor() { + super(74, "padding", { + top: 0, + bottom: 0 + }, { + "editor.padding.top": { + type: "number", + default: 0, + minimum: 0, + maximum: 1e3, + description: n.N("padding.top", + "Controls the amount of space between the top edge of the editor and the first line." + ) + }, + "editor.padding.bottom": { + type: "number", + default: 0, + minimum: 0, + maximum: 1e3, + description: n.N("padding.bottom", + "Controls the amount of space between the bottom edge of the editor and the last line." + ) + } + }) + } + validate(e) { + if (!e || "object" != typeof e) return this.defaultValue; + const t = e; + return { + top: m.clampedInt(t.top, 0, 0, 1e3), + bottom: m.clampedInt(t.bottom, 0, 0, 1e3) + } + } + }), + parameterHints: I(new class extends c { + constructor() { + const e = { + enabled: !0, + cycle: !1 + }; + super(75, "parameterHints", e, { + "editor.parameterHints.enabled": { + type: "boolean", + default: e.enabled, + description: n.N("parameterHints.enabled", + "Enables a pop-up that shows parameter documentation and type information as you type." + ) + }, + "editor.parameterHints.cycle": { + type: "boolean", + default: e.cycle, + description: n.N("parameterHints.cycle", + "Controls whether the parameter hints menu cycles or closes when reaching the end of the list." + ) + } + }) + } + validate(e) { + if (!e || "object" != typeof e) return this.defaultValue; + const t = e; + return { + enabled: g(t.enabled, this.defaultValue.enabled), + cycle: g(t.cycle, this.defaultValue.cycle) + } + } + }), + peekWidgetDefaultFocus: I(new v(76, "peekWidgetDefaultFocus", "tree", [ + "tree", "editor" + ], { + enumDescriptions: [n.N("peekWidgetDefaultFocus.tree", + "Focus the tree when opening peek"), n.N( + "peekWidgetDefaultFocus.editor", + "Focus the editor when opening peek")], + description: n.N("peekWidgetDefaultFocus", + "Controls whether to focus the inline editor or the tree in the peek widget." + ) + })), + definitionLinkOpensInPeek: I(new p(77, "definitionLinkOpensInPeek", !1, { + description: n.N("definitionLinkOpensInPeek", + "Controls whether the Go to Definition mouse gesture always opens the peek widget." + ) + })), + quickSuggestions: I(new class extends c { + constructor() { + const e = { + other: !0, + comments: !1, + strings: !1 + }; + super(78, "quickSuggestions", e, { + anyOf: [{ + type: "boolean" + }, { + type: "object", + properties: { + strings: { + type: "boolean", + default: e.strings, + description: n.N("quickSuggestions.strings", + "Enable quick suggestions inside strings.") + }, + comments: { + type: "boolean", + default: e.comments, + description: n.N("quickSuggestions.comments", + "Enable quick suggestions inside comments.") + }, + other: { + type: "boolean", + default: e.other, + description: n.N("quickSuggestions.other", + "Enable quick suggestions outside of strings and comments." + ) + } + } + }], + default: e, + description: n.N("quickSuggestions", + "Controls whether suggestions should automatically show up while typing." + ) + }), this.defaultValue = e + } + validate(e) { + if ("boolean" == typeof e) return e; + if (e && "object" == typeof e) { + const t = e, + i = { + other: g(t.other, this.defaultValue.other), + comments: g(t.comments, this.defaultValue.comments), + strings: g(t.strings, this.defaultValue.strings) + }; + return !!(i.other && i.comments && i.strings) || !!(i.other || i.comments || + i.strings) && i + } + return this.defaultValue + } + }), + quickSuggestionsDelay: I(new m(79, "quickSuggestionsDelay", 10, 0, + 1073741824, { + description: n.N("quickSuggestionsDelay", + "Controls the delay in milliseconds after which quick suggestions will show up." + ) + })), + readOnly: I(new p(80, "readOnly", !1)), + renameOnType: I(new p(81, "renameOnType", !1, { + description: n.N("renameOnType", + "Controls whether the editor auto renames on type."), + markdownDeprecationMessage: n.N("renameOnTypeDeprecate", + "Deprecated, use `editor.linkedEditing` instead.") + })), + renderControlCharacters: I(new p(82, "renderControlCharacters", !1, { + description: n.N("renderControlCharacters", + "Controls whether the editor should render control characters.") + })), + renderIndentGuides: I(new p(83, "renderIndentGuides", !0, { + description: n.N("renderIndentGuides", + "Controls whether the editor should render indent guides.") + })), + renderFinalNewline: I(new p(84, "renderFinalNewline", !0, { + description: n.N("renderFinalNewline", + "Render last line number when the file ends with a newline.") + })), + renderLineHighlight: I(new v(85, "renderLineHighlight", "line", ["none", + "gutter", "line", "all" + ], { + enumDescriptions: ["", "", "", n.N("renderLineHighlight.all", + "Highlights both the gutter and the current line.")], + description: n.N("renderLineHighlight", + "Controls how the editor should render the current line highlight." + ) + })), + renderLineHighlightOnlyWhenFocus: I(new p(86, + "renderLineHighlightOnlyWhenFocus", !1, { + description: n.N("renderLineHighlightOnlyWhenFocus", + "Controls if the editor should render the current line highlight only when the editor is focused." + ) + })), + renderValidationDecorations: I(new v(87, "renderValidationDecorations", + "editable", ["editable", "on", "off"])), + renderWhitespace: I(new v(88, "renderWhitespace", "selection", ["none", + "boundary", "selection", "trailing", "all" + ], { + enumDescriptions: ["", n.N("renderWhitespace.boundary", + "Render whitespace characters except for single spaces between words." + ), n.N("renderWhitespace.selection", + "Render whitespace characters only on selected text."), n.N( + "renderWhitespace.trailing", + "Render only trailing whitespace characters."), ""], + description: n.N("renderWhitespace", + "Controls how the editor should render whitespace characters.") + })), + revealHorizontalRightPadding: I(new m(89, + "revealHorizontalRightPadding", 30, 0, 1e3)), + roundedSelection: I(new p(90, "roundedSelection", !0, { + description: n.N("roundedSelection", + "Controls whether selections should have rounded corners.") + })), + rulers: I(new class extends c { + constructor() { + const e = [], + t = { + type: "number", + description: n.N("rulers.size", + "Number of monospace characters at which this editor ruler will render." + ) + }; + super(91, "rulers", e, { + type: "array", + items: { + anyOf: [t, { + type: ["object"], + properties: { + column: t, + color: { + type: "string", + description: n.N("rulers.color", + "Color of this editor ruler."), + format: "color-hex" + } + } + }] + }, + default: e, + description: n.N("rulers", + "Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty." + ) + }) + } + validate(e) { + if (Array.isArray(e)) { + let t = []; + for (let i of e) + if ("number" == typeof i) t.push({ + column: m.clampedInt(i, 0, 0, 1e4), + color: null + }); + else if (i && "object" == typeof i) { + const e = i; + t.push({ + column: m.clampedInt(e.column, 0, 0, 1e4), + color: e.color + }) + } + return t.sort(((e, t) => e.column - t.column)), t + } + return this.defaultValue + } + }), + scrollbar: I(new class extends c { + constructor() { + const e = { + vertical: 1, + horizontal: 1, + arrowSize: 11, + useShadows: !0, + verticalHasArrows: !1, + horizontalHasArrows: !1, + horizontalScrollbarSize: 12, + horizontalSliderSize: 12, + verticalScrollbarSize: 14, + verticalSliderSize: 14, + handleMouseWheel: !0, + alwaysConsumeMouseWheel: !0, + scrollByPage: !1 + }; + super(92, "scrollbar", e, { + "editor.scrollbar.vertical": { + type: "string", + enum: ["auto", "visible", "hidden"], + enumDescriptions: [n.N("scrollbar.vertical.auto", + "The vertical scrollbar will be visible only when necessary." + ), n.N("scrollbar.vertical.visible", + "The vertical scrollbar will always be visible."), n.N( + "scrollbar.vertical.fit", + "The vertical scrollbar will always be hidden.")], + default: "auto", + description: n.N("scrollbar.vertical", + "Controls the visibility of the vertical scrollbar.") + }, + "editor.scrollbar.horizontal": { + type: "string", + enum: ["auto", "visible", "hidden"], + enumDescriptions: [n.N("scrollbar.horizontal.auto", + "The horizontal scrollbar will be visible only when necessary." + ), n.N("scrollbar.horizontal.visible", + "The horizontal scrollbar will always be visible."), n.N( + "scrollbar.horizontal.fit", + "The horizontal scrollbar will always be hidden.")], + default: "auto", + description: n.N("scrollbar.horizontal", + "Controls the visibility of the horizontal scrollbar.") + }, + "editor.scrollbar.verticalScrollbarSize": { + type: "number", + default: e.verticalScrollbarSize, + description: n.N("scrollbar.verticalScrollbarSize", + "The width of the vertical scrollbar.") + }, + "editor.scrollbar.horizontalScrollbarSize": { + type: "number", + default: e.horizontalScrollbarSize, + description: n.N("scrollbar.horizontalScrollbarSize", + "The height of the horizontal scrollbar.") + }, + "editor.scrollbar.scrollByPage": { + type: "boolean", + default: e.scrollByPage, + description: n.N("scrollbar.scrollByPage", + "Controls whether clicks scroll by page or jump to click position." + ) + } + }) + } + validate(e) { + if (!e || "object" != typeof e) return this.defaultValue; + const t = e, + i = m.clampedInt(t.horizontalScrollbarSize, this.defaultValue.horizontalScrollbarSize, + 0, 1e3), + n = m.clampedInt(t.verticalScrollbarSize, this.defaultValue.verticalScrollbarSize, + 0, 1e3); + return { + arrowSize: m.clampedInt(t.arrowSize, this.defaultValue.arrowSize, + 0, 1e3), + vertical: L(t.vertical, this.defaultValue.vertical), + horizontal: L(t.horizontal, this.defaultValue.horizontal), + useShadows: g(t.useShadows, this.defaultValue.useShadows), + verticalHasArrows: g(t.verticalHasArrows, this.defaultValue.verticalHasArrows), + horizontalHasArrows: g(t.horizontalHasArrows, this.defaultValue.horizontalHasArrows), + handleMouseWheel: g(t.handleMouseWheel, this.defaultValue.handleMouseWheel), + alwaysConsumeMouseWheel: g(t.alwaysConsumeMouseWheel, this.defaultValue + .alwaysConsumeMouseWheel), + horizontalScrollbarSize: i, + horizontalSliderSize: m.clampedInt(t.horizontalSliderSize, i, 0, + 1e3), + verticalScrollbarSize: n, + verticalSliderSize: m.clampedInt(t.verticalSliderSize, n, 0, 1e3), + scrollByPage: g(t.scrollByPage, this.defaultValue.scrollByPage) + } + } + }), + scrollBeyondLastColumn: I(new m(93, "scrollBeyondLastColumn", 5, 0, + 1073741824, { + description: n.N("scrollBeyondLastColumn", + "Controls the number of extra characters beyond which the editor will scroll horizontally." + ) + })), + scrollBeyondLastLine: I(new p(94, "scrollBeyondLastLine", !0, { + description: n.N("scrollBeyondLastLine", + "Controls whether the editor will scroll beyond the last line.") + })), + scrollPredominantAxis: I(new p(95, "scrollPredominantAxis", !0, { + description: n.N("scrollPredominantAxis", + "Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad." + ) + })), + selectionClipboard: I(new p(96, "selectionClipboard", !0, { + description: n.N("selectionClipboard", + "Controls whether the Linux primary clipboard should be supported." + ), + included: o.IJ + })), + selectionHighlight: I(new p(97, "selectionHighlight", !0, { + description: n.N("selectionHighlight", + "Controls whether the editor should highlight matches similar to the selection." + ) + })), + selectOnLineNumbers: I(new p(98, "selectOnLineNumbers", !0)), + showFoldingControls: I(new v(99, "showFoldingControls", "mouseover", [ + "always", "mouseover" + ], { + enumDescriptions: [n.N("showFoldingControls.always", + "Always show the folding controls."), n.N( + "showFoldingControls.mouseover", + "Only show the folding controls when the mouse is over the gutter." + )], + description: n.N("showFoldingControls", + "Controls when the folding controls on the gutter are shown.") + })), + showUnused: I(new p(100, "showUnused", !0, { + description: n.N("showUnused", + "Controls fading out of unused code.") + })), + showDeprecated: I(new p(125, "showDeprecated", !0, { + description: n.N("showDeprecated", + "Controls strikethrough deprecated variables.") + })), + inlayHints: I(new class extends c { + constructor() { + const e = { + enabled: !0, + fontSize: 0, + fontFamily: "" + }; + super(126, "inlayHints", e, { + "editor.inlayHints.enabled": { + type: "boolean", + default: e.enabled, + description: n.N("inlayHints.enable", + "Enables the inlay hints in the editor.") + }, + "editor.inlayHints.fontSize": { + type: "number", + default: e.fontSize, + markdownDescription: n.N("inlayHints.fontSize", + "Controls font size of inlay hints in the editor. When set to `0`, the 90% of `#editor.fontSize#` is used." + ) + }, + "editor.inlayHints.fontFamily": { + type: "string", + default: e.fontFamily, + description: n.N("inlayHints.fontFamily", + "Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used." + ) + } + }) + } + validate(e) { + if (!e || "object" != typeof e) return this.defaultValue; + const t = e; + return { + enabled: g(t.enabled, this.defaultValue.enabled), + fontSize: m.clampedInt(t.fontSize, this.defaultValue.fontSize, 0, + 100), + fontFamily: _.string(t.fontFamily, this.defaultValue.fontFamily) + } + } + }), + snippetSuggestions: I(new v(101, "snippetSuggestions", "inline", ["top", + "bottom", "inline", "none" + ], { + enumDescriptions: [n.N("snippetSuggestions.top", + "Show snippet suggestions on top of other suggestions."), n.N( + "snippetSuggestions.bottom", + "Show snippet suggestions below other suggestions."), n.N( + "snippetSuggestions.inline", + "Show snippets suggestions with other suggestions."), n.N( + "snippetSuggestions.none", "Do not show snippet suggestions.")], + description: n.N("snippetSuggestions", + "Controls whether snippets are shown with other suggestions and how they are sorted." + ) + })), + smartSelect: I(new class extends c { + constructor() { + super(102, "smartSelect", { + selectLeadingAndTrailingWhitespace: !0 + }, { + "editor.smartSelect.selectLeadingAndTrailingWhitespace": { + description: n.N("selectLeadingAndTrailingWhitespace", + "Whether leading and trailing whitespace should always be selected." + ), + default: !0, + type: "boolean" + } + }) + } + validate(e) { + return e && "object" == typeof e ? { + selectLeadingAndTrailingWhitespace: g(e.selectLeadingAndTrailingWhitespace, + this.defaultValue.selectLeadingAndTrailingWhitespace) + } : this.defaultValue + } + }), + smoothScrolling: I(new p(103, "smoothScrolling", !1, { + description: n.N("smoothScrolling", + "Controls whether the editor will scroll using an animation.") + })), + stopRenderingLineAfter: I(new m(105, "stopRenderingLineAfter", 1e4, -1, + 1073741824)), + suggest: I(new class extends c { + constructor() { + const e = { + insertMode: "insert", + filterGraceful: !0, + snippetsPreventQuickSuggestions: !0, + localityBonus: !1, + shareSuggestSelections: !1, + showIcons: !0, + showStatusBar: !1, + preview: !1, + previewMode: "subwordSmart", + showInlineDetails: !0, + showMethods: !0, + showFunctions: !0, + showConstructors: !0, + showDeprecated: !0, + showFields: !0, + showVariables: !0, + showClasses: !0, + showStructs: !0, + showInterfaces: !0, + showModules: !0, + showProperties: !0, + showEvents: !0, + showOperators: !0, + showUnits: !0, + showValues: !0, + showConstants: !0, + showEnums: !0, + showEnumMembers: !0, + showKeywords: !0, + showWords: !0, + showColors: !0, + showFiles: !0, + showReferences: !0, + showFolders: !0, + showTypeParameters: !0, + showSnippets: !0, + showUsers: !0, + showIssues: !0 + }; + super(106, "suggest", e, { + "editor.suggest.insertMode": { + type: "string", + enum: ["insert", "replace"], + enumDescriptions: [n.N("suggest.insertMode.insert", + "Insert suggestion without overwriting text right of the cursor." + ), n.N("suggest.insertMode.replace", + "Insert suggestion and overwrite text right of the cursor." + )], + default: e.insertMode, + description: n.N("suggest.insertMode", + "Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature." + ) + }, + "editor.suggest.filterGraceful": { + type: "boolean", + default: e.filterGraceful, + description: n.N("suggest.filterGraceful", + "Controls whether filtering and sorting suggestions accounts for small typos." + ) + }, + "editor.suggest.localityBonus": { + type: "boolean", + default: e.localityBonus, + description: n.N("suggest.localityBonus", + "Controls whether sorting favors words that appear close to the cursor." + ) + }, + "editor.suggest.shareSuggestSelections": { + type: "boolean", + default: e.shareSuggestSelections, + markdownDescription: n.N("suggest.shareSuggestSelections", + "Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`)." + ) + }, + "editor.suggest.snippetsPreventQuickSuggestions": { + type: "boolean", + default: e.snippetsPreventQuickSuggestions, + description: n.N("suggest.snippetsPreventQuickSuggestions", + "Controls whether an active snippet prevents quick suggestions." + ) + }, + "editor.suggest.showIcons": { + type: "boolean", + default: e.showIcons, + description: n.N("suggest.showIcons", + "Controls whether to show or hide icons in suggestions.") + }, + "editor.suggest.showStatusBar": { + type: "boolean", + default: e.showStatusBar, + description: n.N("suggest.showStatusBar", + "Controls the visibility of the status bar at the bottom of the suggest widget." + ) + }, + "editor.suggest.preview": { + type: "boolean", + default: e.preview, + description: n.N("suggest.preview", + "Controls whether to preview the suggestion outcome in the editor." + ) + }, + "editor.suggest.previewMode": { + type: "string", + enum: ["prefix", "subword", "subwordSmart"], + enumDescriptions: [n.N("suggest.previewMode.prefix", + "Only render a preview if the replace text is a prefix of the insert text." + ), n.N("suggest.previewMode.subword", + "Only render a preview if the replace text is a subword of the insert text." + ), n.N("suggest.previewMode.subwordSmart", + "Render a preview if the replace text is a subword of the insert text, or if it is a prefix of the insert text." + )], + default: e.previewMode, + description: n.N("suggest.previewMode", + "Controls which mode to use for rendering the suggest preview." + ) + }, + "editor.suggest.showInlineDetails": { + type: "boolean", + default: e.showInlineDetails, + description: n.N("suggest.showInlineDetails", + "Controls whether suggest details show inline with the label or only in the details widget" + ) + }, + "editor.suggest.maxVisibleSuggestions": { + type: "number", + deprecationMessage: n.N("suggest.maxVisibleSuggestions.dep", + "This setting is deprecated. The suggest widget can now be resized." + ) + }, + "editor.suggest.filteredTypes": { + type: "object", + deprecationMessage: n.N("deprecated", + "This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead." + ) + }, + "editor.suggest.showMethods": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showMethods", + "When enabled IntelliSense shows `method`-suggestions.") + }, + "editor.suggest.showFunctions": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showFunctions", + "When enabled IntelliSense shows `function`-suggestions.") + }, + "editor.suggest.showConstructors": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showConstructors", + "When enabled IntelliSense shows `constructor`-suggestions." + ) + }, + "editor.suggest.showDeprecated": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showDeprecated", + "When enabled IntelliSense shows `deprecated`-suggestions.") + }, + "editor.suggest.showFields": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showFields", + "When enabled IntelliSense shows `field`-suggestions.") + }, + "editor.suggest.showVariables": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showVariables", + "When enabled IntelliSense shows `variable`-suggestions.") + }, + "editor.suggest.showClasses": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showClasss", + "When enabled IntelliSense shows `class`-suggestions.") + }, + "editor.suggest.showStructs": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showStructs", + "When enabled IntelliSense shows `struct`-suggestions.") + }, + "editor.suggest.showInterfaces": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showInterfaces", + "When enabled IntelliSense shows `interface`-suggestions.") + }, + "editor.suggest.showModules": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showModules", + "When enabled IntelliSense shows `module`-suggestions.") + }, + "editor.suggest.showProperties": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showPropertys", + "When enabled IntelliSense shows `property`-suggestions.") + }, + "editor.suggest.showEvents": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showEvents", + "When enabled IntelliSense shows `event`-suggestions.") + }, + "editor.suggest.showOperators": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showOperators", + "When enabled IntelliSense shows `operator`-suggestions.") + }, + "editor.suggest.showUnits": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showUnits", + "When enabled IntelliSense shows `unit`-suggestions.") + }, + "editor.suggest.showValues": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showValues", + "When enabled IntelliSense shows `value`-suggestions.") + }, + "editor.suggest.showConstants": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showConstants", + "When enabled IntelliSense shows `constant`-suggestions.") + }, + "editor.suggest.showEnums": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showEnums", + "When enabled IntelliSense shows `enum`-suggestions.") + }, + "editor.suggest.showEnumMembers": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showEnumMembers", + "When enabled IntelliSense shows `enumMember`-suggestions.") + }, + "editor.suggest.showKeywords": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showKeywords", + "When enabled IntelliSense shows `keyword`-suggestions.") + }, + "editor.suggest.showWords": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showTexts", + "When enabled IntelliSense shows `text`-suggestions.") + }, + "editor.suggest.showColors": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showColors", + "When enabled IntelliSense shows `color`-suggestions.") + }, + "editor.suggest.showFiles": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showFiles", + "When enabled IntelliSense shows `file`-suggestions.") + }, + "editor.suggest.showReferences": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showReferences", + "When enabled IntelliSense shows `reference`-suggestions.") + }, + "editor.suggest.showCustomcolors": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showCustomcolors", + "When enabled IntelliSense shows `customcolor`-suggestions." + ) + }, + "editor.suggest.showFolders": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showFolders", + "When enabled IntelliSense shows `folder`-suggestions.") + }, + "editor.suggest.showTypeParameters": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showTypeParameters", + "When enabled IntelliSense shows `typeParameter`-suggestions." + ) + }, + "editor.suggest.showSnippets": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showSnippets", + "When enabled IntelliSense shows `snippet`-suggestions.") + }, + "editor.suggest.showUsers": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showUsers", + "When enabled IntelliSense shows `user`-suggestions.") + }, + "editor.suggest.showIssues": { + type: "boolean", + default: !0, + markdownDescription: n.N("editor.suggest.showIssues", + "When enabled IntelliSense shows `issues`-suggestions.") + } + }) + } + validate(e) { + if (!e || "object" != typeof e) return this.defaultValue; + const t = e; + return { + insertMode: b(t.insertMode, this.defaultValue.insertMode, [ + "insert", "replace" + ]), + filterGraceful: g(t.filterGraceful, this.defaultValue.filterGraceful), + snippetsPreventQuickSuggestions: g(t.snippetsPreventQuickSuggestions, + this.defaultValue.filterGraceful), + localityBonus: g(t.localityBonus, this.defaultValue.localityBonus), + shareSuggestSelections: g(t.shareSuggestSelections, this.defaultValue + .shareSuggestSelections), + showIcons: g(t.showIcons, this.defaultValue.showIcons), + showStatusBar: g(t.showStatusBar, this.defaultValue.showStatusBar), + preview: g(t.preview, this.defaultValue.preview), + previewMode: b(t.previewMode, this.defaultValue.previewMode, [ + "prefix", "subword", "subwordSmart" + ]), + showInlineDetails: g(t.showInlineDetails, this.defaultValue.showInlineDetails), + showMethods: g(t.showMethods, this.defaultValue.showMethods), + showFunctions: g(t.showFunctions, this.defaultValue.showFunctions), + showConstructors: g(t.showConstructors, this.defaultValue.showConstructors), + showDeprecated: g(t.showDeprecated, this.defaultValue.showDeprecated), + showFields: g(t.showFields, this.defaultValue.showFields), + showVariables: g(t.showVariables, this.defaultValue.showVariables), + showClasses: g(t.showClasses, this.defaultValue.showClasses), + showStructs: g(t.showStructs, this.defaultValue.showStructs), + showInterfaces: g(t.showInterfaces, this.defaultValue.showInterfaces), + showModules: g(t.showModules, this.defaultValue.showModules), + showProperties: g(t.showProperties, this.defaultValue.showProperties), + showEvents: g(t.showEvents, this.defaultValue.showEvents), + showOperators: g(t.showOperators, this.defaultValue.showOperators), + showUnits: g(t.showUnits, this.defaultValue.showUnits), + showValues: g(t.showValues, this.defaultValue.showValues), + showConstants: g(t.showConstants, this.defaultValue.showConstants), + showEnums: g(t.showEnums, this.defaultValue.showEnums), + showEnumMembers: g(t.showEnumMembers, this.defaultValue.showEnumMembers), + showKeywords: g(t.showKeywords, this.defaultValue.showKeywords), + showWords: g(t.showWords, this.defaultValue.showWords), + showColors: g(t.showColors, this.defaultValue.showColors), + showFiles: g(t.showFiles, this.defaultValue.showFiles), + showReferences: g(t.showReferences, this.defaultValue.showReferences), + showFolders: g(t.showFolders, this.defaultValue.showFolders), + showTypeParameters: g(t.showTypeParameters, this.defaultValue.showTypeParameters), + showSnippets: g(t.showSnippets, this.defaultValue.showSnippets), + showUsers: g(t.showUsers, this.defaultValue.showUsers), + showIssues: g(t.showIssues, this.defaultValue.showIssues) + } + } + }), + inlineSuggest: I(new class extends c { + constructor() { + const e = { + enabled: !0, + mode: "subwordSmart" + }; + super(54, "inlineSuggest", e, { + "editor.inlineSuggest.enabled": { + type: "boolean", + default: e.enabled, + description: n.N("inlineSuggest.enabled", + "Controls whether to automatically show inline suggestions in the editor." + ) + }, + "editor.inlineSuggest.mode": { + type: "string", + enum: ["prefix", "subword", "subwordSmart"], + enumDescriptions: [n.N("inlineSuggest.mode.prefix", + "Only render an inline suggestion if the replace text is a prefix of the insert text." + ), n.N("inlineSuggest.mode.subword", + "Only render an inline suggestion if the replace text is a subword of the insert text." + ), n.N("inlineSuggest.mode.subwordSmart", + "Only render an inline suggestion if the replace text is a subword of the insert text, but the subword must start after the cursor." + )], + default: e.mode, + description: n.N("inlineSuggest.mode", + "Controls which mode to use for rendering inline suggestions." + ) + } + }) + } + validate(e) { + if (!e || "object" != typeof e) return this.defaultValue; + const t = e; + return { + enabled: g(t.enabled, this.defaultValue.enabled), + mode: b(t.mode, this.defaultValue.mode, ["prefix", "subword", + "subwordSmart" + ]) + } + } + }), + suggestFontSize: I(new m(107, "suggestFontSize", 0, 0, 1e3, { + markdownDescription: n.N("suggestFontSize", + "Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used." + ) + })), + suggestLineHeight: I(new m(108, "suggestLineHeight", 0, 0, 1e3, { + markdownDescription: n.N("suggestLineHeight", + "Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8." + ) + })), + suggestOnTriggerCharacters: I(new p(109, "suggestOnTriggerCharacters", ! + 0, { + description: n.N("suggestOnTriggerCharacters", + "Controls whether suggestions should automatically show up when typing trigger characters." + ) + })), + suggestSelection: I(new v(110, "suggestSelection", "recentlyUsed", [ + "first", "recentlyUsed", "recentlyUsedByPrefix" + ], { + markdownEnumDescriptions: [n.N("suggestSelection.first", + "Always select the first suggestion."), n.N( + "suggestSelection.recentlyUsed", + "Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently." + ), n.N("suggestSelection.recentlyUsedByPrefix", + "Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`." + )], + description: n.N("suggestSelection", + "Controls how suggestions are pre-selected when showing the suggest list." + ) + })), + tabCompletion: I(new v(111, "tabCompletion", "off", ["on", "off", + "onlySnippets" + ], { + enumDescriptions: [n.N("tabCompletion.on", + "Tab complete will insert the best matching suggestion when pressing tab." + ), n.N("tabCompletion.off", "Disable tab completions."), n.N( + "tabCompletion.onlySnippets", + "Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled." + )], + description: n.N("tabCompletion", "Enables tab completions.") + })), + tabIndex: I(new m(112, "tabIndex", 0, -1, 1073741824)), + unusualLineTerminators: I(new v(113, "unusualLineTerminators", "prompt", [ + "auto", "off", "prompt" + ], { + enumDescriptions: [n.N("unusualLineTerminators.auto", + "Unusual line terminators are automatically removed."), n.N( + "unusualLineTerminators.off", + "Unusual line terminators are ignored."), n.N( + "unusualLineTerminators.prompt", + "Unusual line terminators prompt to be removed.")], + description: n.N("unusualLineTerminators", + "Remove unusual line terminators that might cause problems.") + })), + useShadowDOM: I(new p(114, "useShadowDOM", !0)), + useTabStops: I(new p(115, "useTabStops", !0, { + description: n.N("useTabStops", + "Inserting and deleting whitespace follows tab stops.") + })), + wordSeparators: I(new _(116, "wordSeparators", r.vu, { + description: n.N("wordSeparators", + "Characters that will be used as word separators when doing word related navigations or operations." + ) + })), + wordWrap: I(new v(117, "wordWrap", "off", ["off", "on", + "wordWrapColumn", "bounded" + ], { + markdownEnumDescriptions: [n.N("wordWrap.off", + "Lines will never wrap."), n.N("wordWrap.on", + "Lines will wrap at the viewport width."), n.N({ + key: "wordWrap.wordWrapColumn", + comment: [ + "- `editor.wordWrapColumn` refers to a different setting and should not be localized." + ] + }, "Lines will wrap at `#editor.wordWrapColumn#`."), n.N({ + key: "wordWrap.bounded", + comment: [ + "- viewport means the edge of the visible window size.", + "- `editor.wordWrapColumn` refers to a different setting and should not be localized." + ] + }, + "Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`." + )], + description: n.N({ + key: "wordWrap", + comment: [ + "- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.", + "- `editor.wordWrapColumn` refers to a different setting and should not be localized." + ] + }, "Controls how lines should wrap.") + })), + wordWrapBreakAfterCharacters: I(new _(118, + "wordWrapBreakAfterCharacters", + " \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」" + )), + wordWrapBreakBeforeCharacters: I(new _(119, + "wordWrapBreakBeforeCharacters", "([{‘“〈《「『【〔([{「£¥$£¥++")), + wordWrapColumn: I(new m(120, "wordWrapColumn", 80, 1, 1073741824, { + markdownDescription: n.N({ + key: "wordWrapColumn", + comment: [ + "- `editor.wordWrap` refers to a different setting and should not be localized.", + "- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized." + ] + }, + "Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`." + ) + })), + wordWrapOverride1: I(new v(121, "wordWrapOverride1", "inherit", ["off", + "on", "inherit" + ])), + wordWrapOverride2: I(new v(122, "wordWrapOverride2", "inherit", ["off", + "on", "inherit" + ])), + wrappingIndent: I(new w(123, "wrappingIndent", 1, "same", ["none", + "same", "indent", "deepIndent" + ], (function(e) { + switch (e) { + case "none": + return 0; + case "same": + return 1; + case "indent": + return 2; + case "deepIndent": + return 3 + } + }), { + enumDescriptions: [n.N("wrappingIndent.none", + "No indentation. Wrapped lines begin at column 1."), n.N( + "wrappingIndent.same", + "Wrapped lines get the same indentation as the parent."), n.N( + "wrappingIndent.indent", + "Wrapped lines get +1 indentation toward the parent."), n.N( + "wrappingIndent.deepIndent", + "Wrapped lines get +2 indentation toward the parent.")], + description: n.N("wrappingIndent", + "Controls the indentation of wrapped lines.") + })), + wrappingStrategy: I(new v(124, "wrappingStrategy", "simple", ["simple", + "advanced" + ], { + enumDescriptions: [n.N("wrappingStrategy.simple", + "Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width." + ), n.N("wrappingStrategy.advanced", + "Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases." + )], + description: n.N("wrappingStrategy", + "Controls the algorithm that computes wrapping points.") + })), + editorClassName: I(new class extends h { + constructor() { + super(127, [65, 32]) + } + compute(e, t, i) { + const n = ["monaco-editor"]; + return t.get(32) && n.push(t.get(32)), e.extraEditorClassName && n + .push(e.extraEditorClassName), "default" === t.get(65) ? n.push( + "mouse-default") : "copy" === t.get(65) && n.push("mouse-copy"), + t.get(100) && n.push("showUnused"), t.get(125) && n.push( + "showDeprecated"), n.join(" ") + } + }), + pixelRatio: I(new class extends h { + constructor() { + super(128) + } + compute(e, t, i) { + return e.pixelRatio + } + }), + tabFocusMode: I(new class extends h { + constructor() { + super(129, [80]) + } + compute(e, t, i) { + return !!t.get(80) || e.tabFocusMode + } + }), + layoutInfo: I(new x), + wrappingInfo: I(new class extends h { + constructor() { + super(131, [130]) + } + compute(e, t, i) { + const n = t.get(130); + return { + isDominatedByLongLines: e.isDominatedByLongLines, + isWordWrapMinified: n.isWordWrapMinified, + isViewportWrapping: n.isViewportWrapping, + wrappingColumn: n.wrappingColumn + } + } + }) + } + }, + 2334: (e, t, i) => { + "use strict"; + i.d(t, { + C: () => o + }); + var n = i(4669); + const o = new class { + constructor() { + this._zoomLevel = 0, this._onDidChangeZoomLevel = new n.Q5, this.onDidChangeZoomLevel = + this._onDidChangeZoomLevel.event + } + getZoomLevel() { + return this._zoomLevel + } + setZoomLevel(e) { + e = Math.min(Math.max(-5, e), 20), this._zoomLevel !== e && (this._zoomLevel = + e, this._onDidChangeZoomLevel.fire(this._zoomLevel)) + } + } + }, + 7374: (e, t, i) => { + "use strict"; + i.d(t, { + E4: () => s, + pR: () => a + }); + var n = i(1432), + o = i(2334); + const r = n.dz ? 1.5 : 1.35; + class s { + constructor(e) { + this._bareFontInfoBrand = void 0, this.zoomLevel = e.zoomLevel, this.pixelRatio = + e.pixelRatio, this.fontFamily = String(e.fontFamily), this.fontWeight = + String(e.fontWeight), this.fontSize = e.fontSize, this.fontFeatureSettings = + e.fontFeatureSettings, this.lineHeight = 0 | e.lineHeight, this.letterSpacing = + e.letterSpacing + } + static createFromValidatedSettings(e, t, i, n) { + const o = e.get(41), + r = e.get(45), + a = e.get(44), + l = e.get(43), + d = e.get(58), + c = e.get(55); + return s._create(o, r, a, l, d, c, t, i, n) + } + static _create(e, t, i, n, a, l, d, c, h) { + 0 === a ? a = r * i : a < 8 && (a *= i), (a = Math.round(a)) < 8 && (a = + 8); + const u = 1 + (h ? 0 : .1 * o.C.getZoomLevel()); + return new s({ + zoomLevel: d, + pixelRatio: c, + fontFamily: e, + fontWeight: t, + fontSize: i *= u, + fontFeatureSettings: n, + lineHeight: a *= u, + letterSpacing: l + }) + } + getId() { + return this.zoomLevel + "-" + this.pixelRatio + "-" + this.fontFamily + + "-" + this.fontWeight + "-" + this.fontSize + "-" + this.fontFeatureSettings + + "-" + this.lineHeight + "-" + this.letterSpacing + } + getMassagedFontFamily() { + return /[,"']/.test(this.fontFamily) ? this.fontFamily : /[+ ]/.test( + this.fontFamily) ? `"${this.fontFamily}"` : this.fontFamily + } + } + class a extends s { + constructor(e, t) { + super(e), this._editorStylingBrand = void 0, this.version = 1, this.isTrusted = + t, this.isMonospace = e.isMonospace, this.typicalHalfwidthCharacterWidth = + e.typicalHalfwidthCharacterWidth, this.typicalFullwidthCharacterWidth = + e.typicalFullwidthCharacterWidth, this.canUseHalfwidthRightwardsArrow = + e.canUseHalfwidthRightwardsArrow, this.spaceWidth = e.spaceWidth, + this.middotWidth = e.middotWidth, this.wsmiddotWidth = e.wsmiddotWidth, + this.maxDigitWidth = e.maxDigitWidth + } + equals(e) { + return this.fontFamily === e.fontFamily && this.fontWeight === e.fontWeight && + this.fontSize === e.fontSize && this.fontFeatureSettings === e.fontFeatureSettings && + this.lineHeight === e.lineHeight && this.letterSpacing === e.letterSpacing && + this.typicalHalfwidthCharacterWidth === e.typicalHalfwidthCharacterWidth && + this.typicalFullwidthCharacterWidth === e.typicalFullwidthCharacterWidth && + this.canUseHalfwidthRightwardsArrow === e.canUseHalfwidthRightwardsArrow && + this.spaceWidth === e.spaceWidth && this.middotWidth === e.middotWidth && + this.wsmiddotWidth === e.wsmiddotWidth && this.maxDigitWidth === e.maxDigitWidth + } + } + }, + 3675: (e, t, i) => { + "use strict"; + i.d(t, { + l: () => o + }); + var n = i(3181); + class o { + static whitespaceVisibleColumn(e, t, i) { + const o = e.length; + let r = 0, + s = -1, + a = -1; + for (let l = 0; l < o; l++) { + if (l === t) return [s, a, r]; + switch (r % i == 0 && (s = l, a = r), e.charCodeAt(l)) { + case 32: + r += 1; + break; + case 9: + r = n.io.nextRenderTabStop(r, i); + break; + default: + return [-1, -1, -1] + } + } + return t === o ? [s, a, r] : [-1, -1, -1] + } + static atomicPosition(e, t, i, r) { + const s = e.length, + [a, l, d] = o.whitespaceVisibleColumn(e, t, i); + if (-1 === d) return -1; + let c; + switch (r) { + case 0: + c = !0; + break; + case 1: + c = !1; + break; + case 2: + if (d % i == 0) return t; + c = d % i <= i / 2 + } + if (c) { + if (-1 === a) return -1; + let t = l; + for (let o = a; o < s; ++o) { + if (t === l + i) return a; + switch (e.charCodeAt(o)) { + case 32: + t += 1; + break; + case 9: + t = n.io.nextRenderTabStop(t, i); + break; + default: + return -1 + } + } + return t === l + i ? a : -1 + } + const h = n.io.nextRenderTabStop(d, i); + let u = d; + for (let o = t; o < s; o++) { + if (u === h) return o; + switch (e.charCodeAt(o)) { + case 32: + u += 1; + break; + case 9: + u = n.io.nextRenderTabStop(u, i); + break; + default: + return -1 + } + } + return u === h ? s : -1 + } + } + }, + 3181: (e, t, i) => { + "use strict"; + i.d(t, { + LM: () => g, + rS: () => p, + zp: () => m, + Vi: () => b, + Tp: () => v, + io: () => w, + LN: () => C + }); + var n = i(7301), + o = i(7295), + r = i(187), + s = i(4314), + a = i(3860), + l = i(6281), + d = i(3831); + const c = () => !0, + h = () => !1, + u = e => " " === e || "\t" === e; + class g { + constructor(e, t, i) { + this._cursorMoveConfigurationBrand = void 0, this._languageIdentifier = + e; + const n = i.options, + o = n.get(130); + this.readOnly = n.get(80), this.tabSize = t.tabSize, this.indentSize = + t.indentSize, this.insertSpaces = t.insertSpaces, this.stickyTabStops = + n.get(104), this.lineHeight = n.get(58), this.pageSize = Math.max(1, + Math.floor(o.height / this.lineHeight) - 2), this.useTabStops = n.get( + 115), this.wordSeparators = n.get(116), this.emptySelectionClipboard = + n.get(31), this.copyWithSyntaxHighlighting = n.get(20), this.multiCursorMergeOverlapping = + n.get(68), this.multiCursorPaste = n.get(70), this.autoClosingBrackets = + n.get(5), this.autoClosingQuotes = n.get(8), this.autoClosingDelete = + n.get(6), this.autoClosingOvertype = n.get(7), this.autoSurround = n.get( + 11), this.autoIndent = n.get(9), this.surroundingPairs = {}, this._electricChars = + null, this.shouldAutoCloseBefore = { + quote: g._getShouldAutoClose(e, this.autoClosingQuotes), + bracket: g._getShouldAutoClose(e, this.autoClosingBrackets) + }, this.autoClosingPairs = d.zu.getAutoClosingPairs(e.id); + let r = g._getSurroundingPairs(e); + if (r) + for (const e of r) this.surroundingPairs[e.open] = e.close + } + static shouldRecreate(e) { + return e.hasChanged(130) || e.hasChanged(116) || e.hasChanged(31) || e + .hasChanged(68) || e.hasChanged(70) || e.hasChanged(5) || e.hasChanged( + 8) || e.hasChanged(6) || e.hasChanged(7) || e.hasChanged(11) || e.hasChanged( + 115) || e.hasChanged(58) || e.hasChanged(80) + } + get electricChars() { + if (!this._electricChars) { + this._electricChars = {}; + let e = g._getElectricCharacters(this._languageIdentifier); + if (e) + for (const t of e) this._electricChars[t] = !0 + } + return this._electricChars + } + normalizeIndentation(e) { + return l.yO.normalizeIndentation(e, this.indentSize, this.insertSpaces) + } + static _getElectricCharacters(e) { + try { + return d.zu.getElectricCharacters(e.id) + } catch (e) { + return (0, n.dL)(e), null + } + } + static _getShouldAutoClose(e, t) { + switch (t) { + case "beforeWhitespace": + return u; + case "languageDefined": + return g._getLanguageDefinedShouldAutoClose(e); + case "always": + return c; + case "never": + return h + } + } + static _getLanguageDefinedShouldAutoClose(e) { + try { + const t = d.zu.getAutoCloseBeforeSet(e.id); + return e => -1 !== t.indexOf(e) + } catch (e) { + return (0, n.dL)(e), h + } + } + static _getSurroundingPairs(e) { + try { + return d.zu.getSurroundingPairs(e.id) + } catch (e) { + return (0, n.dL)(e), null + } + } + } + class p { + constructor(e, t, i, n) { + this._singleCursorStateBrand = void 0, this.selectionStart = e, this.selectionStartLeftoverVisibleColumns = + t, this.position = i, this.leftoverVisibleColumns = n, this.selection = + p._computeSelection(this.selectionStart, this.position) + } + equals(e) { + return this.selectionStartLeftoverVisibleColumns === e.selectionStartLeftoverVisibleColumns && + this.leftoverVisibleColumns === e.leftoverVisibleColumns && this.position + .equals(e.position) && this.selectionStart.equalsRange(e.selectionStart) + } + hasSelection() { + return !this.selection.isEmpty() || !this.selectionStart.isEmpty() + } + move(e, t, i, n) { + return e ? new p(this.selectionStart, this.selectionStartLeftoverVisibleColumns, + new r.L(t, i), n) : new p(new s.e(t, i, t, i), n, new r.L(t, i), n) + } + static _computeSelection(e, t) { + let i, n, o, r; + return e.isEmpty() ? (i = e.startLineNumber, n = e.startColumn, o = t.lineNumber, + r = t.column) : t.isBeforeOrEqual(e.getStartPosition()) ? (i = e.endLineNumber, + n = e.endColumn, o = t.lineNumber, r = t.column) : (i = e.startLineNumber, + n = e.startColumn, o = t.lineNumber, r = t.column), new a.Y(i, n, o, + r) + } + } + class m { + constructor(e, t, i, n) { + this._cursorContextBrand = void 0, this.model = e, this.viewModel = t, + this.coordinatesConverter = i, this.cursorConfig = n + } + } + class f { + constructor(e) { + this.modelState = e, this.viewState = null + } + } + class _ { + constructor(e) { + this.modelState = null, this.viewState = e + } + } + class b { + constructor(e, t) { + this._cursorStateBrand = void 0, this.modelState = e, this.viewState = + t + } + static fromModelState(e) { + return new f(e) + } + static fromViewState(e) { + return new _(e) + } + static fromModelSelection(e) { + const t = e.selectionStartLineNumber, + i = e.selectionStartColumn, + n = e.positionLineNumber, + o = e.positionColumn, + a = new p(new s.e(t, i, t, i), 0, new r.L(n, o), 0); + return b.fromModelState(a) + } + static fromModelSelections(e) { + let t = []; + for (let i = 0, n = e.length; i < n; i++) t[i] = this.fromModelSelection( + e[i]); + return t + } + equals(e) { + return this.viewState.equals(e.viewState) && this.modelState.equals(e.modelState) + } + } + class v { + constructor(e, t, i) { + this._editOperationResultBrand = void 0, this.type = e, this.commands = + t, this.shouldPushStackElementBefore = i.shouldPushStackElementBefore, + this.shouldPushStackElementAfter = i.shouldPushStackElementAfter + } + } + class w { + static visibleColumnFromColumn(e, t, i) { + const n = e.length, + r = t - 1 < n ? t - 1 : n; + let s = 0, + a = 0; + for (; a < r;) { + const t = o.ZH(e, r, a); + if (a += t >= 65536 ? 2 : 1, 9 === t) s = w.nextRenderTabStop(s, i); + else { + let i = o.S6(t); + for (; a < r;) { + const t = o.ZH(e, r, a), + n = o.S6(t); + if (o.fi(i, n)) break; + a += t >= 65536 ? 2 : 1, i = n + } + o.K7(t) || o.C8(t) ? s += 2 : s += 1 + } + } + return s + } + static visibleColumnsByColumns(e, t) { + const i = e.length; + let n = new Array; + n.push(-1); + let r = 0, + s = 0; + for (; s < i;) { + const a = o.ZH(e, i, s); + if (s += a >= 65536 ? 2 : 1, n.push(r), a >= 65536 && n.push(r), 9 === + a) r = w.nextRenderTabStop(r, t); + else { + let t = o.S6(a); + for (; s < i;) { + const l = o.ZH(e, i, s), + d = o.S6(l); + if (o.fi(t, d)) break; + s += l >= 65536 ? 2 : 1, n.push(r), a >= 65536 && n.push(r), t = d + } + o.K7(a) || o.C8(a) ? r += 2 : r += 1 + } + } + return n.push(r), n + } + static visibleColumnFromColumn2(e, t, i) { + return this.visibleColumnFromColumn(t.getLineContent(i.lineNumber), i.column, + e.tabSize) + } + static columnFromVisibleColumn(e, t, i) { + if (t <= 0) return 1; + const n = e.length; + let r = 0, + s = 1, + a = 0; + for (; a < n;) { + const l = o.ZH(e, n, a); + let d; + if (a += l >= 65536 ? 2 : 1, 9 === l) d = w.nextRenderTabStop(r, i); + else { + let t = o.S6(l); + for (; a < n;) { + const i = o.ZH(e, n, a), + r = o.S6(i); + if (o.fi(t, r)) break; + a += i >= 65536 ? 2 : 1, t = r + } + d = o.K7(l) || o.C8(l) ? r + 2 : r + 1 + } + const c = a + 1; + if (d >= t) return d - t < t - r ? c : s; + r = d, s = c + } + return n + 1 + } + static columnFromVisibleColumn2(e, t, i, n) { + let o = this.columnFromVisibleColumn(t.getLineContent(i), n, e.tabSize), + r = t.getLineMinColumn(i); + if (o < r) return r; + let s = t.getLineMaxColumn(i); + return o > s ? s : o + } + static nextRenderTabStop(e, t) { + return e + t - e % t + } + static nextIndentTabStop(e, t) { + return e + t - e % t + } + static prevRenderTabStop(e, t) { + return Math.max(0, e - 1 - (e - 1) % t) + } + static prevIndentTabStop(e, t) { + return Math.max(0, e - 1 - (e - 1) % t) + } + } + + function C(e) { + return "'" === e || '"' === e || "`" === e + } + }, + 1380: (e, t, i) => { + "use strict"; + i.d(t, { + A: () => d + }); + var n = i(7295), + o = i(1329), + r = i(3181), + s = i(8784), + a = i(4314), + l = i(187); + class d { + static deleteRight(e, t, i, n) { + let r = [], + l = 3 !== e; + for (let e = 0, d = n.length; e < d; e++) { + const d = n[e]; + let c = d; + if (c.isEmpty()) { + let e = d.getPosition(), + n = s.o.right(t, i, e); + c = new a.e(n.lineNumber, n.column, e.lineNumber, e.column) + } + c.isEmpty() ? r[e] = null : (c.startLineNumber !== c.endLineNumber && + (l = !0), r[e] = new o.T4(c, "")) + } + return [l, r] + } + static isAutoClosingPairDelete(e, t, i, n, o, s, a) { + if ("never" === t && "never" === i) return !1; + if ("never" === e) return !1; + for (let l = 0, d = s.length; l < d; l++) { + const d = s[l], + c = d.getPosition(); + if (!d.isEmpty()) return !1; + const h = o.getLineContent(c.lineNumber); + if (c.column < 2 || c.column >= h.length + 1) return !1; + const u = h.charAt(c.column - 2), + g = n.get(u); + if (!g) return !1; + if ((0, r.LN)(u)) { + if ("never" === i) return !1 + } else if ("never" === t) return !1; + const p = h.charAt(c.column - 1); + let m = !1; + for (const e of g) e.open === u && e.close === p && (m = !0); + if (!m) return !1; + if ("auto" === e) { + let e = !1; + for (let t = 0, i = a.length; t < i; t++) { + const i = a[t]; + if (c.lineNumber === i.startLineNumber && c.column === i.startColumn) { + e = !0; + break + } + } + if (!e) return !1 + } + } + return !0 + } + static _runAutoClosingPairDelete(e, t, i) { + let n = []; + for (let e = 0, t = i.length; e < t; e++) { + const t = i[e].getPosition(), + r = new a.e(t.lineNumber, t.column - 1, t.lineNumber, t.column + 1); + n[e] = new o.T4(r, "") + } + return [!0, n] + } + static deleteLeft(e, t, i, n, r) { + if (this.isAutoClosingPairDelete(t.autoClosingDelete, t.autoClosingBrackets, + t.autoClosingQuotes, t.autoClosingPairs.autoClosingPairsOpenByEnd, i, + n, r)) return this._runAutoClosingPairDelete(t, i, n); + const s = []; + let a = 2 !== e; + for (let e = 0, r = n.length; e < r; e++) { + let r = d.getDeleteRange(n[e], i, t); + r.isEmpty() ? s[e] = null : (r.startLineNumber !== r.endLineNumber && + (a = !0), s[e] = new o.T4(r, "")) + } + return [a, s] + } + static getDeleteRange(e, t, i) { + if (!e.isEmpty()) return e; + const o = e.getPosition(); + if (i.useTabStops && o.column > 1) { + const e = t.getLineContent(o.lineNumber), + s = n.LC(e), + l = -1 === s ? e.length + 1 : s + 1; + if (o.column <= l) { + const e = r.io.visibleColumnFromColumn2(i, t, o), + n = r.io.prevIndentTabStop(e, i.indentSize), + s = r.io.columnFromVisibleColumn2(i, t, o.lineNumber, n); + return new a.e(o.lineNumber, s, o.lineNumber, o.column) + } + } + return a.e.fromPositions(d.getPositionAfterDeleteLeft(o, t), o) + } + static getPositionAfterDeleteLeft(e, t) { + if (e.column > 1) { + const i = n.oH(e.column - 1, t.getLineContent(e.lineNumber)); + return e.with(void 0, i + 1) + } + if (e.lineNumber > 1) { + const i = e.lineNumber - 1; + return new l.L(i, t.getLineMaxColumn(i)) + } + return e + } + static cut(e, t, i) { + let n = []; + for (let r = 0, s = i.length; r < s; r++) { + const s = i[r]; + if (s.isEmpty()) + if (e.emptySelectionClipboard) { + let e, i, l, d, c = s.getPosition(); + c.lineNumber < t.getLineCount() ? (e = c.lineNumber, i = 1, l = c.lineNumber + + 1, d = 1) : c.lineNumber > 1 ? (e = c.lineNumber - 1, i = t.getLineMaxColumn( + c.lineNumber - 1), l = c.lineNumber, d = t.getLineMaxColumn(c.lineNumber)) : + (e = c.lineNumber, i = 1, l = c.lineNumber, d = t.getLineMaxColumn( + c.lineNumber)); + let h = new a.e(e, i, l, d); + h.isEmpty() ? n[r] = null : n[r] = new o.T4(h, "") + } else n[r] = null; + else n[r] = new o.T4(s, "") + } + return new r.Tp(0, n, { + shouldPushStackElementBefore: !0, + shouldPushStackElementAfter: !0 + }) + } + } + }, + 3814: (e, t, i) => { + "use strict"; + i.d(t, { + P: () => c, + N: () => n + }); + var n, o = i(8401), + r = i(3181), + s = i(8784), + a = i(5795), + l = i(187), + d = i(4314); + class c { + static addCursorDown(e, t, i) { + let n = [], + o = 0; + for (let a = 0, l = t.length; a < l; a++) { + const l = t[a]; + n[o++] = new r.Vi(l.modelState, l.viewState), n[o++] = i ? r.Vi.fromModelState( + s.o.translateDown(e.cursorConfig, e.model, l.modelState)) : r.Vi.fromViewState( + s.o.translateDown(e.cursorConfig, e, l.viewState)) + } + return n + } + static addCursorUp(e, t, i) { + let n = [], + o = 0; + for (let a = 0, l = t.length; a < l; a++) { + const l = t[a]; + n[o++] = new r.Vi(l.modelState, l.viewState), n[o++] = i ? r.Vi.fromModelState( + s.o.translateUp(e.cursorConfig, e.model, l.modelState)) : r.Vi.fromViewState( + s.o.translateUp(e.cursorConfig, e, l.viewState)) + } + return n + } + static moveToBeginningOfLine(e, t, i) { + let n = []; + for (let o = 0, r = t.length; o < r; o++) { + const r = t[o]; + n[o] = this._moveToLineStart(e, r, i) + } + return n + } + static _moveToLineStart(e, t, i) { + const n = t.viewState.position.column, + o = n === t.modelState.position.column, + r = t.viewState.position.lineNumber, + s = e.getLineFirstNonWhitespaceColumn(r); + return o || n === s ? this._moveToLineStartByModel(e, t, i) : this._moveToLineStartByView( + e, t, i) + } + static _moveToLineStartByView(e, t, i) { + return r.Vi.fromViewState(s.o.moveToBeginningOfLine(e.cursorConfig, e, + t.viewState, i)) + } + static _moveToLineStartByModel(e, t, i) { + return r.Vi.fromModelState(s.o.moveToBeginningOfLine(e.cursorConfig, e + .model, t.modelState, i)) + } + static moveToEndOfLine(e, t, i, n) { + let o = []; + for (let r = 0, s = t.length; r < s; r++) { + const s = t[r]; + o[r] = this._moveToLineEnd(e, s, i, n) + } + return o + } + static _moveToLineEnd(e, t, i, n) { + const o = t.viewState.position, + r = e.getLineMaxColumn(o.lineNumber), + s = o.column === r, + a = t.modelState.position, + l = e.model.getLineMaxColumn(a.lineNumber), + d = r - o.column == l - a.column; + return s || d ? this._moveToLineEndByModel(e, t, i, n) : this._moveToLineEndByView( + e, t, i, n) + } + static _moveToLineEndByView(e, t, i, n) { + return r.Vi.fromViewState(s.o.moveToEndOfLine(e.cursorConfig, e, t.viewState, + i, n)) + } + static _moveToLineEndByModel(e, t, i, n) { + return r.Vi.fromModelState(s.o.moveToEndOfLine(e.cursorConfig, e.model, + t.modelState, i, n)) + } + static expandLineSelection(e, t) { + let i = []; + for (let n = 0, o = t.length; n < o; n++) { + const o = t[n], + s = o.modelState.selection.startLineNumber, + a = e.model.getLineCount(); + let c, h = o.modelState.selection.endLineNumber; + h === a ? c = e.model.getLineMaxColumn(a) : (h++, c = 1), i[n] = r.Vi + .fromModelState(new r.rS(new d.e(s, 1, s, 1), 0, new l.L(h, c), 0)) + } + return i + } + static moveToBeginningOfBuffer(e, t, i) { + let n = []; + for (let o = 0, a = t.length; o < a; o++) { + const a = t[o]; + n[o] = r.Vi.fromModelState(s.o.moveToBeginningOfBuffer(e.cursorConfig, + e.model, a.modelState, i)) + } + return n + } + static moveToEndOfBuffer(e, t, i) { + let n = []; + for (let o = 0, a = t.length; o < a; o++) { + const a = t[o]; + n[o] = r.Vi.fromModelState(s.o.moveToEndOfBuffer(e.cursorConfig, e.model, + a.modelState, i)) + } + return n + } + static selectAll(e, t) { + const i = e.model.getLineCount(), + n = e.model.getLineMaxColumn(i); + return r.Vi.fromModelState(new r.rS(new d.e(1, 1, 1, 1), 0, new l.L(i, + n), 0)) + } + static line(e, t, i, n, o) { + const s = e.model.validatePosition(n), + a = o ? e.coordinatesConverter.validateViewPosition(new l.L(o.lineNumber, + o.column), s) : e.coordinatesConverter.convertModelPositionToViewPosition( + s); + if (!i || !t.modelState.hasSelection()) { + const t = e.model.getLineCount(); + let i = s.lineNumber + 1, + n = 1; + return i > t && (i = t, n = e.model.getLineMaxColumn(i)), r.Vi.fromModelState( + new r.rS(new d.e(s.lineNumber, 1, i, n), 0, new l.L(i, n), 0)) + } + const c = t.modelState.selectionStart.getStartPosition().lineNumber; + if (s.lineNumber < c) return r.Vi.fromViewState(t.viewState.move(t.modelState + .hasSelection(), a.lineNumber, 1, 0)); + if (s.lineNumber > c) { + const i = e.getLineCount(); + let n = a.lineNumber + 1, + o = 1; + return n > i && (n = i, o = e.getLineMaxColumn(n)), r.Vi.fromViewState( + t.viewState.move(t.modelState.hasSelection(), n, o, 0)) + } { + const e = t.modelState.selectionStart.getEndPosition(); + return r.Vi.fromModelState(t.modelState.move(t.modelState.hasSelection(), + e.lineNumber, e.column, 0)) + } + } + static word(e, t, i, n) { + const o = e.model.validatePosition(n); + return r.Vi.fromModelState(a.w.word(e.cursorConfig, e.model, t.modelState, + i, o)) + } + static cancelSelection(e, t) { + if (!t.modelState.hasSelection()) return new r.Vi(t.modelState, t.viewState); + const i = t.viewState.position.lineNumber, + n = t.viewState.position.column; + return r.Vi.fromViewState(new r.rS(new d.e(i, n, i, n), 0, new l.L(i, + n), 0)) + } + static moveTo(e, t, i, n, o) { + const s = e.model.validatePosition(n), + a = o ? e.coordinatesConverter.validateViewPosition(new l.L(o.lineNumber, + o.column), s) : e.coordinatesConverter.convertModelPositionToViewPosition( + s); + return r.Vi.fromViewState(t.viewState.move(i, a.lineNumber, a.column, + 0)) + } + static simpleMove(e, t, i, n, o, a) { + switch (i) { + case 0: + return 4 === a ? this._moveHalfLineLeft(e, t, n) : this._moveLeft(e, + t, n, o); + case 1: + return 4 === a ? this._moveHalfLineRight(e, t, n) : this._moveRight( + e, t, n, o); + case 2: + return 2 === a ? this._moveUpByViewLines(e, t, n, o) : this._moveUpByModelLines( + e, t, n, o); + case 3: + return 2 === a ? this._moveDownByViewLines(e, t, n, o) : this._moveDownByModelLines( + e, t, n, o); + case 4: + return 2 === a ? t.map((t => r.Vi.fromViewState(s.o.moveToPrevBlankLine( + e.cursorConfig, e, t.viewState, n)))) : t.map((t => r.Vi.fromModelState( + s.o.moveToPrevBlankLine(e.cursorConfig, e.model, t.modelState, n) + ))); + case 5: + return 2 === a ? t.map((t => r.Vi.fromViewState(s.o.moveToNextBlankLine( + e.cursorConfig, e, t.viewState, n)))) : t.map((t => r.Vi.fromModelState( + s.o.moveToNextBlankLine(e.cursorConfig, e.model, t.modelState, n) + ))); + case 6: + return this._moveToViewMinColumn(e, t, n); + case 7: + return this._moveToViewFirstNonWhitespaceColumn(e, t, n); + case 8: + return this._moveToViewCenterColumn(e, t, n); + case 9: + return this._moveToViewMaxColumn(e, t, n); + case 10: + return this._moveToViewLastNonWhitespaceColumn(e, t, n); + default: + return null + } + } + static viewportMove(e, t, i, n, o) { + const r = e.getCompletelyVisibleViewRange(), + s = e.coordinatesConverter.convertViewRangeToModelRange(r); + switch (i) { + case 11: + { + const i = this._firstLineNumberInRange(e.model, s, o), + r = e.model.getLineFirstNonWhitespaceColumn(i); + return [this._moveToModelPosition(e, t[0], n, i, r)] + } + case 13: + { + const i = this._lastLineNumberInRange(e.model, s, o), + r = e.model.getLineFirstNonWhitespaceColumn(i); + return [this._moveToModelPosition(e, t[0], n, i, r)] + } + case 12: + { + const i = Math.round((s.startLineNumber + s.endLineNumber) / 2), + o = e.model.getLineFirstNonWhitespaceColumn(i); + return [this._moveToModelPosition(e, t[0], n, i, o)] + } + case 14: + { + let i = []; + for (let o = 0, s = t.length; o < s; o++) { + const s = t[o]; + i[o] = this.findPositionInViewportIfOutside(e, s, r, n) + } + return i + } + default: + return null + } + } + static findPositionInViewportIfOutside(e, t, i, n) { + let o = t.viewState.position.lineNumber; + if (i.startLineNumber <= o && o <= i.endLineNumber - 1) return new r.Vi( + t.modelState, t.viewState); { + o > i.endLineNumber - 1 && (o = i.endLineNumber - 1), o < i.startLineNumber && + (o = i.startLineNumber); + const r = e.getLineFirstNonWhitespaceColumn(o); + return this._moveToViewPosition(e, t, n, o, r) + } + } + static _firstLineNumberInRange(e, t, i) { + let n = t.startLineNumber; + return t.startColumn !== e.getLineMinColumn(n) && n++, Math.min(t.endLineNumber, + n + i - 1) + } + static _lastLineNumberInRange(e, t, i) { + let n = t.startLineNumber; + return t.startColumn !== e.getLineMinColumn(n) && n++, Math.max(n, t.endLineNumber - + i + 1) + } + static _moveLeft(e, t, i, n) { + return t.map((t => r.Vi.fromViewState(s.o.moveLeft(e.cursorConfig, e, + t.viewState, i, n)))) + } + static _moveHalfLineLeft(e, t, i) { + let n = []; + for (let o = 0, a = t.length; o < a; o++) { + const a = t[o], + l = a.viewState.position.lineNumber, + d = Math.round(e.getLineContent(l).length / 2); + n[o] = r.Vi.fromViewState(s.o.moveLeft(e.cursorConfig, e, a.viewState, + i, d)) + } + return n + } + static _moveRight(e, t, i, n) { + return t.map((t => r.Vi.fromViewState(s.o.moveRight(e.cursorConfig, e, + t.viewState, i, n)))) + } + static _moveHalfLineRight(e, t, i) { + let n = []; + for (let o = 0, a = t.length; o < a; o++) { + const a = t[o], + l = a.viewState.position.lineNumber, + d = Math.round(e.getLineContent(l).length / 2); + n[o] = r.Vi.fromViewState(s.o.moveRight(e.cursorConfig, e, a.viewState, + i, d)) + } + return n + } + static _moveDownByViewLines(e, t, i, n) { + let o = []; + for (let a = 0, l = t.length; a < l; a++) { + const l = t[a]; + o[a] = r.Vi.fromViewState(s.o.moveDown(e.cursorConfig, e, l.viewState, + i, n)) + } + return o + } + static _moveDownByModelLines(e, t, i, n) { + let o = []; + for (let a = 0, l = t.length; a < l; a++) { + const l = t[a]; + o[a] = r.Vi.fromModelState(s.o.moveDown(e.cursorConfig, e.model, l.modelState, + i, n)) + } + return o + } + static _moveUpByViewLines(e, t, i, n) { + let o = []; + for (let a = 0, l = t.length; a < l; a++) { + const l = t[a]; + o[a] = r.Vi.fromViewState(s.o.moveUp(e.cursorConfig, e, l.viewState, + i, n)) + } + return o + } + static _moveUpByModelLines(e, t, i, n) { + let o = []; + for (let a = 0, l = t.length; a < l; a++) { + const l = t[a]; + o[a] = r.Vi.fromModelState(s.o.moveUp(e.cursorConfig, e.model, l.modelState, + i, n)) + } + return o + } + static _moveToViewPosition(e, t, i, n, o) { + return r.Vi.fromViewState(t.viewState.move(i, n, o, 0)) + } + static _moveToModelPosition(e, t, i, n, o) { + return r.Vi.fromModelState(t.modelState.move(i, n, o, 0)) + } + static _moveToViewMinColumn(e, t, i) { + let n = []; + for (let o = 0, r = t.length; o < r; o++) { + const r = t[o], + s = r.viewState.position.lineNumber, + a = e.getLineMinColumn(s); + n[o] = this._moveToViewPosition(e, r, i, s, a) + } + return n + } + static _moveToViewFirstNonWhitespaceColumn(e, t, i) { + let n = []; + for (let o = 0, r = t.length; o < r; o++) { + const r = t[o], + s = r.viewState.position.lineNumber, + a = e.getLineFirstNonWhitespaceColumn(s); + n[o] = this._moveToViewPosition(e, r, i, s, a) + } + return n + } + static _moveToViewCenterColumn(e, t, i) { + let n = []; + for (let o = 0, r = t.length; o < r; o++) { + const r = t[o], + s = r.viewState.position.lineNumber, + a = Math.round((e.getLineMaxColumn(s) + e.getLineMinColumn(s)) / 2); + n[o] = this._moveToViewPosition(e, r, i, s, a) + } + return n + } + static _moveToViewMaxColumn(e, t, i) { + let n = []; + for (let o = 0, r = t.length; o < r; o++) { + const r = t[o], + s = r.viewState.position.lineNumber, + a = e.getLineMaxColumn(s); + n[o] = this._moveToViewPosition(e, r, i, s, a) + } + return n + } + static _moveToViewLastNonWhitespaceColumn(e, t, i) { + let n = []; + for (let o = 0, r = t.length; o < r; o++) { + const r = t[o], + s = r.viewState.position.lineNumber, + a = e.getLineLastNonWhitespaceColumn(s); + n[o] = this._moveToViewPosition(e, r, i, s, a) + } + return n + } + }! function(e) { + e.description = { + description: "Move cursor to a logical position in the view", + args: [{ + name: "Cursor move argument object", + description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t", + constraint: function(e) { + if (!o.Kn(e)) return !1; + let t = e; + return !(!o.HD(t.to) || !o.o8(t.select) && !o.jn(t.select) || !o.o8( + t.by) && !o.HD(t.by) || !o.o8(t.value) && !o.hj(t.value)) + }, + schema: { + type: "object", + required: ["to"], + properties: { + to: { + type: "string", + enum: ["left", "right", "up", "down", "prevBlankLine", + "nextBlankLine", "wrappedLineStart", "wrappedLineEnd", + "wrappedLineColumnCenter", + "wrappedLineFirstNonWhitespaceCharacter", + "wrappedLineLastNonWhitespaceCharacter", "viewPortTop", + "viewPortCenter", "viewPortBottom", "viewPortIfOutside" + ] + }, + by: { + type: "string", + enum: ["line", "wrappedLine", "character", "halfLine"] + }, + value: { + type: "number", + default: 1 + }, + select: { + type: "boolean", + default: !1 + } + } + } + }] + }, e.RawDirection = { + Left: "left", + Right: "right", + Up: "up", + Down: "down", + PrevBlankLine: "prevBlankLine", + NextBlankLine: "nextBlankLine", + WrappedLineStart: "wrappedLineStart", + WrappedLineFirstNonWhitespaceCharacter: "wrappedLineFirstNonWhitespaceCharacter", + WrappedLineColumnCenter: "wrappedLineColumnCenter", + WrappedLineEnd: "wrappedLineEnd", + WrappedLineLastNonWhitespaceCharacter: "wrappedLineLastNonWhitespaceCharacter", + ViewPortTop: "viewPortTop", + ViewPortCenter: "viewPortCenter", + ViewPortBottom: "viewPortBottom", + ViewPortIfOutside: "viewPortIfOutside" + }, e.RawUnit = { + Line: "line", + WrappedLine: "wrappedLine", + Character: "character", + HalfLine: "halfLine" + }, e.parse = function(t) { + if (!t.to) return null; + let i; + switch (t.to) { + case e.RawDirection.Left: + i = 0; + break; + case e.RawDirection.Right: + i = 1; + break; + case e.RawDirection.Up: + i = 2; + break; + case e.RawDirection.Down: + i = 3; + break; + case e.RawDirection.PrevBlankLine: + i = 4; + break; + case e.RawDirection.NextBlankLine: + i = 5; + break; + case e.RawDirection.WrappedLineStart: + i = 6; + break; + case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter: + i = 7; + break; + case e.RawDirection.WrappedLineColumnCenter: + i = 8; + break; + case e.RawDirection.WrappedLineEnd: + i = 9; + break; + case e.RawDirection.WrappedLineLastNonWhitespaceCharacter: + i = 10; + break; + case e.RawDirection.ViewPortTop: + i = 11; + break; + case e.RawDirection.ViewPortBottom: + i = 13; + break; + case e.RawDirection.ViewPortCenter: + i = 12; + break; + case e.RawDirection.ViewPortIfOutside: + i = 14; + break; + default: + return null + } + let n = 0; + switch (t.by) { + case e.RawUnit.Line: + n = 1; + break; + case e.RawUnit.WrappedLine: + n = 2; + break; + case e.RawUnit.Character: + n = 3; + break; + case e.RawUnit.HalfLine: + n = 4 + } + return { + direction: i, + unit: n, + select: !!t.select, + value: t.value || 1 + } + } + }(n || (n = {})) + }, + 8784: (e, t, i) => { + "use strict"; + i.d(t, { + o: () => d + }); + var n = i(3181), + o = i(187), + r = i(4314), + s = i(7295), + a = i(3675); + class l { + constructor(e, t, i) { + this._cursorPositionBrand = void 0, this.lineNumber = e, this.column = + t, this.leftoverVisibleColumns = i + } + } + class d { + static leftPosition(e, t) { + if (t.column > e.getLineMinColumn(t.lineNumber)) return t.delta(void 0, - + s.HO(e.getLineContent(t.lineNumber), t.column - 1)); + if (t.lineNumber > 1) { + const i = t.lineNumber - 1; + return new o.L(i, e.getLineMaxColumn(i)) + } + return t + } + static leftPositionAtomicSoftTabs(e, t, i) { + if (t.column <= e.getLineIndentColumn(t.lineNumber)) { + const n = e.getLineMinColumn(t.lineNumber), + r = e.getLineContent(t.lineNumber), + s = a.l.atomicPosition(r, t.column - 1, i, 0); + if (-1 !== s && s + 1 >= n) return new o.L(t.lineNumber, s + 1) + } + return this.leftPosition(e, t) + } + static left(e, t, i) { + const n = e.stickyTabStops ? d.leftPositionAtomicSoftTabs(t, i, e.tabSize) : + d.leftPosition(t, i); + return new l(n.lineNumber, n.column, 0) + } + static moveLeft(e, t, i, n, o) { + let r, s; + if (i.hasSelection() && !n) r = i.selection.startLineNumber, s = i.selection + .startColumn; + else { + const n = i.position.delta(void 0, -(o - 1)), + a = t.normalizePosition(d.clipPositionColumn(n, t), 0), + l = d.left(e, t, a); + r = l.lineNumber, s = l.column + } + return i.move(n, r, s, 0) + } + static clipPositionColumn(e, t) { + return new o.L(e.lineNumber, d.clipRange(e.column, t.getLineMinColumn( + e.lineNumber), t.getLineMaxColumn(e.lineNumber))) + } + static clipRange(e, t, i) { + return e < t ? t : e > i ? i : e + } + static rightPosition(e, t, i) { + return i < e.getLineMaxColumn(t) ? i += s.vH(e.getLineContent(t), i - + 1) : t < e.getLineCount() && (t += 1, i = e.getLineMinColumn(t)), + new o.L(t, i) + } + static rightPositionAtomicSoftTabs(e, t, i, n, r) { + if (i < e.getLineIndentColumn(t)) { + const r = e.getLineContent(t), + s = a.l.atomicPosition(r, i - 1, n, 1); + if (-1 !== s) return new o.L(t, s + 1) + } + return this.rightPosition(e, t, i) + } + static right(e, t, i) { + const n = e.stickyTabStops ? d.rightPositionAtomicSoftTabs(t, i.lineNumber, + i.column, e.tabSize, e.indentSize) : d.rightPosition(t, i.lineNumber, + i.column); + return new l(n.lineNumber, n.column, 0) + } + static moveRight(e, t, i, n, o) { + let r, s; + if (i.hasSelection() && !n) r = i.selection.endLineNumber, s = i.selection + .endColumn; + else { + const n = i.position.delta(void 0, o - 1), + a = t.normalizePosition(d.clipPositionColumn(n, t), 1), + l = d.right(e, t, a); + r = l.lineNumber, s = l.column + } + return i.move(n, r, s, 0) + } + static down(e, t, i, o, r, s, a) { + const d = n.io.visibleColumnFromColumn(t.getLineContent(i), o, e.tabSize) + + r, + c = t.getLineCount(), + h = i === c && o === t.getLineMaxColumn(i); + return (i += s) > c ? (i = c, o = a ? t.getLineMaxColumn(i) : Math.min( + t.getLineMaxColumn(i), o)) : o = n.io.columnFromVisibleColumn2(e, t, + i, d), r = h ? 0 : d - n.io.visibleColumnFromColumn(t.getLineContent( + i), o, e.tabSize), new l(i, o, r) + } + static moveDown(e, t, i, n, o) { + let r, s; + i.hasSelection() && !n ? (r = i.selection.endLineNumber, s = i.selection + .endColumn) : (r = i.position.lineNumber, s = i.position.column); + let a = d.down(e, t, r, s, i.leftoverVisibleColumns, o, !0); + return i.move(n, a.lineNumber, a.column, a.leftoverVisibleColumns) + } + static translateDown(e, t, i) { + let s = i.selection, + a = d.down(e, t, s.selectionStartLineNumber, s.selectionStartColumn, + i.selectionStartLeftoverVisibleColumns, 1, !1), + l = d.down(e, t, s.positionLineNumber, s.positionColumn, i.leftoverVisibleColumns, + 1, !1); + return new n.rS(new r.e(a.lineNumber, a.column, a.lineNumber, a.column), + a.leftoverVisibleColumns, new o.L(l.lineNumber, l.column), l.leftoverVisibleColumns + ) + } + static up(e, t, i, o, r, s, a) { + const d = n.io.visibleColumnFromColumn(t.getLineContent(i), o, e.tabSize) + + r, + c = 1 === i && 1 === o; + return (i -= s) < 1 ? (i = 1, o = a ? t.getLineMinColumn(i) : Math.min( + t.getLineMaxColumn(i), o)) : o = n.io.columnFromVisibleColumn2(e, t, + i, d), r = c ? 0 : d - n.io.visibleColumnFromColumn(t.getLineContent( + i), o, e.tabSize), new l(i, o, r) + } + static moveUp(e, t, i, n, o) { + let r, s; + i.hasSelection() && !n ? (r = i.selection.startLineNumber, s = i.selection + .startColumn) : (r = i.position.lineNumber, s = i.position.column); + let a = d.up(e, t, r, s, i.leftoverVisibleColumns, o, !0); + return i.move(n, a.lineNumber, a.column, a.leftoverVisibleColumns) + } + static translateUp(e, t, i) { + let s = i.selection, + a = d.up(e, t, s.selectionStartLineNumber, s.selectionStartColumn, i.selectionStartLeftoverVisibleColumns, + 1, !1), + l = d.up(e, t, s.positionLineNumber, s.positionColumn, i.leftoverVisibleColumns, + 1, !1); + return new n.rS(new r.e(a.lineNumber, a.column, a.lineNumber, a.column), + a.leftoverVisibleColumns, new o.L(l.lineNumber, l.column), l.leftoverVisibleColumns + ) + } + static _isBlankLine(e, t) { + return 0 === e.getLineFirstNonWhitespaceColumn(t) + } + static moveToPrevBlankLine(e, t, i, n) { + let o = i.position.lineNumber; + for (; o > 1 && this._isBlankLine(t, o);) o--; + for (; o > 1 && !this._isBlankLine(t, o);) o--; + return i.move(n, o, t.getLineMinColumn(o), 0) + } + static moveToNextBlankLine(e, t, i, n) { + const o = t.getLineCount(); + let r = i.position.lineNumber; + for (; r < o && this._isBlankLine(t, r);) r++; + for (; r < o && !this._isBlankLine(t, r);) r++; + return i.move(n, r, t.getLineMinColumn(r), 0) + } + static moveToBeginningOfLine(e, t, i, n) { + let o, r = i.position.lineNumber, + s = t.getLineMinColumn(r), + a = t.getLineFirstNonWhitespaceColumn(r) || s; + return o = i.position.column === a ? s : a, i.move(n, r, o, 0) + } + static moveToEndOfLine(e, t, i, n, o) { + let r = i.position.lineNumber, + s = t.getLineMaxColumn(r); + return i.move(n, r, s, o ? 1073741824 - s : 0) + } + static moveToBeginningOfBuffer(e, t, i, n) { + return i.move(n, 1, 1, 0) + } + static moveToEndOfBuffer(e, t, i, n) { + let o = t.getLineCount(), + r = t.getLineMaxColumn(o); + return i.move(n, o, r, 0) + } + } + }, + 3582: (e, t, i) => { + "use strict"; + i.d(t, { + u: () => p, + g: () => m + }); + var n = i(7301), + o = i(7295), + r = i(1329), + s = i(291), + a = i(4314), + l = i(3860); + class d { + constructor(e, t, i) { + this._range = e, this._charBeforeSelection = t, this._charAfterSelection = + i + } + getEditOperations(e, t) { + t.addTrackedEditOperation(new a.e(this._range.startLineNumber, this._range + .startColumn, this._range.startLineNumber, this._range.startColumn), + this._charBeforeSelection), t.addTrackedEditOperation(new a.e(this._range + .endLineNumber, this._range.endColumn, this._range.endLineNumber, + this._range.endColumn), this._charAfterSelection) + } + computeCursorState(e, t) { + let i = t.getInverseEditOperations(), + n = i[0].range, + o = i[1].range; + return new l.Y(n.endLineNumber, n.endColumn, o.endLineNumber, o.endColumn - + this._charAfterSelection.length) + } + } + var c = i(3181), + h = i(9410), + u = i(7354), + g = i(3831); + class p { + static indent(e, t, i) { + if (null === t || null === i) return []; + let n = []; + for (let t = 0, o = i.length; t < o; t++) n[t] = new s.U(i[t], { + isUnshift: !1, + tabSize: e.tabSize, + indentSize: e.indentSize, + insertSpaces: e.insertSpaces, + useTabStops: e.useTabStops, + autoIndent: e.autoIndent + }); + return n + } + static outdent(e, t, i) { + let n = []; + for (let t = 0, o = i.length; t < o; t++) n[t] = new s.U(i[t], { + isUnshift: !0, + tabSize: e.tabSize, + indentSize: e.indentSize, + insertSpaces: e.insertSpaces, + useTabStops: e.useTabStops, + autoIndent: e.autoIndent + }); + return n + } + static shiftIndent(e, t, i) { + return i = i || 1, s.U.shiftIndent(t, t.length + i, e.tabSize, e.indentSize, + e.insertSpaces) + } + static unshiftIndent(e, t, i) { + return i = i || 1, s.U.unshiftIndent(t, t.length + i, e.tabSize, e.indentSize, + e.insertSpaces) + } + static _distributedPaste(e, t, i, n) { + let o = []; + for (let e = 0, t = i.length; e < t; e++) o[e] = new r.T4(i[e], n[e]); + return new c.Tp(0, o, { + shouldPushStackElementBefore: !0, + shouldPushStackElementAfter: !0 + }) + } + static _simplePaste(e, t, i, n, o) { + let s = []; + for (let e = 0, t = i.length; e < t; e++) { + const t = i[e]; + let l = t.getPosition(); + if (o && !t.isEmpty() && (o = !1), o && n.indexOf("\n") !== n.length - + 1 && (o = !1), o) { + let i = new a.e(l.lineNumber, 1, l.lineNumber, 1); + s[e] = new r.hP(i, n, t, !0) + } else s[e] = new r.T4(t, n) + } + return new c.Tp(0, s, { + shouldPushStackElementBefore: !0, + shouldPushStackElementAfter: !0 + }) + } + static _distributePasteToCursors(e, t, i, n, r) { + if (n) return null; + if (1 === t.length) return null; + if (r && r.length === t.length) return r; + if ("spread" === e.multiCursorPaste) { + 10 === i.charCodeAt(i.length - 1) && (i = i.substr(0, i.length - 1)), + 13 === i.charCodeAt(i.length - 1) && (i = i.substr(0, i.length - 1)); + let e = o.uq(i); + if (e.length === t.length) return e + } + return null + } + static paste(e, t, i, n, o, r) { + const s = this._distributePasteToCursors(e, i, n, o, r); + return s ? (i = i.sort(a.e.compareRangesUsingStarts), this._distributedPaste( + e, t, i, s)) : this._simplePaste(e, t, i, n, o) + } + static _goodIndentForLine(e, t, i) { + let n = null, + r = ""; + const s = g.zu.getInheritIndentForLine(e.autoIndent, t, i, !1); + if (s) n = s.action, r = s.indentation; + else if (i > 1) { + let n; + for (n = i - 1; n >= 1; n--) { + const e = t.getLineContent(n); + if (o.ow(e) >= 0) break + } + if (n < 1) return null; + const s = t.getLineMaxColumn(n), + l = g.zu.getEnterAction(e.autoIndent, t, new a.e(n, s, n, s)); + l && (r = l.indentation + l.appendText) + } + return n && (n === u.wU.Indent && (r = p.shiftIndent(e, r)), n === u.wU + .Outdent && (r = p.unshiftIndent(e, r)), r = e.normalizeIndentation( + r)), r || null + } + static _replaceJumpToNextIndent(e, t, i, n) { + let o = "", + s = i.getStartPosition(); + if (e.insertSpaces) { + let i = c.io.visibleColumnFromColumn2(e, t, s), + n = e.indentSize, + r = n - i % n; + for (let e = 0; e < r; e++) o += " " + } else o = "\t"; + return new r.T4(i, o, n) + } + static tab(e, t, i) { + let n = []; + for (let o = 0, l = i.length; o < l; o++) { + const l = i[o]; + if (l.isEmpty()) { + let i = t.getLineContent(l.startLineNumber); + if (/^\s*$/.test(i) && t.isCheapToTokenize(l.startLineNumber)) { + let s = this._goodIndentForLine(e, t, l.startLineNumber); + s = s || "\t"; + let d = e.normalizeIndentation(s); + if (!i.startsWith(d)) { + n[o] = new r.T4(new a.e(l.startLineNumber, 1, l.startLineNumber, i + .length + 1), d, !0); + continue + } + } + n[o] = this._replaceJumpToNextIndent(e, t, l, !0) + } else { + if (l.startLineNumber === l.endLineNumber) { + let i = t.getLineMaxColumn(l.startLineNumber); + if (1 !== l.startColumn || l.endColumn !== i) { + n[o] = this._replaceJumpToNextIndent(e, t, l, !1); + continue + } + } + n[o] = new s.U(l, { + isUnshift: !1, + tabSize: e.tabSize, + indentSize: e.indentSize, + insertSpaces: e.insertSpaces, + useTabStops: e.useTabStops, + autoIndent: e.autoIndent + }) + } + } + return n + } + static compositionType(e, t, i, n, o, r, s, a) { + const l = n.map((e => this._compositionType(i, e, o, r, s, a))); + return new c.Tp(4, l, { + shouldPushStackElementBefore: _(e, 4), + shouldPushStackElementAfter: !1 + }) + } + static _compositionType(e, t, i, n, o, s) { + if (!t.isEmpty()) return null; + const l = t.getPosition(), + d = Math.max(1, l.column - n), + c = Math.min(e.getLineMaxColumn(l.lineNumber), l.column + o), + h = new a.e(l.lineNumber, d, l.lineNumber, c); + return e.getValueInRange(h) === i && 0 === s ? null : new r.Uo(h, i, 0, + s) + } + static _typeCommand(e, t, i) { + return i ? new r.Sj(e, t, !0) : new r.T4(e, t, !0) + } + static _enter(e, t, i, n) { + if (0 === e.autoIndent) return p._typeCommand(n, "\n", i); + if (!t.isCheapToTokenize(n.getStartPosition().lineNumber) || 1 === e.autoIndent) { + let r = t.getLineContent(n.startLineNumber), + s = o.V8(r).substring(0, n.startColumn - 1); + return p._typeCommand(n, "\n" + e.normalizeIndentation(s), i) + } + const s = g.zu.getEnterAction(e.autoIndent, t, n); + if (s) { + if (s.indentAction === u.wU.None) return p._typeCommand(n, "\n" + e.normalizeIndentation( + s.indentation + s.appendText), i); + if (s.indentAction === u.wU.Indent) return p._typeCommand(n, "\n" + e + .normalizeIndentation(s.indentation + s.appendText), i); + if (s.indentAction === u.wU.IndentOutdent) { + const t = e.normalizeIndentation(s.indentation), + o = e.normalizeIndentation(s.indentation + s.appendText), + a = "\n" + o + "\n" + t; + return i ? new r.Sj(n, a, !0) : new r.Uo(n, a, -1, o.length - t.length, ! + 0) + } + if (s.indentAction === u.wU.Outdent) { + const t = p.unshiftIndent(e, s.indentation); + return p._typeCommand(n, "\n" + e.normalizeIndentation(t + s.appendText), + i) + } + } + const a = t.getLineContent(n.startLineNumber), + l = o.V8(a).substring(0, n.startColumn - 1); + if (e.autoIndent >= 4) { + const s = g.zu.getIndentForEnter(e.autoIndent, t, n, { + unshiftIndent: t => p.unshiftIndent(e, t), + shiftIndent: t => p.shiftIndent(e, t), + normalizeIndentation: t => e.normalizeIndentation(t) + }); + if (s) { + let a = c.io.visibleColumnFromColumn2(e, t, n.getEndPosition()); + const l = n.endColumn, + d = t.getLineContent(n.endLineNumber), + h = o.LC(d); + if (n = h >= 0 ? n.setEndPosition(n.endLineNumber, Math.max(n.endColumn, + h + 1)) : n.setEndPosition(n.endLineNumber, t.getLineMaxColumn(n.endLineNumber)), + i) return new r.Sj(n, "\n" + e.normalizeIndentation(s.afterEnter), ! + 0); { + let t = 0; + return l <= h + 1 && (e.insertSpaces || (a = Math.ceil(a / e.indentSize)), + t = Math.min(a + 1 - e.normalizeIndentation(s.afterEnter).length - + 1, 0)), new r.Uo(n, "\n" + e.normalizeIndentation(s.afterEnter), + 0, t, !0) + } + } + } + return p._typeCommand(n, "\n" + e.normalizeIndentation(l), i) + } + static _isAutoIndentType(e, t, i) { + if (e.autoIndent < 4) return !1; + for (let e = 0, n = i.length; e < n; e++) + if (!t.isCheapToTokenize(i[e].getEndPosition().lineNumber)) return !1; + return !0 + } + static _runAutoIndentType(e, t, i, n) { + const o = g.zu.getIndentationAtPosition(t, i.startLineNumber, i.startColumn), + r = g.zu.getIndentActionForType(e.autoIndent, t, i, n, { + shiftIndent: t => p.shiftIndent(e, t), + unshiftIndent: t => p.unshiftIndent(e, t) + }); + if (null === r) return null; + if (r !== e.normalizeIndentation(o)) { + const o = t.getLineFirstNonWhitespaceColumn(i.startLineNumber); + return 0 === o ? p._typeCommand(new a.e(i.startLineNumber, 1, i.endLineNumber, + i.endColumn), e.normalizeIndentation(r) + n, !1) : p._typeCommand( + new a.e(i.startLineNumber, 1, i.endLineNumber, i.endColumn), e.normalizeIndentation( + r) + t.getLineContent(i.startLineNumber).substring(o - 1, i.startColumn - + 1) + n, !1) + } + return null + } + static _isAutoClosingOvertype(e, t, i, n, o) { + if ("never" === e.autoClosingOvertype) return !1; + if (!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o)) return + !1; + for (let r = 0, s = i.length; r < s; r++) { + const s = i[r]; + if (!s.isEmpty()) return !1; + const a = s.getPosition(), + l = t.getLineContent(a.lineNumber); + if (l.charAt(a.column - 1) !== o) return !1; + const d = (0, c.LN)(o); + if (92 === (a.column > 2 ? l.charCodeAt(a.column - 2) : 0) && d) + return !1; + if ("auto" === e.autoClosingOvertype) { + let e = !1; + for (let t = 0, i = n.length; t < i; t++) { + const i = n[t]; + if (a.lineNumber === i.startLineNumber && a.column === i.startColumn) { + e = !0; + break + } + } + if (!e) return !1 + } + } + return !0 + } + static _runAutoClosingOvertype(e, t, i, n, o) { + let s = []; + for (let e = 0, t = n.length; e < t; e++) { + const t = n[e].getPosition(), + i = new a.e(t.lineNumber, t.column, t.lineNumber, t.column + 1); + s[e] = new r.T4(i, o) + } + return new c.Tp(4, s, { + shouldPushStackElementBefore: _(e, 4), + shouldPushStackElementAfter: !1 + }) + } + static _isBeforeClosingBrace(e, t) { + const i = t.charAt(0), + n = e.autoClosingPairs.autoClosingPairsOpenByStart.get(i) || [], + o = e.autoClosingPairs.autoClosingPairsCloseByStart.get(i) || [], + r = n.some((e => t.startsWith(e.open))), + s = o.some((e => t.startsWith(e.close))); + return !r && s + } + static _findAutoClosingPairOpen(e, t, i, n) { + const o = e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n); + if (!o) return null; + let r = null; + for (const e of o) + if (null === r || e.open.length > r.open.length) { + let o = !0; + for (const r of i) + if (t.getValueInRange(new a.e(r.lineNumber, r.column - e.open.length + + 1, r.lineNumber, r.column)) + n !== e.open) { + o = !1; + break + } + o && (r = e) + } + return r + } + static _findSubAutoClosingPairClose(e, t) { + if (t.open.length <= 1) return ""; + const i = t.close.charAt(t.close.length - 1), + n = e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i) || []; + let o = null; + for (const e of n) e.open !== t.open && t.open.includes(e.open) && t.close + .endsWith(e.close) && (!o || e.open.length > o.open.length) && (o = e); + return o ? o.close : "" + } + static _getAutoClosingPairClose(e, t, i, o, r) { + const s = (0, c.LN)(o), + a = s ? e.autoClosingQuotes : e.autoClosingBrackets; + if ("never" === a) return null; + const l = this._findAutoClosingPairOpen(e, t, i.map((e => e.getPosition())), + o); + if (!l) return null; + const d = this._findSubAutoClosingPairClose(e, l); + let u = !0; + const m = s ? e.shouldAutoCloseBefore.quote : e.shouldAutoCloseBefore.bracket; + for (let o = 0, c = i.length; o < c; o++) { + const c = i[o]; + if (!c.isEmpty()) return null; + const f = c.getPosition(), + _ = t.getLineContent(f.lineNumber), + b = _.substring(f.column - 1); + if (b.startsWith(d) || (u = !1), _.length > f.column - 1) { + const t = _.charAt(f.column - 1); + if (!p._isBeforeClosingBrace(e, b) && !m(t)) return null + } + if (!t.isCheapToTokenize(f.lineNumber)) return null; + if (1 === l.open.length && s && "always" !== a) { + const t = (0, h.u)(e.wordSeparators); + if (r && f.column > 1 && 0 === t.get(_.charCodeAt(f.column - 2))) + return null; + if (!r && f.column > 2 && 0 === t.get(_.charCodeAt(f.column - 3))) + return null + } + t.forceTokenization(f.lineNumber); + const v = t.getLineTokens(f.lineNumber); + let w = !1; + try { + w = g.zu.shouldAutoClosePair(l, v, r ? f.column : f.column - 1) + } catch (e) { + (0, n.dL)(e) + } + if (!w) return null + } + return u ? l.close.substring(0, l.close.length - d.length) : l.close + } + static _runAutoClosingOpenCharType(e, t, i, n, o, r, s) { + let a = []; + for (let e = 0, t = n.length; e < t; e++) { + const t = n[e]; + a[e] = new m(t, o, r, s) + } + return new c.Tp(4, a, { + shouldPushStackElementBefore: !0, + shouldPushStackElementAfter: !1 + }) + } + static _shouldSurroundChar(e, t) { + return (0, c.LN)(t) ? "quotes" === e.autoSurround || "languageDefined" === + e.autoSurround : "brackets" === e.autoSurround || "languageDefined" === + e.autoSurround + } + static _isSurroundSelectionType(e, t, i, n) { + if (!p._shouldSurroundChar(e, n) || !e.surroundingPairs.hasOwnProperty( + n)) return !1; + const o = (0, c.LN)(n); + for (let e = 0, n = i.length; e < n; e++) { + const n = i[e]; + if (n.isEmpty()) return !1; + let r = !0; + for (let e = n.startLineNumber; e <= n.endLineNumber; e++) { + const i = t.getLineContent(e), + o = e === n.startLineNumber ? n.startColumn - 1 : 0, + s = e === n.endLineNumber ? n.endColumn - 1 : i.length, + a = i.substring(o, s); + if (/[^ \t]/.test(a)) { + r = !1; + break + } + } + if (r) return !1; + if (o && n.startLineNumber === n.endLineNumber && n.startColumn + 1 === + n.endColumn) { + const e = t.getValueInRange(n); + if ((0, c.LN)(e)) return !1 + } + } + return !0 + } + static _runSurroundSelectionType(e, t, i, n, o) { + let r = []; + for (let e = 0, i = n.length; e < i; e++) { + const i = n[e], + s = t.surroundingPairs[o]; + r[e] = new d(i, o, s) + } + return new c.Tp(0, r, { + shouldPushStackElementBefore: !0, + shouldPushStackElementAfter: !0 + }) + } + static _isTypeInterceptorElectricChar(e, t, i) { + return !(1 !== i.length || !t.isCheapToTokenize(i[0].getEndPosition().lineNumber)) + } + static _typeInterceptorElectricChar(e, t, i, s, l) { + if (!t.electricChars.hasOwnProperty(l) || !s.isEmpty()) return null; + let d = s.getPosition(); + i.forceTokenization(d.lineNumber); + let h, u = i.getLineTokens(d.lineNumber); + try { + h = g.zu.onElectricCharacter(l, u, d.column) + } catch (e) { + return (0, n.dL)(e), null + } + if (!h) return null; + if (h.matchOpenBracket) { + let n = (u.getLineContent() + l).lastIndexOf(h.matchOpenBracket) + 1, + s = i.findMatchingBracketUp(h.matchOpenBracket, { + lineNumber: d.lineNumber, + column: n + }); + if (s) { + if (s.startLineNumber === d.lineNumber) return null; + let n = i.getLineContent(s.startLineNumber), + h = o.V8(n), + u = t.normalizeIndentation(h), + g = i.getLineContent(d.lineNumber), + p = i.getLineFirstNonWhitespaceColumn(d.lineNumber) || d.column, + m = u + g.substring(p - 1, d.column - 1) + l, + _ = new a.e(d.lineNumber, 1, d.lineNumber, d.column); + const b = new r.T4(_, m); + return new c.Tp(f(m, e), [b], { + shouldPushStackElementBefore: !1, + shouldPushStackElementAfter: !0 + }) + } + } + return null + } + static compositionEndWithInterceptors(e, t, i, n, o, s) { + if (!n || l.Y.selectionsArrEqual(n, o)) return null; + let d = null; + for (const e of o) { + if (!e.isEmpty()) return null; + const t = e.getPosition(), + n = i.getValueInRange(new a.e(t.lineNumber, t.column - 1, t.lineNumber, + t.column)); + if (null === d) d = n; + else if (d !== n) return null + } + if (!d) return null; + if (this._isAutoClosingOvertype(t, i, o, s, d)) { + const e = o.map((e => new r.T4(new a.e(e.positionLineNumber, e.positionColumn, + e.positionLineNumber, e.positionColumn + 1), "", !1))); + return new c.Tp(4, e, { + shouldPushStackElementBefore: !0, + shouldPushStackElementAfter: !1 + }) + } + const h = this._getAutoClosingPairClose(t, i, o, d, !1); + return null !== h ? this._runAutoClosingOpenCharType(e, t, i, o, d, !1, + h) : null + } + static typeWithInterceptors(e, t, i, n, o, s, a) { + if (!e && "\n" === a) { + let e = []; + for (let t = 0, r = o.length; t < r; t++) e[t] = p._enter(i, n, !1, o[ + t]); + return new c.Tp(4, e, { + shouldPushStackElementBefore: !0, + shouldPushStackElementAfter: !1 + }) + } + if (!e && this._isAutoIndentType(i, n, o)) { + let e = [], + t = !1; + for (let r = 0, s = o.length; r < s; r++) + if (e[r] = this._runAutoIndentType(i, n, o[r], a), !e[r]) { + t = !0; + break + } + if (!t) return new c.Tp(4, e, { + shouldPushStackElementBefore: !0, + shouldPushStackElementAfter: !1 + }) + } + if (!e && this._isAutoClosingOvertype(i, n, o, s, a)) return this._runAutoClosingOvertype( + t, i, n, o, a); + if (!e) { + const e = this._getAutoClosingPairClose(i, n, o, a, !0); + if (e) return this._runAutoClosingOpenCharType(t, i, n, o, a, !0, e) + } + if (this._isSurroundSelectionType(i, n, o, a)) return this._runSurroundSelectionType( + t, i, n, o, a); + if (!e && this._isTypeInterceptorElectricChar(i, n, o)) { + const e = this._typeInterceptorElectricChar(t, i, n, o[0], a); + if (e) return e + } + let l = []; + for (let e = 0, t = o.length; e < t; e++) l[e] = new r.T4(o[e], a); + const d = f(a, t); + return new c.Tp(d, l, { + shouldPushStackElementBefore: _(t, d), + shouldPushStackElementAfter: !1 + }) + } + static typeWithoutInterceptors(e, t, i, n, o) { + let s = []; + for (let e = 0, t = n.length; e < t; e++) s[e] = new r.T4(n[e], o); + const a = f(o, e); + return new c.Tp(a, s, { + shouldPushStackElementBefore: _(e, a), + shouldPushStackElementAfter: !1 + }) + } + static lineInsertBefore(e, t, i) { + if (null === t || null === i) return []; + let n = []; + for (let o = 0, s = i.length; o < s; o++) { + let s = i[o].positionLineNumber; + if (1 === s) n[o] = new r.Sj(new a.e(1, 1, 1, 1), "\n"); + else { + s--; + let i = t.getLineMaxColumn(s); + n[o] = this._enter(e, t, !1, new a.e(s, i, s, i)) + } + } + return n + } + static lineInsertAfter(e, t, i) { + if (null === t || null === i) return []; + let n = []; + for (let o = 0, r = i.length; o < r; o++) { + const r = i[o].positionLineNumber; + let s = t.getLineMaxColumn(r); + n[o] = this._enter(e, t, !1, new a.e(r, s, r, s)) + } + return n + } + static lineBreakInsert(e, t, i) { + let n = []; + for (let o = 0, r = i.length; o < r; o++) n[o] = this._enter(e, t, !0, + i[o]); + return n + } + } + class m extends r.Uo { + constructor(e, t, i, n) { + super(e, (i ? t : "") + n, 0, -n.length), this._openCharacter = t, + this._closeCharacter = n, this.closeCharacterRange = null, this.enclosingRange = + null + } + computeCursorState(e, t) { + let i = t.getInverseEditOperations()[0].range; + return this.closeCharacterRange = new a.e(i.startLineNumber, i.endColumn - + this._closeCharacter.length, i.endLineNumber, i.endColumn), this.enclosingRange = + new a.e(i.startLineNumber, i.endColumn - this._openCharacter.length - + this._closeCharacter.length, i.endLineNumber, i.endColumn), super.computeCursorState( + e, t) + } + } + + function f(e, t) { + return " " === e ? 5 === t || 6 === t ? 6 : 5 : 4 + } + + function _(e, t) { + return !(!v(e) || v(t)) || 5 !== e && b(e) !== b(t) + } + + function b(e) { + return 6 === e || 5 === e ? "space" : e + } + + function v(e) { + return 4 === e || 5 === e || 6 === e + } + }, + 5795: (e, t, i) => { + "use strict"; + i.d(t, { + w: () => d, + L: () => c + }); + var n = i(7295), + o = i(3181), + r = i(1380), + s = i(9410), + a = i(187), + l = i(4314); + class d { + static _createWord(e, t, i, n, o) { + return { + start: n, + end: o, + wordType: t, + nextCharClass: i + } + } + static _findPreviousWordOnLine(e, t, i) { + let n = t.getLineContent(i.lineNumber); + return this._doFindPreviousWordOnLine(n, e, i) + } + static _doFindPreviousWordOnLine(e, t, i) { + let n = 0; + for (let o = i.column - 2; o >= 0; o--) { + let i = e.charCodeAt(o), + r = t.get(i); + if (0 === r) { + if (2 === n) return this._createWord(e, n, r, o + 1, this._findEndOfWord( + e, t, n, o + 1)); + n = 1 + } else if (2 === r) { + if (1 === n) return this._createWord(e, n, r, o + 1, this._findEndOfWord( + e, t, n, o + 1)); + n = 2 + } else if (1 === r && 0 !== n) return this._createWord(e, n, r, o + 1, + this._findEndOfWord(e, t, n, o + 1)) + } + return 0 !== n ? this._createWord(e, n, 1, 0, this._findEndOfWord(e, t, + n, 0)) : null + } + static _findEndOfWord(e, t, i, n) { + let o = e.length; + for (let r = n; r < o; r++) { + let n = e.charCodeAt(r), + o = t.get(n); + if (1 === o) return r; + if (1 === i && 2 === o) return r; + if (2 === i && 0 === o) return r + } + return o + } + static _findNextWordOnLine(e, t, i) { + let n = t.getLineContent(i.lineNumber); + return this._doFindNextWordOnLine(n, e, i) + } + static _doFindNextWordOnLine(e, t, i) { + let n = 0, + o = e.length; + for (let r = i.column - 1; r < o; r++) { + let i = e.charCodeAt(r), + o = t.get(i); + if (0 === o) { + if (2 === n) return this._createWord(e, n, o, this._findStartOfWord( + e, t, n, r - 1), r); + n = 1 + } else if (2 === o) { + if (1 === n) return this._createWord(e, n, o, this._findStartOfWord( + e, t, n, r - 1), r); + n = 2 + } else if (1 === o && 0 !== n) return this._createWord(e, n, o, this._findStartOfWord( + e, t, n, r - 1), r) + } + return 0 !== n ? this._createWord(e, n, 1, this._findStartOfWord(e, t, + n, o - 1), o) : null + } + static _findStartOfWord(e, t, i, n) { + for (let o = n; o >= 0; o--) { + let n = e.charCodeAt(o), + r = t.get(n); + if (1 === r) return o + 1; + if (1 === i && 2 === r) return o + 1; + if (2 === i && 0 === r) return o + 1 + } + return 0 + } + static moveWordLeft(e, t, i, n) { + let o = i.lineNumber, + r = i.column; + 1 === r && o > 1 && (o -= 1, r = t.getLineMaxColumn(o)); + let s = d._findPreviousWordOnLine(e, t, new a.L(o, r)); + if (0 === n) return new a.L(o, s ? s.start + 1 : 1); + if (1 === n) return s && 2 === s.wordType && s.end - s.start == 1 && 0 === + s.nextCharClass && (s = d._findPreviousWordOnLine(e, t, new a.L(o, s + .start + 1))), new a.L(o, s ? s.start + 1 : 1); + if (3 === n) { + for (; s && 2 === s.wordType;) s = d._findPreviousWordOnLine(e, t, + new a.L(o, s.start + 1)); + return new a.L(o, s ? s.start + 1 : 1) + } + return s && r <= s.end + 1 && (s = d._findPreviousWordOnLine(e, t, new a + .L(o, s.start + 1))), new a.L(o, s ? s.end + 1 : 1) + } + static _moveWordPartLeft(e, t) { + const i = t.lineNumber, + o = e.getLineMaxColumn(i); + if (1 === t.column) return i > 1 ? new a.L(i - 1, e.getLineMaxColumn(i - + 1)) : t; + const r = e.getLineContent(i); + for (let e = t.column - 1; e > 1; e--) { + const t = r.charCodeAt(e - 2), + s = r.charCodeAt(e - 1); + if (95 === t && 95 !== s) return new a.L(i, e); + if (n.mK(t) && n.df(s)) return new a.L(i, e); + if (n.df(t) && n.df(s) && e + 1 < o) { + const t = r.charCodeAt(e); + if (n.mK(t)) return new a.L(i, e) + } + } + return new a.L(i, 1) + } + static moveWordRight(e, t, i, n) { + let o = i.lineNumber, + r = i.column, + s = !1; + r === t.getLineMaxColumn(o) && o < t.getLineCount() && (s = !0, o += 1, + r = 1); + let l = d._findNextWordOnLine(e, t, new a.L(o, r)); + if (2 === n) l && 2 === l.wordType && l.end - l.start == 1 && 0 === l.nextCharClass && + (l = d._findNextWordOnLine(e, t, new a.L(o, l.end + 1))), r = l ? l.end + + 1 : t.getLineMaxColumn(o); + else if (3 === n) { + for (s && (r = 0); l && (2 === l.wordType || l.start + 1 <= r);) l = + d._findNextWordOnLine(e, t, new a.L(o, l.end + 1)); + r = l ? l.start + 1 : t.getLineMaxColumn(o) + } else l && !s && r >= l.start + 1 && (l = d._findNextWordOnLine(e, t, + new a.L(o, l.end + 1))), r = l ? l.start + 1 : t.getLineMaxColumn(o); + return new a.L(o, r) + } + static _moveWordPartRight(e, t) { + const i = t.lineNumber, + o = e.getLineMaxColumn(i); + if (t.column === o) return i < e.getLineCount() ? new a.L(i + 1, 1) : + t; + const r = e.getLineContent(i); + for (let e = t.column + 1; e < o; e++) { + const t = r.charCodeAt(e - 2), + s = r.charCodeAt(e - 1); + if (95 !== t && 95 === s) return new a.L(i, e); + if (n.mK(t) && n.df(s)) return new a.L(i, e); + if (n.df(t) && n.df(s) && e + 1 < o) { + const t = r.charCodeAt(e); + if (n.mK(t)) return new a.L(i, e) + } + } + return new a.L(i, o) + } + static _deleteWordLeftWhitespace(e, t) { + const i = e.getLineContent(t.lineNumber), + o = t.column - 2, + r = n.ow(i, o); + return r + 1 < o ? new l.e(t.lineNumber, r + 2, t.lineNumber, t.column) : + null + } + static deleteWordLeft(e, t) { + const i = e.wordSeparators, + n = e.model, + o = e.selection, + s = e.whitespaceHeuristics; + if (!o.isEmpty()) return o; + if (r.A.isAutoClosingPairDelete(e.autoClosingDelete, e.autoClosingBrackets, + e.autoClosingQuotes, e.autoClosingPairs.autoClosingPairsOpenByEnd, e + .model, [e.selection], e.autoClosedCharacters)) { + const t = e.selection.getPosition(); + return new l.e(t.lineNumber, t.column - 1, t.lineNumber, t.column + 1) + } + const c = new a.L(o.positionLineNumber, o.positionColumn); + let h = c.lineNumber, + u = c.column; + if (1 === h && 1 === u) return null; + if (s) { + let e = this._deleteWordLeftWhitespace(n, c); + if (e) return e + } + let g = d._findPreviousWordOnLine(i, n, c); + return 0 === t ? g ? u = g.start + 1 : u > 1 ? u = 1 : (h--, u = n.getLineMaxColumn( + h)) : (g && u <= g.end + 1 && (g = d._findPreviousWordOnLine(i, n, + new a.L(h, g.start + 1))), g ? u = g.end + 1 : u > 1 ? u = 1 : (h--, + u = n.getLineMaxColumn(h))), new l.e(h, u, c.lineNumber, c.column) + } + static deleteInsideWord(e, t, i) { + if (!i.isEmpty()) return i; + const n = new a.L(i.positionLineNumber, i.positionColumn); + return this._deleteInsideWordWhitespace(t, n) || this._deleteInsideWordDetermineDeleteRange( + e, t, n) + } + static _charAtIsWhitespace(e, t) { + const i = e.charCodeAt(t); + return 32 === i || 9 === i + } + static _deleteInsideWordWhitespace(e, t) { + const i = e.getLineContent(t.lineNumber), + n = i.length; + if (0 === n) return null; + let o = Math.max(t.column - 2, 0); + if (!this._charAtIsWhitespace(i, o)) return null; + let r = Math.min(t.column - 1, n - 1); + if (!this._charAtIsWhitespace(i, r)) return null; + for (; o > 0 && this._charAtIsWhitespace(i, o - 1);) o--; + for (; r + 1 < n && this._charAtIsWhitespace(i, r + 1);) r++; + return new l.e(t.lineNumber, o + 1, t.lineNumber, r + 2) + } + static _deleteInsideWordDetermineDeleteRange(e, t, i) { + const n = t.getLineContent(i.lineNumber), + o = n.length; + if (0 === o) return i.lineNumber > 1 ? new l.e(i.lineNumber - 1, t.getLineMaxColumn( + i.lineNumber - 1), i.lineNumber, 1) : i.lineNumber < t.getLineCount() ? + new l.e(i.lineNumber, 1, i.lineNumber + 1, 1) : new l.e(i.lineNumber, + 1, i.lineNumber, 1); + const r = e => e.start + 1 <= i.column && i.column <= e.end + 1, + s = (e, t) => (e = Math.min(e, i.column), t = Math.max(t, i.column), + new l.e(i.lineNumber, e, i.lineNumber, t)), + a = e => { + let t = e.start + 1, + i = e.end + 1, + r = !1; + for (; i - 1 < o && this._charAtIsWhitespace(n, i - 1);) r = !0, i++; + if (!r) + for (; t > 1 && this._charAtIsWhitespace(n, t - 2);) t--; + return s(t, i) + }, + c = d._findPreviousWordOnLine(e, t, i); + if (c && r(c)) return a(c); + const h = d._findNextWordOnLine(e, t, i); + return h && r(h) ? a(h) : c && h ? s(c.end + 1, h.start + 1) : c ? s(c + .start + 1, c.end + 1) : h ? s(h.start + 1, h.end + 1) : s(1, o + 1) + } + static _deleteWordPartLeft(e, t) { + if (!t.isEmpty()) return t; + const i = t.getPosition(), + n = d._moveWordPartLeft(e, i); + return new l.e(i.lineNumber, i.column, n.lineNumber, n.column) + } + static _findFirstNonWhitespaceChar(e, t) { + let i = e.length; + for (let n = t; n < i; n++) { + let t = e.charAt(n); + if (" " !== t && "\t" !== t) return n + } + return i + } + static _deleteWordRightWhitespace(e, t) { + const i = e.getLineContent(t.lineNumber), + n = t.column - 1, + o = this._findFirstNonWhitespaceChar(i, n); + return n + 1 < o ? new l.e(t.lineNumber, t.column, t.lineNumber, o + 1) : + null + } + static deleteWordRight(e, t) { + const i = e.wordSeparators, + n = e.model, + o = e.selection, + r = e.whitespaceHeuristics; + if (!o.isEmpty()) return o; + const s = new a.L(o.positionLineNumber, o.positionColumn); + let c = s.lineNumber, + h = s.column; + const u = n.getLineCount(), + g = n.getLineMaxColumn(c); + if (c === u && h === g) return null; + if (r) { + let e = this._deleteWordRightWhitespace(n, s); + if (e) return e + } + let p = d._findNextWordOnLine(i, n, s); + return 2 === t ? p ? h = p.end + 1 : h < g || c === u ? h = g : (c++, + p = d._findNextWordOnLine(i, n, new a.L(c, 1)), h = p ? p.start + 1 : + n.getLineMaxColumn(c)) : (p && h >= p.start + 1 && (p = d._findNextWordOnLine( + i, n, new a.L(c, p.end + 1))), p ? h = p.start + 1 : h < g || c === + u ? h = g : (c++, p = d._findNextWordOnLine(i, n, new a.L(c, 1)), h = + p ? p.start + 1 : n.getLineMaxColumn(c))), new l.e(c, h, s.lineNumber, + s.column) + } + static _deleteWordPartRight(e, t) { + if (!t.isEmpty()) return t; + const i = t.getPosition(), + n = d._moveWordPartRight(e, i); + return new l.e(i.lineNumber, i.column, n.lineNumber, n.column) + } + static _createWordAtPosition(e, t, i) { + const n = new l.e(t, i.start + 1, t, i.end + 1); + return { + word: e.getValueInRange(n), + startColumn: n.startColumn, + endColumn: n.endColumn + } + } + static getWordAtPosition(e, t, i) { + const n = (0, s.u)(t), + o = d._findPreviousWordOnLine(n, e, i); + if (o && 1 === o.wordType && o.start <= i.column - 1 && i.column - 1 <= + o.end) return d._createWordAtPosition(e, i.lineNumber, o); + const r = d._findNextWordOnLine(n, e, i); + return r && 1 === r.wordType && r.start <= i.column - 1 && i.column - + 1 <= r.end ? d._createWordAtPosition(e, i.lineNumber, r) : null + } + static word(e, t, i, n, r) { + const c = (0, s.u)(e.wordSeparators); + let h, u, g = d._findPreviousWordOnLine(c, t, r), + p = d._findNextWordOnLine(c, t, r); + if (!n) { + let e, i; + return g && 1 === g.wordType && g.start <= r.column - 1 && r.column - + 1 <= g.end ? (e = g.start + 1, i = g.end + 1) : p && 1 === p.wordType && + p.start <= r.column - 1 && r.column - 1 <= p.end ? (e = p.start + 1, + i = p.end + 1) : (e = g ? g.end + 1 : 1, i = p ? p.start + 1 : t.getLineMaxColumn( + r.lineNumber)), new o.rS(new l.e(r.lineNumber, e, r.lineNumber, i), + 0, new a.L(r.lineNumber, i), 0) + } + g && 1 === g.wordType && g.start < r.column - 1 && r.column - 1 < g.end ? + (h = g.start + 1, u = g.end + 1) : p && 1 === p.wordType && p.start < + r.column - 1 && r.column - 1 < p.end ? (h = p.start + 1, u = p.end + + 1) : (h = r.column, u = r.column); + let m, f = r.lineNumber; + if (i.selectionStart.containsPosition(r)) m = i.selectionStart.endColumn; + else if (r.isBeforeOrEqual(i.selectionStart.getStartPosition())) { + m = h; + let e = new a.L(f, m); + i.selectionStart.containsPosition(e) && (m = i.selectionStart.endColumn) + } else { + m = u; + let e = new a.L(f, m); + i.selectionStart.containsPosition(e) && (m = i.selectionStart.startColumn) + } + return i.move(!0, f, m, 0) + } + } + class c extends d { + static deleteWordPartLeft(e) { + const t = h([d.deleteWordLeft(e, 0), d.deleteWordLeft(e, 2), d._deleteWordPartLeft( + e.model, e.selection)]); + return t.sort(l.e.compareRangesUsingEnds), t[2] + } + static deleteWordPartRight(e) { + const t = h([d.deleteWordRight(e, 0), d.deleteWordRight(e, 2), d._deleteWordPartRight( + e.model, e.selection)]); + return t.sort(l.e.compareRangesUsingStarts), t[0] + } + static moveWordPartLeft(e, t, i) { + const n = h([d.moveWordLeft(e, t, i, 0), d.moveWordLeft(e, t, i, 2), d + ._moveWordPartLeft(t, i) + ]); + return n.sort(a.L.compare), n[2] + } + static moveWordPartRight(e, t, i) { + const n = h([d.moveWordRight(e, t, i, 0), d.moveWordRight(e, t, i, 2), + d._moveWordPartRight(t, i) + ]); + return n.sort(a.L.compare), n[0] + } + } + + function h(e) { + return e.filter((e => Boolean(e))) + } + }, + 9410: (e, t, i) => { + "use strict"; + i.d(t, { + u: () => r + }); + var n = i(4906); + class o extends n.N { + constructor(e) { + super(0); + for (let t = 0, i = e.length; t < i; t++) this.set(e.charCodeAt(t), 2); + this.set(32, 1), this.set(9, 1) + } + } + const r = function(e) { + let t = {}; + return e => (t.hasOwnProperty(e) || (t[e] = (e => new o(e))(e)), t[e]) + }() + }, + 4906: (e, t, i) => { + "use strict"; + i.d(t, { + N: () => o, + q: () => r + }); + var n = i(5427); + class o { + constructor(e) { + let t = (0, n.K)(e); + this._defaultValue = t, this._asciiMap = o._createAsciiMap(t), this._map = + new Map + } + static _createAsciiMap(e) { + let t = new Uint8Array(256); + for (let i = 0; i < 256; i++) t[i] = e; + return t + } + set(e, t) { + let i = (0, n.K)(t); + e >= 0 && e < 256 ? this._asciiMap[e] = i : this._map.set(e, i) + } + get(e) { + return e >= 0 && e < 256 ? this._asciiMap[e] : this._map.get(e) || + this._defaultValue + } + } + class r { + constructor() { + this._actual = new o(0) + } + add(e) { + this._actual.set(e, 1) + } + has(e) { + return 1 === this._actual.get(e) + } + } + }, + 9386: (e, t, i) => { + "use strict"; + i.d(t, { + h: () => o + }); + var n = i(4314); + class o { + static insert(e, t) { + return { + range: new n.e(e.lineNumber, e.column, e.lineNumber, e.column), + text: t, + forceMoveMarkers: !0 + } + } + static delete(e) { + return { + range: e, + text: null + } + } + static replace(e, t) { + return { + range: e, + text: t + } + } + static replaceMove(e, t) { + return { + range: e, + text: t, + forceMoveMarkers: !0 + } + } + } + }, + 8411: (e, t, i) => { + "use strict"; + i.d(t, { + A: () => o + }); + var n = i(4101); + class o { + constructor(e, t) { + this._lineTokensBrand = void 0, this._tokens = e, this._tokensCount = + this._tokens.length >>> 1, this._text = t + } + static createEmpty(e) { + const t = o.defaultTokenMetadata, + i = new Uint32Array(2); + return i[0] = e.length, i[1] = t, new o(i, e) + } + equals(e) { + return e instanceof o && this.slicedEquals(e, 0, this._tokensCount) + } + slicedEquals(e, t, i) { + if (this._text !== e._text) return !1; + if (this._tokensCount !== e._tokensCount) return !1; + const n = t << 1, + o = n + (i << 1); + for (let t = n; t < o; t++) + if (this._tokens[t] !== e._tokens[t]) return !1; + return !0 + } + getLineContent() { + return this._text + } + getCount() { + return this._tokensCount + } + getStartOffset(e) { + return e > 0 ? this._tokens[e - 1 << 1] : 0 + } + getMetadata(e) { + return this._tokens[1 + (e << 1)] + } + getLanguageId(e) { + const t = this._tokens[1 + (e << 1)]; + return n.NX.getLanguageId(t) + } + getStandardTokenType(e) { + const t = this._tokens[1 + (e << 1)]; + return n.NX.getTokenType(t) + } + getForeground(e) { + const t = this._tokens[1 + (e << 1)]; + return n.NX.getForeground(t) + } + getClassName(e) { + const t = this._tokens[1 + (e << 1)]; + return n.NX.getClassNameFromMetadata(t) + } + getInlineStyle(e, t) { + const i = this._tokens[1 + (e << 1)]; + return n.NX.getInlineStyleFromMetadata(i, t) + } + getEndOffset(e) { + return this._tokens[e << 1] + } + findTokenIndexAtOffset(e) { + return o.findIndexInTokensArray(this._tokens, e) + } + inflate() { + return this + } + sliceAndInflate(e, t, i) { + return new r(this, e, t, i) + } + static convertToEndOffset(e, t) { + const i = (e.length >>> 1) - 1; + for (let t = 0; t < i; t++) e[t << 1] = e[t + 1 << 1]; + e[i << 1] = t + } + static findIndexInTokensArray(e, t) { + if (e.length <= 2) return 0; + let i = 0, + n = (e.length >>> 1) - 1; + for (; i < n;) { + const o = i + Math.floor((n - i) / 2), + r = e[o << 1]; + if (r === t) return o + 1; + r < t ? i = o + 1 : r > t && (n = o) + } + return i + } + withInserted(e) { + if (0 === e.length) return this; + let t = 0, + i = 0, + n = ""; + const r = new Array; + let s = 0; + for (;;) { + let o = t < this._tokensCount ? this._tokens[t << 1] : -1, + a = i < e.length ? e[i] : null; + if (-1 !== o && (null === a || o <= a.offset)) { + n += this._text.substring(s, o); + const e = this._tokens[1 + (t << 1)]; + r.push(n.length, e), t++, s = o + } else { + if (!a) break; + if (a.offset > s) { + n += this._text.substring(s, a.offset); + const e = this._tokens[1 + (t << 1)]; + r.push(n.length, e), s = a.offset + } + n += a.text, r.push(n.length, a.tokenMetadata), i++ + } + } + return new o(new Uint32Array(r), n) + } + } + o.defaultTokenMetadata = 16793600; + class r { + constructor(e, t, i, n) { + this._source = e, this._startOffset = t, this._endOffset = i, this._deltaOffset = + n, this._firstTokenIndex = e.findTokenIndexAtOffset(t), this._tokensCount = + 0; + for (let t = this._firstTokenIndex, n = e.getCount(); t < n && !(e.getStartOffset( + t) >= i); t++) this._tokensCount++ + } + equals(e) { + return e instanceof r && this._startOffset === e._startOffset && this._endOffset === + e._endOffset && this._deltaOffset === e._deltaOffset && this._source.slicedEquals( + e._source, this._firstTokenIndex, this._tokensCount) + } + getCount() { + return this._tokensCount + } + getForeground(e) { + return this._source.getForeground(this._firstTokenIndex + e) + } + getEndOffset(e) { + const t = this._source.getEndOffset(this._firstTokenIndex + e); + return Math.min(this._endOffset, t) - this._startOffset + this._deltaOffset + } + getClassName(e) { + return this._source.getClassName(this._firstTokenIndex + e) + } + getInlineStyle(e, t) { + return this._source.getInlineStyle(this._firstTokenIndex + e, t) + } + findTokenIndexAtOffset(e) { + return this._source.findTokenIndexAtOffset(e + this._startOffset - + this._deltaOffset) - this._firstTokenIndex + } + } + }, + 187: (e, t, i) => { + "use strict"; + i.d(t, { + L: () => n + }); + class n { + constructor(e, t) { + this.lineNumber = e, this.column = t + } + with(e = this.lineNumber, t = this.column) { + return e === this.lineNumber && t === this.column ? this : new n(e, t) + } + delta(e = 0, t = 0) { + return this.with(this.lineNumber + e, this.column + t) + } + equals(e) { + return n.equals(this, e) + } + static equals(e, t) { + return !e && !t || !!e && !!t && e.lineNumber === t.lineNumber && e.column === + t.column + } + isBefore(e) { + return n.isBefore(this, e) + } + static isBefore(e, t) { + return e.lineNumber < t.lineNumber || !(t.lineNumber < e.lineNumber) && + e.column < t.column + } + isBeforeOrEqual(e) { + return n.isBeforeOrEqual(this, e) + } + static isBeforeOrEqual(e, t) { + return e.lineNumber < t.lineNumber || !(t.lineNumber < e.lineNumber) && + e.column <= t.column + } + static compare(e, t) { + let i = 0 | e.lineNumber, + n = 0 | t.lineNumber; + return i === n ? (0 | e.column) - (0 | t.column) : i - n + } + clone() { + return new n(this.lineNumber, this.column) + } + toString() { + return "(" + this.lineNumber + "," + this.column + ")" + } + static lift(e) { + return new n(e.lineNumber, e.column) + } + static isIPosition(e) { + return e && "number" == typeof e.lineNumber && "number" == typeof e.column + } + } + }, + 4314: (e, t, i) => { + "use strict"; + i.d(t, { + e: () => o + }); + var n = i(187); + class o { + constructor(e, t, i, n) { + e > i || e === i && t > n ? (this.startLineNumber = i, this.startColumn = + n, this.endLineNumber = e, this.endColumn = t) : (this.startLineNumber = + e, this.startColumn = t, this.endLineNumber = i, this.endColumn = n) + } + isEmpty() { + return o.isEmpty(this) + } + static isEmpty(e) { + return e.startLineNumber === e.endLineNumber && e.startColumn === e.endColumn + } + containsPosition(e) { + return o.containsPosition(this, e) + } + static containsPosition(e, t) { + return !(t.lineNumber < e.startLineNumber || t.lineNumber > e.endLineNumber || + t.lineNumber === e.startLineNumber && t.column < e.startColumn || t.lineNumber === + e.endLineNumber && t.column > e.endColumn) + } + containsRange(e) { + return o.containsRange(this, e) + } + static containsRange(e, t) { + return !(t.startLineNumber < e.startLineNumber || t.endLineNumber < e.startLineNumber || + t.startLineNumber > e.endLineNumber || t.endLineNumber > e.endLineNumber || + t.startLineNumber === e.startLineNumber && t.startColumn < e.startColumn || + t.endLineNumber === e.endLineNumber && t.endColumn > e.endColumn) + } + strictContainsRange(e) { + return o.strictContainsRange(this, e) + } + static strictContainsRange(e, t) { + return !(t.startLineNumber < e.startLineNumber || t.endLineNumber < e.startLineNumber || + t.startLineNumber > e.endLineNumber || t.endLineNumber > e.endLineNumber || + t.startLineNumber === e.startLineNumber && t.startColumn <= e.startColumn || + t.endLineNumber === e.endLineNumber && t.endColumn >= e.endColumn) + } + plusRange(e) { + return o.plusRange(this, e) + } + static plusRange(e, t) { + let i, n, r, s; + return t.startLineNumber < e.startLineNumber ? (i = t.startLineNumber, + n = t.startColumn) : t.startLineNumber === e.startLineNumber ? (i = + t.startLineNumber, n = Math.min(t.startColumn, e.startColumn)) : (i = + e.startLineNumber, n = e.startColumn), t.endLineNumber > e.endLineNumber ? + (r = t.endLineNumber, s = t.endColumn) : t.endLineNumber === e.endLineNumber ? + (r = t.endLineNumber, s = Math.max(t.endColumn, e.endColumn)) : (r = + e.endLineNumber, s = e.endColumn), new o(i, n, r, s) + } + intersectRanges(e) { + return o.intersectRanges(this, e) + } + static intersectRanges(e, t) { + let i = e.startLineNumber, + n = e.startColumn, + r = e.endLineNumber, + s = e.endColumn, + a = t.startLineNumber, + l = t.startColumn, + d = t.endLineNumber, + c = t.endColumn; + return i < a ? (i = a, n = l) : i === a && (n = Math.max(n, l)), r > d ? + (r = d, s = c) : r === d && (s = Math.min(s, c)), i > r || i === r && + n > s ? null : new o(i, n, r, s) + } + equalsRange(e) { + return o.equalsRange(this, e) + } + static equalsRange(e, t) { + return !!e && !!t && e.startLineNumber === t.startLineNumber && e.startColumn === + t.startColumn && e.endLineNumber === t.endLineNumber && e.endColumn === + t.endColumn + } + getEndPosition() { + return o.getEndPosition(this) + } + static getEndPosition(e) { + return new n.L(e.endLineNumber, e.endColumn) + } + getStartPosition() { + return o.getStartPosition(this) + } + static getStartPosition(e) { + return new n.L(e.startLineNumber, e.startColumn) + } + toString() { + return "[" + this.startLineNumber + "," + this.startColumn + " -> " + + this.endLineNumber + "," + this.endColumn + "]" + } + setEndPosition(e, t) { + return new o(this.startLineNumber, this.startColumn, e, t) + } + setStartPosition(e, t) { + return new o(e, t, this.endLineNumber, this.endColumn) + } + collapseToStart() { + return o.collapseToStart(this) + } + static collapseToStart(e) { + return new o(e.startLineNumber, e.startColumn, e.startLineNumber, e.startColumn) + } + static fromPositions(e, t = e) { + return new o(e.lineNumber, e.column, t.lineNumber, t.column) + } + static lift(e) { + return e ? new o(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn) : + null + } + static isIRange(e) { + return e && "number" == typeof e.startLineNumber && "number" == typeof e + .startColumn && "number" == typeof e.endLineNumber && "number" == + typeof e.endColumn + } + static areIntersectingOrTouching(e, t) { + return !(e.endLineNumber < t.startLineNumber || e.endLineNumber === t.startLineNumber && + e.endColumn < t.startColumn || t.endLineNumber < e.startLineNumber || + t.endLineNumber === e.startLineNumber && t.endColumn < e.startColumn + ) + } + static areIntersecting(e, t) { + return !(e.endLineNumber < t.startLineNumber || e.endLineNumber === t.startLineNumber && + e.endColumn <= t.startColumn || t.endLineNumber < e.startLineNumber || + t.endLineNumber === e.startLineNumber && t.endColumn <= e.startColumn + ) + } + static compareRangesUsingStarts(e, t) { + if (e && t) { + const i = 0 | e.startLineNumber, + n = 0 | t.startLineNumber; + if (i === n) { + const i = 0 | e.startColumn, + n = 0 | t.startColumn; + if (i === n) { + const i = 0 | e.endLineNumber, + n = 0 | t.endLineNumber; + return i === n ? (0 | e.endColumn) - (0 | t.endColumn) : i - n + } + return i - n + } + return i - n + } + return (e ? 1 : 0) - (t ? 1 : 0) + } + static compareRangesUsingEnds(e, t) { + return e.endLineNumber === t.endLineNumber ? e.endColumn === t.endColumn ? + e.startLineNumber === t.startLineNumber ? e.startColumn - t.startColumn : + e.startLineNumber - t.startLineNumber : e.endColumn - t.endColumn : e + .endLineNumber - t.endLineNumber + } + static spansMultipleLines(e) { + return e.endLineNumber > e.startLineNumber + } + } + }, + 3860: (e, t, i) => { + "use strict"; + i.d(t, { + Y: () => r + }); + var n = i(187), + o = i(4314); + class r extends o.e { + constructor(e, t, i, n) { + super(e, t, i, n), this.selectionStartLineNumber = e, this.selectionStartColumn = + t, this.positionLineNumber = i, this.positionColumn = n + } + toString() { + return "[" + this.selectionStartLineNumber + "," + this.selectionStartColumn + + " -> " + this.positionLineNumber + "," + this.positionColumn + "]" + } + equalsSelection(e) { + return r.selectionsEqual(this, e) + } + static selectionsEqual(e, t) { + return e.selectionStartLineNumber === t.selectionStartLineNumber && e + .selectionStartColumn === t.selectionStartColumn && e.positionLineNumber === + t.positionLineNumber && e.positionColumn === t.positionColumn + } + getDirection() { + return this.selectionStartLineNumber === this.startLineNumber && this + .selectionStartColumn === this.startColumn ? 0 : 1 + } + setEndPosition(e, t) { + return 0 === this.getDirection() ? new r(this.startLineNumber, this.startColumn, + e, t) : new r(e, t, this.startLineNumber, this.startColumn) + } + getPosition() { + return new n.L(this.positionLineNumber, this.positionColumn) + } + setStartPosition(e, t) { + return 0 === this.getDirection() ? new r(e, t, this.endLineNumber, + this.endColumn) : new r(this.endLineNumber, this.endColumn, e, t) + } + static fromPositions(e, t = e) { + return new r(e.lineNumber, e.column, t.lineNumber, t.column) + } + static liftSelection(e) { + return new r(e.selectionStartLineNumber, e.selectionStartColumn, e.positionLineNumber, + e.positionColumn) + } + static selectionsArrEqual(e, t) { + if (e && !t || !e && t) return !1; + if (!e && !t) return !0; + if (e.length !== t.length) return !1; + for (let i = 0, n = e.length; i < n; i++) + if (!this.selectionsEqual(e[i], t[i])) return !1; + return !0 + } + static isISelection(e) { + return e && "number" == typeof e.selectionStartLineNumber && "number" == + typeof e.selectionStartColumn && "number" == typeof e.positionLineNumber && + "number" == typeof e.positionColumn + } + static createWithDirection(e, t, i, n, o) { + return 0 === o ? new r(e, t, i, n) : new r(i, n, e, t) + } + } + }, + 72: (e, t, i) => { + "use strict"; + i.d(t, { + oe: () => c, + lZ: () => h, + l$: () => u, + kH: () => g + }); + var n = i(7295), + o = i(1432), + r = i(3060); + let s, a, l; + + function d() { + return s || (s = new TextDecoder("UTF-16LE")), s + } + + function c() { + return l || (l = o.r() ? d() : (a || (a = new TextDecoder("UTF-16BE")), + a)), l + } + const h = "undefined" != typeof TextDecoder; + let u, g; + + function p(e, t, i) { + let n = [], + o = 0; + for (let s = 0; s < i; s++) { + const i = r.mP(e, t); + t += 2, n[o++] = String.fromCharCode(i) + } + return n.join("") + } + h ? (u = e => new m(e), g = function(e, t, i) { + const n = new Uint16Array(e.buffer, t, i); + return i > 0 && (65279 === n[0] || 65534 === n[0]) ? p(e, t, i) : d().decode( + n) + }) : (u = e => new f, g = p); + class m { + constructor(e) { + this._capacity = 0 | e, this._buffer = new Uint16Array(this._capacity), + this._completedStrings = null, this._bufferLength = 0 + } + reset() { + this._completedStrings = null, this._bufferLength = 0 + } + build() { + return null !== this._completedStrings ? (this._flushBuffer(), this._completedStrings + .join("")) : this._buildBuffer() + } + _buildBuffer() { + if (0 === this._bufferLength) return ""; + const e = new Uint16Array(this._buffer.buffer, 0, this._bufferLength); + return c().decode(e) + } + _flushBuffer() { + const e = this._buildBuffer(); + this._bufferLength = 0, null === this._completedStrings ? this._completedStrings = [ + e + ] : this._completedStrings[this._completedStrings.length] = e + } + write1(e) { + const t = this._capacity - this._bufferLength; + t <= 1 && (0 === t || n.ZG(e)) && this._flushBuffer(), this._buffer[ + this._bufferLength++] = e + } + appendASCII(e) { + this._bufferLength === this._capacity && this._flushBuffer(), this._buffer[ + this._bufferLength++] = e + } + appendASCIIString(e) { + const t = e.length; + if (this._bufferLength + t >= this._capacity) return this._flushBuffer(), + void(this._completedStrings[this._completedStrings.length] = e); + for (let i = 0; i < t; i++) this._buffer[this._bufferLength++] = e.charCodeAt( + i) + } + } + class f { + constructor() { + this._pieces = [], this._piecesLen = 0 + } + reset() { + this._pieces = [], this._piecesLen = 0 + } + build() { + return this._pieces.join("") + } + write1(e) { + this._pieces[this._piecesLen++] = String.fromCharCode(e) + } + appendASCII(e) { + this._pieces[this._piecesLen++] = String.fromCharCode(e) + } + appendASCIIString(e) { + this._pieces[this._piecesLen++] = e + } + } + }, + 5600: (e, t, i) => { + "use strict"; + i.d(t, { + WU: () => n, + hG: () => o, + Hi: () => r + }); + class n { + constructor(e, t, i) { + this._tokenBrand = void 0, this.offset = 0 | e, this.type = t, this.language = + i + } + toString() { + return "(" + this.offset + ", " + this.type + ")" + } + } + class o { + constructor(e, t) { + this._tokenizationResultBrand = void 0, this.tokens = e, this.endState = + t + } + } + class r { + constructor(e, t) { + this._tokenizationResult2Brand = void 0, this.tokens = e, this.endState = + t + } + } + }, + 653: (e, t, i) => { + "use strict"; + i.d(t, { + p: () => n + }); + class n { + constructor(e, t, i, n, o, r) { + this.id = e, this.label = t, this.alias = i, this._precondition = n, + this._run = o, this._contextKeyService = r + } + isSupported() { + return this._contextKeyService.contextMatchesRules(this._precondition) + } + run() { + return this.isSupported() ? this._run() : Promise.resolve(void 0) + } + } + }, + 6518: (e, t, i) => { + "use strict"; + + function n(e) { + return e && "string" == typeof e.id + } + i.d(t, { + I: () => n, + g: () => o + }); + const o = { + ICodeEditor: "vs.editor.ICodeEditor", + IDiffEditor: "vs.editor.IDiffEditor" + } + }, + 9102: (e, t, i) => { + "use strict"; + i.d(t, { + u: () => n + }); + var n, o = i(3580), + r = i(8819); + ! function(e) { + e.editorSimpleInput = new r.uy("editorSimpleInput", !1, !0), e.editorTextFocus = + new r.uy("editorTextFocus", !1, o.N("editorTextFocus", + "Whether the editor text has focus (cursor is blinking)")), e.focus = + new r.uy("editorFocus", !1, o.N("editorFocus", + "Whether the editor or an editor widget has focus (e.g. focus is in the find widget)" + )), e.textInputFocus = new r.uy("textInputFocus", !1, o.N( + "textInputFocus", + "Whether an editor or a rich text input has focus (cursor is blinking)" + )), e.readOnly = new r.uy("editorReadonly", !1, o.N("editorReadonly", + "Whether the editor is read only")), e.inDiffEditor = new r.uy( + "inDiffEditor", !1, o.N("inDiffEditor", + "Whether the context is a diff editor")), e.columnSelection = new r.uy( + "editorColumnSelection", !1, o.N("editorColumnSelection", + "Whether `editor.columnSelection` is enabled")), e.writable = e.readOnly + .toNegated(), e.hasNonEmptySelection = new r.uy("editorHasSelection", ! + 1, o.N("editorHasSelection", "Whether the editor has text selected")), + e.hasOnlyEmptySelection = e.hasNonEmptySelection.toNegated(), e.hasMultipleSelections = + new r.uy("editorHasMultipleSelections", !1, o.N( + "editorHasMultipleSelections", + "Whether the editor has multiple selections")), e.hasSingleSelection = + e.hasMultipleSelections.toNegated(), e.tabMovesFocus = new r.uy( + "editorTabMovesFocus", !1, o.N("editorTabMovesFocus", + "Whether `Tab` will move focus out of the editor")), e.tabDoesNotMoveFocus = + e.tabMovesFocus.toNegated(), e.isInWalkThroughSnippet = new r.uy( + "isInEmbeddedEditor", !1, !0), e.canUndo = new r.uy("canUndo", !1, !0), + e.canRedo = new r.uy("canRedo", !1, !0), e.hoverVisible = new r.uy( + "editorHoverVisible", !1, o.N("editorHoverVisible", + "Whether the editor hover is visible")), e.inCompositeEditor = new r.uy( + "inCompositeEditor", void 0, o.N("inCompositeEditor", + "Whether the editor is part of a larger editor (e.g. notebooks)")), e + .notInCompositeEditor = e.inCompositeEditor.toNegated(), e.languageId = + new r.uy("editorLangId", "", o.N("editorLangId", + "The language identifier of the editor")), e.hasCompletionItemProvider = + new r.uy("editorHasCompletionItemProvider", !1, o.N( + "editorHasCompletionItemProvider", + "Whether the editor has a completion item provider")), e.hasCodeActionsProvider = + new r.uy("editorHasCodeActionsProvider", !1, o.N( + "editorHasCodeActionsProvider", + "Whether the editor has a code actions provider")), e.hasCodeLensProvider = + new r.uy("editorHasCodeLensProvider", !1, o.N( + "editorHasCodeLensProvider", + "Whether the editor has a code lens provider")), e.hasDefinitionProvider = + new r.uy("editorHasDefinitionProvider", !1, o.N( + "editorHasDefinitionProvider", + "Whether the editor has a definition provider")), e.hasDeclarationProvider = + new r.uy("editorHasDeclarationProvider", !1, o.N( + "editorHasDeclarationProvider", + "Whether the editor has a declaration provider")), e.hasImplementationProvider = + new r.uy("editorHasImplementationProvider", !1, o.N( + "editorHasImplementationProvider", + "Whether the editor has an implementation provider")), e.hasTypeDefinitionProvider = + new r.uy("editorHasTypeDefinitionProvider", !1, o.N( + "editorHasTypeDefinitionProvider", + "Whether the editor has a type definition provider")), e.hasHoverProvider = + new r.uy("editorHasHoverProvider", !1, o.N("editorHasHoverProvider", + "Whether the editor has a hover provider")), e.hasDocumentHighlightProvider = + new r.uy("editorHasDocumentHighlightProvider", !1, o.N( + "editorHasDocumentHighlightProvider", + "Whether the editor has a document highlight provider")), e.hasDocumentSymbolProvider = + new r.uy("editorHasDocumentSymbolProvider", !1, o.N( + "editorHasDocumentSymbolProvider", + "Whether the editor has a document symbol provider")), e.hasReferenceProvider = + new r.uy("editorHasReferenceProvider", !1, o.N( + "editorHasReferenceProvider", + "Whether the editor has a reference provider")), e.hasRenameProvider = + new r.uy("editorHasRenameProvider", !1, o.N("editorHasRenameProvider", + "Whether the editor has a rename provider")), e.hasSignatureHelpProvider = + new r.uy("editorHasSignatureHelpProvider", !1, o.N( + "editorHasSignatureHelpProvider", + "Whether the editor has a signature help provider")), e.hasInlayHintsProvider = + new r.uy("editorHasInlayHintsProvider", !1, o.N( + "editorHasInlayHintsProvider", + "Whether the editor has an inline hints provider")), e.hasDocumentFormattingProvider = + new r.uy("editorHasDocumentFormattingProvider", !1, o.N( + "editorHasDocumentFormattingProvider", + "Whether the editor has a document formatting provider")), e.hasDocumentSelectionFormattingProvider = + new r.uy("editorHasDocumentSelectionFormattingProvider", !1, o.N( + "editorHasDocumentSelectionFormattingProvider", + "Whether the editor has a document selection formatting provider")), e + .hasMultipleDocumentFormattingProvider = new r.uy( + "editorHasMultipleDocumentFormattingProvider", !1, o.N( + "editorHasMultipleDocumentFormattingProvider", + "Whether the editor has multiple document formatting providers")), e.hasMultipleDocumentSelectionFormattingProvider = + new r.uy("editorHasMultipleDocumentSelectionFormattingProvider", !1, o.N( + "editorHasMultipleDocumentSelectionFormattingProvider", + "Whether the editor has multiple document selection formatting providers" + )) + }(n || (n = {})) + }, + 4973: (e, t, i) => { + "use strict"; + i.d(t, { + sh: () => n, + F5: () => o, + dJ: () => s, + tk: () => a, + Qi: () => l, + je: () => d + }); + var n, o, r = i(6248); + ! function(e) { + e[e.Left = 1] = "Left", e[e.Center = 2] = "Center", e[e.Right = 4] = + "Right", e[e.Full = 7] = "Full" + }(n || (n = {})), + function(e) { + e[e.Inline = 1] = "Inline", e[e.Gutter = 2] = "Gutter" + }(o || (o = {})); + class s { + constructor(e) { + this._textModelResolvedOptionsBrand = void 0, this.tabSize = Math.max( + 1, 0 | e.tabSize), this.indentSize = 0 | e.tabSize, this.insertSpaces = + Boolean(e.insertSpaces), this.defaultEOL = 0 | e.defaultEOL, this.trimAutoWhitespace = + Boolean(e.trimAutoWhitespace), this.bracketPairColorizationOptions = + e.bracketPairColorizationOptions + } + equals(e) { + return this.tabSize === e.tabSize && this.indentSize === e.indentSize && + this.insertSpaces === e.insertSpaces && this.defaultEOL === e.defaultEOL && + this.trimAutoWhitespace === e.trimAutoWhitespace && (0, r.fS)(this.bracketPairColorizationOptions, + e.bracketPairColorizationOptions) + } + createChangeEvent(e) { + return { + tabSize: this.tabSize !== e.tabSize, + indentSize: this.indentSize !== e.indentSize, + insertSpaces: this.insertSpaces !== e.insertSpaces, + trimAutoWhitespace: this.trimAutoWhitespace !== e.trimAutoWhitespace + } + } + } + class a { + constructor(e, t) { + this._findMatchBrand = void 0, this.range = e, this.matches = t + } + } + class l { + constructor(e, t, i, n, o, r) { + this.identifier = e, this.range = t, this.text = i, this.forceMoveMarkers = + n, this.isAutoWhitespaceEdit = o, this._isTracked = r + } + } + class d { + constructor(e, t, i) { + this.reverseEdits = e, this.changes = t, this.trimAutoWhitespaceLineNumbers = + i + } + } + }, + 5215: (e, t, i) => { + "use strict"; + i.d(t, { + e9: () => p, + NL: () => m + }); + var n = i(3580), + o = i(7301), + r = i(3860), + s = i(666), + a = i(962), + l = i(3060), + d = i(5935); + + function c(e) { + return e.toString() + } + class h { + constructor(e, t, i, n, o, r, s) { + this.beforeVersionId = e, this.afterVersionId = t, this.beforeEOL = i, + this.afterEOL = n, this.beforeCursorState = o, this.afterCursorState = + r, this.changes = s + } + static create(e, t) { + const i = e.getAlternativeVersionId(), + n = g(e); + return new h(i, i, n, n, t, t, []) + } + append(e, t, i, n, o) { + t.length > 0 && (this.changes = (0, a.b)(this.changes, t)), this.afterEOL = + i, this.afterVersionId = n, this.afterCursorState = o + } + static _writeSelectionsSize(e) { + return 4 + 16 * (e ? e.length : 0) + } + static _writeSelections(e, t, i) { + if (l.T4(e, t ? t.length : 0, i), i += 4, t) + for (const n of t) l.T4(e, n.selectionStartLineNumber, i), i += 4, l.T4( + e, n.selectionStartColumn, i), i += 4, l.T4(e, n.positionLineNumber, + i), i += 4, l.T4(e, n.positionColumn, i), i += 4; + return i + } + static _readSelections(e, t, i) { + const n = l.Ag(e, t); + t += 4; + for (let o = 0; o < n; o++) { + const n = l.Ag(e, t); + t += 4; + const o = l.Ag(e, t); + t += 4; + const s = l.Ag(e, t); + t += 4; + const a = l.Ag(e, t); + t += 4, i.push(new r.Y(n, o, s, a)) + } + return t + } + serialize() { + let e = 10 + h._writeSelectionsSize(this.beforeCursorState) + h._writeSelectionsSize( + this.afterCursorState) + 4; + for (const t of this.changes) e += t.writeSize(); + const t = new Uint8Array(e); + let i = 0; + l.T4(t, this.beforeVersionId, i), i += 4, l.T4(t, this.afterVersionId, + i), i += 4, l.Cg(t, this.beforeEOL, i), i += 1, l.Cg(t, this.afterEOL, + i), i += 1, i = h._writeSelections(t, this.beforeCursorState, i), i = + h._writeSelections(t, this.afterCursorState, i), l.T4(t, this.changes + .length, i), i += 4; + for (const e of this.changes) i = e.write(t, i); + return t.buffer + } + static deserialize(e) { + const t = new Uint8Array(e); + let i = 0; + const n = l.Ag(t, i); + i += 4; + const o = l.Ag(t, i); + i += 4; + const r = l.Q$(t, i); + i += 1; + const s = l.Q$(t, i); + i += 1; + const d = []; + i = h._readSelections(t, i, d); + const c = []; + i = h._readSelections(t, i, c); + const u = l.Ag(t, i); + i += 4; + const g = []; + for (let e = 0; e < u; e++) i = a.q.read(t, i, g); + return new h(n, o, r, s, d, c, g) + } + } + class u { + constructor(e, t) { + this.model = e, this._data = h.create(e, t) + } + get type() { + return 0 + } + get resource() { + return s.o.isUri(this.model) ? this.model : this.model.uri + } + get label() { + return n.N("edit", "Typing") + } + toString() { + return (this._data instanceof h ? this._data : h.deserialize(this._data)) + .changes.map((e => e.toString())).join(", ") + } + matchesResource(e) { + return (s.o.isUri(this.model) ? this.model : this.model.uri).toString() === + e.toString() + } + setModel(e) { + this.model = e + } + canAppend(e) { + return this.model === e && this._data instanceof h + } + append(e, t, i, n, o) { + this._data instanceof h && this._data.append(e, t, i, n, o) + } + close() { + this._data instanceof h && (this._data = this._data.serialize()) + } + open() { + this._data instanceof h || (this._data = h.deserialize(this._data)) + } + undo() { + if (s.o.isUri(this.model)) throw new Error( + "Invalid SingleModelEditStackElement"); + this._data instanceof h && (this._data = this._data.serialize()); + const e = h.deserialize(this._data); + this.model._applyUndo(e.changes, e.beforeEOL, e.beforeVersionId, e.beforeCursorState) + } + redo() { + if (s.o.isUri(this.model)) throw new Error( + "Invalid SingleModelEditStackElement"); + this._data instanceof h && (this._data = this._data.serialize()); + const e = h.deserialize(this._data); + this.model._applyRedo(e.changes, e.afterEOL, e.afterVersionId, e.afterCursorState) + } + heapSize() { + return this._data instanceof h && (this._data = this._data.serialize()), + this._data.byteLength + 168 + } + } + + function g(e) { + return "\n" === e.getEOL() ? 0 : 1 + } + + function p(e) { + return !!e && (e instanceof u || e instanceof class { + constructor(e, t) { + this.type = 1, this.label = e, this._isOpen = !0, this._editStackElementsArr = + t.slice(0), this._editStackElementsMap = new Map; + for (const e of this._editStackElementsArr) { + const t = c(e.resource); + this._editStackElementsMap.set(t, e) + } + this._delegate = null + } + get resources() { + return this._editStackElementsArr.map((e => e.resource)) + } + prepareUndoRedo() { + if (this._delegate) return this._delegate.prepareUndoRedo(this) + } + matchesResource(e) { + const t = c(e); + return this._editStackElementsMap.has(t) + } + setModel(e) { + const t = c(s.o.isUri(e) ? e : e.uri); + this._editStackElementsMap.has(t) && this._editStackElementsMap.get( + t).setModel(e) + } + canAppend(e) { + if (!this._isOpen) return !1; + const t = c(e.uri); + return !!this._editStackElementsMap.has(t) && this._editStackElementsMap + .get(t).canAppend(e) + } + append(e, t, i, n, o) { + const r = c(e.uri); + this._editStackElementsMap.get(r).append(e, t, i, n, o) + } + close() { + this._isOpen = !1 + } + open() {} + undo() { + this._isOpen = !1; + for (const e of this._editStackElementsArr) e.undo() + } + redo() { + for (const e of this._editStackElementsArr) e.redo() + } + heapSize(e) { + const t = c(e); + return this._editStackElementsMap.has(t) ? this._editStackElementsMap + .get(t).heapSize() : 0 + } + split() { + return this._editStackElementsArr + } + toString() { + let e = []; + for (const t of this._editStackElementsArr) e.push( + `${(0,d.EZ)(t.resource)}: ${t}`); + return `{${e.join(", ")}}` + } + }) + } + class m { + constructor(e, t) { + this._model = e, this._undoRedoService = t + } + pushStackElement() { + const e = this._undoRedoService.getLastElement(this._model.uri); + p(e) && e.close() + } + popStackElement() { + const e = this._undoRedoService.getLastElement(this._model.uri); + p(e) && e.open() + } + clear() { + this._undoRedoService.removeElements(this._model.uri) + } + _getOrCreateEditStackElement(e) { + const t = this._undoRedoService.getLastElement(this._model.uri); + if (p(t) && t.canAppend(this._model)) return t; + const i = new u(this._model, e); + return this._undoRedoService.pushElement(i), i + } + pushEOL(e) { + const t = this._getOrCreateEditStackElement(null); + this._model.setEOL(e), t.append(this._model, [], g(this._model), this._model + .getAlternativeVersionId(), null) + } + pushEditOperation(e, t, i) { + const n = this._getOrCreateEditStackElement(e), + o = this._model.applyEdits(t, !0), + r = m._computeCursorState(i, o), + s = o.map(((e, t) => ({ + index: t, + textChange: e.textChange + }))); + return s.sort(((e, t) => e.textChange.oldPosition === t.textChange.oldPosition ? + e.index - t.index : e.textChange.oldPosition - t.textChange.oldPosition + )), n.append(this._model, s.map((e => e.textChange)), g(this._model), + this._model.getAlternativeVersionId(), r), r + } + static _computeCursorState(e, t) { + try { + return e ? e(t) : null + } catch (e) { + return (0, o.dL)(e), null + } + } + } + }, + 962: (e, t, i) => { + "use strict"; + i.d(t, { + q: () => s, + b: () => a + }); + var n = i(3060), + o = i(72); + + function r(e) { + return e.replace(/\n/g, "\\n").replace(/\r/g, "\\r") + } + class s { + constructor(e, t, i, n) { + this.oldPosition = e, this.oldText = t, this.newPosition = i, this.newText = + n + } + get oldLength() { + return this.oldText.length + } + get oldEnd() { + return this.oldPosition + this.oldText.length + } + get newLength() { + return this.newText.length + } + get newEnd() { + return this.newPosition + this.newText.length + } + toString() { + return 0 === this.oldText.length ? + `(insert@${this.oldPosition} "${r(this.newText)}")` : 0 === this.newText + .length ? `(delete@${this.oldPosition} "${r(this.oldText)}")` : + `(replace@${this.oldPosition} "${r(this.oldText)}" with "${r(this.newText)}")` + } + static _writeStringSize(e) { + return 4 + 2 * e.length + } + static _writeString(e, t, i) { + const o = t.length; + n.T4(e, o, i), i += 4; + for (let r = 0; r < o; r++) n.oq(e, t.charCodeAt(r), i), i += 2; + return i + } + static _readString(e, t) { + const i = n.Ag(e, t); + return t += 4, (0, o.kH)(e, t, i) + } + writeSize() { + return 8 + s._writeStringSize(this.oldText) + s._writeStringSize(this.newText) + } + write(e, t) { + return n.T4(e, this.oldPosition, t), t += 4, n.T4(e, this.newPosition, + t), t += 4, t = s._writeString(e, this.oldText, t), s._writeString(e, + this.newText, t) + } + static read(e, t, i) { + const o = n.Ag(e, t); + t += 4; + const r = n.Ag(e, t); + t += 4; + const a = s._readString(e, t); + t += s._writeStringSize(a); + const l = s._readString(e, t); + return t += s._writeStringSize(l), i.push(new s(o, a, r, l)), t + } + } + + function a(e, t) { + return null === e || 0 === e.length ? t : new l(e, t).compress() + } + class l { + constructor(e, t) { + this._prevEdits = e, this._currEdits = t, this._result = [], this._resultLen = + 0, this._prevLen = this._prevEdits.length, this._prevDeltaOffset = 0, + this._currLen = this._currEdits.length, this._currDeltaOffset = 0 + } + compress() { + let e = 0, + t = 0, + i = this._getPrev(e), + n = this._getCurr(t); + for (; e < this._prevLen || t < this._currLen;) { + if (null === i) { + this._acceptCurr(n), n = this._getCurr(++t); + continue + } + if (null === n) { + this._acceptPrev(i), i = this._getPrev(++e); + continue + } + if (n.oldEnd <= i.newPosition) { + this._acceptCurr(n), n = this._getCurr(++t); + continue + } + if (i.newEnd <= n.oldPosition) { + this._acceptPrev(i), i = this._getPrev(++e); + continue + } + if (n.oldPosition < i.newPosition) { + const [e, t] = l._splitCurr(n, i.newPosition - n.oldPosition); + this._acceptCurr(e), n = t; + continue + } + if (i.newPosition < n.oldPosition) { + const [e, t] = l._splitPrev(i, n.oldPosition - i.newPosition); + this._acceptPrev(e), i = t; + continue + } + let o, r; + if (n.oldEnd === i.newEnd) o = i, r = n, i = this._getPrev(++e), n = + this._getCurr(++t); + else if (n.oldEnd < i.newEnd) { + const [e, s] = l._splitPrev(i, n.oldLength); + o = e, r = n, i = s, n = this._getCurr(++t) + } else { + const [t, s] = l._splitCurr(n, i.newLength); + o = i, r = t, i = this._getPrev(++e), n = s + } + this._result[this._resultLen++] = new s(o.oldPosition, o.oldText, r.newPosition, + r.newText), this._prevDeltaOffset += o.newLength - o.oldLength, + this._currDeltaOffset += r.newLength - r.oldLength + } + const o = l._merge(this._result); + return l._removeNoOps(o) + } + _acceptCurr(e) { + this._result[this._resultLen++] = l._rebaseCurr(this._prevDeltaOffset, + e), this._currDeltaOffset += e.newLength - e.oldLength + } + _getCurr(e) { + return e < this._currLen ? this._currEdits[e] : null + } + _acceptPrev(e) { + this._result[this._resultLen++] = l._rebasePrev(this._currDeltaOffset, + e), this._prevDeltaOffset += e.newLength - e.oldLength + } + _getPrev(e) { + return e < this._prevLen ? this._prevEdits[e] : null + } + static _rebaseCurr(e, t) { + return new s(t.oldPosition - e, t.oldText, t.newPosition, t.newText) + } + static _rebasePrev(e, t) { + return new s(t.oldPosition, t.oldText, t.newPosition + e, t.newText) + } + static _splitPrev(e, t) { + const i = e.newText.substr(0, t), + n = e.newText.substr(t); + return [new s(e.oldPosition, e.oldText, e.newPosition, i), new s(e.oldEnd, + "", e.newPosition + t, n)] + } + static _splitCurr(e, t) { + const i = e.oldText.substr(0, t), + n = e.oldText.substr(t); + return [new s(e.oldPosition, i, e.newPosition, e.newText), new s(e.oldPosition + + t, n, e.newEnd, "")] + } + static _merge(e) { + if (0 === e.length) return e; + let t = [], + i = 0, + n = e[0]; + for (let o = 1; o < e.length; o++) { + const r = e[o]; + n.oldEnd === r.oldPosition ? n = new s(n.oldPosition, n.oldText + r.oldText, + n.newPosition, n.newText + r.newText) : (t[i++] = n, n = r) + } + return t[i++] = n, t + } + static _removeNoOps(e) { + if (0 === e.length) return e; + let t = [], + i = 0; + for (let n = 0; n < e.length; n++) { + const o = e[n]; + o.oldText !== o.newText && (t[i++] = o) + } + return t + } + } + }, + 6281: (e, t, i) => { + "use strict"; + i.d(t, { + qx: () => Tt, + yO: () => yt + }); + var n = i(7301), + o = i(4669), + r = i(5976), + s = i(7295), + a = i(666), + l = i(4141), + d = i(187), + c = i(4314), + h = i(3860), + u = i(4973), + g = i(5215); + class p { + constructor() { + this.spacesDiff = 0, this.looksLikeAlignment = !1 + } + } + + function m(e, t, i, n, o) { + let r; + for (o.spacesDiff = 0, o.looksLikeAlignment = !1, r = 0; r < t && r < n && + e.charCodeAt(r) === i.charCodeAt(r); r++); + let s = 0, + a = 0; + for (let i = r; i < t; i++) 32 === e.charCodeAt(i) ? s++ : a++; + let l = 0, + d = 0; + for (let e = r; e < n; e++) 32 === i.charCodeAt(e) ? l++ : d++; + if (s > 0 && a > 0) return; + if (l > 0 && d > 0) return; + let c = Math.abs(a - d), + h = Math.abs(s - l); + if (0 === c) return o.spacesDiff = h, void(h > 0 && 0 <= l - 1 && l - 1 < + e.length && l < i.length && 32 !== i.charCodeAt(l) && 32 === e.charCodeAt( + l - 1) && 44 === e.charCodeAt(e.length - 1) && (o.looksLikeAlignment = ! + 0)); + h % c != 0 || (o.spacesDiff = h / c) + } + + function f(e, t, i) { + const n = Math.min(e.getLineCount(), 1e4); + let o = 0, + r = 0, + s = "", + a = 0; + const l = [2, 4, 6, 8, 3, 5, 7]; + let d = [0, 0, 0, 0, 0, 0, 0, 0, 0], + c = new p; + for (let l = 1; l <= n; l++) { + let n = e.getLineLength(l), + h = e.getLineContent(l); + const u = n <= 65536; + let g = !1, + p = 0, + f = 0, + _ = 0; + for (let t = 0, i = n; t < i; t++) { + let i = u ? h.charCodeAt(t) : e.getLineCharCode(l, t); + if (9 === i) _++; + else { + if (32 !== i) { + g = !0, p = t; + break + } + f++ + } + } + if (!g) continue; + if (_ > 0 ? o++ : f > 1 && r++, m(s, a, h, p, c), c.looksLikeAlignment && + (!i || t !== c.spacesDiff)) continue; + let b = c.spacesDiff; + b <= 8 && d[b]++, s = h, a = p + } + let h = i; + o !== r && (h = o < r); + let u = t; + if (h) { + let e = h ? 0 : .1 * n; + l.forEach((t => { + let i = d[t]; + i > e && (e = i, u = t) + })), 4 === u && d[4] > 0 && d[2] > 0 && d[2] >= d[4] / 2 && (u = 2) + } + return { + insertSpaces: h, + tabSize: u + } + } + + function _(e) { + return (1 & e.metadata) >>> 0 + } + + function b(e, t) { + e.metadata = 254 & e.metadata | t << 0 + } + + function v(e) { + return (2 & e.metadata) >>> 1 == 1 + } + + function w(e, t) { + e.metadata = 253 & e.metadata | (t ? 1 : 0) << 1 + } + + function C(e) { + return (4 & e.metadata) >>> 2 == 1 + } + + function y(e, t) { + e.metadata = 251 & e.metadata | (t ? 1 : 0) << 2 + } + + function S(e, t) { + e.metadata = 231 & e.metadata | t << 3 + } + + function x(e, t) { + e.metadata = 223 & e.metadata | (t ? 1 : 0) << 5 + } + class k { + constructor(e, t, i) { + this.metadata = 0, this.parent = this, this.left = this, this.right = + this, b(this, 1), this.start = t, this.end = i, this.delta = 0, this.maxEnd = + i, this.id = e, this.ownerId = 0, this.options = null, y(this, !1), S( + this, 1), x(this, !1), this.cachedVersionId = 0, this.cachedAbsoluteStart = + t, this.cachedAbsoluteEnd = i, this.range = null, w(this, !1) + } + reset(e, t, i, n) { + this.start = t, this.end = i, this.maxEnd = i, this.cachedVersionId = + e, this.cachedAbsoluteStart = t, this.cachedAbsoluteEnd = i, this.range = + n + } + setOptions(e) { + this.options = e; + let t = this.options.className; + y(this, "squiggly-error" === t || "squiggly-warning" === t || + "squiggly-info" === t), S(this, this.options.stickiness), x(this, + this.options.collapseOnReplaceEdit) + } + setCachedOffsets(e, t, i) { + this.cachedVersionId !== i && (this.range = null), this.cachedVersionId = + i, this.cachedAbsoluteStart = e, this.cachedAbsoluteEnd = t + } + detach() { + this.parent = null, this.left = null, this.right = null + } + } + const L = new k(null, 0, 0); + L.parent = L, L.left = L, L.right = L, b(L, 0); + class N { + constructor() { + this.root = L, this.requestNormalizeDelta = !1 + } + intervalSearch(e, t, i, n, o) { + return this.root === L ? [] : function(e, t, i, n, o, r) { + let s = e.root, + a = 0, + l = 0, + d = 0, + c = 0, + h = [], + u = 0; + for (; s !== L;) + if (v(s)) w(s.left, !1), w(s.right, !1), s === s.parent.right && (a -= + s.parent.delta), s = s.parent; + else { + if (!v(s.left)) { + if (l = a + s.maxEnd, l < t) { + w(s, !0); + continue + } + if (s.left !== L) { + s = s.left; + continue + } + } + if (d = a + s.start, d > i) w(s, !0); + else { + if (c = a + s.end, c >= t) { + s.setCachedOffsets(d, c, r); + let e = !0; + n && s.ownerId && s.ownerId !== n && (e = !1), o && C(s) && (e = ! + 1), e && (h[u++] = s) + } + w(s, !0), s.right === L || v(s.right) || (a += s.delta, s = s.right) + } + } + return w(e.root, !1), h + }(this, e, t, i, n, o) + } + search(e, t, i) { + return this.root === L ? [] : function(e, t, i, n) { + let o = e.root, + r = 0, + s = 0, + a = 0, + l = [], + d = 0; + for (; o !== L;) { + if (v(o)) { + w(o.left, !1), w(o.right, !1), o === o.parent.right && (r -= o.parent + .delta), o = o.parent; + continue + } + if (o.left !== L && !v(o.left)) { + o = o.left; + continue + } + s = r + o.start, a = r + o.end, o.setCachedOffsets(s, a, n); + let e = !0; + t && o.ownerId && o.ownerId !== t && (e = !1), i && C(o) && (e = !1), + e && (l[d++] = o), w(o, !0), o.right === L || v(o.right) || (r += + o.delta, o = o.right) + } + return w(e.root, !1), l + }(this, e, t, i) + } + collectNodesFromOwner(e) { + return function(e, t) { + let i = e.root, + n = [], + o = 0; + for (; i !== L;) v(i) ? (w(i.left, !1), w(i.right, !1), i = i.parent) : + i.left === L || v(i.left) ? (i.ownerId === t && (n[o++] = i), w(i, ! + 0), i.right === L || v(i.right) || (i = i.right)) : i = i.left; + return w(e.root, !1), n + }(this, e) + } + collectNodesPostOrder() { + return function(e) { + let t = e.root, + i = [], + n = 0; + for (; t !== L;) v(t) ? (w(t.left, !1), w(t.right, !1), t = t.parent) : + t.left === L || v(t.left) ? t.right === L || v(t.right) ? (i[n++] = + t, w(t, !0)) : t = t.right : t = t.left; + return w(e.root, !1), i + }(this) + } + insert(e) { + I(this, e), this._normalizeDeltaIfNecessary() + } + delete(e) { + T(this, e), this._normalizeDeltaIfNecessary() + } + resolveNode(e, t) { + const i = e; + let n = 0; + for (; e !== this.root;) e === e.parent.right && (n += e.parent.delta), + e = e.parent; + const o = i.start + n, + r = i.end + n; + i.setCachedOffsets(o, r, t) + } + acceptReplace(e, t, i, n) { + const o = function(e, t, i) { + let n = e.root, + o = 0, + r = 0, + s = 0, + a = 0, + l = [], + d = 0; + for (; n !== L;) + if (v(n)) w(n.left, !1), w(n.right, !1), n === n.parent.right && (o -= + n.parent.delta), n = n.parent; + else { + if (!v(n.left)) { + if (r = o + n.maxEnd, r < t) { + w(n, !0); + continue + } + if (n.left !== L) { + n = n.left; + continue + } + } + s = o + n.start, s > i ? w(n, !0) : (a = o + n.end, a >= t && (n.setCachedOffsets( + s, a, 0), l[d++] = n), w(n, !0), n.right === L || v(n.right) || + (o += n.delta, n = n.right)) + } + return w(e.root, !1), l + }(this, e, e + t); + for (let e = 0, t = o.length; e < t; e++) T(this, o[e]); + this._normalizeDeltaIfNecessary(), + function(e, t, i, n) { + let o = e.root, + r = 0, + s = 0, + a = 0; + const l = n - (i - t); + for (; o !== L;) + if (v(o)) w(o.left, !1), w(o.right, !1), o === o.parent.right && (r -= + o.parent.delta), P(o), o = o.parent; + else { + if (!v(o.left)) { + if (s = r + o.maxEnd, s < t) { + w(o, !0); + continue + } + if (o.left !== L) { + o = o.left; + continue + } + } + a = r + o.start, a > i ? (o.start += l, o.end += l, o.delta += l, ( + o.delta < -1073741824 || o.delta > 1073741824) && (e.requestNormalizeDelta = ! + 0), w(o, !0)) : (w(o, !0), o.right === L || v(o.right) || (r += + o.delta, o = o.right)) + } + w(e.root, !1) + }(this, e, e + t, i), this._normalizeDeltaIfNecessary(); + for (let r = 0, s = o.length; r < s; r++) { + const s = o[r]; + s.start = s.cachedAbsoluteStart, s.end = s.cachedAbsoluteEnd, E(s, e, + e + t, i, n), s.maxEnd = s.end, I(this, s) + } + this._normalizeDeltaIfNecessary() + } + _normalizeDeltaIfNecessary() { + this.requestNormalizeDelta && (this.requestNormalizeDelta = !1, + function(e) { + let t = e.root, + i = 0; + for (; t !== L;) t.left === L || v(t.left) ? t.right === L || v(t.right) ? + (t.start = i + t.start, t.end = i + t.end, t.delta = 0, P(t), w(t, ! + 0), w(t.left, !1), w(t.right, !1), t === t.parent.right && (i -= + t.parent.delta), t = t.parent) : (i += t.delta, t = t.right) : t = + t.left; + w(e.root, !1) + }(this)) + } + } + + function D(e, t, i, n) { + return e < i || !(e > i) && 1 !== n && (2 === n || t) + } + + function E(e, t, i, n, o) { + const r = function(e) { + return (24 & e.metadata) >>> 3 + }(e), + s = 0 === r || 2 === r, + a = 1 === r || 2 === r, + l = i - t, + d = n, + c = Math.min(l, d), + h = e.start; + let u = !1; + const g = e.end; + let p = !1; + t <= h && g <= i && function(e) { + return (32 & e.metadata) >>> 5 == 1 + }(e) && (e.start = t, u = !0, e.end = t, p = !0); { + const e = o ? 1 : l > 0 ? 2 : 0; + !u && D(h, s, t, e) && (u = !0), !p && D(g, a, t, e) && (p = !0) + } + if (c > 0 && !o) { + const e = l > d ? 2 : 0; + !u && D(h, s, t + c, e) && (u = !0), !p && D(g, a, t + c, e) && (p = !0) + } { + const n = o ? 1 : 0; + !u && D(h, s, i, n) && (e.start = t + d, u = !0), !p && D(g, a, i, n) && + (e.end = t + d, p = !0) + } + const m = d - l; + u || (e.start = Math.max(0, h + m)), p || (e.end = Math.max(0, g + m)), + e.start > e.end && (e.end = e.start) + } + + function I(e, t) { + if (e.root === L) return t.parent = L, t.left = L, t.right = L, b(t, 0), + e.root = t, e.root; + ! function(e, t) { + let i = 0, + n = e.root; + const o = t.start, + r = t.end; + for (;;) + if (s = o, a = r, l = n.start + i, d = n.end + i, (s === l ? a - d : s - + l) < 0) { + if (n.left === L) { + t.start -= i, t.end -= i, t.maxEnd -= i, n.left = t; + break + } + n = n.left + } else { + if (n.right === L) { + t.start -= i + n.delta, t.end -= i + n.delta, t.maxEnd -= i + n.delta, + n.right = t; + break + } + i += n.delta, n = n.right + } + var s, a, l, d; + t.parent = n, t.left = L, t.right = L, b(t, 1) + }(e, t), F(t.parent); + let i = t; + for (; i !== e.root && 1 === _(i.parent);) + if (i.parent === i.parent.parent.left) { + const t = i.parent.parent.right; + 1 === _(t) ? (b(i.parent, 0), b(t, 0), b(i.parent.parent, 1), i = i.parent + .parent) : (i === i.parent.right && (i = i.parent, A(e, i)), b(i.parent, + 0), b(i.parent.parent, 1), R(e, i.parent.parent)) + } else { + const t = i.parent.parent.left; + 1 === _(t) ? (b(i.parent, 0), b(t, 0), b(i.parent.parent, 1), i = i.parent + .parent) : (i === i.parent.left && (i = i.parent, R(e, i)), b(i.parent, + 0), b(i.parent.parent, 1), A(e, i.parent.parent)) + } + return b(e.root, 0), t + } + + function T(e, t) { + let i, n; + if (t.left === L ? (i = t.right, n = t, i.delta += t.delta, (i.delta < - + 1073741824 || i.delta > 1073741824) && (e.requestNormalizeDelta = !0), + i.start += t.delta, i.end += t.delta) : t.right === L ? (i = t.left, n = + t) : (n = function(e) { + for (; e.left !== L;) e = e.left; + return e + }(t.right), i = n.right, i.start += n.delta, i.end += n.delta, i.delta += + n.delta, (i.delta < -1073741824 || i.delta > 1073741824) && (e.requestNormalizeDelta = ! + 0), n.start += t.delta, n.end += t.delta, n.delta = t.delta, (n.delta < + -1073741824 || n.delta > 1073741824) && (e.requestNormalizeDelta = !0) + ), n === e.root) return e.root = i, b(i, 0), t.detach(), M(), P(i), + void(e.root.parent = L); + let o, r = 1 === _(n); + if (n === n.parent.left ? n.parent.left = i : n.parent.right = i, n === + t ? i.parent = n.parent : (n.parent === t ? i.parent = n : i.parent = n + .parent, n.left = t.left, n.right = t.right, n.parent = t.parent, b(n, + _(t)), t === e.root ? e.root = n : t === t.parent.left ? t.parent.left = + n : t.parent.right = n, n.left !== L && (n.left.parent = n), n.right !== + L && (n.right.parent = n)), t.detach(), r) return F(i.parent), n !== t && + (F(n), F(n.parent)), void M(); + for (F(i), F(i.parent), n !== t && (F(n), F(n.parent)); i !== e.root && + 0 === _(i);) i === i.parent.left ? (o = i.parent.right, 1 === _(o) && ( + b(o, 0), b(i.parent, 1), A(e, i.parent), o = i.parent.right), 0 === _( + o.left) && 0 === _(o.right) ? (b(o, 1), i = i.parent) : (0 === _(o.right) && + (b(o.left, 0), b(o, 1), R(e, o), o = i.parent.right), b(o, _(i.parent)), + b(i.parent, 0), b(o.right, 0), A(e, i.parent), i = e.root)) : (o = i.parent + .left, 1 === _(o) && (b(o, 0), b(i.parent, 1), R(e, i.parent), o = i.parent + .left), 0 === _(o.left) && 0 === _(o.right) ? (b(o, 1), i = i.parent) : + (0 === _(o.left) && (b(o.right, 0), b(o, 1), A(e, o), o = i.parent.left), + b(o, _(i.parent)), b(i.parent, 0), b(o.left, 0), R(e, i.parent), i = + e.root)); + b(i, 0), M() + } + + function M() { + L.parent = L, L.delta = 0, L.start = 0, L.end = 0 + } + + function A(e, t) { + const i = t.right; + i.delta += t.delta, (i.delta < -1073741824 || i.delta > 1073741824) && ( + e.requestNormalizeDelta = !0), i.start += t.delta, i.end += t.delta, t + .right = i.left, i.left !== L && (i.left.parent = t), i.parent = t.parent, + t.parent === L ? e.root = i : t === t.parent.left ? t.parent.left = i : + t.parent.right = i, i.left = t, t.parent = i, P(t), P(i) + } + + function R(e, t) { + const i = t.left; + t.delta -= i.delta, (t.delta < -1073741824 || t.delta > 1073741824) && ( + e.requestNormalizeDelta = !0), t.start -= i.delta, t.end -= i.delta, t + .left = i.right, i.right !== L && (i.right.parent = t), i.parent = t.parent, + t.parent === L ? e.root = i : t === t.parent.right ? t.parent.right = i : + t.parent.left = i, i.right = t, t.parent = i, P(t), P(i) + } + + function O(e) { + let t = e.end; + if (e.left !== L) { + const i = e.left.maxEnd; + i > t && (t = i) + } + if (e.right !== L) { + const i = e.right.maxEnd + e.delta; + i > t && (t = i) + } + return t + } + + function P(e) { + e.maxEnd = O(e) + } + + function F(e) { + for (; e !== L;) { + const t = O(e); + if (e.maxEnd === t) return; + e.maxEnd = t, e = e.parent + } + } + class B { + constructor(e, t) { + this.piece = e, this.color = t, this.size_left = 0, this.lf_left = 0, + this.parent = this, this.left = this, this.right = this + } + next() { + if (this.right !== W) return z(this.right); + let e = this; + for (; e.parent !== W && e.parent.left !== e;) e = e.parent; + return e.parent === W ? W : e.parent + } + prev() { + if (this.left !== W) return V(this.left); + let e = this; + for (; e.parent !== W && e.parent.right !== e;) e = e.parent; + return e.parent === W ? W : e.parent + } + detach() { + this.parent = null, this.left = null, this.right = null + } + } + const W = new B(null, 0); + + function z(e) { + for (; e.left !== W;) e = e.left; + return e + } + + function V(e) { + for (; e.right !== W;) e = e.right; + return e + } + + function H(e) { + return e === W ? 0 : e.size_left + e.piece.length + H(e.right) + } + + function U(e) { + return e === W ? 0 : e.lf_left + e.piece.lineFeedCnt + U(e.right) + } + + function j() { + W.parent = W + } + + function K(e, t) { + let i = t.right; + i.size_left += t.size_left + (t.piece ? t.piece.length : 0), i.lf_left += + t.lf_left + (t.piece ? t.piece.lineFeedCnt : 0), t.right = i.left, i.left !== + W && (i.left.parent = t), i.parent = t.parent, t.parent === W ? e.root = + i : t.parent.left === t ? t.parent.left = i : t.parent.right = i, i.left = + t, t.parent = i + } + + function $(e, t) { + let i = t.left; + t.left = i.right, i.right !== W && (i.right.parent = t), i.parent = t.parent, + t.size_left -= i.size_left + (i.piece ? i.piece.length : 0), t.lf_left -= + i.lf_left + (i.piece ? i.piece.lineFeedCnt : 0), t.parent === W ? e.root = + i : t === t.parent.right ? t.parent.right = i : t.parent.left = i, i.right = + t, t.parent = i + } + + function q(e, t) { + let i, n; + if (t.left === W ? (n = t, i = n.right) : t.right === W ? (n = t, i = n.left) : + (n = z(t.right), i = n.right), n === e.root) return e.root = i, i.color = + 0, t.detach(), j(), void(e.root.parent = W); + let o, r = 1 === n.color; + if (n === n.parent.left ? n.parent.left = i : n.parent.right = i, n === + t ? (i.parent = n.parent, Y(e, i)) : (n.parent === t ? i.parent = n : i + .parent = n.parent, Y(e, i), n.left = t.left, n.right = t.right, n.parent = + t.parent, n.color = t.color, t === e.root ? e.root = n : t === t.parent + .left ? t.parent.left = n : t.parent.right = n, n.left !== W && (n.left + .parent = n), n.right !== W && (n.right.parent = n), n.size_left = t.size_left, + n.lf_left = t.lf_left, Y(e, n)), t.detach(), i.parent.left === i) { + let t = H(i), + n = U(i); + if (t !== i.parent.size_left || n !== i.parent.lf_left) { + let o = t - i.parent.size_left, + r = n - i.parent.lf_left; + i.parent.size_left = t, i.parent.lf_left = n, G(e, i.parent, o, r) + } + } + if (Y(e, i.parent), r) j(); + else { + for (; i !== e.root && 0 === i.color;) i === i.parent.left ? (o = i.parent + .right, 1 === o.color && (o.color = 0, i.parent.color = 1, K(e, i.parent), + o = i.parent.right), 0 === o.left.color && 0 === o.right.color ? (o.color = + 1, i = i.parent) : (0 === o.right.color && (o.left.color = 0, o.color = + 1, $(e, o), o = i.parent.right), o.color = i.parent.color, i.parent + .color = 0, o.right.color = 0, K(e, i.parent), i = e.root)) : (o = i + .parent.left, 1 === o.color && (o.color = 0, i.parent.color = 1, $(e, + i.parent), o = i.parent.left), 0 === o.left.color && 0 === o.right.color ? + (o.color = 1, i = i.parent) : (0 === o.left.color && (o.right.color = + 0, o.color = 1, K(e, o), o = i.parent.left), o.color = i.parent.color, + i.parent.color = 0, o.left.color = 0, $(e, i.parent), i = e.root)); + i.color = 0, j() + } + } + + function Z(e, t) { + for (Y(e, t); t !== e.root && 1 === t.parent.color;) + if (t.parent === t.parent.parent.left) { + const i = t.parent.parent.right; + 1 === i.color ? (t.parent.color = 0, i.color = 0, t.parent.parent.color = + 1, t = t.parent.parent) : (t === t.parent.right && K(e, t = t.parent), + t.parent.color = 0, t.parent.parent.color = 1, $(e, t.parent.parent) + ) + } else { + const i = t.parent.parent.left; + 1 === i.color ? (t.parent.color = 0, i.color = 0, t.parent.parent.color = + 1, t = t.parent.parent) : (t === t.parent.left && $(e, t = t.parent), + t.parent.color = 0, t.parent.parent.color = 1, K(e, t.parent.parent) + ) + } + e.root.color = 0 + } + + function G(e, t, i, n) { + for (; t !== e.root && t !== W;) t.parent.left === t && (t.parent.size_left += + i, t.parent.lf_left += n), t = t.parent + } + + function Y(e, t) { + let i = 0, + n = 0; + if (t !== e.root) { + if (0 === i) { + for (; t !== e.root && t === t.parent.right;) t = t.parent; + if (t === e.root) return; + i = H((t = t.parent).left) - t.size_left, n = U(t.left) - t.lf_left, t + .size_left += i, t.lf_left += n + } + for (; t !== e.root && (0 !== i || 0 !== n);) t.parent.left === t && (t + .parent.size_left += i, t.parent.lf_left += n), t = t.parent + } + } + W.parent = W, W.left = W, W.right = W, W.color = 0; + var Q = i(7277); + const X = 65535; + + function J(e) { + let t; + return t = e[e.length - 1] < 65536 ? new Uint16Array(e.length) : new Uint32Array( + e.length), t.set(e, 0), t + } + class ee { + constructor(e, t, i, n, o) { + this.lineStarts = e, this.cr = t, this.lf = i, this.crlf = n, this.isBasicASCII = + o + } + } + + function te(e, t = !0) { + let i = [0], + n = 1; + for (let t = 0, o = e.length; t < o; t++) { + const r = e.charCodeAt(t); + 13 === r ? t + 1 < o && 10 === e.charCodeAt(t + 1) ? (i[n++] = t + 2, t++) : + i[n++] = t + 1 : 10 === r && (i[n++] = t + 1) + } + return t ? J(i) : i + } + class ie { + constructor(e, t, i, n, o) { + this.bufferIndex = e, this.start = t, this.end = i, this.lineFeedCnt = + n, this.length = o + } + } + class ne { + constructor(e, t) { + this.buffer = e, this.lineStarts = t + } + } + class oe { + constructor(e, t) { + this._pieces = [], this._tree = e, this._BOM = t, this._index = 0, e.root !== + W && e.iterate(e.root, (e => (e !== W && this._pieces.push(e.piece), ! + 0))) + } + read() { + return 0 === this._pieces.length ? 0 === this._index ? (this._index++, + this._BOM) : null : this._index > this._pieces.length - 1 ? null : 0 === + this._index ? this._BOM + this._tree.getPieceContent(this._pieces[ + this._index++]) : this._tree.getPieceContent(this._pieces[this._index++]) + } + } + class re { + constructor(e) { + this._limit = e, this._cache = [] + } + get(e) { + for (let t = this._cache.length - 1; t >= 0; t--) { + let i = this._cache[t]; + if (i.nodeStartOffset <= e && i.nodeStartOffset + i.node.piece.length >= + e) return i + } + return null + } + get2(e) { + for (let t = this._cache.length - 1; t >= 0; t--) { + let i = this._cache[t]; + if (i.nodeStartLineNumber && i.nodeStartLineNumber < e && i.nodeStartLineNumber + + i.node.piece.lineFeedCnt >= e) return i + } + return null + } + set(e) { + this._cache.length >= this._limit && this._cache.shift(), this._cache.push( + e) + } + validate(e) { + let t = !1, + i = this._cache; + for (let n = 0; n < i.length; n++) { + let o = i[n]; + (null === o.node.parent || o.nodeStartOffset >= e) && (i[n] = null, t = ! + 0) + } + if (t) { + let e = []; + for (const t of i) null !== t && e.push(t); + this._cache = e + } + } + } + class se { + constructor(e, t, i) { + this.create(e, t, i) + } + create(e, t, i) { + this._buffers = [new ne("", [0])], this._lastChangeBufferPos = { + line: 0, + column: 0 + }, this.root = W, this._lineCnt = 1, this._length = 0, this._EOL = t, + this._EOLLength = t.length, this._EOLNormalized = i; + let n = null; + for (let t = 0, i = e.length; t < i; t++) + if (e[t].buffer.length > 0) { + e[t].lineStarts || (e[t].lineStarts = te(e[t].buffer)); + let i = new ie(t + 1, { + line: 0, + column: 0 + }, { + line: e[t].lineStarts.length - 1, + column: e[t].buffer.length - e[t].lineStarts[e[t].lineStarts.length - + 1] + }, e[t].lineStarts.length - 1, e[t].buffer.length); + this._buffers.push(e[t]), n = this.rbInsertRight(n, i) + } + this._searchCache = new re(1), this._lastVisitedLine = { + lineNumber: 0, + value: "" + }, this.computeBufferMetadata() + } + normalizeEOL(e) { + let t = 65535 - Math.floor(21845), + i = 2 * t, + n = "", + o = 0, + r = []; + if (this.iterate(this.root, (s => { + let a = this.getNodeContent(s), + l = a.length; + if (o <= t || o + l < i) return n += a, o += l, !0; + let d = n.replace(/\r\n|\r|\n/g, e); + return r.push(new ne(d, te(d))), n = a, o = l, !0 + })), o > 0) { + let t = n.replace(/\r\n|\r|\n/g, e); + r.push(new ne(t, te(t))) + } + this.create(r, e, !0) + } + getEOL() { + return this._EOL + } + setEOL(e) { + this._EOL = e, this._EOLLength = this._EOL.length, this.normalizeEOL(e) + } + createSnapshot(e) { + return new oe(this, e) + } + getOffsetAt(e, t) { + let i = 0, + n = this.root; + for (; n !== W;) + if (n.left !== W && n.lf_left + 1 >= e) n = n.left; + else { + if (n.lf_left + n.piece.lineFeedCnt + 1 >= e) return i += n.size_left, + i + (this.getAccumulatedValue(n, e - n.lf_left - 2) + t - 1); + e -= n.lf_left + n.piece.lineFeedCnt, i += n.size_left + n.piece.length, + n = n.right + } + return i + } + getPositionAt(e) { + e = Math.floor(e), e = Math.max(0, e); + let t = this.root, + i = 0, + n = e; + for (; t !== W;) + if (0 !== t.size_left && t.size_left >= e) t = t.left; + else { + if (t.size_left + t.piece.length >= e) { + let o = this.getIndexOf(t, e - t.size_left); + if (i += t.lf_left + o.index, 0 === o.index) { + let e = n - this.getOffsetAt(i + 1, 1); + return new d.L(i + 1, e + 1) + } + return new d.L(i + 1, o.remainder + 1) + } + if (e -= t.size_left + t.piece.length, i += t.lf_left + t.piece.lineFeedCnt, + t.right === W) { + let t = n - e - this.getOffsetAt(i + 1, 1); + return new d.L(i + 1, t + 1) + } + t = t.right + } + return new d.L(1, 1) + } + getValueInRange(e, t) { + if (e.startLineNumber === e.endLineNumber && e.startColumn === e.endColumn) + return ""; + let i = this.nodeAt2(e.startLineNumber, e.startColumn), + n = this.nodeAt2(e.endLineNumber, e.endColumn), + o = this.getValueInRange2(i, n); + return t ? t === this._EOL && this._EOLNormalized && t === this.getEOL() && + this._EOLNormalized ? o : o.replace(/\r\n|\r|\n/g, t) : o + } + getValueInRange2(e, t) { + if (e.node === t.node) { + let i = e.node, + n = this._buffers[i.piece.bufferIndex].buffer, + o = this.offsetInBuffer(i.piece.bufferIndex, i.piece.start); + return n.substring(o + e.remainder, o + t.remainder) + } + let i = e.node, + n = this._buffers[i.piece.bufferIndex].buffer, + o = this.offsetInBuffer(i.piece.bufferIndex, i.piece.start), + r = n.substring(o + e.remainder, o + i.piece.length); + for (i = i.next(); i !== W;) { + let e = this._buffers[i.piece.bufferIndex].buffer, + n = this.offsetInBuffer(i.piece.bufferIndex, i.piece.start); + if (i === t.node) { + r += e.substring(n, n + t.remainder); + break + } + r += e.substr(n, i.piece.length), i = i.next() + } + return r + } + getLinesContent() { + let e = [], + t = 0, + i = "", + n = !1; + return this.iterate(this.root, (o => { + if (o === W) return !0; + const r = o.piece; + let s = r.length; + if (0 === s) return !0; + const a = this._buffers[r.bufferIndex].buffer, + l = this._buffers[r.bufferIndex].lineStarts, + d = r.start.line, + c = r.end.line; + let h = l[d] + r.start.column; + if (n && (10 === a.charCodeAt(h) && (h++, s--), e[t++] = i, i = "", + n = !1, 0 === s)) return !0; + if (d === c) return this._EOLNormalized || 13 !== a.charCodeAt(h + + s - 1) ? i += a.substr(h, s) : (n = !0, i += a.substr(h, s - 1)), ! + 0; + i += this._EOLNormalized ? a.substring(h, Math.max(h, l[d + 1] - + this._EOLLength)) : a.substring(h, l[d + 1]).replace( + /(\r\n|\r|\n)$/, ""), e[t++] = i; + for (let n = d + 1; n < c; n++) i = this._EOLNormalized ? a.substring( + l[n], l[n + 1] - this._EOLLength) : a.substring(l[n], l[n + 1]).replace( + /(\r\n|\r|\n)$/, ""), e[t++] = i; + return this._EOLNormalized || 13 !== a.charCodeAt(l[c] + r.end.column - + 1) ? i = a.substr(l[c], r.end.column) : (n = !0, 0 === r.end.column ? + t-- : i = a.substr(l[c], r.end.column - 1)), !0 + })), n && (e[t++] = i, i = ""), e[t++] = i, e + } + getLength() { + return this._length + } + getLineCount() { + return this._lineCnt + } + getLineContent(e) { + return this._lastVisitedLine.lineNumber === e || (this._lastVisitedLine + .lineNumber = e, e === this._lineCnt ? this._lastVisitedLine.value = + this.getLineRawContent(e) : this._EOLNormalized ? this._lastVisitedLine + .value = this.getLineRawContent(e, this._EOLLength) : this._lastVisitedLine + .value = this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/, "")), + this._lastVisitedLine.value + } + _getCharCode(e) { + if (e.remainder === e.node.piece.length) { + let t = e.node.next(); + if (!t) return 0; + let i = this._buffers[t.piece.bufferIndex], + n = this.offsetInBuffer(t.piece.bufferIndex, t.piece.start); + return i.buffer.charCodeAt(n) + } { + let t = this._buffers[e.node.piece.bufferIndex], + i = this.offsetInBuffer(e.node.piece.bufferIndex, e.node.piece.start) + + e.remainder; + return t.buffer.charCodeAt(i) + } + } + getLineCharCode(e, t) { + let i = this.nodeAt2(e, t + 1); + return this._getCharCode(i) + } + getLineLength(e) { + if (e === this.getLineCount()) { + let t = this.getOffsetAt(e, 1); + return this.getLength() - t + } + return this.getOffsetAt(e + 1, 1) - this.getOffsetAt(e, 1) - this._EOLLength + } + findMatchesInNode(e, t, i, n, o, r, s, a, l, d, h) { + let u, g, p, m = this._buffers[e.piece.bufferIndex], + f = this.offsetInBuffer(e.piece.bufferIndex, e.piece.start), + _ = this.offsetInBuffer(e.piece.bufferIndex, o), + b = this.offsetInBuffer(e.piece.bufferIndex, r), + v = { + line: 0, + column: 0 + }; + t._wordSeparators ? (g = m.buffer.substring(_, b), p = e => e + _, t.reset( + 0)) : (g = m.buffer, p = e => e, t.reset(_)); + do { + if (u = t.next(g), u) { + if (p(u.index) >= b) return d; + this.positionInBuffer(e, p(u.index) - f, v); + let t = this.getLineFeedCnt(e.piece.bufferIndex, o, v), + r = v.line === o.line ? v.column - o.column + n : v.column + 1, + s = r + u[0].length; + if (h[d++] = (0, Q.iE)(new c.e(i + t, r, i + t, s), u, a), p(u.index) + + u[0].length >= b) return d; + if (d >= l) return d + } + } while (u); + return d + } + findMatchesLineByLine(e, t, i, n) { + const o = []; + let r = 0; + const s = new Q.sz(t.wordSeparators, t.regex); + let a = this.nodeAt2(e.startLineNumber, e.startColumn); + if (null === a) return []; + let l = this.nodeAt2(e.endLineNumber, e.endColumn); + if (null === l) return []; + let d = this.positionInBuffer(a.node, a.remainder), + c = this.positionInBuffer(l.node, l.remainder); + if (a.node === l.node) return this.findMatchesInNode(a.node, s, e.startLineNumber, + e.startColumn, d, c, t, i, n, r, o), o; + let h = e.startLineNumber, + u = a.node; + for (; u !== l.node;) { + let l = this.getLineFeedCnt(u.piece.bufferIndex, d, u.piece.end); + if (l >= 1) { + let a = this._buffers[u.piece.bufferIndex].lineStarts, + c = this.offsetInBuffer(u.piece.bufferIndex, u.piece.start), + g = a[d.line + l], + p = h === e.startLineNumber ? e.startColumn : 1; + if (r = this.findMatchesInNode(u, s, h, p, d, this.positionInBuffer( + u, g - c), t, i, n, r, o), r >= n) return o; + h += l + } + let c = h === e.startLineNumber ? e.startColumn - 1 : 0; + if (h === e.endLineNumber) { + const a = this.getLineContent(h).substring(c, e.endColumn - 1); + return r = this._findMatchesInLine(t, s, a, e.endLineNumber, c, r, o, + i, n), o + } + if (r = this._findMatchesInLine(t, s, this.getLineContent(h).substr(c), + h, c, r, o, i, n), r >= n) return o; + h++, a = this.nodeAt2(h, 1), u = a.node, d = this.positionInBuffer(a.node, + a.remainder) + } + if (h === e.endLineNumber) { + let a = h === e.startLineNumber ? e.startColumn - 1 : 0; + const l = this.getLineContent(h).substring(a, e.endColumn - 1); + return r = this._findMatchesInLine(t, s, l, e.endLineNumber, a, r, o, + i, n), o + } + let g = h === e.startLineNumber ? e.startColumn : 1; + return r = this.findMatchesInNode(l.node, s, h, g, d, c, t, i, n, r, o), + o + } + _findMatchesInLine(e, t, i, n, o, r, s, a, l) { + const d = e.wordSeparators; + if (!a && e.simpleSearch) { + const t = e.simpleSearch, + a = t.length, + h = i.length; + let g = -a; + for (; - 1 !== (g = i.indexOf(t, g + a));) + if ((!d || (0, Q.cM)(d, i, h, g, a)) && (s[r++] = new u.tk(new c.e(n, + g + 1 + o, n, g + 1 + a + o), null), r >= l)) return r; + return r + } + let h; + t.reset(0); + do { + if (h = t.next(i), h && (s[r++] = (0, Q.iE)(new c.e(n, h.index + 1 + + o, n, h.index + 1 + h[0].length + o), h, a), r >= l)) return r + } while (h); + return r + } + insert(e, t, i = !1) { + if (this._EOLNormalized = this._EOLNormalized && i, this._lastVisitedLine + .lineNumber = 0, this._lastVisitedLine.value = "", this.root !== W) { + let { + node: i, + remainder: n, + nodeStartOffset: o + } = this.nodeAt(e), r = i.piece, s = r.bufferIndex, a = this.positionInBuffer( + i, n); + if (0 === i.piece.bufferIndex && r.end.line === this._lastChangeBufferPos + .line && r.end.column === this._lastChangeBufferPos.column && o + r.length === + e && t.length < X) return this.appendToNode(i, t), void this.computeBufferMetadata(); + if (o === e) this.insertContentToNodeLeft(t, i), this._searchCache.validate( + e); + else if (o + i.piece.length > e) { + let e = [], + o = new ie(r.bufferIndex, a, r.end, this.getLineFeedCnt(r.bufferIndex, + a, r.end), this.offsetInBuffer(s, r.end) - this.offsetInBuffer(s, + a)); + if (this.shouldCheckCRLF() && this.endWithCR(t) && 10 === this.nodeCharCodeAt( + i, n)) { + let e = { + line: o.start.line + 1, + column: 0 + }; + o = new ie(o.bufferIndex, e, o.end, this.getLineFeedCnt(o.bufferIndex, + e, o.end), o.length - 1), t += "\n" + } + if (this.shouldCheckCRLF() && this.startWithLF(t)) + if (13 === this.nodeCharCodeAt(i, n - 1)) { + let o = this.positionInBuffer(i, n - 1); + this.deleteNodeTail(i, o), t = "\r" + t, 0 === i.piece.length && e + .push(i) + } else this.deleteNodeTail(i, a); + else this.deleteNodeTail(i, a); + let l = this.createNewPieces(t); + o.length > 0 && this.rbInsertRight(i, o); + let d = i; + for (let e = 0; e < l.length; e++) d = this.rbInsertRight(d, l[e]); + this.deleteNodes(e) + } else this.insertContentToNodeRight(t, i) + } else { + let e = this.createNewPieces(t), + i = this.rbInsertLeft(null, e[0]); + for (let t = 1; t < e.length; t++) i = this.rbInsertRight(i, e[t]) + } + this.computeBufferMetadata() + } + delete(e, t) { + if (this._lastVisitedLine.lineNumber = 0, this._lastVisitedLine.value = + "", t <= 0 || this.root === W) return; + let i = this.nodeAt(e), + n = this.nodeAt(e + t), + o = i.node, + r = n.node; + if (o === r) { + let r = this.positionInBuffer(o, i.remainder), + s = this.positionInBuffer(o, n.remainder); + if (i.nodeStartOffset === e) { + if (t === o.piece.length) { + let e = o.next(); + return q(this, o), this.validateCRLFWithPrevNode(e), void this.computeBufferMetadata() + } + return this.deleteNodeHead(o, s), this._searchCache.validate(e), + this.validateCRLFWithPrevNode(o), void this.computeBufferMetadata() + } + return i.nodeStartOffset + o.piece.length === e + t ? (this.deleteNodeTail( + o, r), this.validateCRLFWithNextNode(o), void this.computeBufferMetadata()) : + (this.shrinkNode(o, r, s), void this.computeBufferMetadata()) + } + let s = [], + a = this.positionInBuffer(o, i.remainder); + this.deleteNodeTail(o, a), this._searchCache.validate(e), 0 === o.piece + .length && s.push(o); + let l = this.positionInBuffer(r, n.remainder); + this.deleteNodeHead(r, l), 0 === r.piece.length && s.push(r); + for (let e = o.next(); e !== W && e !== r; e = e.next()) s.push(e); + let d = 0 === o.piece.length ? o.prev() : o; + this.deleteNodes(s), this.validateCRLFWithNextNode(d), this.computeBufferMetadata() + } + insertContentToNodeLeft(e, t) { + let i = []; + if (this.shouldCheckCRLF() && this.endWithCR(e) && this.startWithLF(t)) { + let n = t.piece, + o = { + line: n.start.line + 1, + column: 0 + }, + r = new ie(n.bufferIndex, o, n.end, this.getLineFeedCnt(n.bufferIndex, + o, n.end), n.length - 1); + t.piece = r, e += "\n", G(this, t, -1, -1), 0 === t.piece.length && i + .push(t) + } + let n = this.createNewPieces(e), + o = this.rbInsertLeft(t, n[n.length - 1]); + for (let e = n.length - 2; e >= 0; e--) o = this.rbInsertLeft(o, n[e]); + this.validateCRLFWithPrevNode(o), this.deleteNodes(i) + } + insertContentToNodeRight(e, t) { + this.adjustCarriageReturnFromNext(e, t) && (e += "\n"); + let i = this.createNewPieces(e), + n = this.rbInsertRight(t, i[0]), + o = n; + for (let e = 1; e < i.length; e++) o = this.rbInsertRight(o, i[e]); + this.validateCRLFWithPrevNode(n) + } + positionInBuffer(e, t, i) { + let n = e.piece, + o = e.piece.bufferIndex, + r = this._buffers[o].lineStarts, + s = r[n.start.line] + n.start.column + t, + a = n.start.line, + l = n.end.line, + d = 0, + c = 0, + h = 0; + for (; a <= l && (d = a + (l - a) / 2 | 0, h = r[d], d !== l);) + if (c = r[d + 1], s < h) l = d - 1; + else { + if (!(s >= c)) break; + a = d + 1 + } + return i ? (i.line = d, i.column = s - h, null) : { + line: d, + column: s - h + } + } + getLineFeedCnt(e, t, i) { + if (0 === i.column) return i.line - t.line; + let n = this._buffers[e].lineStarts; + if (i.line === n.length - 1) return i.line - t.line; + let o = n[i.line + 1], + r = n[i.line] + i.column; + if (o > r + 1) return i.line - t.line; + let s = r - 1; + return 13 === this._buffers[e].buffer.charCodeAt(s) ? i.line - t.line + + 1 : i.line - t.line + } + offsetInBuffer(e, t) { + return this._buffers[e].lineStarts[t.line] + t.column + } + deleteNodes(e) { + for (let t = 0; t < e.length; t++) q(this, e[t]) + } + createNewPieces(e) { + if (e.length > X) { + let t = []; + for (; e.length > X;) { + const i = e.charCodeAt(65534); + let n; + 13 === i || i >= 55296 && i <= 56319 ? (n = e.substring(0, 65534), e = + e.substring(65534)) : (n = e.substring(0, X), e = e.substring(X)); + let o = te(n); + t.push(new ie(this._buffers.length, { + line: 0, + column: 0 + }, { + line: o.length - 1, + column: n.length - o[o.length - 1] + }, o.length - 1, n.length)), this._buffers.push(new ne(n, o)) + } + let i = te(e); + return t.push(new ie(this._buffers.length, { + line: 0, + column: 0 + }, { + line: i.length - 1, + column: e.length - i[i.length - 1] + }, i.length - 1, e.length)), this._buffers.push(new ne(e, i)), t + } + let t = this._buffers[0].buffer.length; + const i = te(e, !1); + let n = this._lastChangeBufferPos; + if (this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 1] === + t && 0 !== t && this.startWithLF(e) && this.endWithCR(this._buffers[0] + .buffer)) { + this._lastChangeBufferPos = { + line: this._lastChangeBufferPos.line, + column: this._lastChangeBufferPos.column + 1 + }, n = this._lastChangeBufferPos; + for (let e = 0; e < i.length; e++) i[e] += t + 1; + this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(i.slice( + 1)), this._buffers[0].buffer += "_" + e, t += 1 + } else { + if (0 !== t) + for (let e = 0; e < i.length; e++) i[e] += t; + this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(i.slice( + 1)), this._buffers[0].buffer += e + } + const o = this._buffers[0].buffer.length; + let r = this._buffers[0].lineStarts.length - 1, + s = { + line: r, + column: o - this._buffers[0].lineStarts[r] + }, + a = new ie(0, n, s, this.getLineFeedCnt(0, n, s), o - t); + return this._lastChangeBufferPos = s, [a] + } + getLineRawContent(e, t = 0) { + let i = this.root, + n = "", + o = this._searchCache.get2(e); + if (o) { + i = o.node; + let r = this.getAccumulatedValue(i, e - o.nodeStartLineNumber - 1), + s = this._buffers[i.piece.bufferIndex].buffer, + a = this.offsetInBuffer(i.piece.bufferIndex, i.piece.start); + if (o.nodeStartLineNumber + i.piece.lineFeedCnt !== e) { + let n = this.getAccumulatedValue(i, e - o.nodeStartLineNumber); + return s.substring(a + r, a + n - t) + } + n = s.substring(a + r, a + i.piece.length) + } else { + let o = 0; + const r = e; + for (; i !== W;) + if (i.left !== W && i.lf_left >= e - 1) i = i.left; + else { + if (i.lf_left + i.piece.lineFeedCnt > e - 1) { + let n = this.getAccumulatedValue(i, e - i.lf_left - 2), + s = this.getAccumulatedValue(i, e - i.lf_left - 1), + a = this._buffers[i.piece.bufferIndex].buffer, + l = this.offsetInBuffer(i.piece.bufferIndex, i.piece.start); + return o += i.size_left, this._searchCache.set({ + node: i, + nodeStartOffset: o, + nodeStartLineNumber: r - (e - 1 - i.lf_left) + }), a.substring(l + n, l + s - t) + } + if (i.lf_left + i.piece.lineFeedCnt === e - 1) { + let t = this.getAccumulatedValue(i, e - i.lf_left - 2), + o = this._buffers[i.piece.bufferIndex].buffer, + r = this.offsetInBuffer(i.piece.bufferIndex, i.piece.start); + n = o.substring(r + t, r + i.piece.length); + break + } + e -= i.lf_left + i.piece.lineFeedCnt, o += i.size_left + i.piece.length, + i = i.right + } + } + for (i = i.next(); i !== W;) { + let e = this._buffers[i.piece.bufferIndex].buffer; + if (i.piece.lineFeedCnt > 0) { + let o = this.getAccumulatedValue(i, 0), + r = this.offsetInBuffer(i.piece.bufferIndex, i.piece.start); + return n += e.substring(r, r + o - t), n + } { + let t = this.offsetInBuffer(i.piece.bufferIndex, i.piece.start); + n += e.substr(t, i.piece.length) + } + i = i.next() + } + return n + } + computeBufferMetadata() { + let e = this.root, + t = 1, + i = 0; + for (; e !== W;) t += e.lf_left + e.piece.lineFeedCnt, i += e.size_left + + e.piece.length, e = e.right; + this._lineCnt = t, this._length = i, this._searchCache.validate(this._length) + } + getIndexOf(e, t) { + let i = e.piece, + n = this.positionInBuffer(e, t), + o = n.line - i.start.line; + if (this.offsetInBuffer(i.bufferIndex, i.end) - this.offsetInBuffer(i.bufferIndex, + i.start) === t) { + let t = this.getLineFeedCnt(e.piece.bufferIndex, i.start, n); + if (t !== o) return { + index: t, + remainder: 0 + } + } + return { + index: o, + remainder: n.column + } + } + getAccumulatedValue(e, t) { + if (t < 0) return 0; + let i = e.piece, + n = this._buffers[i.bufferIndex].lineStarts, + o = i.start.line + t + 1; + return o > i.end.line ? n[i.end.line] + i.end.column - n[i.start.line] - + i.start.column : n[o] - n[i.start.line] - i.start.column + } + deleteNodeTail(e, t) { + const i = e.piece, + n = i.lineFeedCnt, + o = this.offsetInBuffer(i.bufferIndex, i.end), + r = t, + s = this.offsetInBuffer(i.bufferIndex, r), + a = this.getLineFeedCnt(i.bufferIndex, i.start, r), + l = a - n, + d = s - o, + c = i.length + d; + e.piece = new ie(i.bufferIndex, i.start, r, a, c), G(this, e, d, l) + } + deleteNodeHead(e, t) { + const i = e.piece, + n = i.lineFeedCnt, + o = this.offsetInBuffer(i.bufferIndex, i.start), + r = t, + s = this.getLineFeedCnt(i.bufferIndex, r, i.end), + a = s - n, + l = o - this.offsetInBuffer(i.bufferIndex, r), + d = i.length + l; + e.piece = new ie(i.bufferIndex, r, i.end, s, d), G(this, e, l, a) + } + shrinkNode(e, t, i) { + const n = e.piece, + o = n.start, + r = n.end, + s = n.length, + a = n.lineFeedCnt, + l = t, + d = this.getLineFeedCnt(n.bufferIndex, n.start, l), + c = this.offsetInBuffer(n.bufferIndex, t) - this.offsetInBuffer(n.bufferIndex, + o); + e.piece = new ie(n.bufferIndex, n.start, l, d, c), G(this, e, c - s, d - + a); + let h = new ie(n.bufferIndex, i, r, this.getLineFeedCnt(n.bufferIndex, + i, r), this.offsetInBuffer(n.bufferIndex, r) - this.offsetInBuffer( + n.bufferIndex, i)), + u = this.rbInsertRight(e, h); + this.validateCRLFWithPrevNode(u) + } + appendToNode(e, t) { + this.adjustCarriageReturnFromNext(t, e) && (t += "\n"); + const i = this.shouldCheckCRLF() && this.startWithLF(t) && this.endWithCR( + e), + n = this._buffers[0].buffer.length; + this._buffers[0].buffer += t; + const o = te(t, !1); + for (let e = 0; e < o.length; e++) o[e] += n; + if (i) { + let e = this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - + 2]; + this._buffers[0].lineStarts.pop(), this._lastChangeBufferPos = { + line: this._lastChangeBufferPos.line - 1, + column: n - e + } + } + this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(o.slice( + 1)); + const r = this._buffers[0].lineStarts.length - 1, + s = { + line: r, + column: this._buffers[0].buffer.length - this._buffers[0].lineStarts[ + r] + }, + a = e.piece.length + t.length, + l = e.piece.lineFeedCnt, + d = this.getLineFeedCnt(0, e.piece.start, s), + c = d - l; + e.piece = new ie(e.piece.bufferIndex, e.piece.start, s, d, a), this._lastChangeBufferPos = + s, G(this, e, t.length, c) + } + nodeAt(e) { + let t = this.root, + i = this._searchCache.get(e); + if (i) return { + node: i.node, + nodeStartOffset: i.nodeStartOffset, + remainder: e - i.nodeStartOffset + }; + let n = 0; + for (; t !== W;) + if (t.size_left > e) t = t.left; + else { + if (t.size_left + t.piece.length >= e) { + n += t.size_left; + let i = { + node: t, + remainder: e - t.size_left, + nodeStartOffset: n + }; + return this._searchCache.set(i), i + } + e -= t.size_left + t.piece.length, n += t.size_left + t.piece.length, + t = t.right + } + return null + } + nodeAt2(e, t) { + let i = this.root, + n = 0; + for (; i !== W;) + if (i.left !== W && i.lf_left >= e - 1) i = i.left; + else { + if (i.lf_left + i.piece.lineFeedCnt > e - 1) { + let o = this.getAccumulatedValue(i, e - i.lf_left - 2), + r = this.getAccumulatedValue(i, e - i.lf_left - 1); + return n += i.size_left, { + node: i, + remainder: Math.min(o + t - 1, r), + nodeStartOffset: n + } + } + if (i.lf_left + i.piece.lineFeedCnt === e - 1) { + let o = this.getAccumulatedValue(i, e - i.lf_left - 2); + if (o + t - 1 <= i.piece.length) return { + node: i, + remainder: o + t - 1, + nodeStartOffset: n + }; + t -= i.piece.length - o; + break + } + e -= i.lf_left + i.piece.lineFeedCnt, n += i.size_left + i.piece.length, + i = i.right + } + for (i = i.next(); i !== W;) { + if (i.piece.lineFeedCnt > 0) { + let e = this.getAccumulatedValue(i, 0), + n = this.offsetOfNode(i); + return { + node: i, + remainder: Math.min(t - 1, e), + nodeStartOffset: n + } + } + if (i.piece.length >= t - 1) return { + node: i, + remainder: t - 1, + nodeStartOffset: this.offsetOfNode(i) + }; + t -= i.piece.length, i = i.next() + } + return null + } + nodeCharCodeAt(e, t) { + if (e.piece.lineFeedCnt < 1) return -1; + let i = this._buffers[e.piece.bufferIndex], + n = this.offsetInBuffer(e.piece.bufferIndex, e.piece.start) + t; + return i.buffer.charCodeAt(n) + } + offsetOfNode(e) { + if (!e) return 0; + let t = e.size_left; + for (; e !== this.root;) e.parent.right === e && (t += e.parent.size_left + + e.parent.piece.length), e = e.parent; + return t + } + shouldCheckCRLF() { + return !(this._EOLNormalized && "\n" === this._EOL) + } + startWithLF(e) { + if ("string" == typeof e) return 10 === e.charCodeAt(0); + if (e === W || 0 === e.piece.lineFeedCnt) return !1; + let t = e.piece, + i = this._buffers[t.bufferIndex].lineStarts, + n = t.start.line, + o = i[n] + t.start.column; + return n !== i.length - 1 && !(i[n + 1] > o + 1) && 10 === this._buffers[ + t.bufferIndex].buffer.charCodeAt(o) + } + endWithCR(e) { + return "string" == typeof e ? 13 === e.charCodeAt(e.length - 1) : e !== + W && 0 !== e.piece.lineFeedCnt && 13 === this.nodeCharCodeAt(e, e.piece + .length - 1) + } + validateCRLFWithPrevNode(e) { + if (this.shouldCheckCRLF() && this.startWithLF(e)) { + let t = e.prev(); + this.endWithCR(t) && this.fixCRLF(t, e) + } + } + validateCRLFWithNextNode(e) { + if (this.shouldCheckCRLF() && this.endWithCR(e)) { + let t = e.next(); + this.startWithLF(t) && this.fixCRLF(e, t) + } + } + fixCRLF(e, t) { + let i, n = [], + o = this._buffers[e.piece.bufferIndex].lineStarts; + i = 0 === e.piece.end.column ? { + line: e.piece.end.line - 1, + column: o[e.piece.end.line] - o[e.piece.end.line - 1] - 1 + } : { + line: e.piece.end.line, + column: e.piece.end.column - 1 + }; + const r = e.piece.length - 1, + s = e.piece.lineFeedCnt - 1; + e.piece = new ie(e.piece.bufferIndex, e.piece.start, i, s, r), G(this, + e, -1, -1), 0 === e.piece.length && n.push(e); + let a = { + line: t.piece.start.line + 1, + column: 0 + }; + const l = t.piece.length - 1, + d = this.getLineFeedCnt(t.piece.bufferIndex, a, t.piece.end); + t.piece = new ie(t.piece.bufferIndex, a, t.piece.end, d, l), G(this, t, - + 1, -1), 0 === t.piece.length && n.push(t); + let c = this.createNewPieces("\r\n"); + this.rbInsertRight(e, c[0]); + for (let e = 0; e < n.length; e++) q(this, n[e]) + } + adjustCarriageReturnFromNext(e, t) { + if (this.shouldCheckCRLF() && this.endWithCR(e)) { + let i = t.next(); + if (this.startWithLF(i)) { + if (e += "\n", 1 === i.piece.length) q(this, i); + else { + const e = i.piece, + t = { + line: e.start.line + 1, + column: 0 + }, + n = e.length - 1, + o = this.getLineFeedCnt(e.bufferIndex, t, e.end); + i.piece = new ie(e.bufferIndex, t, e.end, o, n), G(this, i, -1, -1) + } + return !0 + } + } + return !1 + } + iterate(e, t) { + if (e === W) return t(W); + let i = this.iterate(e.left, t); + return i ? t(e) && this.iterate(e.right, t) : i + } + getNodeContent(e) { + if (e === W) return ""; + let t, i = this._buffers[e.piece.bufferIndex], + n = e.piece, + o = this.offsetInBuffer(n.bufferIndex, n.start), + r = this.offsetInBuffer(n.bufferIndex, n.end); + return t = i.buffer.substring(o, r), t + } + getPieceContent(e) { + let t = this._buffers[e.bufferIndex], + i = this.offsetInBuffer(e.bufferIndex, e.start), + n = this.offsetInBuffer(e.bufferIndex, e.end); + return t.buffer.substring(i, n) + } + rbInsertRight(e, t) { + let i = new B(t, 1); + if (i.left = W, i.right = W, i.parent = W, i.size_left = 0, i.lf_left = + 0, this.root === W) this.root = i, i.color = 0; + else if (e.right === W) e.right = i, i.parent = e; + else { + let t = z(e.right); + t.left = i, i.parent = t + } + return Z(this, i), i + } + rbInsertLeft(e, t) { + let i = new B(t, 1); + if (i.left = W, i.right = W, i.parent = W, i.size_left = 0, i.lf_left = + 0, this.root === W) this.root = i, i.color = 0; + else if (e.left === W) e.left = i, i.parent = e; + else { + let t = V(e.left); + t.right = i, i.parent = t + } + return Z(this, i), i + } + } + var ae = i(8409), + le = i(962); + class de extends r.JT { + constructor(e, t, i, n, r, s, a) { + super(), this._onDidChangeContent = this._register(new o.Q5), this._BOM = + t, this._mightContainNonBasicASCII = !s, this._mightContainRTL = n, + this._mightContainUnusualLineTerminators = r, this._pieceTree = new se( + e, i, a) + } + mightContainRTL() { + return this._mightContainRTL + } + mightContainUnusualLineTerminators() { + return this._mightContainUnusualLineTerminators + } + resetMightContainUnusualLineTerminators() { + this._mightContainUnusualLineTerminators = !1 + } + mightContainNonBasicASCII() { + return this._mightContainNonBasicASCII + } + getBOM() { + return this._BOM + } + getEOL() { + return this._pieceTree.getEOL() + } + createSnapshot(e) { + return this._pieceTree.createSnapshot(e ? this._BOM : "") + } + getOffsetAt(e, t) { + return this._pieceTree.getOffsetAt(e, t) + } + getPositionAt(e) { + return this._pieceTree.getPositionAt(e) + } + getRangeAt(e, t) { + let i = e + t; + const n = this.getPositionAt(e), + o = this.getPositionAt(i); + return new c.e(n.lineNumber, n.column, o.lineNumber, o.column) + } + getValueInRange(e, t = 0) { + if (e.isEmpty()) return ""; + const i = this._getEndOfLine(t); + return this._pieceTree.getValueInRange(e, i) + } + getValueLengthInRange(e, t = 0) { + if (e.isEmpty()) return 0; + if (e.startLineNumber === e.endLineNumber) return e.endColumn - e.startColumn; + let i = this.getOffsetAt(e.startLineNumber, e.startColumn); + return this.getOffsetAt(e.endLineNumber, e.endColumn) - i + } + getCharacterCountInRange(e, t = 0) { + if (this._mightContainNonBasicASCII) { + let i = 0; + const n = e.startLineNumber, + o = e.endLineNumber; + for (let t = n; t <= o; t++) { + const r = this.getLineContent(t), + a = t === n ? e.startColumn - 1 : 0, + l = t === o ? e.endColumn - 1 : r.length; + for (let e = a; e < l; e++) s.ZG(r.charCodeAt(e)) ? (i += 1, e += 1) : + i += 1 + } + return i += this._getEndOfLine(t).length * (o - n), i + } + return this.getValueLengthInRange(e, t) + } + getLength() { + return this._pieceTree.getLength() + } + getLineCount() { + return this._pieceTree.getLineCount() + } + getLinesContent() { + return this._pieceTree.getLinesContent() + } + getLineContent(e) { + return this._pieceTree.getLineContent(e) + } + getLineCharCode(e, t) { + return this._pieceTree.getLineCharCode(e, t) + } + getLineLength(e) { + return this._pieceTree.getLineLength(e) + } + getLineFirstNonWhitespaceColumn(e) { + const t = s.LC(this.getLineContent(e)); + return -1 === t ? 0 : t + 1 + } + getLineLastNonWhitespaceColumn(e) { + const t = s.ow(this.getLineContent(e)); + return -1 === t ? 0 : t + 2 + } + _getEndOfLine(e) { + switch (e) { + case 1: + return "\n"; + case 2: + return "\r\n"; + case 0: + return this.getEOL(); + default: + throw new Error("Unknown EOL preference") + } + } + setEOL(e) { + this._pieceTree.setEOL(e) + } + applyEdits(e, t, i) { + let n = this._mightContainRTL, + o = this._mightContainUnusualLineTerminators, + r = this._mightContainNonBasicASCII, + a = !0, + l = []; + for (let t = 0; t < e.length; t++) { + let i = e[t]; + a && i._isTracked && (a = !1); + let d = i.range; + if (i.text) { + let e = !0; + r || (e = !s.$i(i.text), r = e), !n && e && (n = s.Ut(i.text)), !o && + e && (o = s.ab(i.text)) + } + let c = "", + h = 0, + u = 0, + g = 0; + if (i.text) { + let e; + [h, u, g, e] = (0, ae.QZ)(i.text); + const t = this.getEOL(), + n = "\r\n" === t ? 2 : 1; + c = 0 === e || e === n ? i.text : i.text.replace(/\r\n|\r|\n/g, t) + } + l[t] = { + sortIndex: t, + identifier: i.identifier || null, + range: d, + rangeOffset: this.getOffsetAt(d.startLineNumber, d.startColumn), + rangeLength: this.getValueLengthInRange(d), + text: c, + eolCount: h, + firstLineLength: u, + lastLineLength: g, + forceMoveMarkers: Boolean(i.forceMoveMarkers), + isAutoWhitespaceEdit: i.isAutoWhitespaceEdit || !1 + } + } + l.sort(de._sortOpsAscending); + let d = !1; + for (let e = 0, t = l.length - 1; e < t; e++) { + let t = l[e].range.getEndPosition(), + i = l[e + 1].range.getStartPosition(); + if (i.isBeforeOrEqual(t)) { + if (i.isBefore(t)) throw new Error( + "Overlapping ranges are not allowed!"); + d = !0 + } + } + a && (l = this._reduceOperations(l)); + let c = i || t ? de._getInverseEditRanges(l) : [], + h = []; + if (t) + for (let e = 0; e < l.length; e++) { + let t = l[e], + i = c[e]; + if (t.isAutoWhitespaceEdit && t.range.isEmpty()) + for (let e = i.startLineNumber; e <= i.endLineNumber; e++) { + let n = ""; + e === i.startLineNumber && (n = this.getLineContent(t.range.startLineNumber), - + 1 !== s.LC(n)) || h.push({ + lineNumber: e, + oldContent: n + }) + } + } + let g = null; + if (i) { + let e = 0; + g = []; + for (let t = 0; t < l.length; t++) { + const i = l[t], + n = c[t], + o = this.getValueInRange(i.range), + r = i.rangeOffset + e; + e += i.text.length - o.length, g[t] = { + sortIndex: i.sortIndex, + identifier: i.identifier, + range: n, + text: o, + textChange: new le.q(i.rangeOffset, o, r, i.text) + } + } + d || g.sort(((e, t) => e.sortIndex - t.sortIndex)) + } + this._mightContainRTL = n, this._mightContainUnusualLineTerminators = + o, this._mightContainNonBasicASCII = r; + const p = this._doApplyEdits(l); + let m = null; + if (t && h.length > 0) { + h.sort(((e, t) => t.lineNumber - e.lineNumber)), m = []; + for (let e = 0, t = h.length; e < t; e++) { + let t = h[e].lineNumber; + if (e > 0 && h[e - 1].lineNumber === t) continue; + let i = h[e].oldContent, + n = this.getLineContent(t); + 0 !== n.length && n !== i && -1 === s.LC(n) && m.push(t) + } + } + return this._onDidChangeContent.fire(), new u.je(g, p, m) + } + _reduceOperations(e) { + return e.length < 1e3 ? e : [this._toSingleEditOperation(e)] + } + _toSingleEditOperation(e) { + let t = !1; + const i = e[0].range, + n = e[e.length - 1].range, + o = new c.e(i.startLineNumber, i.startColumn, n.endLineNumber, n.endColumn); + let r = i.startLineNumber, + s = i.startColumn; + const a = []; + for (let i = 0, n = e.length; i < n; i++) { + const n = e[i], + o = n.range; + t = t || n.forceMoveMarkers, a.push(this.getValueInRange(new c.e(r, + s, o.startLineNumber, o.startColumn))), n.text.length > 0 && a.push( + n.text), r = o.endLineNumber, s = o.endColumn + } + const l = a.join(""), + [d, h, u] = (0, ae.QZ)(l); + return { + sortIndex: 0, + identifier: e[0].identifier, + range: o, + rangeOffset: this.getOffsetAt(o.startLineNumber, o.startColumn), + rangeLength: this.getValueLengthInRange(o, 0), + text: l, + eolCount: d, + firstLineLength: h, + lastLineLength: u, + forceMoveMarkers: t, + isAutoWhitespaceEdit: !1 + } + } + _doApplyEdits(e) { + e.sort(de._sortOpsDescending); + let t = []; + for (let i = 0; i < e.length; i++) { + let n = e[i]; + const o = n.range.startLineNumber, + r = n.range.startColumn, + s = n.range.endLineNumber, + a = n.range.endColumn; + if (o === s && r === a && 0 === n.text.length) continue; + n.text ? (this._pieceTree.delete(n.rangeOffset, n.rangeLength), this + ._pieceTree.insert(n.rangeOffset, n.text, !0)) : this._pieceTree.delete( + n.rangeOffset, n.rangeLength); + const l = new c.e(o, r, s, a); + t.push({ + range: l, + rangeLength: n.rangeLength, + text: n.text, + rangeOffset: n.rangeOffset, + forceMoveMarkers: n.forceMoveMarkers + }) + } + return t + } + findMatchesLineByLine(e, t, i, n) { + return this._pieceTree.findMatchesLineByLine(e, t, i, n) + } + static _getInverseEditRanges(e) { + let t = [], + i = 0, + n = 0, + o = null; + for (let r = 0, s = e.length; r < s; r++) { + let s, a, l, d = e[r]; + if (o ? o.range.endLineNumber === d.range.startLineNumber ? (s = i, + a = n + (d.range.startColumn - o.range.endColumn)) : (s = i + (d.range + .startLineNumber - o.range.endLineNumber), a = d.range.startColumn) : + (s = d.range.startLineNumber, a = d.range.startColumn), d.text.length > + 0) { + const e = d.eolCount + 1; + l = 1 === e ? new c.e(s, a, s, a + d.firstLineLength) : new c.e(s, + a, s + e - 1, d.lastLineLength + 1) + } else l = new c.e(s, a, s, a); + i = l.endLineNumber, n = l.endColumn, t.push(l), o = d + } + return t + } + static _sortOpsAscending(e, t) { + let i = c.e.compareRangesUsingEnds(e.range, t.range); + return 0 === i ? e.sortIndex - t.sortIndex : i + } + static _sortOpsDescending(e, t) { + let i = c.e.compareRangesUsingEnds(e.range, t.range); + return 0 === i ? t.sortIndex - e.sortIndex : -i + } + } + class ce { + constructor(e, t, i, n, o, r, s, a, l) { + this._chunks = e, this._bom = t, this._cr = i, this._lf = n, this._crlf = + o, this._containsRTL = r, this._containsUnusualLineTerminators = s, + this._isBasicASCII = a, this._normalizeEOL = l + } + _getEOL(e) { + const t = this._cr + this._lf + this._crlf, + i = this._cr + this._crlf; + return 0 === t ? 1 === e ? "\n" : "\r\n" : i > t / 2 ? "\r\n" : "\n" + } + create(e) { + const t = this._getEOL(e); + let i = this._chunks; + if (this._normalizeEOL && ("\r\n" === t && (this._cr > 0 || this._lf > + 0) || "\n" === t && (this._cr > 0 || this._crlf > 0))) + for (let e = 0, n = i.length; e < n; e++) { + let n = i[e].buffer.replace(/\r\n|\r|\n/g, t), + o = te(n); + i[e] = new ne(n, o) + } + const n = new de(i, this._bom, t, this._containsRTL, this._containsUnusualLineTerminators, + this._isBasicASCII, this._normalizeEOL); + return { + textBuffer: n, + disposable: n + } + } + } + class he { + constructor() { + this.chunks = [], this.BOM = "", this._hasPreviousChar = !1, this._previousChar = + 0, this._tmpLineStarts = [], this.cr = 0, this.lf = 0, this.crlf = 0, + this.containsRTL = !1, this.containsUnusualLineTerminators = !1, this + .isBasicASCII = !0 + } + acceptChunk(e) { + if (0 === e.length) return; + 0 === this.chunks.length && s.uS(e) && (this.BOM = s.c1, e = e.substr( + 1)); + const t = e.charCodeAt(e.length - 1); + 13 === t || t >= 55296 && t <= 56319 ? (this._acceptChunk1(e.substr(0, + e.length - 1), !1), this._hasPreviousChar = !0, this._previousChar = + t) : (this._acceptChunk1(e, !1), this._hasPreviousChar = !1, this._previousChar = + t) + } + _acceptChunk1(e, t) { + (t || 0 !== e.length) && (this._hasPreviousChar ? this._acceptChunk2( + String.fromCharCode(this._previousChar) + e) : this._acceptChunk2(e)) + } + _acceptChunk2(e) { + const t = function(e, t) { + e.length = 0, e[0] = 0; + let i = 1, + n = 0, + o = 0, + r = 0, + s = !0; + for (let a = 0, l = t.length; a < l; a++) { + const d = t.charCodeAt(a); + 13 === d ? a + 1 < l && 10 === t.charCodeAt(a + 1) ? (r++, e[i++] = + a + 2, a++) : (n++, e[i++] = a + 1) : 10 === d ? (o++, e[i++] = a + + 1) : s && 9 !== d && (d < 32 || d > 126) && (s = !1) + } + const a = new ee(J(e), n, o, r, s); + return e.length = 0, a + }(this._tmpLineStarts, e); + this.chunks.push(new ne(e, t.lineStarts)), this.cr += t.cr, this.lf += + t.lf, this.crlf += t.crlf, this.isBasicASCII && (this.isBasicASCII = + t.isBasicASCII), this.isBasicASCII || this.containsRTL || (this.containsRTL = + s.Ut(e)), this.isBasicASCII || this.containsUnusualLineTerminators || + (this.containsUnusualLineTerminators = s.ab(e)) + } + finish(e = !0) { + return this._finish(), new ce(this.chunks, this.BOM, this.cr, this.lf, + this.crlf, this.containsRTL, this.containsUnusualLineTerminators, + this.isBasicASCII, e) + } + _finish() { + if (0 === this.chunks.length && this._acceptChunk1("", !0), this._hasPreviousChar) { + this._hasPreviousChar = !1; + let e = this.chunks[this.chunks.length - 1]; + e.buffer += String.fromCharCode(this._previousChar); + let t = te(e.buffer); + e.lineStarts = t, 13 === this._previousChar && this.cr++ + } + } + } + var ue = i(3256), + ge = i(9488), + pe = i(8411), + me = i(4101), + fe = i(8111), + _e = i(4013), + be = i(1432); + class ve { + constructor() { + this._beginState = [], this._valid = [], this._len = 0, this._invalidLineStartIndex = + 0 + } + _reset(e) { + this._beginState = [], this._valid = [], this._len = 0, this._invalidLineStartIndex = + 0, e && this._setBeginState(0, e) + } + flush(e) { + this._reset(e) + } + get invalidLineStartIndex() { + return this._invalidLineStartIndex + } + _invalidateLine(e) { + e < this._len && (this._valid[e] = !1), e < this._invalidLineStartIndex && + (this._invalidLineStartIndex = e) + } + _isValid(e) { + return e < this._len && this._valid[e] + } + getBeginState(e) { + return e < this._len ? this._beginState[e] : null + } + _ensureLine(e) { + for (; e >= this._len;) this._beginState[this._len] = null, this._valid[ + this._len] = !1, this._len++ + } + _deleteLines(e, t) { + 0 !== t && (e + t > this._len && (t = this._len - e), this._beginState + .splice(e, t), this._valid.splice(e, t), this._len -= t) + } + _insertLines(e, t) { + if (0 === t) return; + let i = [], + n = []; + for (let e = 0; e < t; e++) i[e] = null, n[e] = !1; + this._beginState = ge.Zv(this._beginState, e, i), this._valid = ge.Zv( + this._valid, e, n), this._len += t + } + _setValid(e, t) { + this._ensureLine(e), this._valid[e] = t + } + _setBeginState(e, t) { + this._ensureLine(e), this._beginState[e] = t + } + setEndState(e, t, i) { + if (this._setValid(t, !0), this._invalidLineStartIndex = t + 1, t === + e - 1) return; + const n = this.getBeginState(t + 1); + if (null === n || !i.equals(n)) return this._setBeginState(t + 1, i), + void this._invalidateLine(t + 1); + let o = t + 1; + for (; o < e && this._isValid(o);) o++; + this._invalidLineStartIndex = o + } + setFakeTokens(e) { + this._setValid(e, !1) + } + applyEdits(e, t) { + const i = e.endLineNumber - e.startLineNumber, + n = t; + for (let t = Math.min(i, n); t >= 0; t--) this._invalidateLine(e.startLineNumber + + t - 1); + this._acceptDeleteRange(e), this._acceptInsertText(new d.L(e.startLineNumber, + e.startColumn), t) + } + _acceptDeleteRange(e) { + e.startLineNumber - 1 >= this._len || this._deleteLines(e.startLineNumber, + e.endLineNumber - e.startLineNumber) + } + _acceptInsertText(e, t) { + e.lineNumber - 1 >= this._len || this._insertLines(e.lineNumber, t) + } + } + class we extends r.JT { + constructor(e) { + super(), this._isDisposed = !1, this._textModel = e, this._tokenizationStateStore = + new ve, this._tokenizationSupport = null, this._register(me.RW.onDidChange( + (e => { + const t = this._textModel.getLanguageIdentifier(); - 1 !== e.changedLanguages + .indexOf(t.language) && (this._resetTokenizationState(), this._textModel + .clearTokens()) + }))), this._register(this._textModel.onDidChangeContentFast((e => { + if (e.isFlush) this._resetTokenizationState(); + else { + for (let t = 0, i = e.changes.length; t < i; t++) { + const i = e.changes[t], + [n] = (0, ae.QZ)(i.text); + this._tokenizationStateStore.applyEdits(i.range, n) + } + this._beginBackgroundTokenization() + } + }))), this._register(this._textModel.onDidChangeAttached((() => { + this._beginBackgroundTokenization() + }))), this._register(this._textModel.onDidChangeLanguage((() => { + this._resetTokenizationState(), this._textModel.clearTokens() + }))), this._resetTokenizationState() + } + dispose() { + this._isDisposed = !0, super.dispose() + } + _resetTokenizationState() { + const [e, t] = function(e) { + const t = e.getLanguageIdentifier(); + let i = e.isTooLargeForTokenization() ? null : me.RW.get(t.language), + o = null; + if (i) try { + o = i.getInitialState() + } catch (e) { + (0, n.dL)(e), i = null + } + return [i, o] + }(this._textModel); + this._tokenizationSupport = e, this._tokenizationStateStore.flush(t), + this._beginBackgroundTokenization() + } + _beginBackgroundTokenization() { + this._textModel.isAttachedToEditor() && this._hasLinesToTokenize() && + be.xS((() => { + this._isDisposed || this._revalidateTokensNow() + })) + } + _revalidateTokensNow() { + const e = this._textModel.getLineCount(), + t = new ae.DA, + i = _e.G.create(!1); + let n = -1; + for (; this._hasLinesToTokenize() && !(i.elapsed() > 1) && (n = this._tokenizeOneInvalidLine( + t), !(n >= e));); + this._beginBackgroundTokenization(), this._textModel.setTokens(t.tokens, + n >= e) + } + tokenizeViewport(e, t) { + const i = new ae.DA; + this._tokenizeViewport(i, e, t), this._textModel.setTokens(i.tokens) + } + reset() { + this._resetTokenizationState(), this._textModel.clearTokens() + } + forceTokenization(e) { + const t = new ae.DA; + this._updateTokensUntilLine(t, e), this._textModel.setTokens(t.tokens) + } + isCheapToTokenize(e) { + if (!this._tokenizationSupport) return !0; + const t = this._tokenizationStateStore.invalidLineStartIndex + 1; + return !(e > t) && (e < t || this._textModel.getLineLength(e) < 2048) + } + _hasLinesToTokenize() { + return !!this._tokenizationSupport && this._tokenizationStateStore.invalidLineStartIndex < + this._textModel.getLineCount() + } + _tokenizeOneInvalidLine(e) { + if (!this._hasLinesToTokenize()) return this._textModel.getLineCount() + + 1; + const t = this._tokenizationStateStore.invalidLineStartIndex + 1; + return this._updateTokensUntilLine(e, t), t + } + _updateTokensUntilLine(e, t) { + if (!this._tokenizationSupport) return; + const i = this._textModel.getLanguageIdentifier(), + n = this._textModel.getLineCount(), + o = t - 1; + for (let t = this._tokenizationStateStore.invalidLineStartIndex; t <= + o; t++) { + const o = this._textModel.getLineContent(t + 1), + r = this._tokenizationStateStore.getBeginState(t), + s = Ce(i, this._tokenizationSupport, o, !0, r); + e.add(t + 1, s.tokens), this._tokenizationStateStore.setEndState(n, + t, s.endState), t = this._tokenizationStateStore.invalidLineStartIndex - + 1 + } + } + _tokenizeViewport(e, t, i) { + if (!this._tokenizationSupport) return; + if (i <= this._tokenizationStateStore.invalidLineStartIndex) return; + if (t <= this._tokenizationStateStore.invalidLineStartIndex) return + void this._updateTokensUntilLine(e, i); + let n = this._textModel.getLineFirstNonWhitespaceColumn(t), + o = [], + r = null; + for (let e = t - 1; n > 0 && e >= 1; e--) { + let t = this._textModel.getLineFirstNonWhitespaceColumn(e); + if (0 !== t && t < n) { + if (r = this._tokenizationStateStore.getBeginState(e - 1), r) break; + o.push(this._textModel.getLineContent(e)), n = t + } + } + r || (r = this._tokenizationSupport.getInitialState()); + const s = this._textModel.getLanguageIdentifier(); + let a = r; + for (let e = o.length - 1; e >= 0; e--) a = Ce(s, this._tokenizationSupport, + o[e], !1, a).endState; + for (let n = t; n <= i; n++) { + let t = this._textModel.getLineContent(n), + i = Ce(s, this._tokenizationSupport, t, !0, a); + e.add(n, i.tokens), this._tokenizationStateStore.setFakeTokens(n - 1), + a = i.endState + } + } + } + + function Ce(e, t, i, o, r) { + let s = null; + if (t) try { + s = t.tokenize2(i, o, r.clone(), 0) + } catch (e) { + (0, n.dL)(e) + } + return s || (s = (0, fe.mh)(e.id, i, r, 0)), pe.A.convertToEndOffset(s.tokens, + i.length), s + } + var ye = i(7461), + Se = i(3831), + xe = i(764), + ke = i(4227), + Le = i(1264); + const Ne = new Array; + class De { + constructor(e, t) { + this.items = e, this.additionalItems = t + } + static create(e, t) { + if (e <= 128 && 0 === t.length) { + let i = De.cache[e]; + return i || (i = new De(e, t), De.cache[e] = i), i + } + return new De(e, t) + } + static getEmpty() { + return this.empty + } + add(e, t) { + const i = t.getKey(e); + let n = i >> 5; + if (0 === n) { + const e = 1 << i | this.items; + return e === this.items ? this : De.create(e, this.additionalItems) + } + n--; + const o = this.additionalItems.slice(0); + for (; o.length < n;) o.push(0); + return o[n] |= 1 << (31 & i), De.create(this.items, o) + } + has(e, t) { + const i = t.getKey(e); + let n = i >> 5; + return 0 === n ? 0 != (this.items & 1 << i) : (n--, 0 != ((this.additionalItems[ + n] || 0) & 1 << (31 & i))) + } + merge(e) { + const t = this.items | e.items; + if (this.additionalItems === Ne && e.additionalItems === Ne) return t === + this.items ? this : t === e.items ? e : De.create(t, Ne); + const i = new Array; + for (let t = 0; t < Math.max(this.additionalItems.length, e.additionalItems + .length); t++) { + const n = this.additionalItems[t] || 0, + o = e.additionalItems[t] || 0; + i.push(n | o) + } + return De.create(t, i) + } + intersects(e) { + if (0 != (this.items & e.items)) return !0; + for (let t = 0; t < Math.min(this.additionalItems.length, e.additionalItems + .length); t++) + if (0 != (this.additionalItems[t] & e.additionalItems[t])) return !0; + return !1 + } + } + De.cache = new Array(129), De.empty = De.create(0, Ne); + class Ee { + constructor() { + this.items = new Map + } + getKey(e) { + let t = this.items.get(e); + return void 0 === t && (t = this.items.size, this.items.set(e, t)), t + } + } + var Ie = i(7869), + Te = i(7781); + class Me { + constructor(e, t) { + this.lineCount = e, this.columnCount = t + } + toString() { + return `${this.lineCount},${this.columnCount}` + } + } + const Ae = Math.pow(2, 26); + + function Re(e, t) { + return e * Ae + t + } + + function Oe(e) { + const t = e, + i = Math.floor(t / Ae); + return new Me(i, t - i * Ae) + } + + function Pe(e) { + return Math.floor(e / Ae) + } + + function Fe(e, t) { + return t < Ae ? e + t : e - e % Ae + t + } + + function Be(e, t) { + return e < t + } + + function We(e, t) { + return e <= t + } + + function ze(e) { + return Re(e.lineNumber - 1, e.column - 1) + } + + function Ve(e, t) { + const i = e, + n = Math.floor(i / Ae), + o = i - n * Ae, + r = t, + s = Math.floor(r / Ae), + a = r - s * Ae; + return new c.e(n + 1, o + 1, s + 1, a + 1) + } + class He { + constructor(e, t, i) { + this.startOffset = e, this.endOffset = t, this.newLength = i + } + } + class Ue { + constructor(e, t) { + this.documentLength = t, this.nextEditIdx = 0, this.deltaOldToNewLineCount = + 0, this.deltaOldToNewColumnCount = 0, this.deltaLineIdxInOld = -1, + this.edits = e.map((e => je.from(e))) + } + getOffsetBeforeChange(e) { + return this.adjustNextEdit(e), this.translateCurToOld(e) + } + getDistanceToNextChange(e) { + this.adjustNextEdit(e); + const t = this.edits[this.nextEditIdx]; + return function(e, t) { + const i = e, + n = t; + if (n - i <= 0) return 0; + const o = Math.floor(i / Ae), + r = Math.floor(n / Ae), + s = n - r * Ae; + return o === r ? Re(0, s - (i - o * Ae)) : Re(r - o, s) + }(e, t ? this.translateOldToCur(t.offsetObj) : this.documentLength) + } + translateOldToCur(e) { + return e.lineCount === this.deltaLineIdxInOld ? Re(e.lineCount + this.deltaOldToNewLineCount, + e.columnCount + this.deltaOldToNewColumnCount) : Re(e.lineCount + + this.deltaOldToNewLineCount, e.columnCount) + } + translateCurToOld(e) { + const t = Oe(e); + return t.lineCount - this.deltaOldToNewLineCount === this.deltaLineIdxInOld ? + Re(t.lineCount - this.deltaOldToNewLineCount, t.columnCount - this.deltaOldToNewColumnCount) : + Re(t.lineCount - this.deltaOldToNewLineCount, t.columnCount) + } + adjustNextEdit(e) { + for (; this.nextEditIdx < this.edits.length;) { + const t = this.edits[this.nextEditIdx], + i = this.translateOldToCur(t.endOffsetAfterObj); + if (!We(i, e)) break; { + this.nextEditIdx++; + const e = Oe(i), + n = Oe(this.translateOldToCur(t.endOffsetBeforeObj)), + o = e.lineCount - n.lineCount; + this.deltaOldToNewLineCount += o; + const r = this.deltaLineIdxInOld === t.endOffsetBeforeObj.lineCount ? + this.deltaOldToNewColumnCount : 0, + s = e.columnCount - n.columnCount; + this.deltaOldToNewColumnCount = r + s, this.deltaLineIdxInOld = t.endOffsetBeforeObj + .lineCount + } + } + } + } + class je { + constructor(e, t, i) { + this.endOffsetBeforeObj = Oe(t), this.endOffsetAfterObj = Oe(Fe(e, i)), + this.offsetObj = Oe(e) + } + static from(e) { + return new je(e.startOffset, e.endOffset, e.newLength) + } + } + class Ke { + constructor(e) { + this._length = e + } + get length() { + return this._length + } + } + class $e extends Ke { + constructor(e, t, i, n) { + super(e), this.category = t, this.children = i, this.unopenedBrackets = + n + } + static create(e, t, i, n) { + const o = function(e, t, i) { + let n = e.length; + return t && (n = Fe(n, t.length)), i && (n = Fe(n, i.length)), n + }(t, i, n), + r = new Array(1); + return r[0] = t, i && r.push(i), n && r.push(n), new $e(o, e, r, i ? i + .unopenedBrackets : De.getEmpty()) + } + get kind() { + return 2 + } + get listHeight() { + return 0 + } + canBeReused(e, t) { + return null !== this.closingBracket && !e.intersects(this.unopenedBrackets) + } + get closingBracket() { + return this.children.length <= 1 ? null : 1 === this.children[1].kind ? + this.children[1] || null : this.children[2] || null + } + clone() { + return new $e(this.length, this.category, Ze(this.children), this.unopenedBrackets) + } + } + class qe extends Ke { + constructor(e, t, i, n) { + super(e), this.listHeight = t, this._items = i, this._unopenedBrackets = + n + } + static create(e) { + if (0 === e.length) return new qe(0, 0, e, De.getEmpty()); { + let t = e[0].length, + i = e[0].unopenedBrackets; + for (let n = 1; n < e.length; n++) t = Fe(t, e[n].length), i = i.merge( + e[n].unopenedBrackets); + return new qe(t, e[0].listHeight + 1, e, i) + } + } + get kind() { + return 4 + } + get children() { + return this._items + } + get unopenedBrackets() { + return this._unopenedBrackets + } + canBeReused(e, t) { + if (0 === this._items.length) return !0; + if (e.intersects(this.unopenedBrackets)) return !1; + let i = this; + for (; i.children.length > 0 && 4 === i.kind;) i = (0, ge.Gb)(i.children); + return i.canBeReused(e, t) + } + clone() { + return new qe(this.length, this.listHeight, Ze(this._items), this.unopenedBrackets) + } + handleChildrenChanged() { + const e = this._items; + if (0 === e.length) return; + let t = e[0].length, + i = e[0].unopenedBrackets; + for (let n = 1; n < e.length; n++) t = Fe(t, e[n].length), i = i.merge( + e[n].unopenedBrackets); + this._length = t, this._unopenedBrackets = i + } + append(e) { + const t = this._append(e); + return t ? qe.create([this, t]) : this + } + _append(e) { + if (e.listHeight === this.listHeight) return e; + const t = this._items[this._items.length - 1], + i = 4 === t.kind ? t._append(e) : e; + if (i) { + if (this._items.length >= 3) { + const e = this._items.pop(); + return this.handleChildrenChanged(), qe.create([e, i]) + } + return this._items.push(i), void this.handleChildrenChanged() + } + this.handleChildrenChanged() + } + prepend(e) { + const t = this._prepend(e); + return t ? qe.create([t, this]) : this + } + _prepend(e) { + if (e.listHeight === this.listHeight) return e; + if (4 !== this.kind) throw new Error("unexpected"); + const t = this._items[0], + i = 4 === t.kind ? t._prepend(e) : e; + if (i) { + if (this._items.length >= 3) { + const e = this._items.shift(); + return this.handleChildrenChanged(), qe.create([i, e]) + } + return this._items.unshift(i), void this.handleChildrenChanged() + } + this.handleChildrenChanged() + } + } + + function Ze(e) { + const t = new Array(e.length); + for (let i = 0; i < e.length; i++) t[i] = e[i].clone(); + return t + } + const Ge = []; + class Ye extends Ke {get kind() { + return 0 + } + get listHeight() { + return 0 + }get children() { + return Ge + } + get unopenedBrackets() { + return De.getEmpty() + } + canBeReused(e, t) { + return !t + } + clone() { + return this + } + } + class Qe extends Ke { + constructor(e) { + super(e) + } + static create(e) { + const t = e, + i = Qe.cacheByLength.get(t); + if (i) return i; + const n = new Qe(e); + return Qe.cacheByLength.set(t, n), n + } + get kind() { + return 1 + } + get listHeight() { + return 0 + } + get children() { + return Ge + } + get unopenedBrackets() { + return De.getEmpty() + } + canBeReused(e, t) { + return !1 + } + clone() { + return this + } + } + Qe.cacheByLength = new Map; + class Xe extends Ke { + constructor(e, t, i) { + super(t), this.unopenedBrackets = De.getEmpty().add(e, i) + } + get kind() { + return 3 + } + get listHeight() { + return 0 + } + get children() { + return Ge + } + canBeReused(e, t) { + return !e.intersects(this.unopenedBrackets) + } + clone() { + return this + } + } + class Je { + constructor(e, t, i, n, o) { + this.length = e, this.kind = t, this.category = i, this.languageId = n, + this.astNode = o + } + } + class et { + constructor(e, t) { + this.textModel = e, this.bracketTokens = t, this.reader = new tt(this.textModel, + this.bracketTokens), this._offset = 0, this.didPeek = !1, this.peeked = + null, this.textBufferLineCount = e.getLineCount(), this.textBufferLastLineLength = + e.getLineLength(this.textBufferLineCount) + } + get offset() { + return this._offset + } + get length() { + return Re(this.textBufferLineCount, this.textBufferLastLineLength) + } + skip(e) { + this.didPeek = !1, this._offset = Fe(this._offset, e); + const t = Oe(this._offset); + this.reader.setPosition(t.lineCount, t.columnCount) + } + read() { + let e; + return this.peeked ? (this.didPeek = !1, e = this.peeked) : e = this.reader + .read(), e && (this._offset = Fe(this._offset, e.length)), e + } + peek() { + return this.didPeek || (this.peeked = this.reader.read(), this.didPeek = ! + 0), this.peeked + } + } + class tt { + constructor(e, t) { + this.textModel = e, this.bracketTokens = t, this.lineIdx = 0, this.line = + null, this.lineCharOffset = 0, this.lineTokens = null, this.lineTokenOffset = + 0, this.peekedToken = null, this.textBufferLineCount = e.getLineCount(), + this.textBufferLastLineLength = e.getLineLength(this.textBufferLineCount) + } + setPosition(e, t) { + e === this.lineIdx ? (this.lineCharOffset = t, this.lineTokenOffset = + 0 === this.lineCharOffset ? 0 : this.lineTokens.findTokenIndexAtOffset( + this.lineCharOffset)) : (this.lineIdx = e, this.lineCharOffset = t, + this.line = null), this.peekedToken = null + } + read() { + if (this.peekedToken) { + const e = this.peekedToken; + return this.peekedToken = null, this.lineCharOffset += e.length, e + } + if (this.lineIdx > this.textBufferLineCount - 1 || this.lineIdx === + this.textBufferLineCount - 1 && this.lineCharOffset >= this.textBufferLastLineLength + ) return null; + null === this.line && (this.lineTokens = this.textModel.getLineTokens( + this.lineIdx + 1), this.line = this.lineTokens.getLineContent(), + this.lineTokenOffset = 0 === this.lineCharOffset ? 0 : this.lineTokens + .findTokenIndexAtOffset(this.lineCharOffset)); + const e = this.lineIdx, + t = this.lineCharOffset; + let i = 0; + for (; i < 1e3;) { + const n = this.lineTokens, + o = n.getCount(); + let r = null; + if (this.lineTokenOffset < o) { + let s = n.getMetadata(this.lineTokenOffset); + for (; this.lineTokenOffset + 1 < o && s === n.getMetadata(this.lineTokenOffset + + 1);) this.lineTokenOffset++; + const a = 0 === me.NX.getTokenType(s), + l = n.getEndOffset(this.lineTokenOffset); + if (a && l !== this.lineCharOffset) { + const e = n.getLanguageId(this.lineTokenOffset), + t = this.line.substring(this.lineCharOffset, l), + i = this.bracketTokens.getSingleLanguageBracketTokens(e), + o = i.regExpGlobal; + if (o) { + o.lastIndex = 0; + const e = o.exec(t); + e && (r = i.getToken(e[0]), r && (this.lineCharOffset += e.index)) + } + } + if (i += l - this.lineCharOffset, r) { + if (e !== this.lineIdx || t !== this.lineCharOffset) { + this.peekedToken = r; + break + } + return this.lineCharOffset += r.length, r + } + this.lineTokenOffset++, this.lineCharOffset = l + } else { + if (this.lineIdx === this.textBufferLineCount - 1) break; + this.lineIdx++, this.lineTokens = this.textModel.getLineTokens(this.lineIdx + + 1), this.lineTokenOffset = 0, this.line = this.lineTokens.getLineContent(), + this.lineCharOffset = 0, i++ + } + } + const n = (o = e, r = t, s = this.lineIdx, a = this.lineCharOffset, o !== + s ? Re(s - o, a) : Re(0, a - r)); + var o, r, s, a; + return new Je(n, 0, -1, -1, new Ye(n)) + } + } + class it { + constructor(e, t) { + this.text = e, this._offset = 0, this.idx = 0; + const i = t.getRegExpStr() ? new RegExp(t.getRegExpStr() + "|\n", "g") : + null, + n = []; + let o, r = 0, + s = 0, + a = 0, + l = 0; + const d = new Array; + for (let e = 0; e < 60; e++) d.push(new Je(Re(0, e), 0, -1, -1, new Ye( + Re(0, e)))); + const c = new Array; + for (let e = 0; e < 60; e++) c.push(new Je(Re(1, e), 0, -1, -1, new Ye( + Re(1, e)))); + if (i) + for (i.lastIndex = 0; null !== (o = i.exec(e));) { + const e = o.index, + i = o[0]; + if ("\n" === i) r++, s = e + 1; + else { + if (a !== e) { + let t; + if (l === r) { + const i = e - a; + if (i < d.length) t = d[i]; + else { + const e = Re(0, i); + t = new Je(e, 0, -1, -1, new Ye(e)) + } + } else { + const i = r - l, + n = e - s; + if (1 === i && n < c.length) t = c[n]; + else { + const e = Re(i, n); + t = new Je(e, 0, -1, -1, new Ye(e)) + } + } + n.push(t) + } + n.push(t.getToken(i)), a = e + i.length, l = r + } + } + const h = e.length; + if (a !== h) { + const e = l === r ? Re(0, h - a) : Re(r - l, h - s); + n.push(new Je(e, 0, -1, -1, new Ye(e))) + } + this.length = Re(r, h - s), this.tokens = n + } + get offset() { + return this._offset + } + read() { + return this.tokens[this.idx++] || null + } + peek() { + return this.tokens[this.idx] || null + } + skip(e) { + throw new n.B8 + } + } + class nt { + constructor() { + this.hasRegExp = !1, this._regExpGlobal = null, this.map = new Map + } + static createFromLanguage(e, t) { + const i = [...Se.zu.getColorizedBracketPairs(e)], + n = new nt; + let o = 0; + for (const t of i) n.addBracket(e, t[0], 1, o), n.addBracket(e, t[1], + 2, o), o++; + for (const i of t) o++, n.addBracket(e, i[0], 1, o), n.addBracket(e, i[ + 1], 2, o); + return n + } + addBracket(e, t, i, n) { + const o = Re(0, t.length); + this.map.set(t, new Je(o, i, 1e3 * e + n, e, Qe.create(o))) + } + getRegExpStr() { + if (this.isEmpty) return null; { + const e = [...this.map.keys()]; + return e.sort(), e.reverse(), e.map((e => (0, s.ec)(e))).join("|") + } + } + get regExpGlobal() { + if (!this.hasRegExp) { + const e = this.getRegExpStr(); + this._regExpGlobal = e ? new RegExp(e, "g") : null, this.hasRegExp = ! + 0 + } + return this._regExpGlobal + } + getToken(e) { + return this.map.get(e) + } + get isEmpty() { + return 0 === this.map.size + } + } + class ot { + constructor(e) { + this.customBracketPairs = e, this.languageIdToBracketTokens = new Map + } + didLanguageChange(e) { + const t = this.languageIdToBracketTokens.get(e); + if (!t) return !1; + const i = nt.createFromLanguage(e, this.customBracketPairs).getRegExpStr(); + return t.getRegExpStr() !== i + } + getSingleLanguageBracketTokens(e) { + let t = this.languageIdToBracketTokens.get(e); + return t || (t = nt.createFromLanguage(e, this.customBracketPairs), + this.languageIdToBracketTokens.set(e, t)), t + } + } + + function rt(e, t) { + return Math.abs(e.listHeight - t.listHeight) + } + + function st(e, t) { + return e.listHeight === t.listHeight ? qe.create([e, t]) : e.listHeight > + t.listHeight ? e.append(t) : t.prepend(e) + } + class at { + constructor(e) { + this.lastOffset = 0, this.nextNodes = [e], this.offsets = [0], this.idxs = [] + } + readLongestNodeAt(e, t) { + if (Be(e, this.lastOffset)) throw new Error("Invalid offset"); + for (this.lastOffset = e;;) { + const i = lt(this.nextNodes); + if (!i) return; + const n = lt(this.offsets); + if (Be(e, n)) return; + if (Be(n, e)) Fe(n, i.length) <= e ? this.nextNodeAfterCurrent() : i.children + .length > 0 ? (this.nextNodes.push(i.children[0]), this.offsets.push( + n), this.idxs.push(0)) : this.nextNodeAfterCurrent(); + else { + if (t(i)) return this.nextNodeAfterCurrent(), i; + if (0 === i.children.length) return void this.nextNodeAfterCurrent(); + this.nextNodes.push(i.children[0]), this.offsets.push(n), this.idxs.push( + 0) + } + } + } + nextNodeAfterCurrent() { + for (;;) { + const e = lt(this.offsets), + t = lt(this.nextNodes); + if (this.nextNodes.pop(), this.offsets.pop(), 0 === this.idxs.length) + break; + const i = lt(this.nextNodes); + this.idxs[this.idxs.length - 1]++; + const n = this.idxs[this.idxs.length - 1]; + if (n < i.children.length) { + this.nextNodes.push(i.children[n]), this.offsets.push(Fe(e, t.length)); + break + } + this.idxs.pop() + } + } + } + + function lt(e) { + return e.length > 0 ? e[e.length - 1] : void 0 + } + + function dt(e, t, i, n) { + return new ct(e, t, i, n).parseDocument() + } + class ct { + constructor(e, t, i, n) { + this.tokenizer = e, this.denseKeyProvider = n, this._itemsConstructed = + 0, this._itemsFromCache = 0, this.oldNodeReader = i ? new at(i) : + void 0, this.positionMapper = new Ue(t, e.length) + } + parseDocument() { + this._itemsConstructed = 0, this._itemsFromCache = 0; + let e = this.parseList(De.getEmpty()); + return e || (e = qe.create([])), e + } + parseList(e) { + const t = new Array; + for (;;) { + const i = this.tokenizer.peek(); + if (!i || 2 === i.kind && e.has(i.category, this.denseKeyProvider)) + break; + const n = this.parseChild(e); + 4 === n.kind && 0 === n.children.length || t.push(n) + } + return function(e) { + return 0 === e.length ? null : 1 === e.length ? e[0] : function(e) { + const t = e[0].listHeight; + for (const i of e) + if (i.listHeight !== t) return !1; + return !0 + }(e) ? function(e) { + let t = e.length; + for (; t > 1;) { + const i = t >> 1, + n = new Array(i); + for (let o = 0; o < i; o++) { + const i = o << 1; + n[o] = qe.create(e.slice(i, i + 3 === t ? t : i + 2)) + } + t = i, e = n + } + return e[0] + }(e) : function(e) { + let t = e[0], + i = e[1]; + for (let n = 2; n < e.length; n++) { + const o = e[n]; + rt(t, i) <= rt(i, o) ? (t = st(t, i), i = o) : i = st(i, o) + } + return st(t, i) + }(e) + }(t) + } + parseChild(e) { + if (this.oldNodeReader) { + const t = this.positionMapper.getDistanceToNextChange(this.tokenizer.offset); + if (0 !== t) { + const i = this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange( + this.tokenizer.offset), (i => { + if (!We(i.length, t)) return !1; + const n = Pe(i.length) === Pe(t); + return i.canBeReused(e, n) + })); + if (i) return this._itemsFromCache++, this.tokenizer.skip(i.length), + i + } + } + this._itemsConstructed++; + const t = this.tokenizer.read(); + switch (t.kind) { + case 2: + return new Xe(t.category, t.length, this.denseKeyProvider); + case 0: + return t.astNode; + case 1: + const i = e.add(t.category, this.denseKeyProvider), + n = this.parseList(i), + o = this.tokenizer.peek(); + return o && 2 === o.kind && o.category === t.category ? (this.tokenizer + .read(), $e.create(t.category, t.astNode, n, o.astNode)) : $e.create( + t.category, t.astNode, n, null); + default: + throw new Error("unexpected") + } + } + } + class ht extends r.JT { + constructor(e) { + super(), this.textModel = e, this.didChangeDecorationsEmitter = new o + .Q5, this.cache = this._register(new r.XK), this._register(Se.zu.onDidChange( + (e => { + var t; + (null === (t = this.cache.value) || void 0 === t ? void 0 : t.object + .didLanguageChange(e.languageIdentifier.id)) && (this.cache.clear(), + this.updateCache()) + }))), this._register(e.onDidChangeOptions((e => { + this.cache.clear(), this.updateCache() + }))), this._register(e.onDidChangeAttached((() => { + this.updateCache() + }))) + } + get isDocumentSupported() { + return this.textModel.getValueLength() <= 5e6 + } + updateCache() { + const e = this.textModel.getOptions().bracketPairColorizationOptions; + if (this.textModel.isAttachedToEditor() && this.isDocumentSupported && + e.enabled) { + if (!this.cache.value) { + const e = new r.SL; + this.cache.value = (t = e.add(new ut(this.textModel)), i = e, { + object: t, + dispose: () => null == i ? void 0 : i.dispose() + }), e.add(this.cache.value.object.onDidChangeDecorations((e => + this.didChangeDecorationsEmitter.fire(e)))), this.didChangeDecorationsEmitter + .fire() + } + } else this.cache.clear(), this.didChangeDecorationsEmitter.fire(); + var t, i + } + handleContentChanged(e) { + var t; + null === (t = this.cache.value) || void 0 === t || t.object.handleContentChanged( + e) + } + getDecorationsInRange(e, t, i) { + var n; + return void 0 === t ? [] : (null === (n = this.cache.value) || void 0 === + n ? void 0 : n.object.getDecorationsInRange(e, t, i)) || [] + } + getAllDecorations(e, t) { + var i; + return void 0 === e ? [] : (null === (i = this.cache.value) || void 0 === + i ? void 0 : i.object.getAllDecorations(e, t)) || [] + } + onDidChangeDecorations(e) { + return this.didChangeDecorationsEmitter.event(e) + } + } + class ut extends r.JT { + constructor(e) { + if (super(), this.textModel = e, this.didChangeDecorationsEmitter = + new o.Q5, this.colorProvider = new mt, this.brackets = new ot([]), + this.denseKeyProvider = new Ee, this.onDidChangeDecorations = this.didChangeDecorationsEmitter + .event, this._register(e.onBackgroundTokenizationStateChanged((() => { + if (2 === e.backgroundTokenizationState) { + const e = void 0 === this.initialAstWithoutTokens; + this.initialAstWithoutTokens = void 0, e || this.didChangeDecorationsEmitter + .fire() + } + }))), this._register(e.onDidChangeTokens((({ + ranges: e + }) => { + const t = e.map((e => new He(Re(e.fromLineNumber - 1, 0), Re(e.toLineNumber, + 0), Re(e.toLineNumber - e.fromLineNumber + 1, 0)))); + this.astWithTokens = this.parseDocumentFromTextBuffer(t, this.astWithTokens), + this.initialAstWithoutTokens || this.didChangeDecorationsEmitter + .fire() + }))), 0 === e.backgroundTokenizationState) { + const e = this.brackets.getSingleLanguageBracketTokens(this.textModel + .getLanguageIdentifier().id), + t = new it(this.textModel.getValue(), e); + this.initialAstWithoutTokens = dt(t, [], void 0, this.denseKeyProvider), + this.astWithTokens = this.initialAstWithoutTokens.clone() + } else 2 === e.backgroundTokenizationState ? (this.initialAstWithoutTokens = + void 0, this.astWithTokens = this.parseDocumentFromTextBuffer([], + void 0)) : 1 === e.backgroundTokenizationState && (this.initialAstWithoutTokens = + this.parseDocumentFromTextBuffer([], void 0), this.astWithTokens = + this.initialAstWithoutTokens.clone()) + } + didLanguageChange(e) { + return this.brackets.didLanguageChange(e) + } + handleContentChanged(e) { + const t = e.changes.map((e => { + const t = c.e.lift(e.range); + return new He(ze(t.getStartPosition()), ze(t.getEndPosition()), + function(e) { + const t = (0, s.uq)(e); + return Re(t.length - 1, t[t.length - 1].length) + }(e.text)) + })).reverse(); + this.astWithTokens = this.parseDocumentFromTextBuffer(t, this.astWithTokens), + this.initialAstWithoutTokens && (this.initialAstWithoutTokens = this + .parseDocumentFromTextBuffer(t, this.initialAstWithoutTokens)) + } + parseDocumentFromTextBuffer(e, t) { + const i = t; + return dt(new et(this.textModel, this.brackets), e, i, this.denseKeyProvider) + } + getBracketsInRange(e) { + const t = Re(e.startLineNumber - 1, e.startColumn - 1), + i = Re(e.endLineNumber - 1, e.endColumn - 1), + n = new Array, + o = this.initialAstWithoutTokens || this.astWithTokens; + return gt(o, 0, o.length, t, i, n), n + } + getDecorationsInRange(e, t, i) { + const n = new Array, + o = this.getBracketsInRange(e); + for (const e of o) n.push({ + id: `bracket${e.hash()}`, + options: { + description: "BracketPairColorization", + inlineClassName: this.colorProvider.getInlineClassName(e) + }, + ownerId: 0, + range: e.range + }); + return n + } + getAllDecorations(e, t) { + return this.getDecorationsInRange(new c.e(1, 1, this.textModel.getLineCount(), + 1), e, t) + } + } + + function gt(e, t, i, n, o, r, s = 0) { + if (1 === e.kind) { + const e = Ve(t, i); + r.push(new pt(e, s - 1, !1)) + } else if (3 === e.kind) { + const e = Ve(t, i); + r.push(new pt(e, s - 1, !0)) + } else { + 2 === e.kind && s++; + for (const a of e.children) i = Fe(t, a.length), We(t, o) && i >= n && + gt(a, t, i, n, o, r, s), t = i + } + } + class pt { + constructor(e, t, i) { + this.range = e, this.level = t, this.isInvalid = i + } + hash() { + return `${this.range.toString()}-${this.level}` + } + } + class mt { + constructor() { + this.unexpectedClosingBracketClassName = "unexpected-closing-bracket" + } + getInlineClassName(e) { + return e.isInvalid ? this.unexpectedClosingBracketClassName : this.getInlineClassNameOfLevel( + e.level) + } + getInlineClassNameOfLevel(e) { + return "bracket-highlighting-" + e % 30 + } + } + + function ft(e, t) { + return ("string" == typeof e ? function(e) { + const t = new he; + return t.acceptChunk(e), t.finish() + }(e) : e).create(t) + }(0, Te.Ic)(((e, t) => { + const i = [Ie.zJ, Ie.Vs, Ie.CE, Ie.UP, Ie.r0, Ie.m1], + n = new mt; + t.addRule( + `.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(Ie.ts)}; }` + ); + let o = i.map((t => e.getColor(t))).filter((e => !!e)).filter((e => !e + .isTransparent())); + for (let e = 0; e < 30; e++) { + const i = o[e % o.length]; + t.addRule( + `.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }` + ) + } + })); + let _t = 0; + class bt { + constructor(e) { + this._source = e, this._eos = !1 + } + read() { + if (this._eos) return null; + let e = [], + t = 0, + i = 0; + for (;;) { + let n = this._source.read(); + if (null === n) return this._eos = !0, 0 === t ? null : e.join(""); + if (n.length > 0 && (e[t++] = n, i += n.length), i >= 65536) return e + .join("") + } + } + } + const vt = () => { + throw new Error("Invalid change accessor") + }; + class wt { + constructor() { + this._searchCanceledBrand = void 0 + } + } + + function Ct(e) { + return e instanceof wt ? null : e + } + wt.INSTANCE = new wt; + class yt extends r.JT { + constructor(e, t, i, n = null, r) { + super(), this._onWillDispose = this._register(new o.Q5), this.onWillDispose = + this._onWillDispose.event, this._onDidChangeDecorations = this._register( + new Rt((e => this.handleBeforeFireDecorationsChangedEvent(e)))), + this.onDidChangeDecorations = this._onDidChangeDecorations.event, + this._onDidChangeLanguage = this._register(new o.Q5), this.onDidChangeLanguage = + this._onDidChangeLanguage.event, this._onDidChangeLanguageConfiguration = + this._register(new o.Q5), this.onDidChangeLanguageConfiguration = + this._onDidChangeLanguageConfiguration.event, this._onDidChangeTokens = + this._register(new o.Q5), this.onDidChangeTokens = this._onDidChangeTokens + .event, this._onDidChangeOptions = this._register(new o.Q5), this.onDidChangeOptions = + this._onDidChangeOptions.event, this._onDidChangeAttached = this._register( + new o.Q5), this.onDidChangeAttached = this._onDidChangeAttached.event, + this._onDidChangeContentOrInjectedText = this._register(new o.Q5), + this.onDidChangeContentOrInjectedText = this._onDidChangeContentOrInjectedText + .event, this._eventEmitter = this._register(new Ot), this._backgroundTokenizationState = + 0, this._onBackgroundTokenizationStateChanged = this._register(new o + .Q5), this.onBackgroundTokenizationStateChanged = this._onBackgroundTokenizationStateChanged + .event, this._register(this._eventEmitter.fastEvent((e => { + this._onDidChangeContentOrInjectedText.fire(e.rawContentChangedEvent) + }))), _t++, this.id = "$model" + _t, this.isForSimpleWidget = t.isForSimpleWidget, + this._associatedResource = null == n ? a.o.parse("inmemory://model/" + + _t) : n, this._undoRedoService = r, this._attachedEditorCount = 0; + const { + textBuffer: l, + disposable: d + } = ft(e, t.defaultEOL); + this._buffer = l, this._bufferDisposable = d, this._options = yt.resolveOptions( + this._buffer, t); + const h = this._buffer.getLineCount(), + u = this._buffer.getValueLengthInRange(new c.e(1, 1, h, this._buffer + .getLineLength(h) + 1), 0); + t.largeFileOptimizations ? this._isTooLargeForTokenization = u > yt.LARGE_FILE_SIZE_THRESHOLD || + h > yt.LARGE_FILE_LINE_COUNT_THRESHOLD : this._isTooLargeForTokenization = ! + 1, this._isTooLargeForSyncing = u > yt.MODEL_SYNC_LIMIT, this._versionId = + 1, this._alternativeVersionId = 1, this._initialUndoRedoSnapshot = + null, this._isDisposed = !1, this._isDisposing = !1, this._languageIdentifier = + i || fe.pA, this._languageRegistryListener = Se.zu.onDidChange((e => { + e.languageIdentifier.id === this._languageIdentifier.id && this._onDidChangeLanguageConfiguration + .fire({}) + })), this._instanceId = s.PJ(_t), this._lastDecorationId = 0, this._decorations = + Object.create(null), this._decorationsTree = new kt, this._commandManager = + new g.NL(this, r), this._isUndoing = !1, this._isRedoing = !1, this._trimAutoWhitespaceLines = + null, this._tokens = new ae.Rl, this._tokens2 = new ae.cx, this._tokenization = + new we(this), this._bracketPairColorizer = this._register(new ht( + this)), this._decorationProvider = this._bracketPairColorizer, this + ._register(this._decorationProvider.onDidChangeDecorations((() => { + this._onDidChangeDecorations.beginDeferredEmit(), this._onDidChangeDecorations + .fire(), this._onDidChangeDecorations.endDeferredEmit() + }))) + } + static resolveOptions(e, t) { + if (t.detectIndentation) { + const i = f(e, t.tabSize, t.insertSpaces); + return new u.dJ({ + tabSize: i.tabSize, + indentSize: i.tabSize, + insertSpaces: i.insertSpaces, + trimAutoWhitespace: t.trimAutoWhitespace, + defaultEOL: t.defaultEOL, + bracketPairColorizationOptions: t.bracketPairColorizationOptions + }) + } + return new u.dJ({ + tabSize: t.tabSize, + indentSize: t.indentSize, + insertSpaces: t.insertSpaces, + trimAutoWhitespace: t.trimAutoWhitespace, + defaultEOL: t.defaultEOL, + bracketPairColorizationOptions: t.bracketPairColorizationOptions + }) + } + onDidChangeContentFast(e) { + return this._eventEmitter.fastEvent((t => e(t.contentChangedEvent))) + } + onDidChangeContent(e) { + return this._eventEmitter.slowEvent((t => e(t.contentChangedEvent))) + } + get backgroundTokenizationState() { + return this._backgroundTokenizationState + } + setBackgroundTokenizationState(e) { + this._backgroundTokenizationState !== e && (this._backgroundTokenizationState = + e, this._onBackgroundTokenizationStateChanged.fire()) + } + dispose() { + this._isDisposing = !0, this._onWillDispose.fire(), this._languageRegistryListener + .dispose(), this._tokenization.dispose(), this._isDisposed = !0, + super.dispose(), this._bufferDisposable.dispose(), this._isDisposing = ! + 1; + const e = new de([], "", "\n", !1, !1, !0, !0); + e.dispose(), this._buffer = e + } + _assertNotDisposed() { + if (this._isDisposed) throw new Error("Model is disposed!") + } + _emitContentChangedEvent(e, t) { + this._bracketPairColorizer.handleContentChanged(t), this._isDisposing || + this._eventEmitter.fire(new ue.fV(e, t)) + } + setValue(e) { + if (this._assertNotDisposed(), null === e) return; + const { + textBuffer: t, + disposable: i + } = ft(e, this._options.defaultEOL); + this._setValueFromTextBuffer(t, i) + } + _createContentChanged2(e, t, i, n, o, r, s) { + return { + changes: [{ + range: e, + rangeOffset: t, + rangeLength: i, + text: n + }], + eol: this._buffer.getEOL(), + versionId: this.getVersionId(), + isUndoing: o, + isRedoing: r, + isFlush: s + } + } + _setValueFromTextBuffer(e, t) { + this._assertNotDisposed(); + const i = this.getFullModelRange(), + n = this.getValueLengthInRange(i), + o = this.getLineCount(), + r = this.getLineMaxColumn(o); + this._buffer = e, this._bufferDisposable.dispose(), this._bufferDisposable = + t, this._increaseVersionId(), this._tokens.flush(), this._tokens2.flush(), + this._decorations = Object.create(null), this._decorationsTree = new kt, + this._commandManager.clear(), this._trimAutoWhitespaceLines = null, + this._emitContentChangedEvent(new ue.dQ([new ue.Jx], this._versionId, ! + 1, !1), this._createContentChanged2(new c.e(1, 1, o, r), 0, n, + this.getValue(), !1, !1, !0)) + } + setEOL(e) { + this._assertNotDisposed(); + const t = 1 === e ? "\r\n" : "\n"; + if (this._buffer.getEOL() === t) return; + const i = this.getFullModelRange(), + n = this.getValueLengthInRange(i), + o = this.getLineCount(), + r = this.getLineMaxColumn(o); + this._onBeforeEOLChange(), this._buffer.setEOL(t), this._increaseVersionId(), + this._onAfterEOLChange(), this._emitContentChangedEvent(new ue.dQ([ + new ue.CZ + ], this._versionId, !1, !1), this._createContentChanged2(new c.e(1, + 1, o, r), 0, n, this.getValue(), !1, !1, !1)) + } + _onBeforeEOLChange() { + this._decorationsTree.ensureAllNodesHaveRanges(this) + } + _onAfterEOLChange() { + const e = this.getVersionId(), + t = this._decorationsTree.collectNodesPostOrder(); + for (let i = 0, n = t.length; i < n; i++) { + const n = t[i], + o = n.range, + r = n.cachedAbsoluteStart - n.start, + s = this._buffer.getOffsetAt(o.startLineNumber, o.startColumn), + a = this._buffer.getOffsetAt(o.endLineNumber, o.endColumn); + n.cachedAbsoluteStart = s, n.cachedAbsoluteEnd = a, n.cachedVersionId = + e, n.start = s - r, n.end = a - r, P(n) + } + } + onBeforeAttached() { + this._attachedEditorCount++, 1 === this._attachedEditorCount && this._onDidChangeAttached + .fire(void 0) + } + onBeforeDetached() { + this._attachedEditorCount--, 0 === this._attachedEditorCount && this._onDidChangeAttached + .fire(void 0) + } + isAttachedToEditor() { + return this._attachedEditorCount > 0 + } + getAttachedEditorCount() { + return this._attachedEditorCount + } + isTooLargeForSyncing() { + return this._isTooLargeForSyncing + } + isTooLargeForTokenization() { + return this._isTooLargeForTokenization + } + isDisposed() { + return this._isDisposed + } + isDominatedByLongLines() { + if (this._assertNotDisposed(), this.isTooLargeForTokenization()) + return !1; + let e = 0, + t = 0; + const i = this._buffer.getLineCount(); + for (let n = 1; n <= i; n++) { + const i = this._buffer.getLineLength(n); + i >= 1e4 ? t += i : e += i + } + return t > e + } + get uri() { + return this._associatedResource + } + getOptions() { + return this._assertNotDisposed(), this._options + } + getFormattingOptions() { + return { + tabSize: this._options.indentSize, + insertSpaces: this._options.insertSpaces + } + } + updateOptions(e) { + this._assertNotDisposed(); + let t = void 0 !== e.tabSize ? e.tabSize : this._options.tabSize, + i = void 0 !== e.indentSize ? e.indentSize : this._options.indentSize, + n = void 0 !== e.insertSpaces ? e.insertSpaces : this._options.insertSpaces, + o = void 0 !== e.trimAutoWhitespace ? e.trimAutoWhitespace : this._options + .trimAutoWhitespace, + r = void 0 !== e.bracketColorizationOptions ? e.bracketColorizationOptions : + this._options.bracketPairColorizationOptions, + s = new u.dJ({ + tabSize: t, + indentSize: i, + insertSpaces: n, + defaultEOL: this._options.defaultEOL, + trimAutoWhitespace: o, + bracketPairColorizationOptions: r + }); + if (this._options.equals(s)) return; + let a = this._options.createChangeEvent(s); + this._options = s, this._onDidChangeOptions.fire(a) + } + detectIndentation(e, t) { + this._assertNotDisposed(); + let i = f(this._buffer, t, e); + this.updateOptions({ + insertSpaces: i.insertSpaces, + tabSize: i.tabSize, + indentSize: i.tabSize + }) + } + static _normalizeIndentationFromWhitespace(e, t, i) { + let n = 0; + for (let i = 0; i < e.length; i++) "\t" === e.charAt(i) ? n += t : n++; + let o = ""; + if (!i) { + let e = Math.floor(n / t); + n %= t; + for (let t = 0; t < e; t++) o += "\t" + } + for (let e = 0; e < n; e++) o += " "; + return o + } + static normalizeIndentation(e, t, i) { + let n = s.LC(e); + return -1 === n && (n = e.length), yt._normalizeIndentationFromWhitespace( + e.substring(0, n), t, i) + e.substring(n) + } + normalizeIndentation(e) { + return this._assertNotDisposed(), yt.normalizeIndentation(e, this._options + .indentSize, this._options.insertSpaces) + } + getVersionId() { + return this._assertNotDisposed(), this._versionId + } + mightContainRTL() { + return this._buffer.mightContainRTL() + } + mightContainUnusualLineTerminators() { + return this._buffer.mightContainUnusualLineTerminators() + } + removeUnusualLineTerminators(e = null) { + const t = this.findMatches(s.Qe.source, !1, !0, !1, null, !1, + 1073741824); + this._buffer.resetMightContainUnusualLineTerminators(), this.pushEditOperations( + e, t.map((e => ({ + range: e.range, + text: null + }))), (() => null)) + } + mightContainNonBasicASCII() { + return this._buffer.mightContainNonBasicASCII() + } + getAlternativeVersionId() { + return this._assertNotDisposed(), this._alternativeVersionId + } + getInitialUndoRedoSnapshot() { + return this._assertNotDisposed(), this._initialUndoRedoSnapshot + } + getOffsetAt(e) { + this._assertNotDisposed(); + let t = this._validatePosition(e.lineNumber, e.column, 0); + return this._buffer.getOffsetAt(t.lineNumber, t.column) + } + getPositionAt(e) { + this._assertNotDisposed(); + let t = Math.min(this._buffer.getLength(), Math.max(0, e)); + return this._buffer.getPositionAt(t) + } + _increaseVersionId() { + this._versionId = this._versionId + 1, this._alternativeVersionId = + this._versionId + } + _overwriteVersionId(e) { + this._versionId = e + } + _overwriteAlternativeVersionId(e) { + this._alternativeVersionId = e + } + _overwriteInitialUndoRedoSnapshot(e) { + this._initialUndoRedoSnapshot = e + } + getValue(e, t = !1) { + this._assertNotDisposed(); + const i = this.getFullModelRange(), + n = this.getValueInRange(i, e); + return t ? this._buffer.getBOM() + n : n + } + createSnapshot(e = !1) { + return new bt(this._buffer.createSnapshot(e)) + } + getValueLength(e, t = !1) { + this._assertNotDisposed(); + const i = this.getFullModelRange(), + n = this.getValueLengthInRange(i, e); + return t ? this._buffer.getBOM().length + n : n + } + getValueInRange(e, t = 0) { + return this._assertNotDisposed(), this._buffer.getValueInRange(this.validateRange( + e), t) + } + getValueLengthInRange(e, t = 0) { + return this._assertNotDisposed(), this._buffer.getValueLengthInRange( + this.validateRange(e), t) + } + getCharacterCountInRange(e, t = 0) { + return this._assertNotDisposed(), this._buffer.getCharacterCountInRange( + this.validateRange(e), t) + } + getLineCount() { + return this._assertNotDisposed(), this._buffer.getLineCount() + } + getLineContent(e) { + if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error( + "Illegal value for lineNumber"); + return this._buffer.getLineContent(e) + } + getLineLength(e) { + if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error( + "Illegal value for lineNumber"); + return this._buffer.getLineLength(e) + } + getLinesContent() { + return this._assertNotDisposed(), this._buffer.getLinesContent() + } + getEOL() { + return this._assertNotDisposed(), this._buffer.getEOL() + } + getEndOfLineSequence() { + return this._assertNotDisposed(), "\n" === this._buffer.getEOL() ? 0 : + 1 + } + getLineMinColumn(e) { + return this._assertNotDisposed(), 1 + } + getLineMaxColumn(e) { + if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error( + "Illegal value for lineNumber"); + return this._buffer.getLineLength(e) + 1 + } + getLineFirstNonWhitespaceColumn(e) { + if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error( + "Illegal value for lineNumber"); + return this._buffer.getLineFirstNonWhitespaceColumn(e) + } + getLineLastNonWhitespaceColumn(e) { + if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error( + "Illegal value for lineNumber"); + return this._buffer.getLineLastNonWhitespaceColumn(e) + } + _validateRangeRelaxedNoAllocations(e) { + const t = this._buffer.getLineCount(), + i = e.startLineNumber, + n = e.startColumn; + let o = Math.floor("number" != typeof i || isNaN(i) ? 1 : i), + r = Math.floor("number" != typeof n || isNaN(n) ? 1 : n); + if (o < 1) o = 1, r = 1; + else if (o > t) o = t, r = this.getLineMaxColumn(o); + else if (r <= 1) r = 1; + else { + const e = this.getLineMaxColumn(o); + r >= e && (r = e) + } + const s = e.endLineNumber, + a = e.endColumn; + let l = Math.floor("number" != typeof s || isNaN(s) ? 1 : s), + d = Math.floor("number" != typeof a || isNaN(a) ? 1 : a); + if (l < 1) l = 1, d = 1; + else if (l > t) l = t, d = this.getLineMaxColumn(l); + else if (d <= 1) d = 1; + else { + const e = this.getLineMaxColumn(l); + d >= e && (d = e) + } + return i === o && n === r && s === l && a === d && e instanceof c.e && + !(e instanceof h.Y) ? e : new c.e(o, r, l, d) + } + _isValidPosition(e, t, i) { + if ("number" != typeof e || "number" != typeof t) return !1; + if (isNaN(e) || isNaN(t)) return !1; + if (e < 1 || t < 1) return !1; + if ((0 | e) !== e || (0 | t) !== t) return !1; + if (e > this._buffer.getLineCount()) return !1; + if (1 === t) return !0; + if (t > this.getLineMaxColumn(e)) return !1; + if (1 === i) { + const i = this._buffer.getLineCharCode(e, t - 2); + if (s.ZG(i)) return !1 + } + return !0 + } + _validatePosition(e, t, i) { + const n = Math.floor("number" != typeof e || isNaN(e) ? 1 : e), + o = Math.floor("number" != typeof t || isNaN(t) ? 1 : t), + r = this._buffer.getLineCount(); + if (n < 1) return new d.L(1, 1); + if (n > r) return new d.L(r, this.getLineMaxColumn(r)); + if (o <= 1) return new d.L(n, 1); + const a = this.getLineMaxColumn(n); + if (o >= a) return new d.L(n, a); + if (1 === i) { + const e = this._buffer.getLineCharCode(n, o - 2); + if (s.ZG(e)) return new d.L(n, o - 1) + } + return new d.L(n, o) + } + validatePosition(e) { + return this._assertNotDisposed(), e instanceof d.L && this._isValidPosition( + e.lineNumber, e.column, 1) ? e : this._validatePosition(e.lineNumber, + e.column, 1) + } + _isValidRange(e, t) { + const i = e.startLineNumber, + n = e.startColumn, + o = e.endLineNumber, + r = e.endColumn; + if (!this._isValidPosition(i, n, 0)) return !1; + if (!this._isValidPosition(o, r, 0)) return !1; + if (1 === t) { + const e = n > 1 ? this._buffer.getLineCharCode(i, n - 2) : 0, + t = r > 1 && r <= this._buffer.getLineLength(o) ? this._buffer.getLineCharCode( + o, r - 2) : 0, + a = s.ZG(e), + l = s.ZG(t); + return !a && !l + } + return !0 + } + validateRange(e) { + if (this._assertNotDisposed(), e instanceof c.e && !(e instanceof h.Y) && + this._isValidRange(e, 1)) return e; + const t = this._validatePosition(e.startLineNumber, e.startColumn, 0), + i = this._validatePosition(e.endLineNumber, e.endColumn, 0), + n = t.lineNumber, + o = t.column, + r = i.lineNumber, + a = i.column; { + const e = o > 1 ? this._buffer.getLineCharCode(n, o - 2) : 0, + t = a > 1 && a <= this._buffer.getLineLength(r) ? this._buffer.getLineCharCode( + r, a - 2) : 0, + i = s.ZG(e), + l = s.ZG(t); + return i || l ? n === r && o === a ? new c.e(n, o - 1, r, a - 1) : i && + l ? new c.e(n, o - 1, r, a + 1) : i ? new c.e(n, o - 1, r, a) : new c + .e(n, o, r, a + 1) : new c.e(n, o, r, a) + } + } + modifyPosition(e, t) { + this._assertNotDisposed(); + let i = this.getOffsetAt(e) + t; + return this.getPositionAt(Math.min(this._buffer.getLength(), Math.max( + 0, i))) + } + getFullModelRange() { + this._assertNotDisposed(); + const e = this.getLineCount(); + return new c.e(1, 1, e, this.getLineMaxColumn(e)) + } + findMatchesLineByLine(e, t, i, n) { + return this._buffer.findMatchesLineByLine(e, t, i, n) + } + findMatches(e, t, i, n, o, r, s = 999) { + this._assertNotDisposed(); + let a = null; + null !== t && (Array.isArray(t) || (t = [t]), t.every((e => c.e.isIRange( + e))) && (a = t.map((e => this.validateRange(e))))), null === a && ( + a = [this.getFullModelRange()]), a = a.sort(((e, t) => e.startLineNumber - + t.startLineNumber || e.startColumn - t.startColumn)); + const l = []; + let d; + if (l.push(a.reduce(((e, t) => c.e.areIntersecting(e, t) ? e.plusRange( + t) : (l.push(e), t)))), !i && e.indexOf("\n") < 0) { + const t = new Q.bc(e, i, n, o).parseSearchRequest(); + if (!t) return []; + d = e => this.findMatchesLineByLine(e, t, r, s) + } else d = t => Q.pM.findMatches(this, new Q.bc(e, i, n, o), t, r, s); + return l.map(d).reduce(((e, t) => e.concat(t)), []) + } + findNextMatch(e, t, i, n, o, r) { + this._assertNotDisposed(); + const s = this.validatePosition(t); + if (!i && e.indexOf("\n") < 0) { + const t = new Q.bc(e, i, n, o).parseSearchRequest(); + if (!t) return null; + const a = this.getLineCount(); + let l = new c.e(s.lineNumber, s.column, a, this.getLineMaxColumn(a)), + d = this.findMatchesLineByLine(l, t, r, 1); + return Q.pM.findNextMatch(this, new Q.bc(e, i, n, o), s, r), d.length > + 0 ? d[0] : (l = new c.e(1, 1, s.lineNumber, this.getLineMaxColumn(s + .lineNumber)), d = this.findMatchesLineByLine(l, t, r, 1), d.length > + 0 ? d[0] : null) + } + return Q.pM.findNextMatch(this, new Q.bc(e, i, n, o), s, r) + } + findPreviousMatch(e, t, i, n, o, r) { + this._assertNotDisposed(); + const s = this.validatePosition(t); + return Q.pM.findPreviousMatch(this, new Q.bc(e, i, n, o), s, r) + } + pushStackElement() { + this._commandManager.pushStackElement() + } + popStackElement() { + this._commandManager.popStackElement() + } + pushEOL(e) { + if (("\n" === this.getEOL() ? 0 : 1) !== e) try { + this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter + .beginDeferredEmit(), null === this._initialUndoRedoSnapshot && ( + this._initialUndoRedoSnapshot = this._undoRedoService.createSnapshot( + this.uri)), this._commandManager.pushEOL(e) + } finally { + this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit() + } + } + _validateEditOperation(e) { + return e instanceof u.Qi ? e : new u.Qi(e.identifier || null, this.validateRange( + e.range), e.text, e.forceMoveMarkers || !1, e.isAutoWhitespaceEdit || + !1, e._isTracked || !1) + } + _validateEditOperations(e) { + const t = []; + for (let i = 0, n = e.length; i < n; i++) t[i] = this._validateEditOperation( + e[i]); + return t + } + pushEditOperations(e, t, i) { + try { + return this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter + .beginDeferredEmit(), this._pushEditOperations(e, this._validateEditOperations( + t), i) + } finally { + this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit() + } + } + _pushEditOperations(e, t, i) { + if (this._options.trimAutoWhitespace && this._trimAutoWhitespaceLines) { + let i = t.map((e => ({ + range: this.validateRange(e.range), + text: e.text + }))), + n = !0; + if (e) + for (let t = 0, o = e.length; t < o; t++) { + let o = e[t], + r = !1; + for (let e = 0, t = i.length; e < t; e++) { + let t = i[e].range, + n = t.startLineNumber > o.endLineNumber, + s = o.startLineNumber > t.endLineNumber; + if (!n && !s) { + r = !0; + break + } + } + if (!r) { + n = !1; + break + } + } + if (n) + for (let e = 0, n = this._trimAutoWhitespaceLines.length; e < n; e++) { + let n = this._trimAutoWhitespaceLines[e], + o = this.getLineMaxColumn(n), + r = !0; + for (let e = 0, t = i.length; e < t; e++) { + let t = i[e].range, + s = i[e].text; + if (!(n < t.startLineNumber || n > t.endLineNumber || n === t.startLineNumber && + t.startColumn === o && t.isEmpty() && s && s.length > 0 && "\n" === + s.charAt(0) || n === t.startLineNumber && 1 === t.startColumn && + t.isEmpty() && s && s.length > 0 && "\n" === s.charAt(s.length - + 1))) { + r = !1; + break + } + } + if (r) { + const e = new c.e(n, 1, n, o); + t.push(new u.Qi(null, e, null, !1, !1, !1)) + } + } + this._trimAutoWhitespaceLines = null + } + return null === this._initialUndoRedoSnapshot && (this._initialUndoRedoSnapshot = + this._undoRedoService.createSnapshot(this.uri)), this._commandManager + .pushEditOperation(e, t, i) + } + _applyUndo(e, t, i, n) { + const o = e.map((e => { + const t = this.getPositionAt(e.newPosition), + i = this.getPositionAt(e.newEnd); + return { + range: new c.e(t.lineNumber, t.column, i.lineNumber, i.column), + text: e.oldText + } + })); + this._applyUndoRedoEdits(o, t, !0, !1, i, n) + } + _applyRedo(e, t, i, n) { + const o = e.map((e => { + const t = this.getPositionAt(e.oldPosition), + i = this.getPositionAt(e.oldEnd); + return { + range: new c.e(t.lineNumber, t.column, i.lineNumber, i.column), + text: e.newText + } + })); + this._applyUndoRedoEdits(o, t, !1, !0, i, n) + } + _applyUndoRedoEdits(e, t, i, n, o, r) { + try { + this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter + .beginDeferredEmit(), this._isUndoing = i, this._isRedoing = n, + this.applyEdits(e, !1), this.setEOL(t), this._overwriteAlternativeVersionId( + o) + } finally { + this._isUndoing = !1, this._isRedoing = !1, this._eventEmitter.endDeferredEmit( + r), this._onDidChangeDecorations.endDeferredEmit() + } + } + applyEdits(e, t = !1) { + try { + this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter + .beginDeferredEmit(); + const i = this._validateEditOperations(e); + return this._doApplyEdits(i, t) + } finally { + this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit() + } + } + _doApplyEdits(e, t) { + const i = this._buffer.getLineCount(), + n = this._buffer.applyEdits(e, this._options.trimAutoWhitespace, t), + o = this._buffer.getLineCount(), + r = n.changes; + if (this._trimAutoWhitespaceLines = n.trimAutoWhitespaceLineNumbers, + 0 !== r.length) { + for (let e = 0, t = r.length; e < t; e++) { + const t = r[e], + [i, n, o] = (0, ae.QZ)(t.text); + this._tokens.acceptEdit(t.range, i, n), this._tokens2.acceptEdit(t.range, + i, n, o, t.text.length > 0 ? t.text.charCodeAt(0) : 0), this._decorationsTree + .acceptReplace(t.rangeOffset, t.rangeLength, t.text.length, t.forceMoveMarkers) + } + let e = []; + this._increaseVersionId(); + let t = i; + for (let i = 0, n = r.length; i < n; i++) { + const n = r[i], + [s] = (0, ae.QZ)(n.text); + this._onDidChangeDecorations.fire(); + const a = n.range.startLineNumber, + l = n.range.endLineNumber, + c = l - a, + h = s, + u = Math.min(c, h), + g = h - c, + p = o - t - g + a, + m = p, + f = p + h, + _ = this._decorationsTree.getInjectedTextInInterval(this, this.getOffsetAt( + new d.L(m, 1)), this.getOffsetAt(new d.L(f, this.getLineMaxColumn( + f))), 0), + b = ue.gk.fromDecorations(_), + v = new ge.H9(b); + for (let t = u; t >= 0; t--) { + const i = a + t, + n = p + t; + v.takeFromEndWhile((e => e.lineNumber > n)); + const o = v.takeFromEndWhile((e => e.lineNumber === n)); + e.push(new ue.rU(i, this.getLineContent(n), o)) + } + if (u < c) { + const t = a + u; + e.push(new ue.lN(t + 1, l)) + } + if (u < h) { + const i = new ge.H9(b), + n = a + u, + r = h - u, + s = o - t - r + n + 1; + let l = [], + d = []; + for (let e = 0; e < r; e++) { + let t = s + e; + d[e] = this.getLineContent(t), i.takeWhile((e => e.lineNumber < t)), + l[e] = i.takeWhile((e => e.lineNumber === t)) + } + e.push(new ue.Tx(n + 1, a + h, d, l)) + } + t += g + } + this._emitContentChangedEvent(new ue.dQ(e, this.getVersionId(), this + ._isUndoing, this._isRedoing), { + changes: r, + eol: this._buffer.getEOL(), + versionId: this.getVersionId(), + isUndoing: this._isUndoing, + isRedoing: this._isRedoing, + isFlush: !1 + }) + } + return null === n.reverseEdits ? void 0 : n.reverseEdits + } + undo() { + return this._undoRedoService.undo(this.uri) + } + canUndo() { + return this._undoRedoService.canUndo(this.uri) + } + redo() { + return this._undoRedoService.redo(this.uri) + } + canRedo() { + return this._undoRedoService.canRedo(this.uri) + } + handleBeforeFireDecorationsChangedEvent(e) { + if (null === e || 0 === e.size) return; + const t = [...e].map((e => new ue.rU(e, this.getLineContent(e), this._getInjectedTextInLine( + e)))); + this._onDidChangeContentOrInjectedText.fire(new ue.D8(t)) + } + changeDecorations(e, t = 0) { + this._assertNotDisposed(); + try { + return this._onDidChangeDecorations.beginDeferredEmit(), this._changeDecorations( + t, e) + } finally { + this._onDidChangeDecorations.endDeferredEmit() + } + } + _changeDecorations(e, t) { + let i = { + addDecoration: (t, i) => this._deltaDecorationsImpl(e, [], [{ + range: t, + options: i + }])[0], + changeDecoration: (e, t) => { + this._changeDecorationImpl(e, t) + }, + changeDecorationOptions: (e, t) => { + this._changeDecorationOptionsImpl(e, At(t)) + }, + removeDecoration: t => { + this._deltaDecorationsImpl(e, [t], []) + }, + deltaDecorations: (t, i) => 0 === t.length && 0 === i.length ? [] : this + ._deltaDecorationsImpl(e, t, i) + }, + o = null; + try { + o = t(i) + } catch (e) { + (0, n.dL)(e) + } + return i.addDecoration = vt, i.changeDecoration = vt, i.changeDecorationOptions = + vt, i.removeDecoration = vt, i.deltaDecorations = vt, o + } + deltaDecorations(e, t, i = 0) { + if (this._assertNotDisposed(), e || (e = []), 0 === e.length && 0 === + t.length) return []; + try { + return this._onDidChangeDecorations.beginDeferredEmit(), this._deltaDecorationsImpl( + i, e, t) + } finally { + this._onDidChangeDecorations.endDeferredEmit() + } + } + _getTrackedRange(e) { + return this.getDecorationRange(e) + } + _setTrackedRange(e, t, i) { + const n = e ? this._decorations[e] : null; + if (!n) return t ? this._deltaDecorationsImpl(0, [], [{ + range: t, + options: Mt[i] + }])[0] : null; + if (!t) return this._decorationsTree.delete(n), delete this._decorations[ + n.id], null; + const o = this._validateRangeRelaxedNoAllocations(t), + r = this._buffer.getOffsetAt(o.startLineNumber, o.startColumn), + s = this._buffer.getOffsetAt(o.endLineNumber, o.endColumn); + return this._decorationsTree.delete(n), n.reset(this.getVersionId(), + r, s, o), n.setOptions(Mt[i]), this._decorationsTree.insert(n), n.id + } + removeAllDecorationsWithOwnerId(e) { + if (this._isDisposed) return; + const t = this._decorationsTree.collectNodesFromOwner(e); + for (let e = 0, i = t.length; e < i; e++) { + const i = t[e]; + this._decorationsTree.delete(i), delete this._decorations[i.id] + } + } + getDecorationOptions(e) { + const t = this._decorations[e]; + return t ? t.options : null + } + getDecorationRange(e) { + const t = this._decorations[e]; + return t ? this._decorationsTree.getNodeRange(this, t) : null + } + getLineDecorations(e, t = 0, i = !1) { + return e < 1 || e > this.getLineCount() ? [] : this.getLinesDecorations( + e, e, t, i) + } + getLinesDecorations(e, t, i = 0, n = !1) { + let o = this.getLineCount(), + r = Math.min(o, Math.max(1, e)), + s = Math.min(o, Math.max(1, t)), + a = this.getLineMaxColumn(s); + const l = new c.e(r, 1, s, a), + d = this._getDecorationsInRange(l, i, n); + return d.push(...this._decorationProvider.getDecorationsInRange(l, i, + n)), d + } + getDecorationsInRange(e, t = 0, i = !1) { + let n = this.validateRange(e); + const o = this._getDecorationsInRange(n, t, i); + return o.push(...this._decorationProvider.getDecorationsInRange(n, t, + i)), o + } + getOverviewRulerDecorations(e = 0, t = !1) { + return this._decorationsTree.getAll(this, e, t, !0) + } + getInjectedTextDecorations(e = 0) { + return this._decorationsTree.getAllInjectedText(this, e) + } + _getInjectedTextInLine(e) { + const t = this._buffer.getOffsetAt(e, 1), + i = t + this._buffer.getLineLength(e), + n = this._decorationsTree.getInjectedTextInInterval(this, t, i, 0); + return ue.gk.fromDecorations(n).filter((t => t.lineNumber === e)) + } + getAllDecorations(e = 0, t = !1) { + const i = this._decorationsTree.getAll(this, e, t, !1); + return i.push(...this._decorationProvider.getAllDecorations(e, t)), i + } + _getDecorationsInRange(e, t, i) { + const n = this._buffer.getOffsetAt(e.startLineNumber, e.startColumn), + o = this._buffer.getOffsetAt(e.endLineNumber, e.endColumn); + return this._decorationsTree.getAllInInterval(this, n, o, t, i) + } + getRangeAt(e, t) { + return this._buffer.getRangeAt(e, t - e) + } + _changeDecorationImpl(e, t) { + const i = this._decorations[e]; + if (!i) return; + if (i.options.after) { + const t = this.getDecorationRange(e); + this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber) + } + if (i.options.before) { + const t = this.getDecorationRange(e); + this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber) + } + const n = this._validateRangeRelaxedNoAllocations(t), + o = this._buffer.getOffsetAt(n.startLineNumber, n.startColumn), + r = this._buffer.getOffsetAt(n.endLineNumber, n.endColumn); + this._decorationsTree.delete(i), i.reset(this.getVersionId(), o, r, n), + this._decorationsTree.insert(i), this._onDidChangeDecorations.checkAffectedAndFire( + i.options), i.options.after && this._onDidChangeDecorations.recordLineAffectedByInjectedText( + n.endLineNumber), i.options.before && this._onDidChangeDecorations.recordLineAffectedByInjectedText( + n.startLineNumber) + } + _changeDecorationOptionsImpl(e, t) { + const i = this._decorations[e]; + if (!i) return; + const n = !(!i.options.overviewRuler || !i.options.overviewRuler.color), + o = !(!t.overviewRuler || !t.overviewRuler.color); + if (this._onDidChangeDecorations.checkAffectedAndFire(i.options), + this._onDidChangeDecorations.checkAffectedAndFire(t), i.options.after || + t.after) { + const e = this._decorationsTree.getNodeRange(this, i); + this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber) + } + if (i.options.before || t.before) { + const e = this._decorationsTree.getNodeRange(this, i); + this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber) + } + n !== o ? (this._decorationsTree.delete(i), i.setOptions(t), this._decorationsTree + .insert(i)) : i.setOptions(t) + } + _deltaDecorationsImpl(e, t, i) { + const n = this.getVersionId(), + o = t.length; + let r = 0; + const s = i.length; + let a = 0, + l = new Array(s); + for (; r < o || a < s;) { + let d = null; + if (r < o) { + do { + d = this._decorations[t[r++]] + } while (!d && r < o); + if (d) { + if (d.options.after) { + const e = this._decorationsTree.getNodeRange(this, d); + this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber) + } + if (d.options.before) { + const e = this._decorationsTree.getNodeRange(this, d); + this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber) + } + this._decorationsTree.delete(d), this._onDidChangeDecorations.checkAffectedAndFire( + d.options) + } + } + if (a < s) { + if (!d) { + const e = ++this._lastDecorationId, + t = `${this._instanceId};${e}`; + d = new k(t, 0, 0), this._decorations[t] = d + } + const t = i[a], + o = this._validateRangeRelaxedNoAllocations(t.range), + r = At(t.options), + s = this._buffer.getOffsetAt(o.startLineNumber, o.startColumn), + c = this._buffer.getOffsetAt(o.endLineNumber, o.endColumn); + d.ownerId = e, d.reset(n, s, c, o), d.setOptions(r), d.options.after && + this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber), + d.options.before && this._onDidChangeDecorations.recordLineAffectedByInjectedText( + o.startLineNumber), this._onDidChangeDecorations.checkAffectedAndFire( + r), this._decorationsTree.insert(d), l[a] = d.id, a++ + } else d && delete this._decorations[d.id] + } + return l + } + setTokens(e, t = !1) { + if (0 !== e.length) { + let t = []; + for (let i = 0, n = e.length; i < n; i++) { + const n = e[i]; + let o = 0, + r = 0, + s = !1; + for (let e = 0, t = n.tokens.length; e < t; e++) { + const t = n.startLineNumber + e; + s ? (this._tokens.setTokens(this._languageIdentifier.id, t - 1, + this._buffer.getLineLength(t), n.tokens[e], !1), r = t) : this._tokens + .setTokens(this._languageIdentifier.id, t - 1, this._buffer.getLineLength( + t), n.tokens[e], !0) && (s = !0, o = t, r = t) + } + s && t.push({ + fromLineNumber: o, + toLineNumber: r + }) + } + t.length > 0 && this._emitModelTokensChangedEvent({ + tokenizationSupportChanged: !1, + semanticTokensApplied: !1, + ranges: t + }) + } + this.setBackgroundTokenizationState(t ? 2 : 1) + } + setSemanticTokens(e, t) { + this._tokens2.set(e, t), this._emitModelTokensChangedEvent({ + tokenizationSupportChanged: !1, + semanticTokensApplied: null !== e, + ranges: [{ + fromLineNumber: 1, + toLineNumber: this.getLineCount() + }] + }) + } + hasCompleteSemanticTokens() { + return this._tokens2.isComplete() + } + hasSomeSemanticTokens() { + return !this._tokens2.isEmpty() + } + setPartialSemanticTokens(e, t) { + if (this.hasCompleteSemanticTokens()) return; + const i = this._tokens2.setPartial(e, t); + this._emitModelTokensChangedEvent({ + tokenizationSupportChanged: !1, + semanticTokensApplied: !0, + ranges: [{ + fromLineNumber: i.startLineNumber, + toLineNumber: i.endLineNumber + }] + }) + } + tokenizeViewport(e, t) { + e = Math.max(1, e), t = Math.min(this._buffer.getLineCount(), t), + this._tokenization.tokenizeViewport(e, t) + } + clearTokens() { + this._tokens.flush(), this._emitModelTokensChangedEvent({ + tokenizationSupportChanged: !0, + semanticTokensApplied: !1, + ranges: [{ + fromLineNumber: 1, + toLineNumber: this._buffer.getLineCount() + }] + }) + } + _emitModelTokensChangedEvent(e) { + this._isDisposing || this._onDidChangeTokens.fire(e) + } + resetTokenization() { + this._tokenization.reset() + } + forceTokenization(e) { + if (e < 1 || e > this.getLineCount()) throw new Error( + "Illegal value for lineNumber"); + this._tokenization.forceTokenization(e) + } + isCheapToTokenize(e) { + return this._tokenization.isCheapToTokenize(e) + } + tokenizeIfCheap(e) { + this.isCheapToTokenize(e) && this.forceTokenization(e) + } + getLineTokens(e) { + if (e < 1 || e > this.getLineCount()) throw new Error( + "Illegal value for lineNumber"); + return this._getLineTokens(e) + } + _getLineTokens(e) { + const t = this.getLineContent(e), + i = this._tokens.getTokens(this._languageIdentifier.id, e - 1, t); + return this._tokens2.addSemanticTokens(e, i) + } + getLanguageIdentifier() { + return this._languageIdentifier + } + getModeId() { + return this._languageIdentifier.language + } + setMode(e) { + if (this._languageIdentifier.id === e.id) return; + let t = { + oldLanguage: this._languageIdentifier.language, + newLanguage: e.language + }; + this._languageIdentifier = e, this._onDidChangeLanguage.fire(t), this + ._onDidChangeLanguageConfiguration.fire({}) + } + getLanguageIdAtPosition(e, t) { + const i = this.validatePosition(new d.L(e, t)), + n = this.getLineTokens(i.lineNumber); + return n.getLanguageId(n.findTokenIndexAtOffset(i.column - 1)) + } + getWordAtPosition(e) { + this._assertNotDisposed(); + const t = this.validatePosition(e), + i = this.getLineContent(t.lineNumber), + n = this._getLineTokens(t.lineNumber), + o = n.findTokenIndexAtOffset(t.column - 1), + [r, s] = yt._findLanguageBoundaries(n, o), + a = (0, ye.t2)(t.column, Se.zu.getWordDefinition(n.getLanguageId(o)), + i.substring(r, s), r); + if (a && a.startColumn <= e.column && e.column <= a.endColumn) return + a; + if (o > 0 && r === t.column - 1) { + const [r, s] = yt._findLanguageBoundaries(n, o - 1), a = (0, ye.t2)( + t.column, Se.zu.getWordDefinition(n.getLanguageId(o - 1)), i.substring( + r, s), r); + if (a && a.startColumn <= e.column && e.column <= a.endColumn) return + a + } + return null + } + static _findLanguageBoundaries(e, t) { + const i = e.getLanguageId(t); + let n = 0; + for (let o = t; o >= 0 && e.getLanguageId(o) === i; o--) n = e.getStartOffset( + o); + let o = e.getLineContent().length; + for (let n = t, r = e.getCount(); n < r && e.getLanguageId(n) === i; n++) + o = e.getEndOffset(n); + return [n, o] + } + getWordUntilPosition(e) { + const t = this.getWordAtPosition(e); + return t ? { + word: t.word.substr(0, e.column - t.startColumn), + startColumn: t.startColumn, + endColumn: e.column + } : { + word: "", + startColumn: e.column, + endColumn: e.column + } + } + findMatchingBracketUp(e, t) { + let i = e.toLowerCase(), + n = this.validatePosition(t), + o = this._getLineTokens(n.lineNumber), + r = o.getLanguageId(o.findTokenIndexAtOffset(n.column - 1)), + s = Se.zu.getBracketsSupport(r); + if (!s) return null; + let a = s.textIsBracket[i]; + return a ? Ct(this._findMatchingBracketUp(a, n, null)) : null + } + matchBracket(e) { + return this._matchBracket(this.validatePosition(e)) + } + _establishBracketSearchOffsets(e, t, i, n) { + const o = t.getCount(), + r = t.getLanguageId(n); + let s = Math.max(0, e.column - 1 - i.maxBracketLength); + for (let e = n - 1; e >= 0; e--) { + const i = t.getEndOffset(e); + if (i <= s) break; + if ((0, xe.Bu)(t.getStandardTokenType(e)) || t.getLanguageId(e) !== + r) { + s = i; + break + } + } + let a = Math.min(t.getLineContent().length, e.column - 1 + i.maxBracketLength); + for (let e = n + 1; e < o; e++) { + const i = t.getStartOffset(e); + if (i >= a) break; + if ((0, xe.Bu)(t.getStandardTokenType(e)) || t.getLanguageId(e) !== + r) { + a = i; + break + } + } + return { + searchStartOffset: s, + searchEndOffset: a + } + } + _matchBracket(e) { + const t = e.lineNumber, + i = this._getLineTokens(t), + n = this._buffer.getLineContent(t), + o = i.findTokenIndexAtOffset(e.column - 1); + if (o < 0) return null; + const r = Se.zu.getBracketsSupport(i.getLanguageId(o)); + if (r && !(0, xe.Bu)(i.getStandardTokenType(o))) { + let { + searchStartOffset: s, + searchEndOffset: a + } = this._establishBracketSearchOffsets(e, i, r, o), l = null; + for (;;) { + const i = ke.Vr.findNextBracketInRange(r.forwardRegex, t, n, s, a); + if (!i) break; + if (i.startColumn <= e.column && e.column <= i.endColumn) { + const e = n.substring(i.startColumn - 1, i.endColumn - 1).toLowerCase(), + t = this._matchFoundBracket(i, r.textIsBracket[e], r.textIsOpenBracket[ + e], null); + if (t) { + if (t instanceof wt) return null; + l = t + } + } + s = i.endColumn - 1 + } + if (l) return l + } + if (o > 0 && i.getStartOffset(o) === e.column - 1) { + const r = o - 1, + s = Se.zu.getBracketsSupport(i.getLanguageId(r)); + if (s && !(0, xe.Bu)(i.getStandardTokenType(r))) { + let { + searchStartOffset: o, + searchEndOffset: a + } = this._establishBracketSearchOffsets(e, i, s, r); + const l = ke.Vr.findPrevBracketInRange(s.reversedRegex, t, n, o, a); + if (l && l.startColumn <= e.column && e.column <= l.endColumn) { + const e = n.substring(l.startColumn - 1, l.endColumn - 1).toLowerCase(), + t = this._matchFoundBracket(l, s.textIsBracket[e], s.textIsOpenBracket[ + e], null); + if (t) return t instanceof wt ? null : t + } + } + } + return null + } + _matchFoundBracket(e, t, i, n) { + if (!t) return null; + const o = i ? this._findMatchingBracketDown(t, e.getEndPosition(), n) : + this._findMatchingBracketUp(t, e.getStartPosition(), n); + return o ? o instanceof wt ? o : [e, o] : null + } + _findMatchingBracketUp(e, t, i) { + const n = e.languageIdentifier.id, + o = e.reversedRegex; + let r = -1, + s = 0; + const a = (t, n, a, l) => { + for (;;) { + if (i && ++s % 100 == 0 && !i()) return wt.INSTANCE; + const d = ke.Vr.findPrevBracketInRange(o, t, n, a, l); + if (!d) break; + const c = n.substring(d.startColumn - 1, d.endColumn - 1).toLowerCase(); + if (e.isOpen(c) ? r++ : e.isClose(c) && r--, 0 === r) return d; + l = d.startColumn - 1 + } + return null + }; + for (let e = t.lineNumber; e >= 1; e--) { + const i = this._getLineTokens(e), + o = i.getCount(), + r = this._buffer.getLineContent(e); + let s = o - 1, + l = r.length, + d = r.length; + e === t.lineNumber && (s = i.findTokenIndexAtOffset(t.column - 1), l = + t.column - 1, d = t.column - 1); + let c = !0; + for (; s >= 0; s--) { + const t = i.getLanguageId(s) === n && !(0, xe.Bu)(i.getStandardTokenType( + s)); + if (t) c ? l = i.getStartOffset(s) : (l = i.getStartOffset(s), d = + i.getEndOffset(s)); + else if (c && l !== d) { + const t = a(e, r, l, d); + if (t) return t + } + c = t + } + if (c && l !== d) { + const t = a(e, r, l, d); + if (t) return t + } + } + return null + } + _findMatchingBracketDown(e, t, i) { + const n = e.languageIdentifier.id, + o = e.forwardRegex; + let r = 1, + s = 0; + const a = (t, n, a, l) => { + for (;;) { + if (i && ++s % 100 == 0 && !i()) return wt.INSTANCE; + const d = ke.Vr.findNextBracketInRange(o, t, n, a, l); + if (!d) break; + const c = n.substring(d.startColumn - 1, d.endColumn - 1).toLowerCase(); + if (e.isOpen(c) ? r++ : e.isClose(c) && r--, 0 === r) return d; + a = d.endColumn - 1 + } + return null + }, + l = this.getLineCount(); + for (let e = t.lineNumber; e <= l; e++) { + const i = this._getLineTokens(e), + o = i.getCount(), + r = this._buffer.getLineContent(e); + let s = 0, + l = 0, + d = 0; + e === t.lineNumber && (s = i.findTokenIndexAtOffset(t.column - 1), l = + t.column - 1, d = t.column - 1); + let c = !0; + for (; s < o; s++) { + const t = i.getLanguageId(s) === n && !(0, xe.Bu)(i.getStandardTokenType( + s)); + if (t) c || (l = i.getStartOffset(s)), d = i.getEndOffset(s); + else if (c && l !== d) { + const t = a(e, r, l, d); + if (t) return t + } + c = t + } + if (c && l !== d) { + const t = a(e, r, l, d); + if (t) return t + } + } + return null + } + findPrevBracket(e) { + const t = this.validatePosition(e); + let i = -1, + n = null; + for (let e = t.lineNumber; e >= 1; e--) { + const o = this._getLineTokens(e), + r = o.getCount(), + s = this._buffer.getLineContent(e); + let a = r - 1, + l = s.length, + d = s.length; + if (e === t.lineNumber) { + a = o.findTokenIndexAtOffset(t.column - 1), l = t.column - 1, d = t + .column - 1; + const e = o.getLanguageId(a); + i !== e && (i = e, n = Se.zu.getBracketsSupport(i)) + } + let c = !0; + for (; a >= 0; a--) { + const t = o.getLanguageId(a); + if (i !== t) { + if (n && c && l !== d) { + const t = ke.Vr.findPrevBracketInRange(n.reversedRegex, e, s, l, + d); + if (t) return this._toFoundBracket(n, t); + c = !1 + } + i = t, n = Se.zu.getBracketsSupport(i) + } + const r = !!n && !(0, xe.Bu)(o.getStandardTokenType(a)); + if (r) c ? l = o.getStartOffset(a) : (l = o.getStartOffset(a), d = + o.getEndOffset(a)); + else if (n && c && l !== d) { + const t = ke.Vr.findPrevBracketInRange(n.reversedRegex, e, s, l, d); + if (t) return this._toFoundBracket(n, t) + } + c = r + } + if (n && c && l !== d) { + const t = ke.Vr.findPrevBracketInRange(n.reversedRegex, e, s, l, d); + if (t) return this._toFoundBracket(n, t) + } + } + return null + } + findNextBracket(e) { + const t = this.validatePosition(e), + i = this.getLineCount(); + let n = -1, + o = null; + for (let e = t.lineNumber; e <= i; e++) { + const i = this._getLineTokens(e), + r = i.getCount(), + s = this._buffer.getLineContent(e); + let a = 0, + l = 0, + d = 0; + if (e === t.lineNumber) { + a = i.findTokenIndexAtOffset(t.column - 1), l = t.column - 1, d = t + .column - 1; + const e = i.getLanguageId(a); + n !== e && (n = e, o = Se.zu.getBracketsSupport(n)) + } + let c = !0; + for (; a < r; a++) { + const t = i.getLanguageId(a); + if (n !== t) { + if (o && c && l !== d) { + const t = ke.Vr.findNextBracketInRange(o.forwardRegex, e, s, l, d); + if (t) return this._toFoundBracket(o, t); + c = !1 + } + n = t, o = Se.zu.getBracketsSupport(n) + } + const r = !!o && !(0, xe.Bu)(i.getStandardTokenType(a)); + if (r) c || (l = i.getStartOffset(a)), d = i.getEndOffset(a); + else if (o && c && l !== d) { + const t = ke.Vr.findNextBracketInRange(o.forwardRegex, e, s, l, d); + if (t) return this._toFoundBracket(o, t) + } + c = r + } + if (o && c && l !== d) { + const t = ke.Vr.findNextBracketInRange(o.forwardRegex, e, s, l, d); + if (t) return this._toFoundBracket(o, t) + } + } + return null + } + findEnclosingBrackets(e, t) { + let i; + if (void 0 === t) i = null; + else { + const e = Date.now(); + i = () => Date.now() - e <= t + } + const n = this.validatePosition(e), + o = this.getLineCount(), + r = new Map; + let s = []; + const a = (e, t) => { + if (!r.has(e)) { + let i = []; + for (let e = 0, n = t ? t.brackets.length : 0; e < n; e++) i[e] = + 0; + r.set(e, i) + } + s = r.get(e) + }; + let l = 0; + const d = (e, t, n, o, r) => { + for (;;) { + if (i && ++l % 100 == 0 && !i()) return wt.INSTANCE; + const a = ke.Vr.findNextBracketInRange(e.forwardRegex, t, n, o, r); + if (!a) break; + const d = n.substring(a.startColumn - 1, a.endColumn - 1).toLowerCase(), + c = e.textIsBracket[d]; + if (c && (c.isOpen(d) ? s[c.index]++ : c.isClose(d) && s[c.index]--, - + 1 === s[c.index])) return this._matchFoundBracket(a, c, !1, i); + o = a.endColumn - 1 + } + return null + }; + let c = -1, + h = null; + for (let e = n.lineNumber; e <= o; e++) { + const t = this._getLineTokens(e), + i = t.getCount(), + o = this._buffer.getLineContent(e); + let r = 0, + s = 0, + l = 0; + if (e === n.lineNumber) { + r = t.findTokenIndexAtOffset(n.column - 1), s = n.column - 1, l = n + .column - 1; + const e = t.getLanguageId(r); + c !== e && (c = e, h = Se.zu.getBracketsSupport(c), a(c, h)) + } + let u = !0; + for (; r < i; r++) { + const i = t.getLanguageId(r); + if (c !== i) { + if (h && u && s !== l) { + const t = d(h, e, o, s, l); + if (t) return Ct(t); + u = !1 + } + c = i, h = Se.zu.getBracketsSupport(c), a(c, h) + } + const n = !!h && !(0, xe.Bu)(t.getStandardTokenType(r)); + if (n) u || (s = t.getStartOffset(r)), l = t.getEndOffset(r); + else if (h && u && s !== l) { + const t = d(h, e, o, s, l); + if (t) return Ct(t) + } + u = n + } + if (h && u && s !== l) { + const t = d(h, e, o, s, l); + if (t) return Ct(t) + } + } + return null + } + _toFoundBracket(e, t) { + if (!t) return null; + let i = this.getValueInRange(t); + i = i.toLowerCase(); + let n = e.textIsBracket[i]; + return n ? { + range: t, + open: n.open, + close: n.close, + isOpen: e.textIsOpenBracket[i] + } : null + } + static computeIndentLevel(e, t) { + let i = 0, + n = 0, + o = e.length; + for (; n < o;) { + let o = e.charCodeAt(n); + if (32 === o) i++; + else { + if (9 !== o) break; + i = i - i % t + t + } + n++ + } + return n === o ? -1 : i + } + _computeIndentLevel(e) { + return yt.computeIndentLevel(this._buffer.getLineContent(e + 1), this + ._options.tabSize) + } + getActiveIndentGuide(e, t, i) { + this._assertNotDisposed(); + const n = this.getLineCount(); + if (e < 1 || e > n) throw new Error("Illegal value for lineNumber"); + const o = Se.zu.getFoldingRules(this._languageIdentifier.id), + r = Boolean(o && o.offSide); + let s = -2, + a = -1, + l = -2, + d = -1; + const c = e => { + if (-1 !== s && (-2 === s || s > e - 1)) { + s = -1, a = -1; + for (let t = e - 2; t >= 0; t--) { + let e = this._computeIndentLevel(t); + if (e >= 0) { + s = t, a = e; + break + } + } + } + if (-2 === l) { + l = -1, d = -1; + for (let t = e; t < n; t++) { + let e = this._computeIndentLevel(t); + if (e >= 0) { + l = t, d = e; + break + } + } + } + }; + let h = -2, + u = -1, + g = -2, + p = -1; + const m = e => { + if (-2 === h) { + h = -1, u = -1; + for (let t = e - 2; t >= 0; t--) { + let e = this._computeIndentLevel(t); + if (e >= 0) { + h = t, u = e; + break + } + } + } + if (-1 !== g && (-2 === g || g < e - 1)) { + g = -1, p = -1; + for (let t = e; t < n; t++) { + let e = this._computeIndentLevel(t); + if (e >= 0) { + g = t, p = e; + break + } + } + } + }; + let f = 0, + _ = !0, + b = 0, + v = !0, + w = 0, + C = 0; + for (let o = 0; _ || v; o++) { + const s = e - o, + g = e + o; + o > 1 && (s < 1 || s < t) && (_ = !1), o > 1 && (g > n || g > i) && + (v = !1), o > 5e4 && (_ = !1, v = !1); + let y = -1; + if (_) { + const e = this._computeIndentLevel(s - 1); + e >= 0 ? (l = s - 1, d = e, y = Math.ceil(e / this._options.indentSize)) : + (c(s), y = this._getIndentLevelForWhitespaceLine(r, a, d)) + } + let S = -1; + if (v) { + const e = this._computeIndentLevel(g - 1); + e >= 0 ? (h = g - 1, u = e, S = Math.ceil(e / this._options.indentSize)) : + (m(g), S = this._getIndentLevelForWhitespaceLine(r, u, p)) + } + if (0 !== o) { + if (1 === o) { + if (g <= n && S >= 0 && C + 1 === S) { + _ = !1, f = g, b = g, w = S; + continue + } + if (s >= 1 && y >= 0 && y - 1 === C) { + v = !1, f = s, b = s, w = y; + continue + } + if (f = e, b = e, w = C, 0 === w) return { + startLineNumber: f, + endLineNumber: b, + indent: w + } + } + _ && (y >= w ? f = s : _ = !1), v && (S >= w ? b = g : v = !1) + } else C = y + } + return { + startLineNumber: f, + endLineNumber: b, + indent: w + } + } + getLinesIndentGuides(e, t) { + this._assertNotDisposed(); + const i = this.getLineCount(); + if (e < 1 || e > i) throw new Error( + "Illegal value for startLineNumber"); + if (t < 1 || t > i) throw new Error("Illegal value for endLineNumber"); + const n = Se.zu.getFoldingRules(this._languageIdentifier.id), + o = Boolean(n && n.offSide); + let r = new Array(t - e + 1), + s = -2, + a = -1, + l = -2, + d = -1; + for (let n = e; n <= t; n++) { + let t = n - e; + const c = this._computeIndentLevel(n - 1); + if (c >= 0) s = n - 1, a = c, r[t] = Math.ceil(c / this._options.indentSize); + else { + if (-2 === s) { + s = -1, a = -1; + for (let e = n - 2; e >= 0; e--) { + let t = this._computeIndentLevel(e); + if (t >= 0) { + s = e, a = t; + break + } + } + } + if (-1 !== l && (-2 === l || l < n - 1)) { + l = -1, d = -1; + for (let e = n; e < i; e++) { + let t = this._computeIndentLevel(e); + if (t >= 0) { + l = e, d = t; + break + } + } + } + r[t] = this._getIndentLevelForWhitespaceLine(o, a, d) + } + } + return r + } + _getIndentLevelForWhitespaceLine(e, t, i) { + return -1 === t || -1 === i ? 0 : t < i ? 1 + Math.floor(t / this._options + .indentSize) : t === i || e ? Math.ceil(i / this._options.indentSize) : + 1 + Math.floor(i / this._options.indentSize) + } + normalizePosition(e, t) { + return e + } + getLineIndentColumn(e) { + return function(e) { + let t = 0; + for (const i of e) { + if (" " !== i && "\t" !== i) break; + t++ + } + return t + }(this.getLineContent(e)) + 1 + } + } + + function St(e) { + return !(!e.options.overviewRuler || !e.options.overviewRuler.color) + } + + function xt(e) { + return !!e.options.after || !!e.options.before + } + yt.MODEL_SYNC_LIMIT = 52428800, yt.LARGE_FILE_SIZE_THRESHOLD = 20971520, + yt.LARGE_FILE_LINE_COUNT_THRESHOLD = 3e5, yt.DEFAULT_CREATION_OPTIONS = { + isForSimpleWidget: !1, + tabSize: l.DB.tabSize, + indentSize: l.DB.indentSize, + insertSpaces: l.DB.insertSpaces, + detectIndentation: !1, + defaultEOL: 1, + trimAutoWhitespace: l.DB.trimAutoWhitespace, + largeFileOptimizations: l.DB.largeFileOptimizations, + bracketPairColorizationOptions: l.DB.bracketPairColorizationOptions + }; + class kt { + constructor() { + this._decorationsTree0 = new N, this._decorationsTree1 = new N, this._injectedTextDecorationsTree = + new N + } + ensureAllNodesHaveRanges(e) { + this.getAll(e, 0, !1, !1) + } + _ensureNodesHaveRanges(e, t) { + for (const i of t) null === i.range && (i.range = e.getRangeAt(i.cachedAbsoluteStart, + i.cachedAbsoluteEnd)); + return t + } + getAllInInterval(e, t, i, n, o) { + const r = e.getVersionId(), + s = this._intervalSearch(t, i, n, o, r); + return this._ensureNodesHaveRanges(e, s) + } + _intervalSearch(e, t, i, n, o) { + const r = this._decorationsTree0.intervalSearch(e, t, i, n, o), + s = this._decorationsTree1.intervalSearch(e, t, i, n, o), + a = this._injectedTextDecorationsTree.intervalSearch(e, t, i, n, o); + return r.concat(s).concat(a) + } + getInjectedTextInInterval(e, t, i, n) { + const o = e.getVersionId(), + r = this._injectedTextDecorationsTree.intervalSearch(t, i, n, !1, o); + return this._ensureNodesHaveRanges(e, r) + } + getAllInjectedText(e, t) { + const i = e.getVersionId(), + n = this._injectedTextDecorationsTree.search(t, !1, i); + return this._ensureNodesHaveRanges(e, n) + } + getAll(e, t, i, n) { + const o = e.getVersionId(), + r = this._search(t, i, n, o); + return this._ensureNodesHaveRanges(e, r) + } + _search(e, t, i, n) { + if (i) return this._decorationsTree1.search(e, t, n); { + const i = this._decorationsTree0.search(e, t, n), + o = this._decorationsTree1.search(e, t, n), + r = this._injectedTextDecorationsTree.search(e, t, n); + return i.concat(o).concat(r) + } + } + collectNodesFromOwner(e) { + const t = this._decorationsTree0.collectNodesFromOwner(e), + i = this._decorationsTree1.collectNodesFromOwner(e), + n = this._injectedTextDecorationsTree.collectNodesFromOwner(e); + return t.concat(i).concat(n) + } + collectNodesPostOrder() { + const e = this._decorationsTree0.collectNodesPostOrder(), + t = this._decorationsTree1.collectNodesPostOrder(), + i = this._injectedTextDecorationsTree.collectNodesPostOrder(); + return e.concat(t).concat(i) + } + insert(e) { + xt(e) ? this._injectedTextDecorationsTree.insert(e) : St(e) ? this._decorationsTree1 + .insert(e) : this._decorationsTree0.insert(e) + } + delete(e) { + xt(e) ? this._injectedTextDecorationsTree.delete(e) : St(e) ? this._decorationsTree1 + .delete(e) : this._decorationsTree0.delete(e) + } + getNodeRange(e, t) { + const i = e.getVersionId(); + return t.cachedVersionId !== i && this._resolveNode(t, i), null === t.range && + (t.range = e.getRangeAt(t.cachedAbsoluteStart, t.cachedAbsoluteEnd)), + t.range + } + _resolveNode(e, t) { + xt(e) ? this._injectedTextDecorationsTree.resolveNode(e, t) : St(e) ? + this._decorationsTree1.resolveNode(e, t) : this._decorationsTree0.resolveNode( + e, t) + } + acceptReplace(e, t, i, n) { + this._decorationsTree0.acceptReplace(e, t, i, n), this._decorationsTree1 + .acceptReplace(e, t, i, n), this._injectedTextDecorationsTree.acceptReplace( + e, t, i, n) + } + } + + function Lt(e) { + return e.replace(/[^a-z0-9\-_]/gi, " ") + } + class Nt { + constructor(e) { + this.color = e.color || "", this.darkColor = e.darkColor || "" + } + } + class Dt extends Nt { + constructor(e) { + super(e), this._resolvedColor = null, this.position = "number" == + typeof e.position ? e.position : u.sh.Center + } + getColor(e) { + return this._resolvedColor || ("light" !== e.type && this.darkColor ? + this._resolvedColor = this._resolveColor(this.darkColor, e) : this._resolvedColor = + this._resolveColor(this.color, e)), this._resolvedColor + } + invalidateCachedColor() { + this._resolvedColor = null + } + _resolveColor(e, t) { + if ("string" == typeof e) return e; + let i = e ? t.getColor(e.id) : null; + return i ? i.toString() : "" + } + } + class Et extends Nt { + constructor(e) { + super(e), this.position = e.position + } + getColor(e) { + return this._resolvedColor || ("light" !== e.type && this.darkColor ? + this._resolvedColor = this._resolveColor(this.darkColor, e) : this._resolvedColor = + this._resolveColor(this.color, e)), this._resolvedColor + } + invalidateCachedColor() { + this._resolvedColor = void 0 + } + _resolveColor(e, t) { + return "string" == typeof e ? Le.Il.fromHex(e) : t.getColor(e.id) + } + } + class It { + constructor(e) { + this.content = e.content || "", this.inlineClassName = e.inlineClassName || + null, this.inlineClassNameAffectsLetterSpacing = e.inlineClassNameAffectsLetterSpacing || + !1 + } + static from(e) { + return e instanceof It ? e : new It(e) + } + } + class Tt { + constructor(e) { + this.description = e.description, this.stickiness = e.stickiness || 0, + this.zIndex = e.zIndex || 0, this.className = e.className ? Lt(e.className) : + null, this.hoverMessage = e.hoverMessage || null, this.glyphMarginHoverMessage = + e.glyphMarginHoverMessage || null, this.isWholeLine = e.isWholeLine || + !1, this.showIfCollapsed = e.showIfCollapsed || !1, this.collapseOnReplaceEdit = + e.collapseOnReplaceEdit || !1, this.overviewRuler = e.overviewRuler ? + new Dt(e.overviewRuler) : null, this.minimap = e.minimap ? new Et(e.minimap) : + null, this.glyphMarginClassName = e.glyphMarginClassName ? Lt(e.glyphMarginClassName) : + null, this.linesDecorationsClassName = e.linesDecorationsClassName ? + Lt(e.linesDecorationsClassName) : null, this.firstLineDecorationClassName = + e.firstLineDecorationClassName ? Lt(e.firstLineDecorationClassName) : + null, this.marginClassName = e.marginClassName ? Lt(e.marginClassName) : + null, this.inlineClassName = e.inlineClassName ? Lt(e.inlineClassName) : + null, this.inlineClassNameAffectsLetterSpacing = e.inlineClassNameAffectsLetterSpacing || + !1, this.beforeContentClassName = e.beforeContentClassName ? Lt(e.beforeContentClassName) : + null, this.afterContentClassName = e.afterContentClassName ? Lt(e.afterContentClassName) : + null, this.after = e.after ? It.from(e.after) : null, this.before = e + .before ? It.from(e.before) : null + } + static register(e) { + return new Tt(e) + } + static createDynamic(e) { + return new Tt(e) + } + } + Tt.EMPTY = Tt.register({ + description: "empty" + }); + const Mt = [Tt.register({ + description: "tracked-range-always-grows-when-typing-at-edges", + stickiness: 0 + }), Tt.register({ + description: "tracked-range-never-grows-when-typing-at-edges", + stickiness: 1 + }), Tt.register({ + description: "tracked-range-grows-only-when-typing-before", + stickiness: 2 + }), Tt.register({ + description: "tracked-range-grows-only-when-typing-after", + stickiness: 3 + })]; + + function At(e) { + return e instanceof Tt ? e : Tt.createDynamic(e) + } + class Rt extends r.JT { + constructor(e) { + super(), this.handleBeforeFire = e, this._actual = this._register(new o + .Q5), this.event = this._actual.event, this._affectedInjectedTextLines = + null, this._deferredCnt = 0, this._shouldFire = !1, this._affectsMinimap = ! + 1, this._affectsOverviewRuler = !1 + } + beginDeferredEmit() { + this._deferredCnt++ + } + endDeferredEmit() { + var e; + if (this._deferredCnt--, 0 === this._deferredCnt) { + if (this._shouldFire) { + this.handleBeforeFire(this._affectedInjectedTextLines); + const e = { + affectsMinimap: this._affectsMinimap, + affectsOverviewRuler: this._affectsOverviewRuler + }; + this._shouldFire = !1, this._affectsMinimap = !1, this._affectsOverviewRuler = ! + 1, this._actual.fire(e) + } + null === (e = this._affectedInjectedTextLines) || void 0 === e || e.clear(), + this._affectedInjectedTextLines = null + } + } + recordLineAffectedByInjectedText(e) { + this._affectedInjectedTextLines || (this._affectedInjectedTextLines = + new Set), this._affectedInjectedTextLines.add(e) + } + checkAffectedAndFire(e) { + this._affectsMinimap || (this._affectsMinimap = !(!e.minimap || !e.minimap + .position)), this._affectsOverviewRuler || (this._affectsOverviewRuler = ! + (!e.overviewRuler || !e.overviewRuler.color)), this._shouldFire = ! + 0 + } + fire() { + this._affectsMinimap = !0, this._affectsOverviewRuler = !0, this._shouldFire = ! + 0 + } + } + class Ot extends r.JT { + constructor() { + super(), this._fastEmitter = this._register(new o.Q5), this.fastEvent = + this._fastEmitter.event, this._slowEmitter = this._register(new o.Q5), + this.slowEvent = this._slowEmitter.event, this._deferredCnt = 0, + this._deferredEvent = null + } + beginDeferredEmit() { + this._deferredCnt++ + } + endDeferredEmit(e = null) { + if (this._deferredCnt--, 0 === this._deferredCnt && null !== this._deferredEvent) { + this._deferredEvent.rawContentChangedEvent.resultingSelection = e; + const t = this._deferredEvent; + this._deferredEvent = null, this._fastEmitter.fire(t), this._slowEmitter + .fire(t) + } + } + fire(e) { + this._deferredCnt > 0 ? this._deferredEvent ? this._deferredEvent = + this._deferredEvent.merge(e) : this._deferredEvent = e : (this._fastEmitter + .fire(e), this._slowEmitter.fire(e)) + } + } + }, + 3256: (e, t, i) => { + "use strict"; + i.d(t, { + Jx: () => n, + gk: () => o, + rU: () => r, + lN: () => s, + Tx: () => a, + CZ: () => l, + dQ: () => d, + D8: () => c, + fV: () => h + }); + class n { + constructor() { + this.changeType = 1 + } + } + class o { + constructor(e, t, i, n, o) { + this.ownerId = e, this.lineNumber = t, this.column = i, this.options = + n, this.order = o + } + static applyInjectedText(e, t) { + if (!t || 0 === t.length) return e; + let i = "", + n = 0; + for (const o of t) i += e.substring(n, o.column - 1), n = o.column - 1, + i += o.options.content; + return i += e.substring(n), i + } + static fromDecorations(e) { + const t = []; + for (const i of e) i.options.before && i.options.before.content.length > + 0 && t.push(new o(i.ownerId, i.range.startLineNumber, i.range.startColumn, + i.options.before, 0)), i.options.after && i.options.after.content.length > + 0 && t.push(new o(i.ownerId, i.range.endLineNumber, i.range.endColumn, + i.options.after, 1)); + return t.sort(((e, t) => e.lineNumber === t.lineNumber ? e.column === + t.column ? e.order - t.order : e.column - t.column : e.lineNumber - + t.lineNumber)), t + } + } + class r { + constructor(e, t, i) { + this.changeType = 2, this.lineNumber = e, this.detail = t, this.injectedText = + i + } + } + class s { + constructor(e, t) { + this.changeType = 3, this.fromLineNumber = e, this.toLineNumber = t + } + } + class a { + constructor(e, t, i, n) { + this.changeType = 4, this.injectedTexts = n, this.fromLineNumber = e, + this.toLineNumber = t, this.detail = i + } + } + class l { + constructor() { + this.changeType = 5 + } + } + class d { + constructor(e, t, i, n) { + this.changes = e, this.versionId = t, this.isUndoing = i, this.isRedoing = + n, this.resultingSelection = null + } + containsEvent(e) { + for (let t = 0, i = this.changes.length; t < i; t++) + if (this.changes[t].changeType === e) return !0; + return !1 + } + static merge(e, t) { + const i = [].concat(e.changes).concat(t.changes), + n = t.versionId, + o = e.isUndoing || t.isUndoing, + r = e.isRedoing || t.isRedoing; + return new d(i, n, o, r) + } + } + class c { + constructor(e) { + this.changes = e + } + } + class h { + constructor(e, t) { + this.rawContentChangedEvent = e, this.contentChangedEvent = t + } + merge(e) { + const t = d.merge(this.rawContentChangedEvent, e.rawContentChangedEvent), + i = h._mergeChangeEvents(this.contentChangedEvent, e.contentChangedEvent); + return new h(t, i) + } + static _mergeChangeEvents(e, t) { + return { + changes: [].concat(e.changes).concat(t.changes), + eol: t.eol, + versionId: t.versionId, + isUndoing: e.isUndoing || t.isUndoing, + isRedoing: e.isRedoing || t.isRedoing, + isFlush: e.isFlush || t.isFlush + } + } + } + }, + 7277: (e, t, i) => { + "use strict"; + i.d(t, { + bc: () => l, + iE: () => c, + pM: () => u, + cM: () => g, + sz: () => p + }); + var n = i(7295), + o = i(9410), + r = i(187), + s = i(4314), + a = i(4973); + class l { + constructor(e, t, i, n) { + this.searchString = e, this.isRegex = t, this.matchCase = i, this.wordSeparators = + n + } + parseSearchRequest() { + if ("" === this.searchString) return null; + let e; + e = this.isRegex ? function(e) { + if (!e || 0 === e.length) return !1; + for (let t = 0, i = e.length; t < i; t++) + if (92 === e.charCodeAt(t)) { + if (t++, t >= i) break; + const n = e.charCodeAt(t); + if (110 === n || 114 === n || 87 === n || 119 === n) return !0 + } + return !1 + }(this.searchString) : this.searchString.indexOf("\n") >= 0; + let t = null; + try { + t = n.GF(this.searchString, this.isRegex, { + matchCase: this.matchCase, + wholeWord: !1, + multiline: e, + global: !0, + unicode: !0 + }) + } catch (e) { + return null + } + if (!t) return null; + let i = !this.isRegex && !e; + return i && this.searchString.toLowerCase() !== this.searchString.toUpperCase() && + (i = this.matchCase), new d(t, this.wordSeparators ? (0, o.u)(this.wordSeparators) : + null, i ? this.searchString : null) + } + } + class d { + constructor(e, t, i) { + this.regex = e, this.wordSeparators = t, this.simpleSearch = i + } + } + + function c(e, t, i) { + if (!i) return new a.tk(e, null); + let n = []; + for (let e = 0, i = t.length; e < i; e++) n[e] = t[e]; + return new a.tk(e, n) + } + class h { + constructor(e) { + let t = [], + i = 0; + for (let n = 0, o = e.length; n < o; n++) 10 === e.charCodeAt(n) && (t[ + i++] = n); + this._lineFeedsOffsets = t + } + findLineFeedCountBeforeOffset(e) { + const t = this._lineFeedsOffsets; + let i = 0, + n = t.length - 1; + if (-1 === n) return 0; + if (e <= t[0]) return 0; + for (; i < n;) { + const o = i + ((n - i) / 2 >> 0); + t[o] >= e ? n = o - 1 : t[o + 1] >= e ? (i = o, n = o) : i = o + 1 + } + return i + 1 + } + } + class u { + static findMatches(e, t, i, n, o) { + const r = t.parseSearchRequest(); + return r ? r.regex.multiline ? this._doFindMatchesMultiline(e, i, new p( + r.wordSeparators, r.regex), n, o) : this._doFindMatchesLineByLine(e, + i, r, n, o) : [] + } + static _getMultilineMatchRange(e, t, i, n, o, r) { + let a, l, d = 0; + if (n ? (d = n.findLineFeedCountBeforeOffset(o), a = t + o + d) : a = + t + o, n) { + let e = n.findLineFeedCountBeforeOffset(o + r.length) - d; + l = a + r.length + e + } else l = a + r.length; + const c = e.getPositionAt(a), + h = e.getPositionAt(l); + return new s.e(c.lineNumber, c.column, h.lineNumber, h.column) + } + static _doFindMatchesMultiline(e, t, i, n, o) { + const r = e.getOffsetAt(t.getStartPosition()), + s = e.getValueInRange(t, 1), + a = "\r\n" === e.getEOL() ? new h(s) : null, + l = []; + let d, u = 0; + for (i.reset(0); d = i.next(s);) + if (l[u++] = c(this._getMultilineMatchRange(e, r, s, a, d.index, d[0]), + d, n), u >= o) return l; + return l + } + static _doFindMatchesLineByLine(e, t, i, n, o) { + const r = []; + let s = 0; + if (t.startLineNumber === t.endLineNumber) { + const a = e.getLineContent(t.startLineNumber).substring(t.startColumn - + 1, t.endColumn - 1); + return s = this._findMatchesInLine(i, a, t.startLineNumber, t.startColumn - + 1, s, r, n, o), r + } + const a = e.getLineContent(t.startLineNumber).substring(t.startColumn - + 1); + s = this._findMatchesInLine(i, a, t.startLineNumber, t.startColumn - 1, + s, r, n, o); + for (let a = t.startLineNumber + 1; a < t.endLineNumber && s < o; a++) + s = this._findMatchesInLine(i, e.getLineContent(a), a, 0, s, r, n, o); + if (s < o) { + const a = e.getLineContent(t.endLineNumber).substring(0, t.endColumn - + 1); + s = this._findMatchesInLine(i, a, t.endLineNumber, 0, s, r, n, o) + } + return r + } + static _findMatchesInLine(e, t, i, n, o, r, l, d) { + const h = e.wordSeparators; + if (!l && e.simpleSearch) { + const l = e.simpleSearch, + c = l.length, + u = t.length; + let p = -c; + for (; - 1 !== (p = t.indexOf(l, p + c));) + if ((!h || g(h, t, u, p, c)) && (r[o++] = new a.tk(new s.e(i, p + 1 + + n, i, p + 1 + c + n), null), o >= d)) return o; + return o + } + const u = new p(e.wordSeparators, e.regex); + let m; + u.reset(0); + do { + if (m = u.next(t), m && (r[o++] = c(new s.e(i, m.index + 1 + n, i, m.index + + 1 + m[0].length + n), m, l), o >= d)) return o + } while (m); + return o + } + static findNextMatch(e, t, i, n) { + const o = t.parseSearchRequest(); + if (!o) return null; + const r = new p(o.wordSeparators, o.regex); + return o.regex.multiline ? this._doFindNextMatchMultiline(e, i, r, n) : + this._doFindNextMatchLineByLine(e, i, r, n) + } + static _doFindNextMatchMultiline(e, t, i, n) { + const o = new r.L(t.lineNumber, 1), + a = e.getOffsetAt(o), + l = e.getLineCount(), + d = e.getValueInRange(new s.e(o.lineNumber, o.column, l, e.getLineMaxColumn( + l)), 1), + u = "\r\n" === e.getEOL() ? new h(d) : null; + i.reset(t.column - 1); + let g = i.next(d); + return g ? c(this._getMultilineMatchRange(e, a, d, u, g.index, g[0]), + g, n) : 1 !== t.lineNumber || 1 !== t.column ? this._doFindNextMatchMultiline( + e, new r.L(1, 1), i, n) : null + } + static _doFindNextMatchLineByLine(e, t, i, n) { + const o = e.getLineCount(), + r = t.lineNumber, + s = e.getLineContent(r), + a = this._findFirstMatchInLine(i, s, r, t.column, n); + if (a) return a; + for (let t = 1; t <= o; t++) { + const s = (r + t - 1) % o, + a = e.getLineContent(s + 1), + l = this._findFirstMatchInLine(i, a, s + 1, 1, n); + if (l) return l + } + return null + } + static _findFirstMatchInLine(e, t, i, n, o) { + e.reset(n - 1); + const r = e.next(t); + return r ? c(new s.e(i, r.index + 1, i, r.index + 1 + r[0].length), r, + o) : null + } + static findPreviousMatch(e, t, i, n) { + const o = t.parseSearchRequest(); + if (!o) return null; + const r = new p(o.wordSeparators, o.regex); + return o.regex.multiline ? this._doFindPreviousMatchMultiline(e, i, r, + n) : this._doFindPreviousMatchLineByLine(e, i, r, n) + } + static _doFindPreviousMatchMultiline(e, t, i, n) { + const o = this._doFindMatchesMultiline(e, new s.e(1, 1, t.lineNumber, + t.column), i, n, 9990); + if (o.length > 0) return o[o.length - 1]; + const a = e.getLineCount(); + return t.lineNumber !== a || t.column !== e.getLineMaxColumn(a) ? this + ._doFindPreviousMatchMultiline(e, new r.L(a, e.getLineMaxColumn(a)), + i, n) : null + } + static _doFindPreviousMatchLineByLine(e, t, i, n) { + const o = e.getLineCount(), + r = t.lineNumber, + s = e.getLineContent(r).substring(0, t.column - 1), + a = this._findLastMatchInLine(i, s, r, n); + if (a) return a; + for (let t = 1; t <= o; t++) { + const s = (o + r - t - 1) % o, + a = e.getLineContent(s + 1), + l = this._findLastMatchInLine(i, a, s + 1, n); + if (l) return l + } + return null + } + static _findLastMatchInLine(e, t, i, n) { + let o, r = null; + for (e.reset(0); o = e.next(t);) r = c(new s.e(i, o.index + 1, i, o.index + + 1 + o[0].length), o, n); + return r + } + } + + function g(e, t, i, n, o) { + return function(e, t, i, n, o) { + if (0 === n) return !0; + const r = t.charCodeAt(n - 1); + if (0 !== e.get(r)) return !0; + if (13 === r || 10 === r) return !0; + if (o > 0) { + const i = t.charCodeAt(n); + if (0 !== e.get(i)) return !0 + } + return !1 + }(e, t, 0, n, o) && function(e, t, i, n, o) { + if (n + o === i) return !0; + const r = t.charCodeAt(n + o); + if (0 !== e.get(r)) return !0; + if (13 === r || 10 === r) return !0; + if (o > 0) { + const i = t.charCodeAt(n + o - 1); + if (0 !== e.get(i)) return !0 + } + return !1 + }(e, t, i, n, o) + } + class p { + constructor(e, t) { + this._wordSeparators = e, this._searchRegex = t, this._prevMatchStartIndex = - + 1, this._prevMatchLength = 0 + } + reset(e) { + this._searchRegex.lastIndex = e, this._prevMatchStartIndex = -1, this._prevMatchLength = + 0 + } + next(e) { + const t = e.length; + let i; + do { + if (this._prevMatchStartIndex + this._prevMatchLength === t) return + null; + if (i = this._searchRegex.exec(e), !i) return null; + const o = i.index, + r = i[0].length; + if (o === this._prevMatchStartIndex && r === this._prevMatchLength) { + if (0 === r) { + n.ZH(e, t, this._searchRegex.lastIndex) > 65535 ? this._searchRegex + .lastIndex += 2 : this._searchRegex.lastIndex += 1; + continue + } + return null + } + if (this._prevMatchStartIndex = o, this._prevMatchLength = r, !this._wordSeparators || + g(this._wordSeparators, e, t, o, r)) return i + } while (i); + return null + } + } + }, + 8409: (e, t, i) => { + "use strict"; + i.d(t, { + QZ: () => l, + DA: () => h, + OU: () => u, + Wz: () => p, + cx: () => _, + Rl: () => b + }); + var n = i(9488), + o = i(8411), + r = i(187), + s = i(4314), + a = i(4101); + + function l(e) { + let t = 0, + i = 0, + n = 0, + o = 0; + for (let r = 0, s = e.length; r < s; r++) { + const a = e.charCodeAt(r); + 13 === a ? (0 === t && (i = r), t++, r + 1 < s && 10 === e.charCodeAt(r + + 1) ? (o |= 2, r++) : o |= 3, n = r + 1) : 10 === a && (o |= 1, 0 === + t && (i = r), t++, n = r + 1) + } + return 0 === t && (i = e.length), [t, i, e.length - n, o] + } + + function d(e) { + return (16384 | e << 0 | 2 << 23) >>> 0 + } + const c = new Uint32Array(0).buffer; + class h { + constructor() { + this.tokens = [] + } + add(e, t) { + if (this.tokens.length > 0) { + const i = this.tokens[this.tokens.length - 1]; + if (i.startLineNumber + i.tokens.length - 1 + 1 === e) return void i.tokens + .push(t) + } + this.tokens.push(new m(e, [t])) + } + } + class u { + constructor(e) { + this._tokens = e, this._tokenCount = e.length / 4 + } + toString(e) { + let t = []; + for (let i = 0; i < this._tokenCount; i++) t.push( + `(${this._getDeltaLine(i)+e},${this._getStartCharacter(i)}-${this._getEndCharacter(i)})` + ); + return `[${t.join(",")}]` + } + getMaxDeltaLine() { + const e = this._getTokenCount(); + return 0 === e ? -1 : this._getDeltaLine(e - 1) + } + getRange() { + const e = this._getTokenCount(); + if (0 === e) return null; + const t = this._getStartCharacter(0), + i = this._getDeltaLine(e - 1), + n = this._getEndCharacter(e - 1); + return new s.e(0, t + 1, i, n + 1) + } + _getTokenCount() { + return this._tokenCount + } + _getDeltaLine(e) { + return this._tokens[4 * e] + } + _getStartCharacter(e) { + return this._tokens[4 * e + 1] + } + _getEndCharacter(e) { + return this._tokens[4 * e + 2] + } + isEmpty() { + return 0 === this._getTokenCount() + } + getLineTokens(e) { + let t = 0, + i = this._getTokenCount() - 1; + for (; t < i;) { + const n = t + Math.floor((i - t) / 2), + o = this._getDeltaLine(n); + if (o < e) t = n + 1; + else { + if (!(o > e)) { + let o = n; + for (; o > t && this._getDeltaLine(o - 1) === e;) o--; + let r = n; + for (; r < i && this._getDeltaLine(r + 1) === e;) r++; + return new g(this._tokens.subarray(4 * o, 4 * r + 4)) + } + i = n - 1 + } + } + return this._getDeltaLine(t) === e ? new g(this._tokens.subarray(4 * t, + 4 * t + 4)) : null + } + clear() { + this._tokenCount = 0 + } + removeTokens(e, t, i, n) { + const o = this._tokens, + r = this._tokenCount; + let s = 0, + a = !1, + l = 0; + for (let d = 0; d < r; d++) { + const r = 4 * d, + c = o[r], + h = o[r + 1], + u = o[r + 2], + g = o[r + 3]; + if ((c > e || c === e && u >= t) && (c < i || c === i && h <= n)) a = ! + 0; + else { + if (0 === s && (l = c), a) { + const e = 4 * s; + o[e] = c - l, o[e + 1] = h, o[e + 2] = u, o[e + 3] = g + } + s++ + } + } + return this._tokenCount = s, l + } + split(e, t, i, n) { + const o = this._tokens, + r = this._tokenCount; + let s = [], + a = [], + l = s, + d = 0, + c = 0; + for (let s = 0; s < r; s++) { + const r = 4 * s, + h = o[r], + u = o[r + 1], + g = o[r + 2], + p = o[r + 3]; + if (h > e || h === e && g >= t) { + if (h < i || h === i && u <= n) continue; + l !== a && (l = a, d = 0, c = h) + } + l[d++] = h - c, l[d++] = u, l[d++] = g, l[d++] = p + } + return [new u(new Uint32Array(s)), new u(new Uint32Array(a)), c] + } + acceptDeleteRange(e, t, i, n, o) { + const r = this._tokens, + s = this._tokenCount, + a = n - t; + let l = 0, + d = !1; + for (let c = 0; c < s; c++) { + const h = 4 * c; + let u = r[h], + g = r[h + 1], + p = r[h + 2]; + const m = r[h + 3]; + if (u < t || u === t && p <= i) { + l++; + continue + } + if (u === t && g < i) u === n && p > o ? p -= o - i : p = i; + else if (u === t && g === i) { + if (!(u === n && p > o)) { + d = !0; + continue + } + p -= o - i + } else if (u < n || u === n && g < o) { + if (!(u === n && p > o)) { + d = !0; + continue + } + u === t ? (g = i, p = g + (p - o)) : (g = 0, p = g + (p - o)) + } else if (u > n) { + if (0 === a && !d) { + l = s; + break + } + u -= a + } else { + if (!(u === n && g >= o)) throw new Error("Not possible!"); + e && 0 === u && (g += e, p += e), u -= a, g -= o - i, p -= o - i + } + const f = 4 * l; + r[f] = u, r[f + 1] = g, r[f + 2] = p, r[f + 3] = m, l++ + } + this._tokenCount = l + } + acceptInsertText(e, t, i, n, o, r) { + const s = 0 === i && 1 === n && (r >= 48 && r <= 57 || r >= 65 && r <= + 90 || r >= 97 && r <= 122), + a = this._tokens, + l = this._tokenCount; + for (let r = 0; r < l; r++) { + const l = 4 * r; + let d = a[l], + c = a[l + 1], + h = a[l + 2]; + if (!(d < e || d === e && h < t)) { + if (d === e && h === t) { + if (!s) continue; + h += 1 + } else if (d === e && c < t && t < h) 0 === i ? h += n : h = t; + else { + if (d === e && c === t && s) continue; + if (d === e) + if (d += i, 0 === i) c += n, h += n; + else { + const e = h - c; + c = o + (c - t), h = c + e + } else d += i + } + a[l] = d, a[l + 1] = c, a[l + 2] = h + } + } + } + } + class g { + constructor(e) { + this._tokens = e + } + getCount() { + return this._tokens.length / 4 + } + getStartCharacter(e) { + return this._tokens[4 * e + 1] + } + getEndCharacter(e) { + return this._tokens[4 * e + 2] + } + getMetadata(e) { + return this._tokens[4 * e + 3] + } + } + class p { + constructor(e, t) { + this.startLineNumber = e, this.tokens = t, this.endLineNumber = this.startLineNumber + + this.tokens.getMaxDeltaLine() + } + toString() { + return this.tokens.toString(this.startLineNumber) + } + _updateEndLineNumber() { + this.endLineNumber = this.startLineNumber + this.tokens.getMaxDeltaLine() + } + isEmpty() { + return this.tokens.isEmpty() + } + getLineTokens(e) { + return this.startLineNumber <= e && e <= this.endLineNumber ? this.tokens + .getLineTokens(e - this.startLineNumber) : null + } + getRange() { + const e = this.tokens.getRange(); + return e ? new s.e(this.startLineNumber + e.startLineNumber, e.startColumn, + this.startLineNumber + e.endLineNumber, e.endColumn) : e + } + removeTokens(e) { + const t = e.startLineNumber - this.startLineNumber, + i = e.endLineNumber - this.startLineNumber; + this.startLineNumber += this.tokens.removeTokens(t, e.startColumn - 1, + i, e.endColumn - 1), this._updateEndLineNumber() + } + split(e) { + const t = e.startLineNumber - this.startLineNumber, + i = e.endLineNumber - this.startLineNumber, + [n, o, r] = this.tokens.split(t, e.startColumn - 1, i, e.endColumn - + 1); + return [new p(this.startLineNumber, n), new p(this.startLineNumber + r, + o)] + } + applyEdit(e, t) { + const [i, n, o] = l(t); + this.acceptEdit(e, i, n, o, t.length > 0 ? t.charCodeAt(0) : 0) + } + acceptEdit(e, t, i, n, o) { + this._acceptDeleteRange(e), this._acceptInsertText(new r.L(e.startLineNumber, + e.startColumn), t, i, n, o), this._updateEndLineNumber() + } + _acceptDeleteRange(e) { + if (e.startLineNumber === e.endLineNumber && e.startColumn === e.endColumn) + return; + const t = e.startLineNumber - this.startLineNumber, + i = e.endLineNumber - this.startLineNumber; + if (i < 0) { + const e = i - t; + return void(this.startLineNumber -= e) + } + const n = this.tokens.getMaxDeltaLine(); + if (!(t >= n + 1)) { + if (t < 0 && i >= n + 1) return this.startLineNumber = 0, void this.tokens + .clear(); + if (t < 0) { + const n = -t; + this.startLineNumber -= n, this.tokens.acceptDeleteRange(e.startColumn - + 1, 0, 0, i, e.endColumn - 1) + } else this.tokens.acceptDeleteRange(0, t, e.startColumn - 1, i, e.endColumn - + 1) + } + } + _acceptInsertText(e, t, i, n, o) { + if (0 === t && 0 === i) return; + const r = e.lineNumber - this.startLineNumber; + r < 0 ? this.startLineNumber += t : r >= this.tokens.getMaxDeltaLine() + + 1 || this.tokens.acceptInsertText(r, e.column - 1, t, i, n, o) + } + } + class m { + constructor(e, t) { + this.startLineNumber = e, this.tokens = t + } + } + + function f(e) { + return e instanceof Uint32Array ? e : new Uint32Array(e) + } + class _ { + constructor() { + this._pieces = [], this._isComplete = !1 + } + flush() { + this._pieces = [], this._isComplete = !1 + } + isEmpty() { + return 0 === this._pieces.length + } + set(e, t) { + this._pieces = e || [], this._isComplete = t + } + setPartial(e, t) { + let i = e; + if (t.length > 0) { + const n = t[0].getRange(), + o = t[t.length - 1].getRange(); + if (!n || !o) return e; + i = e.plusRange(n).plusRange(o) + } + let o = null; + for (let e = 0, t = this._pieces.length; e < t; e++) { + const n = this._pieces[e]; + if (n.endLineNumber < i.startLineNumber) continue; + if (n.startLineNumber > i.endLineNumber) { + o = o || { + index: e + }; + break + } + if (n.removeTokens(i), n.isEmpty()) { + this._pieces.splice(e, 1), e--, t--; + continue + } + if (n.endLineNumber < i.startLineNumber) continue; + if (n.startLineNumber > i.endLineNumber) { + o = o || { + index: e + }; + continue + } + const [r, s] = n.split(i); + r.isEmpty() ? o = o || { + index: e + } : s.isEmpty() || (this._pieces.splice(e, 1, r, s), e++, t++, o = o || { + index: e + }) + } + return o = o || { + index: this._pieces.length + }, t.length > 0 && (this._pieces = n.Zv(this._pieces, o.index, t)), i + } + isComplete() { + return this._isComplete + } + addSemanticTokens(e, t) { + const i = this._pieces; + if (0 === i.length) return t; + const n = i[_._findFirstPieceWithLine(i, e)].getLineTokens(e); + if (!n) return t; + const r = t.getCount(), + s = n.getCount(); + let a = 0, + l = [], + d = 0, + c = 0; + const h = (e, t) => { + e !== c && (c = e, l[d++] = e, l[d++] = t) + }; + for (let e = 0; e < s; e++) { + const i = n.getStartCharacter(e), + o = n.getEndCharacter(e), + s = n.getMetadata(e), + l = ((1 & s ? 2048 : 0) | (2 & s ? 4096 : 0) | (4 & s ? 8192 : 0) | + (8 & s ? 8372224 : 0) | (16 & s ? 4286578688 : 0)) >>> 0, + d = ~l >>> 0; + for (; a < r && t.getEndOffset(a) <= i;) h(t.getEndOffset(a), t.getMetadata( + a)), a++; + for (a < r && t.getStartOffset(a) < i && h(i, t.getMetadata(a)); a < + r && t.getEndOffset(a) < o;) h(t.getEndOffset(a), t.getMetadata(a) & + d | s & l), a++; + if (a < r) h(o, t.getMetadata(a) & d | s & l), t.getEndOffset(a) === + o && a++; + else { + const e = Math.min(Math.max(0, a - 1), r - 1); + h(o, t.getMetadata(e) & d | s & l) + } + } + for (; a < r;) h(t.getEndOffset(a), t.getMetadata(a)), a++; + return new o.A(new Uint32Array(l), t.getLineContent()) + } + static _findFirstPieceWithLine(e, t) { + let i = 0, + n = e.length - 1; + for (; i < n;) { + let o = i + Math.floor((n - i) / 2); + if (e[o].endLineNumber < t) i = o + 1; + else { + if (!(e[o].startLineNumber > t)) { + for (; o > i && e[o - 1].startLineNumber <= t && t <= e[o - 1].endLineNumber;) + o--; + return o + } + n = o - 1 + } + } + return i + } + acceptEdit(e, t, i, n, o) { + for (const r of this._pieces) r.acceptEdit(e, t, i, n, o) + } + } + class b { + constructor() { + this._lineTokens = [], this._len = 0 + } + flush() { + this._lineTokens = [], this._len = 0 + } + getTokens(e, t, i) { + let n = null; + if (t < this._len && (n = this._lineTokens[t]), null !== n && n !== c) + return new o.A(f(n), i); + let r = new Uint32Array(2); + return r[0] = i.length, r[1] = d(e), new o.A(r, i) + } + static _massageTokens(e, t, i) { + const n = i ? f(i) : null; + if (0 === t) { + let t = !1; + if (n && n.length > 1 && (t = a.NX.getLanguageId(n[1]) !== e), !t) + return c + } + if (!n || 0 === n.length) { + const i = new Uint32Array(2); + return i[0] = t, i[1] = d(e), i.buffer + } + return n[n.length - 2] = t, 0 === n.byteOffset && n.byteLength === n.buffer + .byteLength ? n.buffer : n + } + _ensureLine(e) { + for (; e >= this._len;) this._lineTokens[this._len] = null, this._len++ + } + _deleteLines(e, t) { + 0 !== t && (e + t > this._len && (t = this._len - e), this._lineTokens + .splice(e, t), this._len -= t) + } + _insertLines(e, t) { + if (0 === t) return; + let i = []; + for (let e = 0; e < t; e++) i[e] = null; + this._lineTokens = n.Zv(this._lineTokens, e, i), this._len += t + } + setTokens(e, t, i, n, o) { + const r = b._massageTokens(e, i, n); + this._ensureLine(t); + const s = this._lineTokens[t]; + return this._lineTokens[t] = r, !!o && !b._equals(s, r) + } + static _equals(e, t) { + if (!e || !t) return !e && !t; + const i = f(e), + n = f(t); + if (i.length !== n.length) return !1; + for (let e = 0, t = i.length; e < t; e++) + if (i[e] !== n[e]) return !1; + return !0 + } + acceptEdit(e, t, i) { + this._acceptDeleteRange(e), this._acceptInsertText(new r.L(e.startLineNumber, + e.startColumn), t, i) + } + _acceptDeleteRange(e) { + const t = e.startLineNumber - 1; + if (t >= this._len) return; + if (e.startLineNumber === e.endLineNumber) { + if (e.startColumn === e.endColumn) return; + return void(this._lineTokens[t] = b._delete(this._lineTokens[t], e.startColumn - + 1, e.endColumn - 1)) + } + this._lineTokens[t] = b._deleteEnding(this._lineTokens[t], e.startColumn - + 1); + const i = e.endLineNumber - 1; + let n = null; + i < this._len && (n = b._deleteBeginning(this._lineTokens[i], e.endColumn - + 1)), this._lineTokens[t] = b._append(this._lineTokens[t], n), this._deleteLines( + e.startLineNumber, e.endLineNumber - e.startLineNumber) + } + _acceptInsertText(e, t, i) { + if (0 === t && 0 === i) return; + const n = e.lineNumber - 1; + n >= this._len || (0 !== t ? (this._lineTokens[n] = b._deleteEnding( + this._lineTokens[n], e.column - 1), this._lineTokens[n] = b._insert( + this._lineTokens[n], e.column - 1, i), this._insertLines(e.lineNumber, + t)) : this._lineTokens[n] = b._insert(this._lineTokens[n], e.column - + 1, i)) + } + static _deleteBeginning(e, t) { + return null === e || e === c ? e : b._delete(e, 0, t) + } + static _deleteEnding(e, t) { + if (null === e || e === c) return e; + const i = f(e), + n = i[i.length - 2]; + return b._delete(e, t, n) + } + static _delete(e, t, i) { + if (null === e || e === c || t === i) return e; + const n = f(e), + r = n.length >>> 1; + if (0 === t && n[n.length - 2] === i) return c; + const s = o.A.findIndexInTokensArray(n, t), + a = s > 0 ? n[s - 1 << 1] : 0; + if (i < n[s << 1]) { + const o = i - t; + for (let e = s; e < r; e++) n[e << 1] -= o; + return e + } + let l, d; + a !== t ? (n[s << 1] = t, l = s + 1 << 1, d = t) : (l = s << 1, d = a); + const h = i - t; + for (let e = s + 1; e < r; e++) { + const t = n[e << 1] - h; + t > d && (n[l++] = t, n[l++] = n[1 + (e << 1)], d = t) + } + if (l === n.length) return e; + let u = new Uint32Array(l); + return u.set(n.subarray(0, l), 0), u.buffer + } + static _append(e, t) { + if (t === c) return e; + if (e === c) return t; + if (null === e) return e; + if (null === t) return null; + const i = f(e), + n = f(t), + o = n.length >>> 1; + let r = new Uint32Array(i.length + n.length); + r.set(i, 0); + let s = i.length; + const a = i[i.length - 2]; + for (let e = 0; e < o; e++) r[s++] = n[e << 1] + a, r[s++] = n[1 + (e << + 1)]; + return r.buffer + } + static _insert(e, t, i) { + if (null === e || e === c) return e; + const n = f(e), + r = n.length >>> 1; + let s = o.A.findIndexInTokensArray(n, t); + s > 0 && n[s - 1 << 1] === t && s--; + for (let e = s; e < r; e++) n[e << 1] += i; + return e + } + } + }, + 7461: (e, t, i) => { + "use strict"; + i.d(t, { + vu: () => n, + Af: () => o, + eq: () => r, + t2: () => a + }); + const n = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?", + o = function(e = "") { + let t = "(-?\\d*\\.\\d\\w*)|([^"; + for (const i of n) e.indexOf(i) >= 0 || (t += "\\" + i); + return t += "\\s]+)", new RegExp(t, "g") + }(); + + function r(e) { + let t = o; + if (e && e instanceof RegExp) + if (e.global) t = e; + else { + let i = "g"; + e.ignoreCase && (i += "i"), e.multiline && (i += "m"), e.unicode && (i += + "u"), t = new RegExp(e.source, i) + } + return t.lastIndex = 0, t + } + const s = { + maxLen: 1e3, + windowSize: 15, + timeBudget: 150 + }; + + function a(e, t, i, n, o = s) { + if (i.length > o.maxLen) { + let r = e - o.maxLen / 2; + return r < 0 ? r = 0 : n += r, a(e, t, i = i.substring(r, e + o.maxLen / + 2), n, o) + } + const r = Date.now(), + d = e - 1 - n; + let c = -1, + h = null; + for (let e = 1; !(Date.now() - r >= o.timeBudget); e++) { + const n = d - o.windowSize * e; + t.lastIndex = Math.max(0, n); + const r = l(t, i, d, c); + if (!r && h) break; + if (h = r, n <= 0) break; + c = n + } + if (h) { + let e = { + word: h[0], + startColumn: n + 1 + h.index, + endColumn: n + 1 + h.index + h[0].length + }; + return t.lastIndex = 0, e + } + return null + } + + function l(e, t, i, n) { + let o; + for (; o = e.exec(t);) { + const t = o.index || 0; + if (t <= i && e.lastIndex >= i) return o; + if (n > 0 && t > n) return null + } + return null + } + }, + 4101: (e, t, i) => { + "use strict"; + i.d(t, { + H9: () => O, + He: () => A, + OH: () => z, + KZ: () => y, + RN: () => I, + Ct: () => E, + Az: () => P, + MY: () => m, + vH: () => N, + vN: () => F, + K7: () => j, + wT: () => U, + vJ: () => L, + AD: () => v, + aC: () => H, + xp: () => k, + vI: () => T, + mX: () => R, + bw: () => g, + zu: () => S, + rl: () => d, + pM: () => W, + id: () => D, + ln: () => B, + FL: () => w, + G0: () => C, + AC: () => V, + nD: () => x, + WW: () => p, + uZ: () => f, + NX: () => c, + RW: () => K, + tA: () => M, + jr: () => u, + Sy: () => h, + vx: () => b + }); + var n = i(666), + o = i(4314), + r = i(1036), + s = i(4669), + a = i(5976), + l = i(3046); + class d { + constructor(e, t) { + this.language = e, this.id = t + } + } + class c { + static getLanguageId(e) { + return (255 & e) >>> 0 + } + static getTokenType(e) { + return (1792 & e) >>> 8 + } + static getFontStyle(e) { + return (14336 & e) >>> 11 + } + static getForeground(e) { + return (8372224 & e) >>> 14 + } + static getBackground(e) { + return (4286578688 & e) >>> 23 + } + static getClassNameFromMetadata(e) { + let t = "mtk" + this.getForeground(e), + i = this.getFontStyle(e); + return 1 & i && (t += " mtki"), 2 & i && (t += " mtkb"), 4 & i && (t += + " mtku"), t + } + static getInlineStyleFromMetadata(e, t) { + const i = this.getForeground(e), + n = this.getFontStyle(e); + let o = `color: ${t[i]};`; + return 1 & n && (o += "font-style: italic;"), 2 & n && (o += + "font-weight: bold;"), 4 & n && (o += "text-decoration: underline;"), + o + } + } + const h = function() { + let e = Object.create(null); + return e[0] = "symbol-method", e[1] = "symbol-function", e[2] = + "symbol-constructor", e[3] = "symbol-field", e[4] = "symbol-variable", + e[5] = "symbol-class", e[6] = "symbol-struct", e[7] = + "symbol-interface", e[8] = "symbol-module", e[9] = "symbol-property", + e[10] = "symbol-event", e[11] = "symbol-operator", e[12] = + "symbol-unit", e[13] = "symbol-value", e[14] = "symbol-constant", e[15] = + "symbol-enum", e[16] = "symbol-enum-member", e[17] = "symbol-keyword", + e[27] = "symbol-snippet", e[18] = "symbol-text", e[19] = + "symbol-color", e[20] = "symbol-file", e[21] = "symbol-reference", e[ + 22] = "symbol-customcolor", e[23] = "symbol-folder", e[24] = + "symbol-type-parameter", e[25] = "account", e[26] = "issues", + function(t) { + const i = e[t]; + let n = i && l.fK.get(i); + return n || (console.info("No codicon found for CompletionItemKind " + + t), n = l.lA.symbolProperty), n.classNames + } + }(); + let u = function() { + let e = Object.create(null); + return e.method = 0, e.function = 1, e.constructor = 2, e.field = 3, e.variable = + 4, e.class = 5, e.struct = 6, e.interface = 7, e.module = 8, e.property = + 9, e.event = 10, e.operator = 11, e.unit = 12, e.value = 13, e.constant = + 14, e.enum = 15, e["enum-member"] = 16, e.enumMember = 16, e.keyword = + 17, e.snippet = 27, e.text = 18, e.color = 19, e.file = 20, e.reference = + 21, e.customcolor = 22, e.folder = 23, e["type-parameter"] = 24, e.typeParameter = + 24, e.account = 25, e.issue = 26, + function(t, i) { + let n = e[t]; + return void 0 !== n || i || (n = 9), n + } + }(); + var g, p, m, f, _; + + function b(e) { + return e && n.o.isUri(e.uri) && o.e.isIRange(e.range) && (o.e.isIRange(e + .originSelectionRange) || o.e.isIRange(e.targetSelectionRange)) + }! function(e) { + e[e.Automatic = 0] = "Automatic", e[e.Explicit = 1] = "Explicit" + }(g || (g = {})), + function(e) { + e[e.Invoke = 1] = "Invoke", e[e.TriggerCharacter = 2] = + "TriggerCharacter", e[e.ContentChange = 3] = "ContentChange" + }(p || (p = {})), + function(e) { + e[e.Text = 0] = "Text", e[e.Read = 1] = "Read", e[e.Write = 2] = "Write" + }(m || (m = {})), + function(e) { + const t = new Map; + t.set("file", 0), t.set("module", 1), t.set("namespace", 2), t.set( + "package", 3), t.set("class", 4), t.set("method", 5), t.set("property", + 6), t.set("field", 7), t.set("constructor", 8), t.set("enum", 9), t.set( + "interface", 10), t.set("function", 11), t.set("variable", 12), t.set( + "constant", 13), t.set("string", 14), t.set("number", 15), t.set( + "boolean", 16), t.set("array", 17), t.set("object", 18), t.set("key", + 19), t.set("null", 20), t.set("enum-member", 21), t.set("struct", 22), + t.set("event", 23), t.set("operator", 24), t.set("type-parameter", 25); + const i = new Map; + i.set(0, "file"), i.set(1, "module"), i.set(2, "namespace"), i.set(3, + "package"), i.set(4, "class"), i.set(5, "method"), i.set(6, "property"), + i.set(7, "field"), i.set(8, "constructor"), i.set(9, "enum"), i.set(10, + "interface"), i.set(11, "function"), i.set(12, "variable"), i.set(13, + "constant"), i.set(14, "string"), i.set(15, "number"), i.set(16, + "boolean"), i.set(17, "array"), i.set(18, "object"), i.set(19, "key"), + i.set(20, "null"), i.set(21, "enum-member"), i.set(22, "struct"), i.set( + 23, "event"), i.set(24, "operator"), i.set(25, "type-parameter"), e.fromString = + function(e) { + return t.get(e) + }, e.toString = function(e) { + return i.get(e) + }, e.toCssClassName = function(e, t) { + const n = i.get(e); + let o = n && l.fK.get("symbol-" + n); + return o || (console.info("No codicon found for SymbolKind " + e), o = + l.lA.symbolProperty), `${t?"inline":"block"} ${o.classNames}` + } + }(f || (f = {})); + class v { + constructor(e) { + this.value = e + } + } + v.Comment = new v("comment"), v.Imports = new v("imports"), v.Region = + new v("region"), + function(e) { + e[e.Other = 0] = "Other", e[e.Type = 1] = "Type", e[e.Parameter = 2] = + "Parameter" + }(_ || (_ = {})); + const w = new r.c, + C = new r.c, + y = new r.c, + S = new r.c, + x = new r.c, + k = new r.c, + L = new r.c, + N = new r.c, + D = new r.c, + E = new r.c, + I = new r.c, + T = new r.c, + M = new r.c, + A = new r.c, + R = new r.c, + O = new r.c, + P = new r.c, + F = new r.c, + B = new r.c, + W = new r.c, + z = new r.c, + V = new r.c, + H = new r.c, + U = new r.c, + j = new r.c, + K = new class { + constructor() { + this._map = new Map, this._promises = new Map, this._onDidChange = + new s.Q5, this.onDidChange = this._onDidChange.event, this._colorMap = + null + } + fire(e) { + this._onDidChange.fire({ + changedLanguages: e, + changedColorMap: !1 + }) + } + register(e, t) { + return this._map.set(e, t), this.fire([e]), (0, a.OF)((() => { + this._map.get(e) === t && (this._map.delete(e), this.fire([e])) + })) + } + registerPromise(e, t) { + let i = null, + n = !1; + return this._promises.set(e, t.then((t => { + this._promises.delete(e), !n && t && (i = this.register(e, t)) + }))), (0, a.OF)((() => { + n = !0, i && i.dispose() + })) + } + getPromise(e) { + const t = this.get(e); + if (t) return Promise.resolve(t); + const i = this._promises.get(e); + return i ? i.then((t => this.get(e))) : null + } + get(e) { + return this._map.get(e) || null + } + setColorMap(e) { + this._colorMap = e, this._onDidChange.fire({ + changedLanguages: Array.from(this._map.keys()), + changedColorMap: !0 + }) + } + getColorMap() { + return this._colorMap + } + getDefaultBackground() { + return this._colorMap && this._colorMap.length > 2 ? this._colorMap[2] : + null + } + } + }, + 7354: (e, t, i) => { + "use strict"; + var n; + i.d(t, { + wU: () => n, + V6: () => o, + c$: () => r + }), + function(e) { + e[e.None = 0] = "None", e[e.Indent = 1] = "Indent", e[e.IndentOutdent = + 2] = "IndentOutdent", e[e.Outdent = 3] = "Outdent" + }(n || (n = {})); + class o { + constructor(e) { + if (this._standardAutoClosingPairConditionalBrand = void 0, this.open = + e.open, this.close = e.close, this._standardTokenMask = 0, Array.isArray( + e.notIn)) + for (let t = 0, i = e.notIn.length; t < i; t++) switch (e.notIn[t]) { + case "string": + this._standardTokenMask |= 2; + break; + case "comment": + this._standardTokenMask |= 1; + break; + case "regex": + this._standardTokenMask |= 4 + } + } + isOK(e) { + return 0 == (this._standardTokenMask & e) + } + } + class r { + constructor(e) { + this.autoClosingPairsOpenByStart = new Map, this.autoClosingPairsOpenByEnd = + new Map, this.autoClosingPairsCloseByStart = new Map, this.autoClosingPairsCloseByEnd = + new Map, this.autoClosingPairsCloseSingleChar = new Map; + for (const t of e) s(this.autoClosingPairsOpenByStart, t.open.charAt(0), + t), s(this.autoClosingPairsOpenByEnd, t.open.charAt(t.open.length - + 1), t), s(this.autoClosingPairsCloseByStart, t.close.charAt(0), t), + s(this.autoClosingPairsCloseByEnd, t.close.charAt(t.close.length - 1), + t), 1 === t.close.length && 1 === t.open.length && s(this.autoClosingPairsCloseSingleChar, + t.close, t) + } + } + + function s(e, t, i) { + e.has(t) ? e.get(t).push(i) : e.set(t, [i]) + } + }, + 3831: (e, t, i) => { + "use strict"; + i.d(t, { + zu: () => w + }); + var n = i(4669), + o = i(5976), + r = i(7295), + s = i(7461), + a = i(7354), + l = i(764); + class d { + constructor(e) { + if (e.autoClosingPairs ? this._autoClosingPairs = e.autoClosingPairs.map( + (e => new a.V6(e))) : e.brackets ? this._autoClosingPairs = e.brackets + .map((e => new a.V6({ + open: e[0], + close: e[1] + }))) : this._autoClosingPairs = [], e.colorizedBracketPairs ? this._colorizedBracketPairs = + e.colorizedBracketPairs.map((e => [e[0], e[1]])) : e.brackets ? this._colorizedBracketPairs = + e.brackets.map((e => [e[0], e[1]])) : this._colorizedBracketPairs = [], + e.__electricCharacterSupport && e.__electricCharacterSupport.docComment + ) { + const t = e.__electricCharacterSupport.docComment; + this._autoClosingPairs.push(new a.V6({ + open: t.open, + close: t.close || "" + })) + } + this._autoCloseBefore = "string" == typeof e.autoCloseBefore ? e.autoCloseBefore : + d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED, this._surroundingPairs = + e.surroundingPairs || this._autoClosingPairs + } + getAutoClosingPairs() { + return this._autoClosingPairs + } + getAutoCloseBeforeSet() { + return this._autoCloseBefore + } + static shouldAutoClosePair(e, t, i) { + if (0 === t.getTokenCount()) return !0; + const n = t.findTokenIndexAtOffset(i - 2), + o = t.getStandardTokenType(n); + return e.isOK(o) + } + getSurroundingPairs() { + return this._surroundingPairs + } + getColorizedBrackets() { + return this._colorizedBracketPairs + } + } + d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED = ";:.,=}])> \n\t"; + var c = i(4227); + class h { + constructor(e) { + this._richEditBrackets = e + } + getElectricCharacters() { + let e = []; + if (this._richEditBrackets) + for (const t of this._richEditBrackets.brackets) + for (const i of t.close) { + const t = i.charAt(i.length - 1); + e.push(t) + } + return e = e.filter(((e, t, i) => i.indexOf(e) === t)), e + } + onElectricCharacter(e, t, i) { + if (!this._richEditBrackets || 0 === this._richEditBrackets.brackets.length) + return null; + const n = t.findTokenIndexAtOffset(i - 1); + if ((0, l.Bu)(t.getStandardTokenType(n))) return null; + const o = this._richEditBrackets.reversedRegex, + r = t.getLineContent().substring(0, i - 1) + e, + s = c.Vr.findPrevBracketInRange(o, 1, r, 0, r.length); + if (!s) return null; + const a = r.substring(s.startColumn - 1, s.endColumn - 1).toLowerCase(); + if (this._richEditBrackets.textIsOpenBracket[a]) return null; + const d = t.getActualLineContentBefore(s.startColumn - 1); + return /^\s*$/.test(d) ? { + matchOpenBracket: a + } : null + } + } + + function u(e) { + return e.global && (e.lastIndex = 0), !0 + } + class g { + constructor(e) { + this._indentationRules = e + } + shouldIncrease(e) { + return !!(this._indentationRules && this._indentationRules.increaseIndentPattern && + u(this._indentationRules.increaseIndentPattern) && this._indentationRules + .increaseIndentPattern.test(e)) + } + shouldDecrease(e) { + return !!(this._indentationRules && this._indentationRules.decreaseIndentPattern && + u(this._indentationRules.decreaseIndentPattern) && this._indentationRules + .decreaseIndentPattern.test(e)) + } + shouldIndentNextLine(e) { + return !!(this._indentationRules && this._indentationRules.indentNextLinePattern && + u(this._indentationRules.indentNextLinePattern) && this._indentationRules + .indentNextLinePattern.test(e)) + } + shouldIgnore(e) { + return !!(this._indentationRules && this._indentationRules.unIndentedLinePattern && + u(this._indentationRules.unIndentedLinePattern) && this._indentationRules + .unIndentedLinePattern.test(e)) + } + getIndentMetadata(e) { + let t = 0; + return this.shouldIncrease(e) && (t += 1), this.shouldDecrease(e) && ( + t += 2), this.shouldIndentNextLine(e) && (t += 4), this.shouldIgnore( + e) && (t += 8), t + } + } + var p = i(7301); + class m { + constructor(e) { + (e = e || {}).brackets = e.brackets || [ + ["(", ")"], + ["{", "}"], + ["[", "]"] + ], this._brackets = [], e.brackets.forEach((e => { + const t = m._createOpenBracketRegExp(e[0]), + i = m._createCloseBracketRegExp(e[1]); + t && i && this._brackets.push({ + open: e[0], + openRegExp: t, + close: e[1], + closeRegExp: i + }) + })), this._regExpRules = e.onEnterRules || [] + } + onEnter(e, t, i, n) { + if (e >= 3) + for (let e = 0, o = this._regExpRules.length; e < o; e++) { + let o = this._regExpRules[e]; + if ([{ + reg: o.beforeText, + text: i + }, { + reg: o.afterText, + text: n + }, { + reg: o.previousLineText, + text: t + }].every((e => !e.reg || (e.reg.lastIndex = 0, e.reg.test(e.text))))) + return o.action + } + if (e >= 2 && i.length > 0 && n.length > 0) + for (let e = 0, t = this._brackets.length; e < t; e++) { + let t = this._brackets[e]; + if (t.openRegExp.test(i) && t.closeRegExp.test(n)) return { + indentAction: a.wU.IndentOutdent + } + } + if (e >= 2 && i.length > 0) + for (let e = 0, t = this._brackets.length; e < t; e++) + if (this._brackets[e].openRegExp.test(i)) return { + indentAction: a.wU.Indent + }; + return null + } + static _createOpenBracketRegExp(e) { + let t = r.ec(e); + return /\B/.test(t.charAt(0)) || (t = "\\b" + t), t += "\\s*$", m._safeRegExp( + t) + } + static _createCloseBracketRegExp(e) { + let t = r.ec(e); + return /\B/.test(t.charAt(t.length - 1)) || (t += "\\b"), t = "^\\s*" + + t, m._safeRegExp(t) + } + static _safeRegExp(e) { + try { + return new RegExp(e) + } catch (e) { + return (0, p.dL)(e), null + } + } + } + class f { + constructor(e, t) { + this._languageIdentifier = e, this._brackets = null, this._electricCharacter = + null, this._conf = t, this._onEnterSupport = this._conf.brackets || + this._conf.indentationRules || this._conf.onEnterRules ? new m(this._conf) : + null, this.comments = f._handleComments(this._conf), this.characterPair = + new d(this._conf), this.wordDefinition = this._conf.wordPattern || s.Af, + this.indentationRules = this._conf.indentationRules, this._conf.indentationRules ? + this.indentRulesSupport = new g(this._conf.indentationRules) : this.indentRulesSupport = + null, this.foldingRules = this._conf.folding || {} + } + get brackets() { + return !this._brackets && this._conf.brackets && (this._brackets = new c + .EA(this._languageIdentifier, this._conf.brackets)), this._brackets + } + get electricCharacter() { + return this._electricCharacter || (this._electricCharacter = new h( + this.brackets)), this._electricCharacter + } + onEnter(e, t, i, n) { + return this._onEnterSupport ? this._onEnterSupport.onEnter(e, t, i, n) : + null + } + static _handleComments(e) { + let t = e.comments; + if (!t) return null; + let i = {}; + if (t.lineComment && (i.lineCommentToken = t.lineComment), t.blockComment) { + let [e, n] = t.blockComment; + i.blockCommentStartToken = e, i.blockCommentEndToken = n + } + return i + } + } + class _ { + constructor(e) { + this.languageIdentifier = e + } + } + class b { + constructor(e, t, i) { + this.configuration = e, this.priority = t, this.order = i + } + static cmp(e, t) { + return e.priority === t.priority ? e.order - t.order : e.priority - t.priority + } + } + class v { + constructor(e) { + this.languageIdentifier = e, this._resolved = null, this._entries = [], + this._order = 0, this._resolved = null + } + register(e, t) { + const i = new b(e, t, ++this._order); + return this._entries.push(i), this._resolved = null, (0, o.OF)((() => { + for (let e = 0; e < this._entries.length; e++) + if (this._entries[e] === i) { + this._entries.splice(e, 1), this._resolved = null; + break + } + })) + } + getRichEditSupport() { + if (!this._resolved) { + const e = this._resolve(); + e && (this._resolved = new f(this.languageIdentifier, e)) + } + return this._resolved + } + _resolve() { + if (0 === this._entries.length) return null; + this._entries.sort(b.cmp); + const e = {}; + for (const t of this._entries) { + const i = t.configuration; + e.comments = i.comments || e.comments, e.brackets = i.brackets || e.brackets, + e.wordPattern = i.wordPattern || e.wordPattern, e.indentationRules = + i.indentationRules || e.indentationRules, e.onEnterRules = i.onEnterRules || + e.onEnterRules, e.autoClosingPairs = i.autoClosingPairs || e.autoClosingPairs, + e.surroundingPairs = i.surroundingPairs || e.surroundingPairs, e.autoCloseBefore = + i.autoCloseBefore || e.autoCloseBefore, e.folding = i.folding || e.folding, + e.colorizedBracketPairs = i.colorizedBracketPairs || e.colorizedBracketPairs, + e.__electricCharacterSupport = i.__electricCharacterSupport || e.__electricCharacterSupport + } + return e + } + } + const w = new class { + constructor() { + this._entries2 = new Map, this._onDidChange = new n.Q5, this.onDidChange = + this._onDidChange.event + } + register(e, t, i = 0) { + let n = this._entries2.get(e.id); + n || (n = new v(e), this._entries2.set(e.id, n)); + const r = n.register(t, i); + return this._onDidChange.fire(new _(e)), (0, o.OF)((() => { + r.dispose(), this._onDidChange.fire(new _(e)) + })) + } + _getRichEditSupport(e) { + const t = this._entries2.get(e); + return t ? t.getRichEditSupport() : null + } + getIndentationRules(e) { + const t = this._getRichEditSupport(e); + return t && t.indentationRules || null + } + _getElectricCharacterSupport(e) { + let t = this._getRichEditSupport(e); + return t && t.electricCharacter || null + } + getElectricCharacters(e) { + let t = this._getElectricCharacterSupport(e); + return t ? t.getElectricCharacters() : [] + } + onElectricCharacter(e, t, i) { + let n = (0, l.wH)(t, i - 1), + o = this._getElectricCharacterSupport(n.languageId); + return o ? o.onElectricCharacter(e, n, i - n.firstCharOffset) : null + } + getComments(e) { + let t = this._getRichEditSupport(e); + return t && t.comments || null + } + _getCharacterPairSupport(e) { + let t = this._getRichEditSupport(e); + return t && t.characterPair || null + } + getAutoClosingPairs(e) { + const t = this._getCharacterPairSupport(e); + return new a.c$(t ? t.getAutoClosingPairs() : []) + } + getAutoCloseBeforeSet(e) { + let t = this._getCharacterPairSupport(e); + return t ? t.getAutoCloseBeforeSet() : d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED + } + getSurroundingPairs(e) { + let t = this._getCharacterPairSupport(e); + return t ? t.getSurroundingPairs() : [] + } + shouldAutoClosePair(e, t, i) { + const n = (0, l.wH)(t, i - 1); + return d.shouldAutoClosePair(e, n, i - n.firstCharOffset) + } + getWordDefinition(e) { + let t = this._getRichEditSupport(e); + return t ? (0, s.eq)(t.wordDefinition || null) : (0, s.eq)(null) + } + getFoldingRules(e) { + let t = this._getRichEditSupport(e); + return t ? t.foldingRules : {} + } + getIndentRulesSupport(e) { + let t = this._getRichEditSupport(e); + return t && t.indentRulesSupport || null + } + getPrecedingValidLine(e, t, i) { + let n = e.getLanguageIdAtPosition(t, 0); + if (t > 1) { + let o, r = -1; + for (o = t - 1; o >= 1; o--) { + if (e.getLanguageIdAtPosition(o, 0) !== n) return r; + let t = e.getLineContent(o); + if (!i.shouldIgnore(t) && !/^\s+$/.test(t) && "" !== t) return o; + r = o + } + } + return -1 + } + getInheritIndentForLine(e, t, i, n = !0) { + if (e < 4) return null; + const o = this.getIndentRulesSupport(t.getLanguageIdentifier().id); + if (!o) return null; + if (i <= 1) return { + indentation: "", + action: null + }; + const s = this.getPrecedingValidLine(t, i, o); + if (s < 0) return null; + if (s < 1) return { + indentation: "", + action: null + }; + const l = t.getLineContent(s); + if (o.shouldIncrease(l) || o.shouldIndentNextLine(l)) return { + indentation: r.V8(l), + action: a.wU.Indent, + line: s + }; + if (o.shouldDecrease(l)) return { + indentation: r.V8(l), + action: null, + line: s + }; { + if (1 === s) return { + indentation: r.V8(t.getLineContent(s)), + action: null, + line: s + }; + const e = s - 1, + i = o.getIndentMetadata(t.getLineContent(e)); + if (!(3 & i) && 4 & i) { + let i = 0; + for (let n = e - 1; n > 0; n--) + if (!o.shouldIndentNextLine(t.getLineContent(n))) { + i = n; + break + } + return { + indentation: r.V8(t.getLineContent(i + 1)), + action: null, + line: i + 1 + } + } + if (n) return { + indentation: r.V8(t.getLineContent(s)), + action: null, + line: s + }; + for (let e = s; e > 0; e--) { + const i = t.getLineContent(e); + if (o.shouldIncrease(i)) return { + indentation: r.V8(i), + action: a.wU.Indent, + line: e + }; + if (o.shouldIndentNextLine(i)) { + let i = 0; + for (let n = e - 1; n > 0; n--) + if (!o.shouldIndentNextLine(t.getLineContent(e))) { + i = n; + break + } + return { + indentation: r.V8(t.getLineContent(i + 1)), + action: null, + line: i + 1 + } + } + if (o.shouldDecrease(i)) return { + indentation: r.V8(i), + action: null, + line: e + } + } + return { + indentation: r.V8(t.getLineContent(1)), + action: null, + line: 1 + } + } + } + getGoodIndentForLine(e, t, i, n, o) { + if (e < 4) return null; + const s = this._getRichEditSupport(i); + if (!s) return null; + const l = this.getIndentRulesSupport(i); + if (!l) return null; + const d = this.getInheritIndentForLine(e, t, n), + c = t.getLineContent(n); + if (d) { + const i = d.line; + if (void 0 !== i) { + const n = s.onEnter(e, "", t.getLineContent(i), ""); + if (n) { + let e = r.V8(t.getLineContent(i)); + return n.removeText && (e = e.substring(0, e.length - n.removeText)), + n.indentAction === a.wU.Indent || n.indentAction === a.wU.IndentOutdent ? + e = o.shiftIndent(e) : n.indentAction === a.wU.Outdent && (e = o.unshiftIndent( + e)), l.shouldDecrease(c) && (e = o.unshiftIndent(e)), n.appendText && + (e += n.appendText), r.V8(e) + } + } + return l.shouldDecrease(c) ? d.action === a.wU.Indent ? d.indentation : + o.unshiftIndent(d.indentation) : d.action === a.wU.Indent ? o.shiftIndent( + d.indentation) : d.indentation + } + return null + } + getIndentForEnter(e, t, i, n) { + if (e < 4) return null; + t.forceTokenization(i.startLineNumber); + const o = t.getLineTokens(i.startLineNumber), + s = (0, l.wH)(o, i.startColumn - 1), + d = s.getLineContent(); + let c, h, u = !1; + s.firstCharOffset > 0 && o.getLanguageId(0) !== s.languageId ? (u = ! + 0, c = d.substr(0, i.startColumn - 1 - s.firstCharOffset)) : c = o.getLineContent() + .substring(0, i.startColumn - 1), h = i.isEmpty() ? d.substr(i.startColumn - + 1 - s.firstCharOffset) : this.getScopedLineTokens(t, i.endLineNumber, + i.endColumn).getLineContent().substr(i.endColumn - 1 - s.firstCharOffset); + const g = this.getIndentRulesSupport(s.languageId); + if (!g) return null; + const p = c, + m = r.V8(c), + f = { + getLineTokens: e => t.getLineTokens(e), + getLanguageIdentifier: () => t.getLanguageIdentifier(), + getLanguageIdAtPosition: (e, i) => t.getLanguageIdAtPosition(e, i), + getLineContent: e => e === i.startLineNumber ? p : t.getLineContent( + e) + }, + _ = r.V8(o.getLineContent()), + b = this.getInheritIndentForLine(e, f, i.startLineNumber + 1); + if (!b) { + const e = u ? _ : m; + return { + beforeEnter: e, + afterEnter: e + } + } + let v = u ? _ : b.indentation; + return b.action === a.wU.Indent && (v = n.shiftIndent(v)), g.shouldDecrease( + h) && (v = n.unshiftIndent(v)), { + beforeEnter: u ? _ : m, + afterEnter: v + } + } + getIndentActionForType(e, t, i, n, o) { + if (e < 4) return null; + const r = this.getScopedLineTokens(t, i.startLineNumber, i.startColumn); + if (r.firstCharOffset) return null; + const s = this.getIndentRulesSupport(r.languageId); + if (!s) return null; + const l = r.getLineContent(), + d = l.substr(0, i.startColumn - 1 - r.firstCharOffset); + let c; + if (c = i.isEmpty() ? l.substr(i.startColumn - 1 - r.firstCharOffset) : + this.getScopedLineTokens(t, i.endLineNumber, i.endColumn).getLineContent() + .substr(i.endColumn - 1 - r.firstCharOffset), !s.shouldDecrease(d + + c) && s.shouldDecrease(d + n + c)) { + const n = this.getInheritIndentForLine(e, t, i.startLineNumber, !1); + if (!n) return null; + let r = n.indentation; + return n.action !== a.wU.Indent && (r = o.unshiftIndent(r)), r + } + return null + } + getIndentMetadata(e, t) { + const i = this.getIndentRulesSupport(e.getLanguageIdentifier().id); + return i ? t < 1 || t > e.getLineCount() ? null : i.getIndentMetadata( + e.getLineContent(t)) : null + } + getEnterAction(e, t, i) { + const n = this.getScopedLineTokens(t, i.startLineNumber, i.startColumn), + o = this._getRichEditSupport(n.languageId); + if (!o) return null; + const r = n.getLineContent(), + s = r.substr(0, i.startColumn - 1 - n.firstCharOffset); + let l; + l = i.isEmpty() ? r.substr(i.startColumn - 1 - n.firstCharOffset) : + this.getScopedLineTokens(t, i.endLineNumber, i.endColumn).getLineContent() + .substr(i.endColumn - 1 - n.firstCharOffset); + let d = ""; + if (i.startLineNumber > 1 && 0 === n.firstCharOffset) { + const e = this.getScopedLineTokens(t, i.startLineNumber - 1); + e.languageId === n.languageId && (d = e.getLineContent()) + } + const c = o.onEnter(e, d, s, l); + if (!c) return null; + const h = c.indentAction; + let u = c.appendText; + const g = c.removeText || 0; + u ? h === a.wU.Indent && (u = "\t" + u) : u = h === a.wU.Indent || h === + a.wU.IndentOutdent ? "\t" : ""; + let p = this.getIndentationAtPosition(t, i.startLineNumber, i.startColumn); + return g && (p = p.substring(0, p.length - g)), { + indentAction: h, + appendText: u, + removeText: g, + indentation: p + } + } + getIndentationAtPosition(e, t, i) { + const n = e.getLineContent(t); + let o = r.V8(n); + return o.length > i - 1 && (o = o.substring(0, i - 1)), o + } + getScopedLineTokens(e, t, i) { + e.forceTokenization(t); + const n = e.getLineTokens(t), + o = void 0 === i ? e.getLineMaxColumn(t) - 1 : i - 1; + return (0, l.wH)(n, o) + } + getBracketsSupport(e) { + const t = this._getRichEditSupport(e); + return t && t.brackets || null + } + getColorizedBracketPairs(e) { + var t; + return (null === (t = this._getRichEditSupport(e)) || void 0 === t ? + void 0 : t.characterPair.getColorizedBrackets()) || [] + } + } + }, + 1036: (e, t, i) => { + "use strict"; + i.d(t, { + c: () => g, + Y: () => f + }); + var n = i(4669), + o = i(9954), + r = i(5976), + s = i(3702), + a = i(9870), + l = i(4118), + d = i(8721); + + function c(e, t, i, n) { + if (Array.isArray(e)) { + let o = 0; + for (const r of e) { + const e = c(r, t, i, n); + if (10 === e) return e; + e > o && (o = e) + } + return o + } + if ("string" == typeof e) return n ? "*" === e ? 5 : e === i ? 10 : 0 : + 0; + if (e) { + const { + language: o, + pattern: r, + scheme: s, + hasAccessToAllModels: a + } = e; + if (!n && !a) return 0; + let c = 0; + if (s) + if (s === t.scheme) c = 10; + else { + if ("*" !== s) return 0; + c = 5 + } + if (o) + if (o === i) c = 10; + else { + if ("*" !== o) return 0; + c = Math.max(c, 5) + } + if (r) { + let e; + if (e = "string" == typeof r ? r : Object.assign(Object.assign({}, r), { + base: (0, d.Fv)(r.base) + }), e !== t.fsPath && !(0, l.EQ)(e, t.fsPath)) return 0; + c = 10 + } + return c + } + return 0 + } + var h = i(1200); + + function u(e) { + return "string" != typeof e && (Array.isArray(e) ? e.every(u) : !!e.exclusive) + } + class g { + constructor() { + this._clock = 0, this._entries = [], this._onDidChange = new n.Q5 + } + get onDidChange() { + return this._onDidChange.event + } + register(e, t) { + let i = { + selector: e, + provider: t, + _score: -1, + _time: this._clock++ + }; + return this._entries.push(i), this._lastCandidate = void 0, this._onDidChange + .fire(this._entries.length), (0, r.OF)((() => { + if (i) { + let e = this._entries.indexOf(i); + e >= 0 && (this._entries.splice(e, 1), this._lastCandidate = void 0, + this._onDidChange.fire(this._entries.length), i = void 0) + } + })) + } + has(e) { + return this.all(e).length > 0 + } + all(e) { + if (!e) return []; + this._updateScores(e); + const t = []; + for (let e of this._entries) e._score > 0 && t.push(e.provider); + return t + } + ordered(e) { + const t = []; + return this._orderedForEach(e, (e => t.push(e.provider))), t + } + orderedGroups(e) { + const t = []; + let i, n; + return this._orderedForEach(e, (e => { + i && n === e._score ? i.push(e.provider) : (n = e._score, i = [e.provider], + t.push(i)) + })), t + } + _orderedForEach(e, t) { + if (e) { + this._updateScores(e); + for (const e of this._entries) e._score > 0 && t(e) + } + } + _updateScores(e) { + let t = { + uri: e.uri.toString(), + language: e.getLanguageIdentifier().language + }; + if (!this._lastCandidate || this._lastCandidate.language !== t.language || + this._lastCandidate.uri !== t.uri) { + this._lastCandidate = t; + for (let t of this._entries) + if (t._score = c(t.selector, e.uri, e.getLanguageIdentifier().language, ( + 0, h.p)(e)), u(t.selector) && t._score > 0) { + for (let e of this._entries) e._score = 0; + t._score = 1e3; + break + } + this._entries.sort(g._compareByScoreAndTime) + } + } + static _compareByScoreAndTime(e, t) { + return e._score < t._score ? 1 : e._score > t._score ? -1 : e._time < + t._time ? 1 : e._time > t._time ? -1 : 0 + } + } + const p = new WeakMap; + let m = 0; + class f { + constructor(e, t, i = Number.MAX_SAFE_INTEGER) { + this._registry = e, this.min = t, this.max = i, this._cache = new s.z6( + 50, .7) + } + _key(e) { + return e.id + this._registry.all(e).reduce(((e, t) => (0, o.SP)( + function(e) { + let t = p.get(e); + return void 0 === t && (t = ++m, p.set(e, t)), t + }(t), e)), 0) + } + _clamp(e) { + return void 0 === e ? this.min : Math.min(this.max, Math.max(this.min, + Math.floor(1.3 * e))) + } + get(e) { + const t = this._key(e), + i = this._cache.get(t); + return this._clamp(null == i ? void 0 : i.value) + } + update(e, t) { + const i = this._key(e); + let n = this._cache.get(i); + return n || (n = new a.n, this._cache.set(i, n)), n.update(t), this.get( + e) + } + } + }, + 1144: (e, t, i) => { + "use strict"; + i.d(t, { + dQ: () => d, + XT: () => c, + Tb: () => h + }); + var n = i(3580), + o = i(4669), + r = i(4101), + s = i(3831), + a = i(9872), + l = i(1170); + const d = new class { + constructor() { + this._onDidChangeLanguages = new o.Q5, this.onDidChangeLanguages = + this._onDidChangeLanguages.event, this._languages = [], this._dynamicLanguages = [] + } + registerLanguage(e) { + return this._languages.push(e), this._onDidChangeLanguages.fire(void 0), { + dispose: () => { + for (let t = 0, i = this._languages.length; t < i; t++) + if (this._languages[t] === e) return void this._languages.splice( + t, 1) + } + } + } + getLanguages() { + return [].concat(this._languages).concat(this._dynamicLanguages) + } + }; + a.B.add("editor.modesRegistry", d); + const c = "plaintext", + h = new r.rl(c, 1); + d.registerLanguage({ + id: c, + extensions: [".txt"], + aliases: [n.N("plainText.alias", "Plain Text"), "text"], + mimetypes: [l.vW.text] + }), s.zu.register(h, { + brackets: [ + ["(", ")"], + ["[", "]"], + ["{", "}"] + ], + surroundingPairs: [{ + open: "{", + close: "}" + }, { + open: "[", + close: "]" + }, { + open: "(", + close: ")" + }, { + open: "<", + close: ">" + }, { + open: '"', + close: '"' + }, { + open: "'", + close: "'" + }, { + open: "`", + close: "`" + }], + folding: { + offSide: !0 + } + }, 0) + }, + 8111: (e, t, i) => { + "use strict"; + i.d(t, { + nO: () => r, + TG: () => s, + pA: () => a, + Ri: () => l, + mh: () => d + }); + var n = i(5600), + o = i(4101); + const r = new class { + clone() { + return this + } + equals(e) { + return this === e + } + }, + s = "vs.editor.nullMode", + a = new o.rl(s, 0); + + function l(e, t, i, o) { + return new n.hG([new n.WU(o, "", e)], i) + } + + function d(e, t, i, o) { + let s = new Uint32Array(2); + return s[0] = o, s[1] = (16384 | e << 0 | 2 << 23) >>> 0, new n.Hi(s, + null === i ? r : i) + } + }, + 764: (e, t, i) => { + "use strict"; + + function n(e, t) { + let i = e.getCount(), + n = e.findTokenIndexAtOffset(t), + r = e.getLanguageId(n), + s = n; + for (; s + 1 < i && e.getLanguageId(s + 1) === r;) s++; + let a = n; + for (; a > 0 && e.getLanguageId(a - 1) === r;) a--; + return new o(e, r, a, s + 1, e.getStartOffset(a), e.getEndOffset(s)) + } + i.d(t, { + wH: () => n, + Bu: () => r + }); + class o { + constructor(e, t, i, n, o, r) { + this._scopedLineTokensBrand = void 0, this._actual = e, this.languageId = + t, this._firstTokenIndex = i, this._lastTokenIndex = n, this.firstCharOffset = + o, this._lastCharOffset = r + } + getLineContent() { + return this._actual.getLineContent().substring(this.firstCharOffset, + this._lastCharOffset) + } + getActualLineContentBefore(e) { + return this._actual.getLineContent().substring(0, this.firstCharOffset + + e) + } + getTokenCount() { + return this._lastTokenIndex - this._firstTokenIndex + } + findTokenIndexAtOffset(e) { + return this._actual.findTokenIndexAtOffset(e + this.firstCharOffset) - + this._firstTokenIndex + } + getStandardTokenType(e) { + return this._actual.getStandardTokenType(e + this._firstTokenIndex) + } + } + + function r(e) { + return 0 != (7 & e) + } + }, + 4227: (e, t, i) => { + "use strict"; + i.d(t, { + EA: () => a, + Vr: () => p + }); + var n = i(7295), + o = i(72), + r = i(4314); + class s { + constructor(e, t, i, n, o, r) { + this._richEditBracketBrand = void 0, this.languageIdentifier = e, this + .index = t, this.open = i, this.close = n, this.forwardRegex = o, + this.reversedRegex = r, this._openSet = s._toSet(this.open), this._closeSet = + s._toSet(this.close) + } + isOpen(e) { + return this._openSet.has(e) + } + isClose(e) { + return this._closeSet.has(e) + } + static _toSet(e) { + const t = new Set; + for (const i of e) t.add(i); + return t + } + } + class a { + constructor(e, t) { + this._richEditBracketsBrand = void 0; + const i = function(e) { + const t = e.length; + e = e.map((e => [e[0].toLowerCase(), e[1].toLowerCase()])); + const i = []; + for (let e = 0; e < t; e++) i[e] = e; + const n = (e, t) => { + const [i, n] = e, [o, r] = t; + return i === o || i === r || n === o || n === r + }, + o = (e, n) => { + const o = Math.min(e, n), + r = Math.max(e, n); + for (let e = 0; e < t; e++) i[e] === r && (i[e] = o) + }; + for (let r = 0; r < t; r++) { + const s = e[r]; + for (let a = r + 1; a < t; a++) n(s, e[a]) && o(i[r], i[a]) + } + const r = []; + for (let n = 0; n < t; n++) { + let o = [], + s = []; + for (let r = 0; r < t; r++) + if (i[r] === n) { + const [t, i] = e[r]; + o.push(t), s.push(i) + } + o.length > 0 && r.push({ + open: o, + close: s + }) + } + return r + }(t); + this.brackets = i.map(((t, n) => new s(e, n, t.open, t.close, function( + e, t, i, n) { + let o = []; + o = o.concat(e), o = o.concat(t); + for (let e = 0, t = o.length; e < t; e++) l(o[e], i, n, o); + return o = c(o), o.sort(d), o.reverse(), u(o) + }(t.open, t.close, i, n), function(e, t, i, n) { + let o = []; + o = o.concat(e), o = o.concat(t); + for (let e = 0, t = o.length; e < t; e++) l(o[e], i, n, o); + return o = c(o), o.sort(d), o.reverse(), u(o.map(g)) + }(t.open, t.close, i, n)))), this.forwardRegex = function(e) { + let t = []; + for (const i of e) { + for (const e of i.open) t.push(e); + for (const e of i.close) t.push(e) + } + return t = c(t), u(t) + }(this.brackets), this.reversedRegex = function(e) { + let t = []; + for (const i of e) { + for (const e of i.open) t.push(e); + for (const e of i.close) t.push(e) + } + return t = c(t), u(t.map(g)) + }(this.brackets), this.textIsBracket = {}, this.textIsOpenBracket = {}, + this.maxBracketLength = 0; + for (const e of this.brackets) { + for (const t of e.open) this.textIsBracket[t] = e, this.textIsOpenBracket[ + t] = !0, this.maxBracketLength = Math.max(this.maxBracketLength, t.length); + for (const t of e.close) this.textIsBracket[t] = e, this.textIsOpenBracket[ + t] = !1, this.maxBracketLength = Math.max(this.maxBracketLength, t.length) + } + } + } + + function l(e, t, i, n) { + for (let o = 0, r = t.length; o < r; o++) { + if (o === i) continue; + const r = t[o]; + for (const t of r.open) t.indexOf(e) >= 0 && n.push(t); + for (const t of r.close) t.indexOf(e) >= 0 && n.push(t) + } + } + + function d(e, t) { + return e.length - t.length + } + + function c(e) { + if (e.length <= 1) return e; + const t = [], + i = new Set; + for (const n of e) i.has(n) || (t.push(n), i.add(n)); + return t + } + + function h(e) { + const t = /^[\w ]+$/.test(e); + return e = n.ec(e), t ? `\\b${e}\\b` : e + } + + function u(e) { + let t = `(${e.map(h).join(")|(")})`; + return n.GF(t, !0) + } + const g = function() { + let e = null, + t = null; + return function(i) { + return e !== i && (e = i, t = function(e) { + if (o.lZ) { + const t = new Uint16Array(e.length); + let i = 0; + for (let n = e.length - 1; n >= 0; n--) t[i++] = e.charCodeAt(n); + return o.oe().decode(t) + } { + let t = [], + i = 0; + for (let n = e.length - 1; n >= 0; n--) t[i++] = e.charAt(n); + return t.join("") + } + }(e)), t + } + }(); + class p { + static _findPrevBracketInText(e, t, i, n) { + let o = i.match(e); + if (!o) return null; + let s = i.length - (o.index || 0), + a = o[0].length, + l = n + s; + return new r.e(t, l - a + 1, t, l + 1) + } + static findPrevBracketInRange(e, t, i, n, o) { + const r = g(i).substring(i.length - o, i.length - n); + return this._findPrevBracketInText(e, t, r, n) + } + static findNextBracketInText(e, t, i, n) { + let o = i.match(e); + if (!o) return null; + let s = o.index || 0, + a = o[0].length; + if (0 === a) return null; + let l = n + s; + return new r.e(t, l + 1, t, l + 1 + a) + } + static findNextBracketInRange(e, t, i, n, o) { + const r = i.substring(n, o); + return this.findNextBracketInText(e, t, r, n) + } + } + }, + 5713: (e, t, i) => { + "use strict"; + i.d(t, { + C: () => a, + F: () => l + }); + var n = i(7295), + o = i(8411), + r = i(8111); + const s = { + getInitialState: () => r.nO, + tokenize2: (e, t, i, n) => (0, r.mh)(0, e, i, n) + }; + + function a(e, t = s) { + return function(e, t) { + let i = '
    ', + r = n.uq(e), + s = t.getInitialState(); + for (let e = 0, a = r.length; e < a; e++) { + let a = r[e]; + e > 0 && (i += "
    "); + let l = t.tokenize2(a, !0, s, 0); + o.A.convertToEndOffset(l.tokens, a.length); + let d = new o.A(l.tokens, a).inflate(), + c = 0; + for (let e = 0, t = d.getCount(); e < t; e++) { + const t = d.getClassName(e), + o = d.getEndOffset(e); + i += `${n.YU(a.substring(c,o))}`, c = o + } + s = l.endState + } + return i += "
    ", i + }(e, t || s) + } + + function l(e, t, i, n, o, r, s) { + let a = "
    ", + l = n, + d = 0; + for (let c = 0, h = t.getCount(); c < h; c++) { + const h = t.getEndOffset(c); + if (h <= n) continue; + let u = ""; + for (; l < h && l < o; l++) { + const t = e.charCodeAt(l); + switch (t) { + case 9: + let e = r - (l + d) % r; + for (d += e - 1; e > 0;) u += s ? " " : " ", e--; + break; + case 60: + u += "<"; + break; + case 62: + u += ">"; + break; + case 38: + u += "&"; + break; + case 0: + u += "�"; + break; + case 65279: + case 8232: + case 8233: + case 133: + u += "�"; + break; + case 13: + u += "​"; + break; + case 32: + u += s ? " " : " "; + break; + default: + u += String.fromCharCode(t) + } + } + if (a += `${u}`, h > o || + l >= o) break + } + return a += "
    ", a + } + }, + 469: (e, t, i) => { + "use strict"; + i.d(t, { + p: () => n + }); + const n = (0, i(2065).yh)("editorWorkerService") + }, + 9510: (e, t, i) => { + "use strict"; + i.d(t, { + St: () => v, + ML: () => _, + Vl: () => m, + Vj: () => f + }); + var n = i(1050), + o = i(7301), + r = i(666), + s = i(4101), + a = i(1200), + l = i(4565), + d = i(8401), + c = i(3060), + h = i(1432); + + function u(e) { + const t = new Uint32Array(function(e) { + let t = 0; + if (t += 2, "full" === e.type) t += 1 + e.data.length; + else { + t += 1, t += 3 * e.deltas.length; + for (const i of e.deltas) i.data && (t += i.data.length) + } + return t + }(e)); + let i = 0; + if (t[i++] = e.id, "full" === e.type) t[i++] = 1, t[i++] = e.data.length, + t.set(e.data, i), i += e.data.length; + else { + t[i++] = 2, t[i++] = e.deltas.length; + for (const n of e.deltas) t[i++] = n.start, t[i++] = n.deleteCount, n.data ? + (t[i++] = n.data.length, t.set(n.data, i), i += n.data.length) : t[i++] = + 0 + } + return function(e) { + const t = new Uint8Array(e.buffer, e.byteOffset, 4 * e.length); + return h.r() || function(e) { + for (let t = 0, i = e.length; t < i; t += 4) { + const i = e[t + 0], + n = e[t + 1], + o = e[t + 2], + r = e[t + 3]; + e[t + 0] = r, e[t + 1] = o, e[t + 2] = n, e[t + 3] = i + } + }(t), c.KN.wrap(t) + }(t) + } + var g = i(4314), + p = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + + function m(e) { + return e && !!e.data + } + + function f(e) { + return e && Array.isArray(e.edits) + } + + function _(e, t, i) { + const n = b(e); + return n ? { + provider: n, + request: Promise.resolve(n.provideDocumentSemanticTokens(e, t, i)) + } : null + } + + function b(e) { + const t = s.wT.ordered(e); + return t.length > 0 ? t[0] : null + } + + function v(e) { + const t = s.K7.ordered(e); + return t.length > 0 ? t[0] : null + } + l.P.registerCommand("_provideDocumentSemanticTokensLegend", ((e, ...t) => + p(void 0, void 0, void 0, (function*() { + const [i] = t; + (0, d.p_)(i instanceof r.o); + const n = e.get(a.q).getModel(i); + if (!n) return; + const o = b(n); + return o ? o.getLegend() : e.get(l.H).executeCommand( + "_provideDocumentRangeSemanticTokensLegend", i) + })))), l.P.registerCommand("_provideDocumentSemanticTokens", ((e, ...t) => + p(void 0, void 0, void 0, (function*() { + const [i] = t; + (0, d.p_)(i instanceof r.o); + const s = e.get(a.q).getModel(i); + if (!s) return; + const c = _(s, null, n.T.None); + if (!c) return e.get(l.H).executeCommand( + "_provideDocumentRangeSemanticTokens", i, s.getFullModelRange()); + const { + provider: h, + request: g + } = c; + let p; + try { + p = yield g + } catch (e) { + return void(0, o.Cp)(e) + } + if (!p || !m(p)) return; + const f = u({ + id: 0, + type: "full", + data: p.data + }); + return p.resultId && h.releaseDocumentSemanticTokens(p.resultId), f + })))), l.P.registerCommand("_provideDocumentRangeSemanticTokensLegend", ( + (e, ...t) => p(void 0, void 0, void 0, (function*() { + const [i] = t; + (0, d.p_)(i instanceof r.o); + const n = e.get(a.q).getModel(i); + if (!n) return; + const o = v(n); + return o ? o.getLegend() : void 0 + })))), l.P.registerCommand("_provideDocumentRangeSemanticTokens", ((e, + ...t) => p(void 0, void 0, void 0, (function*() { + const [i, s] = t; + (0, d.p_)(i instanceof r.o), (0, d.p_)(g.e.isIRange(s)); + const l = e.get(a.q).getModel(i); + if (!l) return; + const c = v(l); + if (!c) return; + let h; + try { + h = yield c.provideDocumentRangeSemanticTokens(l, g.e.lift(s), n.T + .None) + } catch (e) { + return void(0, o.Cp)(e) + } + return h && m(h) ? u({ + id: 0, + type: "full", + data: h.data + }) : void 0 + })))) + }, + 6479: (e, t, i) => { + "use strict"; + i.d(t, { + i: () => n + }); + const n = (0, i(2065).yh)("markerDecorationsService") + }, + 1531: (e, t, i) => { + "use strict"; + i.d(t, { + h: () => n + }); + const n = (0, i(2065).yh)("modeService") + }, + 1200: (e, t, i) => { + "use strict"; + i.d(t, { + q: () => n, + p: () => o + }); + const n = (0, i(2065).yh)("modelService"); + + function o(e) { + return !e.isTooLargeForSyncing() && !e.isForSimpleWidget + } + }, + 7390: (e, t, i) => { + "use strict"; + i.d(t, { + BR: () => I, + e3: () => T, + tw: () => M + }); + var n = i(4669), + o = i(5976), + r = i(1432), + s = i(7301), + a = i(4141), + l = i(6281), + d = i(4101), + c = i(1144), + h = i(3187), + u = i(3108), + g = i(5393), + p = i(1050), + m = i(7781), + f = i(3557), + _ = i(4862), + b = i(9954), + v = i(5215), + w = i(6663), + C = i(5072), + y = i(9510), + S = i(6248), + x = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + + function k(e) { + return e.toString() + } + + function L(e) { + const t = new b.yP, + i = e.createSnapshot(); + let n; + for (; n = i.read();) t.update(n); + return t.digest() + } + class N { + constructor(e, t, i) { + this._modelEventListeners = new o.SL, this.model = e, this._languageSelection = + null, this._languageSelectionListener = null, this._modelEventListeners + .add(e.onWillDispose((() => t(e)))), this._modelEventListeners.add(e.onDidChangeLanguage( + (t => i(e, t)))) + } + _disposeLanguageSelection() { + this._languageSelectionListener && (this._languageSelectionListener.dispose(), + this._languageSelectionListener = null) + } + dispose() { + this._modelEventListeners.dispose(), this._disposeLanguageSelection() + } + setLanguage(e) { + this._disposeLanguageSelection(), this._languageSelection = e, this._languageSelectionListener = + this._languageSelection.onDidChange((() => this.model.setMode(e.languageIdentifier))), + this.model.setMode(e.languageIdentifier) + } + } + const D = r.IJ || r.dz ? 1 : 2; + class E { + constructor(e, t, i, n, o, r, s, a) { + this.uri = e, this.initialUndoRedoSnapshot = t, this.time = i, this.sharesUndoRedoStack = + n, this.heapSize = o, this.sha1 = r, this.versionId = s, this.alternativeVersionId = + a + } + } + let I = class e extends o.JT { + constructor(e, t, i, o, r) { + super(), this._configurationService = e, this._resourcePropertiesService = + t, this._themeService = i, this._logService = o, this._undoRedoService = + r, this._onModelAdded = this._register(new n.Q5), this.onModelAdded = + this._onModelAdded.event, this._onModelRemoved = this._register(new n + .Q5), this.onModelRemoved = this._onModelRemoved.event, this._onModelModeChanged = + this._register(new n.Q5), this.onModelModeChanged = this._onModelModeChanged + .event, this._modelCreationOptionsByLanguageAndResource = Object.create( + null), this._models = {}, this._disposedModels = new Map, this._disposedModelsHeapSize = + 0, this._semanticStyling = this._register(new R(this._themeService, + this._logService)), this._register(this._configurationService.onDidChangeConfiguration( + (() => this._updateModelOptions()))), this._updateModelOptions(), + this._register(new A(this, this._themeService, this._configurationService, + this._semanticStyling)) + } + static _readModelOptions(e, t) { + var i; + let n = a.DB.tabSize; + if (e.editor && void 0 !== e.editor.tabSize) { + const t = parseInt(e.editor.tabSize, 10); + isNaN(t) || (n = t), n < 1 && (n = 1) + } + let o = n; + if (e.editor && void 0 !== e.editor.indentSize && "tabSize" !== e.editor + .indentSize) { + const t = parseInt(e.editor.indentSize, 10); + isNaN(t) || (o = t), o < 1 && (o = 1) + } + let r = a.DB.insertSpaces; + e.editor && void 0 !== e.editor.insertSpaces && (r = "false" !== e.editor + .insertSpaces && Boolean(e.editor.insertSpaces)); + let s = D; + const l = e.eol; + "\r\n" === l ? s = 2 : "\n" === l && (s = 1); + let d = a.DB.trimAutoWhitespace; + e.editor && void 0 !== e.editor.trimAutoWhitespace && (d = "false" !== + e.editor.trimAutoWhitespace && Boolean(e.editor.trimAutoWhitespace) + ); + let c = a.DB.detectIndentation; + e.editor && void 0 !== e.editor.detectIndentation && (c = "false" !== + e.editor.detectIndentation && Boolean(e.editor.detectIndentation)); + let h = a.DB.largeFileOptimizations; + e.editor && void 0 !== e.editor.largeFileOptimizations && (h = + "false" !== e.editor.largeFileOptimizations && Boolean(e.editor.largeFileOptimizations) + ); + let u = a.DB.bracketPairColorizationOptions; + return (null === (i = e.editor) || void 0 === i ? void 0 : i.bracketPairColorization) && + "object" == typeof e.editor.bracketPairColorization && (u = { + enabled: !!e.editor.bracketPairColorization.enabled + }), { + isForSimpleWidget: t, + tabSize: n, + indentSize: o, + insertSpaces: r, + detectIndentation: c, + defaultEOL: s, + trimAutoWhitespace: d, + largeFileOptimizations: h, + bracketPairColorizationOptions: u + } + } + _getEOL(e, t) { + if (e) return this._resourcePropertiesService.getEOL(e, t); + const i = this._configurationService.getValue("files.eol", { + overrideIdentifier: t + }); + return i && "string" == typeof i && "auto" !== i ? i : 3 === r.OS || + 2 === r.OS ? "\n" : "\r\n" + } + _shouldRestoreUndoStack() { + const e = this._configurationService.getValue( + "files.restoreUndoStack"); + return "boolean" != typeof e || e + } + getCreationOptions(t, i, n) { + let o = this._modelCreationOptionsByLanguageAndResource[t + i]; + if (!o) { + const r = this._configurationService.getValue("editor", { + overrideIdentifier: t, + resource: i + }), + s = this._getEOL(i, t); + o = e._readModelOptions({ + editor: r, + eol: s + }, n), this._modelCreationOptionsByLanguageAndResource[t + i] = o + } + return o + } + _updateModelOptions() { + const t = this._modelCreationOptionsByLanguageAndResource; + this._modelCreationOptionsByLanguageAndResource = Object.create(null); + const i = Object.keys(this._models); + for (let n = 0, o = i.length; n < o; n++) { + const o = i[n], + r = this._models[o], + s = r.model.getLanguageIdentifier().language, + a = r.model.uri, + l = t[s + a], + d = this.getCreationOptions(s, a, r.model.isForSimpleWidget); + e._setModelOptionsForModel(r.model, d, l) + } + } + static _setModelOptionsForModel(e, t, i) { + i && i.defaultEOL !== t.defaultEOL && 1 === e.getLineCount() && e.setEOL( + 1 === t.defaultEOL ? 0 : 1), i && i.detectIndentation === t.detectIndentation && + i.insertSpaces === t.insertSpaces && i.tabSize === t.tabSize && i.indentSize === + t.indentSize && i.trimAutoWhitespace === t.trimAutoWhitespace && (0, + S.fS)(i.bracketPairColorizationOptions, t.bracketPairColorizationOptions) || + (t.detectIndentation ? (e.detectIndentation(t.insertSpaces, t.tabSize), + e.updateOptions({ + trimAutoWhitespace: t.trimAutoWhitespace, + bracketColorizationOptions: t.bracketPairColorizationOptions + })) : e.updateOptions({ + insertSpaces: t.insertSpaces, + tabSize: t.tabSize, + indentSize: t.indentSize, + trimAutoWhitespace: t.trimAutoWhitespace, + bracketColorizationOptions: t.bracketPairColorizationOptions + })) + } + _insertDisposedModel(e) { + this._disposedModels.set(k(e.uri), e), this._disposedModelsHeapSize += + e.heapSize + } + _removeDisposedModel(e) { + const t = this._disposedModels.get(k(e)); + return t && (this._disposedModelsHeapSize -= t.heapSize), this._disposedModels + .delete(k(e)), t + } + _ensureDisposedModelsHeapSize(e) { + if (this._disposedModelsHeapSize > e) { + const t = []; + for (this._disposedModels.forEach((e => { + e.sharesUndoRedoStack || t.push(e) + })), t.sort(((e, t) => e.time - t.time)); t.length > 0 && this._disposedModelsHeapSize > + e;) { + const e = t.shift(); + this._removeDisposedModel(e.uri), null !== e.initialUndoRedoSnapshot && + this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot) + } + } + } + _createModelData(e, t, i, n) { + const o = this.getCreationOptions(t.language, i, n), + r = new l.yO(e, o, t, i, this._undoRedoService); + if (i && this._disposedModels.has(k(i))) { + const e = this._removeDisposedModel(i), + t = this._undoRedoService.getElements(i), + n = L(r) === e.sha1; + if (n || e.sharesUndoRedoStack) { + for (const e of t.past)(0, v.e9)(e) && e.matchesResource(i) && e.setModel( + r); + for (const e of t.future)(0, v.e9)(e) && e.matchesResource(i) && e.setModel( + r); + this._undoRedoService.setElementsValidFlag(i, !0, (e => (0, v.e9)(e) && + e.matchesResource(i))), n && (r._overwriteVersionId(e.versionId), + r._overwriteAlternativeVersionId(e.alternativeVersionId), r._overwriteInitialUndoRedoSnapshot( + e.initialUndoRedoSnapshot)) + } else null !== e.initialUndoRedoSnapshot && this._undoRedoService.restoreSnapshot( + e.initialUndoRedoSnapshot) + } + const s = k(r.uri); + if (this._models[s]) throw new Error( + "ModelService: Cannot add model because it already exists!"); + const a = new N(r, (e => this._onWillDispose(e)), ((e, t) => this._onDidChangeLanguage( + e, t))); + return this._models[s] = a, a + } + createModel(e, t, i, n = !1) { + let o; + return t ? (o = this._createModelData(e, t.languageIdentifier, i, n), + this.setMode(o.model, t)) : o = this._createModelData(e, c.Tb, i, n), + this._onModelAdded.fire(o.model), o.model + } + setMode(e, t) { + if (!t) return; + const i = this._models[k(e.uri)]; + i && i.setLanguage(t) + } + getModels() { + const e = [], + t = Object.keys(this._models); + for (let i = 0, n = t.length; i < n; i++) { + const n = t[i]; + e.push(this._models[n].model) + } + return e + } + getModel(e) { + const t = k(e), + i = this._models[t]; + return i ? i.model : null + } + getSemanticTokensProviderStyling(e) { + return this._semanticStyling.get(e) + } + _onWillDispose(t) { + const i = k(t.uri), + n = this._models[i], + o = this._undoRedoService.getUriComparisonKey(t.uri) !== t.uri.toString(); + let r = !1, + s = 0; + if (o || this._shouldRestoreUndoStack() && ((a = t.uri).scheme === w.lg + .file || a.scheme === w.lg.vscodeRemote || a.scheme === w.lg.userData || + a.scheme === w.lg.vscodeNotebookCell || "fake-fs" === a.scheme)) { + const e = this._undoRedoService.getElements(t.uri); + if (e.past.length > 0 || e.future.length > 0) { + for (const i of e.past)(0, v.e9)(i) && i.matchesResource(t.uri) && + (r = !0, s += i.heapSize(t.uri), i.setModel(t.uri)); + for (const i of e.future)(0, v.e9)(i) && i.matchesResource(t.uri) && + (r = !0, s += i.heapSize(t.uri), i.setModel(t.uri)) + } + } + var a; + const l = e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK; + if (r) + if (!o && s > l) { + const e = n.model.getInitialUndoRedoSnapshot(); + null !== e && this._undoRedoService.restoreSnapshot(e) + } else this._ensureDisposedModelsHeapSize(l - s), this._undoRedoService + .setElementsValidFlag(t.uri, !1, (e => (0, v.e9)(e) && e.matchesResource( + t.uri))), this._insertDisposedModel(new E(t.uri, n.model.getInitialUndoRedoSnapshot(), + Date.now(), o, s, L(t), t.getVersionId(), t.getAlternativeVersionId() + )); + else if (!o) { + const e = n.model.getInitialUndoRedoSnapshot(); + null !== e && this._undoRedoService.restoreSnapshot(e) + } + delete this._models[i], n.dispose(), delete this._modelCreationOptionsByLanguageAndResource[ + t.getLanguageIdentifier().language + t.uri], this._onModelRemoved.fire( + t) + } + _onDidChangeLanguage(t, i) { + const n = i.oldLanguage, + o = t.getLanguageIdentifier().language, + r = this.getCreationOptions(n, t.uri, t.isForSimpleWidget), + s = this.getCreationOptions(o, t.uri, t.isForSimpleWidget); + e._setModelOptionsForModel(t, s, r), this._onModelModeChanged.fire({ + model: t, + oldModeId: n + }) + } + }; + I.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK = 20971520, I = function(e, t, i, + n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([x(0, u.Ui), x(1, h.y), x(2, m.XE), x(3, f.VZ), x(4, _.tJ)], I); + const T = "editor.semanticHighlighting"; + + function M(e, t, i) { + var n; + const o = null === (n = i.getValue(T, { + overrideIdentifier: e.getLanguageIdentifier().language, + resource: e.uri + })) || void 0 === n ? void 0 : n.enabled; + return "boolean" == typeof o ? o : t.getColorTheme().semanticHighlighting + } + class A extends o.JT { + constructor(e, t, i, n) { + super(), this._watchers = Object.create(null), this._semanticStyling = + n; + const o = e => { + this._watchers[e.uri.toString()] = new P(e, t, this._semanticStyling) + }, + r = (e, t) => { + t.dispose(), delete this._watchers[e.uri.toString()] + }, + s = () => { + for (let n of e.getModels()) { + const e = this._watchers[n.uri.toString()]; + M(n, t, i) ? e || o(n) : e && r(n, e) + } + }; + this._register(e.onModelAdded((e => { + M(e, t, i) && o(e) + }))), this._register(e.onModelRemoved((e => { + const t = this._watchers[e.uri.toString()]; + t && r(e, t) + }))), this._register(i.onDidChangeConfiguration((e => { + e.affectsConfiguration(T) && s() + }))), this._register(t.onDidColorThemeChange(s)) + } + } + class R extends o.JT { + constructor(e, t) { + super(), this._themeService = e, this._logService = t, this._caches = + new WeakMap, this._register(this._themeService.onDidColorThemeChange( + (() => { + this._caches = new WeakMap + }))) + } + get(e) { + return this._caches.has(e) || this._caches.set(e, new C.$(e.getLegend(), + this._themeService, this._logService)), this._caches.get(e) + } + } + class O { + constructor(e, t, i) { + this._provider = e, this.resultId = t, this.data = i + } + dispose() { + this._provider.releaseDocumentSemanticTokens(this.resultId) + } + } + class P extends o.JT { + constructor(e, t, i) { + super(), this._isDisposed = !1, this._model = e, this._semanticStyling = + i, this._fetchDocumentSemanticTokens = this._register(new g.pY((() => + this._fetchDocumentSemanticTokensNow()), P.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)), + this._currentDocumentResponse = null, this._currentDocumentRequestCancellationTokenSource = + null, this._documentProvidersChangeListeners = [], this._register( + this._model.onDidChangeContent((() => { + this._fetchDocumentSemanticTokens.isScheduled() || this._fetchDocumentSemanticTokens + .schedule() + }))), this._register(this._model.onDidChangeLanguage((() => { + this._currentDocumentResponse && (this._currentDocumentResponse.dispose(), + this._currentDocumentResponse = null), this._currentDocumentRequestCancellationTokenSource && + (this._currentDocumentRequestCancellationTokenSource.cancel(), + this._currentDocumentRequestCancellationTokenSource = null), + this._setDocumentSemanticTokens(null, null, null, []), this._fetchDocumentSemanticTokens + .schedule(0) + }))); + const n = () => { + (0, o.B9)(this._documentProvidersChangeListeners), this._documentProvidersChangeListeners = []; + for (const t of d.wT.all(e)) "function" == typeof t.onDidChange && + this._documentProvidersChangeListeners.push(t.onDidChange((() => + this._fetchDocumentSemanticTokens.schedule(0)))) + }; + n(), this._register(d.wT.onDidChange((() => { + n(), this._fetchDocumentSemanticTokens.schedule() + }))), this._register(t.onDidColorThemeChange((e => { + this._setDocumentSemanticTokens(null, null, null, []), this._fetchDocumentSemanticTokens + .schedule() + }))), this._fetchDocumentSemanticTokens.schedule(0) + } + dispose() { + this._currentDocumentResponse && (this._currentDocumentResponse.dispose(), + this._currentDocumentResponse = null), this._currentDocumentRequestCancellationTokenSource && + (this._currentDocumentRequestCancellationTokenSource.cancel(), this._currentDocumentRequestCancellationTokenSource = + null), this._setDocumentSemanticTokens(null, null, null, []), this._isDisposed = ! + 0, super.dispose() + } + _fetchDocumentSemanticTokensNow() { + if (this._currentDocumentRequestCancellationTokenSource) return; + const e = new p.A, + t = this._currentDocumentResponse && this._currentDocumentResponse.resultId || + null, + i = (0, y.ML)(this._model, t, e.token); + if (!i) return void(this._currentDocumentResponse && this._model.setSemanticTokens( + null, !1)); + const { + provider: n, + request: o + } = i; + this._currentDocumentRequestCancellationTokenSource = e; + const r = [], + a = this._model.onDidChangeContent((e => { + r.push(e) + })), + l = this._semanticStyling.get(n); + o.then((e => { + this._currentDocumentRequestCancellationTokenSource = null, a.dispose(), + this._setDocumentSemanticTokens(n, e || null, l, r) + }), (e => { + e && (s.VV(e) || "string" == typeof e.message && -1 !== e.message + .indexOf("busy")) || s.dL(e), this._currentDocumentRequestCancellationTokenSource = + null, a.dispose(), r.length > 0 && (this._fetchDocumentSemanticTokens + .isScheduled() || this._fetchDocumentSemanticTokens.schedule()) + })) + } + static _copy(e, t, i, n, o) { + for (let r = 0; r < o; r++) i[n + r] = e[t + r] + } + _setDocumentSemanticTokens(e, t, i, n) { + const o = this._currentDocumentResponse, + r = () => { + n.length > 0 && !this._fetchDocumentSemanticTokens.isScheduled() && + this._fetchDocumentSemanticTokens.schedule() + }; + if (this._currentDocumentResponse && (this._currentDocumentResponse.dispose(), + this._currentDocumentResponse = null), this._isDisposed) e && t && + e.releaseDocumentSemanticTokens(t.resultId); + else if (e && i) { + if (!t) return this._model.setSemanticTokens(null, !0), void r(); + if ((0, y.Vj)(t)) { + if (!o) return void this._model.setSemanticTokens(null, !0); + if (0 === t.edits.length) t = { + resultId: t.resultId, + data: o.data + }; + else { + let e = 0; + for (const i of t.edits) e += (i.data ? i.data.length : 0) - i.deleteCount; + const i = o.data, + n = new Uint32Array(i.length + e); + let r = i.length, + s = n.length; + for (let e = t.edits.length - 1; e >= 0; e--) { + const o = t.edits[e], + a = r - (o.start + o.deleteCount); + a > 0 && (P._copy(i, r - a, n, s - a, a), s -= a), o.data && (P._copy( + o.data, 0, n, s - o.data.length, o.data.length), s -= o.data.length), + r = o.start + } + r > 0 && P._copy(i, 0, n, 0, r), t = { + resultId: t.resultId, + data: n + } + } + } + if ((0, y.Vl)(t)) { + this._currentDocumentResponse = new O(e, t.resultId, t.data); + const o = (0, C.h)(t, i, this._model.getLanguageIdentifier()); + if (n.length > 0) + for (const e of n) + for (const t of o) + for (const i of e.changes) t.applyEdit(i.range, i.text); + this._model.setSemanticTokens(o, !0) + } else this._model.setSemanticTokens(null, !0); + r() + } else this._model.setSemanticTokens(null, !1) + } + } + P.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY = 300 + }, + 8216: (e, t, i) => { + "use strict"; + i.d(t, { + S: () => n + }); + const n = (0, i(2065).yh)("textModelService") + }, + 5072: (e, t, i) => { + "use strict"; + i.d(t, { + $: () => s, + h: () => a + }); + var n = i(4101), + o = i(3557), + r = i(8409); + class s { + constructor(e, t, i) { + this._legend = e, this._themeService = t, this._logService = i, this._hashTable = + new d, this._hasWarnedOverlappingTokens = !1 + } + getMetadata(e, t, i) { + const r = this._hashTable.get(e, t, i.id); + let s; + if (r) s = r.metadata, this._logService.getLevel() === o.in.Trace && + this._logService.trace( + `SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${n.NX.getForeground(s)}, fontStyle ${n.NX.getFontStyle(s).toString(2)}` + ); + else { + let r = this._legend.tokenTypes[e]; + const a = []; + if (r) { + let e = t; + for (let t = 0; e > 0 && t < this._legend.tokenModifiers.length; t++) + 1 & e && a.push(this._legend.tokenModifiers[t]), e >>= 1; + e > 0 && this._logService.getLevel() === o.in.Trace && (this._logService + .trace( + `SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}` + ), a.push("not-in-legend")); + const n = this._themeService.getColorTheme().getTokenStyleMetadata(r, + a, i.language); + void 0 === n ? s = 2147483647 : (s = 0, void 0 !== n.italic && (s |= + 1 | (n.italic ? 1 : 0) << 11), void 0 !== n.bold && (s |= 2 | (n.bold ? + 2 : 0) << 11), void 0 !== n.underline && (s |= 4 | (n.underline ? + 4 : 0) << 11), n.foreground && (s |= 8 | n.foreground << 14), 0 === + s && (s = 2147483647)) + } else this._logService.getLevel() === o.in.Trace && this._logService + .trace( + `SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}` + ), s = 2147483647, r = "not-in-legend"; + this._hashTable.add(e, t, i.id, s), this._logService.getLevel() === o + .in.Trace && this._logService.trace( + `SemanticTokensProviderStyling ${e} (${r}) / ${t} (${a.join(" ")}): foreground ${n.NX.getForeground(s)}, fontStyle ${n.NX.getFontStyle(s).toString(2)}` + ) + } + return s + } + warnOverlappingSemanticTokens(e, t) { + this._hasWarnedOverlappingTokens || (this._hasWarnedOverlappingTokens = ! + 0, console.warn( + `Overlapping semantic tokens detected at lineNumber ${e}, column ${t}` + )) + } + } + + function a(e, t, i) { + const n = e.data, + o = e.data.length / 5 | 0, + s = Math.max(Math.ceil(o / 1024), 400), + a = []; + let l = 0, + d = 1, + c = 0; + for (; l < o;) { + const e = l; + let h = Math.min(e + s, o); + if (h < o) { + let t = h; + for (; t - 1 > e && 0 === n[5 * t];) t--; + if (t - 1 === e) { + let e = h; + for (; e + 1 < o && 0 === n[5 * e];) e++; + h = e + } else h = t + } + let u = new Uint32Array(4 * (h - e)), + g = 0, + p = 0, + m = 0, + f = 0, + _ = 0; + for (; l < h;) { + const e = 5 * l, + o = n[e], + r = n[e + 1], + s = d + o, + a = 0 === o ? c + r : r, + h = n[e + 2], + b = n[e + 3], + v = n[e + 4], + w = t.getMetadata(b, v, i); + 2147483647 !== w && (0 === p && (p = s), m === s && _ > a && (t.warnOverlappingSemanticTokens( + s, a + 1), f < a ? u[g - 4 + 2] = a : g -= 4), u[g] = s - p, u[g + + 1] = a, u[g + 2] = a + h, u[g + 3] = w, g += 4, m = s, f = a, _ = a + + h), d = s, c = a, l++ + } + g !== u.length && (u = u.subarray(0, g)); + const b = new r.Wz(p, new r.OU(u)); + a.push(b) + } + return a + } + class l { + constructor(e, t, i, n) { + this.tokenTypeIndex = e, this.tokenModifierSet = t, this.languageId = + i, this.metadata = n, this.next = null + } + } + class d { + constructor() { + this._elementsCount = 0, this._currentLengthIndex = 0, this._currentLength = + d._SIZES[this._currentLengthIndex], this._growCount = Math.round(this + ._currentLengthIndex + 1 < d._SIZES.length ? 2 / 3 * this._currentLength : + 0), this._elements = [], d._nullOutEntries(this._elements, this._currentLength) + } + static _nullOutEntries(e, t) { + for (let i = 0; i < t; i++) e[i] = null + } + _hash2(e, t) { + return (e << 5) - e + t | 0 + } + _hashFunc(e, t, i) { + return this._hash2(this._hash2(e, t), i) % this._currentLength + } + get(e, t, i) { + const n = this._hashFunc(e, t, i); + let o = this._elements[n]; + for (; o;) { + if (o.tokenTypeIndex === e && o.tokenModifierSet === t && o.languageId === + i) return o; + o = o.next + } + return null + } + add(e, t, i, n) { + if (this._elementsCount++, 0 !== this._growCount && this._elementsCount >= + this._growCount) { + const e = this._elements; + this._currentLengthIndex++, this._currentLength = d._SIZES[this._currentLengthIndex], + this._growCount = Math.round(this._currentLengthIndex + 1 < d._SIZES + .length ? 2 / 3 * this._currentLength : 0), this._elements = [], d._nullOutEntries( + this._elements, this._currentLength); + for (const t of e) { + let e = t; + for (; e;) { + const t = e.next; + e.next = null, this._add(e), e = t + } + } + } + this._add(new l(e, t, i, n)) + } + _add(e) { + const t = this._hashFunc(e.tokenTypeIndex, e.tokenModifierSet, e.languageId); + e.next = this._elements[t], this._elements[t] = e + } + } + d._SIZES = [3, 7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, + 16381, 32749, 65521, 131071, 262139, 524287, 1048573, 2097143 + ] + }, + 3187: (e, t, i) => { + "use strict"; + i.d(t, { + V: () => o, + y: () => r + }); + var n = i(2065); + const o = (0, n.yh)("textResourceConfigurationService"), + r = (0, n.yh)("textResourcePropertiesService") + }, + 913: (e, t, i) => { + "use strict"; + i.d(t, { + Oe: () => n, + ug: () => o, + qq: () => r, + ld: () => s, + UX: () => a, + aq: () => l, + B8: () => d, + xi: () => c, + UL: () => h + }); + var n, o, r, s, a, l, d, c, h, u = i(3580); + ! function(e) { + e.noSelection = u.N("noSelection", "No selection"), e.singleSelectionRange = + u.N("singleSelectionRange", "Line {0}, Column {1} ({2} selected)"), e.singleSelection = + u.N("singleSelection", "Line {0}, Column {1}"), e.multiSelectionRange = + u.N("multiSelectionRange", "{0} selections ({1} characters selected)"), + e.multiSelection = u.N("multiSelection", "{0} selections"), e.emergencyConfOn = + u.N("emergencyConfOn", + "Now changing the setting `accessibilitySupport` to 'on'."), e.openingDocs = + u.N("openingDocs", + "Now opening the Editor Accessibility documentation page."), e.readonlyDiffEditor = + u.N("readonlyDiffEditor", " in a read-only pane of a diff editor."), e.editableDiffEditor = + u.N("editableDiffEditor", " in a pane of a diff editor."), e.readonlyEditor = + u.N("readonlyEditor", " in a read-only code editor"), e.editableEditor = + u.N("editableEditor", " in a code editor"), e.changeConfigToOnMac = u.N( + "changeConfigToOnMac", + "To configure the editor to be optimized for usage with a Screen Reader press Command+E now." + ), e.changeConfigToOnWinLinux = u.N("changeConfigToOnWinLinux", + "To configure the editor to be optimized for usage with a Screen Reader press Control+E now." + ), e.auto_on = u.N("auto_on", + "The editor is configured to be optimized for usage with a Screen Reader." + ), e.auto_off = u.N("auto_off", + "The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time." + ), e.tabFocusModeOnMsg = u.N("tabFocusModeOnMsg", + "Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}." + ), e.tabFocusModeOnMsgNoKb = u.N("tabFocusModeOnMsgNoKb", + "Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding." + ), e.tabFocusModeOffMsg = u.N("tabFocusModeOffMsg", + "Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}." + ), e.tabFocusModeOffMsgNoKb = u.N("tabFocusModeOffMsgNoKb", + "Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding." + ), e.openDocMac = u.N("openDocMac", + "Press Command+H now to open a browser window with more information related to editor accessibility." + ), e.openDocWinLinux = u.N("openDocWinLinux", + "Press Control+H now to open a browser window with more information related to editor accessibility." + ), e.outroMsg = u.N("outroMsg", + "You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape." + ), e.showAccessibilityHelpAction = u.N("showAccessibilityHelpAction", + "Show Accessibility Help") + }(n || (n = {})), + function(e) { + e.inspectTokensAction = u.N("inspectTokens", "Developer: Inspect Tokens") + }(o || (o = {})), + function(e) { + e.gotoLineActionLabel = u.N("gotoLineActionLabel", + "Go to Line/Column...") + }(r || (r = {})), + function(e) { + e.helpQuickAccessActionLabel = u.N("helpQuickAccess", + "Show all Quick Access Providers") + }(s || (s = {})), + function(e) { + e.quickCommandActionLabel = u.N("quickCommandActionLabel", + "Command Palette"), e.quickCommandHelp = u.N("quickCommandActionHelp", + "Show And Run Commands") + }(a || (a = {})), + function(e) { + e.quickOutlineActionLabel = u.N("quickOutlineActionLabel", + "Go to Symbol..."), e.quickOutlineByCategoryActionLabel = u.N( + "quickOutlineByCategoryActionLabel", "Go to Symbol by Category...") + }(l || (l = {})), + function(e) { + e.editorViewAccessibleLabel = u.N("editorViewAccessibleLabel", + "Editor content"), e.accessibilityHelpMessage = u.N( + "accessibilityHelpMessage", "Press Alt+F1 for Accessibility Options.") + }(d || (d = {})), + function(e) { + e.toggleHighContrast = u.N("toggleHighContrast", + "Toggle High Contrast Theme") + }(c || (c = {})), + function(e) { + e.bulkEditServiceSummary = u.N("bulkEditServiceSummary", + "Made {0} edits in {1} files") + }(h || (h = {})) + }, + 7869: (e, t, i) => { + "use strict"; + i.d(t, { + Kh: () => a, + Mm: () => l, + n0: () => g, + fY: () => p, + tR: () => f, + Ym: () => _, + hw: () => b, + DD: () => w, + zk: () => C, + Yp: () => y, + TC: () => S, + Dl: () => x, + zw: () => k, + e_: () => L, + kp: () => D, + zu: () => E, + x3: () => I, + N5: () => T, + m9: () => A, + lK: () => R, + Re: () => O, + eS: () => P, + zJ: () => F, + Vs: () => B, + CE: () => W, + UP: () => z, + r0: () => V, + m1: () => H, + ts: () => U + }); + var n = i(3580), + o = i(1264), + r = i(3910), + s = i(7781); + const a = (0, r.P6)("editor.lineHighlightBackground", { + dark: null, + light: null, + hc: null + }, n.N("lineHighlight", + "Background color for the highlight of line at the cursor position.")), + l = (0, r.P6)("editor.lineHighlightBorder", { + dark: "#282828", + light: "#eeeeee", + hc: "#f38518" + }, n.N("lineHighlightBorderBox", + "Background color for the border around the line at the cursor position." + )), + d = (0, r.P6)("editor.rangeHighlightBackground", { + dark: "#ffffff0b", + light: "#fdff0033", + hc: null + }, n.N("rangeHighlight", + "Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations." + ), !0), + c = (0, r.P6)("editor.rangeHighlightBorder", { + dark: null, + light: null, + hc: r.xL + }, n.N("rangeHighlightBorder", + "Background color of the border around highlighted ranges."), !0), + h = (0, r.P6)("editor.symbolHighlightBackground", { + dark: r.MU, + light: r.MU, + hc: null + }, n.N("symbolHighlight", + "Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations." + ), !0), + u = (0, r.P6)("editor.symbolHighlightBorder", { + dark: null, + light: null, + hc: r.xL + }, n.N("symbolHighlightBorder", + "Background color of the border around highlighted symbols."), !0), + g = (0, r.P6)("editorCursor.foreground", { + dark: "#AEAFAD", + light: o.Il.black, + hc: o.Il.white + }, n.N("caret", "Color of the editor cursor.")), + p = (0, r.P6)("editorCursor.background", null, n.N( + "editorCursorBackground", + "The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor." + )), + m = (0, r.P6)("editorWhitespace.foreground", { + dark: "#e3e4e229", + light: "#33333333", + hc: "#e3e4e229" + }, n.N("editorWhitespaces", + "Color of whitespace characters in the editor.")), + f = (0, r.P6)("editorIndentGuide.background", { + dark: m, + light: m, + hc: m + }, n.N("editorIndentGuides", "Color of the editor indentation guides.")), + _ = (0, r.P6)("editorIndentGuide.activeBackground", { + dark: m, + light: m, + hc: m + }, n.N("editorActiveIndentGuide", + "Color of the active editor indentation guides.")), + b = (0, r.P6)("editorLineNumber.foreground", { + dark: "#858585", + light: "#237893", + hc: o.Il.white + }, n.N("editorLineNumbers", "Color of editor line numbers.")), + v = (0, r.P6)("editorActiveLineNumber.foreground", { + dark: "#c6c6c6", + light: "#0B216F", + hc: r.xL + }, n.N("editorActiveLineNumber", "Color of editor active line number"), ! + 1, n.N("deprecatedEditorActiveLineNumber", + "Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")), + w = (0, r.P6)("editorLineNumber.activeForeground", { + dark: v, + light: v, + hc: v + }, n.N("editorActiveLineNumber", "Color of editor active line number")), + C = (0, r.P6)("editorRuler.foreground", { + dark: "#5A5A5A", + light: o.Il.lightgrey, + hc: o.Il.white + }, n.N("editorRuler", "Color of the editor rulers.")), + y = (0, r.P6)("editorCodeLens.foreground", { + dark: "#999999", + light: "#919191", + hc: "#999999" + }, n.N("editorCodeLensForeground", + "Foreground color of editor CodeLens")), + S = (0, r.P6)("editorBracketMatch.background", { + dark: "#0064001a", + light: "#0064001a", + hc: "#0064001a" + }, n.N("editorBracketMatchBackground", + "Background color behind matching brackets")), + x = (0, r.P6)("editorBracketMatch.border", { + dark: "#888", + light: "#B9B9B9", + hc: r.lR + }, n.N("editorBracketMatchBorder", "Color for matching brackets boxes")), + k = (0, r.P6)("editorOverviewRuler.border", { + dark: "#7f7f7f4d", + light: "#7f7f7f4d", + hc: "#7f7f7f4d" + }, n.N("editorOverviewRulerBorder", + "Color of the overview ruler border.")), + L = (0, r.P6)("editorOverviewRuler.background", null, n.N( + "editorOverviewRulerBackground", + "Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor." + )), + N = (0, r.P6)("editorGutter.background", { + dark: r.cv, + light: r.cv, + hc: r.cv + }, n.N("editorGutter", + "Background color of the editor gutter. The gutter contains the glyph margins and the line numbers." + )), + D = (0, r.P6)("editorUnnecessaryCode.border", { + dark: null, + light: null, + hc: o.Il.fromHex("#fff").transparent(.8) + }, n.N("unnecessaryCodeBorder", + "Border color of unnecessary (unused) source code in the editor.")), + E = (0, r.P6)("editorUnnecessaryCode.opacity", { + dark: o.Il.fromHex("#000a"), + light: o.Il.fromHex("#0007"), + hc: null + }, n.N("unnecessaryCodeOpacity", + "Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out." + )), + I = (0, r.P6)("editorGhostText.border", { + dark: null, + light: null, + hc: o.Il.fromHex("#fff").transparent(.8) + }, n.N("editorGhostTextBorder", + "Border color of ghost text in the editor.")), + T = (0, r.P6)("editorGhostText.foreground", { + dark: o.Il.fromHex("#ffffff56"), + light: o.Il.fromHex("#0007"), + hc: null + }, n.N("editorGhostTextForeground", + "Foreground color of the ghost text in the editor.")), + M = new o.Il(new o.VS(0, 122, 204, .6)), + A = (0, r.P6)("editorOverviewRuler.rangeHighlightForeground", { + dark: M, + light: M, + hc: M + }, n.N("overviewRulerRangeHighlight", + "Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations." + ), !0), + R = (0, r.P6)("editorOverviewRuler.errorForeground", { + dark: new o.Il(new o.VS(255, 18, 18, .7)), + light: new o.Il(new o.VS(255, 18, 18, .7)), + hc: new o.Il(new o.VS(255, 50, 50, 1)) + }, n.N("overviewRuleError", "Overview ruler marker color for errors.")), + O = (0, r.P6)("editorOverviewRuler.warningForeground", { + dark: r.uo, + light: r.uo, + hc: r.pW + }, n.N("overviewRuleWarning", + "Overview ruler marker color for warnings.")), + P = (0, r.P6)("editorOverviewRuler.infoForeground", { + dark: r.c6, + light: r.c6, + hc: r.T8 + }, n.N("overviewRuleInfo", "Overview ruler marker color for infos.")), + F = (0, r.P6)("editorBracketHighlight.foreground1", { + dark: "#FFD700", + light: "#0431FAFF", + hc: "#FFD700" + }, n.N("editorBracketHighlightForeground1", + "Foreground color of brackets (1). Requires enabling bracket pair colorization." + )), + B = (0, r.P6)("editorBracketHighlight.foreground2", { + dark: "#DA70D6", + light: "#319331FF", + hc: "#DA70D6" + }, n.N("editorBracketHighlightForeground2", + "Foreground color of brackets (2). Requires enabling bracket pair colorization." + )), + W = (0, r.P6)("editorBracketHighlight.foreground3", { + dark: "#179FFF", + light: "#7B3814FF", + hc: "#87CEFA" + }, n.N("editorBracketHighlightForeground3", + "Foreground color of brackets (3). Requires enabling bracket pair colorization." + )), + z = (0, r.P6)("editorBracketHighlight.foreground4", { + dark: "#00000000", + light: "#00000000", + hc: "#00000000" + }, n.N("editorBracketHighlightForeground4", + "Foreground color of brackets (4). Requires enabling bracket pair colorization." + )), + V = (0, r.P6)("editorBracketHighlight.foreground5", { + dark: "#00000000", + light: "#00000000", + hc: "#00000000" + }, n.N("editorBracketHighlightForeground5", + "Foreground color of brackets (5). Requires enabling bracket pair colorization." + )), + H = (0, r.P6)("editorBracketHighlight.foreground6", { + dark: "#00000000", + light: "#00000000", + hc: "#00000000" + }, n.N("editorBracketHighlightForeground6", + "Foreground color of brackets (6). Requires enabling bracket pair colorization." + )), + U = (0, r.P6)("editorBracketHighlight.unexpectedBracket.foreground", { + dark: new o.Il(new o.VS(255, 18, 18, .8)), + light: new o.Il(new o.VS(255, 18, 18, .8)), + hc: new o.Il(new o.VS(255, 50, 50, 1)) + }, n.N("editorBracketHighlightUnexpectedBracketForeground", + "Foreground color of unexpected brackets.")); + (0, s.Ic)(((e, t) => { + const i = e.getColor(r.cv); + i && t.addRule( + `.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${i}; }` + ); + const n = e.getColor(r.NO); + n && t.addRule( + `.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }` + ); + const o = e.getColor(N); + o && t.addRule(`.monaco-editor .margin { background-color: ${o}; }`); + const s = e.getColor(d); + s && t.addRule( + `.monaco-editor .rangeHighlight { background-color: ${s}; }`); + const a = e.getColor(c); + a && t.addRule( + `.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${a}; }` + ); + const l = e.getColor(h); + l && t.addRule( + `.monaco-editor .symbolHighlight { background-color: ${l}; }`); + const g = e.getColor(u); + g && t.addRule( + `.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${g}; }` + ); + const p = e.getColor(m); + p && (t.addRule(`.monaco-editor .mtkw { color: ${p} !important; }`), t + .addRule(`.monaco-editor .mtkz { color: ${p} !important; }`)) + })) + }, + 2003: (e, t, i) => { + "use strict"; + i.d(t, { + EY: () => o, + Tj: () => r + }); + class n { + constructor(e, t, i) { + this._colorZoneBrand = void 0, this.from = 0 | e, this.to = 0 | t, + this.colorId = 0 | i + } + static compare(e, t) { + return e.colorId === t.colorId ? e.from === t.from ? e.to - t.to : e.from - + t.from : e.colorId - t.colorId + } + } + class o { + constructor(e, t, i) { + this._overviewRulerZoneBrand = void 0, this.startLineNumber = e, this.endLineNumber = + t, this.color = i, this._colorZone = null + } + static compare(e, t) { + return e.color === t.color ? e.startLineNumber === t.startLineNumber ? + e.endLineNumber - t.endLineNumber : e.startLineNumber - t.startLineNumber : + e.color < t.color ? -1 : 1 + } + setColorZone(e) { + this._colorZone = e + } + getColorZones() { + return this._colorZone + } + } + class r { + constructor(e) { + this._getVerticalOffsetForLine = e, this._zones = [], this._colorZonesInvalid = ! + 1, this._lineHeight = 0, this._domWidth = 0, this._domHeight = 0, + this._outerHeight = 0, this._pixelRatio = 1, this._lastAssignedId = 0, + this._color2Id = Object.create(null), this._id2Color = [] + } + getId2Color() { + return this._id2Color + } + setZones(e) { + this._zones = e, this._zones.sort(o.compare) + } + setLineHeight(e) { + return this._lineHeight !== e && (this._lineHeight = e, this._colorZonesInvalid = ! + 0, !0) + } + setPixelRatio(e) { + this._pixelRatio = e, this._colorZonesInvalid = !0 + } + getDOMWidth() { + return this._domWidth + } + getCanvasWidth() { + return this._domWidth * this._pixelRatio + } + setDOMWidth(e) { + return this._domWidth !== e && (this._domWidth = e, this._colorZonesInvalid = ! + 0, !0) + } + getDOMHeight() { + return this._domHeight + } + getCanvasHeight() { + return this._domHeight * this._pixelRatio + } + setDOMHeight(e) { + return this._domHeight !== e && (this._domHeight = e, this._colorZonesInvalid = ! + 0, !0) + } + getOuterHeight() { + return this._outerHeight + } + setOuterHeight(e) { + return this._outerHeight !== e && (this._outerHeight = e, this._colorZonesInvalid = ! + 0, !0) + } + resolveColorZones() { + const e = this._colorZonesInvalid, + t = Math.floor(this._lineHeight), + i = Math.floor(this.getCanvasHeight()), + o = i / Math.floor(this._outerHeight), + r = Math.floor(4 * this._pixelRatio / 2); + let s = []; + for (let a = 0, l = this._zones.length; a < l; a++) { + const l = this._zones[a]; + if (!e) { + const e = l.getColorZones(); + if (e) { + s.push(e); + continue + } + } + const d = Math.floor(o * this._getVerticalOffsetForLine(l.startLineNumber)), + c = Math.floor(o * (this._getVerticalOffsetForLine(l.endLineNumber) + + t)); + let h = Math.floor((d + c) / 2), + u = c - h; + u < r && (u = r), h - u < 0 && (h = u), h + u > i && (h = i - u); + const g = l.color; + let p = this._color2Id[g]; + p || (p = ++this._lastAssignedId, this._color2Id[g] = p, this._id2Color[ + p] = g); + const m = new n(h - u, h + u, p); + l.setColorZone(m), s.push(m) + } + return this._colorZonesInvalid = !1, s.sort(n.compare), s + } + } + }, + 2550: (e, t, i) => { + "use strict"; + i.d(t, { + Kp: () => o, + k: () => a + }); + var n = i(7295); + class o { + constructor(e, t, i, n) { + this.startColumn = e, this.endColumn = t, this.className = i, this.type = + n, this._lineDecorationBrand = void 0 + } + static _equals(e, t) { + return e.startColumn === t.startColumn && e.endColumn === t.endColumn && + e.className === t.className && e.type === t.type + } + static equalsArr(e, t) { + const i = e.length; + if (i !== t.length) return !1; + for (let n = 0; n < i; n++) + if (!o._equals(e[n], t[n])) return !1; + return !0 + } + static extractWrapped(e, t, i) { + if (0 === e.length) return e; + const n = t + 1, + r = i + 1, + s = i - t, + a = []; + let l = 0; + for (const t of e) t.endColumn <= n || t.startColumn >= r || (a[l++] = + new o(Math.max(1, t.startColumn - n + 1), Math.min(s + 1, t.endColumn - + n + 1), t.className, t.type)); + return a + } + static filter(e, t, i, n) { + if (0 === e.length) return []; + let r = [], + s = 0; + for (let a = 0, l = e.length; a < l; a++) { + const l = e[a], + d = l.range; + if (d.endLineNumber < t || d.startLineNumber > t) continue; + if (d.isEmpty() && (0 === l.type || 3 === l.type)) continue; + const c = d.startLineNumber === t ? d.startColumn : i, + h = d.endLineNumber === t ? d.endColumn : n; + r[s++] = new o(c, h, l.inlineClassName, l.type) + } + return r + } + static _typeCompare(e, t) { + const i = [2, 0, 1, 3]; + return i[e] - i[t] + } + static compare(e, t) { + if (e.startColumn !== t.startColumn) return e.startColumn - t.startColumn; + if (e.endColumn !== t.endColumn) return e.endColumn - t.endColumn; + const i = o._typeCompare(e.type, t.type); + return 0 !== i ? i : e.className !== t.className ? e.className < t.className ? + -1 : 1 : 0 + } + } + class r { + constructor(e, t, i, n) { + this.startOffset = e, this.endOffset = t, this.className = i, this.metadata = + n + } + } + class s { + constructor() { + this.stopOffsets = [], this.classNames = [], this.metadata = [], this.count = + 0 + } + static _metadata(e) { + let t = 0; + for (let i = 0, n = e.length; i < n; i++) t |= e[i]; + return t + } + consumeLowerThan(e, t, i) { + for (; this.count > 0 && this.stopOffsets[0] < e;) { + let e = 0; + for (; e + 1 < this.count && this.stopOffsets[e] === this.stopOffsets[ + e + 1];) e++; + i.push(new r(t, this.stopOffsets[e], this.classNames.join(" "), s._metadata( + this.metadata))), t = this.stopOffsets[e] + 1, this.stopOffsets.splice( + 0, e + 1), this.classNames.splice(0, e + 1), this.metadata.splice(0, + e + 1), this.count -= e + 1 + } + return this.count > 0 && t < e && (i.push(new r(t, e - 1, this.classNames + .join(" "), s._metadata(this.metadata))), t = e), t + } + insert(e, t, i) { + if (0 === this.count || this.stopOffsets[this.count - 1] <= e) this.stopOffsets + .push(e), this.classNames.push(t), this.metadata.push(i); + else + for (let n = 0; n < this.count; n++) + if (this.stopOffsets[n] >= e) { + this.stopOffsets.splice(n, 0, e), this.classNames.splice(n, 0, t), + this.metadata.splice(n, 0, i); + break + } + this.count++ + } + } + class a { + static normalize(e, t) { + if (0 === t.length) return []; + let i = []; + const o = new s; + let r = 0; + for (let s = 0, a = t.length; s < a; s++) { + const a = t[s]; + let l = a.startColumn, + d = a.endColumn; + const c = a.className, + h = 1 === a.type ? 2 : 2 === a.type ? 4 : 0; + if (l > 1) { + const t = e.charCodeAt(l - 2); + n.ZG(t) && l-- + } + if (d > 1) { + const t = e.charCodeAt(d - 2); + n.ZG(t) && d-- + } + const u = l - 1, + g = d - 2; + r = o.consumeLowerThan(u, r, i), 0 === o.count && (r = u), o.insert(g, + c, h) + } + return o.consumeLowerThan(1073741824, r, i), i + } + } + }, + 7736: (e, t, i) => { + "use strict"; + i.d(t, { + zG: () => a, + IJ: () => l, + Nd: () => d, + d1: () => u, + tF: () => p + }); + var n = i(7295), + o = i(72), + r = i(2550); + class s { + constructor(e, t, i) { + this._linePartBrand = void 0, this.endIndex = e, this.type = t, this.metadata = + i + } + isWhitespace() { + return !!(1 & this.metadata) + } + isPseudoAfter() { + return !!(4 & this.metadata) + } + } + class a { + constructor(e, t) { + this.startOffset = e, this.endOffset = t + } + equals(e) { + return this.startOffset === e.startOffset && this.endOffset === e.endOffset + } + } + class l { + constructor(e, t, i, n, o, s, a, l, d, c, h, u, g, p, m, f, _, b, v) { + this.useMonospaceOptimizations = e, this.canUseHalfwidthRightwardsArrow = + t, this.lineContent = i, this.continuesWithWrappedLine = n, this.isBasicASCII = + o, this.containsRTL = s, this.fauxIndentLength = a, this.lineTokens = + l, this.lineDecorations = d.sort(r.Kp.compare), this.tabSize = c, + this.startVisibleColumn = h, this.spaceWidth = u, this.stopRenderingLineAfter = + m, this.renderWhitespace = "all" === f ? 4 : "boundary" === f ? 1 : + "selection" === f ? 2 : "trailing" === f ? 3 : 0, this.renderControlCharacters = + _, this.fontLigatures = b, this.selectionsOnLine = v && v.sort(((e, t) => + e.startOffset < t.startOffset ? -1 : 1)), Math.abs(p - u) < Math.abs( + g - u) ? (this.renderSpaceWidth = p, this.renderSpaceCharCode = + 11825) : (this.renderSpaceWidth = g, this.renderSpaceCharCode = 183) + } + sameSelection(e) { + if (null === this.selectionsOnLine) return null === e; + if (null === e) return !1; + if (e.length !== this.selectionsOnLine.length) return !1; + for (let t = 0; t < this.selectionsOnLine.length; t++) + if (!this.selectionsOnLine[t].equals(e[t])) return !1; + return !0 + } + equals(e) { + return this.useMonospaceOptimizations === e.useMonospaceOptimizations && + this.canUseHalfwidthRightwardsArrow === e.canUseHalfwidthRightwardsArrow && + this.lineContent === e.lineContent && this.continuesWithWrappedLine === + e.continuesWithWrappedLine && this.isBasicASCII === e.isBasicASCII && + this.containsRTL === e.containsRTL && this.fauxIndentLength === e.fauxIndentLength && + this.tabSize === e.tabSize && this.startVisibleColumn === e.startVisibleColumn && + this.spaceWidth === e.spaceWidth && this.renderSpaceWidth === e.renderSpaceWidth && + this.renderSpaceCharCode === e.renderSpaceCharCode && this.stopRenderingLineAfter === + e.stopRenderingLineAfter && this.renderWhitespace === e.renderWhitespace && + this.renderControlCharacters === e.renderControlCharacters && this.fontLigatures === + e.fontLigatures && r.Kp.equalsArr(this.lineDecorations, e.lineDecorations) && + this.lineTokens.equals(e.lineTokens) && this.sameSelection(e.selectionsOnLine) + } + } + class d { + constructor(e, t) { + this.partIndex = e, this.charIndex = t + } + } + class c { + constructor(e, t) { + this.length = e, this._data = new Uint32Array(this.length), this._absoluteOffsets = + new Uint32Array(this.length) + } + static getPartIndex(e) { + return (4294901760 & e) >>> 16 + } + static getCharIndex(e) { + return (65535 & e) >>> 0 + } + setColumnInfo(e, t, i, n) { + const o = (t << 16 | i << 0) >>> 0; + this._data[e - 1] = o, this._absoluteOffsets[e - 1] = n + i + } + getAbsoluteOffset(e) { + return 0 === this._absoluteOffsets.length ? 0 : this._absoluteOffsets[ + e - 1] + } + charOffsetToPartData(e) { + return 0 === this.length ? 0 : e < 0 ? this._data[0] : e >= this.length ? + this._data[this.length - 1] : this._data[e] + } + getDomPosition(e) { + const t = this.charOffsetToPartData(e - 1), + i = c.getPartIndex(t), + n = c.getCharIndex(t); + return new d(i, n) + } + getColumn(e, t) { + return this.partDataToCharOffset(e.partIndex, t, e.charIndex) + 1 + } + partDataToCharOffset(e, t, i) { + if (0 === this.length) return 0; + let n = (e << 16 | i << 0) >>> 0, + o = 0, + r = this.length - 1; + for (; o + 1 < r;) { + let e = o + r >>> 1, + t = this._data[e]; + if (t === n) return e; + t > n ? r = e : o = e + } + if (o === r) return o; + let s = this._data[o], + a = this._data[r]; + if (s === n) return o; + if (a === n) return r; + let l, d = c.getPartIndex(s), + h = c.getCharIndex(s); + return l = d !== c.getPartIndex(a) ? t : c.getCharIndex(a), i - h <= l - + i ? o : r + } + } + class h { + constructor(e, t, i) { + this._renderLineOutputBrand = void 0, this.characterMapping = e, this.containsRTL = + t, this.containsForeignElements = i + } + } + + function u(e, t) { + if (0 === e.lineContent.length) { + if (e.lineDecorations.length > 0) { + t.appendASCIIString(""); + let i = 0, + n = 0, + o = 0; + for (const r of e.lineDecorations) 1 !== r.type && 2 !== r.type || (t.appendASCIIString( + ''), 1 === r.type && (o |= 1, i++), 2 === r.type && (o |= + 2, n++)); + t.appendASCIIString(""); + const r = new c(1, i + n); + return r.setColumnInfo(1, i, 0, 0), new h(r, !1, o) + } + return t.appendASCIIString(""), new h(new c(0, + 0), !1, 0) + } + return function(e, t) { + const i = e.fontIsMonospace, + o = e.canUseHalfwidthRightwardsArrow, + r = e.containsForeignElements, + s = e.lineContent, + a = e.len, + l = e.isOverflowing, + d = e.parts, + u = e.fauxIndentLength, + g = e.tabSize, + p = e.startVisibleColumn, + m = e.containsRTL, + f = e.spaceWidth, + _ = e.renderSpaceCharCode, + b = e.renderWhitespace, + v = e.renderControlCharacters, + w = new c(a + 1, d.length); + let C = !1, + y = 0, + S = p, + x = 0, + k = 0, + L = 0, + N = 0; + m ? t.appendASCIIString('') : t.appendASCIIString( + ""); + for (let e = 0, l = d.length; e < l; e++) { + N += L; + const l = d[e], + c = l.endIndex, + h = l.type, + p = 0 !== b && l.isWhitespace(), + m = p && !i && ("mtkw" === h || !r), + D = y === c && l.isPseudoAfter(); + if (x = 0, t.appendASCIIString('= u && (t += n) + } + } + for (m && (t.appendASCIIString(' style="width:'), t.appendASCIIString( + String(f * i)), t.appendASCIIString('px"')), t.appendASCII(62); y < + c; y++) { + let i; + if (w.setColumnInfo(y + 1, e - k, x, N), k = 0, 9 === s.charCodeAt( + y)) { + i = g - S % g | 0, !o || i > 1 ? t.write1(8594) : t.write1(65515); + for (let e = 2; e <= i; e++) t.write1(160) + } else i = 1, t.write1(_); + x += i, y >= u && (S += i) + } + L = i + } else { + let i = 0; + for (t.appendASCII(62); y < c; y++) { + w.setColumnInfo(y + 1, e - k, x, N), k = 0; + const o = s.charCodeAt(y); + let r = 1, + a = 1; + switch (o) { + case 9: + r = g - S % g, a = r; + for (let e = 1; e <= r; e++) t.write1(160); + break; + case 32: + t.write1(160); + break; + case 60: + t.appendASCIIString("<"); + break; + case 62: + t.appendASCIIString(">"); + break; + case 38: + t.appendASCIIString("&"); + break; + case 0: + v ? t.write1(9216) : t.appendASCIIString("�"); + break; + case 65279: + case 8232: + case 8233: + case 133: + t.write1(65533); + break; + default: + n.K7(o) && a++, v && o < 32 ? t.write1(9216 + o) : v && 127 === o ? + t.write1(9249) : t.write1(o) + } + x += r, i += r, y >= u && (S += a) + } + L = i + } + D ? k++ : k = 0, y >= a && !C && l.isPseudoAfter() && (C = !0, w.setColumnInfo( + y + 1, e, x, N)), t.appendASCIIString("") + } + return C || w.setColumnInfo(a + 1, d.length - 1, x, N), l && t.appendASCIIString( + ""), t.appendASCIIString(""), new h(w, m, + r) + }(function(e) { + const t = e.lineContent; + let i, o; - 1 !== e.stopRenderingLineAfter && e.stopRenderingLineAfter < + t.length ? (i = !0, o = e.stopRenderingLineAfter) : (i = !1, o = t.length); + let a = function(e, t, i) { + let n = [], + o = 0; + t > 0 && (n[o++] = new s(t, "", 0)); + for (let r = 0, a = e.getCount(); r < a; r++) { + const a = e.getEndOffset(r); + if (a <= t) continue; + const l = e.getClassName(r); + if (a >= i) { + n[o++] = new s(i, l, 0); + break + } + n[o++] = new s(a, l, 0) + } + return n + }(e.lineTokens, e.fauxIndentLength, o); + (4 === e.renderWhitespace || 1 === e.renderWhitespace || 2 === e.renderWhitespace && + e.selectionsOnLine || 3 === e.renderWhitespace) && (a = function(e, + t, i, o) { + const r = e.continuesWithWrappedLine, + a = e.fauxIndentLength, + l = e.tabSize, + d = e.startVisibleColumn, + c = e.useMonospaceOptimizations, + h = e.selectionsOnLine, + u = 1 === e.renderWhitespace, + g = 3 === e.renderWhitespace, + p = e.renderSpaceWidth !== e.spaceWidth; + let m = [], + f = 0, + _ = 0, + b = o[_].type, + v = o[_].endIndex; + const w = o.length; + let C, y = !1, + S = n.LC(t); - 1 === S ? (y = !0, S = i, C = i) : C = n.ow(t); + let x = !1, + k = 0, + L = h && h[k], + N = d % l; + for (let e = a; e < i; e++) { + const r = t.charCodeAt(e); + let d; + if (L && e >= L.endOffset && (k++, L = h && h[k]), e < S || e > C) + d = !0; + else if (9 === r) d = !0; + else if (32 === r) + if (u) + if (x) d = !0; + else { + const n = e + 1 < i ? t.charCodeAt(e + 1) : 0; + d = 32 === n || 9 === n + } else d = !0; + else d = !1; + if (d && h && (d = !!L && L.startOffset <= e && L.endOffset > e), + d && g && (d = y || e > C), x) { + if (!d || !c && N >= l) { + if (p) + for (let t = (f > 0 ? m[f - 1].endIndex : a) + 1; t <= e; t++) m[ + f++] = new s(t, "mtkw", 1); + else m[f++] = new s(e, "mtkw", 1); + N %= l + } + } else(e === v || d && e > a) && (m[f++] = new s(e, b, 0), N %= l); + for (9 === r ? N = l : n.K7(r) ? N += 2 : N++, x = d; e === v && ( + _++, _ < w);) b = o[_].type, v = o[_].endIndex + } + let D = !1; + if (x) + if (r && u) { + let e = i > 0 ? t.charCodeAt(i - 1) : 0, + n = i > 1 ? t.charCodeAt(i - 2) : 0; + 32 === e && 32 !== n && 9 !== n || (D = !0) + } else D = !0; + if (D) + if (p) + for (let e = (f > 0 ? m[f - 1].endIndex : a) + 1; e <= i; e++) m[ + f++] = new s(e, "mtkw", 1); + else m[f++] = new s(i, "mtkw", 1); + else m[f++] = new s(i, b, 0); + return m + }(e, t, o, a)); + let l = 0; + if (e.lineDecorations.length > 0) { + for (let t = 0, i = e.lineDecorations.length; t < i; t++) { + const i = e.lineDecorations[t]; + 3 === i.type || 1 === i.type ? l |= 1 : 2 === i.type && (l |= 2) + } + a = function(e, t, i, n) { + n.sort(r.Kp.compare); + const o = r.k.normalize(e, n), + a = o.length; + let l = 0, + d = [], + c = 0, + h = 0; + for (let e = 0, t = i.length; e < t; e++) { + const t = i[e], + n = t.endIndex, + r = t.type, + u = t.metadata; + for (; l < a && o[l].startOffset < n;) { + const e = o[l]; + if (e.startOffset > h && (h = e.startOffset, d[c++] = new s(h, r, + u)), !(e.endOffset + 1 <= n)) { + h = n, d[c++] = new s(h, r + " " + e.className, u | e.metadata); + break + } + h = e.endOffset + 1, d[c++] = new s(h, r + " " + e.className, u | + e.metadata), l++ + } + n > h && (h = n, d[c++] = new s(h, r, u)) + } + const u = i[i.length - 1].endIndex; + if (l < a && o[l].startOffset === u) + for (; l < a && o[l].startOffset === u;) { + const e = o[l]; + d[c++] = new s(h, e.className, e.metadata), l++ + } + return d + }(t, 0, a, e.lineDecorations) + } + return e.containsRTL || (a = function(e, t, i) { + let n = 0, + o = [], + r = 0; + if (i) + for (let i = 0, a = t.length; i < a; i++) { + const a = t[i], + l = a.endIndex; + if (n + 50 < l) { + const t = a.type, + i = a.metadata; + let d = -1, + c = n; + for (let a = n; a < l; a++) 32 === e.charCodeAt(a) && (d = a), - + 1 !== d && a - c >= 50 && (o[r++] = new s(d + 1, t, i), c = d + + 1, d = -1); + c !== l && (o[r++] = new s(l, t, i)) + } else o[r++] = a; + n = l + } else + for (let e = 0, i = t.length; e < i; e++) { + const i = t[e], + a = i.endIndex; + let l = a - n; + if (l > 50) { + const e = i.type, + t = i.metadata, + d = Math.ceil(l / 50); + for (let i = 1; i < d; i++) { + let a = n + 50 * i; + o[r++] = new s(a, e, t) + } + o[r++] = new s(a, e, t) + } else o[r++] = i; + n = a + } + return o + }(t, a, !e.isBasicASCII || e.fontLigatures)), new m(e.useMonospaceOptimizations, + e.canUseHalfwidthRightwardsArrow, t, o, i, a, l, e.fauxIndentLength, + e.tabSize, e.startVisibleColumn, e.containsRTL, e.spaceWidth, e.renderSpaceCharCode, + e.renderWhitespace, e.renderControlCharacters) + }(e), t) + } + class g { + constructor(e, t, i, n) { + this.characterMapping = e, this.html = t, this.containsRTL = i, this.containsForeignElements = + n + } + } + + function p(e) { + let t = (0, o.l$)(1e4), + i = u(e, t); + return new g(i.characterMapping, t.build(), i.containsRTL, i.containsForeignElements) + } + class m { + constructor(e, t, i, n, o, r, s, a, l, d, c, h, u, g, p) { + this.fontIsMonospace = e, this.canUseHalfwidthRightwardsArrow = t, + this.lineContent = i, this.len = n, this.isOverflowing = o, this.parts = + r, this.containsForeignElements = s, this.fauxIndentLength = a, this.tabSize = + l, this.startVisibleColumn = d, this.containsRTL = c, this.spaceWidth = + h, this.renderSpaceCharCode = u, this.renderWhitespace = g, this.renderControlCharacters = + p + } + } + }, + 3544: (e, t, i) => { + "use strict"; + i.d(t, { + T: () => o, + o: () => r + }); + var n = i(5427); + class o { + constructor(e, t) { + this._prefixSumIndexOfResultBrand = void 0, this.index = e, this.remainder = + t + } + } + class r { + constructor(e) { + this.values = e, this.prefixSum = new Uint32Array(e.length), this.prefixSumValidIndex = + new Int32Array(1), this.prefixSumValidIndex[0] = -1 + } + insertValues(e, t) { + e = (0, n.A)(e); + const i = this.values, + o = this.prefixSum, + r = t.length; + return 0 !== r && (this.values = new Uint32Array(i.length + r), this.values + .set(i.subarray(0, e), 0), this.values.set(i.subarray(e), e + r), + this.values.set(t, e), e - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[ + 0] = e - 1), this.prefixSum = new Uint32Array(this.values.length), + this.prefixSumValidIndex[0] >= 0 && this.prefixSum.set(o.subarray(0, + this.prefixSumValidIndex[0] + 1)), !0) + } + changeValue(e, t) { + return e = (0, n.A)(e), t = (0, n.A)(t), this.values[e] !== t && (this + .values[e] = t, e - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[ + 0] = e - 1), !0) + } + removeValues(e, t) { + e = (0, n.A)(e), t = (0, n.A)(t); + const i = this.values, + o = this.prefixSum; + if (e >= i.length) return !1; + let r = i.length - e; + return t >= r && (t = r), 0 !== t && (this.values = new Uint32Array(i.length - + t), this.values.set(i.subarray(0, e), 0), this.values.set(i.subarray( + e + t), e), this.prefixSum = new Uint32Array(this.values.length), e - + 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = e - + 1), this.prefixSumValidIndex[0] >= 0 && this.prefixSum.set(o.subarray( + 0, this.prefixSumValidIndex[0] + 1)), !0) + } + getTotalSum() { + return 0 === this.values.length ? 0 : this._getPrefixSum(this.values.length - + 1) + } + getPrefixSum(e) { + return e < 0 ? 0 : (e = (0, n.A)(e), this._getPrefixSum(e)) + } + _getPrefixSum(e) { + if (e <= this.prefixSumValidIndex[0]) return this.prefixSum[e]; + let t = this.prefixSumValidIndex[0] + 1; + 0 === t && (this.prefixSum[0] = this.values[0], t++), e >= this.values + .length && (e = this.values.length - 1); + for (let i = t; i <= e; i++) this.prefixSum[i] = this.prefixSum[i - 1] + + this.values[i]; + return this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[ + 0], e), this.prefixSum[e] + } + getIndexOf(e) { + e = Math.floor(e), this.getTotalSum(); + let t = 0, + i = this.values.length - 1, + n = 0, + r = 0, + s = 0; + for (; t <= i;) + if (n = t + (i - t) / 2 | 0, r = this.prefixSum[n], s = r - this.values[ + n], e < s) i = n - 1; + else { + if (!(e >= r)) break; + t = n + 1 + } + return new o(n, e - s) + } + } + }, + 3824: (e, t, i) => { + "use strict"; + i.d(t, { + l_: () => s, + le: () => l, + ud: () => d, + IP: () => c, + wA: () => h, + $t: () => u, + Wx: () => g, + $l: () => p + }); + var n = i(7295), + o = i(187), + r = i(4314); + class s { + constructor(e, t, i, n) { + this._viewportBrand = void 0, this.top = 0 | e, this.left = 0 | t, + this.width = 0 | i, this.height = 0 | n + } + } + class a { + constructor(e, t) { + this.outputLineIndex = e, this.outputOffset = t + } + toString() { + return `${this.outputLineIndex}:${this.outputOffset}` + } + toPosition(e, t) { + const i = this.outputLineIndex > 0 ? t : 0; + return new o.L(e + this.outputLineIndex, i + this.outputOffset + 1) + } + } + class l { + constructor(e, t, i, n, o) { + this.breakOffsets = e, this.breakOffsetsVisibleColumn = t, this.wrappedTextIndentLength = + i, this.injectionOffsets = n, this.injectionOptions = o + } + getInputOffsetOfOutputPosition(e, t) { + let i = 0; + if (i = 0 === e ? t : this.breakOffsets[e - 1] + t, null !== this.injectionOffsets) + for (let e = 0; e < this.injectionOffsets.length && i > this.injectionOffsets[ + e]; e++) i < this.injectionOffsets[e] + this.injectionOptions[e].content + .length ? i = this.injectionOffsets[e] : i -= this.injectionOptions[ + e].content.length; + return i + } + getOutputPositionOfInputOffset(e, t = 2) { + let i = 0; + if (null !== this.injectionOffsets) + for (let n = 0; n < this.injectionOffsets.length && !(e < this.injectionOffsets[ + n]) && (1 === t || e !== this.injectionOffsets[n]); n++) i += this.injectionOptions[ + n].content.length; + return e += i, this.getOutputPositionOfOffsetInUnwrappedLine(e, t) + } + getOutputPositionOfOffsetInUnwrappedLine(e, t = 2) { + let i = 0, + n = this.breakOffsets.length - 1, + o = 0, + r = 0; + for (; i <= n;) { + o = i + (n - i) / 2 | 0; + const s = this.breakOffsets[o]; + if (r = o > 0 ? this.breakOffsets[o - 1] : 0, 0 === t) + if (e <= r) n = o - 1; + else { + if (!(e > s)) break; + i = o + 1 + } else if (e < r) n = o - 1; + else { + if (!(e >= s)) break; + i = o + 1 + } + } + return new a(o, e - r) + } + outputPositionToOffsetInUnwrappedLine(e, t) { + let i = (e > 0 ? this.breakOffsets[e - 1] : 0) + t; + return e > 0 && (i -= this.wrappedTextIndentLength), i + } + normalizeOffsetAroundInjections(e, t) { + const i = this.getInjectedTextAtOffset(e); + if (!i) return e; + if (2 === t) return e === i.offsetInUnwrappedLine + i.length ? i.offsetInUnwrappedLine + + i.length : i.offsetInUnwrappedLine; + if (1 === t) { + let e = i.offsetInUnwrappedLine + i.length, + t = i.injectedTextIndex; + for (; t + 1 < this.injectionOffsets.length && this.injectionOffsets[ + t + 1] === this.injectionOffsets[t];) e += this.injectionOptions[t + + 1].content.length, t++; + return e + } + let n = i.offsetInUnwrappedLine, + o = i.injectedTextIndex; + for (; o - 1 >= 0 && this.injectionOffsets[o - 1] === this.injectionOffsets[ + o];) n -= this.injectionOptions[o - 1].content.length, o++; + return n + } + getInjectedText(e, t) { + const i = this.outputPositionToOffsetInUnwrappedLine(e, t), + n = this.getInjectedTextAtOffset(i); + return n ? { + options: this.injectionOptions[n.injectedTextIndex] + } : null + } + getInjectedTextAtOffset(e) { + const t = this.injectionOffsets, + i = this.injectionOptions; + if (null !== t) { + let n = 0; + for (let o = 0; o < t.length; o++) { + const r = i[o].content.length, + s = t[o] + n, + a = t[o] + n + r; + if (s > e) break; + if (e <= a) return { + injectedTextIndex: o, + offsetInUnwrappedLine: s, + length: r + }; + n += r + } + } + } + } + class d { + constructor(e, t) { + this.tabSize = e, this.data = t + } + } + class c { + constructor(e, t, i, n, o, r, s) { + this._viewLineDataBrand = void 0, this.content = e, this.continuesWithWrappedLine = + t, this.minColumn = i, this.maxColumn = n, this.startVisibleColumn = + o, this.tokens = r, this.inlineDecorations = s + } + } + class h { + constructor(e, t, i, n, o, r, s, a, l, d) { + this.minColumn = e, this.maxColumn = t, this.content = i, this.continuesWithWrappedLine = + n, this.isBasicASCII = h.isBasicASCII(i, r), this.containsRTL = h.containsRTL( + i, this.isBasicASCII, o), this.tokens = s, this.inlineDecorations = + a, this.tabSize = l, this.startVisibleColumn = d + } + static isBasicASCII(e, t) { + return !t || n.$i(e) + } + static containsRTL(e, t, i) { + return !(t || !i) && n.Ut(e) + } + } + class u { + constructor(e, t, i) { + this.range = e, this.inlineClassName = t, this.type = i + } + } + class g { + constructor(e, t, i, n) { + this.startOffset = e, this.endOffset = t, this.inlineClassName = i, + this.inlineClassNameAffectsLetterSpacing = n + } + toInlineDecoration(e) { + return new u(new r.e(e, this.startOffset + 1, e, this.endOffset + 1), + this.inlineClassName, this.inlineClassNameAffectsLetterSpacing ? 3 : + 0) + } + } + class p { + constructor(e, t) { + this._viewModelDecorationBrand = void 0, this.range = e, this.options = + t + } + } + }, + 4396: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + SelectionAnchorSet: () => L + }); + var n = i(3379), + o = i.n(n), + r = i(7795), + s = i.n(r), + a = i(569), + l = i.n(a), + d = i(3565), + c = i.n(d), + h = i(9216), + u = i.n(h), + g = i(4589), + p = i.n(g), + m = i(2671), + f = {}; + f.styleTagTransform = p(), f.setAttributes = c(), f.insert = l().bind( + null, "head"), f.domAPI = s(), f.insertStyleElement = u(), o()(m.Z, f), + m.Z && m.Z.locals && m.Z.locals; + var _ = i(6830), + b = i(3580), + v = i(9102), + w = i(3860), + C = i(2258), + y = i(8819), + S = i(9365), + x = i(6346), + k = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + const L = new y.uy("selectionAnchorSet", !1); + let N = class e { + constructor(e, t) { + this.editor = e, this.selectionAnchorSetContextKey = L.bindTo(t), + this.modelChangeListener = e.onDidChangeModel((() => this.selectionAnchorSetContextKey + .reset())) + } + static get(t) { + return t.getContribution(e.ID) + } + setSelectionAnchor() { + if (this.editor.hasModel()) { + const e = this.editor.getPosition(), + t = this.decorationId ? [this.decorationId] : [], + i = this.editor.deltaDecorations(t, [{ + range: w.Y.fromPositions(e, e), + options: { + description: "selection-anchor", + stickiness: 1, + hoverMessage: (new S.W5).appendText((0, b.N)("selectionAnchor", + "Selection Anchor")), + className: "selection-anchor" + } + }]); + this.decorationId = i[0], this.selectionAnchorSetContextKey.set(!! + this.decorationId), (0, x.Z9)((0, b.N)("anchorSet", + "Anchor set at {0}:{1}", e.lineNumber, e.column)) + } + } + goToSelectionAnchor() { + if (this.editor.hasModel() && this.decorationId) { + const e = this.editor.getModel().getDecorationRange(this.decorationId); + e && this.editor.setPosition(e.getStartPosition()) + } + } + selectFromAnchorToCursor() { + if (this.editor.hasModel() && this.decorationId) { + const e = this.editor.getModel().getDecorationRange(this.decorationId); + if (e) { + const t = this.editor.getPosition(); + this.editor.setSelection(w.Y.fromPositions(e.getStartPosition(), t)), + this.cancelSelectionAnchor() + } + } + } + cancelSelectionAnchor() { + this.decorationId && (this.editor.deltaDecorations([this.decorationId], []), + this.decorationId = void 0, this.selectionAnchorSetContextKey.set(! + 1)) + } + dispose() { + this.cancelSelectionAnchor(), this.modelChangeListener.dispose() + } + }; + var D, E; + N.ID = "editor.contrib.selectionAnchorController", N = function(e, t, i, + n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(D = 1, E = y.i6, function(e, t) { + E(e, t, D) + })], N); + class I extends _.R6 { + constructor() { + super({ + id: "editor.action.setSelectionAnchor", + label: (0, b.N)("setSelectionAnchor", "Set Selection Anchor"), + alias: "Set Selection Anchor", + precondition: void 0, + kbOpts: { + kbExpr: v.u.editorTextFocus, + primary: (0, C.gx)(2089, 2080), + weight: 100 + } + }) + } + run(e, t) { + return k(this, void 0, void 0, (function*() { + N.get(t).setSelectionAnchor() + })) + } + } + class T extends _.R6 { + constructor() { + super({ + id: "editor.action.goToSelectionAnchor", + label: (0, b.N)("goToSelectionAnchor", "Go to Selection Anchor"), + alias: "Go to Selection Anchor", + precondition: L + }) + } + run(e, t) { + return k(this, void 0, void 0, (function*() { + N.get(t).goToSelectionAnchor() + })) + } + } + class M extends _.R6 { + constructor() { + super({ + id: "editor.action.selectFromAnchorToCursor", + label: (0, b.N)("selectFromAnchorToCursor", + "Select from Anchor to Cursor"), + alias: "Select from Anchor to Cursor", + precondition: L, + kbOpts: { + kbExpr: v.u.editorTextFocus, + primary: (0, C.gx)(2089, 2089), + weight: 100 + } + }) + } + run(e, t) { + return k(this, void 0, void 0, (function*() { + N.get(t).selectFromAnchorToCursor() + })) + } + } + class A extends _.R6 { + constructor() { + super({ + id: "editor.action.cancelSelectionAnchor", + label: (0, b.N)("cancelSelectionAnchor", "Cancel Selection Anchor"), + alias: "Cancel Selection Anchor", + precondition: L, + kbOpts: { + kbExpr: v.u.editorTextFocus, + primary: 9, + weight: 100 + } + }) + } + run(e, t) { + return k(this, void 0, void 0, (function*() { + N.get(t).cancelSelectionAnchor() + })) + } + }(0, _._K)(N.ID, N), (0, _.Qr)(I), (0, _.Qr)(T), (0, _.Qr)(M), (0, _.Qr) + (A) + }, + 6012: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + BracketMatchingController: () => O + }); + var n = i(3379), + o = i.n(n), + r = i(7795), + s = i.n(r), + a = i(569), + l = i.n(a), + d = i(3565), + c = i.n(d), + h = i(9216), + u = i.n(h), + g = i(4589), + p = i.n(g), + m = i(7667), + f = {}; + f.styleTagTransform = p(), f.setAttributes = c(), f.insert = l().bind( + null, "head"), f.domAPI = s(), f.insertStyleElement = u(), o()(m.Z, f), + m.Z && m.Z.locals && m.Z.locals; + var _ = i(3580), + b = i(5393), + v = i(5976), + w = i(6830), + C = i(187), + y = i(4314), + S = i(3860), + x = i(9102), + k = i(4973), + L = i(6281), + N = i(7869), + D = i(3910), + E = i(7781), + I = i(4144); + const T = (0, D.P6)("editorOverviewRuler.bracketMatchForeground", { + dark: "#A0A0A0", + light: "#A0A0A0", + hc: "#A0A0A0" + }, _.N("overviewRulerBracketMatchForeground", + "Overview ruler marker color for matching brackets.")); + class M extends w.R6 { + constructor() { + super({ + id: "editor.action.jumpToBracket", + label: _.N("smartSelect.jumpBracket", "Go to Bracket"), + alias: "Go to Bracket", + precondition: void 0, + kbOpts: { + kbExpr: x.u.editorTextFocus, + primary: 3160, + weight: 100 + } + }) + } + run(e, t) { + let i = O.get(t); + i && i.jumpToBracket() + } + } + class A extends w.R6 { + constructor() { + super({ + id: "editor.action.selectToBracket", + label: _.N("smartSelect.selectToBracket", "Select to Bracket"), + alias: "Select to Bracket", + precondition: void 0, + description: { + description: "Select to Bracket", + args: [{ + name: "args", + schema: { + type: "object", + properties: { + selectBrackets: { + type: "boolean", + default: !0 + } + } + } + }] + } + }) + } + run(e, t, i) { + const n = O.get(t); + if (!n) return; + let o = !0; + i && !1 === i.selectBrackets && (o = !1), n.selectToBracket(o) + } + } + class R { + constructor(e, t, i) { + this.position = e, this.brackets = t, this.options = i + } + } + class O extends v.JT { + constructor(e) { + super(), this._editor = e, this._lastBracketsData = [], this._lastVersionId = + 0, this._decorations = [], this._updateBracketsSoon = this._register( + new b.pY((() => this._updateBrackets()), 50)), this._matchBrackets = + this._editor.getOption(63), this._updateBracketsSoon.schedule(), + this._register(e.onDidChangeCursorPosition((e => { + "never" !== this._matchBrackets && this._updateBracketsSoon.schedule() + }))), this._register(e.onDidChangeModelContent((e => { + this._updateBracketsSoon.schedule() + }))), this._register(e.onDidChangeModel((e => { + this._lastBracketsData = [], this._decorations = [], this._updateBracketsSoon + .schedule() + }))), this._register(e.onDidChangeModelLanguageConfiguration((e => { + this._lastBracketsData = [], this._updateBracketsSoon.schedule() + }))), this._register(e.onDidChangeConfiguration((e => { + e.hasChanged(63) && (this._matchBrackets = this._editor.getOption( + 63), this._decorations = this._editor.deltaDecorations(this._decorations, []), + this._lastBracketsData = [], this._lastVersionId = 0, this._updateBracketsSoon + .schedule()) + }))) + } + static get(e) { + return e.getContribution(O.ID) + } + jumpToBracket() { + if (!this._editor.hasModel()) return; + const e = this._editor.getModel(), + t = this._editor.getSelections().map((t => { + const i = t.getStartPosition(), + n = e.matchBracket(i); + let o = null; + if (n) n[0].containsPosition(i) ? o = n[1].getStartPosition() : n[ + 1].containsPosition(i) && (o = n[0].getStartPosition()); + else { + const t = e.findEnclosingBrackets(i); + if (t) o = t[0].getStartPosition(); + else { + const t = e.findNextBracket(i); + t && t.range && (o = t.range.getStartPosition()) + } + } + return o ? new S.Y(o.lineNumber, o.column, o.lineNumber, o.column) : + new S.Y(i.lineNumber, i.column, i.lineNumber, i.column) + })); + this._editor.setSelections(t), this._editor.revealRange(t[0]) + } + selectToBracket(e) { + if (!this._editor.hasModel()) return; + const t = this._editor.getModel(), + i = []; + this._editor.getSelections().forEach((n => { + const o = n.getStartPosition(); + let r = t.matchBracket(o); + if (!r && (r = t.findEnclosingBrackets(o), !r)) { + const e = t.findNextBracket(o); + e && e.range && (r = t.matchBracket(e.range.getStartPosition())) + } + let s = null, + a = null; + if (r) { + r.sort(y.e.compareRangesUsingStarts); + const [t, i] = r; + if (s = e ? t.getStartPosition() : t.getEndPosition(), a = e ? i + .getEndPosition() : i.getStartPosition(), i.containsPosition(o) + ) { + const e = s; + s = a, a = e + } + } + s && a && i.push(new S.Y(s.lineNumber, s.column, a.lineNumber, a.column)) + })), i.length > 0 && (this._editor.setSelections(i), this._editor.revealRange( + i[0])) + } + _updateBrackets() { + if ("never" === this._matchBrackets) return; + this._recomputeBrackets(); + let e = [], + t = 0; + for (const i of this._lastBracketsData) { + let n = i.brackets; + n && (e[t++] = { + range: n[0], + options: i.options + }, e[t++] = { + range: n[1], + options: i.options + }) + } + this._decorations = this._editor.deltaDecorations(this._decorations, + e) + } + _recomputeBrackets() { + if (!this._editor.hasModel()) return this._lastBracketsData = [], + void(this._lastVersionId = 0); + const e = this._editor.getSelections(); + if (e.length > 100) return this._lastBracketsData = [], void(this._lastVersionId = + 0); + const t = this._editor.getModel(), + i = t.getVersionId(); + let n = []; + this._lastVersionId === i && (n = this._lastBracketsData); + let o = [], + r = 0; + for (let t = 0, i = e.length; t < i; t++) { + let i = e[t]; + i.isEmpty() && (o[r++] = i.getStartPosition()) + } + o.length > 1 && o.sort(C.L.compare); + let s = [], + a = 0, + l = 0, + d = n.length; + for (let e = 0, i = o.length; e < i; e++) { + let i = o[e]; + for (; l < d && n[l].position.isBefore(i);) l++; + if (l < d && n[l].position.equals(i)) s[a++] = n[l]; + else { + let e = t.matchBracket(i), + n = O._DECORATION_OPTIONS_WITH_OVERVIEW_RULER; + e || "always" !== this._matchBrackets || (e = t.findEnclosingBrackets( + i, 20), n = O._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER), s[a++] = + new R(i, e, n) + } + } + this._lastBracketsData = s, this._lastVersionId = i + } + } + O.ID = "editor.contrib.bracketMatchingController", O._DECORATION_OPTIONS_WITH_OVERVIEW_RULER = + L.qx.register({ + description: "bracket-match-overview", + stickiness: 1, + className: "bracket-match", + overviewRuler: { + color: (0, E.EN)(T), + position: k.sh.Center + } + }), O._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER = L.qx.register({ + description: "bracket-match-no-overview", + stickiness: 1, + className: "bracket-match" + }), (0, w._K)(O.ID, O), (0, w.Qr)(A), (0, w.Qr)(M), (0, E.Ic)(((e, t) => { + const i = e.getColor(N.TC); + i && t.addRule( + `.monaco-editor .bracket-match { background-color: ${i}; }`); + const n = e.getColor(N.Dl); + n && t.addRule( + `.monaco-editor .bracket-match { border: 1px solid ${n}; }`) + })), I.BH.appendMenuItem(I.eH.MenubarGoMenu, { + group: "5_infile_nav", + command: { + id: "editor.action.jumpToBracket", + title: _.N({ + key: "miGoToBracket", + comment: ["&& denotes a mnemonic"] + }, "Go to &&Bracket") + }, + order: 2 + }) + }, + 4594: (e, t, i) => { + "use strict"; + i.r(t); + var n = i(3580), + o = i(6830), + r = i(9102), + s = i(4314), + a = i(3860); + class l { + constructor(e, t) { + this._selection = e, this._isMovingLeft = t + } + getEditOperations(e, t) { + if (this._selection.startLineNumber !== this._selection.endLineNumber || + this._selection.isEmpty()) return; + const i = this._selection.startLineNumber, + n = this._selection.startColumn, + o = this._selection.endColumn; + if ((!this._isMovingLeft || 1 !== n) && (this._isMovingLeft || o !== e + .getLineMaxColumn(i))) + if (this._isMovingLeft) { + const r = new s.e(i, n - 1, i, n), + a = e.getValueInRange(r); + t.addEditOperation(r, null), t.addEditOperation(new s.e(i, o, i, o), + a) + } else { + const r = new s.e(i, o, i, o + 1), + a = e.getValueInRange(r); + t.addEditOperation(r, null), t.addEditOperation(new s.e(i, n, i, n), + a) + } + } + computeCursorState(e, t) { + return this._isMovingLeft ? new a.Y(this._selection.startLineNumber, + this._selection.startColumn - 1, this._selection.endLineNumber, this + ._selection.endColumn - 1) : new a.Y(this._selection.startLineNumber, + this._selection.startColumn + 1, this._selection.endLineNumber, this + ._selection.endColumn + 1) + } + } + class d extends o.R6 { + constructor(e, t) { + super(t), this.left = e + } + run(e, t) { + if (!t.hasModel()) return; + let i = [], + n = t.getSelections(); + for (const e of n) i.push(new l(e, this.left)); + t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop() + } + }(0, o.Qr)(class extends d { + constructor() { + super(!0, { + id: "editor.action.moveCarretLeftAction", + label: n.N("caret.moveLeft", "Move Selected Text Left"), + alias: "Move Selected Text Left", + precondition: r.u.writable + }) + } + }), (0, o.Qr)(class extends d { + constructor() { + super(!1, { + id: "editor.action.moveCarretRightAction", + label: n.N("caret.moveRight", "Move Selected Text Right"), + alias: "Move Selected Text Right", + precondition: r.u.writable + }) + } + }) + }, + 7847: (e, t, i) => { + "use strict"; + i.r(t); + var n = i(3580), + o = i(6830), + r = i(1329), + s = i(4314), + a = i(9102), + l = i(8784); + class d extends o.R6 { + constructor() { + super({ + id: "editor.action.transposeLetters", + label: n.N("transposeLetters.label", "Transpose Letters"), + alias: "Transpose Letters", + precondition: a.u.writable, + kbOpts: { + kbExpr: a.u.textInputFocus, + primary: 0, + mac: { + primary: 306 + }, + weight: 100 + } + }) + } + run(e, t) { + if (!t.hasModel()) return; + let i = t.getModel(), + n = [], + o = t.getSelections(); + for (let e of o) { + if (!e.isEmpty()) continue; + let t = e.startLineNumber, + o = e.startColumn, + a = i.getLineMaxColumn(t); + if (1 === t && (1 === o || 2 === o && 2 === a)) continue; + let d = o === a ? e.getPosition() : l.o.rightPosition(i, e.getPosition() + .lineNumber, e.getPosition().column), + c = l.o.leftPosition(i, d), + h = l.o.leftPosition(i, c), + u = i.getValueInRange(s.e.fromPositions(h, c)), + g = i.getValueInRange(s.e.fromPositions(c, d)), + p = s.e.fromPositions(h, d); + n.push(new r.T4(p, g + u)) + } + n.length > 0 && (t.pushUndoStop(), t.executeCommands(this.id, n), t.pushUndoStop()) + } + }(0, o.Qr)(d) + }, + 2015: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + CutAction: () => _, + CopyAction: () => b, + PasteAction: () => v + }); + var n = i(3580), + o = i(6268), + r = i(1432), + s = i(5715), + a = i(6830), + l = i(1640), + d = i(9102), + c = i(4144), + h = i(4972); + const u = "9_cutcopypaste", + g = r.tY || document.queryCommandSupported("cut"), + p = r.tY || document.queryCommandSupported("copy"), + m = void 0 !== navigator.clipboard && !o.vU || document.queryCommandSupported( + "paste"); + + function f(e) { + return e.register(), e + } + const _ = g ? f(new a.AJ({ + id: "editor.action.clipboardCutAction", + precondition: void 0, + kbOpts: r.tY ? { + primary: 2102, + win: { + primary: 2102, + secondary: [1044] + }, + weight: 100 + } : void 0, + menuOpts: [{ + menuId: c.eH.MenubarEditMenu, + group: "2_ccp", + title: n.N({ + key: "miCut", + comment: ["&& denotes a mnemonic"] + }, "Cu&&t"), + order: 1 + }, { + menuId: c.eH.EditorContext, + group: u, + title: n.N("actions.clipboard.cutLabel", "Cut"), + when: d.u.writable, + order: 1 + }, { + menuId: c.eH.CommandPalette, + group: "", + title: n.N("actions.clipboard.cutLabel", "Cut"), + order: 1 + }, { + menuId: c.eH.SimpleEditorContext, + group: u, + title: n.N("actions.clipboard.cutLabel", "Cut"), + when: d.u.writable, + order: 1 + }] + })) : void 0, + b = p ? f(new a.AJ({ + id: "editor.action.clipboardCopyAction", + precondition: void 0, + kbOpts: r.tY ? { + primary: 2081, + win: { + primary: 2081, + secondary: [2067] + }, + weight: 100 + } : void 0, + menuOpts: [{ + menuId: c.eH.MenubarEditMenu, + group: "2_ccp", + title: n.N({ + key: "miCopy", + comment: ["&& denotes a mnemonic"] + }, "&&Copy"), + order: 2 + }, { + menuId: c.eH.EditorContext, + group: u, + title: n.N("actions.clipboard.copyLabel", "Copy"), + order: 2 + }, { + menuId: c.eH.CommandPalette, + group: "", + title: n.N("actions.clipboard.copyLabel", "Copy"), + order: 1 + }, { + menuId: c.eH.SimpleEditorContext, + group: u, + title: n.N("actions.clipboard.copyLabel", "Copy"), + order: 2 + }] + })) : void 0; + c.BH.appendMenuItem(c.eH.MenubarEditMenu, { + submenu: c.eH.MenubarCopy, + title: { + value: n.N("copy as", "Copy As"), + original: "Copy As" + }, + group: "2_ccp", + order: 3 + }), c.BH.appendMenuItem(c.eH.EditorContext, { + submenu: c.eH.EditorContextCopy, + title: { + value: n.N("copy as", "Copy As"), + original: "Copy As" + }, + group: u, + order: 3 + }); + const v = m ? f(new a.AJ({ + id: "editor.action.clipboardPasteAction", + precondition: void 0, + kbOpts: r.tY ? { + primary: 2100, + win: { + primary: 2100, + secondary: [1043] + }, + linux: { + primary: 2100, + secondary: [1043] + }, + weight: 100 + } : void 0, + menuOpts: [{ + menuId: c.eH.MenubarEditMenu, + group: "2_ccp", + title: n.N({ + key: "miPaste", + comment: ["&& denotes a mnemonic"] + }, "&&Paste"), + order: 4 + }, { + menuId: c.eH.EditorContext, + group: u, + title: n.N("actions.clipboard.pasteLabel", "Paste"), + when: d.u.writable, + order: 4 + }, { + menuId: c.eH.CommandPalette, + group: "", + title: n.N("actions.clipboard.pasteLabel", "Paste"), + order: 1 + }, { + menuId: c.eH.SimpleEditorContext, + group: u, + title: n.N("actions.clipboard.pasteLabel", "Paste"), + when: d.u.writable, + order: 4 + }] + })) : void 0; + class w extends a.R6 { + constructor() { + super({ + id: "editor.action.clipboardCopyWithSyntaxHighlightingAction", + label: n.N("actions.clipboard.copyWithSyntaxHighlightingLabel", + "Copy With Syntax Highlighting"), + alias: "Copy With Syntax Highlighting", + precondition: void 0, + kbOpts: { + kbExpr: d.u.textInputFocus, + primary: 0, + weight: 100 + } + }) + } + run(e, t) { + t.hasModel() && (!t.getOption(31) && t.getSelection().isEmpty() || (s + .RA.forceCopyWithSyntaxHighlighting = !0, t.focus(), document.execCommand( + "copy"), s.RA.forceCopyWithSyntaxHighlighting = !1)) + } + } + + function C(e, t) { + e && (e.addImplementation(1e4, "code-editor", ((e, i) => { + const n = e.get(l.$).getFocusedCodeEditor(); + if (n && n.hasTextFocus()) { + const e = n.getOption(31), + i = n.getSelection(); + return i && i.isEmpty() && !e || document.execCommand(t), !0 + } + return !1 + })), e.addImplementation(0, "generic-dom", ((e, i) => (document.execCommand( + t), !0)))) + } + C(_, "cut"), C(b, "copy"), v && (v.addImplementation(1e4, "code-editor", ( + (e, t) => { + const i = e.get(l.$), + n = e.get(h.p), + o = i.getFocusedCodeEditor(); + return !(!o || !o.hasTextFocus()) && !(!document.execCommand("paste") && + r.$L && (a = void 0, d = void 0, c = void 0, u = function*() { + const e = yield n.readText(); + if ("" !== e) { + const t = s.Nl.INSTANCE.get(e); + let i = !1, + n = null, + r = null; + t && (i = o.getOption(31) && !!t.isFromEmptySelection, n = void 0 !== + t.multicursorText ? t.multicursorText : null, r = t.mode), o.trigger( + "keyboard", "paste", { + text: e, + pasteOnNewLine: i, + multicursorText: n, + mode: r + }) + } + }, new(c || (c = Promise))((function(e, t) { + function i(e) { + try { + o(u.next(e)) + } catch (e) { + t(e) + } + } + + function n(e) { + try { + o(u.throw(e)) + } catch (e) { + t(e) + } + } + + function o(t) { + var o; + t.done ? e(t.value) : (o = t.value, o instanceof c ? o : new c( + (function(e) { + e(o) + }))).then(i, n) + } + o((u = u.apply(a, d || [])).next()) + })), 0)); + var a, d, c, u + })), v.addImplementation(0, "generic-dom", ((e, t) => (document.execCommand( + "paste"), !0)))), p && (0, a.Qr)(w) + }, + 1907: (e, t, i) => { + "use strict"; + i.d(t, { + RB: () => _, + Bb: () => b, + MN: () => v, + uH: () => w, + TM: () => C, + bA: () => y, + aI: () => k + }); + var n = i(9488), + o = i(1050), + r = i(7301), + s = i(5976), + a = i(666), + l = i(9925), + d = i(4314), + c = i(3860), + h = i(4101), + u = i(1200), + g = i(9532), + p = i(535), + m = i(4565), + f = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + const _ = "editor.action.codeAction", + b = "editor.action.refactor", + v = "editor.action.sourceAction", + w = "editor.action.organizeImports", + C = "editor.action.fixAll"; + class y { + constructor(e, t) { + this.action = e, this.provider = t + } + resolve(e) { + var t; + return f(this, void 0, void 0, (function*() { + if ((null === (t = this.provider) || void 0 === t ? void 0 : t.resolveCodeAction) && + !this.action.edit) { + let t; + try { + t = yield this.provider.resolveCodeAction(this.action, e) + } catch (e) { + (0, r.Cp)(e) + } + t && (this.action.edit = t.edit) + } + return this + })) + } + } + class S extends s.JT { + constructor(e, t, i) { + super(), this.documentation = t, this._register(i), this.allActions = [ + ...e + ].sort(S.codeActionsComparator), this.validActions = this.allActions + .filter((({ + action: e + }) => !e.disabled)) + } + static codeActionsComparator({ + action: e + }, { + action: t + }) { + return e.isPreferred && !t.isPreferred ? -1 : !e.isPreferred && t.isPreferred ? + 1 : (0, n.Of)(e.diagnostics) ? (0, n.Of)(t.diagnostics) ? e.diagnostics[ + 0].message.localeCompare(t.diagnostics[0].message) : -1 : (0, n.Of) + (t.diagnostics) ? 1 : 0 + } + get hasAutoFix() { + return this.validActions.some((({ + action: e + }) => !!e.kind && g.yN.QuickFix.contains(new g.yN(e.kind)) && !!e.isPreferred)) + } + } + const x = { + actions: [], + documentation: void 0 + }; + + function k(e, t, i, o, a) { + var d; + const c = i.filter || {}, + u = { + only: null === (d = c.include) || void 0 === d ? void 0 : d.value, + trigger: i.type + }, + p = new l.YQ(e, a), + m = function(e, t) { + return h.H9.all(e).filter((e => !e.providedCodeActionKinds || e.providedCodeActionKinds + .some((e => (0, g.EU)(t, new g.yN(e)))))) + }(e, c), + _ = new s.SL, + b = m.map((i => f(this, void 0, void 0, (function*() { + try { + o.report(i); + const n = yield i.provideCodeActions(e, t, u, p.token); + if (n && _.add(n), p.token.isCancellationRequested) return x; + const r = ((null == n ? void 0 : n.actions) || []).filter((e => e && + (0, g.Yl)(c, e))), + s = function(e, t, i) { + if (!e.documentation) return; + const n = e.documentation.map((e => ({ + kind: new g.yN(e.kind), + command: e.command + }))); + if (i) { + let e; + for (const t of n) t.kind.contains(i) && (e ? e.kind.contains( + t.kind) && (e = t) : e = t); + if (e) return null == e ? void 0 : e.command + } + for (const e of t) + if (e.kind) + for (const t of n) + if (t.kind.contains(new g.yN(e.kind))) return t.command + }(i, r, c.include); + return { + actions: r.map((e => new y(e, i))), + documentation: s + } + } catch (e) { + if ((0, r.VV)(e)) throw e; + return (0, r.Cp)(e), x + } + })))), + v = h.H9.onDidChange((() => { + const t = h.H9.all(e); + (0, n.fS)(t, m) || p.cancel() + })); + return Promise.all(b).then((e => { + const t = (0, n.xH)(e.map((e => e.actions))), + i = (0, n.kX)(e.map((e => e.documentation))); + return new S(t, i, _) + })).finally((() => { + v.dispose(), p.dispose() + })) + } + m.P.registerCommand("_executeCodeActionProvider", (function(e, t, i, n, s) { + return f(this, void 0, void 0, (function*() { + if (!(t instanceof a.o)) throw (0, r.b1)(); + const l = e.get(u.q).getModel(t); + if (!l) throw (0, r.b1)(); + const h = c.Y.isISelection(i) ? c.Y.liftSelection(i) : d.e.isIRange( + i) ? l.validateRange(i) : void 0; + if (!h) throw (0, r.b1)(); + const m = "string" == typeof n ? new g.yN(n) : void 0, + f = yield k(l, h, { + type: 1, + filter: { + includeSourceActions: !0, + include: m + } + }, p.E.None, o.T.None), + _ = [], + b = Math.min(f.validActions.length, "number" == typeof s ? s : 0); + for (let e = 0; e < b; e++) _.push(f.validActions[e].resolve(o.T.None)); + try { + return yield Promise.all(_), f.validActions.map((e => e.action)) + } finally { + setTimeout((() => f.dispose()), 100) + } + })) + })) + }, + 787: (e, t, i) => { + "use strict"; + i.d(t, { + S5: () => Ee, + dW: () => xe, + Hv: () => De, + o$: () => Ne, + E7: () => Se, + pY: () => we, + Eb: () => ke, + VQ: () => Le + }); + var n = i(1050); + class o { + constructor(e) { + this.executor = e, this._didRun = !1 + } + getValue() { + if (!this._didRun) try { + this._value = this.executor() + } catch (e) { + this._error = e + } finally { + this._didRun = !0 + } + if (this._error) throw this._error; + return this._value + } + get rawValue() { + return this._value + } + } + var r = i(5976), + s = i(7295), + a = i(6830), + l = i(6007), + d = i(9102), + c = i(1907), + h = i(7301), + u = i(845), + g = i(2065), + p = i(5321), + m = i(4741), + f = i(187), + _ = i(4101), + b = i(9532), + v = i(5606), + w = i(1847), + C = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + class y extends m.aU { + constructor(e, t) { + super(e.command ? e.command.id : e.title, e.title.replace( + /\r\n|\r|\n/g, " "), void 0, !e.disabled, t), this.action = e + } + } + let S = class extends r.JT { + constructor(e, t, i, n) { + super(), this._editor = e, this._delegate = t, this._contextMenuService = + i, this._visible = !1, this._showingActions = this._register(new r.XK), + this._keybindingResolver = new x({ + getKeybindings: () => n.getKeybindings() + }) + } + get isVisible() { + return this._visible + } + show(e, t, i, n) { + return o = this, r = void 0, a = function*() { + const o = n.includeDisabledActions ? t.allActions : t.validActions; + if (!o.length) return void(this._visible = !1); + if (!this._editor.getDomNode()) throw this._visible = !1, (0, h.F0) + (); + this._visible = !0, this._showingActions.value = t; + const r = this.getMenuActions(e, o, t.documentation), + s = f.L.isIPosition(i) ? this._toCoords(i) : i || { + x: 0, + y: 0 + }, + a = this._keybindingResolver.getResolver(), + l = this._editor.getOption(114); + this._contextMenuService.showContextMenu({ + domForShadowRoot: l ? this._editor.getDomNode() : void 0, + getAnchor: () => s, + getActions: () => r, + onHide: () => { + this._visible = !1, this._editor.focus() + }, + autoSelectFirstItem: !0, + getKeyBinding: e => e instanceof y ? a(e.action) : void 0 + }) + }, new((s = void 0) || (s = Promise))((function(e, t) { + function i(e) { + try { + l(a.next(e)) + } catch (e) { + t(e) + } + } + + function n(e) { + try { + l(a.throw(e)) + } catch (e) { + t(e) + } + } + + function l(t) { + var o; + t.done ? e(t.value) : (o = t.value, o instanceof s ? o : new s(( + function(e) { + e(o) + }))).then(i, n) + } + l((a = a.apply(o, r || [])).next()) + })); + var o, r, s, a + } + getMenuActions(e, t, i) { + var n, o; + const r = e => new y(e.action, (() => this._delegate.onSelectCodeAction( + e))), + s = t.map(r), + a = [...i], + l = this._editor.getModel(); + if (l && s.length) + for (const i of _.H9.all(l)) i._getAdditionalMenuItems && a.push(...i + ._getAdditionalMenuItems({ + trigger: e.type, + only: null === (o = null === (n = e.filter) || void 0 === n ? + void 0 : n.include) || void 0 === o ? void 0 : o.value + }, t.map((e => e.action)))); + return a.length && s.push(new m.Z0, ...a.map((e => r(new c.bA({ + title: e.title, + command: e + }, void 0))))), s + } + _toCoords(e) { + if (!this._editor.hasModel()) return { + x: 0, + y: 0 + }; + this._editor.revealPosition(e, 1), this._editor.render(); + const t = this._editor.getScrolledVisiblePosition(e), + i = (0, p.i)(this._editor.getDomNode()); + return { + x: i.left + t.left, + y: i.top + t.top + t.height + } + } + }; + S = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([C(2, v.i), C(3, w.d)], S); + class x { + constructor(e) { + this._keybindingProvider = e + } + getResolver() { + const e = new o((() => this._keybindingProvider.getKeybindings().filter( + (e => x.codeActionCommands.indexOf(e.command) >= 0)).filter((e => + e.resolvedKeybinding)).map((e => { + let t = e.commandArgs; + return e.command === c.uH ? t = { + kind: b.yN.SourceOrganizeImports.value + } : e.command === c.TM && (t = { + kind: b.yN.SourceFixAll.value + }), Object.assign({ + resolvedKeybinding: e.resolvedKeybinding + }, b.wZ.fromUser(t, { + kind: b.yN.None, + apply: "never" + })) + })))); + return t => { + if (t.kind) { + const i = this.bestKeybindingForCodeAction(t, e.getValue()); + return null == i ? void 0 : i.resolvedKeybinding + } + } + } + bestKeybindingForCodeAction(e, t) { + if (!e.kind) return; + const i = new b.yN(e.kind); + return t.filter((e => e.kind.contains(i))).filter((t => !t.preferred || + e.isPreferred)).reduceRight(((e, t) => e ? e.kind.contains(t.kind) ? + t : e : t), void 0) + } + } + x.codeActionCommands = [c.Bb, c.RB, c.MN, c.uH, c.TM]; + var k = i(7974), + L = i(4669), + N = i(3379), + D = i.n(N), + E = i(7795), + I = i.n(E), + T = i(569), + M = i.n(T), + A = i(3565), + R = i.n(A), + O = i(9216), + P = i.n(O), + F = i(4589), + B = i.n(F), + W = i(4754), + z = {}; + z.styleTagTransform = B(), z.setAttributes = R(), z.insert = M().bind( + null, "head"), z.domAPI = I(), z.insertStyleElement = P(), D()(W.Z, z), + W.Z && W.Z.locals && W.Z.locals; + var V, H = i(6281), + U = i(3580), + j = i(7781), + K = i(3910), + $ = i(553), + q = i(3046); + ! function(e) { + e.Hidden = { + type: 0 + }, e.Showing = class { + constructor(e, t, i, n) { + this.actions = e, this.trigger = t, this.editorPosition = i, this.widgetPosition = + n, this.type = 1 + } + } + }(V || (V = {})); + let Z = class e extends r.JT { + constructor(e, t, i, n) { + super(), this._editor = e, this._quickFixActionId = t, this._preferredFixActionId = + i, this._keybindingService = n, this._onClick = this._register(new L + .Q5), this.onClick = this._onClick.event, this._state = V.Hidden, + this._domNode = document.createElement("div"), this._domNode.className = + q.lA.lightBulb.classNames, this._editor.addContentWidget(this), this + ._register(this._editor.onDidChangeModelContent((e => { + const t = this._editor.getModel(); + (1 !== this.state.type || !t || this.state.editorPosition.lineNumber >= + t.getLineCount()) && this.hide() + }))), $.o.ignoreTarget(this._domNode), this._register(p.Gw(this._domNode, ( + e => { + if (1 !== this.state.type) return; + this._editor.focus(), e.preventDefault(); + const { + top: t, + height: i + } = p.i(this._domNode), n = this._editor.getOption(58); + let o = Math.floor(n / 3); + null !== this.state.widgetPosition.position && this.state.widgetPosition + .position.lineNumber < this.state.editorPosition.lineNumber && + (o += n), this._onClick.fire({ + x: e.posx, + y: t + i + o, + actions: this.state.actions, + trigger: this.state.trigger + }) + }))), this._register(p.nm(this._domNode, "mouseenter", (e => { + if (1 != (1 & e.buttons)) return; + this.hide(); + const t = new k.Z; + t.startMonitoring(e.target, e.buttons, k.e, (() => {}), (() => { + t.dispose() + })) + }))), this._register(this._editor.onDidChangeConfiguration((e => { + e.hasChanged(56) && !this._editor.getOption(56).enabled && this.hide() + }))), this._updateLightBulbTitleAndIcon(), this._register(this._keybindingService + .onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon, this)) + } + dispose() { + super.dispose(), this._editor.removeContentWidget(this) + } + getId() { + return "LightBulbWidget" + } + getDomNode() { + return this._domNode + } + getPosition() { + return 1 === this._state.type ? this._state.widgetPosition : null + } + update(t, i, n) { + if (t.validActions.length <= 0) return this.hide(); + const o = this._editor.getOptions(); + if (!o.get(56).enabled) return this.hide(); + const r = this._editor.getModel(); + if (!r) return this.hide(); + const { + lineNumber: s, + column: a + } = r.validatePosition(n), l = r.getOptions().tabSize, d = o.get(42), + c = r.getLineContent(s), h = H.yO.computeIndentLevel(c, l), u = e => + e > 2 && this._editor.getTopForLineNumber(e) === this._editor.getTopForLineNumber( + e - 1); + let g = s; + if (!(d.spaceWidth * h > 22)) + if (s > 1 && !u(s - 1)) g -= 1; + else if (u(s + 1)) { + if (a * d.spaceWidth < 22) return this.hide() + } else g += 1; + this.state = new V.Showing(t, i, n, { + position: { + lineNumber: g, + column: 1 + }, + preference: e._posPref + }), this._editor.layoutContentWidget(this) + } + hide() { + this.state = V.Hidden, this._editor.layoutContentWidget(this) + } + get state() { + return this._state + } + set state(e) { + this._state = e, this._updateLightBulbTitleAndIcon() + } + _updateLightBulbTitleAndIcon() { + if (1 === this.state.type && this.state.actions.hasAutoFix) { + this._domNode.classList.remove(...q.lA.lightBulb.classNamesArray), + this._domNode.classList.add(...q.lA.lightbulbAutofix.classNamesArray); + const e = this._keybindingService.lookupKeybinding(this._preferredFixActionId); + if (e) return void(this.title = U.N("preferredcodeActionWithKb", + "Show Code Actions. Preferred Quick Fix Available ({0})", e.getLabel() + )) + } + this._domNode.classList.remove(...q.lA.lightbulbAutofix.classNamesArray), + this._domNode.classList.add(...q.lA.lightBulb.classNamesArray); + const e = this._keybindingService.lookupKeybinding(this._quickFixActionId); + this.title = e ? U.N("codeActionWithKb", "Show Code Actions ({0})", e + .getLabel()) : U.N("codeAction", "Show Code Actions") + } + set title(e) { + this._domNode.title = e + } + }; + var G, Y; + Z._posPref = [0], Z = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(G = 3, Y = w.d, function(e, t) { + Y(e, t, G) + })], Z), (0, j.Ic)(((e, t) => { + var i; + const n = null === (i = e.getColor(K.cv)) || void 0 === i ? void 0 : + i.transparent(.7), + o = e.getColor(K.Fu); + o && t.addRule( + `\n\t\t.monaco-editor .contentWidgets ${q.lA.lightBulb.cssSelector} {\n\t\t\tcolor: ${o};\n\t\t\tbackground-color: ${n};\n\t\t}` + ); + const r = e.getColor(K.sK); + r && t.addRule( + `\n\t\t.monaco-editor .contentWidgets ${q.lA.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${r};\n\t\t\tbackground-color: ${n};\n\t\t}` + ) + })); + var Q, X = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + let J = class extends r.JT { + constructor(e, t, i, n, s) { + super(), this._editor = e, this.delegate = n, this._activeCodeActions = + this._register(new r.XK), Q.set(this, !1), this._codeActionWidget = + new o((() => this._register(s.createInstance(S, this._editor, { + onSelectCodeAction: e => X(this, void 0, void 0, (function*() { + this.delegate.applyCodeAction(e, !0) + })) + })))), this._lightBulbWidget = new o((() => { + const e = this._register(s.createInstance(Z, this._editor, t, i)); + return this._register(e.onClick((e => this.showCodeActionList(e.trigger, + e.actions, e, { + includeDisabledActions: !1 + })))), e + })) + } + dispose() { + (function(e, t, i, n, o) { + if ("m" === n) throw new TypeError("Private method is not writable"); + if ("a" === n && !o) throw new TypeError( + "Private accessor was defined without a setter"); + if ("function" == typeof t ? e !== t || !o : !t.has(e)) throw new TypeError( + "Cannot write private member to an object whose class did not declare it" + ); + "a" === n ? o.call(e, i) : o ? o.value = i : t.set(e, i) + })(this, Q, !0, "f"), super.dispose() + } + update(e) { + var t, i, n; + return X(this, void 0, void 0, (function*() { + if (1 !== e.type) return void(null === (t = this._lightBulbWidget + .rawValue) || void 0 === t || t.hide()); + let o; + try { + o = yield e.actions + } catch (e) { + return void(0, h.dL)(e) + } + if (! function(e, t, i, n) { + if ("a" === i && !n) throw new TypeError( + "Private accessor was defined without a getter"); + if ("function" == typeof t ? e !== t || !n : !t.has(e)) throw new TypeError( + "Cannot read private member from an object whose class did not declare it" + ); + return "m" === i ? n : "a" === i ? n.call(e) : n ? n.value : t.get( + e) + }(this, Q, "f")) + if (this._lightBulbWidget.getValue().update(o, e.trigger, e.position), + 1 === e.trigger.type) { + if (null === (i = e.trigger.filter) || void 0 === i ? void 0 : + i.include) { + const t = this.tryGetValidActionToApply(e.trigger, o); + if (t) { + try { + yield this.delegate.applyCodeAction(t, !1) + } finally { + o.dispose() + } + return + } + if (e.trigger.context) { + const t = this.getInvalidActionThatWouldHaveBeenApplied(e.trigger, + o); + if (t && t.action.disabled) return u.O.get(this._editor).showMessage( + t.action.disabled, e.trigger.context.position), void o.dispose() + } + } + const t = !!(null === (n = e.trigger.filter) || void 0 === n ? + void 0 : n.include); + if (e.trigger.context && (!o.allActions.length || !t && !o.validActions + .length)) return u.O.get(this._editor).showMessage(e.trigger.context + .notAvailableMessage, e.trigger.context.position), this._activeCodeActions + .value = o, void o.dispose(); + this._activeCodeActions.value = o, this._codeActionWidget.getValue() + .show(e.trigger, o, e.position, { + includeDisabledActions: t + }) + } else this._codeActionWidget.getValue().isVisible ? o.dispose() : + this._activeCodeActions.value = o + })) + } + getInvalidActionThatWouldHaveBeenApplied(e, t) { + if (t.allActions.length) return "first" === e.autoApply && 0 === t.validActions + .length || "ifSingle" === e.autoApply && 1 === t.allActions.length ? + t.allActions.find((({ + action: e + }) => e.disabled)) : void 0 + } + tryGetValidActionToApply(e, t) { + if (t.validActions.length) return "first" === e.autoApply && t.validActions + .length > 0 || "ifSingle" === e.autoApply && 1 === t.validActions.length ? + t.validActions[0] : void 0 + } + showCodeActionList(e, t, i, n) { + return X(this, void 0, void 0, (function*() { + this._codeActionWidget.getValue().show(e, t, i, n) + })) + } + }; + Q = new WeakMap, J = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([function(e, t) { + return function(i, n) { + t(i, n, e) + } + }(4, g.TG)], J); + var ee, te = i(4565), + ie = i(8819), + ne = i(8674), + oe = i(9422), + re = i(535), + se = i(829), + ae = i(5393), + le = i(5935), + de = i(4314), + ce = function(e, t, i, n) { + if ("a" === i && !n) throw new TypeError( + "Private accessor was defined without a getter"); + if ("function" == typeof t ? e !== t || !n : !t.has(e)) throw new TypeError( + "Cannot read private member from an object whose class did not declare it" + ); + return "m" === i ? n : "a" === i ? n.call(e) : n ? n.value : t.get(e) + }; + const he = new ie.uy("supportedCodeAction", ""); + class ue extends r.JT { + constructor(e, t, i, n = 250) { + super(), this._editor = e, this._markerService = t, this._signalChange = + i, this._delay = n, this._autoTriggerTimer = this._register(new ae._F), + this._register(this._markerService.onMarkerChanged((e => this._onMarkerChanges( + e)))), this._register(this._editor.onDidChangeCursorPosition((() => + this._onCursorChange()))) + } + trigger(e) { + const t = this._getRangeOfSelectionUnlessWhitespaceEnclosed(e); + return this._createEventAndSignalChange(e, t) + } + _onMarkerChanges(e) { + const t = this._editor.getModel(); + t && e.some((e => (0, le.Xy)(e, t.uri))) && this._autoTriggerTimer.cancelAndSet( + (() => { + this.trigger({ + type: 2 + }) + }), this._delay) + } + _onCursorChange() { + this._autoTriggerTimer.cancelAndSet((() => { + this.trigger({ + type: 2 + }) + }), this._delay) + } + _getRangeOfMarker(e) { + const t = this._editor.getModel(); + if (t) + for (const i of this._markerService.read({ + resource: t.uri + })) { + const n = t.validateRange(i); + if (de.e.intersectRanges(n, e)) return de.e.lift(n) + } + } + _getRangeOfSelectionUnlessWhitespaceEnclosed(e) { + if (!this._editor.hasModel()) return; + const t = this._editor.getModel(), + i = this._editor.getSelection(); + if (i.isEmpty() && 2 === e.type) { + const { + lineNumber: e, + column: n + } = i.getPosition(), o = t.getLineContent(e); + if (0 === o.length) return; + if (1 === n) { + if (/\s/.test(o[0])) return + } else if (n === t.getLineMaxColumn(e)) { + if (/\s/.test(o[o.length - 1])) return + } else if (/\s/.test(o[n - 2]) && /\s/.test(o[n - 1])) return + } + return i + } + _createEventAndSignalChange(e, t) { + const i = this._editor.getModel(); + if (!t || !i) return void this._signalChange(void 0); + const n = this._getRangeOfMarker(t), + o = n ? n.getStartPosition() : t.getStartPosition(), + r = { + trigger: e, + selection: t, + position: o + }; + return this._signalChange(r), r + } + } + var ge; + ! function(e) { + e.Empty = { + type: 0 + }, e.Triggered = class { + constructor(e, t, i, n) { + this.trigger = e, this.rangeOrSelection = t, this.position = i, this + ._cancellablePromise = n, this.type = 1, this.actions = n.catch((e => { + if ((0, h.VV)(e)) return pe; + throw e + })) + } + cancel() { + this._cancellablePromise.cancel() + } + } + }(ge || (ge = {})); + const pe = { + allActions: [], + validActions: [], + dispose: () => {}, + documentation: [], + hasAutoFix: !1 + }; + class me extends r.JT { + constructor(e, t, i, n) { + super(), this._editor = e, this._markerService = t, this._progressService = + n, this._codeActionOracle = this._register(new r.XK), this._state = + ge.Empty, this._onDidChangeState = this._register(new L.Q5), this.onDidChangeState = + this._onDidChangeState.event, ee.set(this, !1), this._supportedCodeActions = + he.bindTo(i), this._register(this._editor.onDidChangeModel((() => + this._update()))), this._register(this._editor.onDidChangeModelLanguage( + (() => this._update()))), this._register(_.H9.onDidChange((() => + this._update()))), this._update() + } + dispose() { + ce(this, ee, "f") || (function(e, t, i, n, o) { + if ("m" === n) throw new TypeError( + "Private method is not writable"); + if ("a" === n && !o) throw new TypeError( + "Private accessor was defined without a setter"); + if ("function" == typeof t ? e !== t || !o : !t.has(e)) throw new TypeError( + "Cannot write private member to an object whose class did not declare it" + ); + "a" === n ? o.call(e, i) : o ? o.value = i : t.set(e, i) + }(this, ee, !0, "f"), super.dispose(), this.setState(ge.Empty, !0)) + } + _update() { + if (ce(this, ee, "f")) return; + this._codeActionOracle.value = void 0, this.setState(ge.Empty); + const e = this._editor.getModel(); + if (e && _.H9.has(e) && !this._editor.getOption(80)) { + const t = []; + for (const i of _.H9.all(e)) Array.isArray(i.providedCodeActionKinds) && + t.push(...i.providedCodeActionKinds); + this._supportedCodeActions.set(t.join(" ")), this._codeActionOracle.value = + new ue(this._editor, this._markerService, (t => { + var i; + if (!t) return void this.setState(ge.Empty); + const n = (0, ae.PG)((i => (0, c.aI)(e, t.selection, t.trigger, + re.E.None, i))); + 1 === t.trigger.type && (null === (i = this._progressService) || + void 0 === i || i.showWhile(n, 250)), this.setState(new ge.Triggered( + t.trigger, t.selection, t.position, n)) + }), void 0), this._codeActionOracle.value.trigger({ + type: 2 + }) + } else this._supportedCodeActions.reset() + } + trigger(e) { + this._codeActionOracle.value && this._codeActionOracle.value.trigger( + e) + } + setState(e, t) { + e !== this._state && (1 === this._state.type && this._state.cancel(), + this._state = e, t || ce(this, ee, "f") || this._onDidChangeState.fire( + e)) + } + } + ee = new WeakMap; + var fe = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + _e = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + + function be(e) { + return ie.Ao.regex(he.keys()[0], new RegExp("(\\s|^)" + (0, s.ec)(e.value) + + "\\b")) + } + const ve = { + type: "object", + defaultSnippets: [{ + body: { + kind: "" + } + }], + properties: { + kind: { + type: "string", + description: U.N("args.schema.kind", + "Kind of the code action to run.") + }, + apply: { + type: "string", + description: U.N("args.schema.apply", + "Controls when the returned actions are applied."), + default: "ifSingle", + enum: ["first", "ifSingle", "never"], + enumDescriptions: [U.N("args.schema.apply.first", + "Always apply the first returned code action."), U.N( + "args.schema.apply.ifSingle", + "Apply the first returned code action if it is the only one."), U.N( + "args.schema.apply.never", + "Do not apply the returned code actions.")] + }, + preferred: { + type: "boolean", + default: !1, + description: U.N("args.schema.preferred", + "Controls if only preferred code actions should be returned.") + } + } + }; + let we = class e extends r.JT { + constructor(e, t, i, n, r) { + super(), this._instantiationService = r, this._editor = e, this._model = + this._register(new me(this._editor, t, i, n)), this._register(this._model + .onDidChangeState((e => this.update(e)))), this._ui = new o((() => + this._register(new J(e, Se.Id, Ee.Id, { + applyCodeAction: (e, t) => _e(this, void 0, void 0, (function*() { + try { + yield this._applyCodeAction(e) + } finally { + t && this._trigger({ + type: 2, + filter: {} + }) + } + })) + }, this._instantiationService)))) + } + static get(t) { + return t.getContribution(e.ID) + } + update(e) { + this._ui.getValue().update(e) + } + showCodeActions(e, t, i) { + return this._ui.getValue().showCodeActionList(e, t, i, { + includeDisabledActions: !1 + }) + } + manualTriggerAtCurrentPosition(e, t, i) { + if (!this._editor.hasModel()) return; + u.O.get(this._editor).closeMessage(); + const n = this._editor.getPosition(); + this._trigger({ + type: 1, + filter: t, + autoApply: i, + context: { + notAvailableMessage: e, + position: n + } + }) + } + _trigger(e) { + return this._model.trigger(e) + } + _applyCodeAction(e) { + return this._instantiationService.invokeFunction(Ce, e, this._editor) + } + }; + + function Ce(e, t, i) { + return _e(this, void 0, void 0, (function*() { + const o = e.get(l.vu), + r = e.get(te.H), + s = e.get(se.b), + a = e.get(oe.lT); + if (s.publicLog2("codeAction.applyCodeAction", { + codeActionTitle: t.action.title, + codeActionKind: t.action.kind, + codeActionIsPreferred: !!t.action.isPreferred + }), yield t.resolve(n.T.None), t.action.edit && (yield o.apply(l.fo + .convert(t.action.edit), { + editor: i, + label: t.action.title + })), t.action.command) try { + yield r.executeCommand(t.action.command.id, ...t.action.command.arguments || []) + } catch (e) { + const t = function(e) { + return "string" == typeof e ? e : e instanceof Error && "string" == + typeof e.message ? e.message : void 0 + }(e); + a.error("string" == typeof t ? t : U.N("applyCodeActionFailed", + "An unknown error occurred while applying the code action")) + } + })) + } + + function ye(e, t, i, n) { + if (e.hasModel()) { + const o = we.get(e); + o && o.manualTriggerAtCurrentPosition(t, i, n) + } + } + we.ID = "editor.contrib.quickFixController", we = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([fe(1, ne.lT), fe(2, ie.i6), fe(3, re.e), fe(4, g.TG)], we); + class Se extends a.R6 { + constructor() { + super({ + id: Se.Id, + label: U.N("quickfix.trigger.label", "Quick Fix..."), + alias: "Quick Fix...", + precondition: ie.Ao.and(d.u.writable, d.u.hasCodeActionsProvider), + kbOpts: { + kbExpr: d.u.editorTextFocus, + primary: 2132, + weight: 100 + } + }) + } + run(e, t) { + return ye(t, U.N("editor.action.quickFix.noneMessage", + "No code actions available"), void 0, void 0) + } + } + Se.Id = "editor.action.quickFix"; + class xe extends a._l { + constructor() { + super({ + id: c.RB, + precondition: ie.Ao.and(d.u.writable, d.u.hasCodeActionsProvider), + description: { + description: "Trigger a code action", + args: [{ + name: "args", + schema: ve + }] + } + }) + } + runEditorCommand(e, t, i) { + const n = b.wZ.fromUser(i, { + kind: b.yN.Empty, + apply: "ifSingle" + }); + return ye(t, "string" == typeof(null == i ? void 0 : i.kind) ? n.preferred ? + U.N("editor.action.codeAction.noneMessage.preferred.kind", + "No preferred code actions for '{0}' available", i.kind) : U.N( + "editor.action.codeAction.noneMessage.kind", + "No code actions for '{0}' available", i.kind) : n.preferred ? U.N( + "editor.action.codeAction.noneMessage.preferred", + "No preferred code actions available") : U.N( + "editor.action.codeAction.noneMessage", + "No code actions available"), { + include: n.kind, + includeSourceActions: !0, + onlyIncludePreferredActions: n.preferred + }, n.apply) + } + } + class ke extends a.R6 { + constructor() { + super({ + id: c.Bb, + label: U.N("refactor.label", "Refactor..."), + alias: "Refactor...", + precondition: ie.Ao.and(d.u.writable, d.u.hasCodeActionsProvider), + kbOpts: { + kbExpr: d.u.editorTextFocus, + primary: 3120, + mac: { + primary: 1328 + }, + weight: 100 + }, + contextMenuOpts: { + group: "1_modification", + order: 2, + when: ie.Ao.and(d.u.writable, be(b.yN.Refactor)) + }, + description: { + description: "Refactor...", + args: [{ + name: "args", + schema: ve + }] + } + }) + } + run(e, t, i) { + const n = b.wZ.fromUser(i, { + kind: b.yN.Refactor, + apply: "never" + }); + return ye(t, "string" == typeof(null == i ? void 0 : i.kind) ? n.preferred ? + U.N("editor.action.refactor.noneMessage.preferred.kind", + "No preferred refactorings for '{0}' available", i.kind) : U.N( + "editor.action.refactor.noneMessage.kind", + "No refactorings for '{0}' available", i.kind) : n.preferred ? U.N( + "editor.action.refactor.noneMessage.preferred", + "No preferred refactorings available") : U.N( + "editor.action.refactor.noneMessage", "No refactorings available"), { + include: b.yN.Refactor.contains(n.kind) ? n.kind : b.yN.None, + onlyIncludePreferredActions: n.preferred + }, n.apply) + } + } + class Le extends a.R6 { + constructor() { + super({ + id: c.MN, + label: U.N("source.label", "Source Action..."), + alias: "Source Action...", + precondition: ie.Ao.and(d.u.writable, d.u.hasCodeActionsProvider), + contextMenuOpts: { + group: "1_modification", + order: 2.1, + when: ie.Ao.and(d.u.writable, be(b.yN.Source)) + }, + description: { + description: "Source Action...", + args: [{ + name: "args", + schema: ve + }] + } + }) + } + run(e, t, i) { + const n = b.wZ.fromUser(i, { + kind: b.yN.Source, + apply: "never" + }); + return ye(t, "string" == typeof(null == i ? void 0 : i.kind) ? n.preferred ? + U.N("editor.action.source.noneMessage.preferred.kind", + "No preferred source actions for '{0}' available", i.kind) : U.N( + "editor.action.source.noneMessage.kind", + "No source actions for '{0}' available", i.kind) : n.preferred ? U + .N("editor.action.source.noneMessage.preferred", + "No preferred source actions available") : U.N( + "editor.action.source.noneMessage", "No source actions available"), { + include: b.yN.Source.contains(n.kind) ? n.kind : b.yN.None, + includeSourceActions: !0, + onlyIncludePreferredActions: n.preferred + }, n.apply) + } + } + class Ne extends a.R6 { + constructor() { + super({ + id: c.uH, + label: U.N("organizeImports.label", "Organize Imports"), + alias: "Organize Imports", + precondition: ie.Ao.and(d.u.writable, be(b.yN.SourceOrganizeImports)), + kbOpts: { + kbExpr: d.u.editorTextFocus, + primary: 1581, + weight: 100 + } + }) + } + run(e, t) { + return ye(t, U.N("editor.action.organize.noneMessage", + "No organize imports action available"), { + include: b.yN.SourceOrganizeImports, + includeSourceActions: !0 + }, "ifSingle") + } + } + class De extends a.R6 { + constructor() { + super({ + id: c.TM, + label: U.N("fixAll.label", "Fix All"), + alias: "Fix All", + precondition: ie.Ao.and(d.u.writable, be(b.yN.SourceFixAll)) + }) + } + run(e, t) { + return ye(t, U.N("fixAll.noneMessage", "No fix all action available"), { + include: b.yN.SourceFixAll, + includeSourceActions: !0 + }, "ifSingle") + } + } + class Ee extends a.R6 { + constructor() { + super({ + id: Ee.Id, + label: U.N("autoFix.label", "Auto Fix..."), + alias: "Auto Fix...", + precondition: ie.Ao.and(d.u.writable, be(b.yN.QuickFix)), + kbOpts: { + kbExpr: d.u.editorTextFocus, + primary: 1620, + mac: { + primary: 2644 + }, + weight: 100 + } + }) + } + run(e, t) { + return ye(t, U.N("editor.action.autoFix.noneMessage", + "No auto fixes available"), { + include: b.yN.QuickFix, + onlyIncludePreferredActions: !0 + }, "ifSingle") + } + } + Ee.Id = "editor.action.autoFix" + }, + 9093: (e, t, i) => { + "use strict"; + i.r(t); + var n = i(6830), + o = i(787); + (0, n._K)(o.pY.ID, o.pY), (0, n.Qr)(o.E7), (0, n.Qr)(o.Eb), (0, n.Qr)(o.VQ), ( + 0, n.Qr)(o.o$), (0, n.Qr)(o.S5), (0, n.Qr)(o.Hv), (0, n.fK)(new o.dW) + }, + 9532: (e, t, i) => { + "use strict"; + i.d(t, { + yN: () => n, + EU: () => o, + Yl: () => r, + wZ: () => a + }); + class n { + constructor(e) { + this.value = e + } + equals(e) { + return this.value === e.value + } + contains(e) { + return this.equals(e) || "" === this.value || e.value.startsWith(this.value + + n.sep) + } + intersects(e) { + return this.contains(e) || e.contains(this) + } + append(e) { + return new n(this.value + n.sep + e) + } + } + + function o(e, t) { + return !(e.include && !e.include.intersects(t) || e.excludes && e.excludes + .some((i => s(t, i, e.include))) || !e.includeSourceActions && n.Source + .contains(t)) + } + + function r(e, t) { + const i = t.kind ? new n(t.kind) : void 0; + return !(!(!e.include || i && e.include.contains(i)) || e.excludes && i && + e.excludes.some((t => s(i, t, e.include))) || !e.includeSourceActions && + i && n.Source.contains(i) || e.onlyIncludePreferredActions && !t.isPreferred + ) + } + + function s(e, t, i) { + return !(!t.contains(e) || i && t.contains(i)) + } + n.sep = ".", n.None = new n("@@none@@"), n.Empty = new n(""), n.QuickFix = + new n("quickfix"), n.Refactor = new n("refactor"), n.Source = new n( + "source"), n.SourceOrganizeImports = n.Source.append("organizeImports"), + n.SourceFixAll = n.Source.append("fixAll"); + class a { + constructor(e, t, i) { + this.kind = e, this.apply = t, this.preferred = i + } + static fromUser(e, t) { + return e && "object" == typeof e ? new a(a.getKindFromUser(e, t.kind), + a.getApplyFromUser(e, t.apply), a.getPreferredUser(e)) : new a(t.kind, + t.apply, !1) + } + static getApplyFromUser(e, t) { + switch ("string" == typeof e.apply ? e.apply.toLowerCase() : "") { + case "first": + return "first"; + case "never": + return "never"; + case "ifsingle": + return "ifSingle"; + default: + return t + } + } + static getKindFromUser(e, t) { + return "string" == typeof e.kind ? new n(e.kind) : t + } + static getPreferredUser(e) { + return "boolean" == typeof e.preferred && e.preferred + } + } + }, + 8191: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + CodeLensContribution: () => re + }); + var n = i(5393), + o = i(7301), + r = i(5976), + s = i(9925), + a = i(6830), + l = i(4101), + d = i(1050), + c = i(666), + h = i(1200), + u = i(4565), + g = i(8401), + p = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class m { + constructor() { + this.lenses = [], this._disposables = new r.SL + } + dispose() { + this._disposables.dispose() + } + add(e, t) { + this._disposables.add(e); + for (const i of e.lenses) this.lenses.push({ + symbol: i, + provider: t + }) + } + } + + function f(e, t) { + return p(this, void 0, void 0, (function*() { + const i = l.He.ordered(e), + n = new Map, + r = new m, + s = i.map(((i, s) => p(this, void 0, void 0, (function*() { + n.set(i, s); + try { + const n = yield Promise.resolve(i.provideCodeLenses(e, t)); + n && r.add(n, i) + } catch (e) { + (0, o.Cp)(e) + } + })))); + return yield Promise.all(s), r.lenses = r.lenses.sort(((e, t) => e.symbol + .range.startLineNumber < t.symbol.range.startLineNumber ? -1 : e.symbol + .range.startLineNumber > t.symbol.range.startLineNumber ? 1 : n.get( + e.provider) < n.get(t.provider) ? -1 : n.get(e.provider) > n.get( + t.provider) ? 1 : e.symbol.range.startColumn < t.symbol.range.startColumn ? + -1 : e.symbol.range.startColumn > t.symbol.range.startColumn ? 1 : + 0)), r + })) + } + u.P.registerCommand("_executeCodeLensProvider", (function(e, ...t) { + let [i, n] = t; + (0, g.p_)(c.o.isUri(i)), (0, g.p_)("number" == typeof n || !n); + const s = e.get(h.q).getModel(i); + if (!s) throw (0, o.b1)(); + const a = [], + l = new r.SL; + return f(s, d.T.None).then((e => { + l.add(e); + let t = []; + for (const i of e.lenses) null == n || Boolean(i.symbol.command) ? + a.push(i.symbol) : n-- > 0 && i.provider.resolveCodeLens && t.push( + Promise.resolve(i.provider.resolveCodeLens(s, i.symbol, d.T.None)) + .then((e => a.push(e || i.symbol)))); + return Promise.all(t) + })).then((() => a)).finally((() => { + setTimeout((() => l.dispose()), 100) + })) + })); + var _ = i(3379), + b = i.n(_), + v = i(7795), + w = i.n(v), + C = i(569), + y = i.n(C), + S = i(3565), + x = i.n(S), + k = i(9216), + L = i.n(k), + N = i(4589), + D = i.n(N), + E = i(5674), + I = {}; + I.styleTagTransform = D(), I.setAttributes = x(), I.insert = y().bind( + null, "head"), I.domAPI = w(), I.insertStyleElement = L(), b()(E.Z, I), + E.Z && E.Z.locals && E.Z.locals; + var T = i(5321), + M = i(4314), + A = i(6281), + R = i(7869), + O = i(3910), + P = i(7781), + F = i(6811); + class B { + constructor(e, t, i) { + this.afterLineNumber = e, this.heightInPx = t, this._onHeight = i, + this.suppressMouseDown = !0, this.domNode = document.createElement( + "div") + } + onComputedHeight(e) { + void 0 === this._lastHeight ? this._lastHeight = e : this._lastHeight !== + e && (this._lastHeight = e, this._onHeight()) + } + } + class W { + constructor(e, t, i) { + this.allowEditorOverflow = !1, this.suppressMouseDown = !0, this._commands = + new Map, this._isEmpty = !0, this._editor = e, this._id = + "codelens.widget-" + W._idPool++, this.updatePosition(i), this._domNode = + document.createElement("span"), this._domNode.className = + `codelens-decoration ${t}` + } + withCommands(e, t) { + this._commands.clear(); + let i = [], + n = !1; + for (let t = 0; t < e.length; t++) { + const o = e[t]; + if (o && (n = !0, o.command)) { + const n = (0, F.T)(o.command.title.trim()); + o.command.id ? (i.push(T.$("a", { + id: String(t), + title: o.command.tooltip + }, ...n)), this._commands.set(String(t), o.command)) : i.push(T.$( + "span", { + title: o.command.tooltip + }, ...n)), t + 1 < e.length && i.push(T.$("span", void 0, " | ")) + } + } + n ? (T.mc(this._domNode, ...i), this._isEmpty && t && this._domNode.classList + .add("fadein"), this._isEmpty = !1) : T.mc(this._domNode, T.$("span", + void 0, "no commands")) + } + getCommand(e) { + return e.parentElement === this._domNode ? this._commands.get(e.id) : + void 0 + } + getId() { + return this._id + } + getDomNode() { + return this._domNode + } + updatePosition(e) { + const t = this._editor.getModel().getLineFirstNonWhitespaceColumn(e); + this._widgetPosition = { + position: { + lineNumber: e, + column: t + }, + preference: [1] + } + } + getPosition() { + return this._widgetPosition || null + } + } + W._idPool = 0; + class z { + constructor() { + this._removeDecorations = [], this._addDecorations = [], this._addDecorationsCallbacks = [] + } + addDecoration(e, t) { + this._addDecorations.push(e), this._addDecorationsCallbacks.push(t) + } + removeDecoration(e) { + this._removeDecorations.push(e) + } + commit(e) { + let t = e.deltaDecorations(this._removeDecorations, this._addDecorations); + for (let e = 0, i = t.length; e < i; e++) this._addDecorationsCallbacks[ + e](t[e]) + } + } + class V { + constructor(e, t, i, n, o, r, s) { + let a; + this._isDisposed = !1, this._editor = t, this._className = i, this._data = + e, this._decorationIds = []; + let l = []; + this._data.forEach(((e, t) => { + e.symbol.command && l.push(e.symbol), n.addDecoration({ + range: e.symbol.range, + options: A.qx.EMPTY + }, (e => this._decorationIds[t] = e)), a = a ? M.e.plusRange(a, e + .symbol.range) : M.e.lift(e.symbol.range) + })), this._viewZone = new B(a.startLineNumber - 1, r, s), this._viewZoneId = + o.addZone(this._viewZone), l.length > 0 && (this._createContentWidgetIfNecessary(), + this._contentWidget.withCommands(l, !1)) + } + _createContentWidgetIfNecessary() { + this._contentWidget ? this._editor.layoutContentWidget(this._contentWidget) : + (this._contentWidget = new W(this._editor, this._className, this._viewZone + .afterLineNumber + 1), this._editor.addContentWidget(this._contentWidget)) + } + dispose(e, t) { + this._decorationIds.forEach(e.removeDecoration, e), this._decorationIds = [], + t && t.removeZone(this._viewZoneId), this._contentWidget && (this._editor + .removeContentWidget(this._contentWidget), this._contentWidget = + void 0), this._isDisposed = !0 + } + isDisposed() { + return this._isDisposed + } + isValid() { + return this._decorationIds.some(((e, t) => { + const i = this._editor.getModel().getDecorationRange(e), + n = this._data[t].symbol; + return !(!i || M.e.isEmpty(n.range) !== i.isEmpty()) + })) + } + updateCodeLensSymbols(e, t) { + this._decorationIds.forEach(t.removeDecoration, t), this._decorationIds = [], + this._data = e, this._data.forEach(((e, i) => { + t.addDecoration({ + range: e.symbol.range, + options: A.qx.EMPTY + }, (e => this._decorationIds[i] = e)) + })) + } + updateHeight(e, t) { + this._viewZone.heightInPx = e, t.layoutZone(this._viewZoneId), this._contentWidget && + this._editor.layoutContentWidget(this._contentWidget) + } + computeIfNecessary(e) { + if (!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone")) + return null; + for (let t = 0; t < this._decorationIds.length; t++) { + const i = e.getDecorationRange(this._decorationIds[t]); + i && (this._data[t].symbol.range = i) + } + return this._data + } + updateCommands(e) { + this._createContentWidgetIfNecessary(), this._contentWidget.withCommands( + e, !0); + for (let t = 0; t < this._data.length; t++) { + const i = e[t]; + if (i) { + const { + symbol: e + } = this._data[t]; + e.command = i.command || e.command + } + } + } + getCommand(e) { + var t; + return null === (t = this._contentWidget) || void 0 === t ? void 0 : t + .getCommand(e) + } + getLineNumber() { + const e = this._editor.getModel().getDecorationRange(this._decorationIds[ + 0]); + return e ? e.startLineNumber : -1 + } + update(e) { + if (this.isValid()) { + const t = this._editor.getModel().getDecorationRange(this._decorationIds[ + 0]); + t && (this._viewZone.afterLineNumber = t.startLineNumber - 1, e.layoutZone( + this._viewZoneId), this._contentWidget && (this._contentWidget.updatePosition( + t.startLineNumber), this._editor.layoutContentWidget(this._contentWidget))) + } + } + getItems() { + return this._data + } + }(0, P.Ic)(((e, t) => { + const i = e.getColor(R.Yp); + i && (t.addRule(`.monaco-editor .codelens-decoration { color: ${i}; }`), + t.addRule( + `.monaco-editor .codelens-decoration .codicon { color: ${i}; }`)); + const n = e.getColor(O._Y); + n && (t.addRule( + `.monaco-editor .codelens-decoration > a:hover { color: ${n} !important; }` + ), t.addRule( + `.monaco-editor .codelens-decoration > a:hover .codicon { color: ${n} !important; }` + )) + })); + var H = i(9422), + U = i(2065), + j = i(5026), + K = i(3702), + $ = i(6904), + q = i(8289); + const Z = (0, U.yh)("ICodeLensCache"); + class G { + constructor(e, t) { + this.lineCount = e, this.data = t + } + } + let Y = class { + constructor(e) { + this._fakeProvider = new class { + provideCodeLenses() { + throw new Error("not supported") + } + }, this._cache = new K.z6(20, .75), (0, n.To)((() => e.remove( + "codelens/cache", 1))); + const t = "codelens/cache2", + i = e.get(t, 1, "{}"); + this._deserialize(i), (0, q.I)(e.onWillSaveState)((i => { + i.reason === $.fk.SHUTDOWN && e.store(t, this._serialize(), 1, 1) + })) + } + put(e, t) { + const i = t.lenses.map((e => { + var t; + return { + range: e.symbol.range, + command: e.symbol.command && { + id: "", + title: null === (t = e.symbol.command) || void 0 === t ? void 0 : t + .title + } + } + })), + n = new m; + n.add({ + lenses: i, + dispose: () => {} + }, this._fakeProvider); + const o = new G(e.getLineCount(), n); + this._cache.set(e.uri.toString(), o) + } + get(e) { + const t = this._cache.get(e.uri.toString()); + return t && t.lineCount === e.getLineCount() ? t.data : void 0 + } + delete(e) { + this._cache.delete(e.uri.toString()) + } + _serialize() { + const e = Object.create(null); + for (const [t, i] of this._cache) { + const n = new Set; + for (const e of i.data.lenses) n.add(e.symbol.range.startLineNumber); + e[t] = { + lineCount: i.lineCount, + lines: [...n.values()] + } + } + return JSON.stringify(e) + } + _deserialize(e) { + try { + const t = JSON.parse(e); + for (const e in t) { + const i = t[e], + n = []; + for (const e of i.lines) n.push({ + range: new M.e(e, 1, e, 11) + }); + const o = new m; + o.add({ + lenses: n, + dispose() {} + }, this._fakeProvider), this._cache.set(e, new G(i.lineCount, o)) + } + } catch (e) {} + } + }; + var Q, X; + Y = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(Q = 0, X = $.Uy, function(e, t) { + X(e, t, Q) + })], Y), (0, j.z)(Z, Y); + var J = i(9954), + ee = i(1157), + te = i(3580), + ie = i(9102), + ne = i(1036), + oe = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let re = class { + constructor(e, t, i, o) { + this._editor = e, this._commandService = t, this._notificationService = + i, this._codeLensCache = o, this._disposables = new r.SL, this._localToDispose = + new r.SL, this._lenses = [], this._getCodeLensModelDelays = new ne.Y( + l.He, 250, 2500), this._oldCodeLensModels = new r.SL, this._resolveCodeLensesDelays = + new ne.Y(l.He, 250, 2500), this._resolveCodeLensesScheduler = new n.pY( + (() => this._resolveCodeLensesInViewport()), this._resolveCodeLensesDelays + .min), this._disposables.add(this._editor.onDidChangeModel((() => + this._onModelChange()))), this._disposables.add(this._editor.onDidChangeModelLanguage( + (() => this._onModelChange()))), this._disposables.add(this._editor + .onDidChangeConfiguration((e => { + (e.hasChanged(42) || e.hasChanged(15) || e.hasChanged(14)) && + this._updateLensStyle(), e.hasChanged(13) && this._onModelChange() + }))), this._disposables.add(l.He.onDidChange(this._onModelChange, + this)), this._onModelChange(), this._styleClassName = "_" + (0, J.vp) + (this._editor.getId()).toString(16), this._styleElement = T.dS(T.OO( + this._editor.getContainerDomNode()) ? this._editor.getContainerDomNode() : + void 0), this._updateLensStyle() + } + dispose() { + var e; + this._localDispose(), this._disposables.dispose(), this._oldCodeLensModels + .dispose(), null === (e = this._currentCodeLensModel) || void 0 === + e || e.dispose(), this._styleElement.remove() + } + _getLayoutInfo() { + let e, t = this._editor.getOption(15); + return !t || t < 5 ? (t = .9 * this._editor.getOption(44) | 0, e = + this._editor.getOption(58)) : e = t * Math.max(1.3, this._editor.getOption( + 58) / this._editor.getOption(44)) | 0, { + codeLensHeight: e, + fontSize: t + } + } + _updateLensStyle() { + const { + codeLensHeight: e, + fontSize: t + } = this._getLayoutInfo(), i = this._editor.getOption(14), n = this._editor + .getOption(42), o = `--codelens-font-family${this._styleClassName}`, + r = `--codelens-font-features${this._styleClassName}`; + let s = + `\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(.5*t)}px; font-feature-settings: var(${r}) }\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; }\n\t\t`; + i && (s += + `.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${o})}` + ), this._styleElement.textContent = s, this._editor.getContainerDomNode() + .style.setProperty(o, null != i ? i : "inherit"), this._editor.getContainerDomNode() + .style.setProperty(r, n.fontFeatureSettings), this._editor.changeViewZones( + (t => { + for (let i of this._lenses) i.updateHeight(e, t) + })) + } + _localDispose() { + var e, t, i; + null === (e = this._getCodeLensModelPromise) || void 0 === e || e.cancel(), + this._getCodeLensModelPromise = void 0, null === (t = this._resolveCodeLensesPromise) || + void 0 === t || t.cancel(), this._resolveCodeLensesPromise = void 0, + this._localToDispose.clear(), this._oldCodeLensModels.clear(), null === + (i = this._currentCodeLensModel) || void 0 === i || i.dispose() + } + _onModelChange() { + this._localDispose(); + const e = this._editor.getModel(); + if (!e) return; + if (!this._editor.getOption(13)) return; + const t = this._codeLensCache.get(e); + if (t && this._renderCodeLensSymbols(t), !l.He.has(e)) return void(t && + this._localToDispose.add((0, n.Vg)((() => { + const i = this._codeLensCache.get(e); + t === i && (this._codeLensCache.delete(e), this._onModelChange()) + }), 3e4))); + for (const t of l.He.all(e)) + if ("function" == typeof t.onDidChange) { + let e = t.onDidChange((() => i.schedule())); + this._localToDispose.add(e) + } + const i = new n.pY((() => { + var t; + const r = Date.now(); + null === (t = this._getCodeLensModelPromise) || void 0 === t || t + .cancel(), this._getCodeLensModelPromise = (0, n.PG)((t => f(e, + t))), this._getCodeLensModelPromise.then((t => { + this._currentCodeLensModel && this._oldCodeLensModels.add( + this._currentCodeLensModel), this._currentCodeLensModel = t, + this._codeLensCache.put(e, t); + const n = this._getCodeLensModelDelays.update(e, Date.now() - + r); + i.delay = n, this._renderCodeLensSymbols(t), this._resolveCodeLensesInViewportSoon() + }), o.dL) + }), this._getCodeLensModelDelays.get(e)); + this._localToDispose.add(i), this._localToDispose.add((0, r.OF)((() => + this._resolveCodeLensesScheduler.cancel()))), this._localToDispose.add( + this._editor.onDidChangeModelContent((() => { + this._editor.changeDecorations((e => { + this._editor.changeViewZones((t => { + let i = [], + n = -1; + this._lenses.forEach((e => { + e.isValid() && n !== e.getLineNumber() ? (e.update(t), + n = e.getLineNumber()) : i.push(e) + })); + let o = new z; + i.forEach((e => { + e.dispose(o, t), this._lenses.splice(this._lenses.indexOf( + e), 1) + })), o.commit(e) + })) + })), i.schedule() + }))), this._localToDispose.add(this._editor.onDidFocusEditorWidget( + (() => { + i.schedule() + }))), this._localToDispose.add(this._editor.onDidScrollChange((e => { + e.scrollTopChanged && this._lenses.length > 0 && this._resolveCodeLensesInViewportSoon() + }))), this._localToDispose.add(this._editor.onDidLayoutChange((() => { + this._resolveCodeLensesInViewportSoon() + }))), this._localToDispose.add((0, r.OF)((() => { + if (this._editor.getModel()) { + const e = s.ZF.capture(this._editor); + this._editor.changeDecorations((e => { + this._editor.changeViewZones((t => { + this._disposeAllLenses(e, t) + })) + })), e.restore(this._editor) + } else this._disposeAllLenses(void 0, void 0) + }))), this._localToDispose.add(this._editor.onMouseDown((e => { + if (9 !== e.target.type) return; + let t = e.target.element; + if ("SPAN" === (null == t ? void 0 : t.tagName) && (t = t.parentElement), + "A" === (null == t ? void 0 : t.tagName)) + for (const e of this._lenses) { + let i = e.getCommand(t); + if (i) { + this._commandService.executeCommand(i.id, ...i.arguments || []) + .catch((e => this._notificationService.error(e))); + break + } + } + }))), i.schedule() + } + _disposeAllLenses(e, t) { + const i = new z; + for (const e of this._lenses) e.dispose(i, t); + e && i.commit(e), this._lenses.length = 0 + } + _renderCodeLensSymbols(e) { + if (!this._editor.hasModel()) return; + let t, i = this._editor.getModel().getLineCount(), + n = []; + for (let o of e.lenses) { + let e = o.symbol.range.startLineNumber; + e < 1 || e > i || (t && t[t.length - 1].symbol.range.startLineNumber === + e ? t.push(o) : (t = [o], n.push(t))) + } + const o = s.ZF.capture(this._editor), + r = this._getLayoutInfo(); + this._editor.changeDecorations((e => { + this._editor.changeViewZones((t => { + const i = new z; + let o = 0, + s = 0; + for (; s < n.length && o < this._lenses.length;) { + let e = n[s][0].symbol.range.startLineNumber, + a = this._lenses[o].getLineNumber(); + a < e ? (this._lenses[o].dispose(i, t), this._lenses.splice( + o, 1)) : a === e ? (this._lenses[o].updateCodeLensSymbols( + n[s], i), s++, o++) : (this._lenses.splice(o, 0, new V(n[s], + this._editor, this._styleClassName, i, t, r.codeLensHeight, ( + () => this._resolveCodeLensesInViewportSoon()))), o++, s++) + } + for (; o < this._lenses.length;) this._lenses[o].dispose(i, t), + this._lenses.splice(o, 1); + for (; s < n.length;) this._lenses.push(new V(n[s], this._editor, + this._styleClassName, i, t, r.codeLensHeight, (() => this._resolveCodeLensesInViewportSoon()) + )), s++; + i.commit(e) + })) + })), o.restore(this._editor) + } + _resolveCodeLensesInViewportSoon() { + this._editor.getModel() && this._resolveCodeLensesScheduler.schedule() + } + _resolveCodeLensesInViewport() { + var e; + null === (e = this._resolveCodeLensesPromise) || void 0 === e || e.cancel(), + this._resolveCodeLensesPromise = void 0; + const t = this._editor.getModel(); + if (!t) return; + const i = [], + r = []; + if (this._lenses.forEach((e => { + const n = e.computeIfNecessary(t); + n && (i.push(n), r.push(e)) + })), 0 === i.length) return; + const s = Date.now(), + a = (0, n.PG)((e => { + const n = i.map(((i, n) => { + const s = new Array(i.length), + a = i.map(((i, n) => i.symbol.command || "function" != + typeof i.provider.resolveCodeLens ? (s[n] = i.symbol, + Promise.resolve(void 0)) : Promise.resolve(i.provider.resolveCodeLens( + t, i.symbol, e)).then((e => { + s[n] = e + }), o.Cp))); + return Promise.all(a).then((() => { + e.isCancellationRequested || r[n].isDisposed() || r[n].updateCommands( + s) + })) + })); + return Promise.all(n) + })); + this._resolveCodeLensesPromise = a, this._resolveCodeLensesPromise.then( + (() => { + const e = this._resolveCodeLensesDelays.update(t, Date.now() - s); + this._resolveCodeLensesScheduler.delay = e, this._currentCodeLensModel && + this._codeLensCache.put(t, this._currentCodeLensModel), this._oldCodeLensModels + .clear(), a === this._resolveCodeLensesPromise && (this._resolveCodeLensesPromise = + void 0) + }), (e => { + (0, o.dL)(e), a === this._resolveCodeLensesPromise && (this._resolveCodeLensesPromise = + void 0) + })) + } + getLenses() { + return this._lenses + } + }; + re.ID = "css.editor.codeLens", re = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([oe(1, u.H), oe(2, H.lT), oe(3, Z)], re), (0, a._K)(re.ID, re), (0, a.Qr) + (class extends a.R6 { + constructor() { + super({ + id: "codelens.showLensesInCurrentLine", + precondition: ie.u.hasCodeLensProvider, + label: (0, te.N)("showLensOnLine", + "Show CodeLens Commands For Current Line"), + alias: "Show CodeLens Commands For Current Line" + }) + } + run(e, t) { + return i = this, n = void 0, r = function*() { + if (!t.hasModel()) return; + const i = e.get(ee.eJ), + n = e.get(u.H), + o = e.get(H.lT), + r = t.getSelection().positionLineNumber, + s = t.getContribution(re.ID), + a = []; + for (let e of s.getLenses()) + if (e.getLineNumber() === r) + for (let t of e.getItems()) { + const { + command: e + } = t.symbol; + e && a.push({ + label: e.title, + command: e + }) + } + if (0 === a.length) return; + const l = yield i.pick(a, { + canPickMany: !1 + }); + if (l) try { + yield n.executeCommand(l.command.id, ...l.command.arguments || []) + } catch (e) { + o.error(e) + } + }, new((o = void 0) || (o = Promise))((function(e, t) { + function s(e) { + try { + l(r.next(e)) + } catch (e) { + t(e) + } + } + + function a(e) { + try { + l(r.throw(e)) + } catch (e) { + t(e) + } + } + + function l(t) { + var i; + t.done ? e(t.value) : (i = t.value, i instanceof o ? i : new o( + (function(e) { + e(i) + }))).then(s, a) + } + l((r = r.apply(i, n || [])).next()) + })); + var i, n, o, r + } + }) + }, + 3308: (e, t, i) => { + "use strict"; + i.d(t, { + E: () => c, + R: () => h + }); + var n = i(1050), + o = i(7301), + r = i(666), + s = i(4314), + a = i(4101), + l = i(1200), + d = i(4565); + + function c(e, t) { + const i = [], + n = a.OH.ordered(e).reverse().map((n => Promise.resolve(n.provideDocumentColors( + e, t)).then((e => { + if (Array.isArray(e)) + for (let t of e) i.push({ + colorInfo: t, + provider: n + }) + })))); + return Promise.all(n).then((() => i)) + } + + function h(e, t, i, n) { + return Promise.resolve(i.provideColorPresentations(e, t, n)) + } + d.P.registerCommand("_executeDocumentColorProvider", (function(e, ...t) { + const [i] = t; + if (!(i instanceof r.o)) throw (0, o.b1)(); + const s = e.get(l.q).getModel(i); + if (!s) throw (0, o.b1)(); + const d = [], + c = a.OH.ordered(s).reverse().map((e => Promise.resolve(e.provideDocumentColors( + s, n.T.None)).then((e => { + if (Array.isArray(e)) + for (let t of e) d.push({ + range: t.range, + color: [t.color.red, t.color.green, t.color.blue, t.color.alpha] + }) + })))); + return Promise.all(c).then((() => d)) + })), d.P.registerCommand("_executeColorPresentationProvider", (function( + e, ...t) { + const [i, d] = t, { + uri: c, + range: h + } = d; + if (!(c instanceof r.o && Array.isArray(i) && 4 === i.length && s.e.isIRange( + h))) throw (0, o.b1)(); + const [u, g, p, m] = i, f = e.get(l.q).getModel(c); + if (!f) throw (0, o.b1)(); + const _ = { + range: h, + color: { + red: u, + green: g, + blue: p, + alpha: m + } + }, + b = [], + v = a.OH.ordered(f).reverse().map((e => Promise.resolve(e.provideColorPresentations( + f, _, n.T.None)).then((e => { + Array.isArray(e) && b.push(...e) + })))); + return Promise.all(v).then((() => b)) + })) + }, + 7956: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + ColorContribution: () => a + }), i(4494); + var n = i(5976), + o = i(6830), + r = i(3285), + s = i(4314); + class a extends n.JT { + constructor(e) { + super(), this._editor = e, this._register(e.onMouseDown((e => this.onMouseDown( + e)))) + } + dispose() { + super.dispose() + } + onMouseDown(e) { + var t; + if (6 !== e.target.type) return; + if (![...(null === (t = e.target.element) || void 0 === t ? void 0 : + t.classList.values()) || []].find((e => e.startsWith("ced-colorBox")))) + return; + if (!e.target.range) return; + const i = this._editor.getContribution(r.ModesHoverController.ID); + if (!i.isColorPickerVisible()) { + const t = new s.e(e.target.range.startLineNumber, e.target.range.startColumn + + 1, e.target.range.endLineNumber, e.target.range.endColumn + 1); + i.showContentHover(t, 0, !1) + } + } + } + a.ID = "editor.contrib.colorContribution", (0, o._K)(a.ID, a) + }, + 4494: (e, t, i) => { + "use strict"; + i.d(t, { + i: () => f + }); + var n = i(5393), + o = i(1264), + r = i(7301), + s = i(9954), + a = i(5976), + l = i(6830), + d = i(1640), + c = i(4314), + h = i(6281), + u = i(4101), + g = i(3308), + p = i(3108), + m = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let f = class e extends a.JT { + constructor(e, t, i) { + super(), this._editor = e, this._codeEditorService = t, this._configurationService = + i, this._localToDispose = this._register(new a.SL), this._decorationsIds = [], + this._colorDatas = new Map, this._colorDecoratorIds = [], this._decorationsTypes = + new Set, this._register(e.onDidChangeModel((() => { + this._isEnabled = this.isEnabled(), this.onModelChanged() + }))), this._register(e.onDidChangeModelLanguage((() => this.onModelChanged()))), + this._register(u.OH.onDidChange((() => this.onModelChanged()))), + this._register(e.onDidChangeConfiguration((() => { + let e = this._isEnabled; + this._isEnabled = this.isEnabled(), e !== this._isEnabled && ( + this._isEnabled ? this.onModelChanged() : this.removeAllDecorations() + ) + }))), this._timeoutTimer = null, this._computePromise = null, this._isEnabled = + this.isEnabled(), this.onModelChanged() + } + isEnabled() { + const e = this._editor.getModel(); + if (!e) return !1; + const t = e.getLanguageIdentifier(), + i = this._configurationService.getValue(t.language); + if (i && "object" == typeof i) { + const e = i.colorDecorators; + if (e && void 0 !== e.enable && !e.enable) return e.enable + } + return this._editor.getOption(16) + } + static get(e) { + return e.getContribution(this.ID) + } + dispose() { + this.stop(), this.removeAllDecorations(), super.dispose() + } + onModelChanged() { + if (this.stop(), !this._isEnabled) return; + const t = this._editor.getModel(); + t && u.OH.has(t) && (this._localToDispose.add(this._editor.onDidChangeModelContent( + (() => { + this._timeoutTimer || (this._timeoutTimer = new n._F, this._timeoutTimer + .cancelAndSet((() => { + this._timeoutTimer = null, this.beginCompute() + }), e.RECOMPUTE_TIME)) + }))), this.beginCompute()) + } + beginCompute() { + this._computePromise = (0, n.PG)((e => { + const t = this._editor.getModel(); + return t ? (0, g.E)(t, e) : Promise.resolve([]) + })), this._computePromise.then((e => { + this.updateDecorations(e), this.updateColorDecorators(e), this._computePromise = + null + }), r.dL) + } + stop() { + this._timeoutTimer && (this._timeoutTimer.cancel(), this._timeoutTimer = + null), this._computePromise && (this._computePromise.cancel(), this + ._computePromise = null), this._localToDispose.clear() + } + updateDecorations(e) { + const t = e.map((e => ({ + range: { + startLineNumber: e.colorInfo.range.startLineNumber, + startColumn: e.colorInfo.range.startColumn, + endLineNumber: e.colorInfo.range.endLineNumber, + endColumn: e.colorInfo.range.endColumn + }, + options: h.qx.EMPTY + }))); + this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, + t), this._colorDatas = new Map, this._decorationsIds.forEach(((t, i) => + this._colorDatas.set(t, e[i]))) + } + updateColorDecorators(e) { + let t = [], + i = {}; + for (let n = 0; n < e.length && t.length < 500; n++) { + const { + red: r, + green: a, + blue: l, + alpha: d + } = e[n].colorInfo.color, c = new o.VS(Math.round(255 * r), Math.round( + 255 * a), Math.round(255 * l), d); + let h = (0, s.vp)(`rgba(${c.r},${c.g},${c.b},${c.a})`).toString(16), + u = `rgba(${c.r}, ${c.g}, ${c.b}, ${c.a})`, + g = "colorBox-" + h; + this._decorationsTypes.has(g) || i[g] || this._codeEditorService.registerDecorationType( + "color-detector-color", g, { + before: { + contentText: " ", + border: "solid 0.1em #000", + margin: "0.1em 0.2em 0 0.2em", + width: "0.8em", + height: "0.8em", + backgroundColor: u + }, + dark: { + before: { + border: "solid 0.1em #eee" + } + } + }, void 0, this._editor), i[g] = !0, t.push({ + range: { + startLineNumber: e[n].colorInfo.range.startLineNumber, + startColumn: e[n].colorInfo.range.startColumn, + endLineNumber: e[n].colorInfo.range.endLineNumber, + endColumn: e[n].colorInfo.range.endColumn + }, + options: this._codeEditorService.resolveDecorationOptions(g, !0) + }) + } + this._decorationsTypes.forEach((e => { + i[e] || this._codeEditorService.removeDecorationType(e) + })), this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, + t) + } + removeAllDecorations() { + this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, []), + this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, []), + this._decorationsTypes.forEach((e => { + this._codeEditorService.removeDecorationType(e) + })) + } + getColorData(e) { + const t = this._editor.getModel(); + if (!t) return null; + const i = t.getDecorationsInRange(c.e.fromPositions(e, e)).filter((e => + this._colorDatas.has(e.id))); + return 0 === i.length ? null : this._colorDatas.get(i[0].id) + } + }; + f.ID = "editor.contrib.colorDetector", f.RECOMPUTE_TIME = 1e3, f = + function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([m(1, d.$), m(2, p.Ui)], f), (0, l._K)(f.ID, f) + }, + 9098: (e, t, i) => { + "use strict"; + i.r(t); + var n = i(3580), + o = i(2258), + r = i(6830), + s = i(4314), + a = i(9102), + l = i(9386), + d = i(187), + c = i(3860), + h = i(3831); + class u { + constructor(e, t) { + this._selection = e, this._insertSpace = t, this._usedEndToken = null + } + static _haystackHasNeedleAtOffset(e, t, i) { + if (i < 0) return !1; + const n = t.length; + if (i + n > e.length) return !1; + for (let o = 0; o < n; o++) { + const n = e.charCodeAt(i + o), + r = t.charCodeAt(o); + if (n !== r && !(n >= 65 && n <= 90 && n + 32 === r || r >= 65 && r <= + 90 && r + 32 === n)) return !1 + } + return !0 + } + _createOperationsForBlockComment(e, t, i, n, o, r) { + const a = e.startLineNumber, + l = e.startColumn, + d = e.endLineNumber, + c = e.endColumn, + h = o.getLineContent(a), + g = o.getLineContent(d); + let p, m = h.lastIndexOf(t, l - 1 + t.length), + f = g.indexOf(i, c - 1 - i.length); + if (-1 !== m && -1 !== f) + if (a === d) h.substring(m + t.length, f).indexOf(i) >= 0 && (m = -1, + f = -1); + else { + const e = h.substring(m + t.length), + n = g.substring(0, f); + (e.indexOf(i) >= 0 || n.indexOf(i) >= 0) && (m = -1, f = -1) + } - 1 !== m && -1 !== f ? (n && m + t.length < h.length && 32 === h.charCodeAt( + m + t.length) && (t += " "), n && f > 0 && 32 === g.charCodeAt(f - + 1) && (i = " " + i, f -= 1), p = u._createRemoveBlockCommentOperations( + new s.e(a, m + t.length + 1, d, f + 1), t, i)) : (p = u._createAddBlockCommentOperations( + e, t, i, this._insertSpace), this._usedEndToken = 1 === p.length ? + i : null); + for (const e of p) r.addTrackedEditOperation(e.range, e.text) + } + static _createRemoveBlockCommentOperations(e, t, i) { + let n = []; + return s.e.isEmpty(e) ? n.push(l.h.delete(new s.e(e.startLineNumber, e + .startColumn - t.length, e.endLineNumber, e.endColumn + i.length))) : + (n.push(l.h.delete(new s.e(e.startLineNumber, e.startColumn - t.length, + e.startLineNumber, e.startColumn))), n.push(l.h.delete(new s.e(e.endLineNumber, + e.endColumn, e.endLineNumber, e.endColumn + i.length)))), n + } + static _createAddBlockCommentOperations(e, t, i, n) { + let o = []; + return s.e.isEmpty(e) ? o.push(l.h.replace(new s.e(e.startLineNumber, + e.startColumn, e.endLineNumber, e.endColumn), t + " " + i)) : (o.push( + l.h.insert(new d.L(e.startLineNumber, e.startColumn), t + (n ? " " : + ""))), o.push(l.h.insert(new d.L(e.endLineNumber, e.endColumn), (n ? + " " : "") + i))), o + } + getEditOperations(e, t) { + const i = this._selection.startLineNumber, + n = this._selection.startColumn; + e.tokenizeIfCheap(i); + const o = e.getLanguageIdAtPosition(i, n), + r = h.zu.getComments(o); + r && r.blockCommentStartToken && r.blockCommentEndToken && this._createOperationsForBlockComment( + this._selection, r.blockCommentStartToken, r.blockCommentEndToken, + this._insertSpace, e, t) + } + computeCursorState(e, t) { + const i = t.getInverseEditOperations(); + if (2 === i.length) { + const e = i[0], + t = i[1]; + return new c.Y(e.range.endLineNumber, e.range.endColumn, t.range.startLineNumber, + t.range.startColumn) + } { + const e = i[0].range, + t = this._usedEndToken ? -this._usedEndToken.length - 1 : 0; + return new c.Y(e.endLineNumber, e.endColumn + t, e.endLineNumber, e.endColumn + + t) + } + } + } + var g = i(7295); + class p { + constructor(e, t, i, n, o, r) { + this._selection = e, this._tabSize = t, this._type = i, this._insertSpace = + n, this._selectionId = null, this._deltaColumn = 0, this._moveEndPositionDown = ! + 1, this._ignoreEmptyLines = o, this._ignoreFirstLine = r || !1 + } + static _gatherPreflightCommentStrings(e, t, i) { + e.tokenizeIfCheap(t); + const n = e.getLanguageIdAtPosition(t, 1), + o = h.zu.getComments(n), + r = o ? o.lineCommentToken : null; + if (!r) return null; + let s = []; + for (let e = 0, n = i - t + 1; e < n; e++) s[e] = { + ignore: !1, + commentStr: r, + commentStrOffset: 0, + commentStrLength: r.length + }; + return s + } + static _analyzeLines(e, t, i, n, o, r, s) { + let a, l = !0; + a = 0 === e || 1 !== e; + for (let d = 0, c = n.length; d < c; d++) { + const c = n[d], + h = o + d; + if (h === o && s) { + c.ignore = !0; + continue + } + const p = i.getLineContent(h), + m = g.LC(p); + if (-1 !== m) { + if (l = !1, c.ignore = !1, c.commentStrOffset = m, a && !u._haystackHasNeedleAtOffset( + p, c.commentStr, m) && (0 === e ? a = !1 : 1 === e || (c.ignore = ! + 0)), a && t) { + const e = m + c.commentStrLength; + e < p.length && 32 === p.charCodeAt(e) && (c.commentStrLength += 1) + } + } else c.ignore = r, c.commentStrOffset = p.length + } + if (0 === e && l) { + a = !1; + for (let e = 0, t = n.length; e < t; e++) n[e].ignore = !1 + } + return { + supported: !0, + shouldRemoveComments: a, + lines: n + } + } + static _gatherPreflightData(e, t, i, n, o, r, s) { + const a = p._gatherPreflightCommentStrings(i, n, o); + return null === a ? { + supported: !1 + } : p._analyzeLines(e, t, i, a, n, r, s) + } + _executeLineComments(e, t, i, n) { + let o; + i.shouldRemoveComments ? o = p._createRemoveLineCommentsOperations(i.lines, + n.startLineNumber) : (p._normalizeInsertionPoint(e, i.lines, n.startLineNumber, + this._tabSize), o = this._createAddLineCommentsOperations(i.lines, + n.startLineNumber)); + const r = new d.L(n.positionLineNumber, n.positionColumn); + for (let i = 0, n = o.length; i < n; i++) t.addEditOperation(o[i].range, + o[i].text), s.e.isEmpty(o[i].range) && s.e.getStartPosition(o[i].range) + .equals(r) && e.getLineContent(r.lineNumber).length + 1 === r.column && + (this._deltaColumn = (o[i].text || "").length); + this._selectionId = t.trackSelection(n) + } + _attemptRemoveBlockComment(e, t, i, n) { + let o = t.startLineNumber, + r = t.endLineNumber, + a = n.length + Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber), + t.startColumn), + l = e.getLineContent(o).lastIndexOf(i, a - 1), + d = e.getLineContent(r).indexOf(n, t.endColumn - 1 - i.length); + return -1 !== l && -1 === d && (d = e.getLineContent(o).indexOf(n, l + + i.length), r = o), -1 === l && -1 !== d && (l = e.getLineContent(r).lastIndexOf( + i, d), o = r), !t.isEmpty() || -1 !== l && -1 !== d || (l = e.getLineContent( + o).indexOf(i), -1 !== l && (d = e.getLineContent(o).indexOf(n, l + + i.length))), -1 !== l && 32 === e.getLineContent(o).charCodeAt(l + i + .length) && (i += " "), -1 !== d && 32 === e.getLineContent(r).charCodeAt( + d - 1) && (n = " " + n, d -= 1), -1 !== l && -1 !== d ? u._createRemoveBlockCommentOperations( + new s.e(o, l + i.length + 1, r, d + 1), i, n) : null + } + _executeBlockComment(e, t, i) { + e.tokenizeIfCheap(i.startLineNumber); + let n = e.getLanguageIdAtPosition(i.startLineNumber, 1), + o = h.zu.getComments(n); + if (!o || !o.blockCommentStartToken || !o.blockCommentEndToken) return + ; + const r = o.blockCommentStartToken, + a = o.blockCommentEndToken; + let l = this._attemptRemoveBlockComment(e, i, r, a); + if (!l) { + if (i.isEmpty()) { + const t = e.getLineContent(i.startLineNumber); + let n = g.LC(t); - 1 === n && (n = t.length), l = u._createAddBlockCommentOperations( + new s.e(i.startLineNumber, n + 1, i.startLineNumber, t.length + 1), + r, a, this._insertSpace) + } else l = u._createAddBlockCommentOperations(new s.e(i.startLineNumber, + e.getLineFirstNonWhitespaceColumn(i.startLineNumber), i.endLineNumber, + e.getLineMaxColumn(i.endLineNumber)), r, a, this._insertSpace); + 1 === l.length && (this._deltaColumn = r.length + 1) + } + this._selectionId = t.trackSelection(i); + for (const e of l) t.addEditOperation(e.range, e.text) + } + getEditOperations(e, t) { + let i = this._selection; + if (this._moveEndPositionDown = !1, i.startLineNumber === i.endLineNumber && + this._ignoreFirstLine) return t.addEditOperation(new s.e(i.startLineNumber, + e.getLineMaxColumn(i.startLineNumber), i.startLineNumber + 1, 1), + i.startLineNumber === e.getLineCount() ? "" : "\n"), void(this._selectionId = + t.trackSelection(i)); + i.startLineNumber < i.endLineNumber && 1 === i.endColumn && (this._moveEndPositionDown = ! + 0, i = i.setEndPosition(i.endLineNumber - 1, e.getLineMaxColumn(i.endLineNumber - + 1))); + const n = p._gatherPreflightData(this._type, this._insertSpace, e, i.startLineNumber, + i.endLineNumber, this._ignoreEmptyLines, this._ignoreFirstLine); + return n.supported ? this._executeLineComments(e, t, n, i) : this._executeBlockComment( + e, t, i) + } + computeCursorState(e, t) { + let i = t.getTrackedSelection(this._selectionId); + return this._moveEndPositionDown && (i = i.setEndPosition(i.endLineNumber + + 1, 1)), new c.Y(i.selectionStartLineNumber, i.selectionStartColumn + + this._deltaColumn, i.positionLineNumber, i.positionColumn + this._deltaColumn + ) + } + static _createRemoveLineCommentsOperations(e, t) { + let i = []; + for (let n = 0, o = e.length; n < o; n++) { + const o = e[n]; + o.ignore || i.push(l.h.delete(new s.e(t + n, o.commentStrOffset + 1, + t + n, o.commentStrOffset + o.commentStrLength + 1))) + } + return i + } + _createAddLineCommentsOperations(e, t) { + let i = []; + const n = this._insertSpace ? " " : ""; + for (let o = 0, r = e.length; o < r; o++) { + const r = e[o]; + r.ignore || i.push(l.h.insert(new d.L(t + o, r.commentStrOffset + 1), + r.commentStr + n)) + } + return i + } + static nextVisibleColumn(e, t, i, n) { + return i ? e + (t - e % t) : e + n + } + static _normalizeInsertionPoint(e, t, i, n) { + let o, r, s = 1073741824; + for (let o = 0, r = t.length; o < r; o++) { + if (t[o].ignore) continue; + const r = e.getLineContent(i + o); + let a = 0; + for (let e = 0, i = t[o].commentStrOffset; a < s && e < i; e++) a = p + .nextVisibleColumn(a, n, 9 === r.charCodeAt(e), 1); + a < s && (s = a) + } + s = Math.floor(s / n) * n; + for (let a = 0, l = t.length; a < l; a++) { + if (t[a].ignore) continue; + const l = e.getLineContent(i + a); + let d = 0; + for (o = 0, r = t[a].commentStrOffset; d < s && o < r; o++) d = p.nextVisibleColumn( + d, n, 9 === l.charCodeAt(o), 1); + t[a].commentStrOffset = d > s ? o - 1 : o + } + } + } + var m = i(4144); + class f extends r.R6 { + constructor(e, t) { + super(t), this._type = e + } + run(e, t) { + if (!t.hasModel()) return; + const i = [], + n = t.getModel().getOptions(), + o = t.getOption(18), + r = t.getSelections().map(((e, t) => ({ + selection: e, + index: t, + ignoreFirstLine: !1 + }))); + r.sort(((e, t) => s.e.compareRangesUsingStarts(e.selection, t.selection))); + let a = r[0]; + for (let e = 1; e < r.length; e++) { + const t = r[e]; + a.selection.endLineNumber === t.selection.startLineNumber && (a.index < + t.index ? t.ignoreFirstLine = !0 : (a.ignoreFirstLine = !0, a = t) + ) + } + for (const e of r) i.push(new p(e.selection, n.tabSize, this._type, o + .insertSpace, o.ignoreEmptyLines, e.ignoreFirstLine)); + t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop() + } + } + class _ extends r.R6 { + constructor() { + super({ + id: "editor.action.blockComment", + label: n.N("comment.block", "Toggle Block Comment"), + alias: "Toggle Block Comment", + precondition: a.u.writable, + kbOpts: { + kbExpr: a.u.editorTextFocus, + primary: 1567, + linux: { + primary: 3103 + }, + weight: 100 + }, + menuOpts: { + menuId: m.eH.MenubarEditMenu, + group: "5_insert", + title: n.N({ + key: "miToggleBlockComment", + comment: ["&& denotes a mnemonic"] + }, "Toggle &&Block Comment"), + order: 2 + } + }) + } + run(e, t) { + if (!t.hasModel()) return; + const i = t.getOption(18), + n = [], + o = t.getSelections(); + for (const e of o) n.push(new u(e, i.insertSpace)); + t.pushUndoStop(), t.executeCommands(this.id, n), t.pushUndoStop() + } + }(0, r.Qr)(class extends f { + constructor() { + super(0, { + id: "editor.action.commentLine", + label: n.N("comment.line", "Toggle Line Comment"), + alias: "Toggle Line Comment", + precondition: a.u.writable, + kbOpts: { + kbExpr: a.u.editorTextFocus, + primary: 2133, + weight: 100 + }, + menuOpts: { + menuId: m.eH.MenubarEditMenu, + group: "5_insert", + title: n.N({ + key: "miToggleLineComment", + comment: ["&& denotes a mnemonic"] + }, "&&Toggle Line Comment"), + order: 1 + } + }) + } + }), (0, r.Qr)(class extends f { + constructor() { + super(1, { + id: "editor.action.addCommentLine", + label: n.N("comment.line.add", "Add Line Comment"), + alias: "Add Line Comment", + precondition: a.u.writable, + kbOpts: { + kbExpr: a.u.editorTextFocus, + primary: (0, o.gx)(2089, 2081), + weight: 100 + } + }) + } + }), (0, r.Qr)(class extends f { + constructor() { + super(2, { + id: "editor.action.removeCommentLine", + label: n.N("comment.line.remove", "Remove Line Comment"), + alias: "Remove Line Comment", + precondition: a.u.writable, + kbOpts: { + kbExpr: a.u.editorTextFocus, + primary: (0, o.gx)(2089, 2099), + weight: 100 + } + }) + } + }), (0, r.Qr)(_) + }, + 6522: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + ContextMenuController: () => f + }); + var n = i(3580), + o = i(5321), + r = i(4741), + s = i(5976), + a = i(6830), + l = i(9102), + d = i(4144), + c = i(8819), + h = i(5606), + u = i(1847), + g = i(6033), + p = i(1432), + m = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let f = class e { + constructor(e, t, i, n, r, a) { + this._contextMenuService = t, this._contextViewService = i, this._contextKeyService = + n, this._keybindingService = r, this._menuService = a, this._toDispose = + new s.SL, this._contextMenuIsBeingShownCount = 0, this._editor = e, + this._toDispose.add(this._editor.onContextMenu((e => this._onContextMenu( + e)))), this._toDispose.add(this._editor.onMouseWheel((e => { + if (this._contextMenuIsBeingShownCount > 0) { + const t = this._contextViewService.getContextViewElement(), + i = e.srcElement; + i.shadowRoot && o.Ay(t) === i.shadowRoot || this._contextViewService + .hideContextView() + } + }))), this._toDispose.add(this._editor.onKeyDown((e => { + 58 === e.keyCode && (e.preventDefault(), e.stopPropagation(), + this.showContextMenu()) + }))) + } + static get(t) { + return t.getContribution(e.ID) + } + _onContextMenu(e) { + if (!this._editor.hasModel()) return; + if (!this._editor.getOption(19)) return this._editor.focus(), void(e.target + .position && !this._editor.getSelection().containsPosition(e.target + .position) && this._editor.setPosition(e.target.position)); + if (12 === e.target.type) return; + if (e.event.preventDefault(), e.event.stopPropagation(), 6 !== e.target + .type && 7 !== e.target.type && 1 !== e.target.type) return; + if (this._editor.focus(), e.target.position) { + let t = !1; + for (const i of this._editor.getSelections()) + if (i.containsPosition(e.target.position)) { + t = !0; + break + } + t || this._editor.setPosition(e.target.position) + } + let t = null; + 1 !== e.target.type && (t = { + x: e.event.posx - 1, + width: 2, + y: e.event.posy - 1, + height: 2 + }), this.showContextMenu(t) + } + showContextMenu(e) { + if (!this._editor.getOption(19)) return; + if (!this._editor.hasModel()) return; + if (!this._contextMenuService) return void this._editor.focus(); + const t = this._getMenuActions(this._editor.getModel(), this._editor.isSimpleWidget ? + d.eH.SimpleEditorContext : d.eH.EditorContext); + t.length > 0 && this._doShowContextMenu(t, e) + } + _getMenuActions(e, t) { + const i = [], + n = this._menuService.createMenu(t, this._contextKeyService), + o = n.getActions({ + arg: e.uri + }); + n.dispose(); + for (let t of o) { + const [, n] = t; + let o = 0; + for (const t of n) + if (t instanceof d.NZ) { + const n = this._getMenuActions(e, t.item.submenu); + n.length > 0 && (i.push(new r.wY(t.id, t.label, n)), o++) + } else i.push(t), o++; + o && i.push(new r.Z0) + } + return i.length && i.pop(), i + } + _doShowContextMenu(e, t = null) { + if (!this._editor.hasModel()) return; + const i = this._editor.getOption(52); + if (this._editor.updateOptions({ + hover: { + enabled: !1 + } + }), !t) { + this._editor.revealPosition(this._editor.getPosition(), 1), this._editor + .render(); + const e = this._editor.getScrolledVisiblePosition(this._editor.getPosition()), + i = o.i(this._editor.getDomNode()), + n = i.left + e.left, + r = i.top + e.top + e.height; + t = { + x: n, + y: r + } + } + const n = this._editor.getOption(114) && !p.gn; + this._contextMenuIsBeingShownCount++, this._contextMenuService.showContextMenu({ + domForShadowRoot: n ? this._editor.getDomNode() : void 0, + getAnchor: () => t, + getActions: () => e, + getActionViewItem: e => { + const t = this._keybindingFor(e); + if (t) return new g.g(e, e, { + label: !0, + keybinding: t.getLabel(), + isMenu: !0 + }); + const i = e; + return "function" == typeof i.getActionViewItem ? i.getActionViewItem() : + new g.g(e, e, { + icon: !0, + label: !0, + isMenu: !0 + }) + }, + getKeyBinding: e => this._keybindingFor(e), + onHide: e => { + this._contextMenuIsBeingShownCount--, this._editor.focus(), this + ._editor.updateOptions({ + hover: i + }) + } + }) + } + _keybindingFor(e) { + return this._keybindingService.lookupKeybinding(e.id) + } + dispose() { + this._contextMenuIsBeingShownCount > 0 && this._contextViewService.hideContextView(), + this._toDispose.dispose() + } + }; + f.ID = "editor.contrib.contextmenu", f = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([m(1, h.i), m(2, h.u), m(3, c.i6), m(4, u.d), m(5, d.co)], f); + class _ extends a.R6 { + constructor() { + super({ + id: "editor.action.showContextMenu", + label: n.N("action.showContextMenu.label", + "Show Editor Context Menu"), + alias: "Show Editor Context Menu", + precondition: void 0, + kbOpts: { + kbExpr: l.u.textInputFocus, + primary: 1092, + weight: 100 + } + }) + } + run(e, t) { + f.get(t).showContextMenu() + } + }(0, a._K)(f.ID, f), (0, a.Qr)(_) + }, + 2834: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + CursorUndoRedoController: () => d, + CursorUndo: () => c, + CursorRedo: () => h + }); + var n = i(3580), + o = i(5976), + r = i(6830), + s = i(9102); + class a { + constructor(e) { + this.selections = e + } + equals(e) { + const t = this.selections.length; + if (t !== e.selections.length) return !1; + for (let i = 0; i < t; i++) + if (!this.selections[i].equalsSelection(e.selections[i])) return !1; + return !0 + } + } + class l { + constructor(e, t, i) { + this.cursorState = e, this.scrollTop = t, this.scrollLeft = i + } + } + class d extends o.JT { + constructor(e) { + super(), this._editor = e, this._isCursorUndoRedo = !1, this._undoStack = [], + this._redoStack = [], this._register(e.onDidChangeModel((e => { + this._undoStack = [], this._redoStack = [] + }))), this._register(e.onDidChangeModelContent((e => { + this._undoStack = [], this._redoStack = [] + }))), this._register(e.onDidChangeCursorSelection((t => { + if (this._isCursorUndoRedo) return; + if (!t.oldSelections) return; + if (t.oldModelVersionId !== t.modelVersionId) return; + const i = new a(t.oldSelections); + this._undoStack.length > 0 && this._undoStack[this._undoStack.length - + 1].cursorState.equals(i) || (this._undoStack.push(new l(i, e.getScrollTop(), + e.getScrollLeft())), this._redoStack = [], this._undoStack.length > + 50 && this._undoStack.shift()) + }))) + } + static get(e) { + return e.getContribution(d.ID) + } + cursorUndo() { + this._editor.hasModel() && 0 !== this._undoStack.length && (this._redoStack + .push(new l(new a(this._editor.getSelections()), this._editor.getScrollTop(), + this._editor.getScrollLeft())), this._applyState(this._undoStack.pop()) + ) + } + cursorRedo() { + this._editor.hasModel() && 0 !== this._redoStack.length && (this._undoStack + .push(new l(new a(this._editor.getSelections()), this._editor.getScrollTop(), + this._editor.getScrollLeft())), this._applyState(this._redoStack.pop()) + ) + } + _applyState(e) { + this._isCursorUndoRedo = !0, this._editor.setSelections(e.cursorState + .selections), this._editor.setScrollPosition({ + scrollTop: e.scrollTop, + scrollLeft: e.scrollLeft + }), this._isCursorUndoRedo = !1 + } + } + d.ID = "editor.contrib.cursorUndoRedoController"; + class c extends r.R6 { + constructor() { + super({ + id: "cursorUndo", + label: n.N("cursor.undo", "Cursor Undo"), + alias: "Cursor Undo", + precondition: void 0, + kbOpts: { + kbExpr: s.u.textInputFocus, + primary: 2099, + weight: 100 + } + }) + } + run(e, t, i) { + d.get(t).cursorUndo() + } + } + class h extends r.R6 { + constructor() { + super({ + id: "cursorRedo", + label: n.N("cursor.redo", "Cursor Redo"), + alias: "Cursor Redo", + precondition: void 0 + }) + } + run(e, t, i) { + d.get(t).cursorRedo() + } + }(0, r._K)(d.ID, d), (0, r.Qr)(c), (0, r.Qr)(h) + }, + 6961: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + DragAndDropController: () => L + }); + var n = i(3379), + o = i.n(n), + r = i(7795), + s = i.n(r), + a = i(569), + l = i.n(a), + d = i(3565), + c = i.n(d), + h = i(9216), + u = i.n(h), + g = i(4589), + p = i.n(g), + m = i(9100), + f = {}; + f.styleTagTransform = p(), f.setAttributes = c(), f.insert = l().bind( + null, "head"), f.domAPI = s(), f.insertStyleElement = u(), o()(m.Z, f), + m.Z && m.Z.locals && m.Z.locals; + var _ = i(5976), + b = i(1432), + v = i(6830), + w = i(187), + C = i(4314), + y = i(3860); + class S { + constructor(e, t, i) { + this.selection = e, this.targetPosition = t, this.copy = i, this.targetSelection = + null + } + getEditOperations(e, t) { + let i = e.getValueInRange(this.selection); + this.copy || t.addEditOperation(this.selection, null), t.addEditOperation( + new C.e(this.targetPosition.lineNumber, this.targetPosition.column, + this.targetPosition.lineNumber, this.targetPosition.column), i), ! + this.selection.containsPosition(this.targetPosition) || this.copy && + (this.selection.getEndPosition().equals(this.targetPosition) || this.selection + .getStartPosition().equals(this.targetPosition)) ? this.copy ? this.targetSelection = + new y.Y(this.targetPosition.lineNumber, this.targetPosition.column, + this.selection.endLineNumber - this.selection.startLineNumber + this + .targetPosition.lineNumber, this.selection.startLineNumber === this.selection + .endLineNumber ? this.targetPosition.column + this.selection.endColumn - + this.selection.startColumn : this.selection.endColumn) : this.targetPosition + .lineNumber > this.selection.endLineNumber ? this.targetSelection = + new y.Y(this.targetPosition.lineNumber - this.selection.endLineNumber + + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition + .lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? + this.targetPosition.column + this.selection.endColumn - this.selection + .startColumn : this.selection.endColumn) : this.targetPosition.lineNumber < + this.selection.endLineNumber ? this.targetSelection = new y.Y(this.targetPosition + .lineNumber, this.targetPosition.column, this.targetPosition.lineNumber + + this.selection.endLineNumber - this.selection.startLineNumber, this.selection + .startLineNumber === this.selection.endLineNumber ? this.targetPosition + .column + this.selection.endColumn - this.selection.startColumn : + this.selection.endColumn) : this.selection.endColumn <= this.targetPosition + .column ? this.targetSelection = new y.Y(this.targetPosition.lineNumber - + this.selection.endLineNumber + this.selection.startLineNumber, (this + .selection.startLineNumber, this.selection.endLineNumber, this.targetPosition + .column - this.selection.endColumn + this.selection.startColumn), + this.targetPosition.lineNumber, this.selection.startLineNumber === + this.selection.endLineNumber ? this.targetPosition.column : this.selection + .endColumn) : this.targetSelection = new y.Y(this.targetPosition.lineNumber - + this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition + .column, this.targetPosition.lineNumber, this.targetPosition.column + + this.selection.endColumn - this.selection.startColumn) : this.targetSelection = + this.selection + } + computeCursorState(e, t) { + return this.targetSelection + } + } + var x = i(6281); + + function k(e) { + return b.dz ? e.altKey : e.ctrlKey + } + class L extends _.JT { + constructor(e) { + super(), this._editor = e, this._register(this._editor.onMouseDown((e => + this._onEditorMouseDown(e)))), this._register(this._editor.onMouseUp( + (e => this._onEditorMouseUp(e)))), this._register(this._editor.onMouseDrag( + (e => this._onEditorMouseDrag(e)))), this._register(this._editor.onMouseDrop( + (e => this._onEditorMouseDrop(e)))), this._register(this._editor.onMouseDropCanceled( + (() => this._onEditorMouseDropCanceled()))), this._register(this._editor + .onKeyDown((e => this.onEditorKeyDown(e)))), this._register(this._editor + .onKeyUp((e => this.onEditorKeyUp(e)))), this._register(this._editor + .onDidBlurEditorWidget((() => this.onEditorBlur()))), this._register( + this._editor.onDidBlurEditorText((() => this.onEditorBlur()))), + this._dndDecorationIds = [], this._mouseDown = !1, this._modifierPressed = ! + 1, this._dragSelection = null + } + onEditorBlur() { + this._removeDecoration(), this._dragSelection = null, this._mouseDown = ! + 1, this._modifierPressed = !1 + } + onEditorKeyDown(e) { + this._editor.getOption(30) && !this._editor.getOption(17) && (k(e) && + (this._modifierPressed = !0), this._mouseDown && k(e) && this._editor + .updateOptions({ + mouseStyle: "copy" + })) + } + onEditorKeyUp(e) { + this._editor.getOption(30) && !this._editor.getOption(17) && (k(e) && + (this._modifierPressed = !1), this._mouseDown && e.keyCode === L.TRIGGER_KEY_VALUE && + this._editor.updateOptions({ + mouseStyle: "default" + })) + } + _onEditorMouseDown(e) { + this._mouseDown = !0 + } + _onEditorMouseUp(e) { + this._mouseDown = !1, this._editor.updateOptions({ + mouseStyle: "text" + }) + } + _onEditorMouseDrag(e) { + let t = e.target; + if (null === this._dragSelection) { + let e = (this._editor.getSelections() || []).filter((e => t.position && + e.containsPosition(t.position))); + if (1 !== e.length) return; + this._dragSelection = e[0] + } + k(e.event) ? this._editor.updateOptions({ + mouseStyle: "copy" + }) : this._editor.updateOptions({ + mouseStyle: "default" + }), t.position && (this._dragSelection.containsPosition(t.position) ? + this._removeDecoration() : this.showAt(t.position)) + } + _onEditorMouseDropCanceled() { + this._editor.updateOptions({ + mouseStyle: "text" + }), this._removeDecoration(), this._dragSelection = null, this._mouseDown = ! + 1 + } + _onEditorMouseDrop(e) { + if (e.target && (this._hitContent(e.target) || this._hitMargin(e.target)) && + e.target.position) { + let t = new w.L(e.target.position.lineNumber, e.target.position.column); + if (null === this._dragSelection) { + let i = null; + if (e.event.shiftKey) { + let e = this._editor.getSelection(); + if (e) { + const { + selectionStartLineNumber: n, + selectionStartColumn: o + } = e; + i = [new y.Y(n, o, t.lineNumber, t.column)] + } + } else i = (this._editor.getSelections() || []).map((e => e.containsPosition( + t) ? new y.Y(t.lineNumber, t.column, t.lineNumber, t.column) : + e)); + this._editor.setSelections(i || [], "mouse", 3) + } else(!this._dragSelection.containsPosition(t) || (k(e.event) || + this._modifierPressed) && (this._dragSelection.getEndPosition().equals( + t) || this._dragSelection.getStartPosition().equals(t))) && (this._editor + .pushUndoStop(), this._editor.executeCommand(L.ID, new S(this._dragSelection, + t, k(e.event) || this._modifierPressed)), this._editor.pushUndoStop() + ) + } + this._editor.updateOptions({ + mouseStyle: "text" + }), this._removeDecoration(), this._dragSelection = null, this._mouseDown = ! + 1 + } + showAt(e) { + let t = [{ + range: new C.e(e.lineNumber, e.column, e.lineNumber, e.column), + options: L._DECORATION_OPTIONS + }]; + this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, + t), this._editor.revealPosition(e, 1) + } + _removeDecoration() { + this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, []) + } + _hitContent(e) { + return 6 === e.type || 7 === e.type + } + _hitMargin(e) { + return 2 === e.type || 3 === e.type || 4 === e.type + } + dispose() { + this._removeDecoration(), this._dragSelection = null, this._mouseDown = ! + 1, this._modifierPressed = !1, super.dispose() + } + } + L.ID = "editor.contrib.dragAndDrop", L.TRIGGER_KEY_VALUE = b.dz ? 6 : 5, + L._DECORATION_OPTIONS = x.qx.register({ + description: "dnd-target", + className: "dnd-target" + }), (0, v._K)(L.ID, L) + }, + 1372: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + getDocumentSymbols: () => h + }); + var n = i(666), + o = i(1200), + r = i(1050), + s = i(8216), + a = i(6895), + l = i(4565), + d = i(8401), + c = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + + function h(e, t, i) { + return c(this, void 0, void 0, (function*() { + const n = yield a.C3.create(e, i); + return t ? n.asListOfDocumentSymbols() : n.getTopLevelSymbols() + })) + } + l.P.registerCommand("_executeDocumentSymbolProvider", (function(e, ...t) { + return c(this, void 0, void 0, (function*() { + const [i] = t; + (0, d.p_)(n.o.isUri(i)); + const a = e.get(o.q).getModel(i); + if (a) return h(a, !1, r.T.None); + const l = yield e.get(s.S).createModelReference(i); + try { + return yield h(l.object.textEditorModel, !1, r.T.None) + } finally { + l.dispose() + } + })) + })) + }, + 6895: (e, t, i) => { + "use strict"; + i.d(t, { + C3: () => p + }); + var n = i(9488), + o = i(1050), + r = i(7301), + s = i(3702), + a = i(4314), + l = i(4101), + d = i(3725), + c = i(1036); + class h { + remove() { + this.parent && this.parent.children.delete(this.id) + } + static findId(e, t) { + let i; + "string" == typeof e ? i = `${t.id}/${e}` : (i = `${t.id}/${e.name}`, + void 0 !== t.children.get(i) && (i = + `${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}` + )); + let n = i; + for (let e = 0; void 0 !== t.children.get(n); e++) n = `${i}_${e}`; + return n + } + static empty(e) { + return 0 === e.children.size + } + } + class u extends h { + constructor(e, t, i) { + super(), this.id = e, this.parent = t, this.symbol = i, this.children = + new Map + } + } + class g extends h { + constructor(e, t, i, n) { + super(), this.id = e, this.parent = t, this.label = i, this.order = n, + this.children = new Map + } + } + class p extends h { + constructor(e) { + super(), this.uri = e, this.id = "root", this.parent = void 0, this._groups = + new Map, this.children = new Map, this.id = "root", this.parent = + void 0 + } + static create(e, t) { + let i = this._keys.for(e, !0), + n = p._requests.get(i); + if (!n) { + let t = new o.A; + n = { + promiseCnt: 0, + source: t, + promise: p._create(e, t.token), + model: void 0 + }, p._requests.set(i, n); + const r = Date.now(); + n.promise.then((() => { + this._requestDurations.update(e, Date.now() - r) + })) + } + return n.model ? Promise.resolve(n.model) : (n.promiseCnt += 1, t.onCancellationRequested( + (() => { + 0 == --n.promiseCnt && (n.source.cancel(), p._requests.delete(i)) + })), new Promise(((e, t) => { + n.promise.then((t => { + n.model = t, e(t) + }), (e => { + p._requests.delete(i), t(e) + })) + }))) + } + static _create(e, t) { + const i = new o.A(t), + s = new p(e.uri), + a = l.vJ.ordered(e), + d = a.map(((t, n) => { + var o; + let a = h.findId(`provider_${n}`, s), + l = new g(a, s, null !== (o = t.displayName) && void 0 !== o ? o : + "Unknown Outline Provider", n); + return Promise.resolve(t.provideDocumentSymbols(e, i.token)).then( + (e => { + for (const t of e || []) p._makeOutlineElement(t, l); + return l + }), (e => ((0, r.Cp)(e), l))).then((e => { + h.empty(e) ? e.remove() : s._groups.set(a, e) + })) + })), + c = l.vJ.onDidChange((() => { + const t = l.vJ.ordered(e); + (0, n.fS)(t, a) || i.cancel() + })); + return Promise.all(d).then((() => i.token.isCancellationRequested && ! + t.isCancellationRequested ? p._create(e, t) : s._compact())).finally( + (() => { + c.dispose() + })) + } + static _makeOutlineElement(e, t) { + let i = h.findId(e, t), + n = new u(i, t, e); + if (e.children) + for (const t of e.children) p._makeOutlineElement(t, n); + t.children.set(n.id, n) + } + _compact() { + let e = 0; + for (const [t, i] of this._groups) 0 === i.children.size ? this._groups + .delete(t) : e += 1; + if (1 !== e) this.children = this._groups; + else { + let e = d.$.first(this._groups.values()); + for (let [, t] of e.children) t.parent = this, this.children.set(t.id, + t) + } + return this + } + getTopLevelSymbols() { + const e = []; + for (const t of this.children.values()) t instanceof u ? e.push(t.symbol) : + e.push(...d.$.map(t.children.values(), (e => e.symbol))); + return e.sort(((e, t) => a.e.compareRangesUsingStarts(e.range, t.range))) + } + asListOfDocumentSymbols() { + const e = this.getTopLevelSymbols(), + t = []; + return p._flattenDocumentSymbols(t, e, ""), t.sort(((e, t) => a.e.compareRangesUsingStarts( + e.range, t.range))) + } + static _flattenDocumentSymbols(e, t, i) { + for (const n of t) e.push({ + kind: n.kind, + tags: n.tags, + name: n.name, + detail: n.detail, + containerName: n.containerName || i, + range: n.range, + selectionRange: n.selectionRange, + children: void 0 + }), n.children && p._flattenDocumentSymbols(e, n.children, n.name) + } + } + p._requestDurations = new c.Y(l.vJ, 350), p._requests = new s.z6(9, .75), + p._keys = new class { + constructor() { + this._counter = 1, this._data = new WeakMap + } + for (e, t) { + return `${e.id}/${t?e.getVersionId():""}/${this._hash(l.vJ.all(e))}` + } + _hash(e) { + let t = ""; + for (const i of e) { + let e = this._data.get(i); + void 0 === e && (e = this._counter++, this._data.set(i, e)), t += e + } + return t + } + } + }, + 255: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + CommonFindController: () => Bt, + FindController: () => Wt, + MatchFindAction: () => Ht, + NextMatchFindAction: () => Ut, + NextSelectionMatchFindAction: () => $t, + PreviousMatchFindAction: () => jt, + PreviousSelectionMatchFindAction: () => qt, + SelectionMatchFindAction: () => Kt, + StartFindAction: () => zt, + StartFindReplaceAction: () => Zt, + StartFindWithSelectionAction: () => Vt, + getSelectionSearchString: () => Ft + }); + var n = i(3580), + o = i(5393), + r = i(5976), + s = i(7295), + a = i(6830), + l = i(9102), + d = i(1329), + c = i(187), + h = i(4314), + u = i(3860), + g = i(7277), + p = i(4973), + m = i(6281), + f = i(3910), + _ = i(7781); + class b { + constructor(e) { + this._editor = e, this._decorations = [], this._overviewRulerApproximateDecorations = [], + this._findScopeDecorationIds = [], this._rangeHighlightDecorationId = + null, this._highlightedDecorationId = null, this._startPosition = + this._editor.getPosition() + } + dispose() { + this._editor.deltaDecorations(this._allDecorations(), []), this._decorations = [], + this._overviewRulerApproximateDecorations = [], this._findScopeDecorationIds = [], + this._rangeHighlightDecorationId = null, this._highlightedDecorationId = + null + } + reset() { + this._decorations = [], this._overviewRulerApproximateDecorations = [], + this._findScopeDecorationIds = [], this._rangeHighlightDecorationId = + null, this._highlightedDecorationId = null + } + getCount() { + return this._decorations.length + } + getFindScope() { + return this._findScopeDecorationIds[0] ? this._editor.getModel().getDecorationRange( + this._findScopeDecorationIds[0]) : null + } + getFindScopes() { + if (this._findScopeDecorationIds.length) { + const e = this._findScopeDecorationIds.map((e => this._editor.getModel() + .getDecorationRange(e))).filter((e => !!e)); + if (e.length) return e + } + return null + } + getStartPosition() { + return this._startPosition + } + setStartPosition(e) { + this._startPosition = e, this.setCurrentFindMatch(null) + } + _getDecorationIndex(e) { + const t = this._decorations.indexOf(e); + return t >= 0 ? t + 1 : 1 + } + getCurrentMatchesPosition(e) { + let t = this._editor.getModel().getDecorationsInRange(e); + for (const e of t) { + const t = e.options; + if (t === b._FIND_MATCH_DECORATION || t === b._CURRENT_FIND_MATCH_DECORATION) + return this._getDecorationIndex(e.id) + } + return 0 + } + setCurrentFindMatch(e) { + let t = null, + i = 0; + if (e) + for (let n = 0, o = this._decorations.length; n < o; n++) { + let o = this._editor.getModel().getDecorationRange(this._decorations[ + n]); + if (e.equalsRange(o)) { + t = this._decorations[n], i = n + 1; + break + } + } + return null === this._highlightedDecorationId && null === t || this._editor + .changeDecorations((e => { + if (null !== this._highlightedDecorationId && (e.changeDecorationOptions( + this._highlightedDecorationId, b._FIND_MATCH_DECORATION), this._highlightedDecorationId = + null), null !== t && (this._highlightedDecorationId = t, e.changeDecorationOptions( + this._highlightedDecorationId, b._CURRENT_FIND_MATCH_DECORATION + )), null !== this._rangeHighlightDecorationId && (e.removeDecoration( + this._rangeHighlightDecorationId), this._rangeHighlightDecorationId = + null), null !== t) { + let i = this._editor.getModel().getDecorationRange(t); + if (i.startLineNumber !== i.endLineNumber && 1 === i.endColumn) { + let e = i.endLineNumber - 1, + t = this._editor.getModel().getLineMaxColumn(e); + i = new h.e(i.startLineNumber, i.startColumn, e, t) + } + this._rangeHighlightDecorationId = e.addDecoration(i, b._RANGE_HIGHLIGHT_DECORATION) + } + })), i + } + set(e, t) { + this._editor.changeDecorations((i => { + let n = b._FIND_MATCH_DECORATION, + o = []; + if (e.length > 1e3) { + n = b._FIND_MATCH_NO_OVERVIEW_DECORATION; + const t = this._editor.getModel().getLineCount(), + i = this._editor.getLayoutInfo().height / t, + r = Math.max(2, Math.ceil(3 / i)); + let s = e[0].range.startLineNumber, + a = e[0].range.endLineNumber; + for (let t = 1, i = e.length; t < i; t++) { + const i = e[t].range; + a + r >= i.startLineNumber ? i.endLineNumber > a && (a = i.endLineNumber) : + (o.push({ + range: new h.e(s, 1, a, 1), + options: b._FIND_MATCH_ONLY_OVERVIEW_DECORATION + }), s = i.startLineNumber, a = i.endLineNumber) + } + o.push({ + range: new h.e(s, 1, a, 1), + options: b._FIND_MATCH_ONLY_OVERVIEW_DECORATION + }) + } + let r = new Array(e.length); + for (let t = 0, i = e.length; t < i; t++) r[t] = { + range: e[t].range, + options: n + }; + this._decorations = i.deltaDecorations(this._decorations, r), this + ._overviewRulerApproximateDecorations = i.deltaDecorations(this._overviewRulerApproximateDecorations, + o), this._rangeHighlightDecorationId && (i.removeDecoration(this + ._rangeHighlightDecorationId), this._rangeHighlightDecorationId = + null), this._findScopeDecorationIds.length && (this._findScopeDecorationIds + .forEach((e => i.removeDecoration(e))), this._findScopeDecorationIds = [] + ), (null == t ? void 0 : t.length) && (this._findScopeDecorationIds = + t.map((e => i.addDecoration(e, b._FIND_SCOPE_DECORATION)))) + })) + } + matchBeforePosition(e) { + if (0 === this._decorations.length) return null; + for (let t = this._decorations.length - 1; t >= 0; t--) { + let i = this._decorations[t], + n = this._editor.getModel().getDecorationRange(i); + if (n && !(n.endLineNumber > e.lineNumber)) { + if (n.endLineNumber < e.lineNumber) return n; + if (!(n.endColumn > e.column)) return n + } + } + return this._editor.getModel().getDecorationRange(this._decorations[ + this._decorations.length - 1]) + } + matchAfterPosition(e) { + if (0 === this._decorations.length) return null; + for (let t = 0, i = this._decorations.length; t < i; t++) { + let i = this._decorations[t], + n = this._editor.getModel().getDecorationRange(i); + if (n && !(n.startLineNumber < e.lineNumber)) { + if (n.startLineNumber > e.lineNumber) return n; + if (!(n.startColumn < e.column)) return n + } + } + return this._editor.getModel().getDecorationRange(this._decorations[0]) + } + _allDecorations() { + let e = []; + return e = e.concat(this._decorations), e = e.concat(this._overviewRulerApproximateDecorations), + this._findScopeDecorationIds.length && e.push(...this._findScopeDecorationIds), + this._rangeHighlightDecorationId && e.push(this._rangeHighlightDecorationId), + e + } + } + b._CURRENT_FIND_MATCH_DECORATION = m.qx.register({ + description: "current-find-match", + stickiness: 1, + zIndex: 13, + className: "currentFindMatch", + showIfCollapsed: !0, + overviewRuler: { + color: (0, _.EN)(f.Fm), + position: p.sh.Center + }, + minimap: { + color: (0, _.EN)(f.KT), + position: p.F5.Inline + } + }), b._FIND_MATCH_DECORATION = m.qx.register({ + description: "find-match", + stickiness: 1, + className: "findMatch", + showIfCollapsed: !0, + overviewRuler: { + color: (0, _.EN)(f.Fm), + position: p.sh.Center + }, + minimap: { + color: (0, _.EN)(f.KT), + position: p.F5.Inline + } + }), b._FIND_MATCH_NO_OVERVIEW_DECORATION = m.qx.register({ + description: "find-match-no-overview", + stickiness: 1, + className: "findMatch", + showIfCollapsed: !0 + }), b._FIND_MATCH_ONLY_OVERVIEW_DECORATION = m.qx.register({ + description: "find-match-only-overview", + stickiness: 1, + overviewRuler: { + color: (0, _.EN)(f.Fm), + position: p.sh.Center + } + }), b._RANGE_HIGHLIGHT_DECORATION = m.qx.register({ + description: "find-range-highlight", + stickiness: 1, + className: "rangeHighlight", + isWholeLine: !0 + }), b._FIND_SCOPE_DECORATION = m.qx.register({ + description: "find-scope", + className: "findScope", + isWholeLine: !0 + }); + class v { + constructor(e, t, i) { + this._editorSelection = e, this._ranges = t, this._replaceStrings = i, + this._trackedEditorSelectionId = null + } + getEditOperations(e, t) { + if (this._ranges.length > 0) { + let e = []; + for (let t = 0; t < this._ranges.length; t++) e.push({ + range: this._ranges[t], + text: this._replaceStrings[t] + }); + e.sort(((e, t) => h.e.compareRangesUsingStarts(e.range, t.range))); + let i = [], + n = e[0]; + for (let t = 1; t < e.length; t++) n.range.endLineNumber === e[t].range + .startLineNumber && n.range.endColumn === e[t].range.startColumn ? ( + n.range = n.range.plusRange(e[t].range), n.text = n.text + e[t].text + ) : (i.push(n), n = e[t]); + i.push(n); + for (const e of i) t.addEditOperation(e.range, e.text) + } + this._trackedEditorSelectionId = t.trackSelection(this._editorSelection) + } + computeCursorState(e, t) { + return t.getTrackedSelection(this._trackedEditorSelectionId) + } + } + + function w(e, t) { + if (e && "" !== e[0]) { + const i = C(e, t, "-"), + n = C(e, t, "_"); + return i && !n ? y(e, t, "-") : !i && n ? y(e, t, "_") : e[0].toUpperCase() === + e[0] ? t.toUpperCase() : e[0].toLowerCase() === e[0] ? t.toLowerCase() : + s.Kw(e[0][0]) && t.length > 0 ? t[0].toUpperCase() + t.substr(1) : e[0] + [0].toUpperCase() !== e[0][0] && t.length > 0 ? t[0].toLowerCase() + t + .substr(1) : t + } + return t + } + + function C(e, t, i) { + return -1 !== e[0].indexOf(i) && -1 !== t.indexOf(i) && e[0].split(i).length === + t.split(i).length + } + + function y(e, t, i) { + const n = t.split(i), + o = e[0].split(i); + let r = ""; + return n.forEach(((e, t) => { + r += w([o[t]], e) + i + })), r.slice(0, -1) + } + class S { + constructor(e) { + this.staticValue = e, this.kind = 0 + } + } + class x { + constructor(e) { + this.pieces = e, this.kind = 1 + } + } + class k { + constructor(e) { + e && 0 !== e.length ? 1 === e.length && null !== e[0].staticValue ? + this._state = new S(e[0].staticValue) : this._state = new x(e) : this + ._state = new S("") + } + static fromStaticValue(e) { + return new k([L.staticValue(e)]) + } + get hasReplacementPatterns() { + return 1 === this._state.kind + } + buildReplaceString(e, t) { + if (0 === this._state.kind) return t ? w(e, this._state.staticValue) : + this._state.staticValue; + let i = ""; + for (let t = 0, n = this._state.pieces.length; t < n; t++) { + let n = this._state.pieces[t]; + if (null !== n.staticValue) { + i += n.staticValue; + continue + } + let o = k._substitute(n.matchIndex, e); + if (null !== n.caseOps && n.caseOps.length > 0) { + let e = [], + t = n.caseOps.length, + i = 0; + for (let r = 0, s = o.length; r < s; r++) { + if (i >= t) { + e.push(o.slice(r)); + break + } + switch (n.caseOps[i]) { + case "U": + e.push(o[r].toUpperCase()); + break; + case "u": + e.push(o[r].toUpperCase()), i++; + break; + case "L": + e.push(o[r].toLowerCase()); + break; + case "l": + e.push(o[r].toLowerCase()), i++; + break; + default: + e.push(o[r]) + } + } + o = e.join("") + } + i += o + } + return i + } + static _substitute(e, t) { + if (null === t) return ""; + if (0 === e) return t[0]; + let i = ""; + for (; e > 0;) { + if (e < t.length) return (t[e] || "") + i; + i = String(e % 10) + i, e = Math.floor(e / 10) + } + return "$" + i + } + } + class L { + constructor(e, t, i) { + this.staticValue = e, this.matchIndex = t, i && 0 !== i.length ? this.caseOps = + i.slice(0) : this.caseOps = null + } + static staticValue(e) { + return new L(e, -1, null) + } + static caseOps(e, t) { + return new L(null, e, t) + } + } + class N { + constructor(e) { + this._source = e, this._lastCharIndex = 0, this._result = [], this._resultLen = + 0, this._currentStaticPiece = "" + } + emitUnchanged(e) { + this._emitStatic(this._source.substring(this._lastCharIndex, e)), this + ._lastCharIndex = e + } + emitStatic(e, t) { + this._emitStatic(e), this._lastCharIndex = t + } + _emitStatic(e) { + 0 !== e.length && (this._currentStaticPiece += e) + } + emitMatchIndex(e, t, i) { + 0 !== this._currentStaticPiece.length && (this._result[this._resultLen++] = + L.staticValue(this._currentStaticPiece), this._currentStaticPiece = + ""), this._result[this._resultLen++] = L.caseOps(e, i), this._lastCharIndex = + t + } + finalize() { + return this.emitUnchanged(this._source.length), 0 !== this._currentStaticPiece + .length && (this._result[this._resultLen++] = L.staticValue(this._currentStaticPiece), + this._currentStaticPiece = ""), new k(this._result) + } + } + var D = i(8819), + E = i(9488); + const I = new D.uy("findWidgetVisible", !1), + T = new D.uy("findInputFocussed", !1), + M = new D.uy("replaceInputFocussed", !1), + A = { + primary: 545, + mac: { + primary: 2593 + } + }, + R = { + primary: 565, + mac: { + primary: 2613 + } + }, + O = { + primary: 560, + mac: { + primary: 2608 + } + }, + P = { + primary: 554, + mac: { + primary: 2602 + } + }, + F = { + primary: 558, + mac: { + primary: 2606 + } + }, + B = "editor.action.nextMatchFindAction", + W = "editor.action.previousMatchFindAction", + z = "closeFindWidget", + V = "toggleFindCaseSensitive", + H = "toggleFindWholeWord", + U = "toggleFindRegex", + j = "toggleFindInSelection", + K = "togglePreserveCase", + $ = "editor.action.replaceOne", + q = "editor.action.replaceAll", + Z = 19999; + class G { + constructor(e, t) { + this._toDispose = new r.SL, this._editor = e, this._state = t, this._isDisposed = ! + 1, this._startSearchingTimer = new o._F, this._decorations = new b(e), + this._toDispose.add(this._decorations), this._updateDecorationsScheduler = + new o.pY((() => this.research(!1)), 100), this._toDispose.add(this._updateDecorationsScheduler), + this._toDispose.add(this._editor.onDidChangeCursorPosition((e => { + 3 !== e.reason && 5 !== e.reason && 6 !== e.reason || this._decorations + .setStartPosition(this._editor.getPosition()) + }))), this._ignoreModelContentChanged = !1, this._toDispose.add(this._editor + .onDidChangeModelContent((e => { + this._ignoreModelContentChanged || (e.isFlush && this._decorations + .reset(), this._decorations.setStartPosition(this._editor.getPosition()), + this._updateDecorationsScheduler.schedule()) + }))), this._toDispose.add(this._state.onFindReplaceStateChange((e => + this._onStateChanged(e)))), this.research(!1, this._state.searchScope) + } + dispose() { + this._isDisposed = !0, (0, r.B9)(this._startSearchingTimer), this._toDispose + .dispose() + } + _onStateChanged(e) { + !this._isDisposed && this._editor.hasModel() && (e.searchString || e.isReplaceRevealed || + e.isRegex || e.wholeWord || e.matchCase || e.searchScope) && (this._editor + .getModel().isTooLargeForSyncing() ? (this._startSearchingTimer.cancel(), + this._startSearchingTimer.setIfNotSet((() => { + e.searchScope ? this.research(e.moveCursor, this._state.searchScope) : + this.research(e.moveCursor) + }), 240)) : e.searchScope ? this.research(e.moveCursor, this._state + .searchScope) : this.research(e.moveCursor)) + } + static _getSearchRange(e, t) { + return t || e.getFullModelRange() + } + research(e, t) { + let i = null; + void 0 !== t ? null !== t && (i = Array.isArray(t) ? t : [t]) : i = + this._decorations.getFindScopes(), null !== i && (i = i.map((e => { + if (e.startLineNumber !== e.endLineNumber) { + let t = e.endLineNumber; + return 1 === e.endColumn && (t -= 1), new h.e(e.startLineNumber, + 1, t, this._editor.getModel().getLineMaxColumn(t)) + } + return e + }))); + let n = this._findMatches(i, !1, Z); + this._decorations.set(n, i); + const o = this._editor.getSelection(); + let r = this._decorations.getCurrentMatchesPosition(o); + if (0 === r && n.length > 0) { + const e = (0, E.lG)(n.map((e => e.range)), (e => h.e.compareRangesUsingStarts( + e, o) >= 0)); + r = e > 0 ? e - 1 + 1 : r + } + this._state.changeMatchInfo(r, this._decorations.getCount(), void 0), + e && this._editor.getOption(34).cursorMoveOnType && this._moveToNextMatch( + this._decorations.getStartPosition()) + } + _hasMatches() { + return this._state.matchesCount > 0 + } + _cannotFind() { + if (!this._hasMatches()) { + let e = this._decorations.getFindScope(); + return e && this._editor.revealRangeInCenterIfOutsideViewport(e, 0), ! + 0 + } + return !1 + } + _setCurrentFindMatch(e) { + let t = this._decorations.setCurrentFindMatch(e); + this._state.changeMatchInfo(t, this._decorations.getCount(), e), this._editor + .setSelection(e), this._editor.revealRangeInCenterIfOutsideViewport(e, + 0) + } + _prevSearchPosition(e) { + let t = this._state.isRegex && (this._state.searchString.indexOf("^") >= + 0 || this._state.searchString.indexOf("$") >= 0), + { + lineNumber: i, + column: n + } = e, + o = this._editor.getModel(); + return t || 1 === n ? (1 === i ? i = o.getLineCount() : i--, n = o.getLineMaxColumn( + i)) : n--, new c.L(i, n) + } + _moveToPrevMatch(e, t = !1) { + if (!this._state.canNavigateBack()) { + const t = this._decorations.matchAfterPosition(e); + return void(t && this._setCurrentFindMatch(t)) + } + if (this._decorations.getCount() < Z) { + let t = this._decorations.matchBeforePosition(e); + return t && t.isEmpty() && t.getStartPosition().equals(e) && (e = + this._prevSearchPosition(e), t = this._decorations.matchBeforePosition( + e)), void(t && this._setCurrentFindMatch(t)) + } + if (this._cannotFind()) return; + let i = this._decorations.getFindScope(), + n = G._getSearchRange(this._editor.getModel(), i); + n.getEndPosition().isBefore(e) && (e = n.getEndPosition()), e.isBefore( + n.getStartPosition()) && (e = n.getEndPosition()); + let { + lineNumber: o, + column: r + } = e, s = this._editor.getModel(), a = new c.L(o, r), l = s.findPreviousMatch( + this._state.searchString, a, this._state.isRegex, this._state.matchCase, + this._state.wholeWord ? this._editor.getOption(116) : null, !1); + return l && l.range.isEmpty() && l.range.getStartPosition().equals(a) && + (a = this._prevSearchPosition(a), l = s.findPreviousMatch(this._state + .searchString, a, this._state.isRegex, this._state.matchCase, this._state + .wholeWord ? this._editor.getOption(116) : null, !1)), l ? t || n.containsRange( + l.range) ? void this._setCurrentFindMatch(l.range) : this._moveToPrevMatch( + l.range.getStartPosition(), !0) : void 0 + } + moveToPrevMatch() { + this._moveToPrevMatch(this._editor.getSelection().getStartPosition()) + } + _nextSearchPosition(e) { + let t = this._state.isRegex && (this._state.searchString.indexOf("^") >= + 0 || this._state.searchString.indexOf("$") >= 0), + { + lineNumber: i, + column: n + } = e, + o = this._editor.getModel(); + return t || n === o.getLineMaxColumn(i) ? (i === o.getLineCount() ? i = + 1 : i++, n = 1) : n++, new c.L(i, n) + } + _moveToNextMatch(e) { + if (!this._state.canNavigateForward()) { + const t = this._decorations.matchBeforePosition(e); + return void(t && this._setCurrentFindMatch(t)) + } + if (this._decorations.getCount() < Z) { + let t = this._decorations.matchAfterPosition(e); + return t && t.isEmpty() && t.getStartPosition().equals(e) && (e = + this._nextSearchPosition(e), t = this._decorations.matchAfterPosition( + e)), void(t && this._setCurrentFindMatch(t)) + } + let t = this._getNextMatch(e, !1, !0); + t && this._setCurrentFindMatch(t.range) + } + _getNextMatch(e, t, i, n = !1) { + if (this._cannotFind()) return null; + let o = this._decorations.getFindScope(), + r = G._getSearchRange(this._editor.getModel(), o); + r.getEndPosition().isBefore(e) && (e = r.getStartPosition()), e.isBefore( + r.getStartPosition()) && (e = r.getStartPosition()); + let { + lineNumber: s, + column: a + } = e, l = this._editor.getModel(), d = new c.L(s, a), h = l.findNextMatch( + this._state.searchString, d, this._state.isRegex, this._state.matchCase, + this._state.wholeWord ? this._editor.getOption(116) : null, t); + return i && h && h.range.isEmpty() && h.range.getStartPosition().equals( + d) && (d = this._nextSearchPosition(d), h = l.findNextMatch(this._state + .searchString, d, this._state.isRegex, this._state.matchCase, this._state + .wholeWord ? this._editor.getOption(116) : null, t)), h ? n || r.containsRange( + h.range) ? h : this._getNextMatch(h.range.getEndPosition(), t, i, !0) : + null + } + moveToNextMatch() { + this._moveToNextMatch(this._editor.getSelection().getEndPosition()) + } + _getReplacePattern() { + return this._state.isRegex ? function(e) { + if (!e || 0 === e.length) return new k(null); + let t = [], + i = new N(e); + for (let n = 0, o = e.length; n < o; n++) { + let r = e.charCodeAt(n); + if (92 !== r) { + if (36 === r) { + if (n++, n >= o) break; + let r = e.charCodeAt(n); + if (36 === r) { + i.emitUnchanged(n - 1), i.emitStatic("$", n + 1); + continue + } + if (48 === r || 38 === r) { + i.emitUnchanged(n - 1), i.emitMatchIndex(0, n + 1, t), t.length = + 0; + continue + } + if (49 <= r && r <= 57) { + let s = r - 48; + if (n + 1 < o) { + let o = e.charCodeAt(n + 1); + if (48 <= o && o <= 57) { + n++, s = 10 * s + (o - 48), i.emitUnchanged(n - 2), i.emitMatchIndex( + s, n + 1, t), t.length = 0; + continue + } + } + i.emitUnchanged(n - 1), i.emitMatchIndex(s, n + 1, t), t.length = + 0; + continue + } + } + } else { + if (n++, n >= o) break; + let r = e.charCodeAt(n); + switch (r) { + case 92: + i.emitUnchanged(n - 1), i.emitStatic("\\", n + 1); + break; + case 110: + i.emitUnchanged(n - 1), i.emitStatic("\n", n + 1); + break; + case 116: + i.emitUnchanged(n - 1), i.emitStatic("\t", n + 1); + break; + case 117: + case 85: + case 108: + case 76: + i.emitUnchanged(n - 1), i.emitStatic("", n + 1), t.push(String.fromCharCode( + r)) + } + } + } + return i.finalize() + }(this._state.replaceString) : k.fromStaticValue(this._state.replaceString) + } + replace() { + if (!this._hasMatches()) return; + let e = this._getReplacePattern(), + t = this._editor.getSelection(), + i = this._getNextMatch(t.getStartPosition(), !0, !1); + if (i) + if (t.equalsRange(i.range)) { + let n = e.buildReplaceString(i.matches, this._state.preserveCase), + o = new d.T4(t, n); + this._executeEditorCommand("replace", o), this._decorations.setStartPosition( + new c.L(t.startLineNumber, t.startColumn + n.length)), this.research(! + 0) + } else this._decorations.setStartPosition(this._editor.getPosition()), + this._setCurrentFindMatch(i.range) + } + _findMatches(e, t, i) { + const n = (e || [null]).map((e => G._getSearchRange(this._editor.getModel(), + e))); + return this._editor.getModel().findMatches(this._state.searchString, n, + this._state.isRegex, this._state.matchCase, this._state.wholeWord ? + this._editor.getOption(116) : null, t, i) + } + replaceAll() { + if (!this._hasMatches()) return; + const e = this._decorations.getFindScopes(); + null === e && this._state.matchesCount >= Z ? this._largeReplaceAll() : + this._regularReplaceAll(e), this.research(!1) + } + _largeReplaceAll() { + const e = new g.bc(this._state.searchString, this._state.isRegex, this + ._state.matchCase, this._state.wholeWord ? this._editor.getOption( + 116) : null).parseSearchRequest(); + if (!e) return; + let t = e.regex; + if (!t.multiline) { + let e = "mu"; + t.ignoreCase && (e += "i"), t.global && (e += "g"), t = new RegExp(t.source, + e) + } + const i = this._editor.getModel(), + n = i.getValue(1), + o = i.getFullModelRange(), + r = this._getReplacePattern(); + let s; + const a = this._state.preserveCase; + s = r.hasReplacementPatterns || a ? n.replace(t, (function() { + return r.buildReplaceString(arguments, a) + })) : n.replace(t, r.buildReplaceString(null, a)); + let l = new d.hP(o, s, this._editor.getSelection()); + this._executeEditorCommand("replaceAll", l) + } + _regularReplaceAll(e) { + const t = this._getReplacePattern(); + let i = this._findMatches(e, t.hasReplacementPatterns || this._state.preserveCase, + 1073741824), + n = []; + for (let e = 0, o = i.length; e < o; e++) n[e] = t.buildReplaceString( + i[e].matches, this._state.preserveCase); + let o = new v(this._editor.getSelection(), i.map((e => e.range)), n); + this._executeEditorCommand("replaceAll", o) + } + selectAllMatches() { + if (!this._hasMatches()) return; + let e = this._decorations.getFindScopes(), + t = this._findMatches(e, !1, 1073741824).map((e => new u.Y(e.range.startLineNumber, + e.range.startColumn, e.range.endLineNumber, e.range.endColumn))), + i = this._editor.getSelection(); + for (let e = 0, n = t.length; e < n; e++) + if (t[e].equalsRange(i)) { + t = [i].concat(t.slice(0, e)).concat(t.slice(e + 1)); + break + } + this._editor.setSelections(t) + } + _executeEditorCommand(e, t) { + try { + this._ignoreModelContentChanged = !0, this._editor.pushUndoStop(), + this._editor.executeCommand(e, t), this._editor.pushUndoStop() + } finally { + this._ignoreModelContentChanged = !1 + } + } + } + var Y = i(5321), + Q = i(3794), + X = i(3046), + J = i(1264), + ee = i(4669), + te = i(3379), + ie = i.n(te), + ne = i(7795), + oe = i.n(ne), + re = i(569), + se = i.n(re), + ae = i(3565), + le = i.n(ae), + de = i(9216), + ce = i.n(de), + he = i(4589), + ue = i.n(he), + ge = i(4664), + pe = {}; + pe.styleTagTransform = ue(), pe.setAttributes = le(), pe.insert = se().bind( + null, "head"), pe.domAPI = oe(), pe.insertStyleElement = ce(), ie()(ge.Z, + pe), ge.Z && ge.Z.locals && ge.Z.locals; + const me = { + inputActiveOptionBorder: J.Il.fromHex("#007ACC00"), + inputActiveOptionForeground: J.Il.fromHex("#FFFFFF"), + inputActiveOptionBackground: J.Il.fromHex("#0E639C50") + }; + class fe extends Q.$ { + constructor(e) { + super(), this._onChange = this._register(new ee.Q5), this.onChange = + this._onChange.event, this._onKeyDown = this._register(new ee.Q5), + this.onKeyDown = this._onKeyDown.event, this._opts = Object.assign( + Object.assign({}, me), e), this._checked = this._opts.isChecked; + const t = ["monaco-custom-checkbox"]; + this._opts.icon && t.push(...X.dT.asClassNameArray(this._opts.icon)), + this._opts.actionClassName && t.push(...this._opts.actionClassName.split( + " ")), this._checked && t.push("checked"), this.domNode = document.createElement( + "div"), this.domNode.title = this._opts.title, this.domNode.classList + .add(...t), this._opts.notFocusable || (this.domNode.tabIndex = 0), + this.domNode.setAttribute("role", "checkbox"), this.domNode.setAttribute( + "aria-checked", String(this._checked)), this.domNode.setAttribute( + "aria-label", this._opts.title), this.applyStyles(), this.onclick( + this.domNode, (e => { + this.checked = !this._checked, this._onChange.fire(!1), e.preventDefault() + })), this.ignoreGesture(this.domNode), this.onkeydown(this.domNode, ( + e => { + if (10 === e.keyCode || 3 === e.keyCode) return this.checked = ! + this._checked, this._onChange.fire(!0), void e.preventDefault(); + this._onKeyDown.fire(e) + })) + } + get enabled() { + return "true" !== this.domNode.getAttribute("aria-disabled") + } + focus() { + this.domNode.focus() + } + get checked() { + return this._checked + } + set checked(e) { + this._checked = e, this.domNode.setAttribute("aria-checked", String( + this._checked)), this.domNode.classList.toggle("checked", this._checked), + this.applyStyles() + } + width() { + return 22 + } + style(e) { + e.inputActiveOptionBorder && (this._opts.inputActiveOptionBorder = e.inputActiveOptionBorder), + e.inputActiveOptionForeground && (this._opts.inputActiveOptionForeground = + e.inputActiveOptionForeground), e.inputActiveOptionBackground && ( + this._opts.inputActiveOptionBackground = e.inputActiveOptionBackground + ), this.applyStyles() + } + applyStyles() { + this.domNode && (this.domNode.style.borderColor = this._checked && + this._opts.inputActiveOptionBorder ? this._opts.inputActiveOptionBorder + .toString() : "transparent", this.domNode.style.color = this._checked && + this._opts.inputActiveOptionForeground ? this._opts.inputActiveOptionForeground + .toString() : "inherit", this.domNode.style.backgroundColor = this._checked && + this._opts.inputActiveOptionBackground ? this._opts.inputActiveOptionBackground + .toString() : "transparent") + } + enable() { + this.domNode.setAttribute("aria-disabled", String(!1)) + } + disable() { + this.domNode.setAttribute("aria-disabled", String(!0)) + } + } + const _e = n.N("caseDescription", "Match Case"), + be = n.N("wordsDescription", "Match Whole Word"), + ve = n.N("regexDescription", "Use Regular Expression"); + class we extends fe { + constructor(e) { + super({ + icon: X.lA.caseSensitive, + title: _e + e.appendTitle, + isChecked: e.isChecked, + inputActiveOptionBorder: e.inputActiveOptionBorder, + inputActiveOptionForeground: e.inputActiveOptionForeground, + inputActiveOptionBackground: e.inputActiveOptionBackground + }) + } + } + class Ce extends fe { + constructor(e) { + super({ + icon: X.lA.wholeWord, + title: be + e.appendTitle, + isChecked: e.isChecked, + inputActiveOptionBorder: e.inputActiveOptionBorder, + inputActiveOptionForeground: e.inputActiveOptionForeground, + inputActiveOptionBackground: e.inputActiveOptionBackground + }) + } + } + class ye extends fe { + constructor(e) { + super({ + icon: X.lA.regex, + title: ve + e.appendTitle, + isChecked: e.isChecked, + inputActiveOptionBorder: e.inputActiveOptionBorder, + inputActiveOptionForeground: e.inputActiveOptionForeground, + inputActiveOptionBackground: e.inputActiveOptionBackground + }) + } + } + class Se extends Q.$ { + constructor(e, t, i, n) { + super(), this._hideSoon = this._register(new o.pY((() => this._hide()), + 2e3)), this._isVisible = !1, this._editor = e, this._state = t, + this._keybindingService = i, this._domNode = document.createElement( + "div"), this._domNode.className = "findOptionsWidget", this._domNode + .style.display = "none", this._domNode.style.top = "10px", this._domNode + .setAttribute("role", "presentation"), this._domNode.setAttribute( + "aria-hidden", "true"); + const r = n.getColorTheme().getColor(f.PR), + s = n.getColorTheme().getColor(f.Pv), + a = n.getColorTheme().getColor(f.XE); + this.caseSensitive = this._register(new we({ + appendTitle: this._keybindingLabelFor(V), + isChecked: this._state.matchCase, + inputActiveOptionBorder: r, + inputActiveOptionForeground: s, + inputActiveOptionBackground: a + })), this._domNode.appendChild(this.caseSensitive.domNode), this._register( + this.caseSensitive.onChange((() => { + this._state.change({ + matchCase: this.caseSensitive.checked + }, !1) + }))), this.wholeWords = this._register(new Ce({ + appendTitle: this._keybindingLabelFor(H), + isChecked: this._state.wholeWord, + inputActiveOptionBorder: r, + inputActiveOptionForeground: s, + inputActiveOptionBackground: a + })), this._domNode.appendChild(this.wholeWords.domNode), this._register( + this.wholeWords.onChange((() => { + this._state.change({ + wholeWord: this.wholeWords.checked + }, !1) + }))), this.regex = this._register(new ye({ + appendTitle: this._keybindingLabelFor(U), + isChecked: this._state.isRegex, + inputActiveOptionBorder: r, + inputActiveOptionForeground: s, + inputActiveOptionBackground: a + })), this._domNode.appendChild(this.regex.domNode), this._register( + this.regex.onChange((() => { + this._state.change({ + isRegex: this.regex.checked + }, !1) + }))), this._editor.addOverlayWidget(this), this._register(this._state + .onFindReplaceStateChange((e => { + let t = !1; + e.isRegex && (this.regex.checked = this._state.isRegex, t = !0), + e.wholeWord && (this.wholeWords.checked = this._state.wholeWord, + t = !0), e.matchCase && (this.caseSensitive.checked = this._state + .matchCase, t = !0), !this._state.isRevealed && t && this._revealTemporarily() + }))), this._register(Y.j_(this._domNode, (e => this._onMouseOut()))), + this._register(Y.nm(this._domNode, "mouseover", (e => this._onMouseOver()))), + this._applyTheme(n.getColorTheme()), this._register(n.onDidColorThemeChange( + this._applyTheme.bind(this))) + } + _keybindingLabelFor(e) { + let t = this._keybindingService.lookupKeybinding(e); + return t ? ` (${t.getLabel()})` : "" + } + dispose() { + this._editor.removeOverlayWidget(this), super.dispose() + } + getId() { + return Se.ID + } + getDomNode() { + return this._domNode + } + getPosition() { + return { + preference: 0 + } + } + highlightFindOptions() { + this._revealTemporarily() + } + _revealTemporarily() { + this._show(), this._hideSoon.schedule() + } + _onMouseOut() { + this._hideSoon.schedule() + } + _onMouseOver() { + this._hideSoon.cancel() + } + _show() { + this._isVisible || (this._isVisible = !0, this._domNode.style.display = + "block") + } + _hide() { + this._isVisible && (this._isVisible = !1, this._domNode.style.display = + "none") + } + _applyTheme(e) { + let t = { + inputActiveOptionBorder: e.getColor(f.PR), + inputActiveOptionForeground: e.getColor(f.Pv), + inputActiveOptionBackground: e.getColor(f.XE) + }; + this.caseSensitive.style(t), this.wholeWords.style(t), this.regex.style( + t) + } + } + + function xe(e, t) { + return 1 === e || 2 !== e && t + } + Se.ID = "editor.contrib.findOptionsWidget", (0, _.Ic)(((e, t) => { + const i = e.getColor(f.D0); + i && t.addRule( + `.monaco-editor .findOptionsWidget { background-color: ${i}; }`); + const n = e.getColor(f.Hf); + n && t.addRule(`.monaco-editor .findOptionsWidget { color: ${n}; }`); + const o = e.getColor(f.rh); + o && t.addRule( + `.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${o}; }` + ); + const r = e.getColor(f.lR); + r && t.addRule( + `.monaco-editor .findOptionsWidget { border: 2px solid ${r}; }`) + })); + class ke extends r.JT { + constructor() { + super(), this._onFindReplaceStateChange = this._register(new ee.Q5), + this.onFindReplaceStateChange = this._onFindReplaceStateChange.event, + this._searchString = "", this._replaceString = "", this._isRevealed = ! + 1, this._isReplaceRevealed = !1, this._isRegex = !1, this._isRegexOverride = + 0, this._wholeWord = !1, this._wholeWordOverride = 0, this._matchCase = ! + 1, this._matchCaseOverride = 0, this._preserveCase = !1, this._preserveCaseOverride = + 0, this._searchScope = null, this._matchesPosition = 0, this._matchesCount = + 0, this._currentMatch = null, this._loop = !0 + } + get searchString() { + return this._searchString + } + get replaceString() { + return this._replaceString + } + get isRevealed() { + return this._isRevealed + } + get isReplaceRevealed() { + return this._isReplaceRevealed + } + get isRegex() { + return xe(this._isRegexOverride, this._isRegex) + } + get wholeWord() { + return xe(this._wholeWordOverride, this._wholeWord) + } + get matchCase() { + return xe(this._matchCaseOverride, this._matchCase) + } + get preserveCase() { + return xe(this._preserveCaseOverride, this._preserveCase) + } + get actualIsRegex() { + return this._isRegex + } + get actualWholeWord() { + return this._wholeWord + } + get actualMatchCase() { + return this._matchCase + } + get actualPreserveCase() { + return this._preserveCase + } + get searchScope() { + return this._searchScope + } + get matchesPosition() { + return this._matchesPosition + } + get matchesCount() { + return this._matchesCount + } + get currentMatch() { + return this._currentMatch + } + changeMatchInfo(e, t, i) { + let n = { + moveCursor: !1, + updateHistory: !1, + searchString: !1, + replaceString: !1, + isRevealed: !1, + isReplaceRevealed: !1, + isRegex: !1, + wholeWord: !1, + matchCase: !1, + preserveCase: !1, + searchScope: !1, + matchesPosition: !1, + matchesCount: !1, + currentMatch: !1, + loop: !1 + }, + o = !1; + 0 === t && (e = 0), e > t && (e = t), this._matchesPosition !== e && + (this._matchesPosition = e, n.matchesPosition = !0, o = !0), this._matchesCount !== + t && (this._matchesCount = t, n.matchesCount = !0, o = !0), void 0 !== + i && (h.e.equalsRange(this._currentMatch, i) || (this._currentMatch = + i, n.currentMatch = !0, o = !0)), o && this._onFindReplaceStateChange + .fire(n) + } + change(e, t, i = !0) { + var n; + let o = { + moveCursor: t, + updateHistory: i, + searchString: !1, + replaceString: !1, + isRevealed: !1, + isReplaceRevealed: !1, + isRegex: !1, + wholeWord: !1, + matchCase: !1, + preserveCase: !1, + searchScope: !1, + matchesPosition: !1, + matchesCount: !1, + currentMatch: !1, + loop: !1 + }, + r = !1; + const s = this.isRegex, + a = this.wholeWord, + l = this.matchCase, + d = this.preserveCase; + void 0 !== e.searchString && this._searchString !== e.searchString && + (this._searchString = e.searchString, o.searchString = !0, r = !0), + void 0 !== e.replaceString && this._replaceString !== e.replaceString && + (this._replaceString = e.replaceString, o.replaceString = !0, r = !0), + void 0 !== e.isRevealed && this._isRevealed !== e.isRevealed && ( + this._isRevealed = e.isRevealed, o.isRevealed = !0, r = !0), void 0 !== + e.isReplaceRevealed && this._isReplaceRevealed !== e.isReplaceRevealed && + (this._isReplaceRevealed = e.isReplaceRevealed, o.isReplaceRevealed = ! + 0, r = !0), void 0 !== e.isRegex && (this._isRegex = e.isRegex), + void 0 !== e.wholeWord && (this._wholeWord = e.wholeWord), void 0 !== + e.matchCase && (this._matchCase = e.matchCase), void 0 !== e.preserveCase && + (this._preserveCase = e.preserveCase), void 0 !== e.searchScope && ( + (null === (n = e.searchScope) || void 0 === n ? void 0 : n.every((e => { + var t; + return null === (t = this._searchScope) || void 0 === t ? void 0 : + t.some((t => !h.e.equalsRange(t, e))) + }))) || (this._searchScope = e.searchScope, o.searchScope = !0, r = ! + 0)), void 0 !== e.loop && this._loop !== e.loop && (this._loop = e + .loop, o.loop = !0, r = !0), this._isRegexOverride = void 0 !== e.isRegexOverride ? + e.isRegexOverride : 0, this._wholeWordOverride = void 0 !== e.wholeWordOverride ? + e.wholeWordOverride : 0, this._matchCaseOverride = void 0 !== e.matchCaseOverride ? + e.matchCaseOverride : 0, this._preserveCaseOverride = void 0 !== e.preserveCaseOverride ? + e.preserveCaseOverride : 0, s !== this.isRegex && (r = !0, o.isRegex = ! + 0), a !== this.wholeWord && (r = !0, o.wholeWord = !0), l !== this.matchCase && + (r = !0, o.matchCase = !0), d !== this.preserveCase && (r = !0, o.preserveCase = ! + 0), r && this._onFindReplaceStateChange.fire(o) + } + canNavigateBack() { + return this.canNavigateInLoop() || 1 !== this.matchesPosition + } + canNavigateForward() { + return this.canNavigateInLoop() || this.matchesPosition < this.matchesCount + } + canNavigateInLoop() { + return this._loop || this.matchesCount >= Z + } + } + var Le = i(5160), + Ne = {}; + Ne.styleTagTransform = ue(), Ne.setAttributes = le(), Ne.insert = se().bind( + null, "head"), Ne.domAPI = oe(), Ne.insertStyleElement = ce(), ie()(Le.Z, + Ne), Le.Z && Le.Z.locals && Le.Z.locals; + var De = i(6346), + Ee = i(3841), + Ie = i(7301), + Te = i(1432), + Me = i(4299), + Ae = i(6266), + Re = {}; + Re.styleTagTransform = ue(), Re.setAttributes = le(), Re.insert = se().bind( + null, "head"), Re.domAPI = oe(), Re.insertStyleElement = ce(), ie()(Ae.Z, + Re), Ae.Z && Ae.Z.locals && Ae.Z.locals; + const Oe = n.N("defaultLabel", "input"); + class Pe extends Q.$ { + constructor(e, t, i, n) { + super(), this._showOptionButtons = i, this.fixFocusOnOptionClickEnabled = ! + 0, this.imeSessionInProgress = !1, this._onDidOptionChange = this._register( + new ee.Q5), this.onDidOptionChange = this._onDidOptionChange.event, + this._onKeyDown = this._register(new ee.Q5), this.onKeyDown = this._onKeyDown + .event, this._onMouseDown = this._register(new ee.Q5), this.onMouseDown = + this._onMouseDown.event, this._onInput = this._register(new ee.Q5), + this._onKeyUp = this._register(new ee.Q5), this._onCaseSensitiveKeyDown = + this._register(new ee.Q5), this.onCaseSensitiveKeyDown = this._onCaseSensitiveKeyDown + .event, this._onRegexKeyDown = this._register(new ee.Q5), this.onRegexKeyDown = + this._onRegexKeyDown.event, this._lastHighlightFindOptions = 0, this + .contextViewProvider = t, this.placeholder = n.placeholder || "", + this.validation = n.validation, this.label = n.label || Oe, this.inputActiveOptionBorder = + n.inputActiveOptionBorder, this.inputActiveOptionForeground = n.inputActiveOptionForeground, + this.inputActiveOptionBackground = n.inputActiveOptionBackground, + this.inputBackground = n.inputBackground, this.inputForeground = n.inputForeground, + this.inputBorder = n.inputBorder, this.inputValidationInfoBorder = n + .inputValidationInfoBorder, this.inputValidationInfoBackground = n.inputValidationInfoBackground, + this.inputValidationInfoForeground = n.inputValidationInfoForeground, + this.inputValidationWarningBorder = n.inputValidationWarningBorder, + this.inputValidationWarningBackground = n.inputValidationWarningBackground, + this.inputValidationWarningForeground = n.inputValidationWarningForeground, + this.inputValidationErrorBorder = n.inputValidationErrorBorder, this + .inputValidationErrorBackground = n.inputValidationErrorBackground, + this.inputValidationErrorForeground = n.inputValidationErrorForeground; + const o = n.appendCaseSensitiveLabel || "", + r = n.appendWholeWordsLabel || "", + s = n.appendRegexLabel || "", + a = n.history || [], + l = !!n.flexibleHeight, + d = !!n.flexibleWidth, + c = n.flexibleMaxHeight; + this.domNode = document.createElement("div"), this.domNode.classList.add( + "monaco-findInput"), this.inputBox = this._register(new Me.p(this.domNode, + this.contextViewProvider, { + placeholder: this.placeholder || "", + ariaLabel: this.label || "", + validationOptions: { + validation: this.validation + }, + inputBackground: this.inputBackground, + inputForeground: this.inputForeground, + inputBorder: this.inputBorder, + inputValidationInfoBackground: this.inputValidationInfoBackground, + inputValidationInfoForeground: this.inputValidationInfoForeground, + inputValidationInfoBorder: this.inputValidationInfoBorder, + inputValidationWarningBackground: this.inputValidationWarningBackground, + inputValidationWarningForeground: this.inputValidationWarningForeground, + inputValidationWarningBorder: this.inputValidationWarningBorder, + inputValidationErrorBackground: this.inputValidationErrorBackground, + inputValidationErrorForeground: this.inputValidationErrorForeground, + inputValidationErrorBorder: this.inputValidationErrorBorder, + history: a, + flexibleHeight: l, + flexibleWidth: d, + flexibleMaxHeight: c + })), this.regex = this._register(new ye({ + appendTitle: s, + isChecked: !1, + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionForeground: this.inputActiveOptionForeground, + inputActiveOptionBackground: this.inputActiveOptionBackground + })), this._register(this.regex.onChange((e => { + this._onDidOptionChange.fire(e), !e && this.fixFocusOnOptionClickEnabled && + this.inputBox.focus(), this.validate() + }))), this._register(this.regex.onKeyDown((e => { + this._onRegexKeyDown.fire(e) + }))), this.wholeWords = this._register(new Ce({ + appendTitle: r, + isChecked: !1, + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionForeground: this.inputActiveOptionForeground, + inputActiveOptionBackground: this.inputActiveOptionBackground + })), this._register(this.wholeWords.onChange((e => { + this._onDidOptionChange.fire(e), !e && this.fixFocusOnOptionClickEnabled && + this.inputBox.focus(), this.validate() + }))), this.caseSensitive = this._register(new we({ + appendTitle: o, + isChecked: !1, + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionForeground: this.inputActiveOptionForeground, + inputActiveOptionBackground: this.inputActiveOptionBackground + })), this._register(this.caseSensitive.onChange((e => { + this._onDidOptionChange.fire(e), !e && this.fixFocusOnOptionClickEnabled && + this.inputBox.focus(), this.validate() + }))), this._register(this.caseSensitive.onKeyDown((e => { + this._onCaseSensitiveKeyDown.fire(e) + }))), this._showOptionButtons && (this.inputBox.paddingRight = this.caseSensitive + .width() + this.wholeWords.width() + this.regex.width()); + let h = [this.caseSensitive.domNode, this.wholeWords.domNode, this.regex + .domNode + ]; + this.onkeydown(this.domNode, (e => { + if (e.equals(15) || e.equals(17) || e.equals(9)) { + let t = h.indexOf(document.activeElement); + if (t >= 0) { + let i = -1; + e.equals(17) ? i = (t + 1) % h.length : e.equals(15) && (i = 0 === + t ? h.length - 1 : t - 1), e.equals(9) ? (h[t].blur(), this.inputBox + .focus()) : i >= 0 && h[i].focus(), Y.zB.stop(e, !0) + } + } + })); + let u = document.createElement("div"); + u.className = "controls", u.style.display = this._showOptionButtons ? + "block" : "none", u.appendChild(this.caseSensitive.domNode), u.appendChild( + this.wholeWords.domNode), u.appendChild(this.regex.domNode), this.domNode + .appendChild(u), e && e.appendChild(this.domNode), this._register(Y.nm( + this.inputBox.inputElement, "compositionstart", (e => { + this.imeSessionInProgress = !0 + }))), this._register(Y.nm(this.inputBox.inputElement, + "compositionend", (e => { + this.imeSessionInProgress = !1, this._onInput.fire() + }))), this.onkeydown(this.inputBox.inputElement, (e => this._onKeyDown + .fire(e))), this.onkeyup(this.inputBox.inputElement, (e => this._onKeyUp + .fire(e))), this.oninput(this.inputBox.inputElement, (e => this._onInput + .fire())), this.onmousedown(this.inputBox.inputElement, (e => this._onMouseDown + .fire(e))) + } + enable() { + this.domNode.classList.remove("disabled"), this.inputBox.enable(), + this.regex.enable(), this.wholeWords.enable(), this.caseSensitive.enable() + } + disable() { + this.domNode.classList.add("disabled"), this.inputBox.disable(), this + .regex.disable(), this.wholeWords.disable(), this.caseSensitive.disable() + } + setFocusInputOnOptionClick(e) { + this.fixFocusOnOptionClickEnabled = e + } + setEnabled(e) { + e ? this.enable() : this.disable() + } + getValue() { + return this.inputBox.value + } + setValue(e) { + this.inputBox.value !== e && (this.inputBox.value = e) + } + style(e) { + this.inputActiveOptionBorder = e.inputActiveOptionBorder, this.inputActiveOptionForeground = + e.inputActiveOptionForeground, this.inputActiveOptionBackground = e.inputActiveOptionBackground, + this.inputBackground = e.inputBackground, this.inputForeground = e.inputForeground, + this.inputBorder = e.inputBorder, this.inputValidationInfoBackground = + e.inputValidationInfoBackground, this.inputValidationInfoForeground = + e.inputValidationInfoForeground, this.inputValidationInfoBorder = e.inputValidationInfoBorder, + this.inputValidationWarningBackground = e.inputValidationWarningBackground, + this.inputValidationWarningForeground = e.inputValidationWarningForeground, + this.inputValidationWarningBorder = e.inputValidationWarningBorder, + this.inputValidationErrorBackground = e.inputValidationErrorBackground, + this.inputValidationErrorForeground = e.inputValidationErrorForeground, + this.inputValidationErrorBorder = e.inputValidationErrorBorder, this + .applyStyles() + } + applyStyles() { + if (this.domNode) { + const e = { + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionForeground: this.inputActiveOptionForeground, + inputActiveOptionBackground: this.inputActiveOptionBackground + }; + this.regex.style(e), this.wholeWords.style(e), this.caseSensitive.style( + e); + const t = { + inputBackground: this.inputBackground, + inputForeground: this.inputForeground, + inputBorder: this.inputBorder, + inputValidationInfoBackground: this.inputValidationInfoBackground, + inputValidationInfoForeground: this.inputValidationInfoForeground, + inputValidationInfoBorder: this.inputValidationInfoBorder, + inputValidationWarningBackground: this.inputValidationWarningBackground, + inputValidationWarningForeground: this.inputValidationWarningForeground, + inputValidationWarningBorder: this.inputValidationWarningBorder, + inputValidationErrorBackground: this.inputValidationErrorBackground, + inputValidationErrorForeground: this.inputValidationErrorForeground, + inputValidationErrorBorder: this.inputValidationErrorBorder + }; + this.inputBox.style(t) + } + } + select() { + this.inputBox.select() + } + focus() { + this.inputBox.focus() + } + getCaseSensitive() { + return this.caseSensitive.checked + } + setCaseSensitive(e) { + this.caseSensitive.checked = e + } + getWholeWords() { + return this.wholeWords.checked + } + setWholeWords(e) { + this.wholeWords.checked = e + } + getRegex() { + return this.regex.checked + } + setRegex(e) { + this.regex.checked = e, this.validate() + } + focusOnCaseSensitive() { + this.caseSensitive.focus() + } + highlightFindOptions() { + this.domNode.classList.remove("highlight-" + this._lastHighlightFindOptions), + this._lastHighlightFindOptions = 1 - this._lastHighlightFindOptions, + this.domNode.classList.add("highlight-" + this._lastHighlightFindOptions) + } + validate() { + this.inputBox.validate() + } + clearMessage() { + this.inputBox.hideMessage() + } + } + const Fe = n.N("defaultLabel", "input"), + Be = n.N("label.preserveCaseCheckbox", "Preserve Case"); + class We extends fe { + constructor(e) { + super({ + icon: X.lA.preserveCase, + title: Be + e.appendTitle, + isChecked: e.isChecked, + inputActiveOptionBorder: e.inputActiveOptionBorder, + inputActiveOptionForeground: e.inputActiveOptionForeground, + inputActiveOptionBackground: e.inputActiveOptionBackground + }) + } + } + class ze extends Q.$ { + constructor(e, t, i, n) { + super(), this._showOptionButtons = i, this.fixFocusOnOptionClickEnabled = ! + 0, this.cachedOptionsWidth = 0, this._onDidOptionChange = this._register( + new ee.Q5), this.onDidOptionChange = this._onDidOptionChange.event, + this._onKeyDown = this._register(new ee.Q5), this.onKeyDown = this._onKeyDown + .event, this._onMouseDown = this._register(new ee.Q5), this._onInput = + this._register(new ee.Q5), this._onKeyUp = this._register(new ee.Q5), + this._onPreserveCaseKeyDown = this._register(new ee.Q5), this.onPreserveCaseKeyDown = + this._onPreserveCaseKeyDown.event, this.contextViewProvider = t, + this.placeholder = n.placeholder || "", this.validation = n.validation, + this.label = n.label || Fe, this.inputActiveOptionBorder = n.inputActiveOptionBorder, + this.inputActiveOptionForeground = n.inputActiveOptionForeground, + this.inputActiveOptionBackground = n.inputActiveOptionBackground, + this.inputBackground = n.inputBackground, this.inputForeground = n.inputForeground, + this.inputBorder = n.inputBorder, this.inputValidationInfoBorder = n + .inputValidationInfoBorder, this.inputValidationInfoBackground = n.inputValidationInfoBackground, + this.inputValidationInfoForeground = n.inputValidationInfoForeground, + this.inputValidationWarningBorder = n.inputValidationWarningBorder, + this.inputValidationWarningBackground = n.inputValidationWarningBackground, + this.inputValidationWarningForeground = n.inputValidationWarningForeground, + this.inputValidationErrorBorder = n.inputValidationErrorBorder, this + .inputValidationErrorBackground = n.inputValidationErrorBackground, + this.inputValidationErrorForeground = n.inputValidationErrorForeground; + const o = n.appendPreserveCaseLabel || "", + r = n.history || [], + s = !!n.flexibleHeight, + a = !!n.flexibleWidth, + l = n.flexibleMaxHeight; + this.domNode = document.createElement("div"), this.domNode.classList.add( + "monaco-findInput"), this.inputBox = this._register(new Me.p(this.domNode, + this.contextViewProvider, { + ariaLabel: this.label || "", + placeholder: this.placeholder || "", + validationOptions: { + validation: this.validation + }, + inputBackground: this.inputBackground, + inputForeground: this.inputForeground, + inputBorder: this.inputBorder, + inputValidationInfoBackground: this.inputValidationInfoBackground, + inputValidationInfoForeground: this.inputValidationInfoForeground, + inputValidationInfoBorder: this.inputValidationInfoBorder, + inputValidationWarningBackground: this.inputValidationWarningBackground, + inputValidationWarningForeground: this.inputValidationWarningForeground, + inputValidationWarningBorder: this.inputValidationWarningBorder, + inputValidationErrorBackground: this.inputValidationErrorBackground, + inputValidationErrorForeground: this.inputValidationErrorForeground, + inputValidationErrorBorder: this.inputValidationErrorBorder, + history: r, + flexibleHeight: s, + flexibleWidth: a, + flexibleMaxHeight: l + })), this.preserveCase = this._register(new We({ + appendTitle: o, + isChecked: !1, + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionForeground: this.inputActiveOptionForeground, + inputActiveOptionBackground: this.inputActiveOptionBackground + })), this._register(this.preserveCase.onChange((e => { + this._onDidOptionChange.fire(e), !e && this.fixFocusOnOptionClickEnabled && + this.inputBox.focus(), this.validate() + }))), this._register(this.preserveCase.onKeyDown((e => { + this._onPreserveCaseKeyDown.fire(e) + }))), this._showOptionButtons ? this.cachedOptionsWidth = this.preserveCase + .width() : this.cachedOptionsWidth = 0; + let d = [this.preserveCase.domNode]; + this.onkeydown(this.domNode, (e => { + if (e.equals(15) || e.equals(17) || e.equals(9)) { + let t = d.indexOf(document.activeElement); + if (t >= 0) { + let i = -1; + e.equals(17) ? i = (t + 1) % d.length : e.equals(15) && (i = 0 === + t ? d.length - 1 : t - 1), e.equals(9) ? (d[t].blur(), this.inputBox + .focus()) : i >= 0 && d[i].focus(), Y.zB.stop(e, !0) + } + } + })); + let c = document.createElement("div"); + c.className = "controls", c.style.display = this._showOptionButtons ? + "block" : "none", c.appendChild(this.preserveCase.domNode), this.domNode + .appendChild(c), e && e.appendChild(this.domNode), this.onkeydown( + this.inputBox.inputElement, (e => this._onKeyDown.fire(e))), this.onkeyup( + this.inputBox.inputElement, (e => this._onKeyUp.fire(e))), this.oninput( + this.inputBox.inputElement, (e => this._onInput.fire())), this.onmousedown( + this.inputBox.inputElement, (e => this._onMouseDown.fire(e))) + } + enable() { + this.domNode.classList.remove("disabled"), this.inputBox.enable(), + this.preserveCase.enable() + } + disable() { + this.domNode.classList.add("disabled"), this.inputBox.disable(), this + .preserveCase.disable() + } + setEnabled(e) { + e ? this.enable() : this.disable() + } + style(e) { + this.inputActiveOptionBorder = e.inputActiveOptionBorder, this.inputActiveOptionForeground = + e.inputActiveOptionForeground, this.inputActiveOptionBackground = e.inputActiveOptionBackground, + this.inputBackground = e.inputBackground, this.inputForeground = e.inputForeground, + this.inputBorder = e.inputBorder, this.inputValidationInfoBackground = + e.inputValidationInfoBackground, this.inputValidationInfoForeground = + e.inputValidationInfoForeground, this.inputValidationInfoBorder = e.inputValidationInfoBorder, + this.inputValidationWarningBackground = e.inputValidationWarningBackground, + this.inputValidationWarningForeground = e.inputValidationWarningForeground, + this.inputValidationWarningBorder = e.inputValidationWarningBorder, + this.inputValidationErrorBackground = e.inputValidationErrorBackground, + this.inputValidationErrorForeground = e.inputValidationErrorForeground, + this.inputValidationErrorBorder = e.inputValidationErrorBorder, this + .applyStyles() + } + applyStyles() { + if (this.domNode) { + const e = { + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionForeground: this.inputActiveOptionForeground, + inputActiveOptionBackground: this.inputActiveOptionBackground + }; + this.preserveCase.style(e); + const t = { + inputBackground: this.inputBackground, + inputForeground: this.inputForeground, + inputBorder: this.inputBorder, + inputValidationInfoBackground: this.inputValidationInfoBackground, + inputValidationInfoForeground: this.inputValidationInfoForeground, + inputValidationInfoBorder: this.inputValidationInfoBorder, + inputValidationWarningBackground: this.inputValidationWarningBackground, + inputValidationWarningForeground: this.inputValidationWarningForeground, + inputValidationWarningBorder: this.inputValidationWarningBorder, + inputValidationErrorBackground: this.inputValidationErrorBackground, + inputValidationErrorForeground: this.inputValidationErrorForeground, + inputValidationErrorBorder: this.inputValidationErrorBorder + }; + this.inputBox.style(t) + } + } + select() { + this.inputBox.select() + } + focus() { + this.inputBox.focus() + } + getPreserveCase() { + return this.preserveCase.checked + } + setPreserveCase(e) { + this.preserveCase.checked = e + } + focusOnPreserve() { + this.preserveCase.focus() + } + validate() { + this.inputBox && this.inputBox.validate() + } + set width(e) { + this.inputBox.paddingRight = this.cachedOptionsWidth, this.inputBox.width = + e, this.domNode.style.width = e + "px" + } + dispose() { + super.dispose() + } + } + var Ve = i(9989), + He = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + Ue = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const je = "historyNavigationWidget", + Ke = "historyNavigationForwardsEnabled", + $e = "historyNavigationBackwardsEnabled"; + + function qe(e, t) { + return e.getContext(document.activeElement).getValue(t) + } + + function Ze(e, t) { + const i = function(e, t) { + return e.createScoped(t.target) + }(e, t); + return function(e, t, i) { + new D.uy("historyNavigationWidget", t).bindTo(e) + }(i, t), { + scopedContextKeyService: i, + historyNavigationForwardsEnablement: new D.uy(Ke, !0).bindTo(i), + historyNavigationBackwardsEnablement: new D.uy($e, !0).bindTo(i) + } + } + let Ge = class extends Pe { + constructor(e, t, i, n, o = !1) { + super(e, t, o, i), this._register(Ze(n, { + target: this.inputBox.element, + historyNavigator: this.inputBox + }).scopedContextKeyService) + } + }; + Ge = He([Ue(3, D.i6)], Ge); + let Ye = class extends ze { + constructor(e, t, i, n, o = !1) { + super(e, t, o, i), this._register(Ze(n, { + target: this.inputBox.element, + historyNavigator: this.inputBox + }).scopedContextKeyService) + } + }; + Ye = He([Ue(3, D.i6)], Ye), Ve.W.registerCommandAndKeybindingRule({ + id: "history.showPrevious", + weight: 200, + when: D.Ao.and(D.Ao.has(je), D.Ao.equals($e, !0)), + primary: 16, + secondary: [528], + handler: e => { + const t = qe(e.get(D.i6), je); + t && t.historyNavigator.showPreviousValue() + } + }), Ve.W.registerCommandAndKeybindingRule({ + id: "history.showNext", + weight: 200, + when: D.Ao.and(D.Ao.has(je), D.Ao.equals(Ke, !0)), + primary: 18, + secondary: [530], + handler: e => { + const t = qe(e.get(D.i6), je); + t && t.historyNavigator.showNextValue() + } + }); + var Qe = i(9554); + const Xe = (0, Qe.q5)("find-selection", X.lA.selection, n.N( + "findSelectionIcon", + "Icon for 'Find in Selection' in the editor find widget.")), + Je = (0, Qe.q5)("find-collapsed", X.lA.chevronRight, n.N( + "findCollapsedIcon", + "Icon to indicate that the editor find widget is collapsed.")), + et = (0, Qe.q5)("find-expanded", X.lA.chevronDown, n.N( + "findExpandedIcon", + "Icon to indicate that the editor find widget is expanded.")), + tt = (0, Qe.q5)("find-replace", X.lA.replace, n.N("findReplaceIcon", + "Icon for 'Replace' in the editor find widget.")), + it = (0, Qe.q5)("find-replace-all", X.lA.replaceAll, n.N( + "findReplaceAllIcon", + "Icon for 'Replace All' in the editor find widget.")), + nt = (0, Qe.q5)("find-previous-match", X.lA.arrowUp, n.N( + "findPreviousMatchIcon", + "Icon for 'Find Previous' in the editor find widget.")), + ot = (0, Qe.q5)("find-next-match", X.lA.arrowDown, n.N( + "findNextMatchIcon", "Icon for 'Find Next' in the editor find widget." + )), + rt = n.N("label.find", "Find"), + st = n.N("placeholder.find", "Find"), + at = n.N("label.previousMatchButton", "Previous Match"), + lt = n.N("label.nextMatchButton", "Next Match"), + dt = n.N("label.toggleSelectionFind", "Find in Selection"), + ct = n.N("label.closeButton", "Close"), + ht = n.N("label.replace", "Replace"), + ut = n.N("placeholder.replace", "Replace"), + gt = n.N("label.replaceButton", "Replace"), + pt = n.N("label.replaceAllButton", "Replace All"), + mt = n.N("label.toggleReplaceButton", "Toggle Replace"), + ft = n.N("title.matchesCountLimit", + "Only the first {0} results are highlighted, but all find operations work on the entire text.", + Z), + _t = n.N("label.matchesLocation", "{0} of {1}"), + bt = n.N("label.noResults", "No results"), + vt = 419; + let wt = 69; + const Ct = "ctrlEnterReplaceAll.windows.donotask", + yt = Te.dz ? 256 : 2048; + class St { + constructor(e) { + this.afterLineNumber = e, this.heightInPx = 33, this.suppressMouseDown = ! + 1, this.domNode = document.createElement("div"), this.domNode.className = + "dock-find-viewzone" + } + } + + function xt(e, t, i) { + const n = !!t.match(/\n/); + i && n && i.selectionStart > 0 && e.stopPropagation() + } + + function kt(e, t, i) { + const n = !!t.match(/\n/); + i && n && i.selectionEnd < i.value.length && e.stopPropagation() + } + class Lt extends Q.$ { + constructor(e, t, i, n, s, a, l, d, c) { + super(), this._cachedHeight = null, this._revealTimeouts = [], this._codeEditor = + e, this._controller = t, this._state = i, this._contextViewProvider = + n, this._keybindingService = s, this._contextKeyService = a, this._storageService = + d, this._notificationService = c, this._ctrlEnterReplaceAllWarningPrompted = ! + !d.getBoolean(Ct, 0), this._isVisible = !1, this._isReplaceVisible = ! + 1, this._ignoreChangeEvent = !1, this._updateHistoryDelayer = new o.vp( + 500), this._register((0, r.OF)((() => this._updateHistoryDelayer.cancel()))), + this._register(this._state.onFindReplaceStateChange((e => this._onStateChanged( + e)))), this._buildDomNode(), this._updateButtons(), this._tryUpdateWidgetWidth(), + this._findInput.inputBox.layout(), this._register(this._codeEditor.onDidChangeConfiguration( + (e => { + if (e.hasChanged(80) && (this._codeEditor.getOption(80) && this._state + .change({ + isReplaceRevealed: !1 + }, !1), this._updateButtons()), e.hasChanged(130) && this._tryUpdateWidgetWidth(), + e.hasChanged(2) && this.updateAccessibilitySupport(), e.hasChanged( + 34)) { + const e = this._codeEditor.getOption(34).addExtraSpaceOnTop; + e && !this._viewZone && (this._viewZone = new St(0), this._showViewZone()), ! + e && this._viewZone && this._removeViewZone() + } + }))), this.updateAccessibilitySupport(), this._register(this._codeEditor + .onDidChangeCursorSelection((() => { + this._isVisible && this._updateToggleSelectionFindButton() + }))), this._register(this._codeEditor.onDidFocusEditorWidget((() => { + return e = this, t = void 0, n = function*() { + if (this._isVisible) { + let e = yield this._controller.getGlobalBufferTerm(); + e && e !== this._state.searchString && (this._state.change({ + searchString: e + }, !1), this._findInput.select()) + } + }, new((i = void 0) || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : + new i((function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })); + var e, t, i, n + }))), this._findInputFocused = T.bindTo(a), this._findFocusTracker = + this._register(Y.go(this._findInput.inputBox.inputElement)), this._register( + this._findFocusTracker.onDidFocus((() => { + this._findInputFocused.set(!0), this._updateSearchScope() + }))), this._register(this._findFocusTracker.onDidBlur((() => { + this._findInputFocused.set(!1) + }))), this._replaceInputFocused = M.bindTo(a), this._replaceFocusTracker = + this._register(Y.go(this._replaceInput.inputBox.inputElement)), this + ._register(this._replaceFocusTracker.onDidFocus((() => { + this._replaceInputFocused.set(!0), this._updateSearchScope() + }))), this._register(this._replaceFocusTracker.onDidBlur((() => { + this._replaceInputFocused.set(!1) + }))), this._codeEditor.addOverlayWidget(this), this._codeEditor.getOption( + 34).addExtraSpaceOnTop && (this._viewZone = new St(0)), this._applyTheme( + l.getColorTheme()), this._register(l.onDidColorThemeChange(this._applyTheme + .bind(this))), this._register(this._codeEditor.onDidChangeModel((() => { + this._isVisible && (this._viewZoneId = void 0) + }))), this._register(this._codeEditor.onDidScrollChange((e => { + e.scrollTopChanged ? this._layoutViewZone() : setTimeout((() => { + this._layoutViewZone() + }), 0) + }))) + } + getId() { + return Lt.ID + } + getDomNode() { + return this._domNode + } + getPosition() { + return this._isVisible ? { + preference: 0 + } : null + } + _onStateChanged(e) { + if (e.searchString) { + try { + this._ignoreChangeEvent = !0, this._findInput.setValue(this._state.searchString) + } finally { + this._ignoreChangeEvent = !1 + } + this._updateButtons() + } + if (e.replaceString && (this._replaceInput.inputBox.value = this._state + .replaceString), e.isRevealed && (this._state.isRevealed ? this._reveal() : + this._hide(!0)), e.isReplaceRevealed && (this._state.isReplaceRevealed ? + this._codeEditor.getOption(80) || this._isReplaceVisible || (this._isReplaceVisible = ! + 0, this._replaceInput.width = Y.w(this._findInput.domNode), this._updateButtons(), + this._replaceInput.inputBox.layout()) : this._isReplaceVisible && + (this._isReplaceVisible = !1, this._updateButtons())), (e.isRevealed || + e.isReplaceRevealed) && (this._state.isRevealed || this._state.isReplaceRevealed) && + this._tryUpdateHeight() && this._showViewZone(), e.isRegex && this._findInput + .setRegex(this._state.isRegex), e.wholeWord && this._findInput.setWholeWords( + this._state.wholeWord), e.matchCase && this._findInput.setCaseSensitive( + this._state.matchCase), e.preserveCase && this._replaceInput.setPreserveCase( + this._state.preserveCase), e.searchScope && (this._state.searchScope ? + this._toggleSelectionFind.checked = !0 : this._toggleSelectionFind.checked = ! + 1, this._updateToggleSelectionFindButton()), e.searchString || e.matchesCount || + e.matchesPosition) { + let e = this._state.searchString.length > 0 && 0 === this._state.matchesCount; + this._domNode.classList.toggle("no-results", e), this._updateMatchesCount(), + this._updateButtons() + }(e.searchString || e.currentMatch) && this._layoutViewZone(), e.updateHistory && + this._delayedUpdateHistory(), e.loop && this._updateButtons() + } + _delayedUpdateHistory() { + this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then( + void 0, Ie.dL) + } + _updateHistory() { + this._state.searchString && this._findInput.inputBox.addToHistory(), + this._state.replaceString && this._replaceInput.inputBox.addToHistory() + } + _updateMatchesCount() { + let e; + if (this._matchesCount.style.minWidth = wt + "px", this._state.matchesCount >= + Z ? this._matchesCount.title = ft : this._matchesCount.title = "", + this._matchesCount.firstChild && this._matchesCount.removeChild(this + ._matchesCount.firstChild), this._state.matchesCount > 0) { + let t = String(this._state.matchesCount); + this._state.matchesCount >= Z && (t += "+"); + let i = String(this._state.matchesPosition); + "0" === i && (i = "?"), e = s.WU(_t, i, t) + } else e = bt; + this._matchesCount.appendChild(document.createTextNode(e)), (0, De.Z9) + (this._getAriaLabel(e, this._state.currentMatch, this._state.searchString)), + wt = Math.max(wt, this._matchesCount.clientWidth) + } + _getAriaLabel(e, t, i) { + if (e === bt) return "" === i ? n.N("ariaSearchNoResultEmpty", + "{0} found", e) : n.N("ariaSearchNoResult", "{0} found for '{1}'", + e, i); + if (t) { + const o = n.N("ariaSearchNoResultWithLineNum", + "{0} found for '{1}', at {2}", e, i, t.startLineNumber + ":" + t.startColumn + ), + r = this._codeEditor.getModel(); + return r && t.startLineNumber <= r.getLineCount() && t.startLineNumber >= + 1 ? `${r.getLineContent(t.startLineNumber)}, ${o}` : o + } + return n.N("ariaSearchNoResultWithLineNumNoCurrentMatch", + "{0} found for '{1}'", e, i) + } + _updateToggleSelectionFindButton() { + let e = this._codeEditor.getSelection(), + t = !!e && (e.startLineNumber !== e.endLineNumber || e.startColumn !== + e.endColumn), + i = this._toggleSelectionFind.checked; + this._isVisible && (i || t) ? this._toggleSelectionFind.enable() : + this._toggleSelectionFind.disable() + } + _updateButtons() { + this._findInput.setEnabled(this._isVisible), this._replaceInput.setEnabled( + this._isVisible && this._isReplaceVisible), this._updateToggleSelectionFindButton(), + this._closeBtn.setEnabled(this._isVisible); + let e = this._state.searchString.length > 0, + t = !!this._state.matchesCount; + this._prevBtn.setEnabled(this._isVisible && e && t && this._state.canNavigateBack()), + this._nextBtn.setEnabled(this._isVisible && e && t && this._state.canNavigateForward()), + this._replaceBtn.setEnabled(this._isVisible && this._isReplaceVisible && + e), this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && + e), this._domNode.classList.toggle("replaceToggled", this._isReplaceVisible), + this._toggleReplaceBtn.setExpanded(this._isReplaceVisible); + let i = !this._codeEditor.getOption(80); + this._toggleReplaceBtn.setEnabled(this._isVisible && i) + } + _reveal() { + if (this._revealTimeouts.forEach((e => { + clearTimeout(e) + })), this._revealTimeouts = [], !this._isVisible) { + this._isVisible = !0; + const e = this._codeEditor.getSelection(); + switch (this._codeEditor.getOption(34).autoFindInSelection) { + case "always": + this._toggleSelectionFind.checked = !0; + break; + case "never": + this._toggleSelectionFind.checked = !1; + break; + case "multiline": + const t = !!e && e.startLineNumber !== e.endLineNumber; + this._toggleSelectionFind.checked = t + } + this._tryUpdateWidgetWidth(), this._updateButtons(), this._revealTimeouts + .push(setTimeout((() => { + this._domNode.classList.add("visible"), this._domNode.setAttribute( + "aria-hidden", "false") + }), 0)), this._revealTimeouts.push(setTimeout((() => { + this._findInput.validate() + }), 200)), this._codeEditor.layoutOverlayWidget(this); + let t = !0; + if (this._codeEditor.getOption(34).seedSearchStringFromSelection && + e) { + const i = this._codeEditor.getDomNode(); + if (i) { + const n = Y.i(i), + o = this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()), + r = n.left + (o ? o.left : 0), + s = o ? o.top : 0; + if (this._viewZone && s < this._viewZone.heightInPx) { + e.endLineNumber > e.startLineNumber && (t = !1); + const i = Y.xQ(this._domNode).left; + r > i && (t = !1); + const o = this._codeEditor.getScrolledVisiblePosition(e.getEndPosition()); + n.left + (o ? o.left : 0) > i && (t = !1) + } + } + } + this._showViewZone(t) + } + } + _hide(e) { + this._revealTimeouts.forEach((e => { + clearTimeout(e) + })), this._revealTimeouts = [], this._isVisible && (this._isVisible = ! + 1, this._updateButtons(), this._domNode.classList.remove("visible"), + this._domNode.setAttribute("aria-hidden", "true"), this._findInput.clearMessage(), + e && this._codeEditor.focus(), this._codeEditor.layoutOverlayWidget( + this), this._removeViewZone()) + } + _layoutViewZone(e) { + if (!this._codeEditor.getOption(34).addExtraSpaceOnTop) return void this + ._removeViewZone(); + if (!this._isVisible) return; + const t = this._viewZone; + void 0 === this._viewZoneId && t && this._codeEditor.changeViewZones( + (i => { + t.heightInPx = this._getHeight(), this._viewZoneId = i.addZone(t), + this._codeEditor.setScrollTop(e || this._codeEditor.getScrollTop() + + t.heightInPx) + })) + } + _showViewZone(e = !0) { + if (!this._isVisible) return; + if (!this._codeEditor.getOption(34).addExtraSpaceOnTop) return; + void 0 === this._viewZone && (this._viewZone = new St(0)); + const t = this._viewZone; + this._codeEditor.changeViewZones((i => { + if (void 0 !== this._viewZoneId) { + const n = this._getHeight(); + if (n === t.heightInPx) return; + let o = n - t.heightInPx; + return t.heightInPx = n, i.layoutZone(this._viewZoneId), void(e && + this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + + o)) + } { + let n = this._getHeight(); + if (n -= this._codeEditor.getOption(74).top, n <= 0) return; + t.heightInPx = n, this._viewZoneId = i.addZone(t), e && this._codeEditor + .setScrollTop(this._codeEditor.getScrollTop() + n) + } + })) + } + _removeViewZone() { + this._codeEditor.changeViewZones((e => { + void 0 !== this._viewZoneId && (e.removeZone(this._viewZoneId), + this._viewZoneId = void 0, this._viewZone && (this._codeEditor.setScrollTop( + this._codeEditor.getScrollTop() - this._viewZone.heightInPx), + this._viewZone = void 0)) + })) + } + _applyTheme(e) { + let t = { + inputActiveOptionBorder: e.getColor(f.PR), + inputActiveOptionBackground: e.getColor(f.XE), + inputActiveOptionForeground: e.getColor(f.Pv), + inputBackground: e.getColor(f.sE), + inputForeground: e.getColor(f.zJ), + inputBorder: e.getColor(f.dt), + inputValidationInfoBackground: e.getColor(f._l), + inputValidationInfoForeground: e.getColor(f.YI), + inputValidationInfoBorder: e.getColor(f.EP), + inputValidationWarningBackground: e.getColor(f.RV), + inputValidationWarningForeground: e.getColor(f.SU), + inputValidationWarningBorder: e.getColor(f.C3), + inputValidationErrorBackground: e.getColor(f.p), + inputValidationErrorForeground: e.getColor(f._t), + inputValidationErrorBorder: e.getColor(f.OZ) + }; + this._findInput.style(t), this._replaceInput.style(t), this._toggleSelectionFind + .style(t) + } + _tryUpdateWidgetWidth() { + if (!this._isVisible) return; + if (!Y.Uw(this._domNode)) return; + const e = this._codeEditor.getLayoutInfo(); + if (e.contentWidth <= 0) return void this._domNode.classList.add( + "hiddenEditor"); + this._domNode.classList.contains("hiddenEditor") && this._domNode.classList + .remove("hiddenEditor"); + const t = e.width, + i = e.minimap.minimapWidth; + let n = !1, + o = !1, + r = !1; + if (this._resized && Y.w(this._domNode) > vt) return this._domNode.style + .maxWidth = t - 28 - i - 15 + "px", void(this._replaceInput.width = + Y.w(this._findInput.domNode)); + if (447 + i >= t && (o = !0), 447 + i - wt >= t && (r = !0), 447 + i - + wt >= t + 50 && (n = !0), this._domNode.classList.toggle( + "collapsed-find-widget", n), this._domNode.classList.toggle( + "narrow-find-widget", r), this._domNode.classList.toggle( + "reduced-find-widget", o), r || n || (this._domNode.style.maxWidth = + t - 28 - i - 15 + "px"), this._resized) { + this._findInput.inputBox.layout(); + let e = this._findInput.inputBox.element.clientWidth; + e > 0 && (this._replaceInput.width = e) + } else this._isReplaceVisible && (this._replaceInput.width = Y.w(this + ._findInput.domNode)) + } + _getHeight() { + let e = 0; + return e += 4, e += this._findInput.inputBox.height + 2, this._isReplaceVisible && + (e += 4, e += this._replaceInput.inputBox.height + 2), e += 4, e + } + _tryUpdateHeight() { + const e = this._getHeight(); + return (null === this._cachedHeight || this._cachedHeight !== e) && ( + this._cachedHeight = e, this._domNode.style.height = `${e}px`, !0) + } + focusFindInput() { + this._findInput.select(), this._findInput.focus() + } + focusReplaceInput() { + this._replaceInput.select(), this._replaceInput.focus() + } + highlightFindOptions() { + this._findInput.highlightFindOptions() + } + _updateSearchScope() { + if (this._codeEditor.hasModel() && this._toggleSelectionFind.checked) { + let e = this._codeEditor.getSelections(); + e.map((e => { + 1 === e.endColumn && e.endLineNumber > e.startLineNumber && (e = + e.setEndPosition(e.endLineNumber - 1, this._codeEditor.getModel() + .getLineMaxColumn(e.endLineNumber - 1))); + const t = this._state.currentMatch; + return e.startLineNumber === e.endLineNumber || h.e.equalsRange( + e, t) ? null : e + })).filter((e => !!e)), e.length && this._state.change({ + searchScope: e + }, !0) + } + } + _onFindInputMouseDown(e) { + e.middleButton && e.stopPropagation() + } + _onFindInputKeyDown(e) { + return e.equals(3 | yt) ? (this._findInput.inputBox.insertAtCursor( + "\n"), void e.preventDefault()) : e.equals(2) ? (this._isReplaceVisible ? + this._replaceInput.focus() : this._findInput.focusOnCaseSensitive(), + void e.preventDefault()) : e.equals(2066) ? (this._codeEditor.focus(), + void e.preventDefault()) : e.equals(16) ? xt(e, this._findInput.getValue(), + this._findInput.domNode.querySelector("textarea")) : e.equals(18) ? + kt(e, this._findInput.getValue(), this._findInput.domNode.querySelector( + "textarea")) : void 0 + } + _onReplaceInputKeyDown(e) { + return e.equals(3 | yt) ? (Te.ED && Te.tY && !this._ctrlEnterReplaceAllWarningPrompted && + (this._notificationService.info(n.N("ctrlEnter.keybindingChanged", + "Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior." + )), this._ctrlEnterReplaceAllWarningPrompted = !0, this._storageService + .store(Ct, !0, 0, 0)), this._replaceInput.inputBox.insertAtCursor( + "\n"), void e.preventDefault()) : e.equals(2) ? (this._findInput.focusOnCaseSensitive(), + void e.preventDefault()) : e.equals(1026) ? (this._findInput.focus(), + void e.preventDefault()) : e.equals(2066) ? (this._codeEditor.focus(), + void e.preventDefault()) : e.equals(16) ? xt(e, this._replaceInput.inputBox + .value, this._replaceInput.inputBox.element.querySelector( + "textarea")) : e.equals(18) ? kt(e, this._replaceInput.inputBox.value, + this._replaceInput.inputBox.element.querySelector("textarea")) : + void 0 + } + getVerticalSashLeft(e) { + return 0 + } + _keybindingLabelFor(e) { + let t = this._keybindingService.lookupKeybinding(e); + return t ? ` (${t.getLabel()})` : "" + } + _buildDomNode() { + this._findInput = this._register(new Ge(null, this._contextViewProvider, { + width: 221, + label: rt, + placeholder: st, + appendCaseSensitiveLabel: this._keybindingLabelFor(V), + appendWholeWordsLabel: this._keybindingLabelFor(H), + appendRegexLabel: this._keybindingLabelFor(U), + validation: e => { + if (0 === e.length || !this._findInput.getRegex()) return null; + try { + return new RegExp(e, "gu"), null + } catch (e) { + return { + content: e.message + } + } + }, + flexibleHeight: !0, + flexibleWidth: !0, + flexibleMaxHeight: 118 + }, this._contextKeyService, !0)), this._findInput.setRegex(!!this._state + .isRegex), this._findInput.setCaseSensitive(!!this._state.matchCase), + this._findInput.setWholeWords(!!this._state.wholeWord), this._register( + this._findInput.onKeyDown((e => this._onFindInputKeyDown(e)))), + this._register(this._findInput.inputBox.onDidChange((() => { + this._ignoreChangeEvent || this._state.change({ + searchString: this._findInput.getValue() + }, !0) + }))), this._register(this._findInput.onDidOptionChange((() => { + this._state.change({ + isRegex: this._findInput.getRegex(), + wholeWord: this._findInput.getWholeWords(), + matchCase: this._findInput.getCaseSensitive() + }, !0) + }))), this._register(this._findInput.onCaseSensitiveKeyDown((e => { + e.equals(1026) && this._isReplaceVisible && (this._replaceInput.focus(), + e.preventDefault()) + }))), this._register(this._findInput.onRegexKeyDown((e => { + e.equals(2) && this._isReplaceVisible && (this._replaceInput.focusOnPreserve(), + e.preventDefault()) + }))), this._register(this._findInput.inputBox.onDidHeightChange((e => { + this._tryUpdateHeight() && this._showViewZone() + }))), Te.IJ && this._register(this._findInput.onMouseDown((e => this + ._onFindInputMouseDown(e)))), this._matchesCount = document.createElement( + "div"), this._matchesCount.className = "matchesCount", this._updateMatchesCount(), + this._prevBtn = this._register(new Nt({ + label: at + this._keybindingLabelFor(W), + icon: nt, + onTrigger: () => { + this._codeEditor.getAction(W).run().then(void 0, Ie.dL) + } + })), this._nextBtn = this._register(new Nt({ + label: lt + this._keybindingLabelFor(B), + icon: ot, + onTrigger: () => { + this._codeEditor.getAction(B).run().then(void 0, Ie.dL) + } + })); + let e = document.createElement("div"); + e.className = "find-part", e.appendChild(this._findInput.domNode); + const t = document.createElement("div"); + t.className = "find-actions", e.appendChild(t), t.appendChild(this._matchesCount), + t.appendChild(this._prevBtn.domNode), t.appendChild(this._nextBtn.domNode), + this._toggleSelectionFind = this._register(new fe({ + icon: Xe, + title: dt + this._keybindingLabelFor(j), + isChecked: !1 + })), this._register(this._toggleSelectionFind.onChange((() => { + if (this._toggleSelectionFind.checked) { + if (this._codeEditor.hasModel()) { + let e = this._codeEditor.getSelections(); + e.map((e => (1 === e.endColumn && e.endLineNumber > e.startLineNumber && + (e = e.setEndPosition(e.endLineNumber - 1, this._codeEditor + .getModel().getLineMaxColumn(e.endLineNumber - 1))), e.isEmpty() ? + null : e))).filter((e => !!e)), e.length && this._state.change({ + searchScope: e + }, !0) + } + } else this._state.change({ + searchScope: null + }, !0) + }))), t.appendChild(this._toggleSelectionFind.domNode), this._closeBtn = + this._register(new Nt({ + label: ct + this._keybindingLabelFor(z), + icon: Qe.s_, + onTrigger: () => { + this._state.change({ + isRevealed: !1, + searchScope: null + }, !1) + }, + onKeyDown: e => { + e.equals(2) && this._isReplaceVisible && (this._replaceBtn.isEnabled() ? + this._replaceBtn.focus() : this._codeEditor.focus(), e.preventDefault() + ) + } + })), t.appendChild(this._closeBtn.domNode), this._replaceInput = + this._register(new Ye(null, void 0, { + label: ht, + placeholder: ut, + appendPreserveCaseLabel: this._keybindingLabelFor(K), + history: [], + flexibleHeight: !0, + flexibleWidth: !0, + flexibleMaxHeight: 118 + }, this._contextKeyService, !0)), this._replaceInput.setPreserveCase(! + !this._state.preserveCase), this._register(this._replaceInput.onKeyDown( + (e => this._onReplaceInputKeyDown(e)))), this._register(this._replaceInput + .inputBox.onDidChange((() => { + this._state.change({ + replaceString: this._replaceInput.inputBox.value + }, !1) + }))), this._register(this._replaceInput.inputBox.onDidHeightChange( + (e => { + this._isReplaceVisible && this._tryUpdateHeight() && this._showViewZone() + }))), this._register(this._replaceInput.onDidOptionChange((() => { + this._state.change({ + preserveCase: this._replaceInput.getPreserveCase() + }, !0) + }))), this._register(this._replaceInput.onPreserveCaseKeyDown((e => { + e.equals(2) && (this._prevBtn.isEnabled() ? this._prevBtn.focus() : + this._nextBtn.isEnabled() ? this._nextBtn.focus() : this._toggleSelectionFind + .enabled ? this._toggleSelectionFind.focus() : this._closeBtn.isEnabled() && + this._closeBtn.focus(), e.preventDefault()) + }))), this._replaceBtn = this._register(new Nt({ + label: gt + this._keybindingLabelFor($), + icon: tt, + onTrigger: () => { + this._controller.replace() + }, + onKeyDown: e => { + e.equals(1026) && (this._closeBtn.focus(), e.preventDefault()) + } + })), this._replaceAllBtn = this._register(new Nt({ + label: pt + this._keybindingLabelFor(q), + icon: it, + onTrigger: () => { + this._controller.replaceAll() + } + })); + let i = document.createElement("div"); + i.className = "replace-part", i.appendChild(this._replaceInput.domNode); + const n = document.createElement("div"); + n.className = "replace-actions", i.appendChild(n), n.appendChild(this + ._replaceBtn.domNode), n.appendChild(this._replaceAllBtn.domNode), + this._toggleReplaceBtn = this._register(new Nt({ + label: mt, + className: "codicon toggle left", + onTrigger: () => { + this._state.change({ + isReplaceRevealed: !this._isReplaceVisible + }, !1), this._isReplaceVisible && (this._replaceInput.width = + Y.w(this._findInput.domNode), this._replaceInput.inputBox.layout() + ), this._showViewZone() + } + })), this._toggleReplaceBtn.setExpanded(this._isReplaceVisible), + this._domNode = document.createElement("div"), this._domNode.className = + "editor-widget find-widget", this._domNode.setAttribute( + "aria-hidden", "true"), this._domNode.style.width = "419px", this._domNode + .appendChild(this._toggleReplaceBtn.domNode), this._domNode.appendChild( + e), this._domNode.appendChild(i), this._resizeSash = new Ee.g(this._domNode, + this, { + orientation: 0, + size: 2 + }), this._resized = !1; + let o = vt; + this._register(this._resizeSash.onDidStart((() => { + o = Y.w(this._domNode) + }))), this._register(this._resizeSash.onDidChange((e => { + this._resized = !0; + let t = o + e.startX - e.currentX; + t < vt || t > (parseFloat(Y.Dx(this._domNode).maxWidth) || 0) || + (this._domNode.style.width = `${t}px`, this._isReplaceVisible && + (this._replaceInput.width = Y.w(this._findInput.domNode)), + this._findInput.inputBox.layout(), this._tryUpdateHeight()) + }))), this._register(this._resizeSash.onDidReset((() => { + const e = Y.w(this._domNode); + if (e < vt) return; + let t = vt; + if (!this._resized || e === vt) { + const e = this._codeEditor.getLayoutInfo(); + t = e.width - 28 - e.minimap.minimapWidth - 15, this._resized = ! + 0 + } + this._domNode.style.width = `${t}px`, this._isReplaceVisible && + (this._replaceInput.width = Y.w(this._findInput.domNode)), this + ._findInput.inputBox.layout() + }))) + } + updateAccessibilitySupport() { + const e = this._codeEditor.getOption(2); + this._findInput.setFocusInputOnOptionClick(2 !== e) + } + } + Lt.ID = "editor.contrib.findWidget"; + class Nt extends Q.$ { + constructor(e) { + super(), this._opts = e; + let t = "button"; + this._opts.className && (t = t + " " + this._opts.className), this._opts + .icon && (t = t + " " + _.kS.asClassName(this._opts.icon)), this._domNode = + document.createElement("div"), this._domNode.title = this._opts.label, + this._domNode.tabIndex = 0, this._domNode.className = t, this._domNode + .setAttribute("role", "button"), this._domNode.setAttribute( + "aria-label", this._opts.label), this.onclick(this._domNode, (e => { + this._opts.onTrigger(), e.preventDefault() + })), this.onkeydown(this._domNode, (e => { + if (e.equals(10) || e.equals(3)) return this._opts.onTrigger(), + void e.preventDefault(); + this._opts.onKeyDown && this._opts.onKeyDown(e) + })) + } + get domNode() { + return this._domNode + } + isEnabled() { + return this._domNode.tabIndex >= 0 + } + focus() { + this._domNode.focus() + } + setEnabled(e) { + this._domNode.classList.toggle("disabled", !e), this._domNode.setAttribute( + "aria-disabled", String(!e)), this._domNode.tabIndex = e ? 0 : -1 + } + setExpanded(e) { + this._domNode.setAttribute("aria-expanded", String(!!e)), e ? (this._domNode + .classList.remove(..._.kS.asClassNameArray(Je)), this._domNode.classList + .add(..._.kS.asClassNameArray(et))) : (this._domNode.classList.remove( + ..._.kS.asClassNameArray(et)), this._domNode.classList.add(..._.kS + .asClassNameArray(Je))) + } + }(0, _.Ic)(((e, t) => { + const i = (e, i) => { + i && t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`) + }; + i(".findMatch", e.getColor(f.MU)), i(".currentFindMatch", e.getColor( + f.ny)), i(".findScope", e.getColor(f.jU)), i(".find-widget", e.getColor( + f.D0)); + const n = e.getColor(f.rh); + n && t.addRule( + `.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`); + const o = e.getColor(f.Ei); + o && t.addRule( + `.monaco-editor .findMatch { border: 1px ${"hc"===e.type?"dotted":"solid"} ${o}; box-sizing: border-box; }` + ); + const r = e.getColor(f.pn); + r && t.addRule( + `.monaco-editor .currentFindMatch { border: 2px solid ${r}; padding: 1px; box-sizing: border-box; }` + ); + const s = e.getColor(f.gk); + s && t.addRule( + `.monaco-editor .findScope { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; }` + ); + const a = e.getColor(f.lR); + a && t.addRule( + `.monaco-editor .find-widget { border: 1px solid ${a}; }`); + const l = e.getColor(f.Hf); + l && t.addRule(`.monaco-editor .find-widget { color: ${l}; }`); + const d = e.getColor(f.Id); + d && t.addRule( + `.monaco-editor .find-widget.no-results .matchesCount { color: ${d}; }` + ); + const c = e.getColor(f.Ng); + if (c) t.addRule( + `.monaco-editor .find-widget .monaco-sash { background-color: ${c}; }` + ); + else { + const i = e.getColor(f.D1); + i && t.addRule( + `.monaco-editor .find-widget .monaco-sash { background-color: ${i}; }` + ) + } + const h = e.getColor(f.lU); + h && t.addRule( + `\n\t\t.monaco-editor .find-widget .button:not(.disabled):hover,\n\t\t.monaco-editor .find-widget .codicon-find-selection:hover {\n\t\t\tbackground-color: ${h} !important;\n\t\t}\n\t` + ); + const u = e.getColor(f.R8); + u && t.addRule( + `.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${u}; }` + ) + })); + var Dt = i(4144), + Et = i(4972), + It = i(5606), + Tt = i(1847), + Mt = i(6904), + At = i(9422), + Rt = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + Ot = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + Pt = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + + function Ft(e, t = "single", i = !1) { + if (!e.hasModel()) return null; + const n = e.getSelection(); + if ("single" === t && n.startLineNumber === n.endLineNumber || + "multiple" === t) + if (n.isEmpty()) { + const t = e.getConfiguredWordAtPosition(n.getStartPosition()); + if (t && !1 === i) return t.word + } else if (e.getModel().getValueLengthInRange(n) < 524288) return e.getModel() + .getValueInRange(n); + return null + } + let Bt = class e extends r.JT { + constructor(e, t, i, n) { + super(), this._editor = e, this._findWidgetVisible = I.bindTo(t), + this._contextKeyService = t, this._storageService = i, this._clipboardService = + n, this._updateHistoryDelayer = new o.vp(500), this._state = this._register( + new ke), this.loadQueryState(), this._register(this._state.onFindReplaceStateChange( + (e => this._onStateChanged(e)))), this._model = null, this._register( + this._editor.onDidChangeModel((() => { + let e = this._editor.getModel() && this._state.isRevealed; + this.disposeModel(), this._state.change({ + searchScope: null, + matchCase: this._storageService.getBoolean("editor.matchCase", + 1, !1), + wholeWord: this._storageService.getBoolean("editor.wholeWord", + 1, !1), + isRegex: this._storageService.getBoolean("editor.isRegex", 1, ! + 1), + preserveCase: this._storageService.getBoolean( + "editor.preserveCase", 1, !1) + }, !1), e && this._start({ + forceRevealReplace: !1, + seedSearchStringFromSelection: "none", + seedSearchStringFromNonEmptySelection: !1, + seedSearchStringFromGlobalClipboard: !1, + shouldFocus: 0, + shouldAnimate: !1, + updateSearchScope: !1, + loop: this._editor.getOption(34).loop + }) + }))) + } + get editor() { + return this._editor + } + static get(t) { + return t.getContribution(e.ID) + } + dispose() { + this.disposeModel(), super.dispose() + } + disposeModel() { + this._model && (this._model.dispose(), this._model = null) + } + _onStateChanged(e) { + this.saveQueryState(e), e.isRevealed && (this._state.isRevealed ? + this._findWidgetVisible.set(!0) : (this._findWidgetVisible.reset(), + this.disposeModel())), e.searchString && this.setGlobalBufferTerm( + this._state.searchString) + } + saveQueryState(e) { + e.isRegex && this._storageService.store("editor.isRegex", this._state + .actualIsRegex, 1, 0), e.wholeWord && this._storageService.store( + "editor.wholeWord", this._state.actualWholeWord, 1, 0), e.matchCase && + this._storageService.store("editor.matchCase", this._state.actualMatchCase, + 1, 0), e.preserveCase && this._storageService.store( + "editor.preserveCase", this._state.actualPreserveCase, 1, 0) + } + loadQueryState() { + this._state.change({ + matchCase: this._storageService.getBoolean("editor.matchCase", 1, + this._state.matchCase), + wholeWord: this._storageService.getBoolean("editor.wholeWord", 1, + this._state.wholeWord), + isRegex: this._storageService.getBoolean("editor.isRegex", 1, this + ._state.isRegex), + preserveCase: this._storageService.getBoolean( + "editor.preserveCase", 1, this._state.preserveCase) + }, !1) + } + isFindInputFocused() { + return !!T.getValue(this._contextKeyService) + } + getState() { + return this._state + } + closeFindWidget() { + this._state.change({ + isRevealed: !1, + searchScope: null + }, !1), this._editor.focus() + } + toggleCaseSensitive() { + this._state.change({ + matchCase: !this._state.matchCase + }, !1), this._state.isRevealed || this.highlightFindOptions() + } + toggleWholeWords() { + this._state.change({ + wholeWord: !this._state.wholeWord + }, !1), this._state.isRevealed || this.highlightFindOptions() + } + toggleRegex() { + this._state.change({ + isRegex: !this._state.isRegex + }, !1), this._state.isRevealed || this.highlightFindOptions() + } + togglePreserveCase() { + this._state.change({ + preserveCase: !this._state.preserveCase + }, !1), this._state.isRevealed || this.highlightFindOptions() + } + toggleSearchScope() { + if (this._state.searchScope) this._state.change({ + searchScope: null + }, !0); + else if (this._editor.hasModel()) { + let e = this._editor.getSelections(); + e.map((e => (1 === e.endColumn && e.endLineNumber > e.startLineNumber && + (e = e.setEndPosition(e.endLineNumber - 1, this._editor.getModel() + .getLineMaxColumn(e.endLineNumber - 1))), e.isEmpty() ? null : + e))).filter((e => !!e)), e.length && this._state.change({ + searchScope: e + }, !0) + } + } + setSearchString(e) { + this._state.isRegex && (e = s.ec(e)), this._state.change({ + searchString: e + }, !1) + } + highlightFindOptions(e = !1) {} + _start(e) { + return Pt(this, void 0, void 0, (function*() { + if (this.disposeModel(), !this._editor.hasModel()) return; + let t = { + isRevealed: !0 + }; + if ("single" === e.seedSearchStringFromSelection) { + let i = Ft(this._editor, e.seedSearchStringFromSelection, e.seedSearchStringFromNonEmptySelection); + i && (this._state.isRegex ? t.searchString = s.ec(i) : t.searchString = + i) + } else if ("multiple" === e.seedSearchStringFromSelection && !e.updateSearchScope) { + let i = Ft(this._editor, e.seedSearchStringFromSelection); + i && (t.searchString = i) + } + if (!t.searchString && e.seedSearchStringFromGlobalClipboard) { + let e = yield this.getGlobalBufferTerm(); + if (!this._editor.hasModel()) return; + e && (t.searchString = e) + } + if (e.forceRevealReplace ? t.isReplaceRevealed = !0 : this._findWidgetVisible + .get() || (t.isReplaceRevealed = !1), e.updateSearchScope) { + let e = this._editor.getSelections(); + e.some((e => !e.isEmpty())) && (t.searchScope = e) + } + t.loop = e.loop, this._state.change(t, !1), this._model || (this._model = + new G(this._editor, this._state)) + })) + } + start(e) { + return this._start(e) + } + moveToNextMatch() { + return !!this._model && (this._model.moveToNextMatch(), !0) + } + moveToPrevMatch() { + return !!this._model && (this._model.moveToPrevMatch(), !0) + } + replace() { + return !!this._model && (this._model.replace(), !0) + } + replaceAll() { + return !!this._model && (this._model.replaceAll(), !0) + } + selectAllMatches() { + return !!this._model && (this._model.selectAllMatches(), this._editor + .focus(), !0) + } + getGlobalBufferTerm() { + return Pt(this, void 0, void 0, (function*() { + return this._editor.getOption(34).globalFindClipboard && this._editor + .hasModel() && !this._editor.getModel().isTooLargeForSyncing() ? + this._clipboardService.readFindText() : "" + })) + } + setGlobalBufferTerm(e) { + this._editor.getOption(34).globalFindClipboard && this._editor.hasModel() && + !this._editor.getModel().isTooLargeForSyncing() && this._clipboardService + .writeFindText(e) + } + }; + Bt.ID = "editor.contrib.findController", Bt = Rt([Ot(1, D.i6), Ot(2, Mt.Uy), + Ot(3, Et.p) + ], Bt); + let Wt = class extends Bt { + constructor(e, t, i, n, o, r, s, a) { + super(e, i, s, a), this._contextViewService = t, this._keybindingService = + n, this._themeService = o, this._notificationService = r, this._widget = + null, this._findOptionsWidget = null + } + _start(e) { + const t = Object.create(null, { + _start: { + get: () => super._start + } + }); + return Pt(this, void 0, void 0, (function*() { + this._widget || this._createFindWidget(); + const i = this._editor.getSelection(); + let n = !1; + switch (this._editor.getOption(34).autoFindInSelection) { + case "always": + n = !0; + break; + case "never": + n = !1; + break; + case "multiline": + n = !!i && i.startLineNumber !== i.endLineNumber + } + e.updateSearchScope = n, yield t._start.call(this, e), this._widget && + (2 === e.shouldFocus ? this._widget.focusReplaceInput() : 1 === + e.shouldFocus && this._widget.focusFindInput()) + })) + } + highlightFindOptions(e = !1) { + this._widget || this._createFindWidget(), this._state.isRevealed && ! + e ? this._widget.highlightFindOptions() : this._findOptionsWidget.highlightFindOptions() + } + _createFindWidget() { + this._widget = this._register(new Lt(this._editor, this, this._state, + this._contextViewService, this._keybindingService, this._contextKeyService, + this._themeService, this._storageService, this._notificationService + )), this._findOptionsWidget = this._register(new Se(this._editor, + this._state, this._keybindingService, this._themeService)) + } + }; + Wt = Rt([Ot(1, It.u), Ot(2, D.i6), Ot(3, Tt.d), Ot(4, _.XE), Ot(5, At.lT), + Ot(6, Mt.Uy), Ot(7, Et.p) + ], Wt); + const zt = (0, a.rn)(new a.jY({ + id: "actions.find", + label: n.N("startFindAction", "Find"), + alias: "Find", + precondition: D.Ao.or(l.u.focus, D.Ao.has("editorIsOpen")), + kbOpts: { + kbExpr: null, + primary: 2084, + weight: 100 + }, + menuOpts: { + menuId: Dt.eH.MenubarEditMenu, + group: "3_find", + title: n.N({ + key: "miFind", + comment: ["&& denotes a mnemonic"] + }, "&&Find"), + order: 1 + } + })); + zt.addImplementation(0, ((e, t, i) => { + const n = Bt.get(t); + return !!n && n.start({ + forceRevealReplace: !1, + seedSearchStringFromSelection: "never" !== t.getOption(34).seedSearchStringFromSelection ? + "single" : "none", + seedSearchStringFromNonEmptySelection: "selection" === t.getOption( + 34).seedSearchStringFromSelection, + seedSearchStringFromGlobalClipboard: t.getOption(34).globalFindClipboard, + shouldFocus: 1, + shouldAnimate: !0, + updateSearchScope: !1, + loop: t.getOption(34).loop + }) + })); + class Vt extends a.R6 { + constructor() { + super({ + id: "actions.findWithSelection", + label: n.N("startFindWithSelectionAction", "Find With Selection"), + alias: "Find With Selection", + precondition: void 0, + kbOpts: { + kbExpr: null, + primary: 0, + mac: { + primary: 2083 + }, + weight: 100 + } + }) + } + run(e, t) { + return Pt(this, void 0, void 0, (function*() { + let e = Bt.get(t); + e && (yield e.start({ + forceRevealReplace: !1, + seedSearchStringFromSelection: "multiple", + seedSearchStringFromNonEmptySelection: !1, + seedSearchStringFromGlobalClipboard: !1, + shouldFocus: 0, + shouldAnimate: !0, + updateSearchScope: !1, + loop: t.getOption(34).loop + }), e.setGlobalBufferTerm(e.getState().searchString)) + })) + } + } + class Ht extends a.R6 { + run(e, t) { + return Pt(this, void 0, void 0, (function*() { + let e = Bt.get(t); + e && !this._run(e) && (yield e.start({ + forceRevealReplace: !1, + seedSearchStringFromSelection: 0 === e.getState().searchString + .length && "never" !== t.getOption(34).seedSearchStringFromSelection ? + "single" : "none", + seedSearchStringFromNonEmptySelection: "selection" === t.getOption( + 34).seedSearchStringFromSelection, + seedSearchStringFromGlobalClipboard: !0, + shouldFocus: 0, + shouldAnimate: !0, + updateSearchScope: !1, + loop: t.getOption(34).loop + }), this._run(e)) + })) + } + } + class Ut extends Ht { + constructor() { + super({ + id: B, + label: n.N("findNextMatchAction", "Find Next"), + alias: "Find Next", + precondition: void 0, + kbOpts: [{ + kbExpr: l.u.focus, + primary: 61, + mac: { + primary: 2085, + secondary: [61] + }, + weight: 100 + }, { + kbExpr: D.Ao.and(l.u.focus, T), + primary: 3, + weight: 100 + }] + }) + } + _run(e) { + return !!e.moveToNextMatch() && (e.editor.pushUndoStop(), !0) + } + } + class jt extends Ht { + constructor() { + super({ + id: W, + label: n.N("findPreviousMatchAction", "Find Previous"), + alias: "Find Previous", + precondition: void 0, + kbOpts: [{ + kbExpr: l.u.focus, + primary: 1085, + mac: { + primary: 3109, + secondary: [1085] + }, + weight: 100 + }, { + kbExpr: D.Ao.and(l.u.focus, T), + primary: 1027, + weight: 100 + }] + }) + } + _run(e) { + return e.moveToPrevMatch() + } + } + class Kt extends a.R6 { + run(e, t) { + return Pt(this, void 0, void 0, (function*() { + let e = Bt.get(t); + if (!e) return; + const i = "selection" === t.getOption(34).seedSearchStringFromSelection; + let n = null; + "never" !== t.getOption(34).seedSearchStringFromSelection && (n = + Ft(t, "single", i)), n && e.setSearchString(n), this._run(e) || + (yield e.start({ + forceRevealReplace: !1, + seedSearchStringFromSelection: "never" !== t.getOption(34).seedSearchStringFromSelection ? + "single" : "none", + seedSearchStringFromNonEmptySelection: i, + seedSearchStringFromGlobalClipboard: !1, + shouldFocus: 0, + shouldAnimate: !0, + updateSearchScope: !1, + loop: t.getOption(34).loop + }), this._run(e)) + })) + } + } + class $t extends Kt { + constructor() { + super({ + id: "editor.action.nextSelectionMatchFindAction", + label: n.N("nextSelectionMatchFindAction", "Find Next Selection"), + alias: "Find Next Selection", + precondition: void 0, + kbOpts: { + kbExpr: l.u.focus, + primary: 2109, + weight: 100 + } + }) + } + _run(e) { + return e.moveToNextMatch() + } + } + class qt extends Kt { + constructor() { + super({ + id: "editor.action.previousSelectionMatchFindAction", + label: n.N("previousSelectionMatchFindAction", + "Find Previous Selection"), + alias: "Find Previous Selection", + precondition: void 0, + kbOpts: { + kbExpr: l.u.focus, + primary: 3133, + weight: 100 + } + }) + } + _run(e) { + return e.moveToPrevMatch() + } + } + const Zt = (0, a.rn)(new a.jY({ + id: "editor.action.startFindReplaceAction", + label: n.N("startReplace", "Replace"), + alias: "Replace", + precondition: D.Ao.or(l.u.focus, D.Ao.has("editorIsOpen")), + kbOpts: { + kbExpr: null, + primary: 2086, + mac: { + primary: 2596 + }, + weight: 100 + }, + menuOpts: { + menuId: Dt.eH.MenubarEditMenu, + group: "3_find", + title: n.N({ + key: "miReplace", + comment: ["&& denotes a mnemonic"] + }, "&&Replace"), + order: 2 + } + })); + Zt.addImplementation(0, ((e, t, i) => { + if (!t.hasModel() || t.getOption(80)) return !1; + const n = Bt.get(t); + if (!n) return !1; + const o = t.getSelection(), + r = n.isFindInputFocused(), + s = !o.isEmpty() && o.startLineNumber === o.endLineNumber && "never" !== + t.getOption(34).seedSearchStringFromSelection && !r, + a = r || s ? 2 : 1; + return n.start({ + forceRevealReplace: !0, + seedSearchStringFromSelection: s ? "single" : "none", + seedSearchStringFromNonEmptySelection: "selection" === t.getOption( + 34).seedSearchStringFromSelection, + seedSearchStringFromGlobalClipboard: "never" !== t.getOption(34).seedSearchStringFromSelection, + shouldFocus: a, + shouldAnimate: !0, + updateSearchScope: !1, + loop: t.getOption(34).loop + }) + })), (0, a._K)(Bt.ID, Wt), (0, a.Qr)(Vt), (0, a.Qr)(Ut), (0, a.Qr)(jt), ( + 0, a.Qr)($t), (0, a.Qr)(qt); + const Gt = a._l.bindToContribution(Bt.get); + (0, a.fK)(new Gt({ + id: z, + precondition: I, + handler: e => e.closeFindWidget(), + kbOpts: { + weight: 105, + kbExpr: D.Ao.and(l.u.focus, D.Ao.not("isComposing")), + primary: 9, + secondary: [1033] + } + })), (0, a.fK)(new Gt({ + id: V, + precondition: void 0, + handler: e => e.toggleCaseSensitive(), + kbOpts: { + weight: 105, + kbExpr: l.u.focus, + primary: A.primary, + mac: A.mac, + win: A.win, + linux: A.linux + } + })), (0, a.fK)(new Gt({ + id: H, + precondition: void 0, + handler: e => e.toggleWholeWords(), + kbOpts: { + weight: 105, + kbExpr: l.u.focus, + primary: R.primary, + mac: R.mac, + win: R.win, + linux: R.linux + } + })), (0, a.fK)(new Gt({ + id: U, + precondition: void 0, + handler: e => e.toggleRegex(), + kbOpts: { + weight: 105, + kbExpr: l.u.focus, + primary: O.primary, + mac: O.mac, + win: O.win, + linux: O.linux + } + })), (0, a.fK)(new Gt({ + id: j, + precondition: void 0, + handler: e => e.toggleSearchScope(), + kbOpts: { + weight: 105, + kbExpr: l.u.focus, + primary: P.primary, + mac: P.mac, + win: P.win, + linux: P.linux + } + })), (0, a.fK)(new Gt({ + id: K, + precondition: void 0, + handler: e => e.togglePreserveCase(), + kbOpts: { + weight: 105, + kbExpr: l.u.focus, + primary: F.primary, + mac: F.mac, + win: F.win, + linux: F.linux + } + })), (0, a.fK)(new Gt({ + id: $, + precondition: I, + handler: e => e.replace(), + kbOpts: { + weight: 105, + kbExpr: l.u.focus, + primary: 3094 + } + })), (0, a.fK)(new Gt({ + id: $, + precondition: I, + handler: e => e.replace(), + kbOpts: { + weight: 105, + kbExpr: D.Ao.and(l.u.focus, M), + primary: 3 + } + })), (0, a.fK)(new Gt({ + id: q, + precondition: I, + handler: e => e.replaceAll(), + kbOpts: { + weight: 105, + kbExpr: l.u.focus, + primary: 2563 + } + })), (0, a.fK)(new Gt({ + id: q, + precondition: I, + handler: e => e.replaceAll(), + kbOpts: { + weight: 105, + kbExpr: D.Ao.and(l.u.focus, M), + primary: void 0, + mac: { + primary: 2051 + } + } + })), (0, a.fK)(new Gt({ + id: "editor.action.selectAllMatches", + precondition: I, + handler: e => e.selectAllMatches(), + kbOpts: { + weight: 105, + kbExpr: l.u.focus, + primary: 515 + } + })) + }, + 3190: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + FoldingController: () => de, + editorFoldForeground: () => fe, + foldBackgroundBackground: () => me + }); + var n = i(3379), + o = i.n(n), + r = i(7795), + s = i.n(r), + a = i(569), + l = i.n(a), + d = i(3565), + c = i.n(d), + h = i(9216), + u = i.n(h), + g = i(4589), + p = i.n(g), + m = i(6977), + f = {}; + f.styleTagTransform = p(), f.setAttributes = c(), f.insert = l().bind( + null, "head"), f.domAPI = s(), f.insertStyleElement = u(), o()(m.Z, f), + m.Z && m.Z.locals && m.Z.locals; + var _ = i(3580), + b = i(8401), + v = i(7295), + w = i(5393), + C = i(2258), + y = i(5976), + S = i(6830), + x = i(4669); + const k = 16777215, + L = 4278190080; + class N { + constructor(e, t, i) { + if (e.length !== t.length || e.length > 65535) throw new Error( + "invalid startIndexes or endIndexes size"); + this._startIndexes = e, this._endIndexes = t, this._collapseStates = + new Uint32Array(Math.ceil(e.length / 32)), this._types = i, this._parentsComputed = ! + 1 + } + ensureParentIndices() { + if (!this._parentsComputed) { + this._parentsComputed = !0; + let e = [], + t = (t, i) => { + let n = e[e.length - 1]; + return this.getStartLineNumber(n) <= t && this.getEndLineNumber(n) >= + i + }; + for (let i = 0, n = this._startIndexes.length; i < n; i++) { + let n = this._startIndexes[i], + o = this._endIndexes[i]; + if (n > k || o > k) throw new Error( + "startLineNumber or endLineNumber must not exceed 16777215"); + for (; e.length > 0 && !t(n, o);) e.pop(); + let r = e.length > 0 ? e[e.length - 1] : -1; + e.push(i), this._startIndexes[i] = n + ((255 & r) << 24), this._endIndexes[ + i] = o + ((65280 & r) << 16) + } + } + } + get length() { + return this._startIndexes.length + } + getStartLineNumber(e) { + return this._startIndexes[e] & k + } + getEndLineNumber(e) { + return this._endIndexes[e] & k + } + getType(e) { + return this._types ? this._types[e] : void 0 + } + hasTypes() { + return !!this._types + } + isCollapsed(e) { + let t = e / 32 | 0, + i = e % 32; + return 0 != (this._collapseStates[t] & 1 << i) + } + setCollapsed(e, t) { + let i = e / 32 | 0, + n = e % 32, + o = this._collapseStates[i]; + this._collapseStates[i] = t ? o | 1 << n : o & ~(1 << n) + } + setCollapsedAllOfType(e, t) { + let i = !1; + if (this._types) + for (let n = 0; n < this._types.length; n++) this._types[n] === e && + (this.setCollapsed(n, t), i = !0); + return i + } + toRegion(e) { + return new D(this, e) + } + getParentIndex(e) { + this.ensureParentIndices(); + let t = ((this._startIndexes[e] & L) >>> 24) + ((this._endIndexes[e] & + L) >>> 16); + return 65535 === t ? -1 : t + } + contains(e, t) { + return this.getStartLineNumber(e) <= t && this.getEndLineNumber(e) >= + t + } + findIndex(e) { + let t = 0, + i = this._startIndexes.length; + if (0 === i) return -1; + for (; t < i;) { + let n = Math.floor((t + i) / 2); + e < this.getStartLineNumber(n) ? i = n : t = n + 1 + } + return t - 1 + } + findRange(e) { + let t = this.findIndex(e); + if (t >= 0) { + if (this.getEndLineNumber(t) >= e) return t; + for (t = this.getParentIndex(t); - 1 !== t;) { + if (this.contains(t, e)) return t; + t = this.getParentIndex(t) + } + } + return -1 + } + toString() { + let e = []; + for (let t = 0; t < this.length; t++) e[t] = + `[${this.isCollapsed(t)?"+":"-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`; + return e.join(", ") + } + } + class D { + constructor(e, t) { + this.ranges = e, this.index = t + } + get startLineNumber() { + return this.ranges.getStartLineNumber(this.index) + } + get endLineNumber() { + return this.ranges.getEndLineNumber(this.index) + } + get regionIndex() { + return this.index + } + get parentIndex() { + return this.ranges.getParentIndex(this.index) + } + get isCollapsed() { + return this.ranges.isCollapsed(this.index) + } + containedBy(e) { + return e.startLineNumber <= this.startLineNumber && e.endLineNumber >= + this.endLineNumber + } + containsLine(e) { + return this.startLineNumber <= e && e <= this.endLineNumber + } + } + class E { + constructor(e, t) { + this._updateEventEmitter = new x.Q5, this.onDidChange = this._updateEventEmitter + .event, this._textModel = e, this._decorationProvider = t, this._regions = + new N(new Uint32Array(0), new Uint32Array(0)), this._editorDecorationIds = [], + this._isInitialized = !1 + } + get regions() { + return this._regions + } + get textModel() { + return this._textModel + } + get isInitialized() { + return this._isInitialized + } + toggleCollapseState(e) { + if (!e.length) return; + e = e.sort(((e, t) => e.regionIndex - t.regionIndex)); + const t = {}; + this._decorationProvider.changeDecorations((i => { + let n = 0, + o = -1, + r = -1; + const s = e => { + for (; n < e;) { + const e = this._regions.getEndLineNumber(n), + t = this._regions.isCollapsed(n); + e <= o && i.changeDecorationOptions(this._editorDecorationIds[n], + this._decorationProvider.getDecorationOption(t, e <= r)), t && + e > r && (r = e), n++ + } + }; + for (let i of e) { + let e = i.regionIndex, + n = this._editorDecorationIds[e]; + if (n && !t[n]) { + t[n] = !0, s(e); + let i = !this._regions.isCollapsed(e); + this._regions.setCollapsed(e, i), o = Math.max(o, this._regions.getEndLineNumber( + e)) + } + } + s(this._regions.length) + })), this._updateEventEmitter.fire({ + model: this, + collapseStateChanged: e + }) + } + update(e, t = []) { + let i = [], + n = -1, + o = (o, r) => { + const s = e.getStartLineNumber(o), + a = e.getEndLineNumber(o); + r || (r = e.isCollapsed(o)), r && ((e, i) => { + for (let n of t) + if (e < n && n <= i) return !0; + return !1 + })(s, a) && (r = !1), e.setCollapsed(o, r); + const l = this._textModel.getLineMaxColumn(s), + d = { + startLineNumber: s, + startColumn: Math.max(l - 1, 1), + endLineNumber: s, + endColumn: l + }; + i.push({ + range: d, + options: this._decorationProvider.getDecorationOption(r, a <= n) + }), r && a > n && (n = a) + }, + r = 0, + s = () => { + for (; r < this._regions.length;) { + let e = this._regions.isCollapsed(r); + if (r++, e) return r - 1 + } + return -1 + }, + a = 0, + l = s(); + for (; - 1 !== l && a < e.length;) { + let t = this._textModel.getDecorationRange(this._editorDecorationIds[ + l]); + if (t) { + let i = t.startLineNumber; + if (t.startColumn === Math.max(t.endColumn - 1, 1) && this._textModel + .getLineMaxColumn(i) === t.endColumn) + for (; a < e.length;) { + let t = e.getStartLineNumber(a); + if (!(i >= t)) break; + o(a, i === t), a++ + } + } + l = s() + } + for (; a < e.length;) o(a, !1), a++; + this._editorDecorationIds = this._decorationProvider.deltaDecorations( + this._editorDecorationIds, i), this._regions = e, this._isInitialized = ! + 0, this._updateEventEmitter.fire({ + model: this + }) + } + getMemento() { + let e = []; + for (let t = 0; t < this._regions.length; t++) + if (this._regions.isCollapsed(t)) { + let i = this._textModel.getDecorationRange(this._editorDecorationIds[ + t]); + if (i) { + let n = i.startLineNumber, + o = i.endLineNumber + this._regions.getEndLineNumber(t) - this._regions + .getStartLineNumber(t); + e.push({ + startLineNumber: n, + endLineNumber: o + }) + } + } + if (e.length > 0) return e + } + applyMemento(e) { + if (!Array.isArray(e)) return; + let t = []; + for (let i of e) { + let e = this.getRegionAtLine(i.startLineNumber); + e && !e.isCollapsed && t.push(e) + } + this.toggleCollapseState(t) + } + dispose() { + this._decorationProvider.deltaDecorations(this._editorDecorationIds, []) + } + getAllRegionsAtLine(e, t) { + let i = []; + if (this._regions) { + let n = this._regions.findRange(e), + o = 1; + for (; n >= 0;) { + let e = this._regions.toRegion(n); + t && !t(e, o) || i.push(e), o++, n = e.parentIndex + } + } + return i + } + getRegionAtLine(e) { + if (this._regions) { + let t = this._regions.findRange(e); + if (t >= 0) return this._regions.toRegion(t) + } + return null + } + getRegionsInside(e, t) { + let i = [], + n = e ? e.regionIndex + 1 : 0, + o = e ? e.endLineNumber : Number.MAX_VALUE; + if (t && 2 === t.length) { + const e = []; + for (let r = n, s = this._regions.length; r < s; r++) { + let n = this._regions.toRegion(r); + if (!(this._regions.getStartLineNumber(r) < o)) break; + for (; e.length > 0 && !n.containedBy(e[e.length - 1]);) e.pop(); + e.push(n), t(n, e.length) && i.push(n) + } + } else + for (let e = n, r = this._regions.length; e < r; e++) { + let n = this._regions.toRegion(e); + if (!(this._regions.getStartLineNumber(e) < o)) break; + t && !t(n) || i.push(n) + } + return i + } + } + + function I(e, t, i = Number.MAX_VALUE, n) { + let o = []; + if (n && n.length > 0) + for (let r of n) { + let n = e.getRegionAtLine(r); + if (n && (n.isCollapsed !== t && o.push(n), i > 1)) { + let r = e.getRegionsInside(n, ((e, n) => e.isCollapsed !== t && n < i)); + o.push(...r) + } + } else { + let n = e.getRegionsInside(null, ((e, n) => e.isCollapsed !== t && n < + i)); + o.push(...n) + } + e.toggleCollapseState(o) + } + + function T(e, t, i, n) { + let o = []; + for (let r of n) { + let n = e.getAllRegionsAtLine(r, ((e, n) => e.isCollapsed !== t && n <= + i)); + o.push(...n) + } + e.toggleCollapseState(o) + } + + function M(e, t, i) { + let n = []; + for (let t of i) n.push(e.getAllRegionsAtLine(t, void 0)[0]); + let o = e.getRegionsInside(null, (e => n.every((t => !t.containedBy(e) && + !e.containedBy(t))) && e.isCollapsed !== t)); + e.toggleCollapseState(o) + } + + function A(e, t, i) { + let n = e.textModel, + o = e.regions, + r = []; + for (let e = o.length - 1; e >= 0; e--) + if (i !== o.isCollapsed(e)) { + let i = o.getStartLineNumber(e); + t.test(n.getLineContent(i)) && r.push(o.toRegion(e)) + } + e.toggleCollapseState(r) + } + + function R(e, t, i) { + let n = e.regions, + o = []; + for (let e = n.length - 1; e >= 0; e--) i !== n.isCollapsed(e) && t === + n.getType(e) && o.push(n.toRegion(e)); + e.toggleCollapseState(o) + } + var O = i(6281), + P = i(3046), + F = i(9554), + B = i(7781); + const W = (0, F.q5)("folding-expanded", P.lA.chevronDown, (0, _.N)( + "foldingExpandedIcon", + "Icon for expanded ranges in the editor glyph margin.")), + z = (0, F.q5)("folding-collapsed", P.lA.chevronRight, (0, _.N)( + "foldingCollapsedIcon", + "Icon for collapsed ranges in the editor glyph margin.")); + class V { + constructor(e) { + this.editor = e, this.autoHideFoldingControls = !0, this.showFoldingHighlights = ! + 0 + } + getDecorationOption(e, t) { + return t ? V.HIDDEN_RANGE_DECORATION : e ? this.showFoldingHighlights ? + V.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION : V.COLLAPSED_VISUAL_DECORATION : + this.autoHideFoldingControls ? V.EXPANDED_AUTO_HIDE_VISUAL_DECORATION : + V.EXPANDED_VISUAL_DECORATION + } + deltaDecorations(e, t) { + return this.editor.deltaDecorations(e, t) + } + changeDecorations(e) { + return this.editor.changeDecorations(e) + } + } + V.COLLAPSED_VISUAL_DECORATION = O.qx.register({ + description: "folding-collapsed-visual-decoration", + stickiness: 1, + afterContentClassName: "inline-folded", + isWholeLine: !0, + firstLineDecorationClassName: B.kS.asClassName(z) + }), V.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION = O.qx.register({ + description: "folding-collapsed-highlighted-visual-decoration", + stickiness: 1, + afterContentClassName: "inline-folded", + className: "folded-background", + isWholeLine: !0, + firstLineDecorationClassName: B.kS.asClassName(z) + }), V.EXPANDED_AUTO_HIDE_VISUAL_DECORATION = O.qx.register({ + description: "folding-expanded-auto-hide-visual-decoration", + stickiness: 1, + isWholeLine: !0, + firstLineDecorationClassName: B.kS.asClassName(W) + }), V.EXPANDED_VISUAL_DECORATION = O.qx.register({ + description: "folding-expanded-visual-decoration", + stickiness: 1, + isWholeLine: !0, + firstLineDecorationClassName: "alwaysShowFoldIcons " + B.kS.asClassName( + W) + }), V.HIDDEN_RANGE_DECORATION = O.qx.register({ + description: "folding-hidden-range-decoration", + stickiness: 1 + }); + var H = i(9102), + U = i(4314), + j = i(9488); + class K { + constructor(e) { + this._updateEventEmitter = new x.Q5, this._foldingModel = e, this._foldingModelListener = + e.onDidChange((e => this.updateHiddenRanges())), this._hiddenRanges = [], + e.regions.length && this.updateHiddenRanges() + } + get onDidChange() { + return this._updateEventEmitter.event + } + get hiddenRanges() { + return this._hiddenRanges + } + updateHiddenRanges() { + let e = !1, + t = [], + i = 0, + n = 0, + o = Number.MAX_VALUE, + r = -1, + s = this._foldingModel.regions; + for (; i < s.length; i++) { + if (!s.isCollapsed(i)) continue; + let a = s.getStartLineNumber(i) + 1, + l = s.getEndLineNumber(i); + o <= a && l <= r || (!e && n < this._hiddenRanges.length && this._hiddenRanges[ + n].startLineNumber === a && this._hiddenRanges[n].endLineNumber === + l ? (t.push(this._hiddenRanges[n]), n++) : (e = !0, t.push(new U.e( + a, 1, l, 1))), o = a, r = l) + }(e || n < this._hiddenRanges.length) && this.applyHiddenRanges(t) + } + applyMemento(e) { + if (!Array.isArray(e) || 0 === e.length) return !1; + let t = []; + for (let i of e) { + if (!i.startLineNumber || !i.endLineNumber) return !1; + t.push(new U.e(i.startLineNumber + 1, 1, i.endLineNumber, 1)) + } + return this.applyHiddenRanges(t), !0 + } + getMemento() { + return this._hiddenRanges.map((e => ({ + startLineNumber: e.startLineNumber - 1, + endLineNumber: e.endLineNumber + }))) + } + applyHiddenRanges(e) { + this._hiddenRanges = e, this._updateEventEmitter.fire(e) + } + hasRanges() { + return this._hiddenRanges.length > 0 + } + isHidden(e) { + return null !== $(this._hiddenRanges, e) + } + adjustSelections(e) { + let t = !1, + i = this._foldingModel.textModel, + n = null, + o = e => (n && function(e, t) { + return e >= t.startLineNumber && e <= t.endLineNumber + }(e, n) || (n = $(this._hiddenRanges, e)), n ? n.startLineNumber - 1 : + null); + for (let n = 0, r = e.length; n < r; n++) { + let r = e[n], + s = o(r.startLineNumber); + s && (r = r.setStartPosition(s, i.getLineMaxColumn(s)), t = !0); + let a = o(r.endLineNumber); + a && (r = r.setEndPosition(a, i.getLineMaxColumn(a)), t = !0), e[n] = + r + } + return t + } + dispose() { + this.hiddenRanges.length > 0 && (this._hiddenRanges = [], this._updateEventEmitter + .fire(this._hiddenRanges)), this._foldingModelListener && (this._foldingModelListener + .dispose(), this._foldingModelListener = null) + } + } + + function $(e, t) { + let i = (0, j.lG)(e, (e => t < e.startLineNumber)) - 1; + return i >= 0 && e[i].endLineNumber >= t ? e[i] : null + } + var q = i(3831); + class Z { + constructor(e) { + this.editorModel = e, this.id = "indent" + } + dispose() {} + compute(e) { + let t = q.zu.getFoldingRules(this.editorModel.getLanguageIdentifier().id), + i = t && !!t.offSide, + n = t && t.markers; + return Promise.resolve(function(e, t, i, n = 5e3) { + const o = e.getOptions().tabSize; + let r, s = new G(n); + i && (r = new RegExp(`(${i.start.source})|(?:${i.end.source})`)); + let a = [], + l = e.getLineCount() + 1; + a.push({ + indent: -1, + endAbove: l, + line: l + }); + for (let i = e.getLineCount(); i > 0; i--) { + let n, l = e.getLineContent(i), + d = O.yO.computeIndentLevel(l, o), + c = a[a.length - 1]; + if (-1 !== d) { + if (r && (n = l.match(r))) { + if (!n[1]) { + a.push({ + indent: -2, + endAbove: i, + line: i + }); + continue + } { + let e = a.length - 1; + for (; e > 0 && -2 !== a[e].indent;) e--; + if (e > 0) { + a.length = e + 1, c = a[e], s.insertFirst(i, c.line, d), c.line = + i, c.indent = d, c.endAbove = i; + continue + } + } + } + if (c.indent > d) { + do { + a.pop(), c = a[a.length - 1] + } while (c.indent > d); + let e = c.endAbove - 1; + e - i >= 1 && s.insertFirst(i, e, d) + } + c.indent === d ? c.endAbove = i : a.push({ + indent: d, + endAbove: i, + line: i + }) + } else t && (c.endAbove = i) + } + return s.toIndentRanges(e) + }(this.editorModel, i, n)) + } + } + class G { + constructor(e) { + this._startIndexes = [], this._endIndexes = [], this._indentOccurrences = [], + this._length = 0, this._foldingRangesLimit = e + } + insertFirst(e, t, i) { + if (e > k || t > k) return; + let n = this._length; + this._startIndexes[n] = e, this._endIndexes[n] = t, this._length++, i < + 1e3 && (this._indentOccurrences[i] = (this._indentOccurrences[i] || 0) + + 1) + } + toIndentRanges(e) { + if (this._length <= this._foldingRangesLimit) { + let e = new Uint32Array(this._length), + t = new Uint32Array(this._length); + for (let i = this._length - 1, n = 0; i >= 0; i--, n++) e[n] = this._startIndexes[ + i], t[n] = this._endIndexes[i]; + return new N(e, t) + } { + let t = 0, + i = this._indentOccurrences.length; + for (let e = 0; e < this._indentOccurrences.length; e++) { + let n = this._indentOccurrences[e]; + if (n) { + if (n + t > this._foldingRangesLimit) { + i = e; + break + } + t += n + } + } + const n = e.getOptions().tabSize; + let o = new Uint32Array(this._foldingRangesLimit), + r = new Uint32Array(this._foldingRangesLimit); + for (let s = this._length - 1, a = 0; s >= 0; s--) { + let l = this._startIndexes[s], + d = e.getLineContent(l), + c = O.yO.computeIndentLevel(d, n); + (c < i || c === i && t++ < this._foldingRangesLimit) && (o[a] = l, r[ + a] = this._endIndexes[s], a++) + } + return new N(o, r) + } + } + } + var Y = i(4101), + Q = i(7301); + const X = {}, + J = "syntax"; + class ee { + constructor(e, t, i, n = 5e3) { + this.editorModel = e, this.providers = t, this.limit = n, this.id = J; + for (const e of t) "function" == typeof e.onDidChange && (this.disposables || + (this.disposables = new y.SL), this.disposables.add(e.onDidChange(i)) + ) + } + compute(e) { + return function(e, t, i) { + let n = null, + o = e.map(((e, o) => Promise.resolve(e.provideFoldingRanges(t, X, i)) + .then((e => { + if (!i.isCancellationRequested && Array.isArray(e)) { + Array.isArray(n) || (n = []); + let i = t.getLineCount(); + for (let t of e) t.start > 0 && t.end > t.start && t.end <= i && + n.push({ + start: t.start, + end: t.end, + rank: o, + kind: t.kind + }) + } + }), Q.Cp))); + return Promise.all(o).then((e => n)) + }(this.providers, this.editorModel, e).then((e => e ? ie(e, this.limit) : + null)) + } + dispose() { + var e; + null === (e = this.disposables) || void 0 === e || e.dispose() + } + } + class te { + constructor(e) { + this._startIndexes = [], this._endIndexes = [], this._nestingLevels = [], + this._nestingLevelCounts = [], this._types = [], this._length = 0, + this._foldingRangesLimit = e + } + add(e, t, i, n) { + if (e > k || t > k) return; + let o = this._length; + this._startIndexes[o] = e, this._endIndexes[o] = t, this._nestingLevels[ + o] = n, this._types[o] = i, this._length++, n < 30 && (this._nestingLevelCounts[ + n] = (this._nestingLevelCounts[n] || 0) + 1) + } + toIndentRanges() { + if (this._length <= this._foldingRangesLimit) { + let e = new Uint32Array(this._length), + t = new Uint32Array(this._length); + for (let i = 0; i < this._length; i++) e[i] = this._startIndexes[i], + t[i] = this._endIndexes[i]; + return new N(e, t, this._types) + } { + let e = 0, + t = this._nestingLevelCounts.length; + for (let i = 0; i < this._nestingLevelCounts.length; i++) { + let n = this._nestingLevelCounts[i]; + if (n) { + if (n + e > this._foldingRangesLimit) { + t = i; + break + } + e += n + } + } + let i = new Uint32Array(this._foldingRangesLimit), + n = new Uint32Array(this._foldingRangesLimit), + o = []; + for (let r = 0, s = 0; r < this._length; r++) { + let a = this._nestingLevels[r]; + (a < t || a === t && e++ < this._foldingRangesLimit) && (i[s] = this + ._startIndexes[r], n[s] = this._endIndexes[r], o[s] = this._types[r], + s++) + } + return new N(i, n, o) + } + } + } + + function ie(e, t) { + let i, n = e.sort(((e, t) => { + let i = e.start - t.start; + return 0 === i && (i = e.rank - t.rank), i + })), + o = new te(t), + r = []; + for (let e of n) + if (i) { + if (e.start > i.start) + if (e.end <= i.end) r.push(i), i = e, o.add(e.start, e.end, e.kind && + e.kind.value, r.length); + else { + if (e.start > i.end) { + do { + i = r.pop() + } while (i && e.start > i.end); + i && r.push(i), i = e + } + o.add(e.start, e.end, e.kind && e.kind.value, r.length) + } + } else i = e, o.add(e.start, e.end, e.kind && e.kind.value, r.length); + return o.toIndentRanges() + } + const ne = "init"; + class oe { + constructor(e, t, i, n) { + if (this.editorModel = e, this.id = ne, t.length) { + let o = t => ({ + range: { + startLineNumber: t.startLineNumber, + startColumn: 0, + endLineNumber: t.endLineNumber, + endColumn: e.getLineLength(t.endLineNumber) + }, + options: { + description: "folding-initializing-range-provider", + stickiness: 1 + } + }); + this.decorationIds = e.deltaDecorations([], t.map(o)), this.timeout = + setTimeout(i, n) + } + } + dispose() { + this.decorationIds && (this.editorModel.deltaDecorations(this.decorationIds, []), + this.decorationIds = void 0), "number" == typeof this.timeout && ( + clearTimeout(this.timeout), this.timeout = void 0) + } + compute(e) { + let t = []; + if (this.decorationIds) + for (let e of this.decorationIds) { + let i = this.editorModel.getDecorationRange(e); + i && t.push({ + start: i.startLineNumber, + end: i.endLineNumber, + rank: 1 + }) + } + return Promise.resolve(ie(t, Number.MAX_VALUE)) + } + } + var re = i(8819), + se = i(3910), + ae = i(9925); + const le = new re.uy("foldingEnabled", !1); + let de = class e extends y.JT { + constructor(e, t) { + super(), this.contextKeyService = t, this.localToDispose = this._register( + new y.SL), this.editor = e; + const i = this.editor.getOptions(); + this._isEnabled = i.get(36), this._useFoldingProviders = + "indentation" !== i.get(37), this._unfoldOnClickAfterEndOfLine = i.get( + 40), this._restoringViewState = !1, this._currentModelHasFoldedImports = ! + 1, this._foldingImportsByDefault = i.get(39), this.foldingModel = + null, this.hiddenRangeModel = null, this.rangeProvider = null, this.foldingRegionPromise = + null, this.foldingStateMemento = null, this.foldingModelPromise = + null, this.updateScheduler = null, this.cursorChangedScheduler = + null, this.mouseDownInfo = null, this.foldingDecorationProvider = + new V(e), this.foldingDecorationProvider.autoHideFoldingControls = + "mouseover" === i.get(99), this.foldingDecorationProvider.showFoldingHighlights = + i.get(38), this.foldingEnabled = le.bindTo(this.contextKeyService), + this.foldingEnabled.set(this._isEnabled), this._register(this.editor + .onDidChangeModel((() => this.onModelChanged()))), this._register( + this.editor.onDidChangeConfiguration((e => { + if (e.hasChanged(36) && (this._isEnabled = this.editor.getOptions() + .get(36), this.foldingEnabled.set(this._isEnabled), this.onModelChanged() + ), e.hasChanged(99) || e.hasChanged(38)) { + const e = this.editor.getOptions(); + this.foldingDecorationProvider.autoHideFoldingControls = + "mouseover" === e.get(99), this.foldingDecorationProvider.showFoldingHighlights = + e.get(38), this.onModelContentChanged() + } + e.hasChanged(37) && (this._useFoldingProviders = "indentation" !== + this.editor.getOptions().get(37), this.onFoldingStrategyChanged() + ), e.hasChanged(40) && (this._unfoldOnClickAfterEndOfLine = + this.editor.getOptions().get(40)), e.hasChanged(39) && (this._foldingImportsByDefault = + this.editor.getOptions().get(39)) + }))), this.onModelChanged() + } + static get(t) { + return t.getContribution(e.ID) + } + saveViewState() { + let e = this.editor.getModel(); + if (!e || !this._isEnabled || e.isTooLargeForTokenization()) return {}; + if (this.foldingModel) { + let t = this.foldingModel.isInitialized ? this.foldingModel.getMemento() : + this.hiddenRangeModel.getMemento(), + i = this.rangeProvider ? this.rangeProvider.id : void 0; + return { + collapsedRegions: t, + lineCount: e.getLineCount(), + provider: i, + foldedImports: this._currentModelHasFoldedImports + } + } + } + restoreViewState(e) { + let t = this.editor.getModel(); + if (!t || !this._isEnabled || t.isTooLargeForTokenization() || !this.hiddenRangeModel) + return; + if (!e || e.lineCount !== t.getLineCount()) return; + if (this._currentModelHasFoldedImports = !!e.foldedImports, !e.collapsedRegions) + return; + e.provider !== J && e.provider !== ne || (this.foldingStateMemento = + e); + const i = e.collapsedRegions; + if (this.hiddenRangeModel.applyMemento(i)) { + const e = this.getFoldingModel(); + e && e.then((e => { + if (e) { + this._restoringViewState = !0; + try { + e.applyMemento(i) + } finally { + this._restoringViewState = !1 + } + } + })).then(void 0, Q.dL) + } + } + onModelChanged() { + this.localToDispose.clear(); + let e = this.editor.getModel(); + this._isEnabled && e && !e.isTooLargeForTokenization() && (this._currentModelHasFoldedImports = ! + 1, this.foldingModel = new E(e, this.foldingDecorationProvider), + this.localToDispose.add(this.foldingModel), this.hiddenRangeModel = + new K(this.foldingModel), this.localToDispose.add(this.hiddenRangeModel), + this.localToDispose.add(this.hiddenRangeModel.onDidChange((e => + this.onHiddenRangesChanges(e)))), this.updateScheduler = new w.vp( + 200), this.cursorChangedScheduler = new w.pY((() => this.revealCursor()), + 200), this.localToDispose.add(this.cursorChangedScheduler), this.localToDispose + .add(Y.aC.onDidChange((() => this.onFoldingStrategyChanged()))), + this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration( + (() => this.onFoldingStrategyChanged()))), this.localToDispose.add( + this.editor.onDidChangeModelContent((() => this.onModelContentChanged())) + ), this.localToDispose.add(this.editor.onDidChangeCursorPosition((() => + this.onCursorPositionChanged()))), this.localToDispose.add(this.editor + .onMouseDown((e => this.onEditorMouseDown(e)))), this.localToDispose + .add(this.editor.onMouseUp((e => this.onEditorMouseUp(e)))), this.localToDispose + .add({ + dispose: () => { + this.foldingRegionPromise && (this.foldingRegionPromise.cancel(), + this.foldingRegionPromise = null), this.updateScheduler && + this.updateScheduler.cancel(), this.updateScheduler = null, + this.foldingModel = null, this.foldingModelPromise = null, + this.hiddenRangeModel = null, this.cursorChangedScheduler = + null, this.foldingStateMemento = null, this.rangeProvider && + this.rangeProvider.dispose(), this.rangeProvider = null + } + }), this.onModelContentChanged()) + } + onFoldingStrategyChanged() { + this.rangeProvider && this.rangeProvider.dispose(), this.rangeProvider = + null, this.onModelContentChanged() + } + getRangeProvider(e) { + if (this.rangeProvider) return this.rangeProvider; + if (this.rangeProvider = new Z(e), this._useFoldingProviders && this.foldingModel) { + let t = Y.aC.ordered(this.foldingModel.textModel); + if (0 === t.length && this.foldingStateMemento && this.foldingStateMemento + .collapsedRegions) return this.rangeProvider = new oe(e, this.foldingStateMemento + .collapsedRegions, (() => { + this.foldingStateMemento = null, this.onFoldingStrategyChanged() + }), 3e4); + t.length > 0 && (this.rangeProvider = new ee(e, t, (() => this.onModelContentChanged()))) + } + return this.foldingStateMemento = null, this.rangeProvider + } + getFoldingModel() { + return this.foldingModelPromise + } + onModelContentChanged() { + this.updateScheduler && (this.foldingRegionPromise && (this.foldingRegionPromise + .cancel(), this.foldingRegionPromise = null), this.foldingModelPromise = + this.updateScheduler.trigger((() => { + const e = this.foldingModel; + if (!e) return null; + const t = this.getRangeProvider(e.textModel); + let i = this.foldingRegionPromise = (0, w.PG)((e => t.compute(e))); + return i.then((t => { + if (t && i === this.foldingRegionPromise) { + let i; + if (this._foldingImportsByDefault && !this._currentModelHasFoldedImports) { + const e = t.setCollapsedAllOfType(Y.AD.Imports.value, !0); + e && (i = ae.ZF.capture(this.editor), this._currentModelHasFoldedImports = + e) + } + let n = this.editor.getSelections(), + o = n ? n.map((e => e.startLineNumber)) : []; + e.update(t, o), i && i.restore(this.editor) + } + return e + })) + })).then(void 0, (e => ((0, Q.dL)(e), null)))) + } + onHiddenRangesChanges(e) { + if (this.hiddenRangeModel && e.length && !this._restoringViewState) { + let e = this.editor.getSelections(); + e && this.hiddenRangeModel.adjustSelections(e) && this.editor.setSelections( + e) + } + this.editor.setHiddenAreas(e) + } + onCursorPositionChanged() { + this.hiddenRangeModel && this.hiddenRangeModel.hasRanges() && this.cursorChangedScheduler + .schedule() + } + revealCursor() { + const e = this.getFoldingModel(); + e && e.then((e => { + if (e) { + let t = this.editor.getSelections(); + if (t && t.length > 0) { + let i = []; + for (let n of t) { + let t = n.selectionStartLineNumber; + this.hiddenRangeModel && this.hiddenRangeModel.isHidden(t) && + i.push(...e.getAllRegionsAtLine(t, (e => e.isCollapsed && t > + e.startLineNumber))) + } + i.length && (e.toggleCollapseState(i), this.reveal(t[0].getPosition())) + } + } + })).then(void 0, Q.dL) + } + onEditorMouseDown(e) { + if (this.mouseDownInfo = null, !this.hiddenRangeModel || !e.target || + !e.target.range) return; + if (!e.event.leftButton && !e.event.middleButton) return; + const t = e.target.range; + let i = !1; + switch (e.target.type) { + case 4: + const n = e.target.detail, + o = e.target.element.offsetLeft; + if (n.offsetX - o < 5) return; + i = !0; + break; + case 7: + if (this._unfoldOnClickAfterEndOfLine && this.hiddenRangeModel.hasRanges() && + !e.target.detail.isAfterLines) break; + return; + case 6: + if (this.hiddenRangeModel.hasRanges()) { + let e = this.editor.getModel(); + if (e && t.startColumn === e.getLineMaxColumn(t.startLineNumber)) + break + } + return; + default: + return + } + this.mouseDownInfo = { + lineNumber: t.startLineNumber, + iconClicked: i + } + } + onEditorMouseUp(e) { + const t = this.getFoldingModel(); + if (!t || !this.mouseDownInfo || !e.target) return; + let i = this.mouseDownInfo.lineNumber, + n = this.mouseDownInfo.iconClicked, + o = e.target.range; + if (o && o.startLineNumber === i) { + if (n) { + if (4 !== e.target.type) return + } else { + let e = this.editor.getModel(); + if (!e || o.startColumn !== e.getLineMaxColumn(i)) return + } + t.then((t => { + if (t) { + let o = t.getRegionAtLine(i); + if (o && o.startLineNumber === i) { + let r = o.isCollapsed; + if (n || r) { + let n = []; + if (e.event.altKey) { + let e = e => !e.containedBy(o) && !o.containedBy(e), + i = t.getRegionsInside(null, e); + for (const e of i) e.isCollapsed && n.push(e); + 0 === n.length && (n = i) + } else { + let i = e.event.middleButton || e.event.shiftKey; + if (i) + for (const e of t.getRegionsInside(o)) e.isCollapsed === r && + n.push(e); + !r && i && 0 !== n.length || n.push(o) + } + t.toggleCollapseState(n), this.reveal({ + lineNumber: i, + column: 1 + }) + } + } + } + })).then(void 0, Q.dL) + } + } + reveal(e) { + this.editor.revealPositionInCenterIfOutsideViewport(e, 0) + } + }; + var ce, he; + de.ID = "editor.contrib.folding", de = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(ce = 1, he = re.i6, function(e, t) { + he(e, t, ce) + })], de); + class ue extends S.R6 { + runEditorCommand(e, t, i) { + let n = de.get(t); + if (!n) return; + let o = n.getFoldingModel(); + return o ? (this.reportTelemetry(e, t), o.then((e => { + if (e) { + this.invoke(n, e, t, i); + const o = t.getSelection(); + o && n.reveal(o.getStartPosition()) + } + }))) : void 0 + } + getSelectedLines(e) { + let t = e.getSelections(); + return t ? t.map((e => e.startLineNumber)) : [] + } + getLineNumbers(e, t) { + return e && e.selectionLines ? e.selectionLines.map((e => e + 1)) : + this.getSelectedLines(t) + } + run(e, t) {} + } + + function ge(e) { + if (!b.o8(e)) { + if (!b.Kn(e)) return !1; + const t = e; + if (!b.o8(t.levels) && !b.hj(t.levels)) return !1; + if (!b.o8(t.direction) && !b.HD(t.direction)) return !1; + if (!(b.o8(t.selectionLines) || b.kJ(t.selectionLines) && t.selectionLines + .every(b.hj))) return !1 + } + return !0 + } + class pe extends ue { + getFoldingLevel() { + return parseInt(this.id.substr(pe.ID_PREFIX.length)) + } + invoke(e, t, i) { + ! function(e, t, i, n) { + let o = e.getRegionsInside(null, ((e, i) => i === t && true !== e.isCollapsed && + !n.some((t => e.containsLine(t))))); + e.toggleCollapseState(o) + }(t, this.getFoldingLevel(), 0, this.getSelectedLines(i)) + } + } + pe.ID_PREFIX = "editor.foldLevel", pe.ID = e => pe.ID_PREFIX + e, (0, S._K) + (de.ID, de), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.unfold", + label: _.N("unfoldAction.label", "Unfold"), + alias: "Unfold", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: 3161, + mac: { + primary: 2649 + }, + weight: 100 + }, + description: { + description: "Unfold the content in the editor", + args: [{ + name: "Unfold editor argument", + description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t", + constraint: ge, + schema: { + type: "object", + properties: { + levels: { + type: "number", + default: 1 + }, + direction: { + type: "string", + enum: ["up", "down"], + default: "down" + }, + selectionLines: { + type: "array", + items: { + type: "number" + } + } + } + } + }] + } + }) + } + invoke(e, t, i, n) { + let o = n && n.levels || 1, + r = this.getLineNumbers(n, i); + n && "up" === n.direction ? T(t, !1, o, r) : I(t, !1, o, r) + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.unfoldRecursively", + label: _.N("unFoldRecursivelyAction.label", "Unfold Recursively"), + alias: "Unfold Recursively", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: (0, C.gx)(2089, 2137), + weight: 100 + } + }) + } + invoke(e, t, i, n) { + I(t, !1, Number.MAX_VALUE, this.getSelectedLines(i)) + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.fold", + label: _.N("foldAction.label", "Fold"), + alias: "Fold", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: 3159, + mac: { + primary: 2647 + }, + weight: 100 + }, + description: { + description: "Fold the content in the editor", + args: [{ + name: "Fold editor argument", + description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t", + constraint: ge, + schema: { + type: "object", + properties: { + levels: { + type: "number" + }, + direction: { + type: "string", + enum: ["up", "down"] + }, + selectionLines: { + type: "array", + items: { + type: "number" + } + } + } + } + }] + } + }) + } + invoke(e, t, i, n) { + let o = this.getLineNumbers(n, i); + const r = n && n.levels, + s = n && n.direction; + "number" != typeof r && "string" != typeof s ? function(e, t, i) { + let n = []; + for (let t of i) { + let i = e.getAllRegionsAtLine(t, (e => true !== e.isCollapsed)); + i.length > 0 && n.push(i[0]) + } + e.toggleCollapseState(n) + }(t, 0, o) : "up" === s ? T(t, !0, r || 1, o) : I(t, !0, r || 1, o) + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.foldRecursively", + label: _.N("foldRecursivelyAction.label", "Fold Recursively"), + alias: "Fold Recursively", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: (0, C.gx)(2089, 2135), + weight: 100 + } + }) + } + invoke(e, t, i) { + let n = this.getSelectedLines(i); + I(t, !0, Number.MAX_VALUE, n) + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.foldAll", + label: _.N("foldAllAction.label", "Fold All"), + alias: "Fold All", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: (0, C.gx)(2089, 2069), + weight: 100 + } + }) + } + invoke(e, t, i) { + I(t, !0) + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.unfoldAll", + label: _.N("unfoldAllAction.label", "Unfold All"), + alias: "Unfold All", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: (0, C.gx)(2089, 2088), + weight: 100 + } + }) + } + invoke(e, t, i) { + I(t, !1) + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.foldAllBlockComments", + label: _.N("foldAllBlockComments.label", + "Fold All Block Comments"), + alias: "Fold All Block Comments", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: (0, C.gx)(2089, 2133), + weight: 100 + } + }) + } + invoke(e, t, i) { + if (t.regions.hasTypes()) R(t, Y.AD.Comment.value, !0); + else { + const e = i.getModel(); + if (!e) return; + let n = q.zu.getComments(e.getLanguageIdentifier().id); + n && n.blockCommentStartToken && A(t, new RegExp("^\\s*" + (0, v.ec) + (n.blockCommentStartToken)), !0) + } + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.foldAllMarkerRegions", + label: _.N("foldAllMarkerRegions.label", "Fold All Regions"), + alias: "Fold All Regions", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: (0, C.gx)(2089, 2077), + weight: 100 + } + }) + } + invoke(e, t, i) { + if (t.regions.hasTypes()) R(t, Y.AD.Region.value, !0); + else { + const e = i.getModel(); + if (!e) return; + let n = q.zu.getFoldingRules(e.getLanguageIdentifier().id); + n && n.markers && n.markers.start && A(t, new RegExp(n.markers.start), ! + 0) + } + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.unfoldAllMarkerRegions", + label: _.N("unfoldAllMarkerRegions.label", "Unfold All Regions"), + alias: "Unfold All Regions", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: (0, C.gx)(2089, 2078), + weight: 100 + } + }) + } + invoke(e, t, i) { + if (t.regions.hasTypes()) R(t, Y.AD.Region.value, !1); + else { + const e = i.getModel(); + if (!e) return; + let n = q.zu.getFoldingRules(e.getLanguageIdentifier().id); + n && n.markers && n.markers.start && A(t, new RegExp(n.markers.start), ! + 1) + } + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.foldAllExcept", + label: _.N("foldAllExcept.label", + "Fold All Regions Except Selected"), + alias: "Fold All Regions Except Selected", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: (0, C.gx)(2089, 2131), + weight: 100 + } + }) + } + invoke(e, t, i) { + M(t, !0, this.getSelectedLines(i)) + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.unfoldAllExcept", + label: _.N("unfoldAllExcept.label", + "Unfold All Regions Except Selected"), + alias: "Unfold All Regions Except Selected", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: (0, C.gx)(2089, 2129), + weight: 100 + } + }) + } + invoke(e, t, i) { + M(t, !1, this.getSelectedLines(i)) + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.toggleFold", + label: _.N("toggleFoldAction.label", "Toggle Fold"), + alias: "Toggle Fold", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: (0, C.gx)(2089, 2090), + weight: 100 + } + }) + } + invoke(e, t, i) { + ! function(e, t, i) { + let n = []; + for (let t of i) { + let i = e.getRegionAtLine(t); + if (i) { + i.isCollapsed; + n.push(i), 0 + } + } + e.toggleCollapseState(n) + }(t, 0, this.getSelectedLines(i)) + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.gotoParentFold", + label: _.N("gotoParentFold.label", "Go to Parent Fold"), + alias: "Go to Parent Fold", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + weight: 100 + } + }) + } + invoke(e, t, i) { + let n = this.getSelectedLines(i); + if (n.length > 0) { + let e = function(e, t) { + let i = null, + n = t.getRegionAtLine(e); + if (null !== n && (i = n.startLineNumber, e === i)) { + let e = n.parentIndex; + i = -1 !== e ? t.regions.getStartLineNumber(e) : null + } + return i + }(n[0], t); + null !== e && i.setSelection({ + startLineNumber: e, + startColumn: 1, + endLineNumber: e, + endColumn: 1 + }) + } + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.gotoPreviousFold", + label: _.N("gotoPreviousFold.label", "Go to Previous Fold"), + alias: "Go to Previous Fold", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + weight: 100 + } + }) + } + invoke(e, t, i) { + let n = this.getSelectedLines(i); + if (n.length > 0) { + let e = function(e, t) { + let i = t.getRegionAtLine(e); + if (null !== i) { + if (e !== i.startLineNumber) return i.startLineNumber; { + let e = i.parentIndex, + n = 0; + for (-1 !== e && (n = t.regions.getStartLineNumber(i.parentIndex)); null !== + i;) { + if (!(i.regionIndex > 0)) return null; + if (i = t.regions.toRegion(i.regionIndex - 1), i.startLineNumber <= + n) return null; + if (i.parentIndex === e) return i.startLineNumber + } + } + } else if (t.regions.length > 0) + for (i = t.regions.toRegion(t.regions.length - 1); null !== i;) { + if (-1 === i.parentIndex && i.startLineNumber < e) return i.startLineNumber; + i = i.regionIndex > 0 ? t.regions.toRegion(i.regionIndex - 1) : + null + } + return null + }(n[0], t); + null !== e && i.setSelection({ + startLineNumber: e, + startColumn: 1, + endLineNumber: e, + endColumn: 1 + }) + } + } + }), (0, S.Qr)(class extends ue { + constructor() { + super({ + id: "editor.gotoNextFold", + label: _.N("gotoNextFold.label", "Go to Next Fold"), + alias: "Go to Next Fold", + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + weight: 100 + } + }) + } + invoke(e, t, i) { + let n = this.getSelectedLines(i); + if (n.length > 0) { + let e = function(e, t) { + let i = t.getRegionAtLine(e); + if (null !== i) { + let e = i.parentIndex, + n = 0; + if (-1 !== e) n = t.regions.getEndLineNumber(i.parentIndex); + else { + if (0 === t.regions.length) return null; + n = t.regions.getEndLineNumber(t.regions.length - 1) + } + for (; null !== i;) { + if (!(i.regionIndex < t.regions.length)) return null; + if (i = t.regions.toRegion(i.regionIndex + 1), i.startLineNumber >= + n) return null; + if (i.parentIndex === e) return i.startLineNumber + } + } else if (t.regions.length > 0) + for (i = t.regions.toRegion(0); null !== i;) { + if (-1 === i.parentIndex && i.startLineNumber > e) return i.startLineNumber; + i = i.regionIndex < t.regions.length ? t.regions.toRegion(i.regionIndex + + 1) : null + } + return null + }(n[0], t); + null !== e && i.setSelection({ + startLineNumber: e, + startColumn: 1, + endLineNumber: e, + endColumn: 1 + }) + } + } + }); + for (let e = 1; e <= 7; e++)(0, S.QG)(new pe({ + id: pe.ID(e), + label: _.N("foldLevelAction.label", "Fold Level {0}", e), + alias: `Fold Level ${e}`, + precondition: le, + kbOpts: { + kbExpr: H.u.editorTextFocus, + primary: (0, C.gx)(2089, 2048 | 21 + e), + weight: 100 + } + })); + const me = (0, se.P6)("editor.foldBackground", { + light: (0, se.Zn)(se.hE, .3), + dark: (0, se.Zn)(se.hE, .3), + hc: null + }, _.N("foldBackgroundBackground", + "Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations." + ), !0), + fe = (0, se.P6)("editorGutter.foldingControlForeground", { + dark: se.XZ, + light: se.XZ, + hc: se.XZ + }, _.N("editorGutter.foldingControlForeground", + "Color of the folding control in the editor gutter.")); + (0, B.Ic)(((e, t) => { + const i = e.getColor(me); + i && t.addRule( + `.monaco-editor .folded-background { background-color: ${i}; }`); + const n = e.getColor(fe); + n && t.addRule( + `\n\t\t.monaco-editor .cldr${B.kS.asCSSSelector(W)},\n\t\t.monaco-editor .cldr${B.kS.asCSSSelector(z)} {\n\t\t\tcolor: ${n} !important;\n\t\t}\n\t\t` + ) + })) + }, + 3111: (e, t, i) => { + "use strict"; + i.r(t); + var n = i(3580), + o = i(6830), + r = i(2334); + class s extends o.R6 { + constructor() { + super({ + id: "editor.action.fontZoomIn", + label: n.N("EditorFontZoomIn.label", "Editor Font Zoom In"), + alias: "Editor Font Zoom In", + precondition: void 0 + }) + } + run(e, t) { + r.C.setZoomLevel(r.C.getZoomLevel() + 1) + } + } + class a extends o.R6 { + constructor() { + super({ + id: "editor.action.fontZoomOut", + label: n.N("EditorFontZoomOut.label", "Editor Font Zoom Out"), + alias: "Editor Font Zoom Out", + precondition: void 0 + }) + } + run(e, t) { + r.C.setZoomLevel(r.C.getZoomLevel() - 1) + } + } + class l extends o.R6 { + constructor() { + super({ + id: "editor.action.fontZoomReset", + label: n.N("EditorFontZoomReset.label", "Editor Font Zoom Reset"), + alias: "Editor Font Zoom Reset", + precondition: void 0 + }) + } + run(e, t) { + r.C.setZoomLevel(0) + } + }(0, o.Qr)(s), (0, o.Qr)(a), (0, o.Qr)(l) + }, + 3606: (e, t, i) => { + "use strict"; + i.d(t, { + xC: () => N, + Zg: () => k, + x$: () => D, + Qq: () => I, + Qs: () => M + }); + var n = i(6346), + o = i(9488), + r = i(1050), + s = i(7301), + a = i(666), + l = i(9925), + d = i(5520), + c = i(187), + h = i(4314), + u = i(3860), + g = i(4101), + p = i(469), + m = i(1200), + f = i(9939), + _ = i(3580); + class b { + constructor(e) { + this.value = e, this._lower = e.toLowerCase() + } + static toKey(e) { + return "string" == typeof e ? e.toLowerCase() : e._lower + } + } + var v = i(2065), + w = i(1741), + C = i(4565), + y = i(8401), + S = i(3725), + x = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + + function k(e) { + if (!(e = e.filter((e => e.range))).length) return; + let { + range: t + } = e[0]; + for (let i = 1; i < e.length; i++) t = h.e.plusRange(t, e[i].range); + const { + startLineNumber: i, + endLineNumber: o + } = t; + i === o ? 1 === e.length ? (0, n.Z9)(_.N("hint11", + "Made 1 formatting edit on line {0}", i)) : (0, n.Z9)(_.N("hintn1", + "Made {0} formatting edits on line {1}", e.length, i)) : 1 === e.length ? + (0, n.Z9)(_.N("hint1n", + "Made 1 formatting edit between lines {0} and {1}", i, o)) : (0, n.Z9) + (_.N("hintnn", "Made {0} formatting edits between lines {1} and {2}", e + .length, i, o)) + } + + function L(e) { + const t = [], + i = new Set, + n = g.Az.ordered(e); + for (const e of n) t.push(e), e.extensionId && i.add(b.toKey(e.extensionId)); + const o = g.vN.ordered(e); + for (const e of o) { + if (e.extensionId) { + if (i.has(b.toKey(e.extensionId))) continue; + i.add(b.toKey(e.extensionId)) + } + t.push({ + displayName: e.displayName, + extensionId: e.extensionId, + provideDocumentFormattingEdits: (t, i, n) => e.provideDocumentRangeFormattingEdits( + t, t.getFullModelRange(), i, n) + }) + } + return t + } + class N { + static setFormatterSelector(e) { + return { + dispose: N._selectors.unshift(e) + } + } + static select(e, t, i) { + return x(this, void 0, void 0, (function*() { + if (0 === e.length) return; + const n = S.$.first(N._selectors); + return n ? yield n(e, t, i) : void 0 + })) + } + } + + function D(e, t, i, n, o, r) { + return x(this, void 0, void 0, (function*() { + const s = e.get(v.TG), + a = (0, d.CL)(t) ? t.getModel() : t, + l = g.vN.ordered(a), + c = yield N.select(l, a, n); + c && (o.report(c), yield s.invokeFunction(E, c, t, i, r)) + })) + } + + function E(e, t, i, n, r) { + return x(this, void 0, void 0, (function*() { + const s = e.get(p.p); + let a, c; + (0, d.CL)(i) ? (a = i.getModel(), c = new l.Dl(i, 5, void 0, r)) : ( + a = i, c = new l.YQ(i, r)); + let g = [], + m = 0; + for (let e of(0, o._2)(n).sort(h.e.compareRangesUsingStarts)) m > 0 && + h.e.areIntersectingOrTouching(g[m - 1], e) ? g[m - 1] = h.e.fromPositions( + g[m - 1].getStartPosition(), e.getEndPosition()) : m = g.push(e); + const _ = e => x(this, void 0, void 0, (function*() { + return (yield t.provideDocumentRangeFormattingEdits(a, e, a.getFormattingOptions(), + c.token)) || [] + })), + b = (e, t) => { + if (!e.length || !t.length) return !1; + const i = e.reduce(((e, t) => h.e.plusRange(e, t.range)), e[0].range); + if (!t.some((e => h.e.intersectRanges(i, e.range)))) return !1; + for (let i of e) + for (let e of t) + if (h.e.intersectRanges(i.range, e.range)) return !0; + return !1 + }, + v = [], + w = []; + try { + for (let e of g) { + if (c.token.isCancellationRequested) return !0; + w.push(yield _(e)) + } + for (let e = 0; e < g.length; ++e) + for (let t = e + 1; t < g.length; ++t) { + if (c.token.isCancellationRequested) return !0; + if (b(w[e], w[t])) { + const i = h.e.plusRange(g[e], g[t]), + n = yield _(i); + g.splice(t, 1), g.splice(e, 1), g.push(i), w.splice(t, 1), w.splice( + e, 1), w.push(n), e = 0, t = 0 + } + } + for (let e of w) { + if (c.token.isCancellationRequested) return !0; + const t = yield s.computeMoreMinimalEdits(a.uri, e); + t && v.push(...t) + } + } finally { + c.dispose() + } + if (0 === v.length) return !1; + if ((0, d.CL)(i)) f.V.execute(i, v, !0), k(v), i.revealPositionInCenterIfOutsideViewport( + i.getPosition(), 1); + else { + const [{ + range: e + }] = v, t = new u.Y(e.startLineNumber, e.startColumn, e.endLineNumber, + e.endColumn); + a.pushEditOperations([t], v.map((e => ({ + text: e.text, + range: h.e.lift(e.range), + forceMoveMarkers: !0 + }))), (e => { + for (const { + range: i + } + of e) + if (h.e.areIntersectingOrTouching(i, t)) return [new u.Y(i.startLineNumber, + i.startColumn, i.endLineNumber, i.endColumn)]; + return null + })) + } + return !0 + })) + } + + function I(e, t, i, n, o) { + return x(this, void 0, void 0, (function*() { + const r = e.get(v.TG), + s = (0, d.CL)(t) ? t.getModel() : t, + a = L(s), + l = yield N.select(a, s, i); + l && (n.report(l), yield r.invokeFunction(T, l, t, i, o)) + })) + } + + function T(e, t, i, n, o) { + return x(this, void 0, void 0, (function*() { + const r = e.get(p.p); + let s, a, c; + (0, d.CL)(i) ? (s = i.getModel(), a = new l.Dl(i, 5, void 0, o)) : ( + s = i, a = new l.YQ(i, o)); + try { + const e = yield t.provideDocumentFormattingEdits(s, s.getFormattingOptions(), + a.token); + if (c = yield r.computeMoreMinimalEdits(s.uri, e), a.token.isCancellationRequested) + return !0 + } finally { + a.dispose() + } + if (!c || 0 === c.length) return !1; + if ((0, d.CL)(i)) f.V.execute(i, c, 2 !== n), 2 !== n && (k(c), i.revealPositionInCenterIfOutsideViewport( + i.getPosition(), 1)); + else { + const [{ + range: e + }] = c, t = new u.Y(e.startLineNumber, e.startColumn, e.endLineNumber, + e.endColumn); + s.pushEditOperations([t], c.map((e => ({ + text: e.text, + range: h.e.lift(e.range), + forceMoveMarkers: !0 + }))), (e => { + for (const { + range: i + } + of e) + if (h.e.areIntersectingOrTouching(i, t)) return [new u.Y(i.startLineNumber, + i.startColumn, i.endLineNumber, i.endColumn)]; + return null + })) + } + return !0 + })) + } + + function M(e, t, i, n, o) { + const a = g.ln.ordered(t); + return 0 === a.length || a[0].autoFormatTriggerCharacters.indexOf(n) < 0 ? + Promise.resolve(void 0) : Promise.resolve(a[0].provideOnTypeFormattingEdits( + t, i, n, o, r.T.None)).catch(s.Cp).then((i => e.computeMoreMinimalEdits( + t.uri, i))) + } + N._selectors = new w.S, C.P.registerCommand("_executeFormatRangeProvider", ( + function(e, ...t) { + const [i, n, l] = t; + (0, y.p_)(a.o.isUri(i)), (0, y.p_)(h.e.isIRange(n)); + const d = e.get(m.q).getModel(i); + if (!d) throw (0, s.b1)("resource"); + return function(e, t, i, n, r) { + return x(this, void 0, void 0, (function*() { + const a = g.vN.ordered(t); + for (const l of a) { + let a = yield Promise.resolve(l.provideDocumentRangeFormattingEdits( + t, i, n, r)).catch(s.Cp); + if ((0, o.Of)(a)) return yield e.computeMoreMinimalEdits(t.uri, + a) + } + })) + }(e.get(p.p), d, h.e.lift(n), l, r.T.None) + })), C.P.registerCommand("_executeFormatDocumentProvider", (function(e, + ...t) { + const [i, n] = t; + (0, y.p_)(a.o.isUri(i)); + const l = e.get(m.q).getModel(i); + if (!l) throw (0, s.b1)("resource"); + return function(e, t, i, n) { + return x(this, void 0, void 0, (function*() { + const r = L(t); + for (const a of r) { + let r = yield Promise.resolve(a.provideDocumentFormattingEdits( + t, i, n)).catch(s.Cp); + if ((0, o.Of)(r)) return yield e.computeMoreMinimalEdits(t.uri, + r) + } + })) + }(e.get(p.p), l, n, r.T.None) + })), C.P.registerCommand("_executeFormatOnTypeProvider", (function(e, .. + .t) { + const [i, n, o, r] = t; + (0, y.p_)(a.o.isUri(i)), (0, y.p_)(c.L.isIPosition(n)), (0, y.p_)( + "string" == typeof o); + const l = e.get(m.q).getModel(i); + if (!l) throw (0, s.b1)("resource"); + return M(e.get(p.p), l, c.L.lift(n), o, r) + })) + }, + 4818: (e, t, i) => { + "use strict"; + i.r(t); + var n = i(9488), + o = i(1050), + r = i(2258), + s = i(5976), + a = i(6830), + l = i(1640), + d = i(4906), + c = i(4314), + h = i(9102), + u = i(4101), + g = i(469), + p = i(3606), + m = i(9939), + f = i(3580), + _ = i(4565), + b = i(8819), + v = i(2065), + w = i(7301), + C = i(535), + y = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + S = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + x = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + let k = class { + constructor(e, t) { + this._workerService = t, this._callOnDispose = new s.SL, this._callOnModel = + new s.SL, this._editor = e, this._callOnDispose.add(e.onDidChangeConfiguration( + (() => this._update()))), this._callOnDispose.add(e.onDidChangeModel( + (() => this._update()))), this._callOnDispose.add(e.onDidChangeModelLanguage( + (() => this._update()))), this._callOnDispose.add(u.ln.onDidChange( + this._update, this)) + } + dispose() { + this._callOnDispose.dispose(), this._callOnModel.dispose() + } + _update() { + if (this._callOnModel.clear(), !this._editor.getOption(47)) return; + if (!this._editor.hasModel()) return; + const e = this._editor.getModel(), + [t] = u.ln.ordered(e); + if (!t || !t.autoFormatTriggerCharacters) return; + let i = new d.q; + for (let e of t.autoFormatTriggerCharacters) i.add(e.charCodeAt(0)); + this._callOnModel.add(this._editor.onDidType((e => { + let t = e.charCodeAt(e.length - 1); + i.has(t) && this._trigger(String.fromCharCode(t)) + }))) + } + _trigger(e) { + if (!this._editor.hasModel()) return; + if (this._editor.getSelections().length > 1) return; + const t = this._editor.getModel(), + i = this._editor.getPosition(); + let o = !1; + const r = this._editor.onDidChangeModelContent((e => { + if (e.isFlush) return o = !0, void r.dispose(); + for (let t = 0, n = e.changes.length; t < n; t++) + if (e.changes[t].range.endLineNumber <= i.lineNumber) return o = ! + 0, void r.dispose() + })); + (0, p.Qs)(this._workerService, t, i, e, t.getFormattingOptions()).then + ((e => { + r.dispose(), o || (0, n.Of)(e) && (m.V.execute(this._editor, e, ! + 0), (0, p.Zg)(e)) + }), (e => { + throw r.dispose(), e + })) + } + }; + k.ID = "editor.contrib.autoFormat", k = y([S(1, g.p)], k); + let L = class { + constructor(e, t) { + this.editor = e, this._instantiationService = t, this._callOnDispose = + new s.SL, this._callOnModel = new s.SL, this._callOnDispose.add(e.onDidChangeConfiguration( + (() => this._update()))), this._callOnDispose.add(e.onDidChangeModel( + (() => this._update()))), this._callOnDispose.add(e.onDidChangeModelLanguage( + (() => this._update()))), this._callOnDispose.add(u.vN.onDidChange( + this._update, this)) + } + dispose() { + this._callOnDispose.dispose(), this._callOnModel.dispose() + } + _update() { + this._callOnModel.clear(), this.editor.getOption(46) && this.editor.hasModel() && + u.vN.has(this.editor.getModel()) && this._callOnModel.add(this.editor + .onDidPaste((({ + range: e + }) => this._trigger(e)))) + } + _trigger(e) { + this.editor.hasModel() && (this.editor.getSelections().length > 1 || + this._instantiationService.invokeFunction(p.x$, this.editor, e, 2, + C.E.None, o.T.None).catch(w.dL)) + } + }; + L.ID = "editor.contrib.formatOnPaste", L = y([S(1, v.TG)], L); + class N extends a.R6 { + constructor() { + super({ + id: "editor.action.formatDocument", + label: f.N("formatDocument.label", "Format Document"), + alias: "Format Document", + precondition: b.Ao.and(h.u.notInCompositeEditor, h.u.writable, h.u + .hasDocumentFormattingProvider), + kbOpts: { + kbExpr: h.u.editorTextFocus, + primary: 1572, + linux: { + primary: 3111 + }, + weight: 100 + }, + contextMenuOpts: { + group: "1_modification", + order: 1.3 + } + }) + } + run(e, t) { + return x(this, void 0, void 0, (function*() { + if (t.hasModel()) { + const i = e.get(v.TG), + n = e.get(C.e); + yield n.showWhile(i.invokeFunction(p.Qq, t, 1, C.E.None, o.T.None), + 250) + } + })) + } + } + class D extends a.R6 { + constructor() { + super({ + id: "editor.action.formatSelection", + label: f.N("formatSelection.label", "Format Selection"), + alias: "Format Selection", + precondition: b.Ao.and(h.u.writable, h.u.hasDocumentSelectionFormattingProvider), + kbOpts: { + kbExpr: h.u.editorTextFocus, + primary: (0, r.gx)(2089, 2084), + weight: 100 + }, + contextMenuOpts: { + when: h.u.hasNonEmptySelection, + group: "1_modification", + order: 1.31 + } + }) + } + run(e, t) { + return x(this, void 0, void 0, (function*() { + if (!t.hasModel()) return; + const i = e.get(v.TG), + n = t.getModel(), + r = t.getSelections().map((e => e.isEmpty() ? new c.e(e.startLineNumber, + 1, e.startLineNumber, n.getLineMaxColumn(e.startLineNumber)) : + e)), + s = e.get(C.e); + yield s.showWhile(i.invokeFunction(p.x$, t, r, 1, C.E.None, o.T.None), + 250) + })) + } + }(0, a._K)(k.ID, k), (0, a._K)(L.ID, L), (0, a.Qr)(N), (0, a.Qr)(D), _.P + .registerCommand("editor.action.format", (e => x(void 0, void 0, void 0, ( + function*() { + const t = e.get(l.$).getFocusedCodeEditor(); + if (!t || !t.hasModel()) return; + const i = e.get(_.H); + t.getSelection().isEmpty() ? yield i.executeCommand( + "editor.action.formatDocument") : yield i.executeCommand( + "editor.action.formatSelection") + })))) + }, + 9939: (e, t, i) => { + "use strict"; + i.d(t, { + V: () => r + }); + var n = i(9386), + o = i(4314); + class r { + static _handleEolEdits(e, t) { + let i, n = []; + for (let e of t) "number" == typeof e.eol && (i = e.eol), e.range && + "string" == typeof e.text && n.push(e); + return "number" == typeof i && e.hasModel() && e.getModel().pushEOL(i), + n + } + static _isFullModelReplaceEdit(e, t) { + if (!e.hasModel()) return !1; + const i = e.getModel(), + n = i.validateRange(t.range); + return i.getFullModelRange().equalsRange(n) + } + static execute(e, t, i) { + i && e.pushUndoStop(); + const s = r._handleEolEdits(e, t); + 1 === s.length && r._isFullModelReplaceEdit(e, s[0]) ? e.executeEdits( + "formatEditsCommand", s.map((e => n.h.replace(o.e.lift(e.range), e.text))) + ) : e.executeEdits("formatEditsCommand", s.map((e => n.h.replaceMove( + o.e.lift(e.range), e.text)))), i && e.pushUndoStop() + } + } + }, + 5091: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + MarkerController: () => fe, + NextMarkerAction: () => be + }); + var n = i(3580), + o = i(5976), + r = i(8819), + s = i(187), + a = i(4314), + l = i(6830), + d = i(9102), + c = i(3379), + h = i.n(c), + u = i(7795), + g = i.n(u), + p = i(569), + m = i.n(p), + f = i(3565), + _ = i.n(f), + b = i(9216), + v = i.n(b), + w = i(4589), + C = i.n(w), + y = i(8994), + S = {}; + S.styleTagTransform = C(), S.setAttributes = _(), S.insert = m().bind( + null, "head"), S.domAPI = g(), S.insertStyleElement = v(), h()(y.Z, S), + y.Z && y.Z.locals && y.Z.locals; + var x, k = i(5321), + L = i(8674), + N = i(3910), + D = i(7781), + E = i(1264), + I = i(6781), + T = i(8843), + M = i(9488), + A = i(4669), + R = i(1884), + O = i(5935), + P = i(3046), + F = i(4603); + ! function(e) { + e.className = function(e) { + switch (e) { + case F.Z.Ignore: + return "severity-ignore " + P.lA.info.classNames; + case F.Z.Info: + return P.lA.info.classNames; + case F.Z.Warning: + return P.lA.warning.classNames; + case F.Z.Error: + return P.lA.error.classNames; + default: + return "" + } + } + }(x || (x = {})), (0, D.Ic)(((e, t) => { + const i = e.getColor(N.Jp); + if (i) { + const e = P.lA.error.cssSelector; + t.addRule( + `\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.text-search-provider-messages .providerMessage ${e},\n\t\t\t.extensions-viewlet > .extensions ${e} {\n\t\t\t\tcolor: ${i};\n\t\t\t}\n\t\t` + ) + } + const n = e.getColor(N.BO); + if (n) { + const e = P.lA.warning.cssSelector; + t.addRule( + `\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.extension-editor ${e},\n\t\t\t.text-search-provider-messages .providerMessage ${e},\n\t\t\t.preferences-editor ${e} {\n\t\t\t\tcolor: ${n};\n\t\t\t}\n\t\t` + ) + } + const o = e.getColor(N.OL); + if (o) { + const e = P.lA.info.cssSelector; + t.addRule( + `\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.text-search-provider-messages .providerMessage ${e},\n\t\t\t.extension-editor ${e} {\n\t\t\t\tcolor: ${o};\n\t\t\t}\n\t\t` + ) + } + })); + var B = i(988), + W = i(4144), + z = i(1133), + V = i(2065), + H = i(7295), + U = i(4349), + j = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + class K { + constructor(e, t, i, n, r) { + this._openerService = n, this._labelService = r, this._lines = 0, this + ._longestLineLength = 0, this._relatedDiagnostics = new WeakMap, this + ._disposables = new o.SL, this._editor = t; + const s = document.createElement("div"); + s.className = "descriptioncontainer", this._messageBlock = document.createElement( + "div"), this._messageBlock.classList.add("message"), this._messageBlock + .setAttribute("aria-live", "assertive"), this._messageBlock.setAttribute( + "role", "alert"), s.appendChild(this._messageBlock), this._relatedBlock = + document.createElement("div"), s.appendChild(this._relatedBlock), + this._disposables.add(k.mu(this._relatedBlock, "click", (e => { + e.preventDefault(); + const t = this._relatedDiagnostics.get(e.target); + t && i(t) + }))), this._scrollable = new I.NB(s, { + horizontal: 1, + vertical: 1, + useShadows: !1, + horizontalScrollbarSize: 3, + verticalScrollbarSize: 3 + }), e.appendChild(this._scrollable.getDomNode()), this._disposables.add( + this._scrollable.onScroll((e => { + s.style.left = `-${e.scrollLeft}px`, s.style.top = + `-${e.scrollTop}px` + }))), this._disposables.add(this._scrollable) + } + dispose() { + (0, o.B9)(this._disposables) + } + update(e) { + const { + source: t, + message: i, + relatedInformation: n, + code: o + } = e; + let r = ((null == t ? void 0 : t.length) || 0) + "()".length; + o && (r += "string" == typeof o ? o.length : o.value.length); + const s = (0, H.uq)(i); + this._lines = s.length, this._longestLineLength = 0; + for (const e of s) this._longestLineLength = Math.max(e.length + r, + this._longestLineLength); + k.PO(this._messageBlock), this._messageBlock.setAttribute("aria-label", + this.getAriaLabel(e)), this._editor.applyFontInfo(this._messageBlock); + let a = this._messageBlock; + for (const e of s) a = document.createElement("div"), a.innerText = e, + "" === e && (a.style.height = this._messageBlock.style.lineHeight), + this._messageBlock.appendChild(a); + if (t || o) { + const e = document.createElement("span"); + if (e.classList.add("details"), a.appendChild(e), t) { + const i = document.createElement("span"); + i.innerText = t, i.classList.add("source"), e.appendChild(i) + } + if (o) + if ("string" == typeof o) { + const t = document.createElement("span"); + t.innerText = `(${o})`, t.classList.add("code"), e.appendChild(t) + } else this._codeLink = k.$("a.code-link"), this._codeLink.setAttribute( + "href", `${o.target.toString()}`), this._codeLink.onclick = e => { + this._openerService.open(o.target, { + allowCommands: !0 + }), e.preventDefault(), e.stopPropagation() + }, k.R3(this._codeLink, k.$("span")).innerText = o.value, e.appendChild( + this._codeLink) + } + if (k.PO(this._relatedBlock), this._editor.applyFontInfo(this._relatedBlock), ( + 0, M.Of)(n)) { + const e = this._relatedBlock.appendChild(document.createElement("div")); + e.style.paddingTop = + `${Math.floor(.66*this._editor.getOption(58))}px`, this._lines += 1; + for (const t of n) { + let i = document.createElement("div"), + n = document.createElement("a"); + n.classList.add("filename"), n.innerText = + `${(0,T.p)(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `, + n.title = this._labelService.getUriLabel(t.resource), this._relatedDiagnostics + .set(n, t); + let o = document.createElement("span"); + o.innerText = t.message, i.appendChild(n), i.appendChild(o), this._lines += + 1, e.appendChild(i) + } + } + const l = this._editor.getOption(42), + d = Math.ceil(l.typicalFullwidthCharacterWidth * this._longestLineLength * + .75), + c = l.lineHeight * this._lines; + this._scrollable.setScrollDimensions({ + scrollWidth: d, + scrollHeight: c + }) + } + layout(e, t) { + this._scrollable.getDomNode().style.height = `${e}px`, this._scrollable + .getDomNode().style.width = `${t}px`, this._scrollable.setScrollDimensions({ + width: t, + height: e + }) + } + getHeightInLines() { + return Math.min(17, this._lines) + } + getAriaLabel(e) { + let t = ""; + switch (e.severity) { + case L.ZL.Error: + t = n.N("Error", "Error"); + break; + case L.ZL.Warning: + t = n.N("Warning", "Warning"); + break; + case L.ZL.Info: + t = n.N("Info", "Info"); + break; + case L.ZL.Hint: + t = n.N("Hint", "Hint") + } + let i = n.N("marker aria", "{0} at {1}. ", t, e.startLineNumber + ":" + + e.startColumn); + const o = this._editor.getModel(); + return o && e.startLineNumber <= o.getLineCount() && e.startLineNumber >= + 1 && (i = `${o.getLineContent(e.startLineNumber)}, ${i}`), i + } + } + let $ = class e extends R.vk { + constructor(e, t, i, n, r, s, a) { + super(e, { + showArrow: !0, + showFrame: !0, + isAccessible: !0, + frameWidth: 1 + }, r), this._themeService = t, this._openerService = i, this._menuService = + n, this._contextKeyService = s, this._labelService = a, this._callOnDispose = + new o.SL, this._onDidSelectRelatedInformation = new A.Q5, this.onDidSelectRelatedInformation = + this._onDidSelectRelatedInformation.event, this._severity = L.ZL.Warning, + this._backgroundColor = E.Il.white, this._applyTheme(t.getColorTheme()), + this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind( + this))), this.create() + } + _applyTheme(e) { + this._backgroundColor = e.getColor(ie); + let t = Y, + i = Q; + this._severity === L.ZL.Warning ? (t = X, i = J) : this._severity === + L.ZL.Info && (t = ee, i = te); + const n = e.getColor(t), + o = e.getColor(i); + this.style({ + arrowColor: n, + frameColor: n, + headerBackgroundColor: o, + primaryHeadingColor: e.getColor(R.IH), + secondaryHeadingColor: e.getColor(R.R7) + }) + } + _applyStyles() { + this._parentContainer && (this._parentContainer.style.backgroundColor = + this._backgroundColor ? this._backgroundColor.toString() : ""), + super._applyStyles() + } + dispose() { + this._callOnDispose.dispose(), super.dispose() + } + _fillHead(t) { + super._fillHead(t), this._disposables.add(this._actionbarWidget.actionRunner + .onBeforeRun((e => this.editor.focus()))); + const i = [], + n = this._menuService.createMenu(e.TitleMenu, this._contextKeyService); + (0, z.vr)(n, void 0, i), this._actionbarWidget.push(i, { + label: !1, + icon: !0, + index: 0 + }), n.dispose() + } + _fillTitleIcon(e) { + this._icon = k.R3(e, k.$("")) + } + _fillBody(e) { + this._parentContainer = e, e.classList.add("marker-widget"), this._parentContainer + .tabIndex = 0, this._parentContainer.setAttribute("role", "tooltip"), + this._container = document.createElement("div"), e.appendChild(this._container), + this._message = new K(this._container, this.editor, (e => this._onDidSelectRelatedInformation + .fire(e)), this._openerService, this._labelService), this._disposables + .add(this._message) + } + show() { + throw new Error("call showAtMarker") + } + showAtMarker(e, t, i) { + this._container.classList.remove("stale"), this._message.update(e), + this._severity = e.severity, this._applyTheme(this._themeService.getColorTheme()); + let o = a.e.lift(e); + const r = this.editor.getPosition(); + let s = r && o.containsPosition(r) ? r : o.getStartPosition(); + super.show(s, this.computeRequiredHeight()); + const l = this.editor.getModel(); + if (l) { + const e = i > 1 ? n.N("problems", "{0} of {1} problems", t, i) : n.N( + "change", "{0} of {1} problem", t, i); + this.setTitle((0, O.EZ)(l.uri), e) + } + this._icon.className = + `codicon ${x.className(L.ZL.toSeverity(this._severity))}`, this.editor + .revealPositionNearTop(s, 0), this.editor.focus() + } + updateMarker(e) { + this._container.classList.remove("stale"), this._message.update(e) + } + showStale() { + this._container.classList.add("stale"), this._relayout() + } + _doLayoutBody(e, t) { + super._doLayoutBody(e, t), this._heightInPixel = e, this._message.layout( + e, t), this._container.style.height = `${e}px` + } + _onWidth(e) { + this._message.layout(this._heightInPixel, e) + } + _relayout() { + super._relayout(this.computeRequiredHeight()) + } + computeRequiredHeight() { + return 3 + this._message.getHeightInLines() + } + }; + $.TitleMenu = new W.eH("gotoErrorTitleMenu"), $ = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([j(1, D.XE), j(2, B.v4), j(3, W.co), j(4, V.TG), j(5, r.i6), j(6, U.e)], + $); + let q = (0, N.kw)(N.lX, N.b6), + Z = (0, N.kw)(N.uo, N.pW), + G = (0, N.kw)(N.c6, N.T8); + const Y = (0, N.P6)("editorMarkerNavigationError.background", { + dark: q, + light: q, + hc: N.lR + }, n.N("editorMarkerNavigationError", + "Editor marker navigation widget error color.")), + Q = (0, N.P6)("editorMarkerNavigationError.headerBackground", { + dark: (0, N.Zn)(Y, .1), + light: (0, N.Zn)(Y, .1), + hc: null + }, n.N("editorMarkerNavigationErrorHeaderBackground", + "Editor marker navigation widget error heading background.")), + X = (0, N.P6)("editorMarkerNavigationWarning.background", { + dark: Z, + light: Z, + hc: N.lR + }, n.N("editorMarkerNavigationWarning", + "Editor marker navigation widget warning color.")), + J = (0, N.P6)("editorMarkerNavigationWarning.headerBackground", { + dark: (0, N.Zn)(X, .1), + light: (0, N.Zn)(X, .1), + hc: "#0C141F" + }, n.N("editorMarkerNavigationWarningBackground", + "Editor marker navigation widget warning heading background.")), + ee = (0, N.P6)("editorMarkerNavigationInfo.background", { + dark: G, + light: G, + hc: N.lR + }, n.N("editorMarkerNavigationInfo", + "Editor marker navigation widget info color.")), + te = (0, N.P6)("editorMarkerNavigationInfo.headerBackground", { + dark: (0, N.Zn)(ee, .1), + light: (0, N.Zn)(ee, .1), + hc: null + }, n.N("editorMarkerNavigationInfoHeaderBackground", + "Editor marker navigation widget info heading background.")), + ie = (0, N.P6)("editorMarkerNavigation.background", { + dark: N.cv, + light: N.cv, + hc: N.cv + }, n.N("editorMarkerNavigationBackground", + "Editor marker navigation widget background.")); + (0, D.Ic)(((e, t) => { + const i = e.getColor(N.ur); + i && t.addRule( + `.monaco-editor .marker-widget a.code-link span { color: ${i}; }`); + const n = e.getColor(N.sg); + n && t.addRule( + `.monaco-editor .marker-widget a.code-link span:hover { color: ${n}; }` + ) + })); + var ne = i(1640), + oe = i(666), + re = i(5026), + se = i(1741), + ae = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + le = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + class de { + constructor(e, t, i) { + this.marker = e, this.index = t, this.total = i + } + } + let ce = class e { + constructor(t, i) { + this._markerService = i, this._onDidChange = new A.Q5, this.onDidChange = + this._onDidChange.event, this._dispoables = new o.SL, this._markers = [], + this._nextIdx = -1, oe.o.isUri(t) ? this._resourceFilter = e => e.toString() === + t.toString() : t && (this._resourceFilter = t); + const n = () => { + this._markers = this._markerService.read({ + resource: oe.o.isUri(t) ? t : void 0, + severities: L.ZL.Error | L.ZL.Warning | L.ZL.Info + }), "function" == typeof t && (this._markers = this._markers.filter( + (e => this._resourceFilter(e.resource)))), this._markers.sort(e._compareMarker) + }; + n(), this._dispoables.add(i.onMarkerChanged((e => { + this._resourceFilter && !e.some((e => this._resourceFilter(e))) || + (n(), this._nextIdx = -1, this._onDidChange.fire()) + }))) + } + dispose() { + this._dispoables.dispose(), this._onDidChange.dispose() + } + matches(e) { + return !this._resourceFilter && !e || !(!this._resourceFilter || !e) && + this._resourceFilter(e) + } + get selected() { + const e = this._markers[this._nextIdx]; + return e && new de(e, this._nextIdx + 1, this._markers.length) + } + _initIdx(e, t, i) { + let n = !1, + o = this._markers.findIndex((t => t.resource.toString() === e.uri.toString())); + o < 0 && (o = (0, M.ry)(this._markers, { + resource: e.uri + }, ((e, t) => (0, H.qu)(e.resource.toString(), t.resource.toString()))), + o < 0 && (o = ~o)); + for (let i = o; i < this._markers.length; i++) { + let o = a.e.lift(this._markers[i]); + if (o.isEmpty()) { + const t = e.getWordAtPosition(o.getStartPosition()); + t && (o = new a.e(o.startLineNumber, t.startColumn, o.startLineNumber, + t.endColumn)) + } + if (t && (o.containsPosition(t) || t.isBeforeOrEqual(o.getStartPosition()))) { + this._nextIdx = i, n = !0; + break + } + if (this._markers[i].resource.toString() !== e.uri.toString()) break + } + n || (this._nextIdx = i ? 0 : this._markers.length - 1), this._nextIdx < + 0 && (this._nextIdx = this._markers.length - 1) + } + resetIndex() { + this._nextIdx = -1 + } + move(e, t, i) { + if (0 === this._markers.length) return !1; + let n = this._nextIdx; + return -1 === this._nextIdx ? this._initIdx(t, i, e) : e ? this._nextIdx = + (this._nextIdx + 1) % this._markers.length : e || (this._nextIdx = ( + this._nextIdx - 1 + this._markers.length) % this._markers.length), + n !== this._nextIdx + } + find(e, t) { + let i = this._markers.findIndex((t => t.resource.toString() === e.toString())); + if (!(i < 0)) + for (; i < this._markers.length; i++) + if (a.e.containsPosition(this._markers[i], t)) return new de(this._markers[ + i], i + 1, this._markers.length) + } + static _compareMarker(e, t) { + let i = (0, H.qu)(e.resource.toString(), t.resource.toString()); + return 0 === i && (i = L.ZL.compare(e.severity, t.severity)), 0 === i && + (i = a.e.compareRangesUsingStarts(e, t)), i + } + }; + ce = ae([le(1, L.lT)], ce); + const he = (0, V.yh)("IMarkerNavigationService"); + let ue = class { + constructor(e) { + this._markerService = e, this._provider = new se.S + } + getMarkerList(e) { + for (let t of this._provider) { + const i = t.getMarkerList(e); + if (i) return i + } + return new ce(e, this._markerService) + } + }; + ue = ae([le(0, L.lT)], ue), (0, re.z)(he, ue, !0); + var ge = i(9554), + pe = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + me = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + let fe = class e { + constructor(e, t, i, n, r) { + this._markerNavigationService = t, this._contextKeyService = i, this._editorService = + n, this._instantiationService = r, this._sessionDispoables = new o.SL, + this._editor = e, this._widgetVisible = we.bindTo(this._contextKeyService) + } + static get(t) { + return t.getContribution(e.ID) + } + dispose() { + this._cleanUp(), this._sessionDispoables.dispose() + } + _cleanUp() { + this._widgetVisible.reset(), this._sessionDispoables.clear(), this._widget = + void 0, this._model = void 0 + } + _getOrCreateModel(e) { + if (this._model && this._model.matches(e)) return this._model; + let t = !1; + return this._model && (t = !0, this._cleanUp()), this._model = this._markerNavigationService + .getMarkerList(e), t && this._model.move(!0, this._editor.getModel(), + this._editor.getPosition()), this._widget = this._instantiationService + .createInstance($, this._editor), this._widget.onDidClose((() => + this.close()), this, this._sessionDispoables), this._widgetVisible.set(! + 0), this._sessionDispoables.add(this._model), this._sessionDispoables + .add(this._widget), this._sessionDispoables.add(this._editor.onDidChangeCursorPosition( + (e => { + var t, i, n; + (null === (t = this._model) || void 0 === t ? void 0 : t.selected) && + a.e.containsPosition(null === (i = this._model) || void 0 === i ? + void 0 : i.selected.marker, e.position) || null === (n = this._model) || + void 0 === n || n.resetIndex() + }))), this._sessionDispoables.add(this._model.onDidChange((() => { + if (!this._widget || !this._widget.position || !this._model) + return; + const e = this._model.find(this._editor.getModel().uri, this._widget + .position); + e ? this._widget.updateMarker(e.marker) : this._widget.showStale() + }))), this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation( + (e => { + this._editorService.openCodeEditor({ + resource: e.resource, + options: { + pinned: !0, + revealIfOpened: !0, + selection: a.e.lift(e).collapseToStart() + } + }, this._editor), this.close(!1) + }))), this._sessionDispoables.add(this._editor.onDidChangeModel((() => + this._cleanUp()))), this._model + } + close(e = !0) { + this._cleanUp(), e && this._editor.focus() + } + showAtMarker(e) { + if (this._editor.hasModel()) { + const t = this._getOrCreateModel(this._editor.getModel().uri); + t.resetIndex(), t.move(!0, this._editor.getModel(), new s.L(e.startLineNumber, + e.startColumn)), t.selected && this._widget.showAtMarker(t.selected + .marker, t.selected.index, t.selected.total) + } + } + nagivate(t, i) { + return me(this, void 0, void 0, (function*() { + if (this._editor.hasModel()) { + const n = this._getOrCreateModel(i ? void 0 : this._editor.getModel() + .uri); + if (n.move(t, this._editor.getModel(), this._editor.getPosition()), ! + n.selected) return; + if (n.selected.marker.resource.toString() !== this._editor.getModel() + .uri.toString()) { + this._cleanUp(); + const o = yield this._editorService.openCodeEditor({ + resource: n.selected.marker.resource, + options: { + pinned: !1, + revealIfOpened: !0, + selectionRevealType: 2, + selection: n.selected.marker + } + }, this._editor); + o && (e.get(o).close(), e.get(o).nagivate(t, i)) + } else this._widget.showAtMarker(n.selected.marker, n.selected.index, + n.selected.total) + } + })) + } + }; + fe.ID = "editor.contrib.markerController", fe = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([pe(1, he), pe(2, r.i6), pe(3, ne.$), pe(4, V.TG)], fe); + class _e extends l.R6 { + constructor(e, t, i) { + super(i), this._next = e, this._multiFile = t + } + run(e, t) { + return me(this, void 0, void 0, (function*() { + t.hasModel() && fe.get(t).nagivate(this._next, this._multiFile) + })) + } + } + class be extends _e { + constructor() { + super(!0, !1, { + id: be.ID, + label: be.LABEL, + alias: "Go to Next Problem (Error, Warning, Info)", + precondition: void 0, + kbOpts: { + kbExpr: d.u.focus, + primary: 578, + weight: 100 + }, + menuOpts: { + menuId: $.TitleMenu, + title: be.LABEL, + icon: (0, ge.q5)("marker-navigation-next", P.lA.arrowDown, n.N( + "nextMarkerIcon", "Icon for goto next marker.")), + group: "navigation", + order: 1 + } + }) + } + } + be.ID = "editor.action.marker.next", be.LABEL = n.N( + "markerAction.next.label", "Go to Next Problem (Error, Warning, Info)"); + class ve extends _e { + constructor() { + super(!1, !1, { + id: ve.ID, + label: ve.LABEL, + alias: "Go to Previous Problem (Error, Warning, Info)", + precondition: void 0, + kbOpts: { + kbExpr: d.u.focus, + primary: 1602, + weight: 100 + }, + menuOpts: { + menuId: $.TitleMenu, + title: be.LABEL, + icon: (0, ge.q5)("marker-navigation-previous", P.lA.arrowUp, n.N( + "previousMarkerIcon", "Icon for goto previous marker.")), + group: "navigation", + order: 2 + } + }) + } + } + ve.ID = "editor.action.marker.prev", ve.LABEL = n.N( + "markerAction.previous.label", + "Go to Previous Problem (Error, Warning, Info)"), (0, l._K)(fe.ID, fe), ( + 0, l.Qr)(be), (0, l.Qr)(ve), (0, l.Qr)(class extends _e { + constructor() { + super(!0, !0, { + id: "editor.action.marker.nextInFiles", + label: n.N("markerAction.nextInFiles.label", + "Go to Next Problem in Files (Error, Warning, Info)"), + alias: "Go to Next Problem in Files (Error, Warning, Info)", + precondition: void 0, + kbOpts: { + kbExpr: d.u.focus, + primary: 66, + weight: 100 + }, + menuOpts: { + menuId: W.eH.MenubarGoMenu, + title: n.N({ + key: "miGotoNextProblem", + comment: ["&& denotes a mnemonic"] + }, "Next &&Problem"), + group: "6_problem_nav", + order: 1 + } + }) + } + }), (0, l.Qr)(class extends _e { + constructor() { + super(!1, !0, { + id: "editor.action.marker.prevInFiles", + label: n.N("markerAction.previousInFiles.label", + "Go to Previous Problem in Files (Error, Warning, Info)"), + alias: "Go to Previous Problem in Files (Error, Warning, Info)", + precondition: void 0, + kbOpts: { + kbExpr: d.u.focus, + primary: 1090, + weight: 100 + }, + menuOpts: { + menuId: W.eH.MenubarGoMenu, + title: n.N({ + key: "miGotoPreviousProblem", + comment: ["&& denotes a mnemonic"] + }, "Previous &&Problem"), + group: "6_problem_nav", + order: 2 + } + }) + } + }); + const we = new r.uy("markersNavigationVisible", !1), + Ce = l._l.bindToContribution(fe.get); + (0, l.fK)(new Ce({ + id: "closeMarkersNavigation", + precondition: we, + handler: e => e.close(), + kbOpts: { + weight: 150, + kbExpr: d.u.focus, + primary: 9, + secondary: [1033] + } + })) + }, + 2729: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + DefinitionAction: () => te + }); + var n = i(6346), + o = i(5393), + r = i(2258), + s = i(1432), + a = i(5520), + l = i(6830), + d = i(1640), + c = i(187), + h = i(4314), + u = i(9102), + g = i(4101), + p = i(845), + m = i(1884), + f = i(2406), + _ = i(1455), + b = i(3580), + v = i(4144), + w = i(8819), + C = i(9422), + y = i(535), + S = i(1691), + x = i(4565), + k = i(9925), + L = i(2065), + N = i(5026), + D = i(9989), + E = i(5976), + I = i(4669), + T = i(1847), + M = i(5935), + A = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + R = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const O = new w.uy("hasSymbols", !1, (0, b.N)("hasSymbols", + "Whether there are symbol locations that can be navigated via keyboard-only." + )), + P = (0, L.yh)("ISymbolNavigationService"); + let F = class { + constructor(e, t, i, n) { + this._editorService = t, this._notificationService = i, this._keybindingService = + n, this._currentModel = void 0, this._currentIdx = -1, this._ignoreEditorChange = ! + 1, this._ctxHasSymbols = O.bindTo(e) + } + reset() { + var e, t; + this._ctxHasSymbols.reset(), null === (e = this._currentState) || + void 0 === e || e.dispose(), null === (t = this._currentMessage) || + void 0 === t || t.dispose(), this._currentModel = void 0, this._currentIdx = - + 1 + } + put(e) { + const t = e.parent.parent; + if (t.references.length <= 1) return void this.reset(); + this._currentModel = t, this._currentIdx = t.references.indexOf(e), + this._ctxHasSymbols.set(!0), this._showMessage(); + const i = new B(this._editorService), + n = i.onDidChange((e => { + if (this._ignoreEditorChange) return; + const i = this._editorService.getActiveCodeEditor(); + if (!i) return; + const n = i.getModel(), + o = i.getPosition(); + if (!n || !o) return; + let r = !1, + s = !1; + for (const e of t.references) + if ((0, M.Xy)(e.uri, n.uri)) r = !0, s = s || h.e.containsPosition( + e.range, o); + else if (r) break; + r && s || this.reset() + })); + this._currentState = (0, E.F8)(i, n) + } + revealNext(e) { + if (!this._currentModel) return Promise.resolve(); + this._currentIdx += 1, this._currentIdx %= this._currentModel.references + .length; + const t = this._currentModel.references[this._currentIdx]; + return this._showMessage(), this._ignoreEditorChange = !0, this._editorService + .openCodeEditor({ + resource: t.uri, + options: { + selection: h.e.collapseToStart(t.range), + selectionRevealType: 3 + } + }, e).finally((() => { + this._ignoreEditorChange = !1 + })) + } + _showMessage() { + var e; + null === (e = this._currentMessage) || void 0 === e || e.dispose(); + const t = this._keybindingService.lookupKeybinding( + "editor.gotoNextSymbolFromResult"), + i = t ? (0, b.N)("location.kb", "Symbol {0} of {1}, {2} for next", + this._currentIdx + 1, this._currentModel.references.length, t.getLabel() + ) : (0, b.N)("location", "Symbol {0} of {1}", this._currentIdx + 1, + this._currentModel.references.length); + this._currentMessage = this._notificationService.status(i) + } + }; + F = A([R(0, w.i6), R(1, d.$), R(2, C.lT), R(3, T.d)], F), (0, N.z)(P, F, ! + 0), (0, l.fK)(new class extends l._l { + constructor() { + super({ + id: "editor.gotoNextSymbolFromResult", + precondition: O, + kbOpts: { + weight: 100, + primary: 70 + } + }) + } + runEditorCommand(e, t) { + return e.get(P).revealNext(t) + } + }), D.W.registerCommandAndKeybindingRule({ + id: "editor.gotoNextSymbolFromResult.cancel", + weight: 100, + when: O, + primary: 9, + handler(e) { + e.get(P).reset() + } + }); + let B = class { + constructor(e) { + this._listener = new Map, this._disposables = new E.SL, this._onDidChange = + new I.Q5, this.onDidChange = this._onDidChange.event, this._disposables + .add(e.onCodeEditorRemove(this._onDidRemoveEditor, this)), this._disposables + .add(e.onCodeEditorAdd(this._onDidAddEditor, this)), e.listCodeEditors() + .forEach(this._onDidAddEditor, this) + } + dispose() { + this._disposables.dispose(), this._onDidChange.dispose(), (0, E.B9)( + this._listener.values()) + } + _onDidAddEditor(e) { + this._listener.set(e, (0, E.F8)(e.onDidChangeCursorPosition((t => + this._onDidChange.fire({ + editor: e + }))), e.onDidChangeModelContent((t => this._onDidChange.fire({ + editor: e + }))))) + } + _onDidRemoveEditor(e) { + var t; + null === (t = this._listener.get(e)) || void 0 === t || t.dispose(), + this._listener.delete(e) + } + }; + B = A([R(0, d.$)], B); + var W, z, V, H, U, j, K, $, q = i(6268), + Z = i(666), + G = i(8401), + Y = i(4527), + Q = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + v.BH.appendMenuItem(v.eH.EditorContext, { + submenu: v.eH.EditorContextPeek, + title: b.N("peek.submenu", "Peek"), + group: "navigation", + order: 100 + }); + const X = new Set; + + function J(e) { + const t = new e; + return (0, l.QG)(t), X.add(t.id), t + } + class ee extends l.R6 { + constructor(e, t) { + super(t), this._configuration = e + } + run(e, t) { + if (!t.hasModel()) return Promise.resolve(void 0); + const i = e.get(C.lT), + r = e.get(d.$), + s = e.get(y.e), + a = e.get(P), + l = t.getModel(), + c = t.getPosition(), + h = new k.Dl(t, 5), + u = (0, o.eP)(this._getLocationModel(l, c, h.token), h.token).then(( + e => Q(this, void 0, void 0, (function*() { + if (!e || h.token.isCancellationRequested) return; + let i; + if ((0, n.Z9)(e.ariaMessage), e.referenceAt(l.uri, c)) { + const e = this._getAlternativeCommand(t); + e !== this.id && X.has(e) && (i = t.getAction(e)) + } + const o = e.references.length; + if (0 === o) { + if (!this._configuration.muteMessage) { + const e = l.getWordAtPosition(c); + p.O.get(t).showMessage(this._getNoResultFoundMessage(e), c) + } + } else { + if (1 !== o || !i) return this._onResult(r, a, t, e); + i.run() + } + }))), (e => { + i.error(e) + })).finally((() => { + h.dispose() + })); + return s.showWhile(u, 250), u + } + _onResult(e, t, i, n) { + return Q(this, void 0, void 0, (function*() { + const o = this._getGoToPreference(i); + if (i instanceof Y.H || !(this._configuration.openInPeek || + "peek" === o && n.references.length > 1)) { + const r = n.firstReference(), + s = n.references.length > 1 && "gotoAndPeek" === o, + a = yield this._openReference(i, e, r, this._configuration.openToSide, ! + s); + s && a ? this._openInPeek(a, n) : n.dispose(), "goto" === o && t + .put(r) + } else this._openInPeek(i, n) + })) + } + _openReference(e, t, i, n, o) { + return Q(this, void 0, void 0, (function*() { + let r; + if ((0, g.vx)(i) && (r = i.targetSelectionRange), r || (r = i.range), ! + r) return; + const s = yield t.openCodeEditor({ + resource: i.uri, + options: { + selection: h.e.collapseToStart(r), + selectionRevealType: 3 + } + }, e, n); + if (s) { + if (o) { + const e = s.getModel(), + t = s.deltaDecorations([], [{ + range: r, + options: { + description: "symbol-navigate-action-highlight", + className: "symbolHighlight" + } + }]); + setTimeout((() => { + s.getModel() === e && s.deltaDecorations(t, []) + }), 350) + } + return s + } + })) + } + _openInPeek(e, t) { + let i = f.J.get(e); + i && e.hasModel() ? i.toggleWidget(e.getSelection(), (0, o.PG)((e => + Promise.resolve(t))), this._configuration.openInPeek) : t.dispose() + } + } + class te extends ee { + _getLocationModel(e, t, i) { + return Q(this, void 0, void 0, (function*() { + return new _.oQ(yield(0, S.nD)(e, t, i), b.N("def.title", + "Definitions")) + })) + } + _getNoResultFoundMessage(e) { + return e && e.word ? b.N("noResultWord", + "No definition found for '{0}'", e.word) : b.N("generic.noResults", + "No definition found") + } + _getAlternativeCommand(e) { + return e.getOption(49).alternativeDefinitionCommand + } + _getGoToPreference(e) { + return e.getOption(49).multipleDefinitions + } + } + const ie = s.$L && !q.$W ? 2118 : 70; + J(((W = class e extends te { + constructor() { + super({ + openToSide: !1, + openInPeek: !1, + muteMessage: !1 + }, { + id: e.id, + label: b.N("actions.goToDecl.label", "Go to Definition"), + alias: "Go to Definition", + precondition: w.Ao.and(u.u.hasDefinitionProvider, u.u.isInWalkThroughSnippet + .toNegated()), + kbOpts: { + kbExpr: u.u.editorTextFocus, + primary: ie, + weight: 100 + }, + contextMenuOpts: { + group: "navigation", + order: 1.1 + } + }), x.P.registerCommandAlias("editor.action.goToDeclaration", e.id) + } + }).id = "editor.action.revealDefinition", W)), J(((z = class e extends te { + constructor() { + super({ + openToSide: !0, + openInPeek: !1, + muteMessage: !1 + }, { + id: e.id, + label: b.N("actions.goToDeclToSide.label", + "Open Definition to the Side"), + alias: "Open Definition to the Side", + precondition: w.Ao.and(u.u.hasDefinitionProvider, u.u.isInWalkThroughSnippet + .toNegated()), + kbOpts: { + kbExpr: u.u.editorTextFocus, + primary: (0, r.gx)(2089, ie), + weight: 100 + } + }), x.P.registerCommandAlias( + "editor.action.openDeclarationToTheSide", e.id) + } + }).id = "editor.action.revealDefinitionAside", z)), J(((V = class e extends te { + constructor() { + super({ + openToSide: !1, + openInPeek: !0, + muteMessage: !1 + }, { + id: e.id, + label: b.N("actions.previewDecl.label", "Peek Definition"), + alias: "Peek Definition", + precondition: w.Ao.and(u.u.hasDefinitionProvider, m.Jy.notInPeekEditor, + u.u.isInWalkThroughSnippet.toNegated()), + kbOpts: { + kbExpr: u.u.editorTextFocus, + primary: 582, + linux: { + primary: 3140 + }, + weight: 100 + }, + contextMenuOpts: { + menuId: v.eH.EditorContextPeek, + group: "peek", + order: 2 + } + }), x.P.registerCommandAlias("editor.action.previewDeclaration", + e.id) + } + }).id = "editor.action.peekDefinition", V)); + class ne extends ee { + _getLocationModel(e, t, i) { + return Q(this, void 0, void 0, (function*() { + return new _.oQ(yield(0, S.zq)(e, t, i), b.N("decl.title", + "Declarations")) + })) + } + _getNoResultFoundMessage(e) { + return e && e.word ? b.N("decl.noResultWord", + "No declaration found for '{0}'", e.word) : b.N( + "decl.generic.noResults", "No declaration found") + } + _getAlternativeCommand(e) { + return e.getOption(49).alternativeDeclarationCommand + } + _getGoToPreference(e) { + return e.getOption(49).multipleDeclarations + } + } + J(((H = class e extends ne { + constructor() { + super({ + openToSide: !1, + openInPeek: !1, + muteMessage: !1 + }, { + id: e.id, + label: b.N("actions.goToDeclaration.label", "Go to Declaration"), + alias: "Go to Declaration", + precondition: w.Ao.and(u.u.hasDeclarationProvider, u.u.isInWalkThroughSnippet + .toNegated()), + contextMenuOpts: { + group: "navigation", + order: 1.3 + } + }) + } + _getNoResultFoundMessage(e) { + return e && e.word ? b.N("decl.noResultWord", + "No declaration found for '{0}'", e.word) : b.N( + "decl.generic.noResults", "No declaration found") + } + }).id = "editor.action.revealDeclaration", H)), J(class extends ne { + constructor() { + super({ + openToSide: !1, + openInPeek: !0, + muteMessage: !1 + }, { + id: "editor.action.peekDeclaration", + label: b.N("actions.peekDecl.label", "Peek Declaration"), + alias: "Peek Declaration", + precondition: w.Ao.and(u.u.hasDeclarationProvider, m.Jy.notInPeekEditor, + u.u.isInWalkThroughSnippet.toNegated()), + contextMenuOpts: { + menuId: v.eH.EditorContextPeek, + group: "peek", + order: 3 + } + }) + } + }); + class oe extends ee { + _getLocationModel(e, t, i) { + return Q(this, void 0, void 0, (function*() { + return new _.oQ(yield(0, S.L3)(e, t, i), b.N("typedef.title", + "Type Definitions")) + })) + } + _getNoResultFoundMessage(e) { + return e && e.word ? b.N("goToTypeDefinition.noResultWord", + "No type definition found for '{0}'", e.word) : b.N( + "goToTypeDefinition.generic.noResults", "No type definition found") + } + _getAlternativeCommand(e) { + return e.getOption(49).alternativeTypeDefinitionCommand + } + _getGoToPreference(e) { + return e.getOption(49).multipleTypeDefinitions + } + } + J(((U = class e extends oe { + constructor() { + super({ + openToSide: !1, + openInPeek: !1, + muteMessage: !1 + }, { + id: e.ID, + label: b.N("actions.goToTypeDefinition.label", + "Go to Type Definition"), + alias: "Go to Type Definition", + precondition: w.Ao.and(u.u.hasTypeDefinitionProvider, u.u.isInWalkThroughSnippet + .toNegated()), + kbOpts: { + kbExpr: u.u.editorTextFocus, + primary: 0, + weight: 100 + }, + contextMenuOpts: { + group: "navigation", + order: 1.4 + } + }) + } + }).ID = "editor.action.goToTypeDefinition", U)), J(((j = class e extends oe { + constructor() { + super({ + openToSide: !1, + openInPeek: !0, + muteMessage: !1 + }, { + id: e.ID, + label: b.N("actions.peekTypeDefinition.label", + "Peek Type Definition"), + alias: "Peek Type Definition", + precondition: w.Ao.and(u.u.hasTypeDefinitionProvider, m.Jy.notInPeekEditor, + u.u.isInWalkThroughSnippet.toNegated()), + contextMenuOpts: { + menuId: v.eH.EditorContextPeek, + group: "peek", + order: 4 + } + }) + } + }).ID = "editor.action.peekTypeDefinition", j)); + class re extends ee { + _getLocationModel(e, t, i) { + return Q(this, void 0, void 0, (function*() { + return new _.oQ(yield(0, S.f4)(e, t, i), b.N("impl.title", + "Implementations")) + })) + } + _getNoResultFoundMessage(e) { + return e && e.word ? b.N("goToImplementation.noResultWord", + "No implementation found for '{0}'", e.word) : b.N( + "goToImplementation.generic.noResults", "No implementation found") + } + _getAlternativeCommand(e) { + return e.getOption(49).alternativeImplementationCommand + } + _getGoToPreference(e) { + return e.getOption(49).multipleImplementations + } + } + J(((K = class e extends re { + constructor() { + super({ + openToSide: !1, + openInPeek: !1, + muteMessage: !1 + }, { + id: e.ID, + label: b.N("actions.goToImplementation.label", + "Go to Implementations"), + alias: "Go to Implementations", + precondition: w.Ao.and(u.u.hasImplementationProvider, u.u.isInWalkThroughSnippet + .toNegated()), + kbOpts: { + kbExpr: u.u.editorTextFocus, + primary: 2118, + weight: 100 + }, + contextMenuOpts: { + group: "navigation", + order: 1.45 + } + }) + } + }).ID = "editor.action.goToImplementation", K)), J((($ = class e extends re { + constructor() { + super({ + openToSide: !1, + openInPeek: !0, + muteMessage: !1 + }, { + id: e.ID, + label: b.N("actions.peekImplementation.label", + "Peek Implementations"), + alias: "Peek Implementations", + precondition: w.Ao.and(u.u.hasImplementationProvider, m.Jy.notInPeekEditor, + u.u.isInWalkThroughSnippet.toNegated()), + kbOpts: { + kbExpr: u.u.editorTextFocus, + primary: 3142, + weight: 100 + }, + contextMenuOpts: { + menuId: v.eH.EditorContextPeek, + group: "peek", + order: 5 + } + }) + } + }).ID = "editor.action.peekImplementation", $)); + class se extends ee { + _getNoResultFoundMessage(e) { + return e ? b.N("references.no", "No references found for '{0}'", e.word) : + b.N("references.noGeneric", "No references found") + } + _getAlternativeCommand(e) { + return e.getOption(49).alternativeReferenceCommand + } + _getGoToPreference(e) { + return e.getOption(49).multipleReferences + } + } + J(class extends se { + constructor() { + super({ + openToSide: !1, + openInPeek: !1, + muteMessage: !1 + }, { + id: "editor.action.goToReferences", + label: b.N("goToReferences.label", "Go to References"), + alias: "Go to References", + precondition: w.Ao.and(u.u.hasReferenceProvider, m.Jy.notInPeekEditor, + u.u.isInWalkThroughSnippet.toNegated()), + kbOpts: { + kbExpr: u.u.editorTextFocus, + primary: 1094, + weight: 100 + }, + contextMenuOpts: { + group: "navigation", + order: 1.45 + } + }) + } + _getLocationModel(e, t, i) { + return Q(this, void 0, void 0, (function*() { + return new _.oQ(yield(0, S.aA)(e, t, !0, i), b.N("ref.title", + "References")) + })) + } + }), J(class extends se { + constructor() { + super({ + openToSide: !1, + openInPeek: !0, + muteMessage: !1 + }, { + id: "editor.action.referenceSearch.trigger", + label: b.N("references.action.label", "Peek References"), + alias: "Peek References", + precondition: w.Ao.and(u.u.hasReferenceProvider, m.Jy.notInPeekEditor, + u.u.isInWalkThroughSnippet.toNegated()), + contextMenuOpts: { + menuId: v.eH.EditorContextPeek, + group: "peek", + order: 6 + } + }) + } + _getLocationModel(e, t, i) { + return Q(this, void 0, void 0, (function*() { + return new _.oQ(yield(0, S.aA)(e, t, !1, i), b.N("ref.title", + "References")) + })) + } + }); + class ae extends ee { + constructor(e, t, i) { + super(e, { + id: "editor.action.goToLocation", + label: b.N("label.generic", "Go To Any Symbol"), + alias: "Go To Any Symbol", + precondition: w.Ao.and(m.Jy.notInPeekEditor, u.u.isInWalkThroughSnippet + .toNegated()) + }), this._references = t, this._gotoMultipleBehaviour = i + } + _getLocationModel(e, t, i) { + return Q(this, void 0, void 0, (function*() { + return new _.oQ(this._references, b.N("generic.title", "Locations")) + })) + } + _getNoResultFoundMessage(e) { + return e && b.N("generic.noResult", "No results for '{0}'", e.word) || + "" + } + _getGoToPreference(e) { + var t; + return null !== (t = this._gotoMultipleBehaviour) && void 0 !== t ? t : + e.getOption(49).multipleReferences + } + _getAlternativeCommand() { + return "" + } + } + x.P.registerCommand({ + id: "editor.action.goToLocations", + description: { + description: "Go to locations from a position in a file", + args: [{ + name: "uri", + description: "The text document in which to start", + constraint: Z.o + }, { + name: "position", + description: "The position at which to start", + constraint: c.L.isIPosition + }, { + name: "locations", + description: "An array of locations.", + constraint: Array + }, { + name: "multiple", + description: "Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto" + }, { + name: "noResultsMessage", + description: "Human readable message that shows when locations is empty." + }] + }, + handler: (e, t, i, n, o, r, s) => Q(void 0, void 0, void 0, (function* + () { + (0, G.p_)(Z.o.isUri(t)), (0, G.p_)(c.L.isIPosition(i)), (0, G.p_)( + Array.isArray(n)), (0, G.p_)(void 0 === o || "string" == typeof o), ( + 0, G.p_)(void 0 === s || "boolean" == typeof s); + const l = e.get(d.$), + h = yield l.openCodeEditor({ + resource: t + }, l.getFocusedCodeEditor()); + if ((0, a.CL)(h)) return h.setPosition(i), h.revealPositionInCenterIfOutsideViewport( + i, 0), h.invokeWithinContext((e => { + const t = new class extends ae { + _getNoResultFoundMessage(e) { + return r || super._getNoResultFoundMessage(e) + } + }({ + muteMessage: !Boolean(r), + openInPeek: Boolean(s), + openToSide: !1 + }, n, o); + e.get(L.TG).invokeFunction(t.run.bind(t), h) + })) + })) + }), x.P.registerCommand({ + id: "editor.action.peekLocations", + description: { + description: "Peek locations from a position in a file", + args: [{ + name: "uri", + description: "The text document in which to start", + constraint: Z.o + }, { + name: "position", + description: "The position at which to start", + constraint: c.L.isIPosition + }, { + name: "locations", + description: "An array of locations.", + constraint: Array + }, { + name: "multiple", + description: "Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto" + }] + }, + handler: (e, t, i, n, o) => Q(void 0, void 0, void 0, (function*() { + e.get(x.H).executeCommand("editor.action.goToLocations", t, i, n, + o, void 0, !0) + })) + }), x.P.registerCommand({ + id: "editor.action.findReferences", + handler: (e, t, i) => { + (0, G.p_)(Z.o.isUri(t)), (0, G.p_)(c.L.isIPosition(i)); + const n = e.get(d.$); + return n.openCodeEditor({ + resource: t + }, n.getFocusedCodeEditor()).then((e => { + if (!(0, a.CL)(e) || !e.hasModel()) return; + const t = f.J.get(e); + if (!t) return; + const n = (0, o.PG)((t => (0, S.aA)(e.getModel(), c.L.lift(i), ! + 1, t).then((e => new _.oQ(e, b.N("ref.title", "References")))))), + r = new h.e(i.lineNumber, i.column, i.lineNumber, i.column); + return Promise.resolve(t.toggleWidget(r, n, !1)) + })) + } + }), x.P.registerCommandAlias("editor.action.showReferences", + "editor.action.peekLocations"), v.BH.appendMenuItems([{ + id: v.eH.MenubarGoMenu, + item: { + command: { + id: "editor.action.revealDefinition", + title: b.N({ + key: "miGotoDefinition", + comment: ["&& denotes a mnemonic"] + }, "Go to &&Definition") + }, + group: "4_symbol_nav", + order: 2 + } + }, { + id: v.eH.MenubarGoMenu, + item: { + command: { + id: "editor.action.revealDeclaration", + title: b.N({ + key: "miGotoDeclaration", + comment: ["&& denotes a mnemonic"] + }, "Go to &&Declaration") + }, + group: "4_symbol_nav", + order: 3 + } + }, { + id: v.eH.MenubarGoMenu, + item: { + command: { + id: "editor.action.goToTypeDefinition", + title: b.N({ + key: "miGotoTypeDefinition", + comment: ["&& denotes a mnemonic"] + }, "Go to &&Type Definition") + }, + group: "4_symbol_nav", + order: 3 + } + }, { + id: v.eH.MenubarGoMenu, + item: { + command: { + id: "editor.action.goToImplementation", + title: b.N({ + key: "miGotoImplementation", + comment: ["&& denotes a mnemonic"] + }, "Go to &&Implementations") + }, + group: "4_symbol_nav", + order: 4 + } + }, { + id: v.eH.MenubarGoMenu, + item: { + command: { + id: "editor.action.goToReferences", + title: b.N({ + key: "miGotoReference", + comment: ["&& denotes a mnemonic"] + }, "Go to &&References") + }, + group: "4_symbol_nav", + order: 5 + } + }]) + }, + 1691: (e, t, i) => { + "use strict"; + i.d(t, { + nD: () => c, + zq: () => h, + f4: () => u, + L3: () => g, + aA: () => p + }); + var n = i(1050), + o = i(7301), + r = i(6830), + s = i(4101), + a = i(1455), + l = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + + function d(e, t, i, n) { + const r = i.ordered(e).map((i => Promise.resolve(n(i, e, t)).then(void 0, ( + e => { + (0, o.Cp)(e) + })))); + return Promise.all(r).then((e => { + const t = []; + for (let i of e) Array.isArray(i) ? t.push(...i) : i && t.push(i); + return t + })) + } + + function c(e, t, i) { + return d(e, t, s.Ct, ((e, t, n) => e.provideDefinition(t, n, i))) + } + + function h(e, t, i) { + return d(e, t, s.RN, ((e, t, n) => e.provideDeclaration(t, n, i))) + } + + function u(e, t, i) { + return d(e, t, s.vI, ((e, t, n) => e.provideImplementation(t, n, i))) + } + + function g(e, t, i) { + return d(e, t, s.tA, ((e, t, n) => e.provideTypeDefinition(t, n, i))) + } + + function p(e, t, i, n) { + return d(e, t, s.FL, ((e, t, o) => l(this, void 0, void 0, (function*() { + const r = yield e.provideReferences(t, o, { + includeDeclaration: !0 + }, n); + if (!i || !r || 2 !== r.length) return r; + const s = yield e.provideReferences(t, o, { + includeDeclaration: !1 + }, n); + return s && 1 === s.length ? s : r + })))) + } + + function m(e) { + return l(this, void 0, void 0, (function*() { + const t = yield e(), + i = new a.oQ(t, ""), + n = i.references.map((e => e.link)); + return i.dispose(), n + })) + }(0, r.sb)("_executeDefinitionProvider", ((e, t) => m((() => c(e, t, n.T.None))))), ( + 0, r.sb)("_executeDeclarationProvider", ((e, t) => m((() => h(e, t, n.T.None))))), ( + 0, r.sb)("_executeImplementationProvider", ((e, t) => m((() => u(e, t, n + .T.None))))), (0, r.sb)("_executeTypeDefinitionProvider", ((e, t) => m(( + () => g(e, t, n.T.None))))), (0, r.sb)("_executeReferenceProvider", ((e, + t) => m((() => p(e, t, !1, n.T.None))))) + }, + 9241: (e, t, i) => { + "use strict"; + i.d(t, { + yN: () => h + }); + var n = i(5976), + o = i(4669), + r = i(1432); + + function s(e, t) { + return !!e[t] + } + class a { + constructor(e, t) { + this.target = e.target, this.hasTriggerModifier = s(e.event, t.triggerModifier), + this.hasSideBySideModifier = s(e.event, t.triggerSideBySideModifier), + this.isNoneOrSingleMouseDown = e.event.detail <= 1 + } + } + class l { + constructor(e, t) { + this.keyCodeIsTriggerKey = e.keyCode === t.triggerKey, this.keyCodeIsSideBySideKey = + e.keyCode === t.triggerSideBySideKey, this.hasTriggerModifier = s(e, + t.triggerModifier) + } + } + class d { + constructor(e, t, i, n) { + this.triggerKey = e, this.triggerModifier = t, this.triggerSideBySideKey = + i, this.triggerSideBySideModifier = n + } + equals(e) { + return this.triggerKey === e.triggerKey && this.triggerModifier === e.triggerModifier && + this.triggerSideBySideKey === e.triggerSideBySideKey && this.triggerSideBySideModifier === + e.triggerSideBySideModifier + } + } + + function c(e) { + return "altKey" === e ? r.dz ? new d(57, "metaKey", 6, "altKey") : new d( + 5, "ctrlKey", 6, "altKey") : r.dz ? new d(6, "altKey", 57, "metaKey") : + new d(6, "altKey", 5, "ctrlKey") + } + class h extends n.JT { + constructor(e) { + super(), this._onMouseMoveOrRelevantKeyDown = this._register(new o.Q5), + this.onMouseMoveOrRelevantKeyDown = this._onMouseMoveOrRelevantKeyDown + .event, this._onExecute = this._register(new o.Q5), this.onExecute = + this._onExecute.event, this._onCancel = this._register(new o.Q5), + this.onCancel = this._onCancel.event, this._editor = e, this._opts = + c(this._editor.getOption(69)), this._lastMouseMoveEvent = null, this + ._hasTriggerKeyOnMouseDown = !1, this._lineNumberOnMouseDown = 0, + this._register(this._editor.onDidChangeConfiguration((e => { + if (e.hasChanged(69)) { + const e = c(this._editor.getOption(69)); + if (this._opts.equals(e)) return; + this._opts = e, this._lastMouseMoveEvent = null, this._hasTriggerKeyOnMouseDown = ! + 1, this._lineNumberOnMouseDown = 0, this._onCancel.fire() + } + }))), this._register(this._editor.onMouseMove((e => this._onEditorMouseMove( + new a(e, this._opts))))), this._register(this._editor.onMouseDown(( + e => this._onEditorMouseDown(new a(e, this._opts))))), this._register( + this._editor.onMouseUp((e => this._onEditorMouseUp(new a(e, this._opts)))) + ), this._register(this._editor.onKeyDown((e => this._onEditorKeyDown( + new l(e, this._opts))))), this._register(this._editor.onKeyUp((e => + this._onEditorKeyUp(new l(e, this._opts))))), this._register(this._editor + .onMouseDrag((() => this._resetHandler()))), this._register(this._editor + .onDidChangeCursorSelection((e => this._onDidChangeCursorSelection( + e)))), this._register(this._editor.onDidChangeModel((e => this._resetHandler()))), + this._register(this._editor.onDidChangeModelContent((() => this._resetHandler()))), + this._register(this._editor.onDidScrollChange((e => { + (e.scrollTopChanged || e.scrollLeftChanged) && this._resetHandler() + }))) + } + _onDidChangeCursorSelection(e) { + e.selection && e.selection.startColumn !== e.selection.endColumn && + this._resetHandler() + } + _onEditorMouseMove(e) { + this._lastMouseMoveEvent = e, this._onMouseMoveOrRelevantKeyDown.fire( + [e, null]) + } + _onEditorMouseDown(e) { + this._hasTriggerKeyOnMouseDown = e.hasTriggerModifier, this._lineNumberOnMouseDown = + e.target.position ? e.target.position.lineNumber : 0 + } + _onEditorMouseUp(e) { + const t = e.target.position ? e.target.position.lineNumber : 0; + this._hasTriggerKeyOnMouseDown && this._lineNumberOnMouseDown && this + ._lineNumberOnMouseDown === t && this._onExecute.fire(e) + } + _onEditorKeyDown(e) { + this._lastMouseMoveEvent && (e.keyCodeIsTriggerKey || e.keyCodeIsSideBySideKey && + e.hasTriggerModifier) ? this._onMouseMoveOrRelevantKeyDown.fire([ + this._lastMouseMoveEvent, e + ]) : e.hasTriggerModifier && this._onCancel.fire() + } + _onEditorKeyUp(e) { + e.keyCodeIsTriggerKey && this._onCancel.fire() + } + _resetHandler() { + this._lastMouseMoveEvent = null, this._hasTriggerKeyOnMouseDown = !1, + this._onCancel.fire() + } + } + }, + 5389: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + GotoDefinitionAtPositionEditorContribution: () => B + }); + var n = i(3379), + o = i.n(n), + r = i(7795), + s = i.n(r), + a = i(569), + l = i.n(a), + d = i(3565), + c = i.n(d), + h = i(9216), + u = i.n(h), + g = i(4589), + p = i.n(g), + m = i(2760), + f = {}; + f.styleTagTransform = p(), f.setAttributes = c(), f.insert = l().bind( + null, "head"), f.domAPI = s(), f.insertStyleElement = u(), o()(m.Z, f), + m.Z && m.Z.locals && m.Z.locals; + var _ = i(3580), + b = i(5393), + v = i(7301), + w = i(9365), + C = i(1531), + y = i(4314), + S = i(4101), + x = i(6830), + k = i(1691), + L = i(5976), + N = i(8216), + D = i(7781), + E = i(3910), + I = i(9925), + T = i(2729), + M = i(9241), + A = i(187), + R = i(8401), + O = i(1884), + P = i(8819), + F = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let B = class e { + constructor(e, t, i) { + this.textModelResolverService = t, this.modeService = i, this.toUnhook = + new L.SL, this.toUnhookForKeyboard = new L.SL, this.linkDecorations = [], + this.currentWordAtPosition = null, this.previousPromise = null, this + .editor = e; + let n = new M.yN(e); + this.toUnhook.add(n), this.toUnhook.add(n.onMouseMoveOrRelevantKeyDown( + (([e, t]) => { + this.startFindDefinitionFromMouse(e, (0, R.f6)(t)) + }))), this.toUnhook.add(n.onExecute((e => { + this.isEnabled(e) && this.gotoDefinition(e.target.position, e.hasSideBySideModifier) + .then((() => { + this.removeLinkDecorations() + }), (e => { + this.removeLinkDecorations(), (0, v.dL)(e) + })) + }))), this.toUnhook.add(n.onCancel((() => { + this.removeLinkDecorations(), this.currentWordAtPosition = null + }))) + } + static get(t) { + return t.getContribution(e.ID) + } + startFindDefinitionFromCursor(e) { + return this.startFindDefinition(e).then((() => { + this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition( + (() => { + this.currentWordAtPosition = null, this.removeLinkDecorations(), + this.toUnhookForKeyboard.clear() + }))), this.toUnhookForKeyboard.add(this.editor.onKeyDown((e => { + e && (this.currentWordAtPosition = null, this.removeLinkDecorations(), + this.toUnhookForKeyboard.clear()) + }))) + })) + } + startFindDefinitionFromMouse(e, t) { + if (9 === e.target.type && this.linkDecorations.length > 0) return; + if (!this.editor.hasModel() || !this.isEnabled(e, t)) return this.currentWordAtPosition = + null, void this.removeLinkDecorations(); + const i = e.target.position; + this.startFindDefinition(i) + } + startFindDefinition(e) { + var t; + this.toUnhookForKeyboard.clear(); + const i = e ? null === (t = this.editor.getModel()) || void 0 === t ? + void 0 : t.getWordAtPosition(e) : null; + if (!i) return this.currentWordAtPosition = null, this.removeLinkDecorations(), + Promise.resolve(0); + if (this.currentWordAtPosition && this.currentWordAtPosition.startColumn === + i.startColumn && this.currentWordAtPosition.endColumn === i.endColumn && + this.currentWordAtPosition.word === i.word) return Promise.resolve(0); + this.currentWordAtPosition = i; + let n = new I.yy(this.editor, 15); + return this.previousPromise && (this.previousPromise.cancel(), this.previousPromise = + null), this.previousPromise = (0, b.PG)((t => this.findDefinition(e, + t))), this.previousPromise.then((t => { + if (t && t.length && n.validate(this.editor)) + if (t.length > 1) this.addDecoration(new y.e(e.lineNumber, i.startColumn, + e.lineNumber, i.endColumn), (new w.W5).appendText(_.N( + "multipleResults", "Click to show {0} definitions.", t.length + ))); + else { + let n = t[0]; + if (!n.uri) return; + this.textModelResolverService.createModelReference(n.uri).then( + (t => { + if (!t.object || !t.object.textEditorModel) return void t.dispose(); + const { + object: { + textEditorModel: o + } + } = t, { + startLineNumber: r + } = n.range; + if (r < 1 || r > o.getLineCount()) return void t.dispose(); + const s = this.getPreviewValue(o, r, n); + let a; + a = n.originSelectionRange ? y.e.lift(n.originSelectionRange) : + new y.e(e.lineNumber, i.startColumn, e.lineNumber, i.endColumn); + const l = this.modeService.getModeIdByFilepathOrFirstLine(o + .uri); + this.addDecoration(a, (new w.W5).appendCodeblock(l || "", s)), + t.dispose() + })) + } else this.removeLinkDecorations() + })).then(void 0, v.dL) + } + getPreviewValue(t, i, n) { + let o = n.targetSelectionRange ? n.range : this.getPreviewRangeBasedOnBrackets( + t, i); + return o.endLineNumber - o.startLineNumber >= e.MAX_SOURCE_PREVIEW_LINES && + (o = this.getPreviewRangeBasedOnIndentation(t, i)), this.stripIndentationFromPreviewRange( + t, i, o) + } + stripIndentationFromPreviewRange(e, t, i) { + let n = e.getLineFirstNonWhitespaceColumn(t); + for (let o = t + 1; o < i.endLineNumber; o++) { + const t = e.getLineFirstNonWhitespaceColumn(o); + n = Math.min(n, t) + } + return e.getValueInRange(i).replace(new RegExp(`^\\s{${n-1}}`, "gm"), + "").trim() + } + getPreviewRangeBasedOnIndentation(t, i) { + const n = t.getLineFirstNonWhitespaceColumn(i), + o = Math.min(t.getLineCount(), i + e.MAX_SOURCE_PREVIEW_LINES); + let r = i + 1; + for (; r < o && n !== t.getLineFirstNonWhitespaceColumn(r); r++); + return new y.e(i, 1, r + 1, 1) + } + getPreviewRangeBasedOnBrackets(t, i) { + const n = Math.min(t.getLineCount(), i + e.MAX_SOURCE_PREVIEW_LINES), + o = []; + let r = !0, + s = t.findNextBracket(new A.L(i, 1)); + for (; null !== s;) { + if (0 === o.length) o.push(s); + else { + const e = o[o.length - 1]; + if (e.open[0] === s.open[0] && e.isOpen && !s.isOpen ? o.pop() : o.push( + s), 0 === o.length) { + if (!r) return new y.e(i, 1, s.range.endLineNumber + 1, 1); + r = !1 + } + } + const e = t.getLineMaxColumn(i); + let a = s.range.endLineNumber, + l = s.range.endColumn; + if (e === s.range.endColumn && (a++, l = 1), a > n) return new y.e(i, + 1, n + 1, 1); + s = t.findNextBracket(new A.L(a, l)) + } + return new y.e(i, 1, n + 1, 1) + } + addDecoration(e, t) { + const i = { + range: e, + options: { + description: "goto-definition-link", + inlineClassName: "goto-definition-link", + hoverMessage: t + } + }; + this.linkDecorations = this.editor.deltaDecorations(this.linkDecorations, [ + i + ]) + } + removeLinkDecorations() { + this.linkDecorations.length > 0 && (this.linkDecorations = this.editor + .deltaDecorations(this.linkDecorations, [])) + } + isEnabled(e, t) { + return this.editor.hasModel() && e.isNoneOrSingleMouseDown && 6 === e + .target.type && (e.hasTriggerModifier || !!t && t.keyCodeIsTriggerKey) && + S.Ct.has(this.editor.getModel()) + } + findDefinition(e, t) { + const i = this.editor.getModel(); + return i ? (0, k.nD)(i, e, t) : Promise.resolve(null) + } + gotoDefinition(e, t) { + return this.editor.setPosition(e), this.editor.invokeWithinContext((e => { + const i = !t && this.editor.getOption(77) && !this.isInPeekEditor( + e); + return new T.DefinitionAction({ + openToSide: t, + openInPeek: i, + muteMessage: !0 + }, { + alias: "", + label: "", + id: "", + precondition: void 0 + }).run(e, this.editor) + })) + } + isInPeekEditor(e) { + const t = e.get(P.i6); + return O.Jy.inPeekEditor.getValue(t) + } + dispose() { + this.toUnhook.dispose() + } + }; + B.ID = "editor.contrib.gotodefinitionatposition", B.MAX_SOURCE_PREVIEW_LINES = + 8, B = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([F(1, N.S), F(2, C.h)], B), (0, x._K)(B.ID, B), (0, D.Ic)(((e, t) => { + const i = e.getColor(E._Y); + i && t.addRule( + `.monaco-editor .goto-definition-link { color: ${i} !important; }`) + })) + }, + 2406: (e, t, i) => { + "use strict"; + i.d(t, { + J: () => we + }); + var n = i(3580), + o = i(7301), + r = i(5976), + s = i(1640), + a = i(2065), + l = i(8819), + d = i(3108), + c = i(6904), + h = i(1455), + u = i(3379), + g = i.n(u), + p = i(7795), + m = i.n(p), + f = i(569), + _ = i.n(f), + b = i(3565), + v = i.n(b), + w = i(9216), + C = i.n(w), + y = i(4589), + S = i.n(y), + x = i(9669), + k = {}; + k.styleTagTransform = S(), k.setAttributes = v(), k.insert = _().bind( + null, "head"), k.domAPI = m(), k.insertStyleElement = C(), g()(x.Z, k), + x.Z && x.Z.locals && x.Z.locals; + var L = i(5321), + N = i(1264), + D = i(4669), + E = i(6663), + I = i(5935), + T = i(4527), + M = i(4314), + A = i(6281), + R = i(8216), + O = i(3326), + P = i(9162), + F = i(4349), + B = i(7781), + W = i(8810), + z = i(8843), + V = i(1847), + H = i(5392), + U = i(4650), + j = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + K = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let $ = class { + constructor(e) { + this._resolverService = e + } + hasChildren(e) { + return e instanceof h.oQ || e instanceof h.F2 + } + getChildren(e) { + if (e instanceof h.oQ) return e.groups; + if (e instanceof h.F2) return e.resolve(this._resolverService).then(( + e => e.children)); + throw new Error("bad tree") + } + }; + $ = j([K(0, R.S)], $); + class q { + getHeight() { + return 23 + } + getTemplateId(e) { + return e instanceof h.F2 ? Q.id : J.id + } + } + let Z = class { + constructor(e) { + this._keybindingService = e + } + getKeyboardNavigationLabel(e) { + var t; + if (e instanceof h.WX) { + const i = null === (t = e.parent.getPreview(e)) || void 0 === t ? + void 0 : t.preview(e.range); + if (i) return i.value + } + return (0, I.EZ)(e.uri) + } + }; + Z = j([K(0, V.d)], Z); + class G { + getId(e) { + return e instanceof h.WX ? e.id : e.uri + } + } + let Y = class extends r.JT { + constructor(e, t, i) { + super(), this._uriLabel = t; + const n = document.createElement("div"); + n.classList.add("reference-file"), this.file = this._register(new O.g( + n, { + supportHighlights: !0 + })), this.badge = new P.Z(L.R3(n, L.$(".count"))), this._register(( + 0, W.WZ)(this.badge, i)), e.appendChild(n) + } + set(e, t) { + let i = (0, I.XX)(e.uri); + this.file.setLabel((0, z.p)(e.uri), this._uriLabel.getUriLabel(i, { + relative: !0 + }), { + title: this._uriLabel.getUriLabel(e.uri), + matches: t + }); + const o = e.children.length; + this.badge.setCount(o), o > 1 ? this.badge.setTitleFormat((0, n.N)( + "referencesCount", "{0} references", o)) : this.badge.setTitleFormat( + (0, n.N)("referenceCount", "{0} reference", o)) + } + }; + Y = j([K(1, F.e), K(2, B.XE)], Y); + let Q = class e { + constructor(t) { + this._instantiationService = t, this.templateId = e.id + } + renderTemplate(e) { + return this._instantiationService.createInstance(Y, e) + } + renderElement(e, t, i) { + i.set(e.element, (0, H.mB)(e.filterData)) + } + disposeTemplate(e) { + e.dispose() + } + }; + Q.id = "FileReferencesRenderer", Q = j([K(0, a.TG)], Q); + class X { + constructor(e) { + this.label = new U.q(e, !1) + } + set(e, t) { + var i; + const n = null === (i = e.parent.getPreview(e)) || void 0 === i ? void 0 : + i.preview(e.range); + if (n && n.value) { + const { + value: e, + highlight: i + } = n; + t && !H.CL.isDefault(t) ? (this.label.element.classList.toggle( + "referenceMatch", !1), this.label.set(e, (0, H.mB)(t))) : (this.label + .element.classList.toggle("referenceMatch", !0), this.label.set(e, [ + i + ])) + } else this.label.set( + `${(0,I.EZ)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}` + ) + } + } + class J { + constructor() { + this.templateId = J.id + } + renderTemplate(e) { + return new X(e) + } + renderElement(e, t, i) { + i.set(e.element, e.filterData) + } + disposeTemplate() {} + } + J.id = "OneReferenceRenderer"; + class ee { + getWidgetAriaLabel() { + return (0, n.N)("treeAriaLabel", "References") + } + getAriaLabel(e) { + return e.ariaMessage + } + } + var te = i(3738), + ie = i(3910), + ne = i(1884), + oe = i(9782), + re = i(4862), + se = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + ae = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class le { + constructor(e, t) { + this._editor = e, this._model = t, this._decorations = new Map, this._decorationIgnoreSet = + new Set, this._callOnDispose = new r.SL, this._callOnModelChange = + new r.SL, this._callOnDispose.add(this._editor.onDidChangeModel((() => + this._onModelChanged()))), this._onModelChanged() + } + dispose() { + this._callOnModelChange.dispose(), this._callOnDispose.dispose(), this + .removeDecorations() + } + _onModelChanged() { + this._callOnModelChange.clear(); + const e = this._editor.getModel(); + if (e) + for (let t of this._model.references) + if (t.uri.toString() === e.uri.toString()) return void this._addDecorations( + t.parent) + } + _addDecorations(e) { + if (!this._editor.hasModel()) return; + this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations( + (() => this._onDecorationChanged()))); + const t = [], + i = []; + for (let n = 0, o = e.children.length; n < o; n++) { + let o = e.children[n]; + this._decorationIgnoreSet.has(o.id) || o.uri.toString() === this._editor + .getModel().uri.toString() && (t.push({ + range: o.range, + options: le.DecorationOptions + }), i.push(n)) + } + const n = this._editor.deltaDecorations([], t); + for (let t = 0; t < n.length; t++) this._decorations.set(n[t], e.children[ + i[t]]) + } + _onDecorationChanged() { + const e = [], + t = this._editor.getModel(); + if (t) { + for (let [i, n] of this._decorations) { + const o = t.getDecorationRange(i); + if (!o) continue; + let r = !1; + M.e.equalsRange(o, n.range) || ((M.e.spansMultipleLines(o) || n.range + .endColumn - n.range.startColumn != o.endColumn - o.startColumn) && + (r = !0), r ? (this._decorationIgnoreSet.add(n.id), e.push(i)) : n + .range = o) + } + for (let t = 0, i = e.length; t < i; t++) this._decorations.delete(e[ + t]); + this._editor.deltaDecorations(e, []) + } + } + removeDecorations() { + this._editor.deltaDecorations([...this._decorations.keys()], []), this + ._decorations.clear() + } + } + le.DecorationOptions = A.qx.register({ + description: "reference-decoration", + stickiness: 1, + className: "reference-decoration" + }); + class de extends te.ls {} + let ce = class extends ne.vk { + constructor(e, t, i, n, o, s, a, l, d, c) { + super(e, { + showFrame: !1, + showArrow: !0, + isResizeable: !0, + isAccessible: !0, + supportOnTitleClick: !0 + }, s), this._defaultTreeKeyboardSupport = t, this.layoutData = i, + this._textModelResolverService = o, this._instantiationService = s, + this._peekViewService = a, this._uriLabel = l, this._undoRedoService = + d, this._keybindingService = c, this._disposeOnNewModel = new r.SL, + this._callOnDispose = new r.SL, this._onDidSelectReference = new D.Q5, + this.onDidSelectReference = this._onDidSelectReference.event, this._dim = + new L.Ro(0, 0), this._applyTheme(n.getColorTheme()), this._callOnDispose + .add(n.onDidColorThemeChange(this._applyTheme.bind(this))), this._peekViewService + .addExclusiveWidget(e, this), this.create() + } + dispose() { + this.setModel(void 0), this._callOnDispose.dispose(), this._disposeOnNewModel + .dispose(), (0, r.B9)(this._preview), (0, r.B9)(this._previewNotAvailableMessage), ( + 0, r.B9)(this._tree), (0, r.B9)(this._previewModelReference), this._splitView + .dispose(), super.dispose() + } + _applyTheme(e) { + const t = e.getColor(ne.SC) || N.Il.transparent; + this.style({ + arrowColor: t, + frameColor: t, + headerBackgroundColor: e.getColor(ne.KY) || N.Il.transparent, + primaryHeadingColor: e.getColor(ne.IH), + secondaryHeadingColor: e.getColor(ne.R7) + }) + } + show(e) { + this.editor.revealRangeInCenterIfOutsideViewport(e, 0), super.show(e, + this.layoutData.heightInLines || 18) + } + focusOnReferenceTree() { + this._tree.domFocus() + } + focusOnPreviewEditor() { + this._preview.focus() + } + isPreviewEditorFocused() { + return this._preview.hasTextFocus() + } + _onTitleClick(e) { + this._preview && this._preview.getModel() && this._onDidSelectReference + .fire({ + element: this._getFocusedReference(), + kind: e.ctrlKey || e.metaKey || e.altKey ? "side" : "open", + source: "title" + }) + } + _fillBody(e) { + this.setCssClass("reference-zone-widget"), this._messageContainer = L + .R3(e, L.$("div.messages")), L.Cp(this._messageContainer), this._splitView = + new oe.z(e, { + orientation: 1 + }), this._previewContainer = L.R3(e, L.$("div.preview.inline")), + this._preview = this._instantiationService.createInstance(T.H, this._previewContainer, { + scrollBeyondLastLine: !1, + scrollbar: { + verticalScrollbarSize: 14, + horizontal: "auto", + useShadows: !0, + verticalHasArrows: !1, + horizontalHasArrows: !1, + alwaysConsumeMouseWheel: !1 + }, + overviewRulerLanes: 2, + fixedOverflowWidgets: !0, + minimap: { + enabled: !1 + } + }, this.editor), L.Cp(this._previewContainer), this._previewNotAvailableMessage = + new A.yO(n.N("missingPreviewMessage", "no preview available"), A.yO.DEFAULT_CREATION_OPTIONS, + null, null, this._undoRedoService), this._treeContainer = L.R3(e, L + .$("div.ref-tree.inline")); + const t = { + keyboardSupport: this._defaultTreeKeyboardSupport, + accessibilityProvider: new ee, + keyboardNavigationLabelProvider: this._instantiationService.createInstance( + Z), + identityProvider: new G, + openOnSingleClick: !0, + selectionNavigation: !0, + overrideStyles: { + listBackground: ne.M8 + } + }; + this._defaultTreeKeyboardSupport && this._callOnDispose.add(L.mu(this + ._treeContainer, "keydown", (e => { + e.equals(9) && (this._keybindingService.dispatchEvent(e, e.target), + e.stopPropagation()) + }), !0)), this._tree = this._instantiationService.createInstance(de, + "ReferencesWidget", this._treeContainer, new q, [this._instantiationService + .createInstance(Q), this._instantiationService.createInstance(J) + ], this._instantiationService.createInstance($), t), this._splitView + .addView({ + onDidChange: D.ju.None, + element: this._previewContainer, + minimumSize: 200, + maximumSize: Number.MAX_VALUE, + layout: e => { + this._preview.layout({ + height: this._dim.height, + width: e + }) + } + }, oe.M.Distribute), this._splitView.addView({ + onDidChange: D.ju.None, + element: this._treeContainer, + minimumSize: 100, + maximumSize: Number.MAX_VALUE, + layout: e => { + this._treeContainer.style.height = `${this._dim.height}px`, this + ._treeContainer.style.width = `${e}px`, this._tree.layout(this._dim + .height, e) + } + }, oe.M.Distribute), this._disposables.add(this._splitView.onDidSashChange( + (() => { + this._dim.width && (this.layoutData.ratio = this._splitView.getViewSize( + 0) / this._dim.width) + }), void 0)); + let i = (e, t) => { + e instanceof h.WX && ("show" === t && this._revealReference(e, !1), + this._onDidSelectReference.fire({ + element: e, + kind: t, + source: "tree" + })) + }; + this._tree.onDidOpen((e => { + e.sideBySide ? i(e.element, "side") : e.editorOptions.pinned ? i( + e.element, "goto") : i(e.element, "show") + })), L.Cp(this._treeContainer) + } + _onWidth(e) { + this._dim && this._doLayoutBody(this._dim.height, e) + } + _doLayoutBody(e, t) { + super._doLayoutBody(e, t), this._dim = new L.Ro(t, e), this.layoutData + .heightInLines = this._viewZone ? this._viewZone.heightInLines : + this.layoutData.heightInLines, this._splitView.layout(t), this._splitView + .resizeView(0, t * this.layoutData.ratio) + } + setSelection(e) { + return this._revealReference(e, !0).then((() => { + this._model && (this._tree.setSelection([e]), this._tree.setFocus( + [e])) + })) + } + setModel(e) { + return this._disposeOnNewModel.clear(), this._model = e, this._model ? + this._onNewModel() : Promise.resolve() + } + _onNewModel() { + return this._model ? this._model.isEmpty ? (this.setTitle(""), this._messageContainer + .innerText = n.N("noResults", "No results"), L.$Z(this._messageContainer), + Promise.resolve(void 0)) : (L.Cp(this._messageContainer), this._decorationsManager = + new le(this._preview, this._model), this._disposeOnNewModel.add( + this._decorationsManager), this._disposeOnNewModel.add(this._model + .onDidChangeReferenceRange((e => this._tree.rerender(e)))), this._disposeOnNewModel + .add(this._preview.onMouseDown((e => { + const { + event: t, + target: i + } = e; + if (2 !== t.detail) return; + const n = this._getFocusedReference(); + n && this._onDidSelectReference.fire({ + element: { + uri: n.uri, + range: i.range + }, + kind: t.ctrlKey || t.metaKey || t.altKey ? "side" : "open", + source: "editor" + }) + }))), this.container.classList.add("results-loaded"), L.$Z(this._treeContainer), + L.$Z(this._previewContainer), this._splitView.layout(this._dim.width), + this.focusOnReferenceTree(), this._tree.setInput(1 === this._model.groups + .length ? this._model.groups[0] : this._model)) : Promise.resolve( + void 0) + } + _getFocusedReference() { + const [e] = this._tree.getFocus(); + return e instanceof h.WX ? e : e instanceof h.F2 && e.children.length > + 0 ? e.children[0] : void 0 + } + revealReference(e) { + return ae(this, void 0, void 0, (function*() { + yield this._revealReference(e, !1), this._onDidSelectReference.fire({ + element: e, + kind: "goto", + source: "tree" + }) + })) + } + _revealReference(e, t) { + return ae(this, void 0, void 0, (function*() { + if (this._revealedReference === e) return; + this._revealedReference = e, e.uri.scheme !== E.lg.inMemory ? + this.setTitle((0, I.Hx)(e.uri), this._uriLabel.getUriLabel((0, I + .XX)(e.uri))) : this.setTitle(n.N("peekView.alternateTitle", + "References")); + const i = this._textModelResolverService.createModelReference(e.uri); + this._tree.getInput() === e.parent || (t && this._tree.reveal(e.parent), + yield this._tree.expand(e.parent)), this._tree.reveal(e); + const o = yield i; + if (!this._model) return void o.dispose(); + (0, r.B9)(this._previewModelReference); + const s = o.object; + if (s) { + const t = this._preview.getModel() === s.textEditorModel ? 0 : 1, + i = M.e.lift(e.range).collapseToStart(); + this._previewModelReference = o, this._preview.setModel(s.textEditorModel), + this._preview.setSelection(i), this._preview.revealRangeInCenter( + i, t) + } else this._preview.setModel(this._previewNotAvailableMessage), + o.dispose() + })) + } + }; + ce = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([se(3, B.XE), se(4, R.S), se(5, a.TG), se(6, ne.Fw), se(7, F.e), se(8, + re.tJ), se(9, V.d)], ce), (0, B.Ic)(((e, t) => { + const i = e.getColor(ne.F8); + i && t.addRule( + `.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${i}; }` + ); + const n = e.getColor(ne.WL); + n && t.addRule( + `.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${n}; }` + ); + const o = e.getColor(ne.xH); + o && t.addRule( + `.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${o}; box-sizing: border-box; }` + ); + const r = e.getColor(ie.xL); + r && t.addRule( + `.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${r}; box-sizing: border-box; }` + ); + const s = e.getColor(ne.M8); + s && t.addRule( + `.monaco-editor .reference-zone-widget .ref-tree { background-color: ${s}; }` + ); + const a = e.getColor(ne.xk); + a && t.addRule( + `.monaco-editor .reference-zone-widget .ref-tree { color: ${a}; }`); + const l = e.getColor(ne.a7); + l && t.addRule( + `.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${l}; }` + ); + const d = e.getColor(ne.Zj); + d && t.addRule( + `.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${d}; }` + ); + const c = e.getColor(ne.IY); + c && t.addRule( + `.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${c} !important; }` + ); + const h = e.getColor(ne.RX); + h && t.addRule( + `.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: ${h};}` + ); + const u = e.getColor(ne.sH); + u && t.addRule( + `.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: ${u};}` + ) + })); + var he = i(187), + ue = i(9422), + ge = i(5393), + pe = i(9989), + me = i(2258), + fe = i(4565), + _e = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + be = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + const ve = new l.uy("referenceSearchVisible", !1, n.N( + "referenceSearchVisible", + "Whether reference peek is visible, like 'Peek References' or 'Peek Definition'" + )); + let we = class e { + constructor(e, t, i, n, o, s, a, l) { + this._defaultTreeKeyboardSupport = e, this._editor = t, this._editorService = + n, this._notificationService = o, this._instantiationService = s, + this._storageService = a, this._configurationService = l, this._disposables = + new r.SL, this._requestIdPool = 0, this._ignoreModelChangeEvent = !1, + this._referenceSearchVisible = ve.bindTo(i) + } + static get(t) { + return t.getContribution(e.ID) + } + dispose() { + var e, t; + this._referenceSearchVisible.reset(), this._disposables.dispose(), + null === (e = this._widget) || void 0 === e || e.dispose(), null === + (t = this._model) || void 0 === t || t.dispose(), this._widget = + void 0, this._model = void 0 + } + toggleWidget(e, t, i) { + let o; + if (this._widget && (o = this._widget.position), this.closeWidget(), + o && e.containsPosition(o)) return; + this._peekMode = i, this._referenceSearchVisible.set(!0), this._disposables + .add(this._editor.onDidChangeModelLanguage((() => { + this.closeWidget() + }))), this._disposables.add(this._editor.onDidChangeModel((() => { + this._ignoreModelChangeEvent || this.closeWidget() + }))); + const r = "peekViewLayout", + s = class { + constructor() { + this.ratio = .7, this.heightInLines = 18 + } + static fromJSON(e) { + let t, i; + try { + const n = JSON.parse(e); + t = n.ratio, i = n.heightInLines + } catch (e) {} + return { + ratio: t || .7, + heightInLines: i || 18 + } + } + }.fromJSON(this._storageService.get(r, 0, "{}")); + this._widget = this._instantiationService.createInstance(ce, this._editor, + this._defaultTreeKeyboardSupport, s), this._widget.setTitle(n.N( + "labelLoading", "Loading...")), this._widget.show(e), this._disposables + .add(this._widget.onDidClose((() => { + t.cancel(), this._widget && (this._storageService.store(r, JSON.stringify( + this._widget.layoutData), 0, 1), this._widget = void 0), this.closeWidget() + }))), this._disposables.add(this._widget.onDidSelectReference((e => { + let { + element: t, + kind: n + } = e; + if (t) switch (n) { + case "open": + "editor" === e.source && this._configurationService.getValue( + "editor.stablePeek") || this.openReference(t, !1, !1); + break; + case "side": + this.openReference(t, !0, !1); + break; + case "goto": + i ? this._gotoReference(t) : this.openReference(t, !1, !0) + } + }))); + const a = ++this._requestIdPool; + t.then((t => { + var i; + if (a === this._requestIdPool && this._widget) return null === (i = + this._model) || void 0 === i || i.dispose(), this._model = t, + this._widget.setModel(this._model).then((() => { + if (this._widget && this._model && this._editor.hasModel()) { + this._model.isEmpty ? this._widget.setMetaTitle("") : this._widget + .setMetaTitle(n.N("metaTitle.N", "{0} ({1})", this._model.title, + this._model.references.length)); + let t = this._editor.getModel().uri, + i = new he.L(e.startLineNumber, e.startColumn), + o = this._model.nearestReference(t, i); + if (o) return this._widget.setSelection(o).then((() => { + this._widget && "editor" === this._editor.getOption(76) && + this._widget.focusOnPreviewEditor() + })) + } + })); + t.dispose() + }), (e => { + this._notificationService.error(e) + })) + } + changeFocusBetweenPreviewAndReferences() { + this._widget && (this._widget.isPreviewEditorFocused() ? this._widget + .focusOnReferenceTree() : this._widget.focusOnPreviewEditor()) + } + goToNextOrPreviousReference(e) { + return be(this, void 0, void 0, (function*() { + if (!this._editor.hasModel() || !this._model || !this._widget) + return; + const t = this._widget.position; + if (!t) return; + const i = this._model.nearestReference(this._editor.getModel().uri, + t); + if (!i) return; + const n = this._model.nextOrPreviousReference(i, e), + o = this._editor.hasTextFocus(), + r = this._widget.isPreviewEditorFocused(); + yield this._widget.setSelection(n), yield this._gotoReference(n), + o ? this._editor.focus() : this._widget && r && this._widget.focusOnPreviewEditor() + })) + } + revealReference(e) { + return be(this, void 0, void 0, (function*() { + this._editor.hasModel() && this._model && this._widget && (yield this + ._widget.revealReference(e)) + })) + } + closeWidget(e = !0) { + var t, i; + null === (t = this._widget) || void 0 === t || t.dispose(), null === + (i = this._model) || void 0 === i || i.dispose(), this._referenceSearchVisible + .reset(), this._disposables.clear(), this._widget = void 0, this._model = + void 0, e && this._editor.focus(), this._requestIdPool += 1 + } + _gotoReference(t) { + this._widget && this._widget.hide(), this._ignoreModelChangeEvent = ! + 0; + const i = M.e.lift(t.range).collapseToStart(); + return this._editorService.openCodeEditor({ + resource: t.uri, + options: { + selection: i + } + }, this._editor).then((t => { + var n; + if (this._ignoreModelChangeEvent = !1, t && this._widget) + if (this._editor === t) this._widget.show(i), this._widget.focusOnReferenceTree(); + else { + const o = e.get(t), + r = this._model.clone(); + this.closeWidget(), t.focus(), o.toggleWidget(i, (0, ge.PG)((e => + Promise.resolve(r))), null !== (n = this._peekMode) && void 0 !== + n && n) + } else this.closeWidget() + }), (e => { + this._ignoreModelChangeEvent = !1, (0, o.dL)(e) + })) + } + openReference(e, t, i) { + t || this.closeWidget(); + const { + uri: n, + range: o + } = e; + this._editorService.openCodeEditor({ + resource: n, + options: { + selection: o, + pinned: i + } + }, this._editor, t) + } + }; + + function Ce(e, t) { + const i = (0, ne.rc)(e); + if (!i) return; + let n = we.get(i); + n && t(n) + } + we.ID = "editor.contrib.referencesController", we = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([_e(2, l.i6), _e(3, s.$), _e(4, ue.lT), _e(5, a.TG), _e(6, c.Uy), _e(7, + d.Ui)], we), pe.W.registerCommandAndKeybindingRule({ + id: "togglePeekWidgetFocus", + weight: 100, + primary: (0, me.gx)(2089, 60), + when: l.Ao.or(ve, ne.Jy.inPeekEditor), + handler(e) { + Ce(e, (e => { + e.changeFocusBetweenPreviewAndReferences() + })) + } + }), pe.W.registerCommandAndKeybindingRule({ + id: "goToNextReference", + weight: 90, + primary: 62, + secondary: [70], + when: l.Ao.or(ve, ne.Jy.inPeekEditor), + handler(e) { + Ce(e, (e => { + e.goToNextOrPreviousReference(!0) + })) + } + }), pe.W.registerCommandAndKeybindingRule({ + id: "goToPreviousReference", + weight: 90, + primary: 1086, + secondary: [1094], + when: l.Ao.or(ve, ne.Jy.inPeekEditor), + handler(e) { + Ce(e, (e => { + e.goToNextOrPreviousReference(!1) + })) + } + }), fe.P.registerCommandAlias("goToNextReferenceFromEmbeddedEditor", + "goToNextReference"), fe.P.registerCommandAlias( + "goToPreviousReferenceFromEmbeddedEditor", "goToPreviousReference"), fe + .P.registerCommandAlias("closeReferenceSearchEditor", + "closeReferenceSearch"), fe.P.registerCommand("closeReferenceSearch", ( + e => Ce(e, (e => e.closeWidget())))), pe.W.registerKeybindingRule({ + id: "closeReferenceSearch", + weight: -1, + primary: 9, + secondary: [1033], + when: l.Ao.and(ne.Jy.inPeekEditor, l.Ao.not("config.editor.stablePeek")) + }), pe.W.registerKeybindingRule({ + id: "closeReferenceSearch", + weight: 250, + primary: 9, + secondary: [1033], + when: l.Ao.and(ve, l.Ao.not("config.editor.stablePeek")) + }), pe.W.registerCommandAndKeybindingRule({ + id: "revealReference", + weight: 200, + primary: 3, + mac: { + primary: 3, + secondary: [2066] + }, + when: l.Ao.and(ve, te.CQ), + handler(e) { + var t; + const i = null === (t = e.get(te.Lw).lastFocusedList) || void 0 === t ? + void 0 : t.getFocus(); + Array.isArray(i) && i[0] instanceof h.WX && Ce(e, (e => e.revealReference( + i[0]))) + } + }), pe.W.registerCommandAndKeybindingRule({ + id: "openReferenceToSide", + weight: 100, + primary: 2051, + mac: { + primary: 259 + }, + when: l.Ao.and(ve, te.CQ), + handler(e) { + var t; + const i = null === (t = e.get(te.Lw).lastFocusedList) || void 0 === t ? + void 0 : t.getFocus(); + Array.isArray(i) && i[0] instanceof h.WX && Ce(e, (e => e.openReference( + i[0], !0, !0))) + } + }), fe.P.registerCommand("openReference", (e => { + var t; + const i = null === (t = e.get(te.Lw).lastFocusedList) || void 0 === t ? + void 0 : t.getFocus(); + Array.isArray(i) && i[0] instanceof h.WX && Ce(e, (e => e.openReference( + i[0], !1, !0))) + })) + }, + 1455: (e, t, i) => { + "use strict"; + i.d(t, { + WX: () => u, + F2: () => p, + oQ: () => m + }); + var n = i(3580), + o = i(4669), + r = i(5935), + s = i(5976), + a = i(7295), + l = i(4742), + d = i(4314), + c = i(3702), + h = i(7301); + class u { + constructor(e, t, i, n) { + this.isProviderFirst = e, this.parent = t, this.link = i, this._rangeCallback = + n, this.id = l.a.nextId() + } + get uri() { + return this.link.uri + } + get range() { + var e, t; + return null !== (t = null !== (e = this._range) && void 0 !== e ? e : + this.link.targetSelectionRange) && void 0 !== t ? t : this.link.range + } + set range(e) { + this._range = e, this._rangeCallback(this) + } + get ariaMessage() { + var e; + const t = null === (e = this.parent.getPreview(this)) || void 0 === e ? + void 0 : e.preview(this.range); + return t ? (0, n.N)({ + key: "aria.oneReference.preview", + comment: [ + "Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code" + ] + }, "symbol in {0} on line {1} at column {2}, {3}", (0, r.EZ)(this.uri), + this.range.startLineNumber, this.range.startColumn, t.value) : (0, n + .N)("aria.oneReference", "symbol in {0} on line {1} at column {2}", ( + 0, r.EZ)(this.uri), this.range.startLineNumber, this.range.startColumn) + } + } + class g { + constructor(e) { + this._modelReference = e + } + dispose() { + this._modelReference.dispose() + } + preview(e, t = 8) { + const i = this._modelReference.object.textEditorModel; + if (!i) return; + const { + startLineNumber: n, + startColumn: o, + endLineNumber: r, + endColumn: s + } = e, a = i.getWordUntilPosition({ + lineNumber: n, + column: o - t + }), l = new d.e(n, a.startColumn, n, o), c = new d.e(r, s, r, + 1073741824), h = i.getValueInRange(l).replace(/^\s+/, ""), u = i.getValueInRange( + e); + return { + value: h + u + i.getValueInRange(c).replace(/\s+$/, ""), + highlight: { + start: h.length, + end: h.length + u.length + } + } + } + } + class p { + constructor(e, t) { + this.parent = e, this.uri = t, this.children = [], this._previews = + new c.Y9 + } + dispose() { + (0, s.B9)(this._previews.values()), this._previews.clear() + } + getPreview(e) { + return this._previews.get(e.uri) + } + get ariaMessage() { + const e = this.children.length; + return 1 === e ? (0, n.N)("aria.fileReferences.1", + "1 symbol in {0}, full path {1}", (0, r.EZ)(this.uri), this.uri.fsPath + ) : (0, n.N)("aria.fileReferences.N", + "{0} symbols in {1}, full path {2}", e, (0, r.EZ)(this.uri), this.uri + .fsPath) + } + resolve(e) { + return t = this, i = void 0, o = function*() { + if (0 !== this._previews.size) return this; + for (let t of this.children) + if (!this._previews.has(t.uri)) try { + const i = yield e.createModelReference(t.uri); + this._previews.set(t.uri, new g(i)) + } catch (e) { + (0, h.dL)(e) + } + return this + }, new((n = void 0) || (n = Promise))((function(e, r) { + function s(e) { + try { + l(o.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(o.throw(e)) + } catch (e) { + r(e) + } + } + + function l(t) { + var i; + t.done ? e(t.value) : (i = t.value, i instanceof n ? i : new n(( + function(e) { + e(i) + }))).then(s, a) + } + l((o = o.apply(t, i || [])).next()) + })); + var t, i, n, o + } + } + class m { + constructor(e, t) { + this.groups = [], this.references = [], this._onDidChangeReferenceRange = + new o.Q5, this.onDidChangeReferenceRange = this._onDidChangeReferenceRange + .event, this._links = e, this._title = t; + const [i] = e; + let n; + e.sort(m._compareReferences); + for (let t of e) + if (n && r.SF.isEqual(n.uri, t.uri, !0) || (n = new p(this, t.uri), + this.groups.push(n)), 0 === n.children.length || 0 !== m._compareReferences( + t, n.children[n.children.length - 1])) { + const e = new u(i === t, n, t, (e => this._onDidChangeReferenceRange + .fire(e))); + this.references.push(e), n.children.push(e) + } + } + dispose() { + (0, s.B9)(this.groups), this._onDidChangeReferenceRange.dispose(), + this.groups.length = 0 + } + clone() { + return new m(this._links, this._title) + } + get title() { + return this._title + } + get isEmpty() { + return 0 === this.groups.length + } + get ariaMessage() { + return this.isEmpty ? (0, n.N)("aria.result.0", "No results found") : + 1 === this.references.length ? (0, n.N)("aria.result.1", + "Found 1 symbol in {0}", this.references[0].uri.fsPath) : 1 === this + .groups.length ? (0, n.N)("aria.result.n1", + "Found {0} symbols in {1}", this.references.length, this.groups[0].uri + .fsPath) : (0, n.N)("aria.result.nm", + "Found {0} symbols in {1} files", this.references.length, this.groups + .length) + } + nextOrPreviousReference(e, t) { + let { + parent: i + } = e, n = i.children.indexOf(e), o = i.children.length, r = i.parent.groups + .length; + return 1 === r || t && n + 1 < o || !t && n > 0 ? (n = t ? (n + 1) % o : + (n + o - 1) % o, i.children[n]) : (n = i.parent.groups.indexOf(i), t ? + (n = (n + 1) % r, i.parent.groups[n].children[0]) : (n = (n + r - 1) % + r, i.parent.groups[n].children[i.parent.groups[n].children.length - + 1])) + } + nearestReference(e, t) { + const i = this.references.map(((i, n) => ({ + idx: n, + prefixLen: a.Mh(i.uri.toString(), e.toString()), + offsetDist: 100 * Math.abs(i.range.startLineNumber - t.lineNumber) + + Math.abs(i.range.startColumn - t.column) + }))).sort(((e, t) => e.prefixLen > t.prefixLen ? -1 : e.prefixLen < t + .prefixLen ? 1 : e.offsetDist < t.offsetDist ? -1 : e.offsetDist > + t.offsetDist ? 1 : 0))[0]; + if (i) return this.references[i.idx] + } + referenceAt(e, t) { + for (const i of this.references) + if (i.uri.toString() === e.toString() && d.e.containsPosition(i.range, + t)) return i + } + firstReference() { + for (const e of this.references) + if (e.isProviderFirst) return e; + return this.references[0] + } + static _compareReferences(e, t) { + return r.SF.compare(e.uri, t.uri) || d.e.compareRangesUsingStarts(e.range, + t.range) + } + } + }, + 3285: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + ModesHoverController: () => et + }); + var n = i(3580), + o = i(2258), + r = i(5976), + s = i(6830), + a = i(4314), + l = i(9102), + d = i(1531), + c = i(5321), + h = i(187), + u = i(6281), + g = i(4101), + p = i(5393), + m = i(7301); + class f { + constructor(e, t, i, n, o) { + this._computer = e, this._state = 0, this._hoverTime = o, this._firstWaitScheduler = + new p.pY((() => this._triggerAsyncComputation()), 0), this._secondWaitScheduler = + new p.pY((() => this._triggerSyncComputation()), 0), this._loadingMessageScheduler = + new p.pY((() => this._showLoadingMessage()), 0), this._asyncComputationPromise = + null, this._asyncComputationPromiseDone = !1, this._completeCallback = + t, this._errorCallback = i, this._progressCallback = n + } + setHoverTime(e) { + this._hoverTime = e + } + _firstWaitTime() { + return this._hoverTime / 2 + } + _secondWaitTime() { + return this._hoverTime / 2 + } + _loadingMessageTime() { + return 3 * this._hoverTime + } + _triggerAsyncComputation() { + this._state = 2, this._secondWaitScheduler.schedule(this._secondWaitTime()), + this._computer.computeAsync ? (this._asyncComputationPromiseDone = !1, + this._asyncComputationPromise = (0, p.PG)((e => this._computer.computeAsync( + e))), this._asyncComputationPromise.then((e => { + this._asyncComputationPromiseDone = !0, this._withAsyncResult(e) + }), (e => this._onError(e)))) : this._asyncComputationPromiseDone = ! + 0 + } + _triggerSyncComputation() { + this._computer.computeSync && this._computer.onResult(this._computer.computeSync(), ! + 0), this._asyncComputationPromiseDone ? (this._state = 0, this._onComplete( + this._computer.getResult())) : (this._state = 3, this._onProgress( + this._computer.getResult())) + } + _showLoadingMessage() { + 3 === this._state && this._onProgress(this._computer.getResultWithLoadingMessage()) + } + _withAsyncResult(e) { + e && this._computer.onResult(e, !1), 3 === this._state && (this._state = + 0, this._onComplete(this._computer.getResult())) + } + _onComplete(e) { + this._completeCallback(e) + } + _onError(e) { + this._errorCallback ? this._errorCallback(e) : (0, m.dL)(e) + } + _onProgress(e) { + this._progressCallback(e) + } + start(e) { + if (0 === e) 0 === this._state && (this._state = 1, this._firstWaitScheduler + .schedule(this._firstWaitTime()), this._loadingMessageScheduler.schedule( + this._loadingMessageTime())); + else switch (this._state) { + case 0: + this._triggerAsyncComputation(), this._secondWaitScheduler.cancel(), + this._triggerSyncComputation(); + break; + case 2: + this._secondWaitScheduler.cancel(), this._triggerSyncComputation() + } + } + cancel() { + this._loadingMessageScheduler.cancel(), 1 === this._state && this._firstWaitScheduler + .cancel(), 2 === this._state && (this._secondWaitScheduler.cancel(), + this._asyncComputationPromise && (this._asyncComputationPromise.cancel(), + this._asyncComputationPromise = null)), 3 === this._state && this._asyncComputationPromise && + (this._asyncComputationPromise.cancel(), this._asyncComputationPromise = + null), this._state = 0 + } + } + var _ = i(9488), + b = i(3794), + v = i(6781), + w = i(3379), + C = i.n(w), + y = i(7795), + S = i.n(y), + x = i(569), + k = i.n(x), + L = i(3565), + N = i.n(L), + D = i(9216), + E = i.n(D), + I = i(4589), + T = i.n(I), + M = i(3039), + A = {}; + A.styleTagTransform = T(), A.setAttributes = N(), A.insert = k().bind( + null, "head"), A.domAPI = S(), A.insertStyleElement = E(), C()(M.Z, A), + M.Z && M.Z.locals && M.Z.locals; + const R = c.$; + class O extends r.JT { + constructor() { + super(), this.containerDomNode = document.createElement("div"), this.containerDomNode + .className = "monaco-hover", this.containerDomNode.tabIndex = 0, + this.containerDomNode.setAttribute("role", "tooltip"), this.contentsDomNode = + document.createElement("div"), this.contentsDomNode.className = + "monaco-hover-content", this._scrollbar = this._register(new v.s$( + this.contentsDomNode, { + consumeMouseWheelIfScrollbarIsNeeded: !0 + })), this.containerDomNode.appendChild(this._scrollbar.getDomNode()) + } + onContentsChanged() { + this._scrollbar.scanDomNode() + } + } + class P extends r.JT { + constructor(e, t, i) { + super(), this.actionContainer = c.R3(e, R("div.action-container")), + this.action = c.R3(this.actionContainer, R("a.action")), this.action + .setAttribute("href", "#"), this.action.setAttribute("role", + "button"), t.iconClass && c.R3(this.action, R( + `span.icon.${t.iconClass}`)), c.R3(this.action, R("span")).textContent = + i ? `${t.label} (${i})` : t.label, this._register(c.nm(this.actionContainer, + c.tw.CLICK, (e => { + e.stopPropagation(), e.preventDefault(), t.run(this.actionContainer) + }))), this.setEnabled(!0) + } + static render(e, t, i) { + return new P(e, t, i) + } + setEnabled(e) { + e ? (this.actionContainer.classList.remove("disabled"), this.actionContainer + .removeAttribute("aria-disabled")) : (this.actionContainer.classList + .add("disabled"), this.actionContainer.setAttribute("aria-disabled", + "true")) + } + } + var F = i(8674), + B = i(5935), + W = i(6479), + z = i(988), + V = i(5091), + H = i(1907), + U = i(787), + j = i(9532), + K = i(535), + $ = i(7781), + q = i(3910), + Z = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const G = c.$; + class Y { + constructor(e, t, i) { + this.owner = e, this.range = t, this.marker = i + } + isValidForHoverAnchor(e) { + return 1 === e.type && this.range.startColumn <= e.range.startColumn && + this.range.endColumn >= e.range.endColumn + } + } + const Q = { + type: 1, + filter: { + include: j.yN.QuickFix + } + }; + let X = class { + constructor(e, t, i, n) { + this._editor = e, this._hover = t, this._markerDecorationsService = i, + this._openerService = n, this.recentMarkerCodeActionsInfo = void 0 + } + computeSync(e, t) { + if (!this._editor.hasModel() || 1 !== e.type) return []; + const i = this._editor.getModel(), + n = e.range.startLineNumber, + o = i.getLineMaxColumn(n), + r = []; + for (const s of t) { + const t = s.range.startLineNumber === n ? s.range.startColumn : 1, + l = s.range.endLineNumber === n ? s.range.endColumn : o, + d = this._markerDecorationsService.getMarker(i.uri, s); + if (!d) continue; + const c = new a.e(e.range.startLineNumber, t, e.range.startLineNumber, + l); + r.push(new Y(this, c, d)) + } + return r + } + renderHoverParts(e, t, i) { + if (!e.length) return r.JT.None; + const n = new r.SL; + e.forEach((e => t.appendChild(this.renderMarkerHover(e, n)))); + const o = 1 === e.length ? e[0] : e.sort(((e, t) => F.ZL.compare(e.marker + .severity, t.marker.severity)))[0]; + return this.renderMarkerStatusbar(o, i, n), n + } + renderMarkerHover(e, t) { + const i = G("div.hover-row"), + n = c.R3(i, G("div.marker.hover-contents")), + { + source: o, + message: r, + code: s, + relatedInformation: a + } = e.marker; + this._editor.applyFontInfo(n); + const l = c.R3(n, G("span")); + if (l.style.whiteSpace = "pre-wrap", l.innerText = r, o || s) + if (s && "string" != typeof s) { + const e = G("span"); + o && (c.R3(e, G("span")).innerText = o); + const i = c.R3(e, G("a.code-link")); + i.setAttribute("href", s.target.toString()), t.add(c.nm(i, "click", ( + e => { + this._openerService.open(s.target, { + allowCommands: !0 + }), e.preventDefault(), e.stopPropagation() + }))), c.R3(i, G("span")).innerText = s.value; + const r = c.R3(n, e); + r.style.opacity = "0.6", r.style.paddingLeft = "6px" + } else { + const e = c.R3(n, G("span")); + e.style.opacity = "0.6", e.style.paddingLeft = "6px", e.innerText = + o && s ? `${o}(${s})` : o || `(${s})` + } + if ((0, _.Of)(a)) + for (const { + message: e, + resource: i, + startLineNumber: o, + startColumn: r + } + of a) { + const s = c.R3(n, G("div")); + s.style.marginTop = "8px"; + const a = c.R3(s, G("a")); + a.innerText = `${(0,B.EZ)(i)}(${o}, ${r}): `, a.style.cursor = + "pointer", t.add(c.nm(a, "click", (e => { + e.stopPropagation(), e.preventDefault(), this._openerService && + this._openerService.open(i, { + fromUserGesture: !0, + editorOptions: { + selection: { + startLineNumber: o, + startColumn: r + } + } + }).catch(m.dL) + }))); + const l = c.R3(s, G("span")); + l.innerText = e, this._editor.applyFontInfo(l) + } + return i + } + renderMarkerStatusbar(e, t, i) { + if (e.marker.severity !== F.ZL.Error && e.marker.severity !== F.ZL.Warning && + e.marker.severity !== F.ZL.Info || t.addAction({ + label: n.N("view problem", "View Problem"), + commandId: V.NextMarkerAction.ID, + run: () => { + this._hover.hide(), V.MarkerController.get(this._editor).showAtMarker( + e.marker), this._editor.focus() + } + }), !this._editor.getOption(80)) { + const o = t.append(G("div")); + this.recentMarkerCodeActionsInfo && (F.H0.makeKey(this.recentMarkerCodeActionsInfo + .marker) === F.H0.makeKey(e.marker) ? this.recentMarkerCodeActionsInfo + .hasCodeActions || (o.textContent = n.N("noQuickFixes", + "No quick fixes available")) : this.recentMarkerCodeActionsInfo = + void 0); + const s = this.recentMarkerCodeActionsInfo && !this.recentMarkerCodeActionsInfo + .hasCodeActions ? r.JT.None : i.add((0, p.Vg)((() => o.textContent = + n.N("checkingForQuickFixes", "Checking for quick fixes...")), + 200)); + o.textContent || (o.textContent = String.fromCharCode(160)); + const a = this.getCodeActions(e.marker); + i.add((0, r.OF)((() => a.cancel()))), a.then((a => { + if (s.dispose(), this.recentMarkerCodeActionsInfo = { + marker: e.marker, + hasCodeActions: a.validActions.length > 0 + }, !this.recentMarkerCodeActionsInfo.hasCodeActions) return a.dispose(), + void(o.textContent = n.N("noQuickFixes", + "No quick fixes available")); + o.style.display = "none"; + let l = !1; + i.add((0, r.OF)((() => { + l || a.dispose() + }))), t.addAction({ + label: n.N("quick fixes", "Quick Fix..."), + commandId: U.E7.Id, + run: e => { + l = !0; + const t = U.pY.get(this._editor), + i = c.i(e); + this._hover.hide(), t.showCodeActions(Q, a, { + x: i.left + 6, + y: i.top + i.height + 6 + }) + } + }) + }), m.dL) + } + } + getCodeActions(e) { + return (0, p.PG)((t => (0, H.aI)(this._editor.getModel(), new a.e(e.startLineNumber, + e.startColumn, e.endLineNumber, e.endColumn), Q, K.E.None, t))) + } + }; + X = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([Z(2, W.i), Z(3, z.v4)], X), (0, $.Ic)(((e, t) => { + const i = e.getColor(q.ur); + i && t.addRule( + `.monaco-hover .hover-contents a.code-link span { color: ${i}; }`); + const n = e.getColor(q.sg); + n && t.addRule( + `.monaco-hover .hover-contents a.code-link span:hover { color: ${n}; }` + ) + })); + var J = i(2065), + ee = i(9365), + te = i(3947), + ie = i(1050); + + function ne(e, t, i) { + const n = g.xp.ordered(e).map((n => Promise.resolve(n.provideHover(e, t, + i)).then((e => e && function(e) { + const t = void 0 !== e.range, + i = void 0 !== e.contents && e.contents && e.contents.length > 0; + return t && i + }(e) ? e : void 0), (e => { + (0, m.Cp)(e) + })))); + return Promise.all(n).then(_.kX) + }(0, s.sb)("_executeHoverProvider", ((e, t) => ne(e, t, ie.T.None))); + var oe = i(3108), + re = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const se = c.$; + class ae { + constructor(e, t, i) { + this.owner = e, this.range = t, this.contents = i + } + isValidForHoverAnchor(e) { + return 1 === e.type && this.range.startColumn <= e.range.startColumn && + this.range.endColumn >= e.range.endColumn + } + } + let le = class { + constructor(e, t, i, n, o) { + this._editor = e, this._hover = t, this._modeService = i, this._openerService = + n, this._configurationService = o + } + createLoadingMessage(e) { + return new ae(this, e.range, [(new ee.W5).appendText(n.N( + "modesContentHover.loading", "Loading..."))]) + } + computeSync(e, t) { + if (!this._editor.hasModel() || 1 !== e.type) return []; + const i = this._editor.getModel(), + o = e.range.startLineNumber, + r = i.getLineMaxColumn(o), + s = []; + for (const i of t) { + const t = i.range.startLineNumber === o ? i.range.startColumn : 1, + n = i.range.endLineNumber === o ? i.range.endColumn : r, + l = i.options.hoverMessage; + if (!l || (0, ee.CP)(l)) continue; + const d = new a.e(e.range.startLineNumber, t, e.range.startLineNumber, + n); + s.push(new ae(this, d, (0, _._2)(l))) + } + const l = this._editor.getModel().getLineLength(o), + d = this._configurationService.getValue( + "editor.maxTokenizationLineLength"); + return "number" == typeof d && l >= d && s.push(new ae(this, new a.e( + o, 1, o, l + 1), [{ + value: n.N("too many characters", + "Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`." + ) + }])), s + } + computeAsync(e, t, i) { + return n = this, o = void 0, s = function*() { + if (!this._editor.hasModel() || 1 !== e.type) return Promise.resolve( + []); + const t = this._editor.getModel(); + if (!g.xp.has(t)) return Promise.resolve([]); + const n = yield ne(t, new h.L(e.range.startLineNumber, e.range.startColumn), + i), + o = []; + for (const t of n) { + if ((0, ee.CP)(t.contents)) continue; + const i = t.range ? a.e.lift(t.range) : e.range; + o.push(new ae(this, i, t.contents)) + } + return o + }, new((r = void 0) || (r = Promise))((function(e, t) { + function i(e) { + try { + l(s.next(e)) + } catch (e) { + t(e) + } + } + + function a(e) { + try { + l(s.throw(e)) + } catch (e) { + t(e) + } + } + + function l(t) { + var n; + t.done ? e(t.value) : (n = t.value, n instanceof r ? n : new r(( + function(e) { + e(n) + }))).then(i, a) + } + l((s = s.apply(n, o || [])).next()) + })); + var n, o, r, s + } + renderHoverParts(e, t, i) { + const n = new r.SL; + for (const i of e) + for (const e of i.contents) { + if ((0, ee.CP)(e)) continue; + const i = se("div.hover-row.markdown-hover"), + o = c.R3(i, se("div.hover-contents")), + r = n.add(new te.$({ + editor: this._editor + }, this._modeService, this._openerService)); + n.add(r.onDidRenderAsync((() => { + o.className = "hover-contents code-hover-contents", this._hover + .onContentsChanged() + }))); + const s = n.add(r.render(e)); + o.appendChild(s.element), t.appendChild(i) + } + return n + } + }; + le = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([re(2, d.h), re(3, z.v4), re(4, oe.Ui)], le); + class de { + constructor(e, t) { + this.priority = e, this.range = t, this.type = 1 + } + equals(e) { + return 1 === e.type && this.range.equalsRange(e.range) + } + canAdoptVisibleHover(e, t) { + return 1 === e.type && t.lineNumber === this.range.startLineNumber + } + } + class ce { + constructor(e, t, i) { + this.priority = e, this.owner = t, this.range = i, this.type = 2 + } + equals(e) { + return 2 === e.type && this.owner === e.owner + } + canAdoptVisibleHover(e, t) { + return 2 === e.type && this.owner === e.owner + } + } + var he = i(3167), + ue = i(4565), + ge = i(4144), + pe = i(8819), + me = i(1106), + fe = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + class _e { + constructor(e, t, i) { + this.owner = e, this.range = t, this.controller = i + } + isValidForHoverAnchor(e) { + return 1 === e.type && this.range.startColumn <= e.range.startColumn && + this.range.endColumn >= e.range.endColumn + } + hasMultipleSuggestions() { + return this.controller.hasMultipleInlineCompletions() + } + } + let be = class { + constructor(e, t, i, n, o, r, s, a) { + this._editor = e, this._hover = t, this._commandService = i, this._menuService = + n, this._contextKeyService = o, this._modeService = r, this._openerService = + s, this.accessibilityService = a + } + suggestHoverAnchor(e) { + const t = he.GhostTextController.get(this._editor); + if (!t) return null; + if (8 === e.target.type) { + const i = e.target.detail; + if (t.shouldShowHoverAtViewZone(i.viewZoneId)) return new ce(1e3, + this, a.e.fromPositions(i.positionBefore || i.position, i.positionBefore || + i.position)) + } + return 7 === e.target.type && e.target.range && t.shouldShowHoverAt(e + .target.range) || 6 === e.target.type && e.target.range && e.target + .detail && e.target.detail.mightBeForeignElement && t.shouldShowHoverAt( + e.target.range) ? new ce(1e3, this, e.target.range) : null + } + computeSync(e, t) { + const i = he.GhostTextController.get(this._editor); + return i && i.shouldShowHoverAt(e.range) ? [new _e(this, e.range, i)] : [] + } + renderHoverParts(e, t, i) { + const o = new r.SL, + s = e[0]; + this.accessibilityService.isScreenReaderOptimized() && this.renderScreenReaderText( + s, t, o); + const a = o.add(this._menuService.createMenu(ge.eH.InlineCompletionsActions, + this._contextKeyService)), + l = i.addAction({ + label: n.N("showNextInlineSuggestion", "Next"), + commandId: he.ShowNextInlineSuggestionAction.ID, + run: () => this._commandService.executeCommand(he.ShowNextInlineSuggestionAction + .ID) + }), + d = i.addAction({ + label: n.N("showPreviousInlineSuggestion", "Previous"), + commandId: he.ShowPreviousInlineSuggestionAction.ID, + run: () => this._commandService.executeCommand(he.ShowPreviousInlineSuggestionAction + .ID) + }); + i.addAction({ + label: n.N("acceptInlineSuggestion", "Accept"), + commandId: he.commitInlineSuggestionAction.id, + run: () => this._commandService.executeCommand(he.commitInlineSuggestionAction + .id) + }); + const c = [l, d]; + for (const e of c) e.setEnabled(!1); + s.hasMultipleSuggestions().then((e => { + for (const t of c) t.setEnabled(e) + })); + for (const [e, t] of a.getActions()) + for (const e of t) e instanceof ge.U8 && i.addAction({ + label: e.label, + commandId: e.item.id, + run: () => this._commandService.executeCommand(e.item.id) + }); + return o + } + renderScreenReaderText(e, t, i) { + var o, r; + const s = c.$, + a = s("div.hover-row.markdown-hover"), + l = c.R3(a, s("div.hover-contents")), + d = i.add(new te.$({ + editor: this._editor + }, this._modeService, this._openerService)), + h = e => { + i.add(d.onDidRenderAsync((() => { + l.className = "hover-contents code-hover-contents", this._hover + .onContentsChanged() + }))); + const t = n.N("inlineSuggestionFollows", "Suggestion:"), + o = i.add(d.render((new ee.W5).appendText(t).appendCodeblock( + "text", e))); + l.replaceChildren(o.element) + }, + u = null === (r = null === (o = e.controller.activeModel) || void 0 === + o ? void 0 : o.inlineCompletionsModel) || void 0 === r ? void 0 : r + .ghostText; + if (u) { + const e = this._editor.getModel().getLineContent(u.lineNumber); + h(u.renderForScreenReader(e)) + } + t.appendChild(a) + } + }; + be = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([fe(2, ue.H), fe(3, ge.co), fe(4, pe.i6), fe(5, d.h), fe(6, z.v4), fe( + 7, me.F)], be); + var ve = i(3308), + we = i(4494), + Ce = i(1264), + ye = i(4669); + class Se { + constructor(e, t, i) { + this.presentationIndex = i, this._onColorFlushed = new ye.Q5, this.onColorFlushed = + this._onColorFlushed.event, this._onDidChangeColor = new ye.Q5, this.onDidChangeColor = + this._onDidChangeColor.event, this._onDidChangePresentation = new ye.Q5, + this.onDidChangePresentation = this._onDidChangePresentation.event, + this.originalColor = e, this._color = e, this._colorPresentations = t + } + get color() { + return this._color + } + set color(e) { + this._color.equals(e) || (this._color = e, this._onDidChangeColor.fire( + e)) + } + get presentation() { + return this.colorPresentations[this.presentationIndex] + } + get colorPresentations() { + return this._colorPresentations + } + set colorPresentations(e) { + this._colorPresentations = e, this.presentationIndex > e.length - 1 && + (this.presentationIndex = 0), this._onDidChangePresentation.fire(this + .presentation) + } + selectNextColorPresentation() { + this.presentationIndex = (this.presentationIndex + 1) % this.colorPresentations + .length, this.flushColor(), this._onDidChangePresentation.fire(this.presentation) + } + guessColorPresentation(e, t) { + for (let e = 0; e < this.colorPresentations.length; e++) + if (t.toLowerCase() === this.colorPresentations[e].label) { + this.presentationIndex = e, this._onDidChangePresentation.fire(this.presentation); + break + } + } + flushColor() { + this._onColorFlushed.fire(this._color) + } + } + var xe = i(6562), + ke = {}; + ke.styleTagTransform = T(), ke.setAttributes = N(), ke.insert = k().bind( + null, "head"), ke.domAPI = S(), ke.insertStyleElement = E(), C()(xe.Z, + ke), xe.Z && xe.Z.locals && xe.Z.locals; + var Le = i(6268), + Ne = i(7974); + const De = c.$; + class Ee extends r.JT { + constructor(e, t, i) { + super(), this.model = t, this.domNode = De(".colorpicker-header"), c.R3( + e, this.domNode), this.pickedColorNode = c.R3(this.domNode, De( + ".picked-color")); + const n = c.R3(this.domNode, De(".original-color")); + n.style.backgroundColor = Ce.Il.Format.CSS.format(this.model.originalColor) || + "", this.backgroundColor = i.getColorTheme().getColor(q.yJ) || Ce.Il + .white, this._register((0, $.Ic)(((e, t) => { + this.backgroundColor = e.getColor(q.yJ) || Ce.Il.white + }))), this._register(c.nm(this.pickedColorNode, c.tw.CLICK, (() => + this.model.selectNextColorPresentation()))), this._register(c.nm(n, + c.tw.CLICK, (() => { + this.model.color = this.model.originalColor, this.model.flushColor() + }))), this._register(t.onDidChangeColor(this.onDidChangeColor, this)), + this._register(t.onDidChangePresentation(this.onDidChangePresentation, + this)), this.pickedColorNode.style.backgroundColor = Ce.Il.Format.CSS + .format(t.color) || "", this.pickedColorNode.classList.toggle( + "light", t.color.rgba.a < .5 ? this.backgroundColor.isLighter() : t + .color.isLighter()) + } + onDidChangeColor(e) { + this.pickedColorNode.style.backgroundColor = Ce.Il.Format.CSS.format( + e) || "", this.pickedColorNode.classList.toggle("light", e.rgba.a < + .5 ? this.backgroundColor.isLighter() : e.isLighter()), this.onDidChangePresentation() + } + onDidChangePresentation() { + this.pickedColorNode.textContent = this.model.presentation ? this.model + .presentation.label : "" + } + } + class Ie extends r.JT { + constructor(e, t, i) { + super(), this.model = t, this.pixelRatio = i, this.domNode = De( + ".colorpicker-body"), c.R3(e, this.domNode), this.saturationBox = + new Te(this.domNode, this.model, this.pixelRatio), this._register( + this.saturationBox), this._register(this.saturationBox.onDidChange( + this.onDidSaturationValueChange, this)), this._register(this.saturationBox + .onColorFlushed(this.flushColor, this)), this.opacityStrip = new Ae( + this.domNode, this.model), this._register(this.opacityStrip), this._register( + this.opacityStrip.onDidChange(this.onDidOpacityChange, this)), this + ._register(this.opacityStrip.onColorFlushed(this.flushColor, this)), + this.hueStrip = new Re(this.domNode, this.model), this._register( + this.hueStrip), this._register(this.hueStrip.onDidChange(this.onDidHueChange, + this)), this._register(this.hueStrip.onColorFlushed(this.flushColor, + this)) + } + flushColor() { + this.model.flushColor() + } + onDidSaturationValueChange({ + s: e, + v: t + }) { + const i = this.model.color.hsva; + this.model.color = new Ce.Il(new Ce.tx(i.h, e, t, i.a)) + } + onDidOpacityChange(e) { + const t = this.model.color.hsva; + this.model.color = new Ce.Il(new Ce.tx(t.h, t.s, t.v, e)) + } + onDidHueChange(e) { + const t = this.model.color.hsva, + i = 360 * (1 - e); + this.model.color = new Ce.Il(new Ce.tx(360 === i ? 0 : i, t.s, t.v, t + .a)) + } + layout() { + this.saturationBox.layout(), this.opacityStrip.layout(), this.hueStrip + .layout() + } + } + class Te extends r.JT { + constructor(e, t, i) { + super(), this.model = t, this.pixelRatio = i, this._onDidChange = new ye + .Q5, this.onDidChange = this._onDidChange.event, this._onColorFlushed = + new ye.Q5, this.onColorFlushed = this._onColorFlushed.event, this.domNode = + De(".saturation-wrap"), c.R3(e, this.domNode), this.canvas = + document.createElement("canvas"), this.canvas.className = + "saturation-box", c.R3(this.domNode, this.canvas), this.selection = + De(".saturation-selection"), c.R3(this.domNode, this.selection), + this.layout(), this._register(c.Lo(this.domNode, (e => this.onMouseDown( + e)))), this._register(this.model.onDidChangeColor(this.onDidChangeColor, + this)), this.monitor = null + } + onMouseDown(e) { + this.monitor = this._register(new Ne.Z); + const t = c.i(this.domNode); + e.target !== this.selection && this.onDidChangePosition(e.offsetX, e.offsetY), + this.monitor.startMonitoring(e.target, e.buttons, Ne.e, (e => this.onDidChangePosition( + e.posx - t.left, e.posy - t.top)), (() => null)); + const i = c.qV(document, (() => { + this._onColorFlushed.fire(), i.dispose(), this.monitor && (this.monitor + .stopMonitoring(!0), this.monitor = null) + }), !0) + } + onDidChangePosition(e, t) { + const i = Math.max(0, Math.min(1, e / this.width)), + n = Math.max(0, Math.min(1, 1 - t / this.height)); + this.paintSelection(i, n), this._onDidChange.fire({ + s: i, + v: n + }) + } + layout() { + this.width = this.domNode.offsetWidth, this.height = this.domNode.offsetHeight, + this.canvas.width = this.width * this.pixelRatio, this.canvas.height = + this.height * this.pixelRatio, this.paint(); + const e = this.model.color.hsva; + this.paintSelection(e.s, e.v) + } + paint() { + const e = this.model.color.hsva, + t = new Ce.Il(new Ce.tx(e.h, 1, 1, 1)), + i = this.canvas.getContext("2d"), + n = i.createLinearGradient(0, 0, this.canvas.width, 0); + n.addColorStop(0, "rgba(255, 255, 255, 1)"), n.addColorStop(.5, + "rgba(255, 255, 255, 0.5)"), n.addColorStop(1, + "rgba(255, 255, 255, 0)"); + const o = i.createLinearGradient(0, 0, 0, this.canvas.height); + o.addColorStop(0, "rgba(0, 0, 0, 0)"), o.addColorStop(1, + "rgba(0, 0, 0, 1)"), i.rect(0, 0, this.canvas.width, this.canvas.height), + i.fillStyle = Ce.Il.Format.CSS.format(t), i.fill(), i.fillStyle = n, + i.fill(), i.fillStyle = o, i.fill() + } + paintSelection(e, t) { + this.selection.style.left = e * this.width + "px", this.selection.style + .top = this.height - t * this.height + "px" + } + onDidChangeColor() { + this.monitor && this.monitor.isMonitoring() || this.paint() + } + } + class Me extends r.JT { + constructor(e, t) { + super(), this.model = t, this._onDidChange = new ye.Q5, this.onDidChange = + this._onDidChange.event, this._onColorFlushed = new ye.Q5, this.onColorFlushed = + this._onColorFlushed.event, this.domNode = c.R3(e, De(".strip")), + this.overlay = c.R3(this.domNode, De(".overlay")), this.slider = c.R3( + this.domNode, De(".slider")), this.slider.style.top = "0px", this._register( + c.Lo(this.domNode, (e => this.onMouseDown(e)))), this.layout() + } + layout() { + this.height = this.domNode.offsetHeight - this.slider.offsetHeight; + const e = this.getValue(this.model.color); + this.updateSliderPosition(e) + } + onMouseDown(e) { + const t = this._register(new Ne.Z), + i = c.i(this.domNode); + this.domNode.classList.add("grabbing"), e.target !== this.slider && + this.onDidChangeTop(e.offsetY), t.startMonitoring(e.target, e.buttons, + Ne.e, (e => this.onDidChangeTop(e.posy - i.top)), (() => null)); + const n = c.qV(document, (() => { + this._onColorFlushed.fire(), n.dispose(), t.stopMonitoring(!0), + this.domNode.classList.remove("grabbing") + }), !0) + } + onDidChangeTop(e) { + const t = Math.max(0, Math.min(1, 1 - e / this.height)); + this.updateSliderPosition(t), this._onDidChange.fire(t) + } + updateSliderPosition(e) { + this.slider.style.top = (1 - e) * this.height + "px" + } + } + class Ae extends Me { + constructor(e, t) { + super(e, t), this.domNode.classList.add("opacity-strip"), this._register( + t.onDidChangeColor(this.onDidChangeColor, this)), this.onDidChangeColor( + this.model.color) + } + onDidChangeColor(e) { + const { + r: t, + g: i, + b: n + } = e.rgba, o = new Ce.Il(new Ce.VS(t, i, n, 1)), r = new Ce.Il(new Ce + .VS(t, i, n, 0)); + this.overlay.style.background = + `linear-gradient(to bottom, ${o} 0%, ${r} 100%)` + } + getValue(e) { + return e.hsva.a + } + } + class Re extends Me { + constructor(e, t) { + super(e, t), this.domNode.classList.add("hue-strip") + } + getValue(e) { + return 1 - e.hsva.h / 360 + } + } + class Oe extends b.$ { + constructor(e, t, i, n) { + super(), this.model = t, this.pixelRatio = i, this._register((0, Le.fX) + ((() => this.layout()))); + const o = De(".colorpicker-widget"); + e.appendChild(o); + const r = new Ee(o, this.model, n); + this.body = new Ie(o, this.model, this.pixelRatio), this._register(r), + this._register(this.body) + } + layout() { + this.body.layout() + } + } + var Pe = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class Fe { + constructor(e, t, i, n) { + this.owner = e, this.range = t, this.model = i, this.provider = n, + this.forceShowAtRange = !0 + } + isValidForHoverAnchor(e) { + return 1 === e.type && this.range.startColumn <= e.range.startColumn && + this.range.endColumn >= e.range.endColumn + } + } + let Be = class { + constructor(e, t, i) { + this._editor = e, this._hover = t, this._themeService = i + } + computeSync(e, t) { + return [] + } + computeAsync(e, t, i) { + return Pe(this, void 0, void 0, (function*() { + if (!this._editor.hasModel()) return []; + const e = we.i.get(this._editor); + for (const i of t) { + const t = e.getColorData(i.range.getStartPosition()); + if (t) return [yield this._createColorHover(this._editor.getModel(), + t.colorInfo, t.provider)] + } + return [] + })) + } + _createColorHover(e, t, i) { + return Pe(this, void 0, void 0, (function*() { + const n = e.getValueInRange(t.range), + { + red: o, + green: r, + blue: s, + alpha: l + } = t.color, + d = new Ce.VS(Math.round(255 * o), Math.round(255 * r), Math.round( + 255 * s), l), + c = new Ce.Il(d), + h = yield(0, ve.R)(e, t, i, ie.T.None), + u = new Se(c, [], 0); + return u.colorPresentations = h || [], u.guessColorPresentation(c, + n), new Fe(this, a.e.lift(t.range), u, i) + })) + } + renderHoverParts(e, t, i) { + if (0 === e.length || !this._editor.hasModel()) return r.JT.None; + const n = new r.SL, + o = e[0], + s = this._editor.getModel(), + l = o.model, + d = n.add(new Oe(t, l, this._editor.getOption(128), this._themeService)); + let c = new a.e(o.range.startLineNumber, o.range.startColumn, o.range + .endLineNumber, o.range.endColumn); + const h = () => { + let e, t; + if (l.presentation.textEdit) { + e = [l.presentation.textEdit], t = new a.e(l.presentation.textEdit + .range.startLineNumber, l.presentation.textEdit.range.startColumn, + l.presentation.textEdit.range.endLineNumber, l.presentation.textEdit + .range.endColumn); + const i = this._editor.getModel()._setTrackedRange(null, t, 3); + this._editor.pushUndoStop(), this._editor.executeEdits( + "colorpicker", e), t = this._editor.getModel()._getTrackedRange( + i) || t + } else e = [{ + identifier: null, + range: c, + text: l.presentation.label, + forceMoveMarkers: !1 + }], t = c.setEndPosition(c.endLineNumber, c.startColumn + l.presentation + .label.length), this._editor.pushUndoStop(), this._editor.executeEdits( + "colorpicker", e); + l.presentation.additionalTextEdits && (e = [...l.presentation.additionalTextEdits], + this._editor.executeEdits("colorpicker", e), this._hover.hide()), + this._editor.pushUndoStop(), c = t + }, + u = e => (0, ve.R)(s, { + range: c, + color: { + red: e.rgba.r / 255, + green: e.rgba.g / 255, + blue: e.rgba.b / 255, + alpha: e.rgba.a + } + }, o.provider, ie.T.None).then((e => { + l.colorPresentations = e || [] + })); + return n.add(l.onColorFlushed((e => { + u(e).then(h) + }))), n.add(l.onDidChangeColor(u)), this._hover.setColorPicker(d), n + } + }; + var We, ze; + Be = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(We = 2, ze = $.XE, function(e, t) { + ze(e, t, We) + })], Be); + var Ve = i(1847), + He = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + Ue = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + je = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + const Ke = c.$; + let $e = class extends r.JT { + constructor(e) { + super(), this._keybindingService = e, this._hasContent = !1, this.hoverElement = + Ke("div.hover-row.status-bar"), this.actionsElement = c.R3(this.hoverElement, + Ke("div.actions")) + } + get hasContent() { + return this._hasContent + } + addAction(e) { + const t = this._keybindingService.lookupKeybinding(e.commandId), + i = t ? t.getLabel() : null; + return this._hasContent = !0, this._register(P.render(this.actionsElement, + e, i)) + } + append(e) { + const t = c.R3(this.actionsElement, e); + return this._hasContent = !0, t + } + }; + $e = He([Ue(0, Ve.d)], $e); + class qe { + constructor(e, t) { + this._participants = t, this._editor = e, this._result = [], this._anchor = + null + } + setAnchor(e) { + this._anchor = e, this._result = [] + } + clearResult() { + this._result = [] + } + static _getLineDecorations(e, t) { + if (1 !== t.type) return []; + const i = e.getModel(), + n = t.range.startLineNumber, + o = i.getLineMaxColumn(n); + return e.getLineDecorations(n).filter((e => { + if (e.options.isWholeLine) return !0; + const i = e.range.startLineNumber === n ? e.range.startColumn : 1, + r = e.range.endLineNumber === n ? e.range.endColumn : o; + return !(i > t.range.startColumn || t.range.endColumn > r) + })) + } + computeAsync(e) { + return je(this, void 0, void 0, (function*() { + const t = this._anchor; + if (!this._editor.hasModel() || !t) return Promise.resolve([]); + const i = qe._getLineDecorations(this._editor, t), + n = yield Promise.all(this._participants.map((n => this._computeAsync( + n, i, t, e)))); + return (0, _.xH)(n) + })) + } + _computeAsync(e, t, i, n) { + return je(this, void 0, void 0, (function*() { + return e.computeAsync ? e.computeAsync(i, t, n) : [] + })) + } + computeSync() { + if (!this._editor.hasModel() || !this._anchor) return []; + const e = qe._getLineDecorations(this._editor, this._anchor); + let t = []; + for (const i of this._participants) t = t.concat(i.computeSync(this._anchor, + e)); + return (0, _.kX)(t) + } + onResult(e, t) { + this._result = t ? e.concat(this._result) : this._result.concat(e) + } + getResult() { + return this._result.slice(0) + } + getResultWithLoadingMessage() { + if (this._anchor) + for (const e of this._participants) + if (e.createLoadingMessage) { + const t = e.createLoadingMessage(this._anchor); + if (t) return this._result.slice(0).concat([t]) + } + return this._result.slice(0) + } + } + let Ze = class e extends b.$ { + constructor(t, i, n, o) { + super(), this._hoverVisibleKey = i, this._keybindingService = o, this + .allowEditorOverflow = !0, this._participants = [n.createInstance(Be, + t, this), n.createInstance(le, t, this), n.createInstance(be, t, + this), n.createInstance(X, t, this)], this._hover = this._register( + new O), this._id = e.ID, this._editor = t, this._isVisible = !1, + this._stoleFocus = !1, this._renderDisposable = null, this.onkeydown( + this._hover.containerDomNode, (e => { + e.equals(9) && this.hide() + })), this._register(this._editor.onDidChangeConfiguration((e => { + e.hasChanged(42) && this._updateFont() + }))), this._editor.onDidLayoutChange((() => this.layout())), this.layout(), + this._editor.addContentWidget(this), this._showAtPosition = null, + this._showAtRange = null, this._stoleFocus = !1, this._messages = [], + this._lastAnchor = null, this._computer = new qe(this._editor, this._participants), + this._highlightDecorations = [], this._isChangingDecorations = !1, + this._shouldFocus = !1, this._colorPicker = null, this._hoverOperation = + new f(this._computer, (e => this._withResult(e, !0)), null, (e => + this._withResult(e, !1)), this._editor.getOption(52).delay), this._register( + c.mu(this.getDomNode(), c.tw.FOCUS, (() => { + this._colorPicker && this.getDomNode().classList.add( + "colorpicker-hover") + }))), this._register(c.mu(this.getDomNode(), c.tw.BLUR, (() => { + this.getDomNode().classList.remove("colorpicker-hover") + }))), this._register(t.onDidChangeConfiguration((() => { + this._hoverOperation.setHoverTime(this._editor.getOption(52).delay) + }))), this._register(g.RW.onDidChange((() => { + this._isVisible && this._lastAnchor && this._messages.length > 0 && + (this._hover.contentsDomNode.textContent = "", this._renderMessages( + this._lastAnchor, this._messages)) + }))) + } + dispose() { + this._hoverOperation.cancel(), this._editor.removeContentWidget(this), + super.dispose() + } + getId() { + return this._id + } + getDomNode() { + return this._hover.containerDomNode + } + _shouldShowAt(e) { + const t = e.target.type; + if (6 === t) return !0; + if (7 === t) { + const t = this._editor.getOption(42).typicalHalfwidthCharacterWidth / + 2, + i = e.target.detail; + if (i && !i.isAfterLines && "number" == typeof i.horizontalDistanceToText && + i.horizontalDistanceToText < t) return !0 + } + return !1 + } + maybeShowAt(e) { + var t; + const i = []; + for (const t of this._participants) + if ("function" == typeof t.suggestHoverAnchor) { + const n = t.suggestHoverAnchor(e); + n && i.push(n) + } + if (this._shouldShowAt(e) && e.target.range) { + const n = [...(null === (t = e.target.element) || void 0 === t ? + void 0 : t.classList.values()) || []].find((e => e.startsWith( + "ced-colorBox"))) && e.target.range.endColumn - e.target.range.startColumn == + 1 ? new a.e(e.target.range.startLineNumber, e.target.range.startColumn + + 1, e.target.range.endLineNumber, e.target.range.endColumn + 1) : e + .target.range; + i.push(new de(0, n)) + } + return 0 !== i.length && (i.sort(((e, t) => t.priority - e.priority)), + this._startShowingAt(i[0], 0, !1), !0) + } + _showAt(e, t, i) { + this._showAtPosition = e, this._showAtRange = t, this._hoverVisibleKey + .set(!0), this._isVisible = !0, this._hover.containerDomNode.classList + .toggle("hidden", !this._isVisible), this._editor.layoutContentWidget( + this), this._editor.render(), this._stoleFocus = i, i && this._hover + .containerDomNode.focus() + } + getPosition() { + return this._isVisible ? { + position: this._showAtPosition, + range: this._showAtRange, + preference: [1, 2] + } : null + } + _updateFont() { + Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName( + "code")).forEach((e => this._editor.applyFontInfo(e))) + } + _updateContents(e) { + this._hover.contentsDomNode.textContent = "", this._hover.contentsDomNode + .appendChild(e), this._updateFont(), this._editor.layoutContentWidget( + this), this._hover.onContentsChanged() + } + layout() { + const e = Math.max(this._editor.getLayoutInfo().height / 4, 250), + { + fontSize: t, + lineHeight: i + } = this._editor.getOption(42); + this._hover.contentsDomNode.style.fontSize = `${t}px`, this._hover.contentsDomNode + .style.lineHeight = `${i}px`, this._hover.contentsDomNode.style.maxHeight = + `${e}px`, this._hover.contentsDomNode.style.maxWidth = + `${Math.max(.66*this._editor.getLayoutInfo().width,500)}px` + } + onModelDecorationsChanged() { + this._isChangingDecorations || this._isVisible && (this._hoverOperation + .cancel(), this._computer.clearResult(), this._colorPicker || this._hoverOperation + .start(0)) + } + startShowingAtRange(e, t, i) { + this._startShowingAt(new de(0, e), t, i) + } + _startShowingAt(e, t, i) { + if (!this._lastAnchor || !this._lastAnchor.equals(e)) { + if (this._hoverOperation.cancel(), this._isVisible) + if (this._showAtPosition && this._lastAnchor && e.canAdoptVisibleHover( + this._lastAnchor, this._showAtPosition)) { + const t = this._messages.filter((t => t.isValidForHoverAnchor(e))); + if (0 === t.length) this.hide(); + else { + if (t.length === this._messages.length) return; + this._renderMessages(e, t) + } + } else this.hide(); + this._lastAnchor = e, this._computer.setAnchor(e), this._shouldFocus = + i, this._hoverOperation.start(t) + } + } + hide() { + this._lastAnchor = null, this._hoverOperation.cancel(), this._isVisible && + (setTimeout((() => { + this._isVisible || this._hoverVisibleKey.set(!1) + }), 0), this._isVisible = !1, this._hover.containerDomNode.classList + .toggle("hidden", !this._isVisible), this._editor.layoutContentWidget( + this), this._stoleFocus && this._editor.focus()), this._isChangingDecorations = ! + 0, this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, []), + this._isChangingDecorations = !1, this._renderDisposable && (this._renderDisposable + .dispose(), this._renderDisposable = null), this._colorPicker = + null + } + isColorPickerVisible() { + return !!this._colorPicker + } + setColorPicker(e) { + this._colorPicker = e + } + onContentsChanged() { + this._hover.onContentsChanged() + } + _withResult(e, t) { + this._messages = e, this._lastAnchor && this._messages.length > 0 ? + this._renderMessages(this._lastAnchor, this._messages) : t && this.hide() + } + _renderMessages(t, i) { + this._renderDisposable && (this._renderDisposable.dispose(), this._renderDisposable = + null), this._colorPicker = null; + let n = 1073741824, + o = i[0].range, + s = null, + l = document.createDocumentFragment(); + const d = new r.SL, + c = new Map; + for (const e of i) n = Math.min(n, e.range.startColumn), o = a.e.plusRange( + o, e.range), e.forceShowAtRange && (s = e.range), c.has(e.owner) || + c.set(e.owner, []), c.get(e.owner).push(e); + const u = d.add(new $e(this._keybindingService)); + for (const [e, t] of c) d.add(e.renderHoverParts(t, l, u)); + u.hasContent && l.appendChild(u.hoverElement), this._renderDisposable = + d, l.hasChildNodes() && (s ? this._showAt(s.getStartPosition(), s, + this._shouldFocus) : this._showAt(new h.L(t.range.startLineNumber, + n), o, this._shouldFocus), this._updateContents(l)), this._colorPicker && + this._colorPicker.layout(), this._isChangingDecorations = !0, this._highlightDecorations = + this._editor.deltaDecorations(this._highlightDecorations, o ? [{ + range: o, + options: e._DECORATION_OPTIONS + }] : []), this._isChangingDecorations = !1 + } + }; + Ze.ID = "editor.contrib.modesContentHoverWidget", Ze._DECORATION_OPTIONS = + u.qx.register({ + description: "content-hover-highlight", + className: "hoverHighlight" + }), Ze = He([Ue(2, J.TG), Ue(3, Ve.d)], Ze); + class Ge extends b.$ { + constructor(e, t) { + super(), this._id = e, this._editor = t, this._isVisible = !1, this._domNode = + document.createElement("div"), this._domNode.className = + "monaco-hover hidden", this._domNode.setAttribute("aria-hidden", + "true"), this._domNode.setAttribute("role", "tooltip"), this._showAtLineNumber = - + 1, this._register(this._editor.onDidChangeConfiguration((e => { + e.hasChanged(42) && this.updateFont() + }))), this._editor.addOverlayWidget(this) + } + get isVisible() { + return this._isVisible + } + set isVisible(e) { + this._isVisible = e, this._domNode.classList.toggle("hidden", !this._isVisible) + } + getId() { + return this._id + } + getDomNode() { + return this._domNode + } + showAt(e) { + this._showAtLineNumber = e, this.isVisible || (this.isVisible = !0); + const t = this._editor.getLayoutInfo(), + i = this._editor.getTopForLineNumber(this._showAtLineNumber), + n = this._editor.getScrollTop(), + o = this._editor.getOption(58), + r = i - n - (this._domNode.clientHeight - o) / 2; + this._domNode.style.left = + `${t.glyphMarginLeft+t.glyphMarginWidth}px`, this._domNode.style.top = + `${Math.max(Math.round(r),0)}px` + } + hide() { + this.isVisible && (this.isVisible = !1) + } + getPosition() { + return null + } + dispose() { + this._editor.removeOverlayWidget(this), super.dispose() + } + updateFont() { + [...Array.prototype.slice.call(this._domNode.getElementsByTagName( + "code")), ...Array.prototype.slice.call(this._domNode.getElementsByClassName( + "code"))].forEach((e => this._editor.applyFontInfo(e))) + } + updateContents(e) { + this._domNode.textContent = "", this._domNode.appendChild(e), this.updateFont() + } + } + class Ye { + constructor(e) { + this._editor = e, this._lineNumber = -1, this._result = [] + } + setLineNumber(e) { + this._lineNumber = e, this._result = [] + } + clearResult() { + this._result = [] + } + computeSync() { + const e = e => ({ + value: e + }), + t = this._editor.getLineDecorations(this._lineNumber), + i = []; + if (!t) return i; + for (const n of t) { + if (!n.options.glyphMarginClassName) continue; + const t = n.options.glyphMarginHoverMessage; + t && !(0, ee.CP)(t) && i.push(...(0, _._2)(t).map(e)) + } + return i + } + onResult(e, t) { + this._result = this._result.concat(e) + } + getResult() { + return this._result + } + getResultWithLoadingMessage() { + return this.getResult() + } + } + class Qe extends Ge { + constructor(e, t, i = z.SW) { + super(Qe.ID, e), this._renderDisposeables = this._register(new r.SL), + this._messages = [], this._lastLineNumber = -1, this._markdownRenderer = + this._register(new te.$({ + editor: this._editor + }, t, i)), this._computer = new Ye(this._editor), this._hoverOperation = + new f(this._computer, (e => this._withResult(e)), void 0, (e => this._withResult( + e)), 300) + } + dispose() { + this._hoverOperation.cancel(), super.dispose() + } + onModelDecorationsChanged() { + this.isVisible && (this._hoverOperation.cancel(), this._computer.clearResult(), + this._hoverOperation.start(0)) + } + startShowingAt(e) { + this._lastLineNumber !== e && (this._hoverOperation.cancel(), this.hide(), + this._lastLineNumber = e, this._computer.setLineNumber(e), this._hoverOperation + .start(0)) + } + hide() { + this._lastLineNumber = -1, this._hoverOperation.cancel(), super.hide() + } + _withResult(e) { + this._messages = e, this._messages.length > 0 ? this._renderMessages( + this._lastLineNumber, this._messages) : this.hide() + } + _renderMessages(e, t) { + this._renderDisposeables.clear(); + const i = document.createDocumentFragment(); + for (const e of t) { + const t = this._markdownRenderer.render(e.value); + this._renderDisposeables.add(t), i.appendChild((0, c.$)( + "div.hover-row", void 0, t.element)) + } + this.updateContents(i), this.showAt(e) + } + } + Qe.ID = "editor.contrib.modesGlyphHoverWidget"; + var Xe = i(5389), + Je = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let et = class e { + constructor(e, t, i, n, o) { + this._editor = e, this._instantiationService = t, this._openerService = + i, this._modeService = n, this._toUnhook = new r.SL, this._isMouseDown = ! + 1, this._hoverClicked = !1, this._contentWidget = null, this._glyphWidget = + null, this._hookEvents(), this._didChangeConfigurationHandler = this + ._editor.onDidChangeConfiguration((e => { + e.hasChanged(52) && (this._unhookEvents(), this._hookEvents()) + })), this._hoverVisibleKey = l.u.hoverVisible.bindTo(o) + } + static get(t) { + return t.getContribution(e.ID) + } + _hookEvents() { + const e = () => this._hideWidgets(), + t = this._editor.getOption(52); + this._isHoverEnabled = t.enabled, this._isHoverSticky = t.sticky, + this._isHoverEnabled ? (this._toUnhook.add(this._editor.onMouseDown( + (e => this._onEditorMouseDown(e)))), this._toUnhook.add(this._editor + .onMouseUp((e => this._onEditorMouseUp(e)))), this._toUnhook.add( + this._editor.onMouseMove((e => this._onEditorMouseMove(e)))), this + ._toUnhook.add(this._editor.onKeyDown((e => this._onKeyDown(e)))), + this._toUnhook.add(this._editor.onDidChangeModelDecorations((() => + this._onModelDecorationsChanged())))) : (this._toUnhook.add(this._editor + .onMouseMove((e => this._onEditorMouseMove(e)))), this._toUnhook.add( + this._editor.onKeyDown((e => this._onKeyDown(e))))), this._toUnhook + .add(this._editor.onMouseLeave(e)), this._toUnhook.add(this._editor.onDidChangeModel( + e)), this._toUnhook.add(this._editor.onDidScrollChange((e => this._onEditorScrollChanged( + e)))) + } + _unhookEvents() { + this._toUnhook.clear() + } + _onModelDecorationsChanged() { + var e, t; + null === (e = this._contentWidget) || void 0 === e || e.onModelDecorationsChanged(), + null === (t = this._glyphWidget) || void 0 === t || t.onModelDecorationsChanged() + } + _onEditorScrollChanged(e) { + (e.scrollTopChanged || e.scrollLeftChanged) && this._hideWidgets() + } + _onEditorMouseDown(e) { + this._isMouseDown = !0; + const t = e.target.type; + 9 !== t || e.target.detail !== Ze.ID ? 12 === t && e.target.detail === + Qe.ID || (12 !== t && e.target.detail !== Qe.ID && (this._hoverClicked = ! + 1), this._hideWidgets()) : this._hoverClicked = !0 + } + _onEditorMouseUp(e) { + this._isMouseDown = !1 + } + _onEditorMouseMove(e) { + var t, i, n, o, r; + let s = e.target.type; + if ((!this._isMouseDown || !this._hoverClicked) && (!this._isHoverSticky || + 9 !== s || e.target.detail !== Ze.ID) && (!this._isHoverSticky || ( + null === (i = null === (t = e.event.browserEvent.view) || void 0 === + t ? void 0 : t.getSelection()) || void 0 === i ? void 0 : i.isCollapsed + )) && (this._isHoverSticky || 9 !== s || e.target.detail !== Ze.ID || + !(null === (n = this._contentWidget) || void 0 === n ? void 0 : n.isColorPickerVisible()) + ) && (!this._isHoverSticky || 12 !== s || e.target.detail !== Qe.ID)) { + if (this._isHoverEnabled) return this._getOrCreateContentWidget().maybeShowAt( + e) ? void(null === (o = this._glyphWidget) || void 0 === o || o.hide()) : + 2 === s && e.target.position ? (null === (r = this._contentWidget) || + void 0 === r || r.hide(), this._glyphWidget || (this._glyphWidget = + new Qe(this._editor, this._modeService, this._openerService)), + void this._glyphWidget.startShowingAt(e.target.position.lineNumber) + ) : void this._hideWidgets(); + this._hideWidgets() + } + } + _onKeyDown(e) { + 5 !== e.keyCode && 6 !== e.keyCode && 57 !== e.keyCode && 4 !== e.keyCode && + this._hideWidgets() + } + _hideWidgets() { + var e, t, i; + this._isMouseDown && this._hoverClicked && (null === (e = this._contentWidget) || + void 0 === e ? void 0 : e.isColorPickerVisible()) || (this._hoverClicked = ! + 1, null === (t = this._glyphWidget) || void 0 === t || t.hide(), + null === (i = this._contentWidget) || void 0 === i || i.hide()) + } + _getOrCreateContentWidget() { + return this._contentWidget || (this._contentWidget = this._instantiationService + .createInstance(Ze, this._editor, this._hoverVisibleKey)), this._contentWidget + } + isColorPickerVisible() { + var e; + return (null === (e = this._contentWidget) || void 0 === e ? void 0 : + e.isColorPickerVisible()) || !1 + } + showContentHover(e, t, i) { + this._getOrCreateContentWidget().startShowingAtRange(e, t, i) + } + dispose() { + var e, t; + this._unhookEvents(), this._toUnhook.dispose(), this._didChangeConfigurationHandler + .dispose(), null === (e = this._glyphWidget) || void 0 === e || e.dispose(), + null === (t = this._contentWidget) || void 0 === t || t.dispose() + } + }; + et.ID = "editor.contrib.hover", et = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([Je(1, J.TG), Je(2, z.v4), Je(3, d.h), Je(4, pe.i6)], et); + class tt extends s.R6 { + constructor() { + super({ + id: "editor.action.showHover", + label: n.N({ + key: "showHover", + comment: [ + "Label for action that will trigger the showing of a hover in the editor.", + "This allows for users to show the hover without using the mouse." + ] + }, "Show Hover"), + alias: "Show Hover", + precondition: void 0, + kbOpts: { + kbExpr: l.u.editorTextFocus, + primary: (0, o.gx)(2089, 2087), + weight: 100 + } + }) + } + run(e, t) { + if (!t.hasModel()) return; + let i = et.get(t); + if (!i) return; + const n = t.getPosition(), + o = new a.e(n.lineNumber, n.column, n.lineNumber, n.column), + r = 2 === t.getOption(2); + i.showContentHover(o, 1, r) + } + } + class it extends s.R6 { + constructor() { + super({ + id: "editor.action.showDefinitionPreviewHover", + label: n.N({ + key: "showDefinitionPreviewHover", + comment: [ + "Label for action that will trigger the showing of definition preview hover in the editor.", + "This allows for users to show the definition preview hover without using the mouse." + ] + }, "Show Definition Preview Hover"), + alias: "Show Definition Preview Hover", + precondition: void 0 + }) + } + run(e, t) { + let i = et.get(t); + if (!i) return; + const n = t.getPosition(); + if (!n) return; + const o = new a.e(n.lineNumber, n.column, n.lineNumber, n.column); + Xe.GotoDefinitionAtPositionEditorContribution.get(t).startFindDefinitionFromCursor( + n).then((() => { + i.showContentHover(o, 1, !0) + })) + } + }(0, s._K)(et.ID, et), (0, s.Qr)(tt), (0, s.Qr)(it), (0, $.Ic)(((e, t) => { + const i = e.getColor(q.pt); + i && t.addRule( + `.monaco-editor .hoverHighlight { background-color: ${i}; }`); + const n = e.getColor(q.yJ); + n && t.addRule( + `.monaco-editor .monaco-hover { background-color: ${n}; }`); + const o = e.getColor(q.CN); + o && (t.addRule( + `.monaco-editor .monaco-hover { border: 1px solid ${o}; }`), t.addRule( + `.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${o.transparent(.5)}; }` + ), t.addRule( + `.monaco-editor .monaco-hover hr { border-top: 1px solid ${o.transparent(.5)}; }` + ), t.addRule( + `.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${o.transparent(.5)}; }` + )); + const r = e.getColor(q.ur); + r && t.addRule(`.monaco-editor .monaco-hover a { color: ${r}; }`); + const s = e.getColor(q.sg); + s && t.addRule( + `.monaco-editor .monaco-hover a:hover { color: ${s}; }`); + const a = e.getColor(q.Sb); + a && t.addRule(`.monaco-editor .monaco-hover { color: ${a}; }`); + const l = e.getColor(q.Lo); + l && t.addRule( + `.monaco-editor .monaco-hover .hover-row .actions { background-color: ${l}; }` + ); + const d = e.getColor(q.Sw); + d && t.addRule( + `.monaco-editor .monaco-hover code { background-color: ${d}; }`) + })) + }, + 3554: (e, t, i) => { + "use strict"; + i.r(t); + var n = i(3580), + o = i(4314), + r = i(3860), + s = i(9102), + a = i(6830), + l = i(469); + class d { + constructor(e, t, i) { + this._editRange = e, this._originalSelection = t, this._text = i + } + getEditOperations(e, t) { + t.addTrackedEditOperation(this._editRange, this._text) + } + computeCursorState(e, t) { + const i = t.getInverseEditOperations()[0].range; + return this._originalSelection.isEmpty() ? new r.Y(i.endLineNumber, + Math.min(this._originalSelection.positionColumn, i.endColumn), i.endLineNumber, + Math.min(this._originalSelection.positionColumn, i.endColumn)) : new r + .Y(i.endLineNumber, i.endColumn - this._text.length, i.endLineNumber, + i.endColumn) + } + } + var c = i(9925), + h = i(7781), + u = i(7869), + g = i(6281), + p = i(5393), + m = i(7301); + let f = class e { + constructor(e, t) { + this.decorationIds = [], this.editor = e, this.editorWorkerService = + t + } + static get(t) { + return t.getContribution(e.ID) + } + dispose() {} + run(t, i) { + this.currentRequest && this.currentRequest.cancel(); + const n = this.editor.getSelection(), + s = this.editor.getModel(); + if (!s || !n) return; + let a = n; + if (a.startLineNumber !== a.endLineNumber) return; + const l = new c.yy(this.editor, 5), + h = s.uri; + return this.editorWorkerService.canNavigateValueSet(h) ? (this.currentRequest = + (0, p.PG)((e => this.editorWorkerService.navigateValueSet(h, a, i))), + this.currentRequest.then((i => { + if (!i || !i.range || !i.value) return; + if (!l.validate(this.editor)) return; + let n = o.e.lift(i.range), + s = i.range, + c = i.value.length - (a.endColumn - a.startColumn); + s = { + startLineNumber: s.startLineNumber, + startColumn: s.startColumn, + endLineNumber: s.endLineNumber, + endColumn: s.startColumn + i.value.length + }, c > 1 && (a = new r.Y(a.startLineNumber, a.startColumn, a.endLineNumber, + a.endColumn + c - 1)); + const h = new d(n, a, i.value); + this.editor.pushUndoStop(), this.editor.executeCommand(t, h), + this.editor.pushUndoStop(), this.decorationIds = this.editor.deltaDecorations( + this.decorationIds, [{ + range: s, + options: e.DECORATION + }]), this.decorationRemover && this.decorationRemover.cancel(), + this.decorationRemover = (0, p.Vs)(350), this.decorationRemover + .then((() => this.decorationIds = this.editor.deltaDecorations( + this.decorationIds, []))).catch(m.dL) + })).catch(m.dL)) : Promise.resolve(void 0) + } + }; + var _, b; + f.ID = "editor.contrib.inPlaceReplaceController", f.DECORATION = g.qx.register({ + description: "in-place-replace", + className: "valueSetReplacement" + }), f = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(_ = 1, b = l.p, function(e, t) { + b(e, t, _) + })], f); + class v extends a.R6 { + constructor() { + super({ + id: "editor.action.inPlaceReplace.up", + label: n.N("InPlaceReplaceAction.previous.label", + "Replace with Previous Value"), + alias: "Replace with Previous Value", + precondition: s.u.writable, + kbOpts: { + kbExpr: s.u.editorTextFocus, + primary: 3154, + weight: 100 + } + }) + } + run(e, t) { + const i = f.get(t); + return i ? i.run(this.id, !0) : Promise.resolve(void 0) + } + } + class w extends a.R6 { + constructor() { + super({ + id: "editor.action.inPlaceReplace.down", + label: n.N("InPlaceReplaceAction.next.label", + "Replace with Next Value"), + alias: "Replace with Next Value", + precondition: s.u.writable, + kbOpts: { + kbExpr: s.u.editorTextFocus, + primary: 3156, + weight: 100 + } + }) + } + run(e, t) { + const i = f.get(t); + return i ? i.run(this.id, !1) : Promise.resolve(void 0) + } + }(0, a._K)(f.ID, f), (0, a.Qr)(v), (0, a.Qr)(w), (0, h.Ic)(((e, t) => { + const i = e.getColor(u.Dl); + i && t.addRule( + `.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${i}; }` + ) + })) + }, + 1491: (e, t, i) => { + "use strict"; + + function n(e, t) { + let i = 0; + for (let n = 0; n < e.length; n++) "\t" === e.charAt(n) ? i += t : i++; + return i + } + + function o(e, t, i) { + e = e < 0 ? 0 : e; + let n = ""; + if (!i) { + let i = Math.floor(e / t); + e %= t; + for (let e = 0; e < i; e++) n += "\t" + } + for (let t = 0; t < e; t++) n += " "; + return n + } + i.d(t, { + Y: () => n, + J: () => o + }) + }, + 638: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + getReindentEditOperations: () => _, + IndentationToSpacesAction: () => b, + IndentationToTabsAction: () => v, + ChangeIndentationSizeAction: () => w, + IndentUsingTabs: () => C, + IndentUsingSpaces: () => y, + DetectIndentation: () => S, + ReindentLinesAction: () => x, + ReindentSelectedLinesAction: () => k, + AutoIndentOnPasteCommand: () => L, + AutoIndentOnPaste: () => N, + IndentationToSpacesCommand: () => E, + IndentationToTabsCommand: () => I + }); + var n = i(3580), + o = i(5976), + r = i(7295), + s = i(6830), + a = i(291), + l = i(9386), + d = i(4314), + c = i(3860), + h = i(9102), + u = i(6281), + g = i(3831), + p = i(1200), + m = i(1491), + f = i(1157); + + function _(e, t, i, n) { + if (1 === e.getLineCount() && 1 === e.getLineMaxColumn(1)) return []; + let o = g.zu.getIndentationRules(e.getLanguageIdentifier().id); + if (!o) return []; + for (i = Math.min(i, e.getLineCount()); t <= i && o.unIndentedLinePattern;) { + let i = e.getLineContent(t); + if (!o.unIndentedLinePattern.test(i)) break; + t++ + } + if (t > i - 1) return []; + const { + tabSize: s, + indentSize: d, + insertSpaces: h + } = e.getOptions(), p = (e, t) => (t = t || 1, a.U.shiftIndent(e, e.length + + t, s, d, h)), m = (e, t) => (t = t || 1, a.U.unshiftIndent(e, e.length + + t, s, d, h)); + let f, _ = [], + b = e.getLineContent(t), + v = b; + if (null != n) { + f = n; + let e = r.V8(b); + v = f + b.substring(e.length), o.decreaseIndentPattern && o.decreaseIndentPattern + .test(v) && (f = m(f), v = f + b.substring(e.length)), b !== v && _.push( + l.h.replaceMove(new c.Y(t, 1, t, e.length + 1), u.yO.normalizeIndentation( + f, d, h))) + } else f = r.V8(b); + let w = f; + o.increaseIndentPattern && o.increaseIndentPattern.test(v) ? (w = p(w), + f = p(f)) : o.indentNextLinePattern && o.indentNextLinePattern.test(v) && + (w = p(w)); + for (let n = ++t; n <= i; n++) { + let t = e.getLineContent(n), + i = r.V8(t), + s = w + t.substring(i.length); + o.decreaseIndentPattern && o.decreaseIndentPattern.test(s) && (w = m(w), + f = m(f)), i !== w && _.push(l.h.replaceMove(new c.Y(n, 1, n, i.length + + 1), u.yO.normalizeIndentation(w, d, h))), o.unIndentedLinePattern && + o.unIndentedLinePattern.test(t) || (o.increaseIndentPattern && o.increaseIndentPattern + .test(s) ? (f = p(f), w = f) : w = o.indentNextLinePattern && o.indentNextLinePattern + .test(s) ? p(w) : f) + } + return _ + } + class b extends s.R6 { + constructor() { + super({ + id: b.ID, + label: n.N("indentationToSpaces", "Convert Indentation to Spaces"), + alias: "Convert Indentation to Spaces", + precondition: h.u.writable + }) + } + run(e, t) { + let i = t.getModel(); + if (!i) return; + let n = i.getOptions(), + o = t.getSelection(); + if (!o) return; + const r = new E(o, n.tabSize); + t.pushUndoStop(), t.executeCommands(this.id, [r]), t.pushUndoStop(), + i.updateOptions({ + insertSpaces: !0 + }) + } + } + b.ID = "editor.action.indentationToSpaces"; + class v extends s.R6 { + constructor() { + super({ + id: v.ID, + label: n.N("indentationToTabs", "Convert Indentation to Tabs"), + alias: "Convert Indentation to Tabs", + precondition: h.u.writable + }) + } + run(e, t) { + let i = t.getModel(); + if (!i) return; + let n = i.getOptions(), + o = t.getSelection(); + if (!o) return; + const r = new I(o, n.tabSize); + t.pushUndoStop(), t.executeCommands(this.id, [r]), t.pushUndoStop(), + i.updateOptions({ + insertSpaces: !1 + }) + } + } + v.ID = "editor.action.indentationToTabs"; + class w extends s.R6 { + constructor(e, t) { + super(t), this.insertSpaces = e + } + run(e, t) { + const i = e.get(f.eJ), + o = e.get(p.q); + let r = t.getModel(); + if (!r) return; + let s = o.getCreationOptions(r.getLanguageIdentifier().language, r.uri, + r.isForSimpleWidget); + const a = [1, 2, 3, 4, 5, 6, 7, 8].map((e => ({ + id: e.toString(), + label: e.toString(), + description: e === s.tabSize ? n.N("configuredTabSize", + "Configured Tab Size") : void 0 + }))), + l = Math.min(r.getOptions().tabSize - 1, 7); + setTimeout((() => { + i.pick(a, { + placeHolder: n.N({ + key: "selectTabWidth", + comment: ["Tab corresponds to the tab key"] + }, "Select Tab Size for Current File"), + activeItem: a[l] + }).then((e => { + e && r && !r.isDisposed() && r.updateOptions({ + tabSize: parseInt(e.label, 10), + insertSpaces: this.insertSpaces + }) + })) + }), 50) + } + } + class C extends w { + constructor() { + super(!1, { + id: C.ID, + label: n.N("indentUsingTabs", "Indent Using Tabs"), + alias: "Indent Using Tabs", + precondition: void 0 + }) + } + } + C.ID = "editor.action.indentUsingTabs"; + class y extends w { + constructor() { + super(!0, { + id: y.ID, + label: n.N("indentUsingSpaces", "Indent Using Spaces"), + alias: "Indent Using Spaces", + precondition: void 0 + }) + } + } + y.ID = "editor.action.indentUsingSpaces"; + class S extends s.R6 { + constructor() { + super({ + id: S.ID, + label: n.N("detectIndentation", "Detect Indentation from Content"), + alias: "Detect Indentation from Content", + precondition: void 0 + }) + } + run(e, t) { + const i = e.get(p.q); + let n = t.getModel(); + if (!n) return; + let o = i.getCreationOptions(n.getLanguageIdentifier().language, n.uri, + n.isForSimpleWidget); + n.detectIndentation(o.insertSpaces, o.tabSize) + } + } + S.ID = "editor.action.detectIndentation"; + class x extends s.R6 { + constructor() { + super({ + id: "editor.action.reindentlines", + label: n.N("editor.reindentlines", "Reindent Lines"), + alias: "Reindent Lines", + precondition: h.u.writable + }) + } + run(e, t) { + let i = t.getModel(); + if (!i) return; + let n = _(i, 1, i.getLineCount()); + n.length > 0 && (t.pushUndoStop(), t.executeEdits(this.id, n), t.pushUndoStop()) + } + } + class k extends s.R6 { + constructor() { + super({ + id: "editor.action.reindentselectedlines", + label: n.N("editor.reindentselectedlines", + "Reindent Selected Lines"), + alias: "Reindent Selected Lines", + precondition: h.u.writable + }) + } + run(e, t) { + let i = t.getModel(); + if (!i) return; + let n = t.getSelections(); + if (null === n) return; + let o = []; + for (let e of n) { + let t = e.startLineNumber, + n = e.endLineNumber; + if (t !== n && 1 === e.endColumn && n--, 1 === t) { + if (t === n) continue + } else t--; + let r = _(i, t, n); + o.push(...r) + } + o.length > 0 && (t.pushUndoStop(), t.executeEdits(this.id, o), t.pushUndoStop()) + } + } + class L { + constructor(e, t) { + this._initialSelection = t, this._edits = [], this._selectionId = null; + for (let t of e) t.range && "string" == typeof t.text && this._edits.push( + t) + } + getEditOperations(e, t) { + for (let e of this._edits) t.addEditOperation(d.e.lift(e.range), e.text); + let i = !1; + Array.isArray(this._edits) && 1 === this._edits.length && this._initialSelection + .isEmpty() && (this._edits[0].range.startColumn === this._initialSelection + .endColumn && this._edits[0].range.startLineNumber === this._initialSelection + .endLineNumber ? (i = !0, this._selectionId = t.trackSelection(this._initialSelection, ! + 0)) : this._edits[0].range.endColumn === this._initialSelection.startColumn && + this._edits[0].range.endLineNumber === this._initialSelection.startLineNumber && + (i = !0, this._selectionId = t.trackSelection(this._initialSelection, ! + 1))), i || (this._selectionId = t.trackSelection(this._initialSelection)) + } + computeCursorState(e, t) { + return t.getTrackedSelection(this._selectionId) + } + } + class N { + constructor(e) { + this.callOnDispose = new o.SL, this.callOnModel = new o.SL, this.editor = + e, this.callOnDispose.add(e.onDidChangeConfiguration((() => this.update()))), + this.callOnDispose.add(e.onDidChangeModel((() => this.update()))), + this.callOnDispose.add(e.onDidChangeModelLanguage((() => this.update()))) + } + update() { + this.callOnModel.clear(), this.editor.getOption(9) < 4 || this.editor.getOption( + 46) || this.editor.hasModel() && this.callOnModel.add(this.editor.onDidPaste( + (({ + range: e + }) => { + this.trigger(e) + }))) + } + trigger(e) { + let t = this.editor.getSelections(); + if (null === t || t.length > 1) return; + const i = this.editor.getModel(); + if (!i) return; + if (!i.isCheapToTokenize(e.getStartPosition().lineNumber)) return; + const n = this.editor.getOption(9), + { + tabSize: o, + indentSize: s, + insertSpaces: l + } = i.getOptions(); + let c = [], + h = { + shiftIndent: e => a.U.shiftIndent(e, e.length + 1, o, s, l), + unshiftIndent: e => a.U.unshiftIndent(e, e.length + 1, o, s, l) + }, + u = e.startLineNumber; + for (; u <= e.endLineNumber && this.shouldIgnoreLine(i, u);) u++; + if (u > e.endLineNumber) return; + let p = i.getLineContent(u); + if (!/\S/.test(p.substring(0, e.startColumn - 1))) { + let e = g.zu.getGoodIndentForLine(n, i, i.getLanguageIdentifier().id, + u, h); + if (null !== e) { + let t = r.V8(p), + n = m.Y(e, o); + if (n !== m.Y(t, o)) { + let e = m.J(n, o, l); + c.push({ + range: new d.e(u, 1, u, t.length + 1), + text: e + }), p = e + p.substr(t.length) + } else { + let e = g.zu.getIndentMetadata(i, u); + if (0 === e || 8 === e) return + } + } + } + const f = u; + for (; u < e.endLineNumber && !/\S/.test(i.getLineContent(u + 1));) u++; + if (u !== e.endLineNumber) { + let t = { + getLineTokens: e => i.getLineTokens(e), + getLanguageIdentifier: () => i.getLanguageIdentifier(), + getLanguageIdAtPosition: (e, t) => i.getLanguageIdAtPosition(e, t), + getLineContent: e => e === f ? p : i.getLineContent(e) + }, + s = g.zu.getGoodIndentForLine(n, t, i.getLanguageIdentifier().id, u + + 1, h); + if (null !== s) { + let t = m.Y(s, o), + n = m.Y(r.V8(i.getLineContent(u + 1)), o); + if (t !== n) { + let s = t - n; + for (let t = u + 1; t <= e.endLineNumber; t++) { + let e = i.getLineContent(t), + n = r.V8(e), + a = m.Y(n, o) + s, + h = m.J(a, o, l); + h !== n && c.push({ + range: new d.e(t, 1, t, n.length + 1), + text: h + }) + } + } + } + } + if (c.length > 0) { + this.editor.pushUndoStop(); + let e = new L(c, this.editor.getSelection()); + this.editor.executeCommand("autoIndentOnPaste", e), this.editor.pushUndoStop() + } + } + shouldIgnoreLine(e, t) { + e.forceTokenization(t); + let i = e.getLineFirstNonWhitespaceColumn(t); + if (0 === i) return !0; + let n = e.getLineTokens(t); + if (n.getCount() > 0) { + let e = n.findTokenIndexAtOffset(i); + if (e >= 0 && 1 === n.getStandardTokenType(e)) return !0 + } + return !1 + } + dispose() { + this.callOnDispose.dispose(), this.callOnModel.dispose() + } + } + + function D(e, t, i, n) { + if (1 === e.getLineCount() && 1 === e.getLineMaxColumn(1)) return; + let o = ""; + for (let e = 0; e < i; e++) o += " "; + let r = new RegExp(o, "gi"); + for (let i = 1, s = e.getLineCount(); i <= s; i++) { + let s = e.getLineFirstNonWhitespaceColumn(i); + if (0 === s && (s = e.getLineMaxColumn(i)), 1 === s) continue; + const a = new d.e(i, 1, i, s), + l = e.getValueInRange(a), + c = n ? l.replace(/\t/gi, o) : l.replace(r, "\t"); + t.addEditOperation(a, c) + } + } + N.ID = "editor.contrib.autoIndentOnPaste"; + class E { + constructor(e, t) { + this.selection = e, this.tabSize = t, this.selectionId = null + } + getEditOperations(e, t) { + this.selectionId = t.trackSelection(this.selection), D(e, t, this.tabSize, ! + 0) + } + computeCursorState(e, t) { + return t.getTrackedSelection(this.selectionId) + } + } + class I { + constructor(e, t) { + this.selection = e, this.tabSize = t, this.selectionId = null + } + getEditOperations(e, t) { + this.selectionId = t.trackSelection(this.selection), D(e, t, this.tabSize, ! + 1) + } + computeCursorState(e, t) { + return t.getTrackedSelection(this.selectionId) + } + }(0, s._K)(N.ID, N), (0, s.Qr)(b), (0, s.Qr)(v), (0, s.Qr)(C), (0, s.Qr)( + y), (0, s.Qr)(S), (0, s.Qr)(x), (0, s.Qr)(k) + }, + 7586: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + getInlayHints: () => x, + InlayHintsController: () => k + }); + var n = i(5393), + o = i(7301), + r = i(9954), + s = i(5976), + a = i(6830), + l = i(1640), + d = i(4101), + c = i(9488), + h = i(3910), + u = i(1050), + g = i(7781), + p = i(4314), + m = i(1036), + f = i(4565), + _ = i(666), + b = i(8401), + v = i(8216), + w = i(187), + C = i(3108), + y = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + S = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + + function x(e, t, i) { + return S(this, void 0, void 0, (function*() { + const n = [], + r = d.mX.ordered(e).reverse(), + s = (0, c.xH)(r.map((r => t.map((t => Promise.resolve(r.provideInlayHints( + e, t, i)).then((e => { + const i = null == e ? void 0 : e.filter((e => t.containsPosition( + e.position))); + (null == i ? void 0 : i.length) && n.push({ + list: i, + provider: r + }) + }), (e => { + (0, o.Cp)(e) + }))))))); + return yield Promise.all(s), n + })) + } + let k = class { + constructor(e, t, i, n) { + this._editor = e, this._codeEditorService = t, this._themeService = i, + this._configurationService = n, this._disposables = new s.SL, this._sessionDisposables = + new s.SL, this._getInlayHintsDelays = new m.Y(d.mX, 25, 2500), this._decorationsTypeIds = [], + this._decorationIds = [], this._disposables.add(d.mX.onDidChange((() => + this._update()))), this._disposables.add(i.onDidColorThemeChange((() => + this._update()))), this._disposables.add(e.onDidChangeModel((() => + this._update()))), this._disposables.add(e.onDidChangeModelLanguage( + (() => this._update()))), this._disposables.add(e.onDidChangeConfiguration( + (e => { + e.hasChanged(126) && this._update() + }))), this._update() + } + dispose() { + this._sessionDisposables.dispose(), this._removeAllDecorations(), + this._disposables.dispose() + } + _update() { + if (this._sessionDisposables.clear(), !this._editor.getOption(126).enabled) + return void this._removeAllDecorations(); + const e = this._editor.getModel(); + if (!e || !d.mX.has(e)) return void this._removeAllDecorations(); + const t = new n.pY((() => S(this, void 0, void 0, (function*() { + const i = Date.now(), + n = new u.A; + this._sessionDisposables.add((0, s.OF)((() => n.dispose(!0)))); + const o = this._editor.getVisibleRangesPlusViewportAboveBelow(), + r = yield x(e, o, n.token), + a = this._getInlayHintsDelays.update(e, Date.now() - i); + t.delay = a, this._updateHintsDecorators(r) + }))), this._getInlayHintsDelays.get(e)); + this._sessionDisposables.add(t), this._sessionDisposables.add(this._editor + .onDidChangeModelContent((() => t.schedule()))), this._disposables.add( + this._editor.onDidScrollChange((() => t.schedule()))), t.schedule(); + const i = new s.SL; + this._sessionDisposables.add(i); + for (const n of d.mX.all(e)) "function" == typeof n.onDidChangeInlayHints && + i.add(n.onDidChangeInlayHints((() => t.schedule()))) + } + _updateHintsDecorators(e) { + const { + fontSize: t, + fontFamily: i + } = this._getLayoutInfo(), n = this._themeService.getColorTheme().getColor( + h.Pp), o = this._themeService.getColorTheme().getColor(h.VV), s = [], + a = [], l = "--inlayHintsFontFamily"; + this._editor.getContainerDomNode().style.setProperty(l, i); + const d = this._configurationService.getValue( + "editor.useInjectedText"), + c = void 0 === d || !!d; + for (const { + list: i + } + of e) + for (let e = 0; e < i.length && a.length < 500; e++) { + const { + text: d, + position: h, + whitespaceBefore: g, + whitespaceAfter: m + } = i[e], f = g ? t / 3 | 0 : 0, _ = m ? t / 3 | 0 : 0, b = { + contentText: (u = d, u.replace(/[ \t]/g, " ")), + backgroundColor: `${n}`, + color: `${o}`, + margin: `0px ${_}px 0px ${f}px`, + fontSize: `${t}px`, + fontFamily: `var(${l})`, + padding: `0px ${t/4|0}px`, + borderRadius: (t / 4 | 0) + "px", + verticalAlign: "middle" + }, v = "inlayHints-" + (0, r.vp)(b).toString(16); + this._codeEditorService.registerDecorationType( + "inlay-hints-controller", v, c ? { + beforeInjectedText: Object.assign(Object.assign({}, b), { + affectsLetterSpacing: !0 + }) + } : { + before: b + }, void 0, this._editor), s.push(v); + const w = this._codeEditorService.resolveDecorationOptions(v, !0); + a.push({ + range: p.e.fromPositions(h), + options: w + }) + } + var u; + this._decorationsTypeIds.forEach(this._codeEditorService.removeDecorationType, + this._codeEditorService), this._decorationsTypeIds = s, this._decorationIds = + this._editor.deltaDecorations(this._decorationIds, a) + } + _getLayoutInfo() { + const e = this._editor.getOption(126), + t = this._editor.getOption(44); + let i = e.fontSize; + return (!i || i < 5 || i > t) && (i = .9 * t | 0), { + fontSize: i, + fontFamily: e.fontFamily || this._editor.getOption(41) + } + } + _removeAllDecorations() { + this._decorationIds = this._editor.deltaDecorations(this._decorationIds, []), + this._decorationsTypeIds.forEach(this._codeEditorService.removeDecorationType, + this._codeEditorService), this._decorationsTypeIds = [] + } + }; + k.ID = "editor.contrib.InlayHints", k = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([y(1, l.$), y(2, g.XE), y(3, C.Ui)], k), (0, a._K)(k.ID, k), f.P.registerCommand( + "_executeInlayHintProvider", ((e, ...t) => S(void 0, void 0, void 0, ( + function*() { + const [i, n] = t; + (0, b.p_)(_.o.isUri(i)), (0, b.p_)(p.e.isIRange(n)); + const o = yield e.get(v.S).createModelReference(i); + try { + const e = yield x(o.object.textEditorModel, [p.e.lift(n)], u.T.None); + return (0, c.xH)(e.map((e => e.list))).sort(((e, t) => w.L.compare( + e.position, t.position))) + } finally { + o.dispose() + } + })))) + }, + 3167: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + ActiveGhostTextController: () => Oe, + GhostTextController: () => Ae, + ShowNextInlineSuggestionAction: () => Be, + ShowPreviousInlineSuggestionAction: () => We, + TriggerInlineSuggestionAction: () => ze, + commitInlineSuggestionAction: () => Fe + }); + var n = i(5976), + o = i(6830), + r = i(9102), + s = i(3379), + a = i.n(s), + l = i(7795), + d = i.n(l), + c = i(569), + h = i.n(c), + u = i(3565), + g = i.n(u), + p = i(9216), + m = i.n(p), + f = i(4589), + _ = i.n(f), + b = i(3975), + v = {}; + v.styleTagTransform = _(), v.setAttributes = g(), v.insert = h().bind( + null, "head"), v.domAPI = d(), v.insertStyleElement = m(), a()(b.Z, v), + b.Z && b.Z.locals && b.Z.locals; + var w, C = i(5321), + y = i(4314), + S = i(1640), + x = i(7295), + k = i(7736), + L = i(4141), + N = i(72), + D = i(9052), + E = i(8411), + I = i(187), + T = i(7781), + M = i(7869), + A = i(1264), + R = i(3181), + O = i(2550), + P = i(8819), + F = i(2065), + B = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + W = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const z = null === (w = window.trustedTypes) || void 0 === w ? void 0 : w + .createPolicy("editorGhostText", { + createHTML: e => e + }); + let V = class extends n.JT { + constructor(e, t, i) { + super(), this.editor = e, this.model = t, this.instantiationService = + i, this.disposed = !1, this.partsWidget = this._register(this.instantiationService + .createInstance(H, this.editor)), this.additionalLinesWidget = this + ._register(new j(this.editor)), this.viewMoreContentWidget = void 0, + this._register(this.editor.onDidChangeConfiguration((e => { + (e.hasChanged(28) || e.hasChanged(105) || e.hasChanged(88) || e.hasChanged( + 82) || e.hasChanged(43) || e.hasChanged(42) || e.hasChanged(58)) && + this.update() + }))), this._register((0, n.OF)((() => { + var e; + this.disposed = !0, this.update(), null === (e = this.viewMoreContentWidget) || + void 0 === e || e.dispose(), this.viewMoreContentWidget = void 0 + }))), this._register(t.onDidChange((() => { + this.update() + }))), this.update() + } + shouldShowHoverAtViewZone(e) { + return this.additionalLinesWidget.viewZoneId === e + } + update() { + var e; + const t = this.model.ghostText; + if (!this.editor.hasModel() || !t || this.disposed) return this.partsWidget + .clear(), void this.additionalLinesWidget.clear(); + const i = new Array, + n = new Array; + + function o(e, t) { + if (n.length > 0) { + const i = n[n.length - 1]; + t && i.decorations.push(new O.Kp(i.content.length + 1, i.content.length + + 1 + e[0].length, t, 0)), i.content += e[0], e = e.slice(1) + } + for (const i of e) n.push({ + content: i, + decorations: t ? [new O.Kp(1, i.length + 1, t, 0)] : [] + }) + } + const r = this.editor.getModel().getLineContent(t.lineNumber); + let s; + this.editor.getModel().getLineTokens(t.lineNumber); + let a = 0; + for (const e of t.parts) { + let t = e.lines; + void 0 === s ? (i.push({ + column: e.column, + text: t[0], + preview: e.preview + }), t = t.slice(1)) : o([r.substring(a, e.column - 1)], void 0), t.length > + 0 && (o(t, "ghost-text"), void 0 === s && e.column <= r.length && ( + s = e.column)), a = e.column - 1 + } + void 0 !== s && o([r.substring(a)], void 0), this.partsWidget.setParts( + t.lineNumber, i, void 0 !== s ? { + column: s, + length: r.length + 1 - s + } : void 0), this.additionalLinesWidget.updateLines(t.lineNumber, n, + t.additionalReservedLineCount), t.parts.some((e => e.lines.length < + 0)) ? this.viewMoreContentWidget = this.renderViewMoreLines(new I.L( + t.lineNumber, this.editor.getModel().getLineMaxColumn(t.lineNumber) + ), "", 0) : (null === (e = this.viewMoreContentWidget) || void 0 === + e || e.dispose(), this.viewMoreContentWidget = void 0) + } + renderViewMoreLines(e, t, i) { + const o = this.editor.getOption(42), + r = document.createElement("div"); + r.className = "suggest-preview-additional-widget", D.V.applyFontInfoSlow( + r, o); + const s = document.createElement("span"); + s.className = "content-spacer", s.append(t), r.append(s); + const a = document.createElement("span"); + a.className = "content-newline suggest-preview-text", a.append("⏎ "), + r.append(a); + const l = new n.SL, + d = document.createElement("div"); + return d.className = "button suggest-preview-text", d.append( + `+${i} lines…`), l.add(C.mu(d, "mousedown", (e => { + var t; + null === (t = this.model) || void 0 === t || t.setExpanded(!0), + e.preventDefault(), this.editor.focus() + }))), r.append(d), new $(this.editor, e, r, l) + } + }; + V = B([W(2, F.TG)], V); + let H = class { + constructor(e, t, i, o) { + this.editor = e, this.codeEditorService = t, this.themeService = i, + this.contextKeyService = o, this.decorationIds = [], this.disposableStore = + new n.SL + } + dispose() { + this.clear(), this.disposableStore.dispose() + } + clear() { + this.editor.deltaDecorations(this.decorationIds, []), this.disposableStore + .clear() + } + setParts(e, t, i) { + this.disposableStore.clear(); + const n = this.themeService.getColorTheme(), + o = n.getColor(M.N5); + let r, s; + o && (r = String(o.rgba.a), s = A.Il.Format.CSS.format(U(o))); + const a = n.getColor(M.x3); + let l; + a && (l = `2px dashed ${a}`); + const d = this.editor.getModel(); + if (!d) return; + const { + tabSize: c + } = d.getOptions(), h = d.getLineContent(e) || ""; + let u = 0, + g = ""; + const p = new Array; + i && p.push({ + range: y.e.fromPositions(new I.L(e, i.column), new I.L(e, i.column + + i.length)), + options: { + inlineClassName: "ghost-text-hidden", + description: "ghost-text-hidden" + } + }); + const m = this.contextKeyService.getContextKeyValue( + "config.editor.useInjectedText"), + f = void 0 === m || !!m; + this.decorationIds = this.editor.deltaDecorations(this.decorationIds, + t.map((t => { + g += h.substring(u, t.column - 1), u = t.column - 1; + const i = f ? t.text : this.renderSingleLineText(t.text, g, c, ! + 1), + n = this.disposableStore.add(function(e, t, i, n) { + const o = "0-ghost-text-" + K++; + return e.registerDecorationType("ghost-text", o, n), { + dispose() { + e.removeDecorationType(o) + }, resolve: () => e.resolveDecorationOptions(o, !0) + } + }(this.codeEditorService, 0, 0, { + after: { + contentText: i, + opacity: r, + color: s, + border: l, + fontWeight: t.preview ? "bold" : "normal" + } + })); + return { + range: y.e.fromPositions(new I.L(e, t.column)), + options: f ? { + description: "ghost-text", + after: { + content: i, + inlineClassName: t.preview ? "ghost-text-decoration-preview" : "ghost-text-decoration" + } + } : Object.assign({}, n.resolve()) + } + })).concat(p)) + } + renderSingleLineText(e, t, i, n) { + const o = t + e, + r = R.io.visibleColumnsByColumns(o, i); + let s = "", + a = t.length + 1; + for (const t of e) { + if ("\t" === t) { + const e = r[a + 1] - r[a]; + if (n) { + s += "→"; + for (let t = 1; t < e; t++) s += " " + } else + for (let t = 0; t < e; t++) s += " " + } else s += " " === t ? n ? "·" : " " : t; + a += 1 + } + return s + } + }; + + function U(e) { + const { + r: t, + b: i, + g: n + } = e.rgba; + return new A.Il(new A.VS(t, n, i, 255)) + } + H = B([W(1, S.$), W(2, T.XE), W(3, P.i6)], H); + class j { + constructor(e) { + this.editor = e, this._viewZoneId = void 0 + } + get viewZoneId() { + return this._viewZoneId + } + dispose() { + this.clear() + } + clear() { + this.editor.changeViewZones((e => { + this._viewZoneId && (e.removeZone(this._viewZoneId), this._viewZoneId = + void 0) + })) + } + updateLines(e, t, i) { + const n = this.editor.getModel(); + if (!n) return; + const { + tabSize: o + } = n.getOptions(); + this.editor.changeViewZones((n => { + this._viewZoneId && (n.removeZone(this._viewZoneId), this._viewZoneId = + void 0); + const r = Math.max(t.length, i); + if (r > 0) { + const i = document.createElement("div"); + ! function(e, t, i, n) { + const o = n.get(28), + r = n.get(105), + s = n.get(82), + a = n.get(43), + l = n.get(42), + d = n.get(58), + c = (0, N.l$)(1e4); + c.appendASCIIString('
    '); + for (let e = 0, n = i.length; e < n; e++) { + const n = i[e], + h = n.content; + c.appendASCIIString('
    '); + const u = x.$i(h), + g = x.Ut(h), + p = E.A.createEmpty(h); + (0, k.d1)(new k.IJ(l.isMonospace && !o, l.canUseHalfwidthRightwardsArrow, + h, !1, u, g, 0, p, n.decorations, t, 0, l.spaceWidth, l.middotWidth, + l.wsmiddotWidth, r, "none", s, a !== L.n0.OFF, null), c), c.appendASCIIString( + "
    ") + } + c.appendASCIIString("
    "), D.V.applyFontInfoSlow(e, l); + const h = c.build(), + u = z ? z.createHTML(h) : h; + e.innerHTML = u + }(i, o, t, this.editor.getOptions()), this._viewZoneId = n.addZone({ + afterLineNumber: e, + heightInLines: r, + domNode: i + }) + } + })) + } + } + let K = 0; + class $ extends n.JT { + constructor(e, t, i, o) { + super(), this.editor = e, this.position = t, this.domNode = i, this.allowEditorOverflow = ! + 1, this.suppressMouseDown = !1, this._register(o), this._register((0, + n.OF)((() => { + this.editor.removeContentWidget(this) + }))), this.editor.addContentWidget(this) + } + getId() { + return "editor.widget.viewMoreLinesWidget" + } + getDomNode() { + return this.domNode + } + getPosition() { + return { + position: this.position, + preference: [0] + } + } + }(0, T.Ic)(((e, t) => { + const i = e.getColor(M.N5); + if (i) { + const e = String(i.rgba.a), + n = A.Il.Format.CSS.format(U(i)); + t.addRule( + `.monaco-editor .ghost-text-decoration { opacity: ${e}; color: ${n}; }` + ), t.addRule( + `.monaco-editor .ghost-text-decoration-preview { color: ${i.toString()}; }` + ), t.addRule( + `.monaco-editor .suggest-preview-text .ghost-text { opacity: ${e}; color: ${n}; }` + ) + } + const n = e.getColor(M.x3); + n && t.addRule( + `.monaco-editor .suggest-preview-text .ghost-text { border: 2px dashed ${n}; }` + ) + })); + var q = i(3580), + Z = i(5393), + G = i(1050), + Y = i(7301), + Q = i(4669), + X = i(4101), + J = i(9386), + ee = i(4565), + te = i(8728); + class ie { + constructor(e, t, i = 0) { + this.lineNumber = e, this.parts = t, this.additionalReservedLineCount = + i + } + renderForScreenReader(e) { + if (0 === this.parts.length) return ""; + const t = this.parts[this.parts.length - 1]; + return function(e, t) { + const i = new ne(e), + n = t.map((e => { + const t = y.e.lift(e.range); + return { + startOffset: i.getOffset(t.getStartPosition()), + endOffset: i.getOffset(t.getEndPosition()), + text: e.text + } + })); + n.sort(((e, t) => t.startOffset - e.startOffset)); + for (const t of n) e = e.substring(0, t.startOffset) + t.text + e.substring( + t.endOffset); + return e + }(e.substr(0, t.column - 1), this.parts.map((e => ({ + range: { + startLineNumber: 1, + endLineNumber: 1, + startColumn: e.column, + endColumn: e.column + }, + text: e.lines.join("\n") + })))).substring(this.parts[0].column - 1) + } + } + class ne { + constructor(e) { + this.lineStartOffsetByLineIdx = [], this.lineStartOffsetByLineIdx.push( + 0); + for (let t = 0; t < e.length; t++) "\n" === e.charAt(t) && this.lineStartOffsetByLineIdx + .push(t + 1) + } + getOffset(e) { + return this.lineStartOffsetByLineIdx[e.lineNumber - 1] + e.column - 1 + } + } + class oe { + constructor(e, t, i) { + this.column = e, this.lines = t, this.preview = i + } + } + class re extends n.JT { + constructor(e) { + super(), this.editor = e, this._expanded = void 0, this.onDidChangeEmitter = + new Q.Q5, this.onDidChange = this.onDidChangeEmitter.event, this._register( + e.onDidChangeConfiguration((e => { + e.hasChanged(106) && void 0 === this._expanded && this.onDidChangeEmitter + .fire() + }))) + } + setExpanded(e) { + this._expanded = !0, this.onDidChangeEmitter.fire() + } + } + var se = i(2484); + + function ae(e, t, i, n, o = 0) { + if (e.range.startLineNumber !== e.range.endLineNumber) return; + const r = e.text.length - o, + s = t.getValueInRange(e.range), + a = function(e, t) { + if ((null == le ? void 0 : le.originalValue) === e && (null == le ? + void 0 : le.newValue) === t) return null == le ? void 0 : le.changes; { + const i = function(e, t) { + function i(e) { + let t = 0; + for (let i = 0, n = e.length; i < n; i++) { + const n = e.charCodeAt(i); + n > t && (t = n) + } + return t + } + const n = Math.max(i(e), i(t)); + + function o(e) { + if (e < 0) throw new Error("unexpected"); + return n + e + 1 + } + + function r(e) { + let t = 0, + i = 0; + const n = new Int32Array(e.length); + for (let r = 0, s = e.length; r < s; r++) { + const s = 100 * i + t; + "(" === e[r] ? (n[r] = o(2 * s), t++) : ")" === e[r] ? (n[r] = o( + 2 * s + 1), 1 === t && i++, t = Math.max(t - 1, 0)) : n[r] = e.charCodeAt( + r) + } + return n + } + const s = r(e), + a = r(t); + return new se.Hs({ + getElements: () => s + }, { + getElements: () => a + }).ComputeDiff(!1).changes + }(e, t); + return le = { + originalValue: e, + newValue: t, + changes: i + }, i + } + }(s, e.text), + l = e.range.startLineNumber, + d = new Array; + if ("prefix" === i) { + const e = a.filter((e => 0 === e.originalLength)); + if (e.length > 1 || 1 === e.length && e[0].originalStart !== s.length) + return + } + for (const o of a) { + const a = e.range.startColumn + o.originalStart + o.originalLength; + if ("subwordSmart" === i && n && n.lineNumber === e.range.startLineNumber && + a < n.column) return; + if (o.originalLength > 0) { + const e = s.substr(o.originalStart, o.originalLength), + i = t.getLineFirstNonWhitespaceColumn(l); + if (!/^(\t| )*$/.test(e) || !(0 === i || a <= i)) return + } + if (0 === o.modifiedLength) continue; + const c = o.modifiedStart + o.modifiedLength, + h = Math.max(o.modifiedStart, Math.min(c, r)), + u = e.text.substring(o.modifiedStart, h), + g = e.text.substring(h, Math.max(o.modifiedStart, c)); + if (u.length > 0) { + const e = x.uq(u); + d.push(new oe(a, e, !1)) + } + if (g.length > 0) { + const e = x.uq(g); + d.push(new oe(a, e, !0)) + } + } + return new ie(l, d, 0) + } + let le; + const de = "editor.action.inlineSuggest.commit"; + var ce = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + let he = class extends n.JT { + constructor(e, t, i) { + super(), this.editor = e, this.cache = t, this.commandService = i, + this.onDidChangeEmitter = new Q.Q5, this.onDidChange = this.onDidChangeEmitter + .event, this.completionSession = this._register(new n.XK), this.active = ! + 1, this.disposed = !1, this._register(i.onDidExecuteCommand((t => { + new Set([o.n_.id, o.kz.id, te.CoreEditingCommands.Tab.id, te.CoreEditingCommands + .DeleteLeft.id, te.CoreEditingCommands.DeleteRight.id, de, + "acceptSelectedSuggestion" + ]).has(t.commandId) && e.hasTextFocus() && this.handleUserInput() + }))), this._register(this.editor.onDidType((e => { + this.handleUserInput() + }))), this._register(this.editor.onDidChangeCursorPosition((e => { + this.session && !this.session.isValid && this.hide() + }))), this._register((0, n.OF)((() => { + this.disposed = !0 + }))) + } + handleUserInput() { + this.session && !this.session.isValid && this.hide(), setTimeout((() => { + this.disposed || this.startSessionIfTriggered() + }), 0) + } + get session() { + return this.completionSession.value + } + get ghostText() { + var e; + return null === (e = this.session) || void 0 === e ? void 0 : e.ghostText + } + get minReservedLineCount() { + return this.session ? this.session.minReservedLineCount : 0 + } + setExpanded(e) { + var t; + null === (t = this.session) || void 0 === t || t.setExpanded(e) + } + setActive(e) { + var t; + this.active = e, e && (null === (t = this.session) || void 0 === t || + t.scheduleAutomaticUpdate()) + } + startSessionIfTriggered() { + this.editor.getOption(54).enabled && (this.session && this.session.isValid || + this.trigger(X.bw.Automatic)) + } + trigger(e) { + this.completionSession.value ? e === X.bw.Explicit && this.completionSession + .value.ensureUpdateWithExplicitContext() : (this.completionSession.value = + new pe(this.editor, this.editor.getPosition(), (() => this.active), + this.commandService, this.cache, e), this.completionSession.value.takeOwnership( + this.completionSession.value.onDidChange((() => { + this.onDidChangeEmitter.fire() + })))) + } + hide() { + this.completionSession.clear(), this.onDidChangeEmitter.fire() + } + commitCurrentSuggestion() { + var e; + null === (e = this.session) || void 0 === e || e.commitCurrentCompletion() + } + showNext() { + var e; + null === (e = this.session) || void 0 === e || e.showNextInlineCompletion() + } + showPrevious() { + var e; + null === (e = this.session) || void 0 === e || e.showPreviousInlineCompletion() + } + hasMultipleInlineCompletions() { + var e; + return ce(this, void 0, void 0, (function*() { + const t = yield null === (e = this.session) || void 0 === e ? + void 0 : e.hasMultipleInlineCompletions(); + return void 0 !== t && t + })) + } + }; + var ue, ge; + he = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(ue = 2, ge = ee.H, function(e, t) { + ge(e, t, ue) + })], he); + class pe extends re { + constructor(e, t, i, o, r, s) { + let a; + super(e), this.triggerPosition = t, this.shouldUpdate = i, this.commandService = + o, this.cache = r, this.initialTriggerKind = s, this.minReservedLineCount = + 0, this.updateOperation = this._register(new n.XK), this.updateSoon = + this._register(new Z.pY((() => { + let e = this.initialTriggerKind; + return this.initialTriggerKind = X.bw.Automatic, this.update(e) + }), 50)), this.currentlySelectedCompletionId = void 0, this._register( + this.onDidChange((() => { + const e = this.currentCompletion; + if (e && e.sourceInlineCompletion !== a) { + a = e.sourceInlineCompletion; + const t = e.sourceProvider; + t.handleItemDidShow && t.handleItemDidShow(e.sourceInlineCompletions, + a) + } + }))), this._register((0, n.OF)((() => { + this.cache.clear() + }))), this._register(this.editor.onDidChangeCursorPosition((e => { + this.cache.value && this.onDidChangeEmitter.fire() + }))), this._register(this.editor.onDidChangeModelContent((e => { + this.scheduleAutomaticUpdate() + }))), this._register(X.zu.onDidChange((() => { + this.updateSoon.schedule() + }))), this.scheduleAutomaticUpdate() + } + fixAndGetIndexOfCurrentSelection() { + if (!this.currentlySelectedCompletionId || !this.cache.value) return 0; + if (0 === this.cache.value.completions.length) return 0; + const e = this.cache.value.completions.findIndex((e => e.semanticId === + this.currentlySelectedCompletionId)); + return -1 === e ? (this.currentlySelectedCompletionId = void 0, 0) : e + } + get currentCachedCompletion() { + if (this.cache.value) return this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()] + } + showNextInlineCompletion() { + var e; + return ce(this, void 0, void 0, (function*() { + yield this.ensureUpdateWithExplicitContext(); + const t = (null === (e = this.cache.value) || void 0 === e ? void 0 : + e.completions) || []; + if (t.length > 0) { + const e = (this.fixAndGetIndexOfCurrentSelection() + 1) % t.length; + this.currentlySelectedCompletionId = t[e].semanticId + } else this.currentlySelectedCompletionId = void 0; + this.onDidChangeEmitter.fire() + })) + } + showPreviousInlineCompletion() { + var e; + return ce(this, void 0, void 0, (function*() { + yield this.ensureUpdateWithExplicitContext(); + const t = (null === (e = this.cache.value) || void 0 === e ? void 0 : + e.completions) || []; + if (t.length > 0) { + const e = (this.fixAndGetIndexOfCurrentSelection() + t.length - 1) % + t.length; + this.currentlySelectedCompletionId = t[e].semanticId + } else this.currentlySelectedCompletionId = void 0; + this.onDidChangeEmitter.fire() + })) + } + ensureUpdateWithExplicitContext() { + var e; + return ce(this, void 0, void 0, (function*() { + this.updateOperation.value ? this.updateOperation.value.triggerKind === + X.bw.Explicit ? yield this.updateOperation.value.promise : yield this + .update(X.bw.Explicit) : (null === (e = this.cache.value) || void 0 === + e ? void 0 : e.triggerKind) !== X.bw.Explicit && (yield this.update( + X.bw.Explicit)) + })) + } + hasMultipleInlineCompletions() { + var e; + return ce(this, void 0, void 0, (function*() { + return yield this.ensureUpdateWithExplicitContext(), ((null === (e = + this.cache.value) || void 0 === e ? void 0 : e.completions.length) || + 0) > 1 + })) + } + get ghostText() { + const e = this.currentCompletion, + t = this.editor.getOptions().get(54).mode; + return e ? ae(e, this.editor.getModel(), t, this.editor.getPosition()) : + void 0 + } + get currentCompletion() { + const e = this.currentCachedCompletion; + if (e) return e.toLiveInlineCompletion() + } + get isValid() { + return this.editor.getPosition().lineNumber === this.triggerPosition.lineNumber + } + scheduleAutomaticUpdate() { + this.updateOperation.clear(), this.updateSoon.schedule() + } + update(e) { + return ce(this, void 0, void 0, (function*() { + if (!this.shouldUpdate()) return; + const t = this.editor.getPosition(), + i = (0, Z.PG)((i => ce(this, void 0, void 0, (function*() { + let n; + try { + n = yield be(t, this.editor.getModel(), { + triggerKind: e, + selectedSuggestionInfo: void 0 + }, i) + } catch (e) { + return void(0, Y.dL)(e) + } + i.isCancellationRequested || (this.cache.setValue(this.editor, + n, e), this.onDidChangeEmitter.fire()) + })))), + n = new me(i, e); + this.updateOperation.value = n, yield i, this.updateOperation.value === + n && this.updateOperation.clear() + })) + } + takeOwnership(e) { + this._register(e) + } + commitCurrentCompletion() { + if (!this.ghostText) return; + const e = this.currentCompletion; + e && this.commit(e) + } + commit(e) { + const t = this.cache.clearAndLeak(); + this.editor.executeEdits("inlineSuggestion.accept", [J.h.replaceMove(e + .range, e.text)]), e.command ? this.commandService.executeCommand(e.command + .id, ...e.command.arguments || []).finally((() => { + null == t || t.dispose() + })).then(void 0, Y.Cp) : null == t || t.dispose(), this.onDidChangeEmitter + .fire() + } + } + class me { + constructor(e, t) { + this.promise = e, this.triggerKind = t + } + dispose() { + this.promise.cancel() + } + } + class fe extends n.JT { + constructor(e, t, i, o) { + super(), this.triggerKind = o; + const r = e.deltaDecorations([], t.items.map((e => ({ + range: e.range, + options: { + description: "inline-completion-tracking-range" + } + })))); + this._register((0, n.OF)((() => { + e.deltaDecorations(r, []) + }))), this.completions = t.items.map(((e, t) => new _e(e, r[t]))), + this._register(e.onDidChangeModelContent((() => { + let t = !1; + const n = e.getModel(); + for (const e of this.completions) { + const i = n.getDecorationRange(e.decorationId); + i ? e.synchronizedRange.equalsRange(i) || (t = !0, e.synchronizedRange = + i) : (0, Y.dL)(new Error("Decoration has no range")) + } + t && i() + }))), this._register(t) + } + } + class _e { + constructor(e, t) { + this.inlineCompletion = e, this.decorationId = t, this.semanticId = + JSON.stringify({ + text: this.inlineCompletion.text, + startLine: this.inlineCompletion.range.startLineNumber, + startColumn: this.inlineCompletion.range.startColumn, + command: this.inlineCompletion.command + }), this.synchronizedRange = e.range + } + toLiveInlineCompletion() { + return { + text: this.inlineCompletion.text, + range: this.synchronizedRange, + command: this.inlineCompletion.command, + sourceProvider: this.inlineCompletion.sourceProvider, + sourceInlineCompletions: this.inlineCompletion.sourceInlineCompletions, + sourceInlineCompletion: this.inlineCompletion.sourceInlineCompletion + } + } + } + + function be(e, t, i, n = G.T.None) { + return ce(this, void 0, void 0, (function*() { + const o = function(e, t) { + const i = t.getWordAtPosition(e), + n = t.getLineMaxColumn(e.lineNumber); + return i ? new y.e(e.lineNumber, i.startColumn, e.lineNumber, n) : + y.e.fromPositions(e, e.with(void 0, n)) + }(e, t), + r = X.zu.all(t), + s = yield Promise.all(r.map((o => ce(this, void 0, void 0, ( + function*() { + const r = yield o.provideInlineCompletions(t, e, i, n); + return { + completions: r, + provider: o, + dispose: () => { + r && o.freeInlineCompletions(r) + } + } + }))))), + a = new Map; + for (const e of s) { + const t = e.completions; + if (t) + for (const i of t.items.map((i => ({ + text: i.text, + range: i.range ? y.e.lift(i.range) : o, + command: i.command, + sourceProvider: e.provider, + sourceInlineCompletions: t, + sourceInlineCompletion: i + })))) i.range.startLineNumber === i.range.endLineNumber && a.set( + JSON.stringify({ + text: i.text, + range: i.range + }), i) + } + return { + items: [...a.values()], + dispose: () => { + for (const e of s) e.dispose() + } + } + })) + } + var ve = i(3472), + we = i(781), + Ce = i(9830); + class ye extends n.JT { + constructor(e) { + super(), this.editor = e, this.isSuggestWidgetVisible = !1, this.isShiftKeyPressed = ! + 1, this._isActive = !1, this._currentInlineCompletion = void 0, this + .onDidChangeEmitter = new Q.Q5, this.onDidChange = this.onDidChangeEmitter + .event, this.setInactiveDelayed = this._register(new Z.pY((() => { + this.isSuggestWidgetVisible || this._isActive && (this._isActive = ! + 1, this.onDidChangeEmitter.fire()) + }), 100)), this._register(e.onKeyDown((e => { + e.shiftKey && !this.isShiftKeyPressed && (this.isShiftKeyPressed = ! + 0, this.update(this._isActive)) + }))), this._register(e.onKeyUp((e => { + e.shiftKey && this.isShiftKeyPressed && (this.isShiftKeyPressed = ! + 1, this.update(this._isActive)) + }))); + const t = Ce.SuggestController.get(this.editor); + if (t) { + let e = !1; + const i = () => { + e || (e = !0, this._register(t.widget.value.onDidShow((() => { + this.isSuggestWidgetVisible = !0, this.update(!0) + }))), this._register(t.widget.value.onDidHide((() => { + this.isSuggestWidgetVisible = !1, this.setInactiveDelayed.schedule(), + this.update(this._isActive) + }))), this._register(t.widget.value.onDidFocus((() => { + this.isSuggestWidgetVisible = !0, this.update(!0) + })))) + }; + this._register(Q.ju.once(t.model.onDidTrigger)((e => { + i() + }))) + } + this.update(this._isActive) + } + get state() { + if (this._isActive) return { + selectedItemAsInlineCompletion: this._currentInlineCompletion + } + } + update(e) { + const t = this.getInlineCompletion(); + let i = !1; + this._currentInlineCompletion !== t && (this._currentInlineCompletion = + t, i = !0), this._isActive !== e && (this._isActive = e, i = !0), i && + this.onDidChangeEmitter.fire() + } + getInlineCompletion() { + const e = Ce.SuggestController.get(this.editor); + if (!e) return; + if (!this.isSuggestWidgetVisible) return; + const t = e.widget.value.getFocusedItem(); + return t ? function(e, t, i, n) { + const o = i.item; + if (Array.isArray(o.completion.additionalTextEdits) && o.completion + .additionalTextEdits.length > 0) return { + text: "", + range: y.e.fromPositions(t, t) + }; + let { + insertText: r + } = o.completion; + if (4 & o.completion.insertTextRules) { + const i = (new ve.Yj).parse(r), + n = e.editor.getModel(); + we.l.adjustWhitespace(n, t, i, !0, !0), r = i.toString() + } + const s = e.getOverwriteInfo(o, n); + return { + text: r, + range: y.e.fromPositions(t.delta(0, -s.overwriteBefore), t.delta(0, + Math.max(s.overwriteAfter, 0))) + } + }(e, this.editor.getPosition(), t, this.isShiftKeyPressed) : void 0 + } + stopForceRenderingAbove() { + const e = Ce.SuggestController.get(this.editor); + e && e.stopForceRenderingAbove() + } + forceRenderingAbove() { + const e = Ce.SuggestController.get(this.editor); + e && e.forceRenderingAbove() + } + } + var Se = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class xe extends re { + constructor(e, t) { + super(e), this.cache = t, this.suggestionInlineCompletionSource = this + ._register(new ye(this.editor)), this.updateOperation = this._register( + new n.XK), this.updateCacheSoon = this._register(new Z.pY((() => + this.updateCache()), 50)), this.minReservedLineCount = 0, this._register( + this.suggestionInlineCompletionSource.onDidChange((() => { + this.updateCacheSoon.schedule(), this.suggestionInlineCompletionSource + .state || (this.minReservedLineCount = 0); + const e = this.ghostText; + e && (this.minReservedLineCount = Math.max(this.minReservedLineCount, + e.parts.map((e => e.lines.length - 1)).reduce(((e, t) => e + t), + 0))), this.minReservedLineCount >= 1 && this.isSuggestionPreviewEnabled() ? + this.suggestionInlineCompletionSource.forceRenderingAbove() : + this.suggestionInlineCompletionSource.stopForceRenderingAbove(), + this.onDidChangeEmitter.fire() + }))), this._register(this.cache.onDidChange((() => { + this.onDidChangeEmitter.fire() + }))), this._register(this.editor.onDidChangeCursorPosition((e => { + this.isSuggestionPreviewEnabled() && (this.minReservedLineCount = + 0, this.updateCacheSoon.schedule(), this.onDidChangeEmitter.fire() + ) + }))), this._register((0, n.OF)((() => this.suggestionInlineCompletionSource + .stopForceRenderingAbove()))) + } + get isActive() { + return void 0 !== this.suggestionInlineCompletionSource.state + } + isSuggestionPreviewEnabled() { + return this.editor.getOption(106).preview + } + updateCache() { + return Se(this, void 0, void 0, (function*() { + const e = this.suggestionInlineCompletionSource.state; + if (!e || !e.selectedItemAsInlineCompletion) return; + const t = { + text: e.selectedItemAsInlineCompletion.text, + range: e.selectedItemAsInlineCompletion.range + }, + i = this.editor.getPosition(), + n = (0, Z.PG)((e => Se(this, void 0, void 0, (function*() { + let n; + try { + n = yield be(i, this.editor.getModel(), { + triggerKind: X.bw.Automatic, + selectedSuggestionInfo: t + }, e) + } catch (e) { + return void(0, Y.dL)(e) + } + e.isCancellationRequested || (this.cache.setValue(this.editor, + n, X.bw.Automatic), this.onDidChangeEmitter.fire()) + })))), + o = new me(n, X.bw.Automatic); + this.updateOperation.value = o, yield n, this.updateOperation.value === + o && this.updateOperation.clear() + })) + } + get ghostText() { + var e, t; + const i = this.suggestionInlineCompletionSource.state, + n = ke(this.editor.getModel(), null == i ? void 0 : i.selectedItemAsInlineCompletion), + o = ke(this.editor.getModel(), null === (t = null === (e = this.cache + .value) || void 0 === e ? void 0 : e.completions[0]) || void 0 === + t ? void 0 : t.toLiveInlineCompletion()), + r = o && n && o.text.startsWith(n.text) && o.range.equalsRange(n.range) ? + o : n || o, + s = n ? ((null == r ? void 0 : r.text.length) || 0) - n.text.length : + 0, + a = (e => { + const t = this.editor.getOptions().get(106).previewMode; + return e ? ae(e, this.editor.getModel(), t, this.editor.getPosition(), + s) || new ie(e.range.endLineNumber, [], this.minReservedLineCount) : + void 0 + })(r); + return this.isSuggestionPreviewEnabled() ? a : void 0 + } + } + + function ke(e, t) { + if (!t) return t; + const i = e.getValueInRange(t.range), + n = function(e, t) { + let i = 0; + for (; i < e.length && i < t.length && e[i] === t[i];) i++; + return i + }(i, t.text), + o = e.getOffsetAt(t.range.getStartPosition()) + n, + r = e.getPositionAt(o), + s = function(e, t) { + let i = 0; + for (; i < e.length && i < t.length && e[e.length - i - 1] === t[t.length - + i - 1];) i++; + return i + }(i.substr(n), t.text), + a = e.getPositionAt(Math.max(o, e.getOffsetAt(t.range.getEndPosition()) - + s)); + return { + range: y.e.fromPositions(r, a), + text: t.text.substr(n, t.text.length - n - s) + } + } + class Le extends n.JT { + constructor() { + super(...arguments), this.onDidChangeEmitter = new Q.Q5, this.onDidChange = + this.onDidChangeEmitter.event, this.hasCachedGhostText = !1, this.currentModelRef = + this._register(new n.XK) + } + get targetModel() { + var e; + return null === (e = this.currentModelRef.value) || void 0 === e ? + void 0 : e.object + } + setTargetModel(e) { + var t, i, n; + (null === (t = this.currentModelRef.value) || void 0 === t ? void 0 : + t.object) !== e && (this.currentModelRef.clear(), this.currentModelRef + .value = e ? (i = e, n = e.onDidChange((() => { + this.hasCachedGhostText = !1, this.onDidChangeEmitter.fire() + })), { + object: i, + dispose: () => null == n ? void 0 : n.dispose() + }) : void 0, this.hasCachedGhostText = !1, this.onDidChangeEmitter.fire() + ) + } + get ghostText() { + var e, t; + return this.hasCachedGhostText || (this.cachedGhostText = null === (t = + null === (e = this.currentModelRef.value) || void 0 === e ? void 0 : + e.object) || void 0 === t ? void 0 : t.ghostText, this.hasCachedGhostText = ! + 0), this.cachedGhostText + } + setExpanded(e) { + var t; + null === (t = this.targetModel) || void 0 === t || t.setExpanded(e) + } + get minReservedLineCount() { + return this.targetModel ? this.targetModel.minReservedLineCount : 0 + } + } + let Ne = class extends Le { + constructor(e, t) { + super(), this.editor = e, this.commandService = t, this.sharedCache = + this._register(new De), this.suggestWidgetAdapterModel = this._register( + new xe(this.editor, this.sharedCache)), this.inlineCompletionsModel = + this._register(new he(this.editor, this.sharedCache, this.commandService)), + this._register(this.suggestWidgetAdapterModel.onDidChange((() => { + this.updateModel() + }))), this.updateModel() + } + get activeInlineCompletionsModel() { + if (this.targetModel === this.inlineCompletionsModel) return this.inlineCompletionsModel + } + updateModel() { + this.setTargetModel(this.suggestWidgetAdapterModel.isActive ? this.suggestWidgetAdapterModel : + this.inlineCompletionsModel), this.inlineCompletionsModel.setActive( + this.targetModel === this.inlineCompletionsModel) + } + shouldShowHoverAt(e) { + var t; + const i = null === (t = this.activeInlineCompletionsModel) || void 0 === + t ? void 0 : t.ghostText; + return !!i && i.parts.some((t => e.containsPosition(new I.L(i.lineNumber, + t.column)))) + } + triggerInlineCompletion() { + var e; + null === (e = this.activeInlineCompletionsModel) || void 0 === e || e + .trigger(X.bw.Explicit) + } + commitInlineCompletion() { + var e; + null === (e = this.activeInlineCompletionsModel) || void 0 === e || e + .commitCurrentSuggestion() + } + hideInlineCompletion() { + var e; + null === (e = this.activeInlineCompletionsModel) || void 0 === e || e + .hide() + } + showNextInlineCompletion() { + var e; + null === (e = this.activeInlineCompletionsModel) || void 0 === e || e + .showNext() + } + showPreviousInlineCompletion() { + var e; + null === (e = this.activeInlineCompletionsModel) || void 0 === e || e + .showPrevious() + } + hasMultipleInlineCompletions() { + var e, t, i, n, o; + return t = this, i = void 0, o = function*() { + const t = yield null === (e = this.activeInlineCompletionsModel) || + void 0 === e ? void 0 : e.hasMultipleInlineCompletions(); + return void 0 !== t && t + }, new((n = void 0) || (n = Promise))((function(e, r) { + function s(e) { + try { + l(o.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(o.throw(e)) + } catch (e) { + r(e) + } + } + + function l(t) { + var i; + t.done ? e(t.value) : (i = t.value, i instanceof n ? i : new n(( + function(e) { + e(i) + }))).then(s, a) + } + l((o = o.apply(t, i || [])).next()) + })) + } + }; + Ne = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([function(e, t) { + return function(i, n) { + t(i, n, e) + } + }(1, ee.H)], Ne); + class De extends n.JT { + constructor() { + super(...arguments), this.onDidChangeEmitter = new Q.Q5, this.onDidChange = + this.onDidChangeEmitter.event, this.cache = this._register(new n.XK) + } + get value() { + return this.cache.value + } + setValue(e, t, i) { + this.cache.value = new fe(e, t, (() => this.onDidChangeEmitter.fire()), + i) + } + clearAndLeak() { + return this.cache.clearAndLeak() + } + clear() { + this.cache.clear() + } + } + var Ee = i(9989), + Ie = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + Te = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + Me = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + let Ae = class e extends n.JT { + constructor(e, t) { + super(), this.editor = e, this.instantiationService = t, this.triggeredExplicitly = ! + 1, this.activeController = this._register(new n.XK), this._register( + this.editor.onDidChangeModel((() => { + this.updateModelController() + }))), this._register(this.editor.onDidChangeConfiguration((e => { + e.hasChanged(106) && this.updateModelController(), e.hasChanged( + 54) && this.updateModelController() + }))), this.updateModelController() + } + static get(t) { + return t.getContribution(e.ID) + } + get activeModel() { + var e; + return null === (e = this.activeController.value) || void 0 === e ? + void 0 : e.model + } + updateModelController() { + const e = this.editor.getOption(106), + t = this.editor.getOption(54); + this.activeController.value = void 0, this.activeController.value = + this.editor.hasModel() && (e.preview || t.enabled || this.triggeredExplicitly) ? + this.instantiationService.createInstance(Oe, this.editor) : void 0 + } + shouldShowHoverAt(e) { + var t; + return (null === (t = this.activeModel) || void 0 === t ? void 0 : t.shouldShowHoverAt( + e)) || !1 + } + shouldShowHoverAtViewZone(e) { + var t, i; + return (null === (i = null === (t = this.activeController.value) || + void 0 === t ? void 0 : t.widget) || void 0 === i ? void 0 : i.shouldShowHoverAtViewZone( + e)) || !1 + } + trigger() { + var e; + this.triggeredExplicitly = !0, this.activeController.value || this.updateModelController(), + null === (e = this.activeModel) || void 0 === e || e.triggerInlineCompletion() + } + commit() { + var e; + null === (e = this.activeModel) || void 0 === e || e.commitInlineCompletion() + } + hide() { + var e; + null === (e = this.activeModel) || void 0 === e || e.hideInlineCompletion() + } + showNextInlineCompletion() { + var e; + null === (e = this.activeModel) || void 0 === e || e.showNextInlineCompletion() + } + showPreviousInlineCompletion() { + var e; + null === (e = this.activeModel) || void 0 === e || e.showPreviousInlineCompletion() + } + hasMultipleInlineCompletions() { + var e; + return Me(this, void 0, void 0, (function*() { + const t = yield null === (e = this.activeModel) || void 0 === e ? + void 0 : e.hasMultipleInlineCompletions(); + return void 0 !== t && t + })) + } + }; + Ae.inlineSuggestionVisible = new P.uy("inlineSuggestionVisible", !1, q.N( + "inlineSuggestionVisible", "Whether an inline suggestion is visible")), + Ae.inlineSuggestionHasIndentation = new P.uy( + "inlineSuggestionHasIndentation", !1, q.N( + "inlineSuggestionHasIndentation", + "Whether the inline suggestion starts with whitespace")), Ae.ID = + "editor.contrib.ghostTextController", Ae = Ie([Te(1, F.TG)], Ae); + class Re { + constructor(e) { + this.contextKeyService = e, this.inlineCompletionVisible = Ae.inlineSuggestionVisible + .bindTo(this.contextKeyService), this.inlineCompletionSuggestsIndentation = + Ae.inlineSuggestionHasIndentation.bindTo(this.contextKeyService) + } + } + let Oe = class extends n.JT { + constructor(e, t, i) { + super(), this.editor = e, this.instantiationService = t, this.contextKeyService = + i, this.contextKeys = new Re(this.contextKeyService), this.model = + this._register(this.instantiationService.createInstance(Ne, this.editor)), + this.widget = this._register(this.instantiationService.createInstance( + V, this.editor, this.model)), this._register((0, n.OF)((() => { + this.contextKeys.inlineCompletionVisible.set(!1), this.contextKeys + .inlineCompletionSuggestsIndentation.set(!1) + }))), this._register(this.model.onDidChange((() => { + this.updateContextKeys() + }))), this.updateContextKeys() + } + updateContextKeys() { + var e; + this.contextKeys.inlineCompletionVisible.set(void 0 !== (null === (e = + this.model.activeInlineCompletionsModel) || void 0 === e ? void 0 : + e.ghostText)); + const t = this.model.inlineCompletionsModel.ghostText; + if (t && t.parts.length > 0) { + const { + column: e, + lines: i + } = t.parts[0], n = i[0].startsWith(" ") || i[0].startsWith("\t"), o = + e <= this.editor.getModel().getLineIndentColumn(t.lineNumber); + this.contextKeys.inlineCompletionSuggestsIndentation.set(!!this.model + .activeInlineCompletionsModel && n && o) + } else this.contextKeys.inlineCompletionSuggestsIndentation.set(!1) + } + }; + Oe = Ie([Te(1, F.TG), Te(2, P.i6)], Oe); + const Pe = o._l.bindToContribution(Ae.get), + Fe = new Pe({ + id: de, + precondition: Ae.inlineSuggestionVisible, + handler(e) { + e.commit(), e.editor.focus() + } + }); + (0, o.fK)(Fe), Ee.W.registerKeybindingRule({ + primary: 2, + weight: 200, + id: Fe.id, + when: P.Ao.and(Fe.precondition, r.u.tabMovesFocus.toNegated(), Ae.inlineSuggestionHasIndentation + .toNegated()) + }), (0, o.fK)(new Pe({ + id: "editor.action.inlineSuggest.hide", + precondition: Ae.inlineSuggestionVisible, + kbOpts: { + weight: 100, + primary: 9 + }, + handler(e) { + e.hide() + } + })); + class Be extends o.R6 { + constructor() { + super({ + id: Be.ID, + label: q.N("action.inlineSuggest.showNext", + "Show Next Inline Suggestion"), + alias: "Show Next Inline Suggestion", + precondition: P.Ao.and(r.u.writable, Ae.inlineSuggestionVisible), + kbOpts: { + weight: 100, + primary: 601 + } + }) + } + run(e, t) { + return Me(this, void 0, void 0, (function*() { + const e = Ae.get(t); + e && (e.showNextInlineCompletion(), t.focus()) + })) + } + } + Be.ID = "editor.action.inlineSuggest.showNext"; + class We extends o.R6 { + constructor() { + super({ + id: We.ID, + label: q.N("action.inlineSuggest.showPrevious", + "Show Previous Inline Suggestion"), + alias: "Show Previous Inline Suggestion", + precondition: P.Ao.and(r.u.writable, Ae.inlineSuggestionVisible), + kbOpts: { + weight: 100, + primary: 599 + } + }) + } + run(e, t) { + return Me(this, void 0, void 0, (function*() { + const e = Ae.get(t); + e && (e.showPreviousInlineCompletion(), t.focus()) + })) + } + } + We.ID = "editor.action.inlineSuggest.showPrevious"; + class ze extends o.R6 { + constructor() { + super({ + id: "editor.action.inlineSuggest.trigger", + label: q.N("action.inlineSuggest.trigger", + "Trigger Inline Suggestion"), + alias: "Trigger Inline Suggestion", + precondition: r.u.writable + }) + } + run(e, t) { + return Me(this, void 0, void 0, (function*() { + const e = Ae.get(t); + e && e.trigger() + })) + } + }(0, o._K)(Ae.ID, Ae), (0, o.Qr)(ze), (0, o.Qr)(Be), (0, o.Qr)(We) + }, + 6307: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + AbstractCaseAction: () => H, + AbstractDeleteAllToBoundaryAction: () => F, + AbstractSortLinesAction: () => D, + DeleteAllLeftAction: () => B, + DeleteAllRightAction: () => W, + DeleteLinesAction: () => M, + DuplicateSelectionAction: () => L, + IndentLinesAction: () => A, + InsertLineAfterAction: () => P, + InsertLineBeforeAction: () => O, + JoinLinesAction: () => z, + LowerCaseAction: () => j, + SnakeCaseAction: () => q, + SortLinesAscendingAction: () => E, + SortLinesDescendingAction: () => I, + TitleCaseAction: () => K, + TransposeAction: () => V, + TrimTrailingWhitespaceAction: () => T, + UpperCaseAction: () => U + }); + var n = i(3580), + o = i(2258), + r = i(8728), + s = i(6830), + a = i(1329), + l = i(7295), + d = i(9386), + c = i(4314); + class h { + constructor(e, t) { + this._selection = e, this._cursors = t, this._selectionId = null + } + getEditOperations(e, t) { + let i = function(e, t) { + t.sort(((e, t) => e.lineNumber === t.lineNumber ? e.column - t.column : + e.lineNumber - t.lineNumber)); + for (let e = t.length - 2; e >= 0; e--) t[e].lineNumber === t[e + 1] + .lineNumber && t.splice(e, 1); + let i = [], + n = 0, + o = 0, + r = t.length; + for (let s = 1, a = e.getLineCount(); s <= a; s++) { + let a = e.getLineContent(s), + h = a.length + 1, + u = 0; + if (o < r && t[o].lineNumber === s && (u = t[o].column, o++, u === + h)) continue; + if (0 === a.length) continue; + let g = l.ow(a), + p = 0; + if (-1 === g) p = 1; + else { + if (g === a.length - 1) continue; + p = g + 2 + } + p = Math.max(u, p), i[n++] = d.h.delete(new c.e(s, p, s, h)) + } + return i + }(e, this._cursors); + for (let e = 0, n = i.length; e < n; e++) { + let n = i[e]; + t.addEditOperation(n.range, n.text) + } + this._selectionId = t.trackSelection(this._selection) + } + computeCursorState(e, t) { + return t.getTrackedSelection(this._selectionId) + } + } + var u = i(3582), + g = i(187), + p = i(3860), + m = i(9102); + class f { + constructor(e, t, i) { + this._selection = e, this._isCopyingDown = t, this._noop = i || !1, + this._selectionDirection = 0, this._selectionId = null, this._startLineNumberDelta = + 0, this._endLineNumberDelta = 0 + } + getEditOperations(e, t) { + let i = this._selection; + this._startLineNumberDelta = 0, this._endLineNumberDelta = 0, i.startLineNumber < + i.endLineNumber && 1 === i.endColumn && (this._endLineNumberDelta = 1, + i = i.setEndPosition(i.endLineNumber - 1, e.getLineMaxColumn(i.endLineNumber - + 1))); + let n = []; + for (let t = i.startLineNumber; t <= i.endLineNumber; t++) n.push(e.getLineContent( + t)); + const o = n.join("\n"); + "" === o && this._isCopyingDown && (this._startLineNumberDelta++, this + ._endLineNumberDelta++), this._noop ? t.addEditOperation(new c.e(i.endLineNumber, + e.getLineMaxColumn(i.endLineNumber), i.endLineNumber + 1, 1), i.endLineNumber === + e.getLineCount() ? "" : "\n") : this._isCopyingDown ? t.addEditOperation( + new c.e(i.startLineNumber, 1, i.startLineNumber, 1), o + "\n") : t.addEditOperation( + new c.e(i.endLineNumber, e.getLineMaxColumn(i.endLineNumber), i.endLineNumber, + e.getLineMaxColumn(i.endLineNumber)), "\n" + o), this._selectionId = + t.trackSelection(i), this._selectionDirection = this._selection.getDirection() + } + computeCursorState(e, t) { + let i = t.getTrackedSelection(this._selectionId); + if (0 !== this._startLineNumberDelta || 0 !== this._endLineNumberDelta) { + let e = i.startLineNumber, + t = i.startColumn, + n = i.endLineNumber, + o = i.endColumn; + 0 !== this._startLineNumberDelta && (e += this._startLineNumberDelta, + t = 1), 0 !== this._endLineNumberDelta && (n += this._endLineNumberDelta, + o = 1), i = p.Y.createWithDirection(e, t, n, o, this._selectionDirection) + } + return i + } + } + var _ = i(291), + b = i(7354), + v = i(3831), + w = i(1491); + class C { + constructor(e, t, i) { + this._selection = e, this._isMovingDown = t, this._autoIndent = i, + this._selectionId = null, this._moveEndLineSelectionShrink = !1 + } + getEditOperations(e, t) { + let i = e.getLineCount(); + if (this._isMovingDown && this._selection.endLineNumber === i) return + void(this._selectionId = t.trackSelection(this._selection)); + if (!this._isMovingDown && 1 === this._selection.startLineNumber) + return void(this._selectionId = t.trackSelection(this._selection)); + this._moveEndPositionDown = !1; + let n = this._selection; + n.startLineNumber < n.endLineNumber && 1 === n.endColumn && (this._moveEndPositionDown = ! + 0, n = n.setEndPosition(n.endLineNumber - 1, e.getLineMaxColumn(n.endLineNumber - + 1))); + const { + tabSize: o, + indentSize: r, + insertSpaces: s + } = e.getOptions(); + let a = this.buildIndentConverter(o, r, s), + d = { + getLineTokens: t => e.getLineTokens(t), + getLanguageIdentifier: () => e.getLanguageIdentifier(), + getLanguageIdAtPosition: (t, i) => e.getLanguageIdAtPosition(t, i), + getLineContent: null + }; + if (n.startLineNumber === n.endLineNumber && 1 === e.getLineMaxColumn( + n.startLineNumber)) { + let i = n.startLineNumber, + o = this._isMovingDown ? i + 1 : i - 1; + 1 === e.getLineMaxColumn(o) ? t.addEditOperation(new c.e(1, 1, 1, 1), + null) : (t.addEditOperation(new c.e(i, 1, i, 1), e.getLineContent(o)), + t.addEditOperation(new c.e(o, 1, o, e.getLineMaxColumn(o)), null)), + n = new p.Y(o, 1, o, 1) + } else { + let i, r; + if (this._isMovingDown) { + i = n.endLineNumber + 1, r = e.getLineContent(i), t.addEditOperation( + new c.e(i - 1, e.getLineMaxColumn(i - 1), i, e.getLineMaxColumn(i)), + null); + let h = r; + if (this.shouldAutoIndent(e, n)) { + let u = this.matchEnterRule(e, a, o, i, n.startLineNumber - 1); + if (null !== u) { + let t = l.V8(e.getLineContent(i)), + n = u + w.Y(t, o), + a = w.J(n, o, s); + h = a + this.trimLeft(r) + } else { + d.getLineContent = t => t === n.startLineNumber ? e.getLineContent( + i) : e.getLineContent(t); + let t = v.zu.getGoodIndentForLine(this._autoIndent, d, e.getLanguageIdAtPosition( + i, 1), n.startLineNumber, a); + if (null !== t) { + let n = l.V8(e.getLineContent(i)), + a = w.Y(t, o); + if (a !== w.Y(n, o)) { + let e = w.J(a, o, s); + h = e + this.trimLeft(r) + } + } + } + t.addEditOperation(new c.e(n.startLineNumber, 1, n.startLineNumber, + 1), h + "\n"); + let g = this.matchEnterRuleMovingDown(e, a, o, n.startLineNumber, i, + h); + if (null !== g) 0 !== g && this.getIndentEditsOfMovingBlock(e, t, n, + o, s, g); + else { + d.getLineContent = t => t === n.startLineNumber ? h : t >= n.startLineNumber + + 1 && t <= n.endLineNumber + 1 ? e.getLineContent(t - 1) : e.getLineContent( + t); + let r = v.zu.getGoodIndentForLine(this._autoIndent, d, e.getLanguageIdAtPosition( + i, 1), n.startLineNumber + 1, a); + if (null !== r) { + const i = l.V8(e.getLineContent(n.startLineNumber)), + a = w.Y(r, o), + d = w.Y(i, o); + if (a !== d) { + const i = a - d; + this.getIndentEditsOfMovingBlock(e, t, n, o, s, i) + } + } + } + } else t.addEditOperation(new c.e(n.startLineNumber, 1, n.startLineNumber, + 1), h + "\n") + } else if (i = n.startLineNumber - 1, r = e.getLineContent(i), t.addEditOperation( + new c.e(i, 1, i + 1, 1), null), t.addEditOperation(new c.e(n.endLineNumber, + e.getLineMaxColumn(n.endLineNumber), n.endLineNumber, e.getLineMaxColumn( + n.endLineNumber)), "\n" + r), this.shouldAutoIndent(e, n)) { + d.getLineContent = t => t === i ? e.getLineContent(n.startLineNumber) : + e.getLineContent(t); + let r = this.matchEnterRule(e, a, o, n.startLineNumber, n.startLineNumber - + 2); + if (null !== r) 0 !== r && this.getIndentEditsOfMovingBlock(e, t, n, + o, s, r); + else { + let r = v.zu.getGoodIndentForLine(this._autoIndent, d, e.getLanguageIdAtPosition( + n.startLineNumber, 1), i, a); + if (null !== r) { + let i = l.V8(e.getLineContent(n.startLineNumber)), + a = w.Y(r, o), + d = w.Y(i, o); + if (a !== d) { + let i = a - d; + this.getIndentEditsOfMovingBlock(e, t, n, o, s, i) + } + } + } + } + } + this._selectionId = t.trackSelection(n) + } + buildIndentConverter(e, t, i) { + return { + shiftIndent: n => _.U.shiftIndent(n, n.length + 1, e, t, i), + unshiftIndent: n => _.U.unshiftIndent(n, n.length + 1, e, t, i) + } + } + parseEnterResult(e, t, i, n, o) { + if (o) { + let r = o.indentation; + o.indentAction === b.wU.None || o.indentAction === b.wU.Indent ? r = + o.indentation + o.appendText : o.indentAction === b.wU.IndentOutdent ? + r = o.indentation : o.indentAction === b.wU.Outdent && (r = t.unshiftIndent( + o.indentation) + o.appendText); + let s = e.getLineContent(n); + if (this.trimLeft(s).indexOf(this.trimLeft(r)) >= 0) { + let o = l.V8(e.getLineContent(n)), + s = l.V8(r), + a = v.zu.getIndentMetadata(e, n); + return null !== a && 2 & a && (s = t.unshiftIndent(s)), w.Y(s, i) - + w.Y(o, i) + } + } + return null + } + matchEnterRuleMovingDown(e, t, i, n, o, r) { + if (l.ow(r) >= 0) { + let r = e.getLineMaxColumn(o), + s = v.zu.getEnterAction(this._autoIndent, e, new c.e(o, r, o, r)); + return this.parseEnterResult(e, t, i, n, s) + } { + let o = n - 1; + for (; o >= 1;) { + let t = e.getLineContent(o); + if (l.ow(t) >= 0) break; + o-- + } + if (o < 1 || n > e.getLineCount()) return null; + let r = e.getLineMaxColumn(o), + s = v.zu.getEnterAction(this._autoIndent, e, new c.e(o, r, o, r)); + return this.parseEnterResult(e, t, i, n, s) + } + } + matchEnterRule(e, t, i, n, o, r) { + let s = o; + for (; s >= 1;) { + let t; + if (t = s === o && void 0 !== r ? r : e.getLineContent(s), l.ow(t) >= + 0) break; + s-- + } + if (s < 1 || n > e.getLineCount()) return null; + let a = e.getLineMaxColumn(s), + d = v.zu.getEnterAction(this._autoIndent, e, new c.e(s, a, s, a)); + return this.parseEnterResult(e, t, i, n, d) + } + trimLeft(e) { + return e.replace(/^\s+/, "") + } + shouldAutoIndent(e, t) { + if (this._autoIndent < 4) return !1; + if (!e.isCheapToTokenize(t.startLineNumber)) return !1; + let i = e.getLanguageIdAtPosition(t.startLineNumber, 1); + return i === e.getLanguageIdAtPosition(t.endLineNumber, 1) && null !== + v.zu.getIndentRulesSupport(i) + } + getIndentEditsOfMovingBlock(e, t, i, n, o, r) { + for (let s = i.startLineNumber; s <= i.endLineNumber; s++) { + let a = e.getLineContent(s), + d = l.V8(a), + h = w.Y(d, n) + r, + u = w.J(h, n, o); + u !== d && (t.addEditOperation(new c.e(s, 1, s, d.length + 1), u), s === + i.endLineNumber && i.endColumn <= d.length + 1 && "" === u && (this + ._moveEndLineSelectionShrink = !0)) + } + } + computeCursorState(e, t) { + let i = t.getTrackedSelection(this._selectionId); + return this._moveEndPositionDown && (i = i.setEndPosition(i.endLineNumber + + 1, 1)), this._moveEndLineSelectionShrink && i.startLineNumber < i.endLineNumber && + (i = i.setEndPosition(i.endLineNumber, 2)), i + } + } + class y { + constructor(e, t) { + this.selection = e, this.descending = t, this.selectionId = null + } + static getCollator() { + return y._COLLATOR || (y._COLLATOR = new Intl.Collator), y._COLLATOR + } + getEditOperations(e, t) { + let i = function(e, t, i) { + let n = S(e, t, i); + return n ? d.h.replace(new c.e(n.startLineNumber, 1, n.endLineNumber, + e.getLineMaxColumn(n.endLineNumber)), n.after.join("\n")) : null + }(e, this.selection, this.descending); + i && t.addEditOperation(i.range, i.text), this.selectionId = t.trackSelection( + this.selection) + } + computeCursorState(e, t) { + return t.getTrackedSelection(this.selectionId) + } + static canRun(e, t, i) { + if (null === e) return !1; + let n = S(e, t, i); + if (!n) return !1; + for (let e = 0, t = n.before.length; e < t; e++) + if (n.before[e] !== n.after[e]) return !0; + return !1 + } + } + + function S(e, t, i) { + let n = t.startLineNumber, + o = t.endLineNumber; + if (1 === t.endColumn && o--, n >= o) return null; + let r = []; + for (let t = n; t <= o; t++) r.push(e.getLineContent(t)); + let s = r.slice(0); + return s.sort(y.getCollator().compare), !0 === i && (s = s.reverse()), { + startLineNumber: n, + endLineNumber: o, + before: r, + after: s + } + } + y._COLLATOR = null; + var x = i(4144); + class k extends s.R6 { + constructor(e, t) { + super(t), this.down = e + } + run(e, t) { + if (!t.hasModel()) return; + const i = t.getSelections().map(((e, t) => ({ + selection: e, + index: t, + ignore: !1 + }))); + i.sort(((e, t) => c.e.compareRangesUsingStarts(e.selection, t.selection))); + let n = i[0]; + for (let e = 1; e < i.length; e++) { + const t = i[e]; + n.selection.endLineNumber === t.selection.startLineNumber && (n.index < + t.index ? t.ignore = !0 : (n.ignore = !0, n = t)) + } + const o = []; + for (const e of i) o.push(new f(e.selection, this.down, e.ignore)); + t.pushUndoStop(), t.executeCommands(this.id, o), t.pushUndoStop() + } + } + class L extends s.R6 { + constructor() { + super({ + id: "editor.action.duplicateSelection", + label: n.N("duplicateSelection", "Duplicate Selection"), + alias: "Duplicate Selection", + precondition: m.u.writable, + menuOpts: { + menuId: x.eH.MenubarSelectionMenu, + group: "2_line", + title: n.N({ + key: "miDuplicateSelection", + comment: ["&& denotes a mnemonic"] + }, "&&Duplicate Selection"), + order: 5 + } + }) + } + run(e, t, i) { + if (!t.hasModel()) return; + const n = [], + o = t.getSelections(), + r = t.getModel(); + for (const e of o) + if (e.isEmpty()) n.push(new f(e, !0)); + else { + const t = new p.Y(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn); + n.push(new a.OY(t, r.getValueInRange(e))) + } + t.pushUndoStop(), t.executeCommands(this.id, n), t.pushUndoStop() + } + } + class N extends s.R6 { + constructor(e, t) { + super(t), this.down = e + } + run(e, t) { + let i = [], + n = t.getSelections() || []; + const o = t.getOption(9); + for (const e of n) i.push(new C(e, this.down, o)); + t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop() + } + } + class D extends s.R6 { + constructor(e, t) { + super(t), this.descending = e + } + run(e, t) { + const i = t.getSelections() || []; + for (const e of i) + if (!y.canRun(t.getModel(), e, this.descending)) return; + let n = []; + for (let e = 0, t = i.length; e < t; e++) n[e] = new y(i[e], this.descending); + t.pushUndoStop(), t.executeCommands(this.id, n), t.pushUndoStop() + } + } + class E extends D { + constructor() { + super(!1, { + id: "editor.action.sortLinesAscending", + label: n.N("lines.sortAscending", "Sort Lines Ascending"), + alias: "Sort Lines Ascending", + precondition: m.u.writable + }) + } + } + class I extends D { + constructor() { + super(!0, { + id: "editor.action.sortLinesDescending", + label: n.N("lines.sortDescending", "Sort Lines Descending"), + alias: "Sort Lines Descending", + precondition: m.u.writable + }) + } + } + class T extends s.R6 { + constructor() { + super({ + id: T.ID, + label: n.N("lines.trimTrailingWhitespace", + "Trim Trailing Whitespace"), + alias: "Trim Trailing Whitespace", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.editorTextFocus, + primary: (0, o.gx)(2089, 2102), + weight: 100 + } + }) + } + run(e, t, i) { + let n = []; + "auto-save" === i.reason && (n = (t.getSelections() || []).map((e => + new g.L(e.positionLineNumber, e.positionColumn)))); + let o = t.getSelection(); + if (null === o) return; + let r = new h(o, n); + t.pushUndoStop(), t.executeCommands(this.id, [r]), t.pushUndoStop() + } + } + T.ID = "editor.action.trimTrailingWhitespace"; + class M extends s.R6 { + constructor() { + super({ + id: "editor.action.deleteLines", + label: n.N("lines.delete", "Delete Line"), + alias: "Delete Line", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.textInputFocus, + primary: 3113, + weight: 100 + } + }) + } + run(e, t) { + if (!t.hasModel()) return; + let i = this._getLinesToRemove(t), + n = t.getModel(); + if (1 === n.getLineCount() && 1 === n.getLineMaxColumn(1)) return; + let o = 0, + r = [], + s = []; + for (let e = 0, t = i.length; e < t; e++) { + const t = i[e]; + let a = t.startLineNumber, + l = t.endLineNumber, + c = 1, + h = n.getLineMaxColumn(l); + l < n.getLineCount() ? (l += 1, h = 1) : a > 1 && (a -= 1, c = n.getLineMaxColumn( + a)), r.push(d.h.replace(new p.Y(a, c, l, h), "")), s.push(new p.Y( + a - o, t.positionColumn, a - o, t.positionColumn)), o += t.endLineNumber - + t.startLineNumber + 1 + } + t.pushUndoStop(), t.executeEdits(this.id, r, s), t.pushUndoStop() + } + _getLinesToRemove(e) { + let t = e.getSelections().map((e => { + let t = e.endLineNumber; + return e.startLineNumber < e.endLineNumber && 1 === e.endColumn && + (t -= 1), { + startLineNumber: e.startLineNumber, + selectionStartColumn: e.selectionStartColumn, + endLineNumber: t, + positionColumn: e.positionColumn + } + })); + t.sort(((e, t) => e.startLineNumber === t.startLineNumber ? e.endLineNumber - + t.endLineNumber : e.startLineNumber - t.startLineNumber)); + let i = [], + n = t[0]; + for (let e = 1; e < t.length; e++) n.endLineNumber + 1 >= t[e].startLineNumber ? + n.endLineNumber = t[e].endLineNumber : (i.push(n), n = t[e]); + return i.push(n), i + } + } + class A extends s.R6 { + constructor() { + super({ + id: "editor.action.indentLines", + label: n.N("lines.indent", "Indent Line"), + alias: "Indent Line", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.editorTextFocus, + primary: 2137, + weight: 100 + } + }) + } + run(e, t) { + const i = t._getViewModel(); + i && (t.pushUndoStop(), t.executeCommands(this.id, u.u.indent(i.cursorConfig, + t.getModel(), t.getSelections())), t.pushUndoStop()) + } + } + class R extends s.R6 { + constructor() { + super({ + id: "editor.action.outdentLines", + label: n.N("lines.outdent", "Outdent Line"), + alias: "Outdent Line", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.editorTextFocus, + primary: 2135, + weight: 100 + } + }) + } + run(e, t) { + r.CoreEditingCommands.Outdent.runEditorCommand(e, t, null) + } + } + class O extends s.R6 { + constructor() { + super({ + id: "editor.action.insertLineBefore", + label: n.N("lines.insertBefore", "Insert Line Above"), + alias: "Insert Line Above", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.editorTextFocus, + primary: 3075, + weight: 100 + } + }) + } + run(e, t) { + const i = t._getViewModel(); + i && (t.pushUndoStop(), t.executeCommands(this.id, u.u.lineInsertBefore( + i.cursorConfig, t.getModel(), t.getSelections()))) + } + } + class P extends s.R6 { + constructor() { + super({ + id: "editor.action.insertLineAfter", + label: n.N("lines.insertAfter", "Insert Line Below"), + alias: "Insert Line Below", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.editorTextFocus, + primary: 2051, + weight: 100 + } + }) + } + run(e, t) { + const i = t._getViewModel(); + i && (t.pushUndoStop(), t.executeCommands(this.id, u.u.lineInsertAfter( + i.cursorConfig, t.getModel(), t.getSelections()))) + } + } + class F extends s.R6 { + run(e, t) { + if (!t.hasModel()) return; + const i = t.getSelection(); + let n = this._getRangesToDelete(t), + o = []; + for (let e = 0, t = n.length - 1; e < t; e++) { + let t = n[e], + i = n[e + 1]; + null === c.e.intersectRanges(t, i) ? o.push(t) : n[e + 1] = c.e.plusRange( + t, i) + } + o.push(n[n.length - 1]); + let r = this._getEndCursorState(i, o), + s = o.map((e => d.h.replace(e, ""))); + t.pushUndoStop(), t.executeEdits(this.id, s, r), t.pushUndoStop() + } + } + class B extends F { + constructor() { + super({ + id: "deleteAllLeft", + label: n.N("lines.deleteAllLeft", "Delete All Left"), + alias: "Delete All Left", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.textInputFocus, + primary: 0, + mac: { + primary: 2049 + }, + weight: 100 + } + }) + } + _getEndCursorState(e, t) { + let i = null, + n = [], + o = 0; + return t.forEach((t => { + let r; + if (1 === t.endColumn && o > 0) { + let e = t.startLineNumber - o; + r = new p.Y(e, t.startColumn, e, t.startColumn) + } else r = new p.Y(t.startLineNumber, t.startColumn, t.startLineNumber, + t.startColumn); + o += t.endLineNumber - t.startLineNumber, t.intersectRanges(e) ? i = + r : n.push(r) + })), i && n.unshift(i), n + } + _getRangesToDelete(e) { + let t = e.getSelections(); + if (null === t) return []; + let i = t, + n = e.getModel(); + return null === n ? [] : (i.sort(c.e.compareRangesUsingStarts), i = i.map( + (e => { + if (e.isEmpty()) { + if (1 === e.startColumn) { + let t = Math.max(1, e.startLineNumber - 1), + i = 1 === e.startLineNumber ? 1 : n.getLineContent(t).length + + 1; + return new c.e(t, i, e.startLineNumber, 1) + } + return new c.e(e.startLineNumber, 1, e.startLineNumber, e.startColumn) + } + return new c.e(e.startLineNumber, 1, e.endLineNumber, e.endColumn) + })), i) + } + } + class W extends F { + constructor() { + super({ + id: "deleteAllRight", + label: n.N("lines.deleteAllRight", "Delete All Right"), + alias: "Delete All Right", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.textInputFocus, + primary: 0, + mac: { + primary: 297, + secondary: [2068] + }, + weight: 100 + } + }) + } + _getEndCursorState(e, t) { + let i = null, + n = []; + for (let o = 0, r = t.length, s = 0; o < r; o++) { + let r = t[o], + a = new p.Y(r.startLineNumber - s, r.startColumn, r.startLineNumber - + s, r.startColumn); + r.intersectRanges(e) ? i = a : n.push(a) + } + return i && n.unshift(i), n + } + _getRangesToDelete(e) { + let t = e.getModel(); + if (null === t) return []; + let i = e.getSelections(); + if (null === i) return []; + let n = i.map((e => { + if (e.isEmpty()) { + const i = t.getLineMaxColumn(e.startLineNumber); + return e.startColumn === i ? new c.e(e.startLineNumber, e.startColumn, + e.startLineNumber + 1, 1) : new c.e(e.startLineNumber, e.startColumn, + e.startLineNumber, i) + } + return e + })); + return n.sort(c.e.compareRangesUsingStarts), n + } + } + class z extends s.R6 { + constructor() { + super({ + id: "editor.action.joinLines", + label: n.N("lines.joinLines", "Join Lines"), + alias: "Join Lines", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.editorTextFocus, + primary: 0, + mac: { + primary: 296 + }, + weight: 100 + } + }) + } + run(e, t) { + let i = t.getSelections(); + if (null === i) return; + let n = t.getSelection(); + if (null === n) return; + i.sort(c.e.compareRangesUsingStarts); + let o = [], + r = i.reduce(((e, t) => e.isEmpty() ? e.endLineNumber === t.startLineNumber ? + (n.equalsSelection(e) && (n = t), t) : t.startLineNumber > e.endLineNumber + + 1 ? (o.push(e), t) : new p.Y(e.startLineNumber, e.startColumn, t.endLineNumber, + t.endColumn) : t.startLineNumber > e.endLineNumber ? (o.push(e), + t) : new p.Y(e.startLineNumber, e.startColumn, t.endLineNumber, t + .endColumn))); + o.push(r); + let s = t.getModel(); + if (null === s) return; + let a = [], + l = [], + h = n, + u = 0; + for (let e = 0, t = o.length; e < t; e++) { + let t, i, r = o[e], + g = r.startLineNumber, + m = 1, + f = 0, + _ = s.getLineContent(r.endLineNumber).length - r.endColumn; + if (r.isEmpty() || r.startLineNumber === r.endLineNumber) { + let e = r.getStartPosition(); + e.lineNumber < s.getLineCount() ? (t = g + 1, i = s.getLineMaxColumn( + t)) : (t = e.lineNumber, i = s.getLineMaxColumn(e.lineNumber)) + } else t = r.endLineNumber, i = s.getLineMaxColumn(t); + let b = s.getLineContent(g); + for (let e = g + 1; e <= t; e++) { + let t = s.getLineContent(e), + i = s.getLineFirstNonWhitespaceColumn(e); + if (i >= 1) { + let e = !0; + "" === b && (e = !1), !e || " " !== b.charAt(b.length - 1) && "\t" !== + b.charAt(b.length - 1) || (e = !1, b = b.replace( + /[\s\uFEFF\xA0]+$/g, " ")); + let n = t.substr(i - 1); + b += (e ? " " : "") + n, f = e ? n.length + 1 : n.length + } else f = 0 + } + let v = new c.e(g, m, t, i); + if (!v.isEmpty()) { + let e; + r.isEmpty() ? (a.push(d.h.replace(v, b)), e = new p.Y(v.startLineNumber - + u, b.length - f + 1, g - u, b.length - f + 1)) : r.startLineNumber === + r.endLineNumber ? (a.push(d.h.replace(v, b)), e = new p.Y(r.startLineNumber - + u, r.startColumn, r.endLineNumber - u, r.endColumn)) : (a.push(d.h + .replace(v, b)), e = new p.Y(r.startLineNumber - u, r.startColumn, + r.startLineNumber - u, b.length - _)), null !== c.e.intersectRanges( + v, n) ? h = e : l.push(e) + } + u += v.endLineNumber - v.startLineNumber + } + l.unshift(h), t.pushUndoStop(), t.executeEdits(this.id, a, l), t.pushUndoStop() + } + } + class V extends s.R6 { + constructor() { + super({ + id: "editor.action.transpose", + label: n.N("editor.transpose", + "Transpose characters around the cursor"), + alias: "Transpose characters around the cursor", + precondition: m.u.writable + }) + } + run(e, t) { + let i = t.getSelections(); + if (null === i) return; + let n = t.getModel(); + if (null === n) return; + let o = []; + for (let e = 0, t = i.length; e < t; e++) { + let t = i[e]; + if (!t.isEmpty()) continue; + let r = t.getStartPosition(), + s = n.getLineMaxColumn(r.lineNumber); + if (r.column >= s) { + if (r.lineNumber === n.getLineCount()) continue; + let e = new c.e(r.lineNumber, Math.max(1, r.column - 1), r.lineNumber + + 1, 1), + t = n.getValueInRange(e).split("").reverse().join(""); + o.push(new a.T4(new p.Y(r.lineNumber, Math.max(1, r.column - 1), r.lineNumber + + 1, 1), t)) + } else { + let e = new c.e(r.lineNumber, Math.max(1, r.column - 1), r.lineNumber, + r.column + 1), + t = n.getValueInRange(e).split("").reverse().join(""); + o.push(new a.hP(e, t, new p.Y(r.lineNumber, r.column + 1, r.lineNumber, + r.column + 1))) + } + } + t.pushUndoStop(), t.executeCommands(this.id, o), t.pushUndoStop() + } + } + class H extends s.R6 { + run(e, t) { + const i = t.getSelections(); + if (null === i) return; + const n = t.getModel(); + if (null === n) return; + const o = t.getOption(116), + r = []; + for (const e of i) + if (e.isEmpty()) { + const i = e.getStartPosition(), + s = t.getConfiguredWordAtPosition(i); + if (!s) continue; + const a = new c.e(i.lineNumber, s.startColumn, i.lineNumber, s.endColumn), + l = n.getValueInRange(a); + r.push(d.h.replace(a, this._modifyText(l, o))) + } else { + const t = n.getValueInRange(e); + r.push(d.h.replace(e, this._modifyText(t, o))) + } + t.pushUndoStop(), t.executeEdits(this.id, r), t.pushUndoStop() + } + } + class U extends H { + constructor() { + super({ + id: "editor.action.transformToUppercase", + label: n.N("editor.transformToUppercase", "Transform to Uppercase"), + alias: "Transform to Uppercase", + precondition: m.u.writable + }) + } + _modifyText(e, t) { + return e.toLocaleUpperCase() + } + } + class j extends H { + constructor() { + super({ + id: "editor.action.transformToLowercase", + label: n.N("editor.transformToLowercase", "Transform to Lowercase"), + alias: "Transform to Lowercase", + precondition: m.u.writable + }) + } + _modifyText(e, t) { + return e.toLocaleLowerCase() + } + } + class K extends H { + constructor() { + super({ + id: "editor.action.transformToTitlecase", + label: n.N("editor.transformToTitlecase", "Transform to Title Case"), + alias: "Transform to Title Case", + precondition: m.u.writable + }) + } + _modifyText(e, t) { + const i = ("\r\n\t " + t).split(""); + let n = "", + o = !0; + for (let t = 0; t < e.length; t++) { + let r = e[t]; + i.indexOf(r) >= 0 ? (o = !0, n += r) : o ? (o = !1, n += r.toLocaleUpperCase()) : + n += r.toLocaleLowerCase() + } + return n + } + } + class $ { + constructor(e, t) { + this._pattern = e, this._flags = t, this._actual = null, this._evaluated = ! + 1 + } + get() { + if (!this._evaluated) { + this._evaluated = !0; + try { + this._actual = new RegExp(this._pattern, this._flags) + } catch (e) {} + } + return this._actual + } + isSupported() { + return null !== this.get() + } + } + class q extends H { + constructor() { + super({ + id: "editor.action.transformToSnakecase", + label: n.N("editor.transformToSnakecase", "Transform to Snake Case"), + alias: "Transform to Snake Case", + precondition: m.u.writable + }) + } + _modifyText(e, t) { + const i = q.regExp1.get(), + n = q.regExp2.get(); + return i && n ? e.replace(i, "$1_$2").replace(n, "$1_$2$3").toLocaleLowerCase() : + e + } + } + q.regExp1 = new $("(\\p{Ll})(\\p{Lu})", "gmu"), q.regExp2 = new $( + "(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})", "gmu"), (0, s.Qr)(class extends k { + constructor() { + super(!1, { + id: "editor.action.copyLinesUpAction", + label: n.N("lines.copyUp", "Copy Line Up"), + alias: "Copy Line Up", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.editorTextFocus, + primary: 1552, + linux: { + primary: 3600 + }, + weight: 100 + }, + menuOpts: { + menuId: x.eH.MenubarSelectionMenu, + group: "2_line", + title: n.N({ + key: "miCopyLinesUp", + comment: ["&& denotes a mnemonic"] + }, "&&Copy Line Up"), + order: 1 + } + }) + } + }), (0, s.Qr)(class extends k { + constructor() { + super(!0, { + id: "editor.action.copyLinesDownAction", + label: n.N("lines.copyDown", "Copy Line Down"), + alias: "Copy Line Down", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.editorTextFocus, + primary: 1554, + linux: { + primary: 3602 + }, + weight: 100 + }, + menuOpts: { + menuId: x.eH.MenubarSelectionMenu, + group: "2_line", + title: n.N({ + key: "miCopyLinesDown", + comment: ["&& denotes a mnemonic"] + }, "Co&&py Line Down"), + order: 2 + } + }) + } + }), (0, s.Qr)(L), (0, s.Qr)(class extends N { + constructor() { + super(!1, { + id: "editor.action.moveLinesUpAction", + label: n.N("lines.moveUp", "Move Line Up"), + alias: "Move Line Up", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.editorTextFocus, + primary: 528, + linux: { + primary: 528 + }, + weight: 100 + }, + menuOpts: { + menuId: x.eH.MenubarSelectionMenu, + group: "2_line", + title: n.N({ + key: "miMoveLinesUp", + comment: ["&& denotes a mnemonic"] + }, "Mo&&ve Line Up"), + order: 3 + } + }) + } + }), (0, s.Qr)(class extends N { + constructor() { + super(!0, { + id: "editor.action.moveLinesDownAction", + label: n.N("lines.moveDown", "Move Line Down"), + alias: "Move Line Down", + precondition: m.u.writable, + kbOpts: { + kbExpr: m.u.editorTextFocus, + primary: 530, + linux: { + primary: 530 + }, + weight: 100 + }, + menuOpts: { + menuId: x.eH.MenubarSelectionMenu, + group: "2_line", + title: n.N({ + key: "miMoveLinesDown", + comment: ["&& denotes a mnemonic"] + }, "Move &&Line Down"), + order: 4 + } + }) + } + }), (0, s.Qr)(E), (0, s.Qr)(I), (0, s.Qr)(T), (0, s.Qr)(M), (0, s.Qr)(A), ( + 0, s.Qr)(R), (0, s.Qr)(O), (0, s.Qr)(P), (0, s.Qr)(B), (0, s.Qr)(W), (0, + s.Qr)(z), (0, s.Qr)(V), (0, s.Qr)(U), (0, s.Qr)(j), (0, s.Qr)(K), q.regExp1 + .isSupported() && q.regExp2.isSupported() && (0, s.Qr)(q) + }, + 674: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE: () => x, + LinkedEditingContribution: () => L, + LinkedEditingAction: () => E, + editorLinkedEditingBackground: () => M + }); + var n = i(3580), + o = i(6830), + r = i(9488), + s = i(5976), + a = i(187), + l = i(1050), + d = i(4314), + c = i(4101), + h = i(5393), + u = i(6281), + g = i(8819), + p = i(9102), + m = i(666), + f = i(1640), + _ = i(7301), + b = i(7295), + v = i(3910), + w = i(7781), + C = i(1264), + y = i(3831), + S = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + const x = new g.uy("LinkedEditingInputVisible", !1), + k = "linked-editing-decoration"; + let L = class e extends s.JT { + constructor(e, t) { + super(), this._debounceDuration = 200, this._localToDispose = this._register( + new s.SL), this._editor = e, this._enabled = !1, this._visibleContextKey = + x.bindTo(t), this._currentDecorations = [], this._languageWordPattern = + null, this._currentWordPattern = null, this._ignoreChangeEvent = !1, + this._localToDispose = this._register(new s.SL), this._rangeUpdateTriggerPromise = + null, this._rangeSyncTriggerPromise = null, this._currentRequest = + null, this._currentRequestPosition = null, this._currentRequestModelVersion = + null, this._register(this._editor.onDidChangeModel((() => this.reinitialize(! + 0)))), this._register(this._editor.onDidChangeConfiguration((e => { + (e.hasChanged(61) || e.hasChanged(81)) && this.reinitialize(!1) + }))), this._register(c.id.onDidChange((() => this.reinitialize(!1)))), + this._register(this._editor.onDidChangeModelLanguage((() => this.reinitialize(! + 0)))), this.reinitialize(!0) + } + static get(t) { + return t.getContribution(e.ID) + } + reinitialize(e) { + const t = this._editor.getModel(), + i = null !== t && (this._editor.getOption(61) || this._editor.getOption( + 81)) && c.id.has(t); + if (i === this._enabled && !e) return; + if (this._enabled = i, this.clearRanges(), this._localToDispose.clear(), ! + i || null === t) return; + this._languageWordPattern = y.zu.getWordDefinition(t.getLanguageIdentifier() + .id), this._localToDispose.add(t.onDidChangeLanguageConfiguration(( + () => { + this._languageWordPattern = y.zu.getWordDefinition(t.getLanguageIdentifier() + .id) + }))); + const n = new h.vp(this._debounceDuration), + o = () => { + this._rangeUpdateTriggerPromise = n.trigger((() => this.updateRanges()), + this._debounceDuration) + }, + r = new h.vp(0), + s = e => { + this._rangeSyncTriggerPromise = r.trigger((() => this._syncRanges(e))) + }; + this._localToDispose.add(this._editor.onDidChangeCursorPosition((() => { + o() + }))), this._localToDispose.add(this._editor.onDidChangeModelContent( + (e => { + if (!this._ignoreChangeEvent && this._currentDecorations.length > + 0) { + const i = t.getDecorationRange(this._currentDecorations[0]); + if (i && e.changes.every((e => i.intersectRanges(e.range)))) + return void s(this._currentDecorations) + } + o() + }))), this._localToDispose.add({ + dispose: () => { + n.cancel(), r.cancel() + } + }), this.updateRanges() + } + _syncRanges(e) { + if (!this._editor.hasModel() || e !== this._currentDecorations || 0 === + e.length) return; + const t = this._editor.getModel(), + i = t.getDecorationRange(e[0]); + if (!i || i.startLineNumber !== i.endLineNumber) return this.clearRanges(); + const n = t.getValueInRange(i); + if (this._currentWordPattern) { + const e = n.match(this._currentWordPattern); + if ((e ? e[0].length : 0) !== n.length) return this.clearRanges() + } + let o = []; + for (let i = 1, r = e.length; i < r; i++) { + const r = t.getDecorationRange(e[i]); + if (r) + if (r.startLineNumber !== r.endLineNumber) o.push({ + range: r, + text: n + }); + else { + let e = t.getValueInRange(r), + i = n, + s = r.startColumn, + a = r.endColumn; + const l = b.Mh(e, i); + s += l, e = e.substr(l), i = i.substr(l); + const c = b.P1(e, i); + a -= c, e = e.substr(0, e.length - c), i = i.substr(0, i.length - + c), s === a && 0 === i.length || o.push({ + range: new d.e(r.startLineNumber, s, r.endLineNumber, a), + text: i + }) + } + } + if (0 !== o.length) try { + this._editor.popUndoStop(), this._ignoreChangeEvent = !0; + const e = this._editor._getViewModel().getPrevEditOperationType(); + this._editor.executeEdits("linkedEditing", o), this._editor._getViewModel() + .setPrevEditOperationType(e) + } finally { + this._ignoreChangeEvent = !1 + } + } + dispose() { + this.clearRanges(), super.dispose() + } + clearRanges() { + this._visibleContextKey.set(!1), this._currentDecorations = this._editor + .deltaDecorations(this._currentDecorations, []), this._currentRequest && + (this._currentRequest.cancel(), this._currentRequest = null, this._currentRequestPosition = + null) + } + updateRanges(t = !1) { + return S(this, void 0, void 0, (function*() { + if (!this._editor.hasModel()) return void this.clearRanges(); + const i = this._editor.getPosition(); + if (!this._enabled && !t || this._editor.getSelections().length > + 1) return void this.clearRanges(); + const n = this._editor.getModel(), + o = n.getVersionId(); + if (this._currentRequestPosition && this._currentRequestModelVersion === + o) { + if (i.equals(this._currentRequestPosition)) return; + if (this._currentDecorations && this._currentDecorations.length > + 0) { + const e = n.getDecorationRange(this._currentDecorations[0]); + if (e && e.containsPosition(i)) return + } + } + this._currentRequestPosition = i, this._currentRequestModelVersion = + o; + const r = (0, h.PG)((t => S(this, void 0, void 0, (function*() { + try { + const s = yield T(n, i, t); + if (r !== this._currentRequest) return; + if (this._currentRequest = null, o !== n.getVersionId()) + return; + let a = []; + (null == s ? void 0 : s.ranges) && (a = s.ranges), this._currentWordPattern = + (null == s ? void 0 : s.wordPattern) || this._languageWordPattern; + let l = !1; + for (let e = 0, t = a.length; e < t; e++) + if (d.e.containsPosition(a[e], i)) { + if (l = !0, 0 !== e) { + const t = a[e]; + a.splice(e, 1), a.unshift(t) + } + break + } + if (!l) return void this.clearRanges(); + const c = a.map((t => ({ + range: t, + options: e.DECORATION + }))); + this._visibleContextKey.set(!0), this._currentDecorations = + this._editor.deltaDecorations(this._currentDecorations, c) + } catch (e) { + (0, _.VV)(e) || (0, _.dL)(e), this._currentRequest !== r && + this._currentRequest || this.clearRanges() + } + })))); + return this._currentRequest = r, r + })) + } + }; + var N, D; + L.ID = "editor.contrib.linkedEditing", L.DECORATION = u.qx.register({ + description: "linked-editing", + stickiness: 0, + className: k + }), L = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(N = 1, D = g.i6, function(e, t) { + D(e, t, N) + })], L); + class E extends o.R6 { + constructor() { + super({ + id: "editor.action.linkedEditing", + label: n.N("linkedEditing.label", "Start Linked Editing"), + alias: "Start Linked Editing", + precondition: g.Ao.and(p.u.writable, p.u.hasRenameProvider), + kbOpts: { + kbExpr: p.u.editorTextFocus, + primary: 3132, + weight: 100 + } + }) + } + runCommand(e, t) { + const i = e.get(f.$), + [n, o] = Array.isArray(t) && t || [void 0, void 0]; + return m.o.isUri(n) && a.L.isIPosition(o) ? i.openCodeEditor({ + resource: n + }, i.getActiveCodeEditor()).then((e => { + e && (e.setPosition(o), e.invokeWithinContext((t => (this.reportTelemetry( + t, e), this.run(t, e))))) + }), _.dL) : super.runCommand(e, t) + } + run(e, t) { + const i = L.get(t); + return i ? Promise.resolve(i.updateRanges(!0)) : Promise.resolve() + } + } + const I = o._l.bindToContribution(L.get); + + function T(e, t, i) { + const n = c.id.ordered(e); + return (0, h.Ps)(n.map((n => () => S(this, void 0, void 0, (function*() { + try { + return yield n.provideLinkedEditingRanges(e, t, i) + } catch (e) { + return void(0, _.Cp)(e) + } + })))), (e => !!e && r.Of(null == e ? void 0 : e.ranges))) + }(0, o.fK)(new I({ + id: "cancelLinkedEditingInput", + precondition: x, + handler: e => e.clearRanges(), + kbOpts: { + kbExpr: p.u.editorTextFocus, + weight: 199, + primary: 9, + secondary: [1033] + } + })); + const M = (0, v.P6)("editor.linkedEditingBackground", { + dark: C.Il.fromHex("#f00").transparent(.3), + light: C.Il.fromHex("#f00").transparent(.3), + hc: C.Il.fromHex("#f00").transparent(.3) + }, n.N("editorLinkedEditingBackground", + "Background color when the editor auto renames on type.")); + (0, w.Ic)(((e, t) => { + const i = e.getColor(M); + i && t.addRule( + `.monaco-editor .${k} { background: ${i}; border-left-color: ${i}; }` + ) + })), (0, o.sb)("_executeLinkedEditingProvider", ((e, t) => T(e, t, l.T.None))), ( + 0, o._K)(L.ID, L), (0, o.Qr)(E) + }, + 370: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + LinkDetector: () => q + }); + var n = i(3379), + o = i.n(n), + r = i(7795), + s = i.n(r), + a = i(569), + l = i.n(a), + d = i(3565), + c = i.n(d), + h = i(9216), + u = i.n(h), + g = i(4589), + p = i.n(g), + m = i(7854), + f = {}; + f.styleTagTransform = p(), f.setAttributes = c(), f.insert = l().bind( + null, "head"), f.domAPI = s(), f.insertStyleElement = u(), o()(m.Z, f), + m.Z && m.Z.locals && m.Z.locals; + var _ = i(3580), + b = i(5393), + v = i(1050), + w = i(7301), + C = i(9365), + y = i(5976), + S = i(1432), + x = i(6830), + k = i(6281), + L = i(4101), + N = i(9241), + D = i(666), + E = i(4314), + I = i(1200), + T = i(4565), + M = i(9488), + A = i(8401), + R = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class O { + constructor(e, t) { + this._link = e, this._provider = t + } + toJSON() { + return { + range: this.range, + url: this.url, + tooltip: this.tooltip + } + } + get range() { + return this._link.range + } + get url() { + return this._link.url + } + get tooltip() { + return this._link.tooltip + } + resolve(e) { + return R(this, void 0, void 0, (function*() { + return this._link.url ? this._link.url : "function" == typeof this + ._provider.resolveLink ? Promise.resolve(this._provider.resolveLink( + this._link, e)).then((t => (this._link = t || this._link, this._link + .url ? this.resolve(e) : Promise.reject(new Error("missing"))))) : + Promise.reject(new Error("missing")) + })) + } + } + class P { + constructor(e) { + this._disposables = new y.SL; + let t = []; + for (const [i, n] of e) { + const e = i.links.map((e => new O(e, n))); + t = P._union(t, e), (0, y.Wf)(i) && this._disposables.add(i) + } + this.links = t + } + dispose() { + this._disposables.dispose(), this.links.length = 0 + } + static _union(e, t) { + let i, n, o, r, s = []; + for (i = 0, o = 0, n = e.length, r = t.length; i < n && o < r;) { + const n = e[i], + r = t[o]; + E.e.areIntersectingOrTouching(n.range, r.range) ? i++ : E.e.compareRangesUsingStarts( + n.range, r.range) < 0 ? (s.push(n), i++) : (s.push(r), o++) + } + for (; i < n; i++) s.push(e[i]); + for (; o < r; o++) s.push(t[o]); + return s + } + } + + function F(e, t) { + const i = [], + n = L.pM.ordered(e).reverse().map(((n, o) => Promise.resolve(n.provideLinks( + e, t)).then((e => { + e && (i[o] = [e, n]) + }), w.Cp))); + return Promise.all(n).then((() => { + const e = new P((0, M.kX)(i)); + return t.isCancellationRequested ? (e.dispose(), new P([])) : e + })) + } + T.P.registerCommand("_executeLinkProvider", ((e, ...t) => R(void 0, void 0, + void 0, (function*() { + let [i, n] = t; + (0, A.p_)(i instanceof D.o), "number" != typeof n && (n = 0); + const o = e.get(I.q).getModel(i); + if (!o) return []; + const r = yield F(o, v.T.None); + if (!r) return []; + for (let e = 0; e < Math.min(n, r.links.length); e++) yield r.links[ + e].resolve(v.T.None); + const s = r.links.slice(0); + return r.dispose(), s + })))); + var B = i(9422), + W = i(988), + z = i(3910), + V = i(7781), + H = i(6663), + U = i(5935), + j = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const K = { + general: k.qx.register({ + description: "detected-link", + stickiness: 1, + collapseOnReplaceEdit: !0, + inlineClassName: "detected-link" + }), + active: k.qx.register({ + description: "detected-link-active", + stickiness: 1, + collapseOnReplaceEdit: !0, + inlineClassName: "detected-link-active" + }) + }; + class $ { + constructor(e, t) { + this.link = e, this.decorationId = t + } + static decoration(e, t) { + return { + range: e.range, + options: $._getOptions(e, t, !1) + } + } + static _getOptions(e, t, i) { + const n = Object.assign({}, i ? K.active : K.general); + return n.hoverMessage = function(e, t) { + const i = e.url && /^command:/i.test(e.url.toString()), + n = e.tooltip ? e.tooltip : i ? _.N("links.navigate.executeCmd", + "Execute command") : _.N("links.navigate.follow", "Follow link"), + o = t ? S.dz ? _.N("links.navigate.kb.meta.mac", "cmd + click") : _ + .N("links.navigate.kb.meta", "ctrl + click") : S.dz ? _.N( + "links.navigate.kb.alt.mac", "option + click") : _.N( + "links.navigate.kb.alt", "alt + click"); + if (e.url) { + let t = ""; + if (/^command:/i.test(e.url.toString())) { + const i = e.url.toString().match(/^command:([^?#]+)/); + if (i) { + const e = i[1]; + t = ` "${_.N("tooltip.explanation","Execute command {0}",e)}"` + } + } + return new C.W5("", !0).appendMarkdown( + `[${n}](${e.url.toString(!0)}${t}) (${o})`) + } + return (new C.W5).appendText(`${n} (${o})`) + }(e, t), n + } + activate(e, t) { + e.changeDecorationOptions(this.decorationId, $._getOptions(this.link, + t, !0)) + } + deactivate(e, t) { + e.changeDecorationOptions(this.decorationId, $._getOptions(this.link, + t, !1)) + } + } + let q = class e { + constructor(e, t, i) { + this.listenersToRemove = new y.SL, this.editor = e, this.openerService = + t, this.notificationService = i; + let n = new N.yN(e); + this.listenersToRemove.add(n), this.listenersToRemove.add(n.onMouseMoveOrRelevantKeyDown( + (([e, t]) => { + this._onEditorMouseMove(e, t) + }))), this.listenersToRemove.add(n.onExecute((e => { + this.onEditorMouseUp(e) + }))), this.listenersToRemove.add(n.onCancel((e => { + this.cleanUpActiveLinkDecoration() + }))), this.enabled = e.getOption(62), this.listenersToRemove.add(e.onDidChangeConfiguration( + (t => { + const i = e.getOption(62); + this.enabled !== i && (this.enabled = i, this.updateDecorations( + []), this.stop(), this.beginCompute()) + }))), this.listenersToRemove.add(e.onDidChangeModelContent((e => + this.onChange()))), this.listenersToRemove.add(e.onDidChangeModel(( + e => this.onModelChanged()))), this.listenersToRemove.add(e.onDidChangeModelLanguage( + (e => this.onModelModeChanged()))), this.listenersToRemove.add(L.pM + .onDidChange((e => this.onModelModeChanged()))), this.timeout = new b + ._F, this.computePromise = null, this.activeLinksList = null, this.currentOccurrences = {}, + this.activeLinkDecorationId = null, this.beginCompute() + } + static get(t) { + return t.getContribution(e.ID) + } + onModelChanged() { + this.currentOccurrences = {}, this.activeLinkDecorationId = null, + this.stop(), this.beginCompute() + } + onModelModeChanged() { + this.stop(), this.beginCompute() + } + onChange() { + this.timeout.setIfNotSet((() => this.beginCompute()), e.RECOMPUTE_TIME) + } + beginCompute() { + return e = this, t = void 0, n = function*() { + if (!this.editor.hasModel() || !this.enabled) return; + const e = this.editor.getModel(); + if (L.pM.has(e)) { + this.activeLinksList && (this.activeLinksList.dispose(), this.activeLinksList = + null), this.computePromise = b.PG((t => F(e, t))); + try { + this.activeLinksList = yield this.computePromise, this.updateDecorations( + this.activeLinksList.links) + } catch (e) { + (0, w.dL)(e) + } finally { + this.computePromise = null + } + } + }, new((i = void 0) || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })); + var e, t, i, n + } + updateDecorations(e) { + const t = "altKey" === this.editor.getOption(69); + let i = [], + n = Object.keys(this.currentOccurrences); + for (let e = 0, t = n.length; e < t; e++) { + let t = n[e], + o = this.currentOccurrences[t]; + i.push(o.decorationId) + } + let o = []; + if (e) + for (const i of e) o.push($.decoration(i, t)); + let r = this.editor.deltaDecorations(i, o); + this.currentOccurrences = {}, this.activeLinkDecorationId = null; + for (let t = 0, i = r.length; t < i; t++) { + let i = new $(e[t], r[t]); + this.currentOccurrences[i.decorationId] = i + } + } + _onEditorMouseMove(e, t) { + const i = "altKey" === this.editor.getOption(69); + if (this.isEnabled(e, t)) { + this.cleanUpActiveLinkDecoration(); + const t = this.getLinkOccurrence(e.target.position); + t && this.editor.changeDecorations((e => { + t.activate(e, i), this.activeLinkDecorationId = t.decorationId + })) + } else this.cleanUpActiveLinkDecoration() + } + cleanUpActiveLinkDecoration() { + const e = "altKey" === this.editor.getOption(69); + if (this.activeLinkDecorationId) { + const t = this.currentOccurrences[this.activeLinkDecorationId]; + t && this.editor.changeDecorations((i => { + t.deactivate(i, e) + })), this.activeLinkDecorationId = null + } + } + onEditorMouseUp(e) { + if (!this.isEnabled(e)) return; + const t = this.getLinkOccurrence(e.target.position); + t && this.openLinkOccurrence(t, e.hasSideBySideModifier, !0) + } + openLinkOccurrence(e, t, i = !1) { + if (!this.openerService) return; + const { + link: n + } = e; + n.resolve(v.T.None).then((e => { + if ("string" == typeof e && this.editor.hasModel()) { + const t = this.editor.getModel().uri; + if (t.scheme === H.lg.file && e.startsWith(`${H.lg.file}:`)) { + const i = D.o.parse(e); + if (i.scheme === H.lg.file) { + const n = U.z_(i); + let o = null; + n.startsWith("/./") ? o = `.${n.substr(1)}` : n.startsWith( + "//./") && (o = `.${n.substr(2)}`), o && (e = U.Vo(t, o)) + } + } + } + return this.openerService.open(e, { + openToSide: t, + fromUserGesture: i, + allowContributedOpeners: !0, + allowCommands: !0 + }) + }), (e => { + const t = e instanceof Error ? e.message : e; + "invalid" === t ? this.notificationService.warn(_.N("invalid.url", + "Failed to open this link because it is not well-formed: {0}", + n.url.toString())) : "missing" === t ? this.notificationService + .warn(_.N("missing.url", + "Failed to open this link because its target is missing.")) : ( + 0, w.dL)(e) + })) + } + getLinkOccurrence(e) { + if (!this.editor.hasModel() || !e) return null; + const t = this.editor.getModel().getDecorationsInRange({ + startLineNumber: e.lineNumber, + startColumn: e.column, + endLineNumber: e.lineNumber, + endColumn: e.column + }, 0, !0); + for (const e of t) { + const t = this.currentOccurrences[e.id]; + if (t) return t + } + return null + } + isEnabled(e, t) { + return Boolean(6 === e.target.type && (e.hasTriggerModifier || t && t + .keyCodeIsTriggerKey)) + } + stop() { + var e; + this.timeout.cancel(), this.activeLinksList && (null === (e = this.activeLinksList) || + void 0 === e || e.dispose(), this.activeLinksList = null), this.computePromise && + (this.computePromise.cancel(), this.computePromise = null) + } + dispose() { + this.listenersToRemove.dispose(), this.stop(), this.timeout.dispose() + } + }; + q.ID = "editor.linkDetector", q.RECOMPUTE_TIME = 1e3, q = function(e, t, + i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([j(1, W.v4), j(2, B.lT)], q); + class Z extends x.R6 { + constructor() { + super({ + id: "editor.action.openLink", + label: _.N("label", "Open Link"), + alias: "Open Link", + precondition: void 0 + }) + } + run(e, t) { + let i = q.get(t); + if (!i) return; + if (!t.hasModel()) return; + let n = t.getSelections(); + for (let e of n) { + let t = i.getLinkOccurrence(e.getEndPosition()); + t && i.openLinkOccurrence(t, !1) + } + } + }(0, x._K)(q.ID, q), (0, x.Qr)(Z), (0, V.Ic)(((e, t) => { + const i = e.getColor(z._Y); + i && t.addRule( + `.monaco-editor .detected-link-active { color: ${i} !important; }`) + })) + }, + 845: (e, t, i) => { + "use strict"; + i.d(t, { + O: () => N + }); + var n = i(3379), + o = i.n(n), + r = i(7795), + s = i.n(r), + a = i(569), + l = i.n(a), + d = i(3565), + c = i.n(d), + h = i(9216), + u = i.n(h), + g = i(4589), + p = i.n(g), + m = i(1356), + f = {}; + f.styleTagTransform = p(), f.setAttributes = c(), f.insert = l().bind( + null, "head"), f.domAPI = s(), f.insertStyleElement = u(), o()(m.Z, f), + m.Z && m.Z.locals && m.Z.locals; + var _ = i(3580), + b = i(5393), + v = i(5976), + w = i(6346), + C = i(4314), + y = i(6830), + S = i(8819), + x = i(7781), + k = i(3910), + L = i(2321); + let N = class e { + constructor(t, i) { + this._messageWidget = new v.XK, this._messageListeners = new v.SL, + this._editor = t, this._visible = e.MESSAGE_VISIBLE.bindTo(i), this._editorListener = + this._editor.onDidAttemptReadOnlyEdit((() => this._onDidAttemptReadOnlyEdit())) + } + static get(t) { + return t.getContribution(e.ID) + } + dispose() { + this._editorListener.dispose(), this._messageListeners.dispose(), + this._messageWidget.dispose(), this._visible.reset() + } + showMessage(e, t) { + let i; + (0, w.Z9)(e), this._visible.set(!0), this._messageWidget.clear(), + this._messageListeners.clear(), this._messageWidget.value = new T( + this._editor, t, e), this._messageListeners.add(this._editor.onDidBlurEditorText( + (() => this.closeMessage()))), this._messageListeners.add(this._editor + .onDidChangeCursorPosition((() => this.closeMessage()))), this._messageListeners + .add(this._editor.onDidDispose((() => this.closeMessage()))), this._messageListeners + .add(this._editor.onDidChangeModel((() => this.closeMessage()))), + this._messageListeners.add(new b._F((() => this.closeMessage()), 3e3)), + this._messageListeners.add(this._editor.onMouseMove((e => { + e.target.position && (i ? i.containsPosition(e.target.position) || + this.closeMessage() : i = new C.e(t.lineNumber - 3, 1, e.target + .position.lineNumber + 3, 1)) + }))) + } + closeMessage() { + this._visible.reset(), this._messageListeners.clear(), this._messageWidget + .value && this._messageListeners.add(T.fadeOut(this._messageWidget.value)) + } + _onDidAttemptReadOnlyEdit() { + this._editor.hasModel() && this.showMessage(_.N("editor.readonly", + "Cannot edit in read-only editor"), this._editor.getPosition()) + } + }; + var D, E; + N.ID = "editor.contrib.messageController", N.MESSAGE_VISIBLE = new S.uy( + "messageVisible", !1, _.N("messageVisible", + "Whether the editor is currently showing an inline message")), N = + function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(D = 1, E = S.i6, function(e, t) { + E(e, t, D) + })], N); + const I = y._l.bindToContribution(N.get); + (0, y.fK)(new I({ + id: "leaveEditorMessage", + precondition: N.MESSAGE_VISIBLE, + handler: e => e.closeMessage(), + kbOpts: { + weight: 130, + primary: 9 + } + })); + class T { + constructor(e, { + lineNumber: t, + column: i + }, n) { + this.allowEditorOverflow = !0, this.suppressMouseDown = !1, this._editor = + e, this._editor.revealLinesInCenterIfOutsideViewport(t, t, 0), this._position = { + lineNumber: t, + column: i - 1 + }, this._domNode = document.createElement("div"), this._domNode.classList + .add("monaco-editor-overlaymessage"); + const o = document.createElement("div"); + o.classList.add("anchor", "top"), this._domNode.appendChild(o); + const r = document.createElement("div"); + r.classList.add("message"), r.textContent = n, this._domNode.appendChild( + r); + const s = document.createElement("div"); + s.classList.add("anchor", "below"), this._domNode.appendChild(s), this + ._editor.addContentWidget(this), this._domNode.classList.add("fadeIn") + } + static fadeOut(e) { + let t; + const i = () => { + e.dispose(), clearTimeout(t), e.getDomNode().removeEventListener( + "animationend", i) + }; + return t = setTimeout(i, 110), e.getDomNode().addEventListener( + "animationend", i), e.getDomNode().classList.add("fadeOut"), { + dispose: i + } + } + dispose() { + this._editor.removeContentWidget(this) + } + getId() { + return "messageoverlay" + } + getDomNode() { + return this._domNode + } + getPosition() { + return { + position: this._position, + preference: [1, 2] + } + } + afterRender(e) { + this._domNode.classList.toggle("below", 2 === e) + } + }(0, y._K)(N.ID, N), (0, x.Ic)(((e, t) => { + const i = e.getColor(k.EP); + if (i) { + let n = e.type === L.e.HIGH_CONTRAST ? 2 : 1; + t.addRule( + `.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${i}; }` + ), t.addRule( + `.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${i}; }` + ), t.addRule( + `.monaco-editor .monaco-editor-overlaymessage .message { border: ${n}px solid ${i}; }` + ) + } + const n = e.getColor(k._l); + n && t.addRule( + `.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${n}; }` + ); + const o = e.getColor(k.YI); + o && t.addRule( + `.monaco-editor .monaco-editor-overlaymessage .message { color: ${o}; }` + ) + })) + }, + 8486: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + InsertCursorAbove: () => y, + InsertCursorBelow: () => S, + MultiCursorSessionResult: () => N, + MultiCursorSession: () => D, + MultiCursorSelectionController: () => E, + MultiCursorSelectionControllerAction: () => I, + AddSelectionToNextFindMatchAction: () => T, + AddSelectionToPreviousFindMatchAction: () => M, + MoveSelectionToNextFindMatchAction: () => A, + MoveSelectionToPreviousFindMatchAction: () => R, + SelectHighlightsAction: () => O, + CompatChangeAll: () => P, + SelectionHighlighter: () => B + }); + var n = i(3580), + o = i(5393), + r = i(2258), + s = i(5976), + a = i(6346), + l = i(6830), + d = i(3814), + c = i(4314), + h = i(3860), + u = i(9102), + g = i(4973), + p = i(6281), + m = i(4101), + f = i(255), + _ = i(4144), + b = i(3910), + v = i(7781), + w = i(8819); + + function C(e, t) { + const i = t.filter((t => !e.find((e => e.equals(t))))); + if (i.length >= 1) { + const e = i.map((e => + `line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}` + )).join(", "), + t = 1 === i.length ? n.N("cursorAdded", "Cursor added: {0}", e) : n.N( + "cursorsAdded", "Cursors added: {0}", e); + (0, a.i7)(t) + } + } + class y extends l.R6 { + constructor() { + super({ + id: "editor.action.insertCursorAbove", + label: n.N("mutlicursor.insertAbove", "Add Cursor Above"), + alias: "Add Cursor Above", + precondition: void 0, + kbOpts: { + kbExpr: u.u.editorTextFocus, + primary: 2576, + linux: { + primary: 1552, + secondary: [3088] + }, + weight: 100 + }, + menuOpts: { + menuId: _.eH.MenubarSelectionMenu, + group: "3_multi", + title: n.N({ + key: "miInsertCursorAbove", + comment: ["&& denotes a mnemonic"] + }, "&&Add Cursor Above"), + order: 2 + } + }) + } + run(e, t, i) { + if (!t.hasModel()) return; + const n = i && !0 === i.logicalLine, + o = t._getViewModel(); + if (o.cursorConfig.readOnly) return; + o.pushStackElement(); + const r = o.getCursorStates(); + o.setCursorStates(i.source, 3, d.P.addCursorUp(o, r, n)), o.revealTopMostCursor( + i.source), C(r, o.getCursorStates()) + } + } + class S extends l.R6 { + constructor() { + super({ + id: "editor.action.insertCursorBelow", + label: n.N("mutlicursor.insertBelow", "Add Cursor Below"), + alias: "Add Cursor Below", + precondition: void 0, + kbOpts: { + kbExpr: u.u.editorTextFocus, + primary: 2578, + linux: { + primary: 1554, + secondary: [3090] + }, + weight: 100 + }, + menuOpts: { + menuId: _.eH.MenubarSelectionMenu, + group: "3_multi", + title: n.N({ + key: "miInsertCursorBelow", + comment: ["&& denotes a mnemonic"] + }, "A&&dd Cursor Below"), + order: 3 + } + }) + } + run(e, t, i) { + if (!t.hasModel()) return; + const n = i && !0 === i.logicalLine, + o = t._getViewModel(); + if (o.cursorConfig.readOnly) return; + o.pushStackElement(); + const r = o.getCursorStates(); + o.setCursorStates(i.source, 3, d.P.addCursorDown(o, r, n)), o.revealBottomMostCursor( + i.source), C(r, o.getCursorStates()) + } + } + class x extends l.R6 { + constructor() { + super({ + id: "editor.action.insertCursorAtEndOfEachLineSelected", + label: n.N("mutlicursor.insertAtEndOfEachLineSelected", + "Add Cursors to Line Ends"), + alias: "Add Cursors to Line Ends", + precondition: void 0, + kbOpts: { + kbExpr: u.u.editorTextFocus, + primary: 1575, + weight: 100 + }, + menuOpts: { + menuId: _.eH.MenubarSelectionMenu, + group: "3_multi", + title: n.N({ + key: "miInsertCursorAtEndOfEachLineSelected", + comment: ["&& denotes a mnemonic"] + }, "Add C&&ursors to Line Ends"), + order: 4 + } + }) + } + getCursorsForSelection(e, t, i) { + if (!e.isEmpty()) { + for (let n = e.startLineNumber; n < e.endLineNumber; n++) { + let e = t.getLineMaxColumn(n); + i.push(new h.Y(n, e, n, e)) + } + e.endColumn > 1 && i.push(new h.Y(e.endLineNumber, e.endColumn, e.endLineNumber, + e.endColumn)) + } + } + run(e, t) { + if (!t.hasModel()) return; + const i = t.getModel(), + n = t.getSelections(), + o = t._getViewModel(), + r = o.getCursorStates(); + let s = []; + n.forEach((e => this.getCursorsForSelection(e, i, s))), s.length > 0 && + t.setSelections(s), C(r, o.getCursorStates()) + } + } + class k extends l.R6 { + constructor() { + super({ + id: "editor.action.addCursorsToBottom", + label: n.N("mutlicursor.addCursorsToBottom", + "Add Cursors To Bottom"), + alias: "Add Cursors To Bottom", + precondition: void 0 + }) + } + run(e, t) { + if (!t.hasModel()) return; + const i = t.getSelections(), + n = t.getModel().getLineCount(); + let o = []; + for (let e = i[0].startLineNumber; e <= n; e++) o.push(new h.Y(e, i[0] + .startColumn, e, i[0].endColumn)); + const r = t._getViewModel(), + s = r.getCursorStates(); + o.length > 0 && t.setSelections(o), C(s, r.getCursorStates()) + } + } + class L extends l.R6 { + constructor() { + super({ + id: "editor.action.addCursorsToTop", + label: n.N("mutlicursor.addCursorsToTop", "Add Cursors To Top"), + alias: "Add Cursors To Top", + precondition: void 0 + }) + } + run(e, t) { + if (!t.hasModel()) return; + const i = t.getSelections(); + let n = []; + for (let e = i[0].startLineNumber; e >= 1; e--) n.push(new h.Y(e, i[0] + .startColumn, e, i[0].endColumn)); + const o = t._getViewModel(), + r = o.getCursorStates(); + n.length > 0 && t.setSelections(n), C(r, o.getCursorStates()) + } + } + class N { + constructor(e, t, i) { + this.selections = e, this.revealRange = t, this.revealScrollType = i + } + } + class D { + constructor(e, t, i, n, o, r, s) { + this._editor = e, this.findController = t, this.isDisconnectedFromFindController = + i, this.searchText = n, this.wholeWord = o, this.matchCase = r, this.currentMatch = + s + } + static create(e, t) { + if (!e.hasModel()) return null; + const i = t.getState(); + if (!e.hasTextFocus() && i.isRevealed && i.searchString.length > 0) + return new D(e, t, !1, i.searchString, i.wholeWord, i.matchCase, null); + let n, o, r = !1; + const s = e.getSelections(); + 1 === s.length && s[0].isEmpty() ? (r = !0, n = !0, o = !0) : (n = i.wholeWord, + o = i.matchCase); + const a = e.getSelection(); + let l, d = null; + if (a.isEmpty()) { + const t = e.getConfiguredWordAtPosition(a.getStartPosition()); + if (!t) return null; + l = t.word, d = new h.Y(a.startLineNumber, t.startColumn, a.startLineNumber, + t.endColumn) + } else l = e.getModel().getValueInRange(a).replace(/\r\n/g, "\n"); + return new D(e, t, r, l, n, o, d) + } + addSelectionToNextFindMatch() { + if (!this._editor.hasModel()) return null; + const e = this._getNextMatch(); + if (!e) return null; + const t = this._editor.getSelections(); + return new N(t.concat(e), e, 0) + } + moveSelectionToNextFindMatch() { + if (!this._editor.hasModel()) return null; + const e = this._getNextMatch(); + if (!e) return null; + const t = this._editor.getSelections(); + return new N(t.slice(0, t.length - 1).concat(e), e, 0) + } + _getNextMatch() { + if (!this._editor.hasModel()) return null; + if (this.currentMatch) { + const e = this.currentMatch; + return this.currentMatch = null, e + } + this.findController.highlightFindOptions(); + const e = this._editor.getSelections(), + t = e[e.length - 1], + i = this._editor.getModel().findNextMatch(this.searchText, t.getEndPosition(), ! + 1, this.matchCase, this.wholeWord ? this._editor.getOption(116) : + null, !1); + return i ? new h.Y(i.range.startLineNumber, i.range.startColumn, i.range + .endLineNumber, i.range.endColumn) : null + } + addSelectionToPreviousFindMatch() { + if (!this._editor.hasModel()) return null; + const e = this._getPreviousMatch(); + if (!e) return null; + const t = this._editor.getSelections(); + return new N(t.concat(e), e, 0) + } + moveSelectionToPreviousFindMatch() { + if (!this._editor.hasModel()) return null; + const e = this._getPreviousMatch(); + if (!e) return null; + const t = this._editor.getSelections(); + return new N(t.slice(0, t.length - 1).concat(e), e, 0) + } + _getPreviousMatch() { + if (!this._editor.hasModel()) return null; + if (this.currentMatch) { + const e = this.currentMatch; + return this.currentMatch = null, e + } + this.findController.highlightFindOptions(); + const e = this._editor.getSelections(), + t = e[e.length - 1], + i = this._editor.getModel().findPreviousMatch(this.searchText, t.getStartPosition(), ! + 1, this.matchCase, this.wholeWord ? this._editor.getOption(116) : + null, !1); + return i ? new h.Y(i.range.startLineNumber, i.range.startColumn, i.range + .endLineNumber, i.range.endColumn) : null + } + selectAll() { + return this._editor.hasModel() ? (this.findController.highlightFindOptions(), + this._editor.getModel().findMatches(this.searchText, !0, !1, this.matchCase, + this.wholeWord ? this._editor.getOption(116) : null, !1, 1073741824 + )) : [] + } + } + class E extends s.JT { + constructor(e) { + super(), this._sessionDispose = this._register(new s.SL), this._editor = + e, this._ignoreSelectionChange = !1, this._session = null + } + static get(e) { + return e.getContribution(E.ID) + } + dispose() { + this._endSession(), super.dispose() + } + _beginSessionIfNeeded(e) { + if (!this._session) { + const t = D.create(this._editor, e); + if (!t) return; + this._session = t; + const i = { + searchString: this._session.searchText + }; + this._session.isDisconnectedFromFindController && (i.wholeWordOverride = + 1, i.matchCaseOverride = 1, i.isRegexOverride = 2), e.getState().change( + i, !1), this._sessionDispose.add(this._editor.onDidChangeCursorSelection( + (e => { + this._ignoreSelectionChange || this._endSession() + }))), this._sessionDispose.add(this._editor.onDidBlurEditorText((() => { + this._endSession() + }))), this._sessionDispose.add(e.getState().onFindReplaceStateChange( + (e => { + (e.matchCase || e.wholeWord) && this._endSession() + }))) + } + } + _endSession() { + if (this._sessionDispose.clear(), this._session && this._session.isDisconnectedFromFindController) { + const e = { + wholeWordOverride: 0, + matchCaseOverride: 0, + isRegexOverride: 0 + }; + this._session.findController.getState().change(e, !1) + } + this._session = null + } + _setSelections(e) { + this._ignoreSelectionChange = !0, this._editor.setSelections(e), this + ._ignoreSelectionChange = !1 + } + _expandEmptyToWord(e, t) { + if (!t.isEmpty()) return t; + const i = this._editor.getConfiguredWordAtPosition(t.getStartPosition()); + return i ? new h.Y(t.startLineNumber, i.startColumn, t.startLineNumber, + i.endColumn) : t + } + _applySessionResult(e) { + e && (this._setSelections(e.selections), e.revealRange && this._editor + .revealRangeInCenterIfOutsideViewport(e.revealRange, e.revealScrollType) + ) + } + getSession(e) { + return this._session + } + addSelectionToNextFindMatch(e) { + if (this._editor.hasModel()) { + if (!this._session) { + const t = this._editor.getSelections(); + if (t.length > 1) { + const i = e.getState().matchCase; + if (!W(this._editor.getModel(), t, i)) { + const e = this._editor.getModel(); + let i = []; + for (let n = 0, o = t.length; n < o; n++) i[n] = this._expandEmptyToWord( + e, t[n]); + return void this._editor.setSelections(i) + } + } + } + this._beginSessionIfNeeded(e), this._session && this._applySessionResult( + this._session.addSelectionToNextFindMatch()) + } + } + addSelectionToPreviousFindMatch(e) { + this._beginSessionIfNeeded(e), this._session && this._applySessionResult( + this._session.addSelectionToPreviousFindMatch()) + } + moveSelectionToNextFindMatch(e) { + this._beginSessionIfNeeded(e), this._session && this._applySessionResult( + this._session.moveSelectionToNextFindMatch()) + } + moveSelectionToPreviousFindMatch(e) { + this._beginSessionIfNeeded(e), this._session && this._applySessionResult( + this._session.moveSelectionToPreviousFindMatch()) + } + selectAll(e) { + if (!this._editor.hasModel()) return; + let t = null; + const i = e.getState(); + if (i.isRevealed && i.searchString.length > 0 && i.isRegex) t = this._editor + .getModel().findMatches(i.searchString, !0, i.isRegex, i.matchCase, + i.wholeWord ? this._editor.getOption(116) : null, !1, 1073741824); + else { + if (this._beginSessionIfNeeded(e), !this._session) return; + t = this._session.selectAll() + } + if (i.searchScope) { + const e = i.searchScope; + let n = []; + t.forEach((t => { + e.forEach((e => { + t.range.endLineNumber <= e.endLineNumber && t.range.startLineNumber >= + e.startLineNumber && n.push(t) + })) + })), t = n + } + if (t.length > 0) { + const e = this._editor.getSelection(); + for (let i = 0, n = t.length; i < n; i++) { + const n = t[i]; + if (n.range.intersectRanges(e)) { + t[i] = t[0], t[0] = n; + break + } + } + this._setSelections(t.map((e => new h.Y(e.range.startLineNumber, e.range + .startColumn, e.range.endLineNumber, e.range.endColumn)))) + } + } + } + E.ID = "editor.contrib.multiCursorController"; + class I extends l.R6 { + run(e, t) { + const i = E.get(t); + if (!i) return; + const n = f.CommonFindController.get(t); + if (!n) return; + const o = t._getViewModel(); + if (o) { + const e = o.getCursorStates(); + this._run(i, n), C(e, o.getCursorStates()) + } + } + } + class T extends I { + constructor() { + super({ + id: "editor.action.addSelectionToNextFindMatch", + label: n.N("addSelectionToNextFindMatch", + "Add Selection To Next Find Match"), + alias: "Add Selection To Next Find Match", + precondition: void 0, + kbOpts: { + kbExpr: u.u.focus, + primary: 2082, + weight: 100 + }, + menuOpts: { + menuId: _.eH.MenubarSelectionMenu, + group: "3_multi", + title: n.N({ + key: "miAddSelectionToNextFindMatch", + comment: ["&& denotes a mnemonic"] + }, "Add &&Next Occurrence"), + order: 5 + } + }) + } + _run(e, t) { + e.addSelectionToNextFindMatch(t) + } + } + class M extends I { + constructor() { + super({ + id: "editor.action.addSelectionToPreviousFindMatch", + label: n.N("addSelectionToPreviousFindMatch", + "Add Selection To Previous Find Match"), + alias: "Add Selection To Previous Find Match", + precondition: void 0, + menuOpts: { + menuId: _.eH.MenubarSelectionMenu, + group: "3_multi", + title: n.N({ + key: "miAddSelectionToPreviousFindMatch", + comment: ["&& denotes a mnemonic"] + }, "Add P&&revious Occurrence"), + order: 6 + } + }) + } + _run(e, t) { + e.addSelectionToPreviousFindMatch(t) + } + } + class A extends I { + constructor() { + super({ + id: "editor.action.moveSelectionToNextFindMatch", + label: n.N("moveSelectionToNextFindMatch", + "Move Last Selection To Next Find Match"), + alias: "Move Last Selection To Next Find Match", + precondition: void 0, + kbOpts: { + kbExpr: u.u.focus, + primary: (0, r.gx)(2089, 2082), + weight: 100 + } + }) + } + _run(e, t) { + e.moveSelectionToNextFindMatch(t) + } + } + class R extends I { + constructor() { + super({ + id: "editor.action.moveSelectionToPreviousFindMatch", + label: n.N("moveSelectionToPreviousFindMatch", + "Move Last Selection To Previous Find Match"), + alias: "Move Last Selection To Previous Find Match", + precondition: void 0 + }) + } + _run(e, t) { + e.moveSelectionToPreviousFindMatch(t) + } + } + class O extends I { + constructor() { + super({ + id: "editor.action.selectHighlights", + label: n.N("selectAllOccurrencesOfFindMatch", + "Select All Occurrences of Find Match"), + alias: "Select All Occurrences of Find Match", + precondition: void 0, + kbOpts: { + kbExpr: u.u.focus, + primary: 3114, + weight: 100 + }, + menuOpts: { + menuId: _.eH.MenubarSelectionMenu, + group: "3_multi", + title: n.N({ + key: "miSelectHighlights", + comment: ["&& denotes a mnemonic"] + }, "Select All &&Occurrences"), + order: 7 + } + }) + } + _run(e, t) { + e.selectAll(t) + } + } + class P extends I { + constructor() { + super({ + id: "editor.action.changeAll", + label: n.N("changeAll.label", "Change All Occurrences"), + alias: "Change All Occurrences", + precondition: w.Ao.and(u.u.writable, u.u.editorTextFocus), + kbOpts: { + kbExpr: u.u.editorTextFocus, + primary: 2108, + weight: 100 + }, + contextMenuOpts: { + group: "1_modification", + order: 1.2 + } + }) + } + _run(e, t) { + e.selectAll(t) + } + } + class F { + constructor(e, t, i, n) { + this.searchText = e, this.matchCase = t, this.wordSeparators = i, this + .modelVersionId = n + } + static softEquals(e, t) { + return !e && !t || !(!e || !t) && e.searchText === t.searchText && e.matchCase === + t.matchCase && e.wordSeparators === t.wordSeparators && e.modelVersionId === + t.modelVersionId + } + } + class B extends s.JT { + constructor(e) { + super(), this.editor = e, this._isEnabled = e.getOption(97), this.decorations = [], + this.updateSoon = this._register(new o.pY((() => this._update()), + 300)), this.state = null, this._register(e.onDidChangeConfiguration( + (t => { + this._isEnabled = e.getOption(97) + }))), this._register(e.onDidChangeCursorSelection((e => { + this._isEnabled && (e.selection.isEmpty() ? 3 === e.reason ? ( + this.state && this._setState(null), this.updateSoon.schedule() + ) : this._setState(null) : this._update()) + }))), this._register(e.onDidChangeModel((e => { + this._setState(null) + }))), this._register(e.onDidChangeModelContent((e => { + this._isEnabled && this.updateSoon.schedule() + }))), this._register(f.CommonFindController.get(e).getState().onFindReplaceStateChange( + (e => { + this._update() + }))) + } + _update() { + this._setState(B._createState(this._isEnabled, this.editor)) + } + static _createState(e, t) { + if (!e) return null; + if (!t.hasModel()) return null; + const i = t.getSelection(); + if (i.startLineNumber !== i.endLineNumber) return null; + const n = E.get(t); + if (!n) return null; + const o = f.CommonFindController.get(t); + if (!o) return null; + let r = n.getSession(o); + if (!r) { + const e = t.getSelections(); + if (e.length > 1) { + const i = o.getState().matchCase; + if (!W(t.getModel(), e, i)) return null + } + r = D.create(t, o) + } + if (!r) return null; + if (r.currentMatch) return null; + if (/^[ \t]+$/.test(r.searchText)) return null; + if (r.searchText.length > 200) return null; + const s = o.getState(), + a = s.matchCase; + if (s.isRevealed) { + let e = s.searchString; + a || (e = e.toLowerCase()); + let t = r.searchText; + if (a || (t = t.toLowerCase()), e === t && r.matchCase === s.matchCase && + r.wholeWord === s.wholeWord && !s.isRegex) return null + } + return new F(r.searchText, r.matchCase, r.wholeWord ? t.getOption(116) : + null, t.getModel().getVersionId()) + } + _setState(e) { + if (F.softEquals(this.state, e)) return void(this.state = e); + if (this.state = e, !this.state) return void(this.decorations = this.editor + .deltaDecorations(this.decorations, [])); + if (!this.editor.hasModel()) return; + const t = this.editor.getModel(); + if (t.isTooLargeForTokenization()) return; + const i = m.vH.has(t) && this.editor.getOption(71); + let n = t.findMatches(this.state.searchText, !0, !1, this.state.matchCase, + this.state.wordSeparators, !1).map((e => e.range)); + n.sort(c.e.compareRangesUsingStarts); + let o = this.editor.getSelections(); + o.sort(c.e.compareRangesUsingStarts); + let r = []; + for (let e = 0, t = 0, i = n.length, s = o.length; e < i;) { + const i = n[e]; + if (t >= s) r.push(i), e++; + else { + const n = c.e.compareRangesUsingStarts(i, o[t]); + n < 0 ? (!o[t].isEmpty() && c.e.areIntersecting(i, o[t]) || r.push( + i), e++) : (n > 0 || e++, t++) + } + } + const s = r.map((e => ({ + range: e, + options: i ? B._SELECTION_HIGHLIGHT : B._SELECTION_HIGHLIGHT_OVERVIEW + }))); + this.decorations = this.editor.deltaDecorations(this.decorations, s) + } + dispose() { + this._setState(null), super.dispose() + } + } + + function W(e, t, i) { + const n = z(e, t[0], !i); + for (let o = 1, r = t.length; o < r; o++) { + const r = t[o]; + if (r.isEmpty()) return !1; + if (n !== z(e, r, !i)) return !1 + } + return !0 + } + + function z(e, t, i) { + const n = e.getValueInRange(t); + return i ? n.toLowerCase() : n + } + B.ID = "editor.contrib.selectionHighlighter", B._SELECTION_HIGHLIGHT_OVERVIEW = + p.qx.register({ + description: "selection-highlight-overview", + stickiness: 1, + className: "selectionHighlight", + overviewRuler: { + color: (0, v.EN)(b.SP), + position: g.sh.Center + } + }), B._SELECTION_HIGHLIGHT = p.qx.register({ + description: "selection-highlight", + stickiness: 1, + className: "selectionHighlight" + }), (0, l._K)(E.ID, E), (0, l._K)(B.ID, B), (0, l.Qr)(y), (0, l.Qr)(S), ( + 0, l.Qr)(x), (0, l.Qr)(T), (0, l.Qr)(M), (0, l.Qr)(A), (0, l.Qr)(R), (0, + l.Qr)(O), (0, l.Qr)(P), (0, l.Qr)(k), (0, l.Qr)(L) + }, + 4993: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + TriggerParameterHintsAction: () => se + }); + var n = i(3580), + o = i(5976), + r = i(2065), + s = i(9102), + a = i(8819), + l = i(6830), + d = i(5321), + c = i(6346), + h = i(6781), + u = i(4669), + g = i(3379), + p = i.n(g), + m = i(7795), + f = i.n(m), + _ = i(569), + b = i.n(_), + v = i(3565), + w = i.n(v), + C = i(9216), + y = i.n(C), + S = i(4589), + x = i.n(S), + k = i(2265), + L = {}; + L.styleTagTransform = x(), L.setAttributes = w(), L.insert = b().bind( + null, "head"), L.domAPI = f(), L.insertStyleElement = y(), p()(k.Z, L), + k.Z && k.Z.locals && k.Z.locals; + var N = i(1531), + D = i(3947), + E = i(7301), + I = i(187), + T = i(4101), + M = i(1050), + A = i(4565), + R = i(666), + O = i(8401), + P = i(8216), + F = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + const B = { + Visible: new a.uy("parameterHintsVisible", !1), + MultipleSignatures: new a.uy("parameterHintsMultipleSignatures", !1) + }; + + function W(e, t, i, n) { + return F(this, void 0, void 0, (function*() { + const o = T.nD.ordered(e); + for (const r of o) try { + const o = yield r.provideSignatureHelp(e, t, n, i); + if (o) return o + } catch (e) { + (0, E.Cp)(e) + } + })) + } + A.P.registerCommand("_executeSignatureHelpProvider", ((e, ...t) => F(void 0, + void 0, void 0, (function*() { + const [i, n, o] = t; + (0, O.p_)(R.o.isUri(i)), (0, O.p_)(I.L.isIPosition(n)), (0, O.p_)( + "string" == typeof o || !o); + const r = yield e.get(P.S).createModelReference(i); + try { + const e = yield W(r.object.textEditorModel, I.L.lift(n), { + triggerKind: T.WW.Invoke, + isRetrigger: !1, + triggerCharacter: o + }, M.T.None); + if (!e) return; + return setTimeout((() => e.dispose()), 0), e.value + } finally { + r.dispose() + } + })))); + var z, V = i(988), + H = i(3910), + U = i(7781), + j = i(5393), + K = i(4906); + ! function(e) { + e.Default = { + type: 0 + }, e.Pending = class { + constructor(e, t) { + this.request = e, this.previouslyActiveHints = t, this.type = 2 + } + }, e.Active = class { + constructor(e) { + this.hints = e, this.type = 1 + } + } + }(z || (z = {})); + class $ extends o.JT { + constructor(e, t = $.DEFAULT_DELAY) { + super(), this._onChangedHints = this._register(new u.Q5), this.onChangedHints = + this._onChangedHints.event, this.triggerOnType = !1, this._state = z + .Default, this._pendingTriggers = [], this._lastSignatureHelpResult = + this._register(new o.XK), this.triggerChars = new K.q, this.retriggerChars = + new K.q, this.triggerId = 0, this.editor = e, this.throttledDelayer = + new j.vp(t), this._register(this.editor.onDidBlurEditorWidget((() => + this.cancel()))), this._register(this.editor.onDidChangeConfiguration( + (() => this.onEditorConfigurationChange()))), this._register(this.editor + .onDidChangeModel((e => this.onModelChanged()))), this._register( + this.editor.onDidChangeModelLanguage((e => this.onModelChanged()))), + this._register(this.editor.onDidChangeCursorSelection((e => this.onCursorChange( + e)))), this._register(this.editor.onDidChangeModelContent((e => + this.onModelContentChange()))), this._register(T.nD.onDidChange( + this.onModelChanged, this)), this._register(this.editor.onDidType(( + e => this.onDidType(e)))), this.onEditorConfigurationChange(), this + .onModelChanged() + } + get state() { + return this._state + } + set state(e) { + 2 === this._state.type && this._state.request.cancel(), this._state = + e + } + cancel(e = !1) { + this.state = z.Default, this.throttledDelayer.cancel(), e || this._onChangedHints + .fire(void 0) + } + trigger(e, t) { + const i = this.editor.getModel(); + if (!i || !T.nD.has(i)) return; + const n = ++this.triggerId; + this._pendingTriggers.push(e), this.throttledDelayer.trigger((() => + this.doTrigger(n)), t).catch(E.dL) + } + next() { + if (1 !== this.state.type) return; + const e = this.state.hints.signatures.length, + t = this.state.hints.activeSignature, + i = t % e == e - 1, + n = this.editor.getOption(75).cycle; + !(e < 2 || i) || n ? this.updateActiveSignature(i && n ? 0 : t + 1) : + this.cancel() + } + previous() { + if (1 !== this.state.type) return; + const e = this.state.hints.signatures.length, + t = this.state.hints.activeSignature, + i = 0 === t, + n = this.editor.getOption(75).cycle; + !(e < 2 || i) || n ? this.updateActiveSignature(i && n ? e - 1 : t - + 1) : this.cancel() + } + updateActiveSignature(e) { + 1 === this.state.type && (this.state = new z.Active(Object.assign( + Object.assign({}, this.state.hints), { + activeSignature: e + })), this._onChangedHints.fire(this.state.hints)) + } + doTrigger(e) { + return t = this, i = void 0, o = function*() { + const t = 1 === this.state.type || 2 === this.state.type, + i = this.getLastActiveHints(); + if (this.cancel(!0), 0 === this._pendingTriggers.length) return !1; + const n = this._pendingTriggers.reduce(q); + this._pendingTriggers = []; + const o = { + triggerKind: n.triggerKind, + triggerCharacter: n.triggerCharacter, + isRetrigger: t, + activeSignatureHelp: i + }; + if (!this.editor.hasModel()) return !1; + const r = this.editor.getModel(), + s = this.editor.getPosition(); + this.state = new z.Pending((0, j.PG)((e => W(r, s, o, e))), i); + try { + const t = yield this.state.request; + return e !== this.triggerId ? (null == t || t.dispose(), !1) : t && + t.value.signatures && 0 !== t.value.signatures.length ? (this.state = + new z.Active(t.value), this._lastSignatureHelpResult.value = t, + this._onChangedHints.fire(this.state.hints), !0) : (null == t || + t.dispose(), this._lastSignatureHelpResult.clear(), this.cancel(), ! + 1) + } catch (t) { + return e === this.triggerId && (this.state = z.Default), (0, E.dL) + (t), !1 + } + }, new((n = void 0) || (n = Promise))((function(e, r) { + function s(e) { + try { + l(o.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(o.throw(e)) + } catch (e) { + r(e) + } + } + + function l(t) { + var i; + t.done ? e(t.value) : (i = t.value, i instanceof n ? i : new n(( + function(e) { + e(i) + }))).then(s, a) + } + l((o = o.apply(t, i || [])).next()) + })); + var t, i, n, o + } + getLastActiveHints() { + switch (this.state.type) { + case 1: + return this.state.hints; + case 2: + return this.state.previouslyActiveHints; + default: + return + } + } + get isTriggered() { + return 1 === this.state.type || 2 === this.state.type || this.throttledDelayer + .isTriggered() + } + onModelChanged() { + this.cancel(), this.triggerChars = new K.q, this.retriggerChars = new K + .q; + const e = this.editor.getModel(); + if (e) + for (const t of T.nD.ordered(e)) { + for (const e of t.signatureHelpTriggerCharacters || []) this.triggerChars + .add(e.charCodeAt(0)), this.retriggerChars.add(e.charCodeAt(0)); + for (const e of t.signatureHelpRetriggerCharacters || []) this.retriggerChars + .add(e.charCodeAt(0)) + } + } + onDidType(e) { + if (!this.triggerOnType) return; + const t = e.length - 1, + i = e.charCodeAt(t); + (this.triggerChars.has(i) || this.isTriggered && this.retriggerChars.has( + i)) && this.trigger({ + triggerKind: T.WW.TriggerCharacter, + triggerCharacter: e.charAt(t) + }) + } + onCursorChange(e) { + "mouse" === e.source ? this.cancel() : this.isTriggered && this.trigger({ + triggerKind: T.WW.ContentChange + }) + } + onModelContentChange() { + this.isTriggered && this.trigger({ + triggerKind: T.WW.ContentChange + }) + } + onEditorConfigurationChange() { + this.triggerOnType = this.editor.getOption(75).enabled, this.triggerOnType || + this.cancel() + } + dispose() { + this.cancel(!0), super.dispose() + } + } + + function q(e, t) { + switch (t.triggerKind) { + case T.WW.Invoke: + return t; + case T.WW.ContentChange: + return e; + case T.WW.TriggerCharacter: + default: + return t + } + } + $.DEFAULT_DELAY = 120; + var Z = i(7295), + G = i(3046), + Y = i(2321), + Q = i(9554), + X = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const J = d.$, + ee = (0, Q.q5)("parameter-hints-next", G.lA.chevronDown, n.N( + "parameterHintsNextIcon", "Icon for show next parameter hint.")), + te = (0, Q.q5)("parameter-hints-previous", G.lA.chevronUp, n.N( + "parameterHintsPreviousIcon", "Icon for show previous parameter hint." + )); + let ie = class e extends o.JT { + constructor(e, t, i, n) { + super(), this.editor = e, this.renderDisposeables = this._register( + new o.SL), this.visible = !1, this.announcedLabel = null, this.allowEditorOverflow = ! + 0, this.markdownRenderer = this._register(new D.$({ + editor: e + }, n, i)), this.model = this._register(new $(e)), this.keyVisible = + B.Visible.bindTo(t), this.keyMultipleSignatures = B.MultipleSignatures + .bindTo(t), this._register(this.model.onChangedHints((e => { + e ? (this.show(), this.render(e)) : this.hide() + }))) + } + createParameterHintDOMNodes() { + const e = J(".editor-widget.parameter-hints-widget"), + t = d.R3(e, J(".phwrapper")); + t.tabIndex = -1; + const i = d.R3(t, J(".controls")), + n = d.R3(i, J(".button" + U.kS.asCSSSelector(te))), + o = d.R3(i, J(".overloads")), + r = d.R3(i, J(".button" + U.kS.asCSSSelector(ee))); + this._register(d.nm(n, "click", (e => { + d.zB.stop(e), this.previous() + }))), this._register(d.nm(r, "click", (e => { + d.zB.stop(e), this.next() + }))); + const s = J(".body"), + a = new h.s$(s, {}); + this._register(a), t.appendChild(a.getDomNode()); + const l = d.R3(s, J(".signature")), + c = d.R3(s, J(".docs")); + e.style.userSelect = "text", this.domNodes = { + element: e, + signature: l, + overloads: o, + docs: c, + scrollbar: a + }, this.editor.addContentWidget(this), this.hide(), this._register( + this.editor.onDidChangeCursorSelection((e => { + this.visible && this.editor.layoutContentWidget(this) + }))); + const g = () => { + if (!this.domNodes) return; + const e = this.editor.getOption(42); + this.domNodes.element.style.fontSize = `${e.fontSize}px` + }; + g(), this._register(u.ju.chain(this.editor.onDidChangeConfiguration.bind( + this.editor)).filter((e => e.hasChanged(42))).on(g, null)), this._register( + this.editor.onDidLayoutChange((e => this.updateMaxHeight()))), this + .updateMaxHeight() + } + show() { + this.visible || (this.domNodes || this.createParameterHintDOMNodes(), + this.keyVisible.set(!0), this.visible = !0, setTimeout((() => { + this.domNodes && this.domNodes.element.classList.add("visible") + }), 100), this.editor.layoutContentWidget(this)) + } + hide() { + this.renderDisposeables.clear(), this.visible && (this.keyVisible.reset(), + this.visible = !1, this.announcedLabel = null, this.domNodes && + this.domNodes.element.classList.remove("visible"), this.editor.layoutContentWidget( + this)) + } + getPosition() { + return this.visible ? { + position: this.editor.getPosition(), + preference: [1, 2] + } : null + } + render(e) { + var t; + if (this.renderDisposeables.clear(), !this.domNodes) return; + const i = e.signatures.length > 1; + this.domNodes.element.classList.toggle("multiple", i), this.keyMultipleSignatures + .set(i), this.domNodes.signature.innerText = "", this.domNodes.docs.innerText = + ""; + const o = e.signatures[e.activeSignature]; + if (!o) return; + const r = d.R3(this.domNodes.signature, J(".code")), + s = this.editor.getOption(42); + r.style.fontSize = `${s.fontSize}px`, r.style.fontFamily = s.fontFamily; + const a = o.parameters.length > 0, + l = null !== (t = o.activeParameter) && void 0 !== t ? t : e.activeParameter; + a ? this.renderParameters(r, o, l) : d.R3(r, J("span")).textContent = + o.label; + const h = o.parameters[l]; + if (null == h ? void 0 : h.documentation) { + const e = J("span.documentation"); + if ("string" == typeof h.documentation) e.textContent = h.documentation; + else { + const t = this.renderMarkdownDocs(h.documentation); + e.appendChild(t.element) + } + d.R3(this.domNodes.docs, J("p", {}, e)) + } + if (void 0 === o.documentation); + else if ("string" == typeof o.documentation) d.R3(this.domNodes.docs, + J("p", {}, o.documentation)); + else { + const e = this.renderMarkdownDocs(o.documentation); + d.R3(this.domNodes.docs, e.element) + } + const u = this.hasDocs(o, h); + if (this.domNodes.signature.classList.toggle("has-docs", u), this.domNodes + .docs.classList.toggle("empty", !u), this.domNodes.overloads.textContent = + String(e.activeSignature + 1).padStart(e.signatures.length.toString() + .length, "0") + "/" + e.signatures.length, h) { + let e = ""; + const t = o.parameters[l]; + e = Array.isArray(t.label) ? o.label.substring(t.label[0], t.label[1]) : + t.label, t.documentation && (e += "string" == typeof t.documentation ? + `, ${t.documentation}` : `, ${t.documentation.value}`), o.documentation && + (e += "string" == typeof o.documentation ? `, ${o.documentation}` : + `, ${o.documentation.value}`), this.announcedLabel !== e && (c.Z9( + n.N("hint", "{0}, hint", e)), this.announcedLabel = e) + } + this.editor.layoutContentWidget(this), this.domNodes.scrollbar.scanDomNode() + } + renderMarkdownDocs(e) { + const t = this.renderDisposeables.add(this.markdownRenderer.render(e, { + asyncRenderCallback: () => { + var e; + null === (e = this.domNodes) || void 0 === e || e.scrollbar.scanDomNode() + } + })); + return t.element.classList.add("markdown-docs"), t + } + hasDocs(e, t) { + return !!(t && "string" == typeof t.documentation && (0, O.cW)(t.documentation) + .length > 0 || t && "object" == typeof t.documentation && (0, O.cW) + (t.documentation).value.length > 0 || e.documentation && "string" == + typeof e.documentation && (0, O.cW)(e.documentation).length > 0 || + e.documentation && "object" == typeof e.documentation && (0, O.cW)( + e.documentation.value).length > 0) + } + renderParameters(e, t, i) { + const [n, o] = this.getParameterLabelOffsets(t, i), r = document.createElement( + "span"); + r.textContent = t.label.substring(0, n); + const s = document.createElement("span"); + s.textContent = t.label.substring(n, o), s.className = + "parameter active"; + const a = document.createElement("span"); + a.textContent = t.label.substring(o), d.R3(e, r, s, a) + } + getParameterLabelOffsets(e, t) { + const i = e.parameters[t]; + if (i) { + if (Array.isArray(i.label)) return i.label; + if (i.label.length) { + const t = new RegExp(`(\\W|^)${(0,Z.ec)(i.label)}(?=\\W|$)`, "g"); + t.test(e.label); + const n = t.lastIndex - i.label.length; + return n >= 0 ? [n, t.lastIndex] : [0, 0] + } + return [0, 0] + } + return [0, 0] + } + next() { + this.editor.focus(), this.model.next() + } + previous() { + this.editor.focus(), this.model.previous() + } + cancel() { + this.model.cancel() + } + getDomNode() { + return this.domNodes || this.createParameterHintDOMNodes(), this.domNodes + .element + } + getId() { + return e.ID + } + trigger(e) { + this.model.trigger(e, 0) + } + updateMaxHeight() { + if (!this.domNodes) return; + const e = `${Math.max(this.editor.getLayoutInfo().height/4,250)}px`; + this.domNodes.element.style.maxHeight = e; + const t = this.domNodes.element.getElementsByClassName("phwrapper"); + t.length && (t[0].style.maxHeight = e) + } + }; + ie.ID = "editor.widget.parameterHintsWidget", ie = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([X(1, a.i6), X(2, V.v4), X(3, N.h)], ie), (0, U.Ic)(((e, t) => { + const i = e.getColor(H.CN); + if (i) { + const n = e.type === Y.e.HIGH_CONTRAST ? 2 : 1; + t.addRule( + `.monaco-editor .parameter-hints-widget { border: ${n}px solid ${i}; }` + ), t.addRule( + `.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${i.transparent(.5)}; }` + ), t.addRule( + `.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${i.transparent(.5)}; }` + ) + } + const n = e.getColor(H.yJ); + n && t.addRule( + `.monaco-editor .parameter-hints-widget { background-color: ${n}; }` + ); + const o = e.getColor(H.ur); + o && t.addRule( + `.monaco-editor .parameter-hints-widget a { color: ${o}; }`); + const r = e.getColor(H.sg); + r && t.addRule( + `.monaco-editor .parameter-hints-widget a:hover { color: ${r}; }`); + const s = e.getColor(H.Sb); + s && t.addRule( + `.monaco-editor .parameter-hints-widget { color: ${s}; }`); + const a = e.getColor(H.Sw); + a && t.addRule( + `.monaco-editor .parameter-hints-widget code { background-color: ${a}; }` + ) + })); + let ne = class e extends o.JT { + constructor(e, t) { + super(), this.editor = e, this.widget = this._register(t.createInstance( + ie, this.editor)) + } + static get(t) { + return t.getContribution(e.ID) + } + cancel() { + this.widget.cancel() + } + previous() { + this.widget.previous() + } + next() { + this.widget.next() + } + trigger(e) { + this.widget.trigger(e) + } + }; + var oe, re; + ne.ID = "editor.controller.parameterHints", ne = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(oe = 1, re = r.TG, function(e, t) { + re(e, t, oe) + })], ne); + class se extends l.R6 { + constructor() { + super({ + id: "editor.action.triggerParameterHints", + label: n.N("parameterHints.trigger.label", + "Trigger Parameter Hints"), + alias: "Trigger Parameter Hints", + precondition: s.u.hasSignatureHelpProvider, + kbOpts: { + kbExpr: s.u.editorTextFocus, + primary: 3082, + weight: 100 + } + }) + } + run(e, t) { + const i = ne.get(t); + i && i.trigger({ + triggerKind: T.WW.Invoke + }) + } + }(0, l._K)(ne.ID, ne), (0, l.Qr)(se); + const ae = l._l.bindToContribution(ne.get); + (0, l.fK)(new ae({ + id: "closeParameterHints", + precondition: B.Visible, + handler: e => e.cancel(), + kbOpts: { + weight: 175, + kbExpr: s.u.focus, + primary: 9, + secondary: [1033] + } + })), (0, l.fK)(new ae({ + id: "showPrevParameterHint", + precondition: a.Ao.and(B.Visible, B.MultipleSignatures), + handler: e => e.previous(), + kbOpts: { + weight: 175, + kbExpr: s.u.focus, + primary: 16, + secondary: [528], + mac: { + primary: 16, + secondary: [528, 302] + } + } + })), (0, l.fK)(new ae({ + id: "showNextParameterHint", + precondition: a.Ao.and(B.Visible, B.MultipleSignatures), + handler: e => e.next(), + kbOpts: { + weight: 175, + kbExpr: s.u.focus, + primary: 18, + secondary: [530], + mac: { + primary: 18, + secondary: [530, 300] + } + } + })) + }, + 1884: (e, t, i) => { + "use strict"; + i.d(t, { + Fw: () => q, + Jy: () => Z, + vk: () => X, + rc: () => Y, + SC: () => ie, + RX: () => le, + sH: () => de, + WL: () => he, + xH: () => ue, + M8: () => ne, + a7: () => re, + xk: () => oe, + F8: () => ce, + Zj: () => se, + IY: () => ae, + KY: () => J, + IH: () => ee, + R7: () => te + }); + var n = i(3379), + o = i.n(n), + r = i(7795), + s = i.n(r), + a = i(569), + l = i.n(a), + d = i(3565), + c = i.n(d), + h = i(9216), + u = i.n(h), + g = i(4589), + p = i.n(g), + m = i(1283), + f = {}; + f.styleTagTransform = p(), f.setAttributes = c(), f.insert = l().bind( + null, "head"), f.domAPI = s(), f.insertStyleElement = u(), o()(m.Z, f), + m.Z && m.Z.locals && m.Z.locals; + var _ = i(5321), + b = i(317), + v = i(4741), + w = i(1264), + C = i(4669), + y = i(6248), + S = i(1640), + x = i(4527), + k = i(6458), + L = {}; + L.styleTagTransform = p(), L.setAttributes = c(), L.insert = l().bind( + null, "head"), L.domAPI = s(), L.insertStyleElement = u(), o()(k.Z, L), + k.Z && k.Z.locals && k.Z.locals; + var N = i(3841), + D = i(4742), + E = i(5976), + I = i(4314), + T = i(6281); + const M = new w.Il(new w.VS(0, 122, 204)), + A = { + showArrow: !0, + showFrame: !0, + className: "", + frameColor: M, + arrowColor: M, + keepEditorSelection: !1 + }; + class R { + constructor(e, t, i, n, o, r) { + this.id = "", this.domNode = e, this.afterLineNumber = t, this.afterColumn = + i, this.heightInLines = n, this._onDomNodeTop = o, this._onComputedHeight = + r + } + onDomNodeTop(e) { + this._onDomNodeTop(e) + } + onComputedHeight(e) { + this._onComputedHeight(e) + } + } + class O { + constructor(e, t) { + this._id = e, this._domNode = t + } + getId() { + return this._id + } + getDomNode() { + return this._domNode + } + getPosition() { + return null + } + } + class P { + constructor(e) { + this._editor = e, this._ruleName = P._IdGenerator.nextId(), this._decorations = [], + this._color = null, this._height = -1 + } + dispose() { + this.hide(), _.uN(this._ruleName) + } + set color(e) { + this._color !== e && (this._color = e, this._updateStyle()) + } + set height(e) { + this._height !== e && (this._height = e, this._updateStyle()) + } + _updateStyle() { + _.uN(this._ruleName), _.fk(`.monaco-editor ${this._ruleName}`, + `border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; ` + ) + } + show(e) { + this._decorations = this._editor.deltaDecorations(this._decorations, [{ + range: I.e.fromPositions(e), + options: { + description: "zone-widget-arrow", + className: this._ruleName, + stickiness: 1 + } + }]) + } + hide() { + this._editor.deltaDecorations(this._decorations, []) + } + } + P._IdGenerator = new D.R(".arrow-decoration-"); + var F = i(3580), + B = i(8819), + W = i(2065), + z = i(5026), + V = i(6830), + H = i(3910), + U = i(3046), + j = i(1133), + K = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + $ = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const q = (0, W.yh)("IPeekViewService"); + var Z; + (0, z.z)(q, class { + constructor() { + this._widgets = new Map + } + addExclusiveWidget(e, t) { + const i = this._widgets.get(e); + i && (i.listener.dispose(), i.widget.dispose()), this._widgets.set(e, { + widget: t, + listener: t.onDidClose((() => { + const i = this._widgets.get(e); + i && i.widget === t && (i.listener.dispose(), this._widgets.delete( + e)) + })) + }) + } + }), + function(e) { + e.inPeekEditor = new B.uy("inReferenceSearchEditor", !0, F.N( + "inReferenceSearchEditor", + "Whether the current code editor is embedded inside peek")), e.notInPeekEditor = + e.inPeekEditor.toNegated() + }(Z || (Z = {})); + let G = class { + constructor(e, t) { + e instanceof x.H && Z.inPeekEditor.bindTo(t) + } + dispose() {} + }; + + function Y(e) { + let t = e.get(S.$).getFocusedCodeEditor(); + return t instanceof x.H ? t.getParentEditor() : t + } + G.ID = "editor.contrib.referenceController", G = K([$(1, B.i6)], G), (0, + V._K)(G.ID, G); + const Q = { + headerBackgroundColor: w.Il.white, + primaryHeadingColor: w.Il.fromHex("#333333"), + secondaryHeadingColor: w.Il.fromHex("#6c6c6cb3") + }; + let X = class extends class { + constructor(e, t = {}) { + this._arrow = null, this._overlayWidget = null, this._resizeSash = + null, this._positionMarkerId = [], this._viewZone = null, this._disposables = + new E.SL, this.container = null, this._isShowing = !1, this.editor = + e, this.options = y.I8(t), y.jB(this.options, A, !1), this.domNode = + document.createElement("div"), this.options.isAccessible || (this.domNode + .setAttribute("aria-hidden", "true"), this.domNode.setAttribute( + "role", "presentation")), this._disposables.add(this.editor.onDidLayoutChange( + (e => { + const t = this._getWidth(e); + this.domNode.style.width = t + "px", this.domNode.style.left = + this._getLeft(e) + "px", this._onWidth(t) + }))) + } + dispose() { + this._overlayWidget && (this.editor.removeOverlayWidget(this._overlayWidget), + this._overlayWidget = null), this._viewZone && this.editor.changeViewZones( + (e => { + this._viewZone && e.removeZone(this._viewZone.id), this._viewZone = + null + })), this.editor.deltaDecorations(this._positionMarkerId, []), this + ._positionMarkerId = [], this._disposables.dispose() + } + create() { + this.domNode.classList.add("zone-widget"), this.options.className && + this.domNode.classList.add(this.options.className), this.container = + document.createElement("div"), this.container.classList.add( + "zone-widget-container"), this.domNode.appendChild(this.container), + this.options.showArrow && (this._arrow = new P(this.editor), this._disposables + .add(this._arrow)), this._fillContainer(this.container), this._initSash(), + this._applyStyles() + } + style(e) { + e.frameColor && (this.options.frameColor = e.frameColor), e.arrowColor && + (this.options.arrowColor = e.arrowColor), this._applyStyles() + } + _applyStyles() { + if (this.container && this.options.frameColor) { + let e = this.options.frameColor.toString(); + this.container.style.borderTopColor = e, this.container.style.borderBottomColor = + e + } + if (this._arrow && this.options.arrowColor) { + let e = this.options.arrowColor.toString(); + this._arrow.color = e + } + } + _getWidth(e) { + return e.width - e.minimap.minimapWidth - e.verticalScrollbarWidth + } + _getLeft(e) { + return e.minimap.minimapWidth > 0 && 0 === e.minimap.minimapLeft ? e.minimap + .minimapWidth : 0 + } + _onViewZoneTop(e) { + this.domNode.style.top = e + "px" + } + _onViewZoneHeight(e) { + if (this.domNode.style.height = `${e}px`, this.container) { + let t = e - this._decoratingElementsHeight(); + this.container.style.height = `${t}px`; + const i = this.editor.getLayoutInfo(); + this._doLayout(t, this._getWidth(i)) + } + this._resizeSash && this._resizeSash.layout() + } + get position() { + const [e] = this._positionMarkerId; + if (!e) return; + const t = this.editor.getModel(); + if (!t) return; + const i = t.getDecorationRange(e); + return i ? i.getStartPosition() : void 0 + } + show(e, t) { + const i = I.e.isIRange(e) ? I.e.lift(e) : I.e.fromPositions(e); + this._isShowing = !0, this._showImpl(i, t), this._isShowing = !1, + this._positionMarkerId = this.editor.deltaDecorations(this._positionMarkerId, [{ + range: i, + options: T.qx.EMPTY + }]) + } + hide() { + this._viewZone && (this.editor.changeViewZones((e => { + this._viewZone && e.removeZone(this._viewZone.id) + })), this._viewZone = null), this._overlayWidget && (this.editor.removeOverlayWidget( + this._overlayWidget), this._overlayWidget = null), this._arrow && + this._arrow.hide() + } + _decoratingElementsHeight() { + let e = this.editor.getOption(58), + t = 0; + return this.options.showArrow && (t += 2 * Math.round(e / 3)), this.options + .showFrame && (t += 2 * Math.round(e / 9)), t + } + _showImpl(e, t) { + const i = e.getStartPosition(), + n = this.editor.getLayoutInfo(), + o = this._getWidth(n); + this.domNode.style.width = `${o}px`, this.domNode.style.left = this._getLeft( + n) + "px"; + const r = document.createElement("div"); + r.style.overflow = "hidden"; + const s = this.editor.getOption(58), + a = Math.max(12, this.editor.getLayoutInfo().height / s * .8); + t = Math.min(t, a); + let l = 0, + d = 0; + if (this._arrow && this.options.showArrow && (l = Math.round(s / 3), + this._arrow.height = l, this._arrow.show(i)), this.options.showFrame && + (d = Math.round(s / 9)), this.editor.changeViewZones((e => { + this._viewZone && e.removeZone(this._viewZone.id), this._overlayWidget && + (this.editor.removeOverlayWidget(this._overlayWidget), this._overlayWidget = + null), this.domNode.style.top = "-1000px", this._viewZone = new R( + r, i.lineNumber, i.column, t, (e => this._onViewZoneTop(e)), (e => + this._onViewZoneHeight(e))), this._viewZone.id = e.addZone( + this._viewZone), this._overlayWidget = new O( + "vs.editor.contrib.zoneWidget" + this._viewZone.id, this.domNode + ), this.editor.addOverlayWidget(this._overlayWidget) + })), this.container && this.options.showFrame) { + const e = this.options.frameWidth ? this.options.frameWidth : d; + this.container.style.borderTopWidth = e + "px", this.container.style + .borderBottomWidth = e + "px" + } + let c = t * s - this._decoratingElementsHeight(); + this.container && (this.container.style.top = l + "px", this.container + .style.height = c + "px", this.container.style.overflow = "hidden"), + this._doLayout(c, o), this.options.keepEditorSelection || this.editor + .setSelection(e); + const h = this.editor.getModel(); + if (h) { + const t = e.endLineNumber + 1; + t <= h.getLineCount() ? this.revealLine(t, !1) : this.revealLine(h.getLineCount(), ! + 0) + } + } + revealLine(e, t) { + t ? this.editor.revealLineInCenter(e, 0) : this.editor.revealLine(e, + 0) + } + setCssClass(e, t) { + this.container && (t && this.container.classList.remove(t), this.container + .classList.add(e)) + } + _onWidth(e) {} + _doLayout(e, t) {} + _relayout(e) { + this._viewZone && this._viewZone.heightInLines !== e && this.editor.changeViewZones( + (t => { + this._viewZone && (this._viewZone.heightInLines = e, t.layoutZone( + this._viewZone.id)) + })) + } + _initSash() { + if (this._resizeSash) return; + let e; + this._resizeSash = this._disposables.add(new N.g(this.domNode, this, { + orientation: 1 + })), this.options.isResizeable || (this._resizeSash.hide(), this._resizeSash + .state = 0), this._disposables.add(this._resizeSash.onDidStart((t => { + this._viewZone && (e = { + startY: t.startY, + heightInLines: this._viewZone.heightInLines + }) + }))), this._disposables.add(this._resizeSash.onDidEnd((() => { + e = void 0 + }))), this._disposables.add(this._resizeSash.onDidChange((t => { + if (e) { + let i = (t.currentY - e.startY) / this.editor.getOption(58), + n = i < 0 ? Math.ceil(i) : Math.floor(i), + o = e.heightInLines + n; + o > 5 && o < 35 && this._relayout(o) + } + }))) + } + getHorizontalSashLeft() { + return 0 + } + getHorizontalSashTop() { + return (null === this.domNode.style.height ? 0 : parseInt(this.domNode + .style.height)) - this._decoratingElementsHeight() / 2 + } + getHorizontalSashWidth() { + const e = this.editor.getLayoutInfo(); + return e.width - e.minimap.minimapWidth + } + } { + constructor(e, t, i) { + super(e, t), this.instantiationService = i, this._onDidClose = new C.Q5, + this.onDidClose = this._onDidClose.event, y.jB(this.options, Q, !1) + } + dispose() { + this.disposed || (this.disposed = !0, super.dispose(), this._onDidClose + .fire(this)) + } + style(e) { + let t = this.options; + e.headerBackgroundColor && (t.headerBackgroundColor = e.headerBackgroundColor), + e.primaryHeadingColor && (t.primaryHeadingColor = e.primaryHeadingColor), + e.secondaryHeadingColor && (t.secondaryHeadingColor = e.secondaryHeadingColor), + super.style(e) + } + _applyStyles() { + super._applyStyles(); + let e = this.options; + this._headElement && e.headerBackgroundColor && (this._headElement.style + .backgroundColor = e.headerBackgroundColor.toString()), this._primaryHeading && + e.primaryHeadingColor && (this._primaryHeading.style.color = e.primaryHeadingColor + .toString()), this._secondaryHeading && e.secondaryHeadingColor && + (this._secondaryHeading.style.color = e.secondaryHeadingColor.toString()), + this._bodyElement && e.frameColor && (this._bodyElement.style.borderColor = + e.frameColor.toString()) + } + _fillContainer(e) { + this.setCssClass("peekview-widget"), this._headElement = _.$(".head"), + this._bodyElement = _.$(".body"), this._fillHead(this._headElement), + this._fillBody(this._bodyElement), e.appendChild(this._headElement), + e.appendChild(this._bodyElement) + } + _fillHead(e, t) { + const i = _.$(".peekview-title"); + this.options.supportOnTitleClick && (i.classList.add("clickable"), _.mu( + i, "click", (e => this._onTitleClick(e)))), _.R3(this._headElement, + i), this._fillTitleIcon(i), this._primaryHeading = _.$( + "span.filename"), this._secondaryHeading = _.$("span.dirname"), + this._metaHeading = _.$("span.meta"), _.R3(i, this._primaryHeading, + this._secondaryHeading, this._metaHeading); + const n = _.$(".peekview-actions"); + _.R3(this._headElement, n); + const o = this._getActionBarOptions(); + this._actionbarWidget = new b.o(n, o), this._disposables.add(this._actionbarWidget), + t || this._actionbarWidget.push(new v.aU("peekview.close", F.N( + "label.close", "Close"), U.lA.close.classNames, !0, (() => (this.dispose(), + Promise.resolve()))), { + label: !1, + icon: !0 + }) + } + _fillTitleIcon(e) {} + _getActionBarOptions() { + return { + actionViewItemProvider: j.Id.bind(void 0, this.instantiationService), + orientation: 0 + } + } + _onTitleClick(e) {} + setTitle(e, t) { + this._primaryHeading && this._secondaryHeading && (this._primaryHeading + .innerText = e, this._primaryHeading.setAttribute("title", e), t ? + this._secondaryHeading.innerText = t : _.PO(this._secondaryHeading) + ) + } + setMetaTitle(e) { + this._metaHeading && (e ? (this._metaHeading.innerText = e, _.$Z(this + ._metaHeading)) : _.Cp(this._metaHeading)) + } + _doLayout(e, t) { + if (!this._isShowing && e < 0) return void this.dispose(); + const i = Math.ceil(1.2 * this.editor.getOption(58)), + n = Math.round(e - (i + 2)); + this._doLayoutHead(i, t), this._doLayoutBody(n, t) + } + _doLayoutHead(e, t) { + this._headElement && (this._headElement.style.height = `${e}px`, this + ._headElement.style.lineHeight = this._headElement.style.height) + } + _doLayoutBody(e, t) { + this._bodyElement && (this._bodyElement.style.height = `${e}px`) + } + }; + X = K([$(2, W.TG)], X); + const J = (0, H.P6)("peekViewTitle.background", { + dark: (0, H.Zn)(H.c6, .1), + light: (0, H.Zn)(H.c6, .1), + hc: null + }, F.N("peekViewTitleBackground", + "Background color of the peek view title area.")), + ee = (0, H.P6)("peekViewTitleLabel.foreground", { + dark: w.Il.white, + light: w.Il.black, + hc: w.Il.white + }, F.N("peekViewTitleForeground", "Color of the peek view title.")), + te = (0, H.P6)("peekViewTitleDescription.foreground", { + dark: "#ccccccb3", + light: "#616161e6", + hc: "#FFFFFF99" + }, F.N("peekViewTitleInfoForeground", + "Color of the peek view title info.")), + ie = (0, H.P6)("peekView.border", { + dark: H.c6, + light: H.c6, + hc: H.lR + }, F.N("peekViewBorder", "Color of the peek view borders and arrow.")), + ne = (0, H.P6)("peekViewResult.background", { + dark: "#252526", + light: "#F3F3F3", + hc: w.Il.black + }, F.N("peekViewResultsBackground", + "Background color of the peek view result list.")), + oe = (0, H.P6)("peekViewResult.lineForeground", { + dark: "#bbbbbb", + light: "#646465", + hc: w.Il.white + }, F.N("peekViewResultsMatchForeground", + "Foreground color for line nodes in the peek view result list.")), + re = (0, H.P6)("peekViewResult.fileForeground", { + dark: w.Il.white, + light: "#1E1E1E", + hc: w.Il.white + }, F.N("peekViewResultsFileForeground", + "Foreground color for file nodes in the peek view result list.")), + se = (0, H.P6)("peekViewResult.selectionBackground", { + dark: "#3399ff33", + light: "#3399ff33", + hc: null + }, F.N("peekViewResultsSelectionBackground", + "Background color of the selected entry in the peek view result list." + )), + ae = (0, H.P6)("peekViewResult.selectionForeground", { + dark: w.Il.white, + light: "#6C6C6C", + hc: w.Il.white + }, F.N("peekViewResultsSelectionForeground", + "Foreground color of the selected entry in the peek view result list." + )), + le = (0, H.P6)("peekViewEditor.background", { + dark: "#001F33", + light: "#F2F8FC", + hc: w.Il.black + }, F.N("peekViewEditorBackground", + "Background color of the peek view editor.")), + de = (0, H.P6)("peekViewEditorGutter.background", { + dark: le, + light: le, + hc: le + }, F.N("peekViewEditorGutterBackground", + "Background color of the gutter in the peek view editor.")), + ce = (0, H.P6)("peekViewResult.matchHighlightBackground", { + dark: "#ea5c004d", + light: "#ea5c004d", + hc: null + }, F.N("peekViewResultsMatchHighlight", + "Match highlight color in the peek view result list.")), + he = (0, H.P6)("peekViewEditor.matchHighlightBackground", { + dark: "#ff8f0099", + light: "#f5d802de", + hc: null + }, F.N("peekViewEditorMatchHighlight", + "Match highlight color in the peek view editor.")), + ue = (0, H.P6)("peekViewEditor.matchHighlightBorder", { + dark: null, + light: null, + hc: H.xL + }, F.N("peekViewEditorMatchHighlightBorder", + "Match highlight border in the peek view editor.")) + }, + 8275: (e, t, i) => { + "use strict"; + i.d(t, { + X: () => c + }); + var n = i(4973), + o = i(7781), + r = i(7869), + s = i(5976), + a = i(5520), + l = i(8401), + d = i(8289); + class c { + constructor(e) { + this.options = e, this.rangeHighlightDecorationId = void 0 + } + provide(e, t) { + var i; + const n = new s.SL; + e.canAcceptInBackground = !!(null === (i = this.options) || void 0 === + i ? void 0 : i.canAcceptInBackground), e.matchOnLabel = e.matchOnDescription = + e.matchOnDetail = e.sortByLabel = !1; + const o = n.add(new s.XK); + return o.value = this.doProvide(e, t), n.add(this.onDidActiveTextEditorControlChange( + (() => { + o.value = void 0, o.value = this.doProvide(e, t) + }))), n + } + doProvide(e, t) { + const i = new s.SL, + n = this.activeTextEditorControl; + if (n && this.canProvideWithTextEditor(n)) { + const o = { + editor: n + }, + r = (0, a.Pi)(n); + if (r) { + let e = (0, l.f6)(n.saveViewState()); + i.add(r.onDidChangeCursorPosition((() => { + e = (0, l.f6)(n.saveViewState()) + }))), o.restoreViewState = () => { + e && n === this.activeTextEditorControl && n.restoreViewState(e) + }, i.add((0, d.I)(t.onCancellationRequested)((() => { + var e; + return null === (e = o.restoreViewState) || void 0 === e ? void 0 : + e.call(o) + }))) + } + i.add((0, s.OF)((() => this.clearDecorations(n)))), i.add(this.provideWithTextEditor( + o, e, t)) + } else i.add(this.provideWithoutTextEditor(e, t)); + return i + } + canProvideWithTextEditor(e) { + return !0 + } + gotoLocation({ + editor: e + }, t) { + e.setSelection(t.range), e.revealRangeInCenter(t.range, 0), t.preserveFocus || + e.focus() + } + getModel(e) { + var t; + return (0, a.QI)(e) ? null === (t = e.getModel()) || void 0 === t ? + void 0 : t.modified : e.getModel() + } + addDecorations(e, t) { + e.changeDecorations((e => { + const i = []; + this.rangeHighlightDecorationId && (i.push(this.rangeHighlightDecorationId + .overviewRulerDecorationId), i.push(this.rangeHighlightDecorationId + .rangeHighlightId), this.rangeHighlightDecorationId = void 0); + const s = [{ + range: t, + options: { + description: "quick-access-range-highlight", + className: "rangeHighlight", + isWholeLine: !0 + } + }, { + range: t, + options: { + description: "quick-access-range-highlight-overview", + overviewRuler: { + color: (0, o.EN)(r.m9), + position: n.sh.Full + } + } + }], + [a, l] = e.deltaDecorations(i, s); + this.rangeHighlightDecorationId = { + rangeHighlightId: a, + overviewRulerDecorationId: l + } + })) + } + clearDecorations(e) { + const t = this.rangeHighlightDecorationId; + t && (e.changeDecorations((e => { + e.deltaDecorations([t.overviewRulerDecorationId, t.rangeHighlightId], []) + })), this.rangeHighlightDecorationId = void 0) + } + } + }, + 7290: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + RenameAction: () => J, + rename: () => Q + }); + var n = i(3580), + o = i(7301), + r = i(8819), + s = i(535), + a = i(6830), + l = i(9102), + d = i(3379), + c = i.n(d), + h = i(7795), + u = i.n(h), + g = i(569), + p = i.n(g), + m = i(3565), + f = i.n(m), + _ = i(9216), + b = i.n(_), + v = i(4589), + w = i.n(v), + C = i(7113), + y = {}; + y.styleTagTransform = w(), y.setAttributes = f(), y.insert = p().bind( + null, "head"), y.domAPI = u(), y.insertStyleElement = b(), c()(C.Z, y), + C.Z && C.Z.locals && C.Z.locals; + var S = i(5976), + x = i(187), + k = i(3910), + L = i(7781), + N = i(1847), + D = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const E = new r.uy("renameInputVisible", !1, (0, n.N)( + "renameInputVisible", "Whether the rename input widget is visible")); + let I = class { + constructor(e, t, i, n, o) { + this._editor = e, this._acceptKeybindings = t, this._themeService = i, + this._keybindingService = n, this._disposables = new S.SL, this.allowEditorOverflow = ! + 0, this._visibleContextKey = E.bindTo(o), this._editor.addContentWidget( + this), this._disposables.add(this._editor.onDidChangeConfiguration( + (e => { + e.hasChanged(42) && this._updateFont() + }))), this._disposables.add(i.onDidColorThemeChange(this._updateStyles, + this)) + } + dispose() { + this._disposables.dispose(), this._editor.removeContentWidget(this) + } + getId() { + return "__renameInputWidget" + } + getDomNode() { + if (!this._domNode) { + this._domNode = document.createElement("div"), this._domNode.className = + "monaco-editor rename-box", this._input = document.createElement( + "input"), this._input.className = "rename-input", this._input.type = + "text", this._input.setAttribute("aria-label", (0, n.N)( + "renameAriaLabel", + "Rename input. Type new name and press Enter to commit.")), this._domNode + .appendChild(this._input), this._label = document.createElement( + "div"), this._label.className = "rename-label", this._domNode.appendChild( + this._label); + const e = () => { + var e, t; + const [i, o] = this._acceptKeybindings; + this._keybindingService.lookupKeybinding(i), this._label.innerText = + (0, n.N)({ + key: "label", + comment: [ + 'placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"' + ] + }, "{0} to Rename, {1} to Preview", null === (e = this._keybindingService + .lookupKeybinding(i)) || void 0 === e ? void 0 : e.getLabel(), + null === (t = this._keybindingService.lookupKeybinding(o)) || + void 0 === t ? void 0 : t.getLabel()) + }; + e(), this._disposables.add(this._keybindingService.onDidUpdateKeybindings( + e)), this._updateFont(), this._updateStyles(this._themeService.getColorTheme()) + } + return this._domNode + } + _updateStyles(e) { + var t, i, n, o; + if (!this._input || !this._domNode) return; + const r = e.getColor(k.rh); + this._domNode.style.backgroundColor = String(null !== (t = e.getColor( + k.D0)) && void 0 !== t ? t : ""), this._domNode.style.boxShadow = r ? + ` 0 0 8px 2px ${r}` : "", this._domNode.style.color = String(null !== + (i = e.getColor(k.zJ)) && void 0 !== i ? i : ""), this._input.style + .backgroundColor = String(null !== (n = e.getColor(k.sE)) && void 0 !== + n ? n : ""); + const s = e.getColor(k.dt); + this._input.style.borderWidth = s ? "1px" : "0px", this._input.style.borderStyle = + s ? "solid" : "none", this._input.style.borderColor = null !== (o = + null == s ? void 0 : s.toString()) && void 0 !== o ? o : "none" + } + _updateFont() { + if (!this._input || !this._label) return; + const e = this._editor.getOption(42); + this._input.style.fontFamily = e.fontFamily, this._input.style.fontWeight = + e.fontWeight, this._input.style.fontSize = `${e.fontSize}px`, this._label + .style.fontSize = .8 * e.fontSize + "px" + } + getPosition() { + return this._visible ? { + position: this._position, + preference: [2, 1] + } : null + } + afterRender(e) { + e || this.cancelInput(!0) + } + acceptInput(e) { + this._currentAcceptInput && this._currentAcceptInput(e) + } + cancelInput(e) { + this._currentCancelInput && this._currentCancelInput(e) + } + getInput(e, t, i, n, o, r) { + this._domNode.classList.toggle("preview", o), this._position = new x.L( + e.startLineNumber, e.startColumn), this._input.value = t, this._input + .setAttribute("selectionStart", i.toString()), this._input.setAttribute( + "selectionEnd", n.toString()), this._input.size = Math.max(1.1 * (e + .endColumn - e.startColumn), 20); + const s = new S.SL; + return new Promise((e => { + this._currentCancelInput = t => (this._currentAcceptInput = void 0, + this._currentCancelInput = void 0, e(t), !0), this._currentAcceptInput = + i => { + 0 !== this._input.value.trim().length && this._input.value !== + t ? (this._currentAcceptInput = void 0, this._currentCancelInput = + void 0, e({ + newName: this._input.value, + wantsPreview: o && i + })) : this.cancelInput(!0) + }, r.onCancellationRequested((() => this.cancelInput(!0))), s.add( + this._editor.onDidBlurEditorWidget((() => this.cancelInput(!1))) + ), this._show() + })).finally((() => { + s.dispose(), this._hide() + })) + } + _show() { + this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber, + 0), this._visible = !0, this._visibleContextKey.set(!0), this._editor + .layoutContentWidget(this), setTimeout((() => { + this._input.focus(), this._input.setSelectionRange(parseInt(this._input + .getAttribute("selectionStart")), parseInt(this._input.getAttribute( + "selectionEnd"))) + }), 100) + } + _hide() { + this._visible = !1, this._visibleContextKey.reset(), this._editor.layoutContentWidget( + this) + } + }; + I = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([D(2, L.XE), D(3, N.d), D(4, r.i6)], I); + var T = i(4101), + M = i(6346), + A = i(4314), + R = i(845), + O = i(9925), + P = i(9422), + F = i(6007), + B = i(666), + W = i(1640), + z = i(1050), + V = i(5393), + H = i(3557), + U = i(2065), + j = i(9872), + K = i(3193), + $ = i(3187), + q = i(8401), + Z = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + G = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class Y { + constructor(e, t) { + this.model = e, this.position = t, this._providerRenameIdx = 0, this._providers = + T.G0.ordered(e) + } + hasProvider() { + return this._providers.length > 0 + } + resolveRenameLocation(e) { + return G(this, void 0, void 0, (function*() { + const t = []; + for (this._providerRenameIdx = 0; this._providerRenameIdx < this._providers + .length; this._providerRenameIdx++) { + const i = this._providers[this._providerRenameIdx]; + if (!i.resolveRenameLocation) break; + let n = yield i.resolveRenameLocation(this.model, this.position, + e); + if (n) { + if (!n.rejectReason) return n; + t.push(n.rejectReason) + } + } + const i = this.model.getWordAtPosition(this.position); + return i ? { + range: new A.e(this.position.lineNumber, i.startColumn, this.position + .lineNumber, i.endColumn), + text: i.word, + rejectReason: t.length > 0 ? t.join("\n") : void 0 + } : { + range: A.e.fromPositions(this.position), + text: "", + rejectReason: t.length > 0 ? t.join("\n") : void 0 + } + })) + } + provideRenameEdits(e, t) { + return G(this, void 0, void 0, (function*() { + return this._provideRenameEdits(e, this._providerRenameIdx, [], t) + })) + } + _provideRenameEdits(e, t, i, o) { + return G(this, void 0, void 0, (function*() { + const r = this._providers[t]; + if (!r) return { + edits: [], + rejectReason: i.join("\n") + }; + const s = yield r.provideRenameEdits(this.model, this.position, e, + o); + return s ? s.rejectReason ? this._provideRenameEdits(e, t + 1, i.concat( + s.rejectReason), o) : s : this._provideRenameEdits(e, t + 1, i.concat( + n.N("no result", "No result.")), o) + })) + } + } + + function Q(e, t, i) { + return G(this, void 0, void 0, (function*() { + const n = new Y(e, t), + o = yield n.resolveRenameLocation(z.T.None); + return (null == o ? void 0 : o.rejectReason) ? { + edits: [], + rejectReason: o.rejectReason + } : n.provideRenameEdits(i, z.T.None) + })) + } + let X = class e { + constructor(e, t, i, n, o, r, s) { + this.editor = e, this._instaService = t, this._notificationService = + i, this._bulkEditService = n, this._progressService = o, this._logService = + r, this._configService = s, this._dispoableStore = new S.SL, this._cts = + new z.A, this._renameInputField = this._dispoableStore.add(new V.Ue( + (() => this._dispoableStore.add(this._instaService.createInstance( + I, this.editor, ["acceptRenameInput", + "acceptRenameInputWithPreview" + ]))))) + } + static get(t) { + return t.getContribution(e.ID) + } + dispose() { + this._dispoableStore.dispose(), this._cts.dispose(!0) + } + run() { + return G(this, void 0, void 0, (function*() { + if (this._cts.dispose(!0), !this.editor.hasModel()) return; + const e = this.editor.getPosition(), + t = new Y(this.editor.getModel(), e); + if (!t.hasProvider()) return; + let i; + this._cts = new O.Dl(this.editor, 5); + try { + const e = t.resolveRenameLocation(this._cts.token); + this._progressService.showWhile(e, 250), i = yield e + } catch (t) { + return void R.O.get(this.editor).showMessage(t || n.N( + "resolveRenameLocationFailed", + "An unknown error occurred while resolving rename location"), + e) + } + if (!i) return; + if (i.rejectReason) return void R.O.get(this.editor).showMessage( + i.rejectReason, e); + if (this._cts.token.isCancellationRequested) return; + this._cts.dispose(), this._cts = new O.Dl(this.editor, 5, i.range); + let o = this.editor.getSelection(), + r = 0, + s = i.text.length; + A.e.isEmpty(o) || A.e.spansMultipleLines(o) || !A.e.containsRange( + i.range, o) || (r = Math.max(0, o.startColumn - i.range.startColumn), + s = Math.min(i.range.endColumn, o.endColumn) - i.range.startColumn + ); + const a = this._bulkEditService.hasPreviewHandler() && this._configService + .getValue(this.editor.getModel().uri, + "editor.rename.enablePreview"), + l = yield this._renameInputField.value.getInput(i.range, i.text, + r, s, a, this._cts.token); + if ("boolean" == typeof l) return void(l && this.editor.focus()); + this.editor.focus(); + const d = (0, V.eP)(t.provideRenameEdits(l.newName, this._cts.token), + this._cts.token).then((e => G(this, void 0, void 0, (function*() { + e && this.editor.hasModel() && (e.rejectReason ? this._notificationService + .info(e.rejectReason) : this._bulkEditService.apply(F.fo.convert( + e), { + editor: this.editor, + showPreview: l.wantsPreview, + label: n.N("label", "Renaming '{0}'", null == i ? void 0 : + i.text), + quotableLabel: n.N("quotableLabel", "Renaming {0}", + null == i ? void 0 : i.text) + }).then((e => { + e.ariaSummary && (0, M.Z9)(n.N("aria", + "Successfully renamed '{0}' to '{1}'. Summary: {2}", + i.text, l.newName, e.ariaSummary)) + })).catch((e => { + this._notificationService.error(n.N( + "rename.failedApply", + "Rename failed to apply edits")), this._logService.error( + e) + }))) + }))), (e => { + this._notificationService.error(n.N("rename.failed", + "Rename failed to compute edits")), this._logService.error( + e) + })); + return this._progressService.showWhile(d, 250), d + })) + } + acceptRenameInput(e) { + this._renameInputField.value.acceptInput(e) + } + cancelRenameInput() { + this._renameInputField.value.cancelInput(!0) + } + }; + X.ID = "editor.contrib.renameController", X = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([Z(1, U.TG), Z(2, P.lT), Z(3, F.vu), Z(4, s.e), Z(5, H.VZ), Z(6, $.V)], + X); + class J extends a.R6 { + constructor() { + super({ + id: "editor.action.rename", + label: n.N("rename.label", "Rename Symbol"), + alias: "Rename Symbol", + precondition: r.Ao.and(l.u.writable, l.u.hasRenameProvider), + kbOpts: { + kbExpr: l.u.editorTextFocus, + primary: 60, + weight: 100 + }, + contextMenuOpts: { + group: "1_modification", + order: 1.1 + } + }) + } + runCommand(e, t) { + const i = e.get(W.$), + [n, r] = Array.isArray(t) && t || [void 0, void 0]; + return B.o.isUri(n) && x.L.isIPosition(r) ? i.openCodeEditor({ + resource: n + }, i.getActiveCodeEditor()).then((e => { + e && (e.setPosition(r), e.invokeWithinContext((t => (this.reportTelemetry( + t, e), this.run(t, e))))) + }), o.dL) : super.runCommand(e, t) + } + run(e, t) { + const i = X.get(t); + return i ? i.run() : Promise.resolve() + } + }(0, a._K)(X.ID, X), (0, a.Qr)(J); + const ee = a._l.bindToContribution(X.get); + (0, a.fK)(new ee({ + id: "acceptRenameInput", + precondition: E, + handler: e => e.acceptRenameInput(!1), + kbOpts: { + weight: 199, + kbExpr: l.u.focus, + primary: 3 + } + })), (0, a.fK)(new ee({ + id: "acceptRenameInputWithPreview", + precondition: r.Ao.and(E, r.Ao.has( + "config.editor.rename.enablePreview")), + handler: e => e.acceptRenameInput(!0), + kbOpts: { + weight: 199, + kbExpr: l.u.focus, + primary: 1027 + } + })), (0, a.fK)(new ee({ + id: "cancelRenameInput", + precondition: E, + handler: e => e.cancelRenameInput(), + kbOpts: { + weight: 199, + kbExpr: l.u.focus, + primary: 9, + secondary: [1033] + } + })), (0, a.sb)("_executeDocumentRenameProvider", (function(e, t, ...i) { + const [n] = i; + return (0, q.p_)("string" == typeof n), Q(e, t, n) + })), j.B.as(K.IP.Configuration).registerConfiguration({ + id: "editor", + properties: { + "editor.rename.enablePreview": { + scope: 5, + description: n.N("enablePreview", + "Enable/disable the ability to preview changes before renaming"), + default: !0, + type: "boolean" + } + } + }) + }, + 689: (e, t, i) => { + "use strict"; + i.d(t, { + x: () => s + }); + var n = i(187), + o = i(4314), + r = i(1741); + class s { + provideSelectionRanges(e, t) { + return i = this, n = void 0, r = function*() { + const i = []; + for (const n of t) { + const t = []; + i.push(t); + const o = new Map; + yield new Promise((t => s._bracketsRightYield(t, 0, e, n, o))), + yield new Promise((i => s._bracketsLeftYield(i, 0, e, n, o, t))) + } + return i + }, new((o = void 0) || (o = Promise))((function(e, t) { + function s(e) { + try { + l(r.next(e)) + } catch (e) { + t(e) + } + } + + function a(e) { + try { + l(r.throw(e)) + } catch (e) { + t(e) + } + } + + function l(t) { + var i; + t.done ? e(t.value) : (i = t.value, i instanceof o ? i : new o(( + function(e) { + e(i) + }))).then(s, a) + } + l((r = r.apply(i, n || [])).next()) + })); + var i, n, o, r + } + static _bracketsRightYield(e, t, i, n, o) { + const a = new Map, + l = Date.now(); + for (;;) { + if (t >= s._maxRounds) { + e(); + break + } + if (!n) { + e(); + break + } + let d = i.findNextBracket(n); + if (!d) { + e(); + break + } + if (Date.now() - l > s._maxDuration) { + setTimeout((() => s._bracketsRightYield(e, t + 1, i, n, o))); + break + } + const c = d.close[0]; + if (d.isOpen) { + let e = a.has(c) ? a.get(c) : 0; + a.set(c, e + 1) + } else { + let e = a.has(c) ? a.get(c) : 0; + if (e -= 1, a.set(c, Math.max(0, e)), e < 0) { + let e = o.get(c); + e || (e = new r.S, o.set(c, e)), e.push(d.range) + } + } + n = d.range.getEndPosition() + } + } + static _bracketsLeftYield(e, t, i, n, r, a) { + const l = new Map, + d = Date.now(); + for (;;) { + if (t >= s._maxRounds && 0 === r.size) { + e(); + break + } + if (!n) { + e(); + break + } + let c = i.findPrevBracket(n); + if (!c) { + e(); + break + } + if (Date.now() - d > s._maxDuration) { + setTimeout((() => s._bracketsLeftYield(e, t + 1, i, n, r, a))); + break + } + const h = c.close[0]; + if (c.isOpen) { + let e = l.has(h) ? l.get(h) : 0; + if (e -= 1, l.set(h, Math.max(0, e)), e < 0) { + let e = r.get(h); + if (e) { + let t = e.shift(); + 0 === e.size && r.delete(h); + const n = o.e.fromPositions(c.range.getEndPosition(), t.getStartPosition()), + l = o.e.fromPositions(c.range.getStartPosition(), t.getEndPosition()); + a.push({ + range: n + }), a.push({ + range: l + }), s._addBracketLeading(i, l, a) + } + } + } else { + let e = l.has(h) ? l.get(h) : 0; + l.set(h, e + 1) + } + n = c.range.getStartPosition() + } + } + static _addBracketLeading(e, t, i) { + if (t.startLineNumber === t.endLineNumber) return; + const r = t.startLineNumber, + s = e.getLineFirstNonWhitespaceColumn(r); + 0 !== s && s !== t.startColumn && (i.push({ + range: o.e.fromPositions(new n.L(r, s), t.getEndPosition()) + }), i.push({ + range: o.e.fromPositions(new n.L(r, 1), t.getEndPosition()) + })); + const a = r - 1; + if (a > 0) { + const r = e.getLineFirstNonWhitespaceColumn(a); + r === t.startColumn && r !== e.getLineLastNonWhitespaceColumn(a) && ( + i.push({ + range: o.e.fromPositions(new n.L(a, r), t.getEndPosition()) + }), i.push({ + range: o.e.fromPositions(new n.L(a, 1), t.getEndPosition()) + })) + } + } + } + s._maxDuration = 30, s._maxRounds = 2 + }, + 1955: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + provideSelectionRanges: () => C + }); + var n = i(9488), + o = i(1050), + r = i(6830), + s = i(187), + a = i(4314), + l = i(3860), + d = i(9102), + c = i(4101), + h = i(3580), + u = i(4144), + g = i(7295), + p = i(689), + m = i(4565), + f = i(7301), + _ = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class b { + constructor(e, t) { + this.index = e, this.ranges = t + } + mov(e) { + let t = this.index + (e ? 1 : -1); + if (t < 0 || t >= this.ranges.length) return this; + const i = new b(t, this.ranges); + return i.ranges[t].equalsRange(this.ranges[this.index]) ? i.mov(e) : i + } + } + class v { + constructor(e) { + this._editor = e, this._ignoreSelection = !1 + } + static get(e) { + return e.getContribution(v.ID) + } + dispose() { + var e; + null === (e = this._selectionListener) || void 0 === e || e.dispose() + } + run(e) { + return _(this, void 0, void 0, (function*() { + if (!this._editor.hasModel()) return; + const t = this._editor.getSelections(), + i = this._editor.getModel(); + if (!c.AC.has(i)) return; + if (this._state || (yield C(i, t.map((e => e.getPosition())), this + ._editor.getOption(102), o.T.None).then((e => { + var i; + if (n.Of(e) && e.length === t.length && this._editor.hasModel() && + n.fS(this._editor.getSelections(), t, ((e, t) => e.equalsSelection( + t)))) { + for (let i = 0; i < e.length; i++) e[i] = e[i].filter((e => + e.containsPosition(t[i].getStartPosition()) && e.containsPosition( + t[i].getEndPosition()))), e[i].unshift(t[i]); + this._state = e.map((e => new b(0, e))), null === (i = this._selectionListener) || + void 0 === i || i.dispose(), this._selectionListener = this + ._editor.onDidChangeCursorPosition((() => { + var e; + this._ignoreSelection || (null === (e = this._selectionListener) || + void 0 === e || e.dispose(), this._state = void 0) + })) + } + }))), !this._state) return; + this._state = this._state.map((t => t.mov(e))); + const r = this._state.map((e => l.Y.fromPositions(e.ranges[e.index] + .getStartPosition(), e.ranges[e.index].getEndPosition()))); + this._ignoreSelection = !0; + try { + this._editor.setSelections(r) + } finally { + this._ignoreSelection = !1 + } + })) + } + } + v.ID = "editor.contrib.smartSelectController"; + class w extends r.R6 { + constructor(e, t) { + super(t), this._forward = e + } + run(e, t) { + return _(this, void 0, void 0, (function*() { + let e = v.get(t); + e && (yield e.run(this._forward)) + })) + } + } + + function C(e, t, i, o) { + return _(this, void 0, void 0, (function*() { + const r = c.AC.all(e); + 1 === r.length && r.unshift(new p.x); + let l = [], + d = []; + for (const i of r) l.push(Promise.resolve(i.provideSelectionRanges(e, + t, o)).then((e => { + if (n.Of(e) && e.length === t.length) + for (let i = 0; i < t.length; i++) { + d[i] || (d[i] = []); + for (const n of e[i]) a.e.isIRange(n.range) && a.e.containsPosition( + n.range, t[i]) && d[i].push(a.e.lift(n.range)) + } + }), f.Cp)); + return yield Promise.all(l), d.map((t => { + if (0 === t.length) return []; + t.sort(((e, t) => s.L.isBefore(e.getStartPosition(), t.getStartPosition()) ? + 1 : s.L.isBefore(t.getStartPosition(), e.getStartPosition()) || + s.L.isBefore(e.getEndPosition(), t.getEndPosition()) ? -1 : s + .L.isBefore(t.getEndPosition(), e.getEndPosition()) ? 1 : 0)); + let n, o = []; + for (const e of t)(!n || a.e.containsRange(e, n) && !a.e.equalsRange( + e, n)) && (o.push(e), n = e); + if (!i.selectLeadingAndTrailingWhitespace) return o; + let r = [o[0]]; + for (let t = 1; t < o.length; t++) { + const i = o[t - 1], + n = o[t]; + if (n.startLineNumber !== i.startLineNumber || n.endLineNumber !== + i.endLineNumber) { + const t = new a.e(i.startLineNumber, e.getLineFirstNonWhitespaceColumn( + i.startLineNumber), i.endLineNumber, e.getLineLastNonWhitespaceColumn( + i.endLineNumber)); + t.containsRange(i) && !t.equalsRange(i) && n.containsRange(t) && + !n.equalsRange(t) && r.push(t); + const o = new a.e(i.startLineNumber, 1, i.endLineNumber, e.getLineMaxColumn( + i.endLineNumber)); + o.containsRange(i) && !o.equalsRange(t) && n.containsRange(o) && + !n.equalsRange(o) && r.push(o) + } + r.push(n) + } + return r + })) + })) + } + m.P.registerCommandAlias("editor.action.smartSelect.grow", + "editor.action.smartSelect.expand"), (0, r._K)(v.ID, v), (0, r.Qr)( + class extends w { + constructor() { + super(!0, { + id: "editor.action.smartSelect.expand", + label: h.N("smartSelect.expand", "Expand Selection"), + alias: "Expand Selection", + precondition: void 0, + kbOpts: { + kbExpr: d.u.editorTextFocus, + primary: 1553, + mac: { + primary: 3345, + secondary: [1297] + }, + weight: 100 + }, + menuOpts: { + menuId: u.eH.MenubarSelectionMenu, + group: "1_basic", + title: h.N({ + key: "miSmartSelectGrow", + comment: ["&& denotes a mnemonic"] + }, "&&Expand Selection"), + order: 2 + } + }) + } + }), (0, r.Qr)(class extends w { + constructor() { + super(!1, { + id: "editor.action.smartSelect.shrink", + label: h.N("smartSelect.shrink", "Shrink Selection"), + alias: "Shrink Selection", + precondition: void 0, + kbOpts: { + kbExpr: d.u.editorTextFocus, + primary: 1551, + mac: { + primary: 3343, + secondary: [1295] + }, + weight: 100 + }, + menuOpts: { + menuId: u.eH.MenubarSelectionMenu, + group: "1_basic", + title: h.N({ + key: "miSmartSelectShrink", + comment: ["&& denotes a mnemonic"] + }, "&&Shrink Selection"), + order: 3 + } + }) + } + }), c.AC.register("*", new class { + provideSelectionRanges(e, t) { + const i = []; + for (const n of t) { + const t = []; + i.push(t), this._addInWordRanges(t, e, n), this._addWordRanges(t, e, + n), this._addWhitespaceLine(t, e, n), t.push({ + range: e.getFullModelRange() + }) + } + return i + } + _addInWordRanges(e, t, i) { + const n = t.getWordAtPosition(i); + if (!n) return; + let { + word: o, + startColumn: r + } = n, s = i.column - r, l = s, d = s, c = 0; + for (; l >= 0; l--) { + let e = o.charCodeAt(l); + if (l !== s && (95 === e || 45 === e)) break; + if ((0, g.mK)(e) && (0, g.df)(c)) break; + c = e + } + for (l += 1; d < o.length; d++) { + let e = o.charCodeAt(d); + if ((0, g.df)(e) && (0, g.mK)(c)) break; + if (95 === e || 45 === e) break; + c = e + } + l < d && e.push({ + range: new a.e(i.lineNumber, r + l, i.lineNumber, r + d) + }) + } + _addWordRanges(e, t, i) { + const n = t.getWordAtPosition(i); + n && e.push({ + range: new a.e(i.lineNumber, n.startColumn, i.lineNumber, n.endColumn) + }) + } + _addWhitespaceLine(e, t, i) { + t.getLineLength(i.lineNumber) > 0 && 0 === t.getLineFirstNonWhitespaceColumn( + i.lineNumber) && 0 === t.getLineLastNonWhitespaceColumn(i.lineNumber) && + e.push({ + range: new a.e(i.lineNumber, 1, i.lineNumber, t.getLineMaxColumn( + i.lineNumber)) + }) + } + }), (0, r.f)("_executeSelectionRangeProvider", (function(e, ...t) { + const [i] = t; + return C(e, i, { + selectLeadingAndTrailingWhitespace: !0 + }, o.T.None) + })) + }, + 2860: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + SnippetController2: () => m + }); + var n = i(5976), + o = i(6830), + r = i(4314), + s = i(3860), + a = i(9102), + l = i(9599), + d = i(8819), + c = i(3557), + h = i(781), + u = i(3580), + g = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const p = { + overwriteBefore: 0, + overwriteAfter: 0, + undoStopBefore: !0, + undoStopAfter: !0, + adjustWhitespace: !0, + clipboardText: void 0, + overtypingCapturer: void 0 + }; + let m = class e { + constructor(t, i, o) { + this._editor = t, this._logService = i, this._snippetListener = new n + .SL, this._modelVersionId = -1, this._inSnippet = e.InSnippetMode.bindTo( + o), this._hasNextTabstop = e.HasNextTabstop.bindTo(o), this._hasPrevTabstop = + e.HasPrevTabstop.bindTo(o) + } + static get(t) { + return t.getContribution(e.ID) + } + dispose() { + var e; + this._inSnippet.reset(), this._hasPrevTabstop.reset(), this._hasNextTabstop + .reset(), null === (e = this._session) || void 0 === e || e.dispose(), + this._snippetListener.dispose() + } + insert(e, t) { + try { + this._doInsert(e, void 0 === t ? p : Object.assign(Object.assign({}, + p), t)) + } catch (t) { + this.cancel(), this._logService.error(t), this._logService.error( + "snippet_error"), this._logService.error("insert_template=", e), + this._logService.error("existing_template=", this._session ? this._session + ._logInfo() : "") + } + } + _doInsert(e, t) { + this._editor.hasModel() && (this._snippetListener.clear(), t.undoStopBefore && + this._editor.getModel().pushStackElement(), this._session ? this._session + .merge(e, t) : (this._modelVersionId = this._editor.getModel().getAlternativeVersionId(), + this._session = new h.l(this._editor, e, t), this._session.insert() + ), t.undoStopAfter && this._editor.getModel().pushStackElement(), + this._updateState(), this._snippetListener.add(this._editor.onDidChangeModelContent( + (e => e.isFlush && this.cancel()))), this._snippetListener.add( + this._editor.onDidChangeModel((() => this.cancel()))), this._snippetListener + .add(this._editor.onDidChangeCursorSelection((() => this._updateState()))) + ) + } + _updateState() { + if (this._session && this._editor.hasModel()) { + if (this._modelVersionId === this._editor.getModel().getAlternativeVersionId()) + return this.cancel(); + if (!this._session.hasPlaceholder) return this.cancel(); + if (this._session.isAtLastPlaceholder || !this._session.isSelectionWithinPlaceholders()) + return this.cancel(); + this._inSnippet.set(!0), this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder), + this._hasNextTabstop.set(!this._session.isAtLastPlaceholder), this._handleChoice() + } + } + _handleChoice() { + if (!this._session || !this._editor.hasModel()) return void(this._currentChoice = + void 0); + const { + choice: e + } = this._session; + if (e) { + if (this._currentChoice !== e) { + this._currentChoice = e, this._editor.setSelections(this._editor.getSelections() + .map((e => s.Y.fromPositions(e.getStartPosition())))); + const [t] = e.options; + (0, l.i5)(this._editor, e.options.map(((e, i) => ({ + kind: 13, + label: e.value, + insertText: e.value, + sortText: "a".repeat(i + 1), + range: r.e.fromPositions(this._editor.getPosition(), this._editor + .getPosition().delta(0, t.value.length)) + })))) + } + } else this._currentChoice = void 0 + } + finish() { + for (; this._inSnippet.get();) this.next() + } + cancel(e = !1) { + var t; + this._inSnippet.reset(), this._hasPrevTabstop.reset(), this._hasNextTabstop + .reset(), this._snippetListener.clear(), null === (t = this._session) || + void 0 === t || t.dispose(), this._session = void 0, this._modelVersionId = - + 1, e && this._editor.setSelections([this._editor.getSelection()]) + } + prev() { + this._session && this._session.prev(), this._updateState() + } + next() { + this._session && this._session.next(), this._updateState() + } + isInSnippet() { + return Boolean(this._inSnippet.get()) + } + }; + m.ID = "snippetController2", m.InSnippetMode = new d.uy("inSnippetMode", ! + 1, (0, u.N)("inSnippetMode", + "Whether the editor in current in snippet mode")), m.HasNextTabstop = + new d.uy("hasNextTabstop", !1, (0, u.N)("hasNextTabstop", + "Whether there is a next tab stop when in snippet mode")), m.HasPrevTabstop = + new d.uy("hasPrevTabstop", !1, (0, u.N)("hasPrevTabstop", + "Whether there is a previous tab stop when in snippet mode")), m = + function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([g(1, c.VZ), g(2, d.i6)], m), (0, o._K)(m.ID, m); + const f = o._l.bindToContribution(m.get); + (0, o.fK)(new f({ + id: "jumpToNextSnippetPlaceholder", + precondition: d.Ao.and(m.InSnippetMode, m.HasNextTabstop), + handler: e => e.next(), + kbOpts: { + weight: 130, + kbExpr: a.u.editorTextFocus, + primary: 2 + } + })), (0, o.fK)(new f({ + id: "jumpToPrevSnippetPlaceholder", + precondition: d.Ao.and(m.InSnippetMode, m.HasPrevTabstop), + handler: e => e.prev(), + kbOpts: { + weight: 130, + kbExpr: a.u.editorTextFocus, + primary: 1026 + } + })), (0, o.fK)(new f({ + id: "leaveSnippet", + precondition: m.InSnippetMode, + handler: e => e.cancel(!0), + kbOpts: { + weight: 130, + kbExpr: a.u.editorTextFocus, + primary: 9, + secondary: [1033] + } + })), (0, o.fK)(new f({ + id: "acceptSnippet", + precondition: m.InSnippetMode, + handler: e => e.finish() + })) + }, + 3472: (e, t, i) => { + "use strict"; + i.d(t, { + xv: () => r, + Vm: () => a, + Lv: () => l, + Yj: () => p + }); + class n { + constructor() { + this.value = "", this.pos = 0 + } + static isDigitCharacter(e) { + return e >= 48 && e <= 57 + } + static isVariableCharacter(e) { + return 95 === e || e >= 97 && e <= 122 || e >= 65 && e <= 90 + } + text(e) { + this.value = e, this.pos = 0 + } + tokenText(e) { + return this.value.substr(e.pos, e.len) + } + next() { + if (this.pos >= this.value.length) return { + type: 14, + pos: this.pos, + len: 0 + }; + let e, t = this.pos, + i = 0, + o = this.value.charCodeAt(t); + if (e = n._table[o], "number" == typeof e) return this.pos += 1, { + type: e, + pos: t, + len: 1 + }; + if (n.isDigitCharacter(o)) { + e = 8; + do { + i += 1, o = this.value.charCodeAt(t + i) + } while (n.isDigitCharacter(o)); + return this.pos += i, { + type: e, + pos: t, + len: i + } + } + if (n.isVariableCharacter(o)) { + e = 9; + do { + o = this.value.charCodeAt(t + ++i) + } while (n.isVariableCharacter(o) || n.isDigitCharacter(o)); + return this.pos += i, { + type: e, + pos: t, + len: i + } + } + e = 10; + do { + i += 1, o = this.value.charCodeAt(t + i) + } while (!isNaN(o) && void 0 === n._table[o] && !n.isDigitCharacter(o) && + !n.isVariableCharacter(o)); + return this.pos += i, { + type: e, + pos: t, + len: i + } + } + } + n._table = { + 36: 0, + 58: 1, + 44: 2, + 123: 3, + 125: 4, + 92: 5, + 47: 6, + 124: 7, + 43: 11, + 45: 12, + 63: 13 + }; + class o { + constructor() { + this._children = [] + } + appendChild(e) { + return e instanceof r && this._children[this._children.length - 1] instanceof r ? + this._children[this._children.length - 1].value += e.value : (e.parent = + this, this._children.push(e)), this + } + replace(e, t) { + const { + parent: i + } = e, n = i.children.indexOf(e), o = i.children.slice(0); + o.splice(n, 1, ...t), i._children = o, + function e(t, i) { + for (const n of t) n.parent = i, e(n.children, n) + }(t, i) + } + get children() { + return this._children + } + get snippet() { + let e = this; + for (;;) { + if (!e) return; + if (e instanceof g) return e; + e = e.parent + } + } + toString() { + return this.children.reduce(((e, t) => e + t.toString()), "") + } + len() { + return 0 + } + } + class r extends o { + constructor(e) { + super(), this.value = e + } + toString() { + return this.value + } + len() { + return this.value.length + } + clone() { + return new r(this.value) + } + } + class s extends o {} + class a extends s { + constructor(e) { + super(), this.index = e + } + static compareByIndex(e, t) { + return e.index === t.index ? 0 : e.isFinalTabstop ? 1 : t.isFinalTabstop || + e.index < t.index ? -1 : e.index > t.index ? 1 : 0 + } + get isFinalTabstop() { + return 0 === this.index + } + get choice() { + return 1 === this._children.length && this._children[0] instanceof l ? + this._children[0] : void 0 + } + clone() { + let e = new a(this.index); + return this.transform && (e.transform = this.transform.clone()), e._children = + this.children.map((e => e.clone())), e + } + } + class l extends o { + constructor() { + super(...arguments), this.options = [] + } + appendChild(e) { + return e instanceof r && (e.parent = this, this.options.push(e)), this + } + toString() { + return this.options[0].value + } + len() { + return this.options[0].len() + } + clone() { + let e = new l; + return this.options.forEach(e.appendChild, e), e + } + } + class d extends o { + constructor() { + super(...arguments), this.regexp = new RegExp("") + } + resolve(e) { + const t = this; + let i = !1, + n = e.replace(this.regexp, (function() { + return i = !0, t._replace(Array.prototype.slice.call(arguments, 0, - + 2)) + })); + return !i && this._children.some((e => e instanceof c && Boolean(e.elseValue))) && + (n = this._replace([])), n + } + _replace(e) { + let t = ""; + for (const i of this._children) + if (i instanceof c) { + let n = e[i.index] || ""; + n = i.resolve(n), t += n + } else t += i.toString(); + return t + } + toString() { + return "" + } + clone() { + let e = new d; + return e.regexp = new RegExp(this.regexp.source, (this.regexp.ignoreCase ? + "i" : "") + (this.regexp.global ? "g" : "")), e._children = this.children + .map((e => e.clone())), e + } + } + class c extends o { + constructor(e, t, i, n) { + super(), this.index = e, this.shorthandName = t, this.ifValue = i, + this.elseValue = n + } + resolve(e) { + return "upcase" === this.shorthandName ? e ? e.toLocaleUpperCase() : + "" : "downcase" === this.shorthandName ? e ? e.toLocaleLowerCase() : + "" : "capitalize" === this.shorthandName ? e ? e[0].toLocaleUpperCase() + + e.substr(1) : "" : "pascalcase" === this.shorthandName ? e ? this._toPascalCase( + e) : "" : "camelcase" === this.shorthandName ? e ? this._toCamelCase( + e) : "" : Boolean(e) && "string" == typeof this.ifValue ? this.ifValue : + Boolean(e) || "string" != typeof this.elseValue ? e || "" : this.elseValue + } + _toPascalCase(e) { + const t = e.match(/[a-z0-9]+/gi); + return t ? t.map((e => e.charAt(0).toUpperCase() + e.substr(1).toLowerCase())) + .join("") : e + } + _toCamelCase(e) { + const t = e.match(/[a-z0-9]+/gi); + return t ? t.map(((e, t) => 0 === t ? e.toLowerCase() : e.charAt(0).toUpperCase() + + e.substr(1).toLowerCase())).join("") : e + } + clone() { + return new c(this.index, this.shorthandName, this.ifValue, this.elseValue) + } + } + class h extends s { + constructor(e) { + super(), this.name = e + } + resolve(e) { + let t = e.resolve(this); + return this.transform && (t = this.transform.resolve(t || "")), void 0 !== + t && (this._children = [new r(t)], !0) + } + clone() { + const e = new h(this.name); + return this.transform && (e.transform = this.transform.clone()), e._children = + this.children.map((e => e.clone())), e + } + } + + function u(e, t) { + const i = [...e]; + for (; i.length > 0;) { + const e = i.shift(); + if (!t(e)) break; + i.unshift(...e.children) + } + } + class g extends o {get placeholderInfo() { + if (!this._placeholders) { + let e, t = []; + this.walk((function(i) { + return i instanceof a && (t.push(i), e = !e || e.index < i.index ? + i : e), !0 + })), this._placeholders = { + all: t, + last: e + } + } + return this._placeholders + } + get placeholders() { + const { + all: e + } = this.placeholderInfo; + return e + } + offset(e) { + let t = 0, + i = !1; + return this.walk((n => n === e ? (i = !0, !1) : (t += n.len(), !0))), i ? + t : -1 + } + fullLen(e) { + let t = 0; + return u([e], (e => (t += e.len(), !0))), t + } + enclosingPlaceholders(e) { + let t = [], + { + parent: i + } = e; + for (; i;) i instanceof a && t.push(i), i = i.parent; + return t + } + resolveVariables(e) { + return this.walk((t => (t instanceof h && t.resolve(e) && (this._placeholders = + void 0), !0))), this + } + appendChild(e) { + return this._placeholders = void 0, super.appendChild(e) + } + replace(e, t) { + return this._placeholders = void 0, super.replace(e, t) + } + clone() { + let e = new g; + return this._children = this.children.map((e => e.clone())), e + } + walk(e) { + u(this.children, e) + } + } + class p { + constructor() { + this._scanner = new n, this._token = { + type: 14, + pos: 0, + len: 0 + } + } + static escape(e) { + return e.replace(/\$|}|\\/g, "\\$&") + } + static guessNeedsClipboard(e) { + return /\${?CLIPBOARD/.test(e) + } + parse(e, t, i) { + this._scanner.text(e), this._token = this._scanner.next(); + const n = new g; + for (; this._parse(n);); + const o = new Map, + r = []; + let s = 0; + n.walk((e => (e instanceof a && (s += 1, e.isFinalTabstop ? o.set(0, + void 0) : !o.has(e.index) && e.children.length > 0 ? o.set(e.index, + e.children) : r.push(e)), !0))); + for (const e of r) { + const t = o.get(e.index); + if (t) { + const i = new a(e.index); + i.transform = e.transform; + for (const e of t) i.appendChild(e.clone()); + n.replace(e, [i]) + } + } + return i || (i = s > 0 && t), !o.has(0) && i && n.appendChild(new a(0)), + n + } + _accept(e, t) { + if (void 0 === e || this._token.type === e) { + let e = !t || this._scanner.tokenText(this._token); + return this._token = this._scanner.next(), e + } + return !1 + } + _backTo(e) { + return this._scanner.pos = e.pos + e.len, this._token = e, !1 + } + _until(e) { + const t = this._token; + for (; this._token.type !== e;) { + if (14 === this._token.type) return !1; + if (5 === this._token.type) { + const e = this._scanner.next(); + if (0 !== e.type && 4 !== e.type && 5 !== e.type) return !1 + } + this._token = this._scanner.next() + } + const i = this._scanner.value.substring(t.pos, this._token.pos).replace( + /\\(\$|}|\\)/g, "$1"); + return this._token = this._scanner.next(), i + } + _parse(e) { + return this._parseEscaped(e) || this._parseTabstopOrVariableName(e) || + this._parseComplexPlaceholder(e) || this._parseComplexVariable(e) || + this._parseAnything(e) + } + _parseEscaped(e) { + let t; + return !!(t = this._accept(5, !0)) && (t = this._accept(0, !0) || this + ._accept(4, !0) || this._accept(5, !0) || t, e.appendChild(new r(t)), ! + 0) + } + _parseTabstopOrVariableName(e) { + let t; + const i = this._token; + return this._accept(0) && (t = this._accept(9, !0) || this._accept(8, ! + 0)) ? (e.appendChild(/^\d+$/.test(t) ? new a(Number(t)) : new h(t)), ! + 0) : this._backTo(i) + } + _parseComplexPlaceholder(e) { + let t; + const i = this._token; + if (!(this._accept(0) && this._accept(3) && (t = this._accept(8, !0)))) + return this._backTo(i); + const n = new a(Number(t)); + if (this._accept(1)) + for (;;) { + if (this._accept(4)) return e.appendChild(n), !0; + if (!this._parse(n)) return e.appendChild(new r("${" + t + ":")), n.children + .forEach(e.appendChild, e), !0 + } else { + if (!(n.index > 0 && this._accept(7))) return this._accept(6) ? this + ._parseTransform(n) ? (e.appendChild(n), !0) : (this._backTo(i), ! + 1) : this._accept(4) ? (e.appendChild(n), !0) : this._backTo(i); { + const t = new l; + for (;;) { + if (this._parseChoiceElement(t)) { + if (this._accept(2)) continue; + if (this._accept(7) && (n.appendChild(t), this._accept(4))) return + e.appendChild(n), !0 + } + return this._backTo(i), !1 + } + } + } + } + _parseChoiceElement(e) { + const t = this._token, + i = []; + for (; 2 !== this._token.type && 7 !== this._token.type;) { + let e; + if (e = (e = this._accept(5, !0)) ? this._accept(2, !0) || this._accept( + 7, !0) || this._accept(5, !0) || e : this._accept(void 0, !0), !e) + return this._backTo(t), !1; + i.push(e) + } + return 0 === i.length ? (this._backTo(t), !1) : (e.appendChild(new r(i + .join(""))), !0) + } + _parseComplexVariable(e) { + let t; + const i = this._token; + if (!(this._accept(0) && this._accept(3) && (t = this._accept(9, !0)))) + return this._backTo(i); + const n = new h(t); + if (!this._accept(1)) return this._accept(6) ? this._parseTransform(n) ? + (e.appendChild(n), !0) : (this._backTo(i), !1) : this._accept(4) ? ( + e.appendChild(n), !0) : this._backTo(i); + for (;;) { + if (this._accept(4)) return e.appendChild(n), !0; + if (!this._parse(n)) return e.appendChild(new r("${" + t + ":")), n.children + .forEach(e.appendChild, e), !0 + } + } + _parseTransform(e) { + let t = new d, + i = "", + n = ""; + for (; !this._accept(6);) { + let e; + if (e = this._accept(5, !0)) e = this._accept(6, !0) || e, i += e; + else { + if (14 === this._token.type) return !1; + i += this._accept(void 0, !0) + } + } + for (; !this._accept(6);) { + let e; + if (e = this._accept(5, !0)) e = this._accept(5, !0) || this._accept( + 6, !0) || e, t.appendChild(new r(e)); + else if (!this._parseFormatString(t) && !this._parseAnything(t)) + return !1 + } + for (; !this._accept(4);) { + if (14 === this._token.type) return !1; + n += this._accept(void 0, !0) + } + try { + t.regexp = new RegExp(i, n) + } catch (e) { + return !1 + } + return e.transform = t, !0 + } + _parseFormatString(e) { + const t = this._token; + if (!this._accept(0)) return !1; + let i = !1; + this._accept(3) && (i = !0); + let n = this._accept(8, !0); + if (!n) return this._backTo(t), !1; + if (!i) return e.appendChild(new c(Number(n))), !0; + if (this._accept(4)) return e.appendChild(new c(Number(n))), !0; + if (!this._accept(1)) return this._backTo(t), !1; + if (this._accept(6)) { + let i = this._accept(9, !0); + return i && this._accept(4) ? (e.appendChild(new c(Number(n), i)), !0) : + (this._backTo(t), !1) + } + if (this._accept(11)) { + let t = this._until(4); + if (t) return e.appendChild(new c(Number(n), void 0, t, void 0)), !0 + } else if (this._accept(12)) { + let t = this._until(4); + if (t) return e.appendChild(new c(Number(n), void 0, void 0, t)), !0 + } else if (this._accept(13)) { + let t = this._until(1); + if (t) { + let i = this._until(4); + if (i) return e.appendChild(new c(Number(n), void 0, t, i)), !0 + } + } else { + let t = this._until(4); + if (t) return e.appendChild(new c(Number(n), void 0, void 0, t)), !0 + } + return this._backTo(t), !1 + } + _parseAnything(e) { + return 14 !== this._token.type && (e.appendChild(new r(this._scanner.tokenText( + this._token))), this._accept(void 0), !0) + } + } + }, + 781: (e, t, i) => { + "use strict"; + i.d(t, { + l: () => Q + }); + var n = i(9488), + o = i(5976), + r = i(7295), + s = i(3379), + a = i.n(s), + l = i(7795), + d = i.n(l), + c = i(569), + h = i.n(c), + u = i(3565), + g = i.n(u), + p = i(9216), + m = i.n(p), + f = i(4589), + _ = i.n(f), + b = i(8894), + v = {}; + v.styleTagTransform = _(), v.setAttributes = g(), v.insert = h().bind( + null, "head"), v.domAPI = d(), v.insertStyleElement = m(), a()(b.Z, v), + b.Z && b.Z.locals && b.Z.locals; + var w = i(9386), + C = i(4314), + y = i(3860), + S = i(6281), + x = i(382), + k = i(2065), + L = i(3472), + N = i(3580), + D = i(8721), + E = i(5935), + I = i(3831), + T = i(666); + const M = "code-workspace"; + + function A(e) { + const t = e; + return "string" == typeof(null == t ? void 0 : t.id) && T.o.isUri(t.uri) + } + var R = i(8843); + const O = new Uint8Array(16), + P = []; + for (let e = 0; e < 256; e++) P.push(e.toString(16).padStart(2, "0")); + let F; + F = "object" == typeof crypto && "function" == typeof crypto.getRandomValues ? + crypto.getRandomValues.bind(crypto) : function(e) { + for (let t = 0; t < e.length; t++) e[t] = Math.floor(256 * Math.random()); + return e + }; + class B { + constructor(e) { + this._delegates = e + } + resolve(e) { + for (const t of this._delegates) { + let i = t.resolve(e); + if (void 0 !== i) return i + } + } + } + class W { + constructor(e, t, i, n) { + this._model = e, this._selection = t, this._selectionIdx = i, this._overtypingCapturer = + n + } + resolve(e) { + const { + name: t + } = e; + if ("SELECTION" === t || "TM_SELECTED_TEXT" === t) { + let t = this._model.getValueInRange(this._selection) || void 0, + i = this._selection.startLineNumber !== this._selection.endLineNumber; + if (!t && this._overtypingCapturer) { + const e = this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx); + e && (t = e.value, i = e.multiline) + } + if (t && i && e.snippet) { + const i = this._model.getLineContent(this._selection.startLineNumber), + n = (0, r.V8)(i, 0, this._selection.startColumn - 1); + let o = n; + e.snippet.walk((t => t !== e && (t instanceof L.xv && (o = (0, r.V8) + ((0, r.uq)(t.value).pop())), !0))); + const s = (0, r.Mh)(o, n); + t = t.replace(/(\r\n|\r|\n)(.*)/g, ((e, t, i) => + `${t}${o.substr(s)}${i}`)) + } + return t + } + if ("TM_CURRENT_LINE" === t) return this._model.getLineContent(this._selection + .positionLineNumber); + if ("TM_CURRENT_WORD" === t) { + const e = this._model.getWordAtPosition({ + lineNumber: this._selection.positionLineNumber, + column: this._selection.positionColumn + }); + return e && e.word || void 0 + } + return "TM_LINE_INDEX" === t ? String(this._selection.positionLineNumber - + 1) : "TM_LINE_NUMBER" === t ? String(this._selection.positionLineNumber) : + void 0 + } + } + class z { + constructor(e, t) { + this._labelService = e, this._model = t + } + resolve(e) { + const { + name: t + } = e; + if ("TM_FILENAME" === t) return D.EZ(this._model.uri.fsPath); + if ("TM_FILENAME_BASE" === t) { + const e = D.EZ(this._model.uri.fsPath), + t = e.lastIndexOf("."); + return t <= 0 ? e : e.slice(0, t) + } + return "TM_DIRECTORY" === t && this._labelService ? "." === D.XX(this._model + .uri.fsPath) ? "" : this._labelService.getUriLabel((0, E.XX)(this._model + .uri)) : "TM_FILEPATH" === t && this._labelService ? this._labelService + .getUriLabel(this._model.uri) : "RELATIVE_FILEPATH" === t && this._labelService ? + this._labelService.getUriLabel(this._model.uri, { + relative: !0, + noPrefix: !0 + }) : void 0 + } + } + class V { + constructor(e, t, i, n) { + this._readClipboardText = e, this._selectionIdx = t, this._selectionCount = + i, this._spread = n + } + resolve(e) { + if ("CLIPBOARD" !== e.name) return; + const t = this._readClipboardText(); + if (t) { + if (this._spread) { + const e = t.split(/\r\n|\n|\r/).filter((e => !(0, r.m5)(e))); + if (e.length === this._selectionCount) return e[this._selectionIdx] + } + return t + } + } + } + class H { + constructor(e, t) { + this._model = e, this._selection = t + } + resolve(e) { + const { + name: t + } = e, i = this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber, + this._selection.selectionStartColumn), n = I.zu.getComments(i); + if (n) return "LINE_COMMENT" === t ? n.lineCommentToken || void 0 : + "BLOCK_COMMENT_START" === t ? n.blockCommentStartToken || void 0 : + "BLOCK_COMMENT_END" === t && n.blockCommentEndToken || void 0 + } + } + class U { + constructor() { + this._date = new Date + } + resolve(e) { + const { + name: t + } = e; + return "CURRENT_YEAR" === t ? String(this._date.getFullYear()) : + "CURRENT_YEAR_SHORT" === t ? String(this._date.getFullYear()).slice(- + 2) : "CURRENT_MONTH" === t ? String(this._date.getMonth().valueOf() + + 1).padStart(2, "0") : "CURRENT_DATE" === t ? String(this._date.getDate() + .valueOf()).padStart(2, "0") : "CURRENT_HOUR" === t ? String(this._date + .getHours().valueOf()).padStart(2, "0") : "CURRENT_MINUTE" === t ? + String(this._date.getMinutes().valueOf()).padStart(2, "0") : + "CURRENT_SECOND" === t ? String(this._date.getSeconds().valueOf()).padStart( + 2, "0") : "CURRENT_DAY_NAME" === t ? U.dayNames[this._date.getDay()] : + "CURRENT_DAY_NAME_SHORT" === t ? U.dayNamesShort[this._date.getDay()] : + "CURRENT_MONTH_NAME" === t ? U.monthNames[this._date.getMonth()] : + "CURRENT_MONTH_NAME_SHORT" === t ? U.monthNamesShort[this._date.getMonth()] : + "CURRENT_SECONDS_UNIX" === t ? String(Math.floor(this._date.getTime() / + 1e3)) : void 0 + } + } + U.dayNames = [N.N("Sunday", "Sunday"), N.N("Monday", "Monday"), N.N( + "Tuesday", "Tuesday"), N.N("Wednesday", "Wednesday"), N.N("Thursday", + "Thursday"), N.N("Friday", "Friday"), N.N("Saturday", "Saturday")], U.dayNamesShort = [ + N.N("SundayShort", "Sun"), N.N("MondayShort", "Mon"), N.N( + "TuesdayShort", "Tue"), N.N("WednesdayShort", "Wed"), N.N( + "ThursdayShort", "Thu"), N.N("FridayShort", "Fri"), N.N( + "SaturdayShort", "Sat") + ], U.monthNames = [N.N("January", "January"), N.N("February", "February"), + N.N("March", "March"), N.N("April", "April"), N.N("May", "May"), N.N( + "June", "June"), N.N("July", "July"), N.N("August", "August"), N.N( + "September", "September"), N.N("October", "October"), N.N("November", + "November"), N.N("December", "December") + ], U.monthNamesShort = [N.N("JanuaryShort", "Jan"), N.N("FebruaryShort", + "Feb"), N.N("MarchShort", "Mar"), N.N("AprilShort", "Apr"), N.N( + "MayShort", "May"), N.N("JuneShort", "Jun"), N.N("JulyShort", "Jul"), + N.N("AugustShort", "Aug"), N.N("SeptemberShort", "Sep"), N.N( + "OctoberShort", "Oct"), N.N("NovemberShort", "Nov"), N.N( + "DecemberShort", "Dec") + ]; + class j { + constructor(e) { + this._workspaceService = e + } + resolve(e) { + if (!this._workspaceService) return; + const t = function(e) { + return e.configuration ? { + id: e.id, + configPath: e.configuration + } : 1 === e.folders.length ? { + id: e.id, + uri: e.folders[0].uri + } : void 0 + }(this._workspaceService.getWorkspace()); + return t ? "WORKSPACE_NAME" === e.name ? this._resolveWorkspaceName(t) : + "WORKSPACE_FOLDER" === e.name ? this._resoveWorkspacePath(t) : void 0 : + void 0 + } + _resolveWorkspaceName(e) { + if (A(e)) return D.EZ(e.uri.path); + let t = D.EZ(e.configPath.path); + return t.endsWith(M) && (t = t.substr(0, t.length - M.length - 1)), t + } + _resoveWorkspacePath(e) { + if (A(e)) return (0, R.D)(e.uri.fsPath); + let t = D.EZ(e.configPath.path), + i = e.configPath.fsPath; + return i.endsWith(t) && (i = i.substr(0, i.length - t.length - 1)), i ? + (0, R.D)(i) : "/" + } + } + class K { + resolve(e) { + const { + name: t + } = e; + return "RANDOM" === t ? Math.random().toString().slice(-6) : + "RANDOM_HEX" === t ? Math.random().toString(16).slice(-6) : "UUID" === + t ? function() { + F(O), O[6] = 15 & O[6] | 64, O[8] = 63 & O[8] | 128; + let e = 0, + t = ""; + return t += P[O[e++]], t += P[O[e++]], t += P[O[e++]], t += P[O[e++]], + t += "-", t += P[O[e++]], t += P[O[e++]], t += "-", t += P[O[e++]], + t += P[O[e++]], t += "-", t += P[O[e++]], t += P[O[e++]], t += "-", + t += P[O[e++]], t += P[O[e++]], t += P[O[e++]], t += P[O[e++]], t += + P[O[e++]], t += P[O[e++]], t + }() : void 0 + } + } + var $ = i(7781), + q = i(3910), + Z = i(4349); + (0, $.Ic)(((e, t) => { + function i(t) { + const i = e.getColor(t); + return i ? i.toString() : "transparent" + } + t.addRule( + `.monaco-editor .snippet-placeholder { background-color: ${i(q.u2)}; outline-color: ${i(q.Pk)}; }` + ), t.addRule( + `.monaco-editor .finish-snippet-placeholder { background-color: ${i(q.I1)}; outline-color: ${i(q.U6)}; }` + ) + })); + class G { + constructor(e, t, i, o) { + this._editor = e, this._snippet = t, this._offset = i, this._snippetLineLeadingWhitespace = + o, this._nestingLevel = 1, this._placeholderGroups = (0, n.vM)(t.placeholders, + L.Vm.compareByIndex), this._placeholderGroupsIdx = -1 + } + dispose() { + this._placeholderDecorations && this._editor.deltaDecorations([...this + ._placeholderDecorations.values() + ], []), this._placeholderGroups.length = 0 + } + _initDecorations() { + if (this._placeholderDecorations) return; + this._placeholderDecorations = new Map; + const e = this._editor.getModel(); + this._editor.changeDecorations((t => { + for (const i of this._snippet.placeholders) { + const n = this._snippet.offset(i), + o = this._snippet.fullLen(i), + r = C.e.fromPositions(e.getPositionAt(this._offset + n), e.getPositionAt( + this._offset + n + o)), + s = i.isFinalTabstop ? G._decor.inactiveFinal : G._decor.inactive, + a = t.addDecoration(r, s); + this._placeholderDecorations.set(i, a) + } + })) + } + move(e) { + if (!this._editor.hasModel()) return []; + if (this._initDecorations(), this._placeholderGroupsIdx >= 0) { + let e = []; + for (const t of this._placeholderGroups[this._placeholderGroupsIdx]) + if (t.transform) { + const i = this._placeholderDecorations.get(t), + n = this._editor.getModel().getDecorationRange(i), + o = this._editor.getModel().getValueInRange(n), + r = t.transform.resolve(o).split(/\r\n|\r|\n/); + for (let e = 1; e < r.length; e++) r[e] = this._editor.getModel().normalizeIndentation( + this._snippetLineLeadingWhitespace + r[e]); + e.push(w.h.replace(n, r.join(this._editor.getModel().getEOL()))) + } + e.length > 0 && this._editor.executeEdits( + "snippet.placeholderTransform", e) + } + let t = !1; + !0 === e && this._placeholderGroupsIdx < this._placeholderGroups.length - + 1 ? (this._placeholderGroupsIdx += 1, t = !0) : !1 === e && this._placeholderGroupsIdx > + 0 && (this._placeholderGroupsIdx -= 1, t = !0); + const i = this._editor.getModel().changeDecorations((e => { + const i = new Set, + n = []; + for (const o of this._placeholderGroups[this._placeholderGroupsIdx]) { + const r = this._placeholderDecorations.get(o), + s = this._editor.getModel().getDecorationRange(r); + n.push(new y.Y(s.startLineNumber, s.startColumn, s.endLineNumber, + s.endColumn)), t = t && this._hasPlaceholderBeenCollapsed(o), e + .changeDecorationOptions(r, o.isFinalTabstop ? G._decor.activeFinal : + G._decor.active), i.add(o); + for (const t of this._snippet.enclosingPlaceholders(o)) { + const n = this._placeholderDecorations.get(t); + e.changeDecorationOptions(n, t.isFinalTabstop ? G._decor.activeFinal : + G._decor.active), i.add(t) + } + } + for (const [t, n] of this._placeholderDecorations) i.has(t) || e.changeDecorationOptions( + n, t.isFinalTabstop ? G._decor.inactiveFinal : G._decor.inactive + ); + return n + })); + return t ? this.move(e) : null != i ? i : [] + } + _hasPlaceholderBeenCollapsed(e) { + let t = e; + for (; t;) { + if (t instanceof L.Vm) { + const e = this._placeholderDecorations.get(t); + if (this._editor.getModel().getDecorationRange(e).isEmpty() && t.toString() + .length > 0) return !0 + } + t = t.parent + } + return !1 + } + get isAtFirstPlaceholder() { + return this._placeholderGroupsIdx <= 0 || 0 === this._placeholderGroups + .length + } + get isAtLastPlaceholder() { + return this._placeholderGroupsIdx === this._placeholderGroups.length - + 1 + } + get hasPlaceholder() { + return this._snippet.placeholders.length > 0 + } + computePossibleSelections() { + const e = new Map; + for (const t of this._placeholderGroups) { + let i; + for (const n of t) { + if (n.isFinalTabstop) break; + i || (i = [], e.set(n.index, i)); + const t = this._placeholderDecorations.get(n), + o = this._editor.getModel().getDecorationRange(t); + if (!o) { + e.delete(n.index); + break + } + i.push(o) + } + } + return e + } + get choice() { + return this._placeholderGroups[this._placeholderGroupsIdx][0].choice + } + merge(e) { + const t = this._editor.getModel(); + this._nestingLevel *= 10, this._editor.changeDecorations((i => { + for (const n of this._placeholderGroups[this._placeholderGroupsIdx]) { + const o = e.shift(); + console.assert(!o._placeholderDecorations); + const r = o._snippet.placeholderInfo.last.index; + for (const e of o._snippet.placeholderInfo.all) e.isFinalTabstop ? + e.index = n.index + (r + 1) / this._nestingLevel : e.index = n.index + + e.index / this._nestingLevel; + this._snippet.replace(n, o._snippet.children); + const s = this._placeholderDecorations.get(n); + i.removeDecoration(s), this._placeholderDecorations.delete(n); + for (const e of o._snippet.placeholders) { + const n = o._snippet.offset(e), + r = o._snippet.fullLen(e), + s = C.e.fromPositions(t.getPositionAt(o._offset + n), t.getPositionAt( + o._offset + n + r)), + a = i.addDecoration(s, G._decor.inactive); + this._placeholderDecorations.set(e, a) + } + } + this._placeholderGroups = (0, n.vM)(this._snippet.placeholders, L.Vm + .compareByIndex) + })) + } + } + G._decor = { + active: S.qx.register({ + description: "snippet-placeholder-1", + stickiness: 0, + className: "snippet-placeholder" + }), + inactive: S.qx.register({ + description: "snippet-placeholder-2", + stickiness: 1, + className: "snippet-placeholder" + }), + activeFinal: S.qx.register({ + description: "snippet-placeholder-3", + stickiness: 1, + className: "finish-snippet-placeholder" + }), + inactiveFinal: S.qx.register({ + description: "snippet-placeholder-4", + stickiness: 1, + className: "finish-snippet-placeholder" + }) + }; + const Y = { + overwriteBefore: 0, + overwriteAfter: 0, + adjustWhitespace: !0, + clipboardText: void 0, + overtypingCapturer: void 0 + }; + class Q { + constructor(e, t, i = Y) { + this._templateMerges = [], this._snippets = [], this._editor = e, this + ._template = t, this._options = i + } + static adjustWhitespace(e, t, i, n, o) { + const s = e.getLineContent(t.lineNumber), + a = (0, r.V8)(s, 0, t.column - 1); + let l; + return i.walk((t => { + if (!(t instanceof L.xv) || t.parent instanceof L.Lv) return !0; + const o = t.value.split(/\r\n|\r|\n/); + if (n) { + const n = i.offset(t); + if (0 === n) o[0] = e.normalizeIndentation(o[0]); + else { + l = null != l ? l : i.toString(); + let t = l.charCodeAt(n - 1); + 10 !== t && 13 !== t || (o[0] = e.normalizeIndentation(a + o[0])) + } + for (let t = 1; t < o.length; t++) o[t] = e.normalizeIndentation( + a + o[t]) + } + const r = o.join(e.getEOL()); + return r !== t.value && (t.parent.replace(t, [new L.xv(r)]), l = + void 0), !0 + })), a + } + static adjustSelection(e, t, i, n) { + if (0 !== i || 0 !== n) { + const { + positionLineNumber: o, + positionColumn: r + } = t, s = r - i, a = r + n, l = e.validateRange({ + startLineNumber: o, + startColumn: s, + endLineNumber: o, + endColumn: a + }); + t = y.Y.createWithDirection(l.startLineNumber, l.startColumn, l.endLineNumber, + l.endColumn, t.getDirection()) + } + return t + } + static createEditsAndSnippets(e, t, i, n, o, r, s, a) { + const l = [], + d = []; + if (!e.hasModel()) return { + edits: l, + snippets: d + }; + const c = e.getModel(), + h = e.invokeWithinContext((e => e.get(x.ec, k.jt))), + u = e.invokeWithinContext((e => new z(e.get(Z.e, k.jt), c))), + g = () => s; + let p = 0, + m = c.getValueInRange(Q.adjustSelection(c, e.getSelection(), i, 0)), + f = c.getValueInRange(Q.adjustSelection(c, e.getSelection(), 0, n)), + _ = c.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber); + const b = e.getSelections().map(((e, t) => ({ + selection: e, + idx: t + }))).sort(((e, t) => C.e.compareRangesUsingStarts(e.selection, t.selection))); + for (const { + selection: s, + idx: v + } + of b) { + let C = Q.adjustSelection(c, s, i, 0), + y = Q.adjustSelection(c, s, 0, n); + m !== c.getValueInRange(C) && (C = s), f !== c.getValueInRange(y) && + (y = s); + const S = s.setStartPosition(C.startLineNumber, C.startColumn).setEndPosition( + y.endLineNumber, y.endColumn), + x = (new L.Yj).parse(t, !0, o), + k = S.getStartPosition(), + N = Q.adjustWhitespace(c, k, x, r || v > 0 && _ !== c.getLineFirstNonWhitespaceColumn( + s.positionLineNumber), !0); + x.resolveVariables(new B([u, new V(g, v, b.length, "spread" === e.getOption( + 70)), new W(c, s, v, a), new H(c, s), new U, new j(h), new K])); + const D = c.getOffsetAt(k) + p; + p += x.toString().length - c.getValueLengthInRange(S), l[v] = w.h.replace( + S, x.toString()), l[v].identifier = { + major: v, + minor: 0 + }, d[v] = new G(e, x, D, N) + } + return { + edits: l, + snippets: d + } + } + dispose() { + (0, o.B9)(this._snippets) + } + _logInfo() { + return + `template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"` + } + insert() { + if (!this._editor.hasModel()) return; + const { + edits: e, + snippets: t + } = Q.createEditsAndSnippets(this._editor, this._template, this._options + .overwriteBefore, this._options.overwriteAfter, !1, this._options.adjustWhitespace, + this._options.clipboardText, this._options.overtypingCapturer); + this._snippets = t, this._editor.executeEdits("snippet", e, (e => this + ._snippets[0].hasPlaceholder ? this._move(!0) : e.filter((e => !!e.identifier)) + .map((e => y.Y.fromPositions(e.range.getEndPosition()))))), this._editor + .revealRange(this._editor.getSelections()[0]) + } + merge(e, t = Y) { + if (!this._editor.hasModel()) return; + this._templateMerges.push([this._snippets[0]._nestingLevel, this._snippets[ + 0]._placeholderGroupsIdx, e]); + const { + edits: i, + snippets: n + } = Q.createEditsAndSnippets(this._editor, e, t.overwriteBefore, t.overwriteAfter, ! + 0, t.adjustWhitespace, t.clipboardText, t.overtypingCapturer); + this._editor.executeEdits("snippet", i, (e => { + for (const e of this._snippets) e.merge(n); + return console.assert(0 === n.length), this._snippets[0].hasPlaceholder ? + this._move(void 0) : e.filter((e => !!e.identifier)).map((e => y.Y + .fromPositions(e.range.getEndPosition()))) + })) + } + next() { + const e = this._move(!0); + this._editor.setSelections(e), this._editor.revealPositionInCenterIfOutsideViewport( + e[0].getPosition()) + } + prev() { + const e = this._move(!1); + this._editor.setSelections(e), this._editor.revealPositionInCenterIfOutsideViewport( + e[0].getPosition()) + } + _move(e) { + const t = []; + for (const i of this._snippets) { + const n = i.move(e); + t.push(...n) + } + return t + } + get isAtFirstPlaceholder() { + return this._snippets[0].isAtFirstPlaceholder + } + get isAtLastPlaceholder() { + return this._snippets[0].isAtLastPlaceholder + } + get hasPlaceholder() { + return this._snippets[0].hasPlaceholder + } + get choice() { + return this._snippets[0].choice + } + isSelectionWithinPlaceholders() { + if (!this.hasPlaceholder) return !1; + const e = this._editor.getSelections(); + if (e.length < this._snippets.length) return !1; + let t = new Map; + for (const i of this._snippets) { + const n = i.computePossibleSelections(); + if (0 === t.size) + for (const [i, o] of n) { + o.sort(C.e.compareRangesUsingStarts); + for (const n of e) + if (o[0].containsRange(n)) { + t.set(i, []); + break + } + } + if (0 === t.size) return !1; + t.forEach(((e, t) => { + e.push(...n.get(t)) + })) + } + e.sort(C.e.compareRangesUsingStarts); + for (let [i, n] of t) + if (n.length === e.length) { + n.sort(C.e.compareRangesUsingStarts); + for (let o = 0; o < n.length; o++) n[o].containsRange(e[o]) || t.delete( + i) + } else t.delete(i); + return t.size > 0 + } + } + }, + 9599: (e, t, i) => { + "use strict"; + i.d(t, { + _y: () => w, + GI: () => C, + A9: () => S, + ZJ: () => x, + kL: () => L, + wg: () => E, + i5: () => T + }); + var n = i(7301), + o = i(4101), + r = i(187), + s = i(8819), + a = i(1050), + l = i(4314), + d = i(5392), + c = i(5976), + h = i(4144), + u = i(3472), + g = i(4013), + p = i(4565), + m = i(8401), + f = i(666), + _ = i(8216), + b = i(3580), + v = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + const w = { + Visible: new s.uy("suggestWidgetVisible", !1, (0, b.N)( + "suggestWidgetVisible", "Whether suggestion are visible")), + DetailsVisible: new s.uy("suggestWidgetDetailsVisible", !1, (0, b.N)( + "suggestWidgetDetailsVisible", + "Whether suggestion details are visible")), + MultipleSuggestions: new s.uy("suggestWidgetMultipleSuggestions", !1, ( + 0, b.N)("suggestWidgetMultipleSuggestions", + "Whether there are multiple suggestions to pick from")), + MakesTextEdit: new s.uy("suggestionMakesTextEdit", !0, (0, b.N)( + "suggestionMakesTextEdit", + "Whether inserting the current suggestion yields in a change or has everything already been typed" + )), + AcceptSuggestionsOnEnter: new s.uy("acceptSuggestionOnEnter", !0, (0, b + .N)("acceptSuggestionOnEnter", + "Whether suggestions are inserted when pressing Enter")), + HasInsertAndReplaceRange: new s.uy("suggestionHasInsertAndReplaceRange", ! + 1, (0, b.N)("suggestionHasInsertAndReplaceRange", + "Whether the current suggestion has insert and replace behaviour")), + InsertMode: new s.uy("suggestionInsertMode", void 0, { + type: "string", + description: (0, b.N)("suggestionInsertMode", + "Whether the default behaviour is to insert or replace") + }), + CanResolve: new s.uy("suggestionCanResolve", !1, (0, b.N)( + "suggestionCanResolve", + "Whether the current suggestion supports to resolve further details" + )) + }, + C = new h.eH("suggestWidgetStatusBar"); + class y { + constructor(e, t, i, n) { + this.position = e, this.completion = t, this.container = i, this.provider = + n, this.isInvalid = !1, this.score = d.CL.Default, this.distance = 0, + this.textLabel = "string" == typeof t.label ? t.label : t.label.label, + this.labelLow = this.textLabel.toLowerCase(), this.isInvalid = !this.textLabel, + this.sortTextLow = t.sortText && t.sortText.toLowerCase(), this.filterTextLow = + t.filterText && t.filterText.toLowerCase(), l.e.isIRange(t.range) ? ( + this.editStart = new r.L(t.range.startLineNumber, t.range.startColumn), + this.editInsertEnd = new r.L(t.range.endLineNumber, t.range.endColumn), + this.editReplaceEnd = new r.L(t.range.endLineNumber, t.range.endColumn), + this.isInvalid = this.isInvalid || l.e.spansMultipleLines(t.range) || + t.range.startLineNumber !== e.lineNumber) : (this.editStart = new r.L( + t.range.insert.startLineNumber, t.range.insert.startColumn), this.editInsertEnd = + new r.L(t.range.insert.endLineNumber, t.range.insert.endColumn), + this.editReplaceEnd = new r.L(t.range.replace.endLineNumber, t.range + .replace.endColumn), this.isInvalid = this.isInvalid || l.e.spansMultipleLines( + t.range.insert) || l.e.spansMultipleLines(t.range.replace) || t.range + .insert.startLineNumber !== e.lineNumber || t.range.replace.startLineNumber !== + e.lineNumber || t.range.insert.startColumn !== t.range.replace.startColumn + ), "function" != typeof n.resolveCompletionItem && (this._resolveCache = + Promise.resolve(), this._isResolved = !0) + } + get isResolved() { + return !!this._isResolved + } + resolve(e) { + return v(this, void 0, void 0, (function*() { + if (!this._resolveCache) { + const t = e.onCancellationRequested((() => { + this._resolveCache = void 0, this._isResolved = !1 + })); + this._resolveCache = Promise.resolve(this.provider.resolveCompletionItem( + this.completion, e)).then((e => { + Object.assign(this.completion, e), this._isResolved = !0, t.dispose() + }), (e => { + (0, n.VV)(e) && (this._resolveCache = void 0, this._isResolved = ! + 1) + })) + } + return this._resolveCache + })) + } + } + class S { + constructor(e = 2, t = new Set, i = new Set, n = !0) { + this.snippetSortOrder = e, this.kindFilter = t, this.providerFilter = + i, this.showDeprecated = n + } + } + + function x() {} + S.default = new S; + class k { + constructor(e, t, i, n) { + this.items = e, this.needsClipboard = t, this.durations = i, this.disposable = + n + } + } + + function L(e, t, i = S.default, r = { + triggerKind: 0 + }, s = a.T.None) { + return v(this, void 0, void 0, (function*() { + const a = new g.G(!0); + t = t.clone(); + const d = e.getWordAtPosition(t), + h = d ? new l.e(t.lineNumber, d.startColumn, t.lineNumber, d.endColumn) : + l.e.fromPositions(t), + p = { + replace: h, + insert: h.setEndPosition(t.lineNumber, t.column) + }, + m = [], + f = new c.SL, + _ = []; + let b = !1; + const w = (e, n, o) => { + var r, s, a; + if (n) { + for (let o of n.suggestions) + if (!i.kindFilter.has(o.kind)) { + if (!i.showDeprecated && (null === (r = null == o ? void 0 : o.tags) || + void 0 === r ? void 0 : r.includes(1))) continue; + o.range || (o.range = p), o.sortText || (o.sortText = "string" == + typeof o.label ? o.label : o.label.label), !b && o.insertTextRules && + 4 & o.insertTextRules && (b = u.Yj.guessNeedsClipboard(o.insertText)), + m.push(new y(t, o, n, e)) + }(0, c.Wf)(n) && f.add(n), _.push({ + providerName: null !== (s = e._debugDisplayName) && void 0 !== + s ? s : "unkown_provider", + elapsedProvider: null !== (a = n.duration) && void 0 !== a ? a : + -1, + elapsedOverall: o.elapsed() + }) + } + }, + C = (() => v(this, void 0, void 0, (function*() {})))(); + for (let a of o.KZ.orderedGroups(e)) { + let o = m.length; + if (yield Promise.all(a.map((o => v(this, void 0, void 0, (function* + () { + if (!(i.providerFilter.size > 0) || i.providerFilter.has(o)) + try { + const i = new g.G(!0), + n = yield o.provideCompletionItems(e, t, r, s); + w(o, n, i) + } catch (e) { + (0, n.Cp)(e) + } + }))))), o !== m.length || s.isCancellationRequested) break + } + return yield C, s.isCancellationRequested ? (f.dispose(), Promise.reject( + (0, n.F0)())) : new k(m.sort(E(i.snippetSortOrder)), b, { + entries: _, + elapsed: a.elapsed() + }, f) + })) + } + + function N(e, t) { + if (e.sortTextLow && t.sortTextLow) { + if (e.sortTextLow < t.sortTextLow) return -1; + if (e.sortTextLow > t.sortTextLow) return 1 + } + return e.completion.label < t.completion.label ? -1 : e.completion.label > + t.completion.label ? 1 : e.completion.kind - t.completion.kind + } + const D = new Map; + + function E(e) { + return D.get(e) + } + D.set(0, (function(e, t) { + if (e.completion.kind !== t.completion.kind) { + if (27 === e.completion.kind) return -1; + if (27 === t.completion.kind) return 1 + } + return N(e, t) + })), D.set(2, (function(e, t) { + if (e.completion.kind !== t.completion.kind) { + if (27 === e.completion.kind) return 1; + if (27 === t.completion.kind) return -1 + } + return N(e, t) + })), D.set(1, N), p.P.registerCommand("_executeCompletionItemProvider", ( + (e, ...t) => v(void 0, void 0, void 0, (function*() { + const [i, n, o, s] = t; + (0, m.p_)(f.o.isUri(i)), (0, m.p_)(r.L.isIPosition(n)), (0, m.p_)( + "string" == typeof o || !o), (0, m.p_)("number" == typeof s || !s); + const l = yield e.get(_.S).createModelReference(i); + try { + const e = { + incomplete: !1, + suggestions: [] + }, + t = [], + i = yield L(l.object.textEditorModel, r.L.lift(n), void 0, { + triggerCharacter: o, + triggerKind: o ? 1 : 0 + }); + for (const n of i.items) t.length < (null != s ? s : 0) && t.push( + n.resolve(a.T.None)), e.incomplete = e.incomplete || n.container + .incomplete, e.suggestions.push(n.completion); + try { + return yield Promise.all(t), e + } finally { + setTimeout((() => i.disposable.dispose()), 100) + } + } finally { + l.dispose() + } + })))); + const I = new class { + constructor() { + this.onlyOnceSuggestions = [] + } + provideCompletionItems() { + let e = { + suggestions: this.onlyOnceSuggestions.slice(0) + }; + return this.onlyOnceSuggestions.length = 0, e + } + }; + + function T(e, t) { + setTimeout((() => { + I.onlyOnceSuggestions.push(...t), e.getContribution( + "editor.contrib.suggestController").triggerSuggest((new Set).add(I)) + }), 0) + } + o.KZ.register("*", I) + }, + 9830: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + SuggestController: () => _t, + TriggerSuggestAction: () => bt + }); + var n = i(6346), + o = i(9488), + r = i(7301), + s = i(2258), + a = i(5976), + l = i(9925), + d = i(6830), + c = i(9386), + h = i(4314), + u = i(9102), + g = i(2860), + p = i(3472), + m = i(3702), + f = i(6904), + _ = i(4101), + b = i(5393), + v = i(2065), + w = i(3108), + C = i(5026), + y = i(1531), + S = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + class x { + constructor(e) { + this.name = e + } + select(e, t, i) { + if (0 === i.length) return 0; + let n = i[0].score[0]; + for (let e = 0; e < i.length; e++) { + const { + score: t, + completion: o + } = i[e]; + if (t[0] !== n) break; + if (o.preselect) return e + } + return 0 + } + } + class k extends x { + constructor() { + super("first") + } + memorize(e, t, i) {} + toJSON() {} + fromJSON() {} + } + let L = class e { + constructor(e, t, i) { + this._storageService = e, this._modeService = t, this._configService = + i, this._disposables = new a.SL, this._persistSoon = new b.pY((() => + this._saveState()), 500), this._disposables.add(e.onWillSaveState(( + e => { + e.reason === f.fk.SHUTDOWN && this._saveState() + }))) + } + dispose() { + this._disposables.dispose(), this._persistSoon.dispose() + } + memorize(e, t, i) { + this._withStrategy(e, t).memorize(e, t, i), this._persistSoon.schedule() + } + select(e, t, i) { + return this._withStrategy(e, t).select(e, t, i) + } + _withStrategy(t, i) { + var n, o; + const r = this._configService.getValue("editor.suggestSelection", { + overrideIdentifier: null === (n = this._modeService.getLanguageIdentifier( + t.getLanguageIdAtPosition(i.lineNumber, i.column))) || void 0 === + n ? void 0 : n.language, + resource: t.uri + }); + if ((null === (o = this._strategy) || void 0 === o ? void 0 : o.name) !== + r) { + this._saveState(); + const t = e._strategyCtors.get(r) || k; + this._strategy = new t; + try { + const t = this._configService.getValue( + "editor.suggest.shareSuggestSelections") ? 0 : 1, + i = this._storageService.get(`${e._storagePrefix}/${r}`, t); + i && this._strategy.fromJSON(JSON.parse(i)) + } catch (e) {} + } + return this._strategy + } + _saveState() { + if (this._strategy) { + const t = this._configService.getValue( + "editor.suggest.shareSuggestSelections") ? 0 : 1, + i = JSON.stringify(this._strategy); + this._storageService.store( + `${e._storagePrefix}/${this._strategy.name}`, i, t, 1) + } + } + }; + L._strategyCtors = new Map([ + ["recentlyUsedByPrefix", class extends x { + constructor() { + super("recentlyUsedByPrefix"), this._trie = m.Id.forStrings(), + this._seq = 0 + } + memorize(e, t, i) { + const { + word: n + } = e.getWordUntilPosition(t), o = + `${e.getLanguageIdentifier().language}/${n}`; + this._trie.set(o, { + type: i.completion.kind, + insertText: i.completion.insertText, + touch: this._seq++ + }) + } + select(e, t, i) { + let { + word: n + } = e.getWordUntilPosition(t); + if (!n) return super.select(e, t, i); + let o = `${e.getLanguageIdentifier().language}/${n}`, + r = this._trie.get(o); + if (r || (r = this._trie.findSubstr(o)), r) + for (let e = 0; e < i.length; e++) { + let { + kind: t, + insertText: n + } = i[e].completion; + if (t === r.type && n === r.insertText) return e + } + return super.select(e, t, i) + } + toJSON() { + let e = []; + return this._trie.forEach(((t, i) => e.push([i, t]))), e.sort(((e, + t) => -(e[1].touch - t[1].touch))).forEach(((e, t) => e[1].touch = + t)), e.slice(0, 200) + } + fromJSON(e) { + if (this._trie.clear(), e.length > 0) { + this._seq = e[0][1].touch + 1; + for (const [t, i] of e) i.type = "number" == typeof i.type ? i.type : + (0, _.jr)(i.type), this._trie.set(t, i) + } + } + }], + ["recentlyUsed", class extends x { + constructor() { + super("recentlyUsed"), this._cache = new m.z6(300, .66), this._seq = + 0 + } + memorize(e, t, i) { + const n = `${e.getLanguageIdentifier().language}/${i.textLabel}`; + this._cache.set(n, { + touch: this._seq++, + type: i.completion.kind, + insertText: i.completion.insertText + }) + } + select(e, t, i) { + if (0 === i.length) return 0; + const n = e.getLineContent(t.lineNumber).substr(t.column - 10, t.column - + 1); + if (/\s$/.test(n)) return super.select(e, t, i); + let o = i[0].score[0], + r = -1, + s = -1; + for (let t = 0; t < i.length && i[t].score[0] === o; t++) { + const n = + `${e.getLanguageIdentifier().language}/${i[t].textLabel}`, + o = this._cache.peek(n); + if (o && o.touch > s && o.type === i[t].completion.kind && o.insertText === + i[t].completion.insertText && (s = o.touch, r = t), i[t].completion + .preselect) return t + } + return -1 !== r ? r : 0 + } + toJSON() { + return this._cache.toJSON() + } + fromJSON(e) { + this._cache.clear(); + for (const [t, i] of e) i.touch = 0, i.type = "number" == typeof i + .type ? i.type : (0, _.jr)(i.type), this._cache.set(t, i); + this._seq = this._cache.size + } + }], + ["first", k] + ]), L._storagePrefix = "suggest/memories", L = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([S(0, f.Uy), S(1, y.h), S(2, w.Ui)], L); + const N = (0, v.yh)("ISuggestMemories"); + (0, C.z)(N, L, !0); + var D = i(3580), + E = i(4565), + I = i(8819), + T = i(9989), + M = i(9599); + let A = class e { + constructor(t, i) { + this._editor = t, this._index = 0, this._ckOtherSuggestions = e.OtherSuggestions + .bindTo(i) + } + dispose() { + this.reset() + } + reset() { + var e; + this._ckOtherSuggestions.reset(), null === (e = this._listener) || + void 0 === e || e.dispose(), this._model = void 0, this._acceptNext = + void 0, this._ignore = !1 + } + set({ + model: t, + index: i + }, n) { + 0 !== t.items.length && e._moveIndex(!0, t, i) !== i ? (this._acceptNext = + n, this._model = t, this._index = i, this._listener = this._editor.onDidChangeCursorPosition( + (() => { + this._ignore || this.reset() + })), this._ckOtherSuggestions.set(!0)) : this.reset() + } + static _moveIndex(e, t, i) { + let n = i; + for (; n = (n + t.items.length + (e ? 1 : -1)) % t.items.length, n !== + i && t.items[n].completion.additionalTextEdits;); + return n + } + next() { + this._move(!0) + } + prev() { + this._move(!1) + } + _move(t) { + if (this._model) try { + this._ignore = !0, this._index = e._moveIndex(t, this._model, this._index), + this._acceptNext({ + index: this._index, + item: this._model.items[this._index], + model: this._model + }) + } finally { + this._ignore = !1 + } + } + }; + var R, O; + A.OtherSuggestions = new I.uy("hasOtherSuggestions", !1), A = function(e, + t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(R = 1, O = I.i6, function(e, t) { + O(e, t, R) + })], A); + var P = i(4669), + F = i(3860), + B = i(5392), + W = i(7295); + class z { + constructor(e, t, i, n, o, r, s) { + this.clipboardText = s, this._snippetCompareFn = z._compareCompletionItems, + this._items = e, this._column = t, this._wordDistance = n, this._options = + o, this._refilterKind = 1, this._lineContext = i, "top" === r ? this._snippetCompareFn = + z._compareCompletionItemsSnippetsUp : "bottom" === r && (this._snippetCompareFn = + z._compareCompletionItemsSnippetsDown) + } + get lineContext() { + return this._lineContext + } + set lineContext(e) { + this._lineContext.leadingLineContent === e.leadingLineContent && this._lineContext + .characterCountDelta === e.characterCountDelta || (this._refilterKind = + this._lineContext.characterCountDelta < e.characterCountDelta && + this._filteredItems ? 2 : 1, this._lineContext = e) + } + get items() { + return this._ensureCachedState(), this._filteredItems + } + get allProvider() { + return this._ensureCachedState(), this._providerInfo.keys() + } + get incomplete() { + this._ensureCachedState(); + const e = new Set; + for (let [t, i] of this._providerInfo) i && e.add(t); + return e + } + adopt(e) { + let t = []; + for (let i = 0; i < this._items.length;) e.has(this._items[i].provider) ? + i++ : (t.push(this._items[i]), this._items[i] = this._items[this._items + .length - 1], this._items.pop()); + return this._refilterKind = 1, t + } + get stats() { + return this._ensureCachedState(), this._stats + } + _ensureCachedState() { + 0 !== this._refilterKind && this._createCachedState() + } + _createCachedState() { + this._providerInfo = new Map; + const e = [], + { + leadingLineContent: t, + characterCountDelta: i + } = this._lineContext; + let n = "", + r = ""; + const s = 1 === this._refilterKind ? this._items : this._filteredItems, + a = [], + l = !this._options.filterGraceful || s.length > 2e3 ? B.EW : B.l7; + for (let o = 0; o < s.length; o++) { + const d = s[o]; + if (d.isInvalid) continue; + this._providerInfo.set(d.provider, Boolean(d.container.incomplete)); + const c = d.position.column - d.editStart.column, + h = c + i - (d.position.column - this._column); + if (n.length !== h && (n = 0 === h ? "" : t.slice(-h), r = n.toLowerCase()), + d.word = n, 0 === h) d.score = B.CL.Default; + else { + let e = 0; + for (; e < c;) { + const t = n.charCodeAt(e); + if (32 !== t && 9 !== t) break; + e += 1 + } + if (e >= h) d.score = B.CL.Default; + else if ("string" == typeof d.completion.filterText) { + let t = l(n, r, e, d.completion.filterText, d.filterTextLow, 0, !1); + if (!t) continue; + 0 === (0, W.zY)(d.completion.filterText, d.textLabel) ? d.score = t : + (d.score = (0, B.jB)(n, r, e, d.textLabel, d.labelLow, 0), d.score[ + 0] = t[0]) + } else { + let t = l(n, r, e, d.textLabel, d.labelLow, 0, !1); + if (!t) continue; + d.score = t + } + } + d.idx = o, d.distance = this._wordDistance.distance(d.position, d.completion), + a.push(d), e.push(d.textLabel.length) + } + this._filteredItems = a.sort(this._snippetCompareFn), this._refilterKind = + 0, this._stats = { + pLabelLen: e.length ? (0, o.HW)(e.length - .85, e, ((e, t) => e - t)) : 0 + } + } + static _compareCompletionItems(e, t) { + return e.score[0] > t.score[0] ? -1 : e.score[0] < t.score[0] ? 1 : e.distance < + t.distance ? -1 : e.distance > t.distance ? 1 : e.idx < t.idx ? -1 : + e.idx > t.idx ? 1 : 0 + } + static _compareCompletionItemsSnippetsDown(e, t) { + if (e.completion.kind !== t.completion.kind) { + if (27 === e.completion.kind) return 1; + if (27 === t.completion.kind) return -1 + } + return z._compareCompletionItems(e, t) + } + static _compareCompletionItemsSnippetsUp(e, t) { + if (e.completion.kind !== t.completion.kind) { + if (27 === e.completion.kind) return -1; + if (27 === t.completion.kind) return 1 + } + return z._compareCompletionItems(e, t) + } + } + var V = i(1050), + H = i(469), + U = i(689); + class j { + static create(e, t) { + return i = this, n = void 0, s = function*() { + if (!t.getOption(106).localityBonus) return j.None; + if (!t.hasModel()) return j.None; + const i = t.getModel(), + n = t.getPosition(); + if (!e.canComputeWordRanges(i.uri)) return j.None; + const [r] = yield(new U.x).provideSelectionRanges(i, [n]); + if (0 === r.length) return j.None; + const s = yield e.computeWordRanges(i.uri, r[0].range); + if (!s) return j.None; + const a = i.getWordUntilPosition(n); + return delete s[a.word], new class extends j { + distance(e, i) { + if (!n.equals(t.getPosition())) return 0; + if (17 === i.kind) return 2 << 20; + let a = "string" == typeof i.label ? i.label : i.label.label, + l = s[a]; + if ((0, o.XY)(l)) return 2 << 20; + let d = (0, o.ry)(l, h.e.fromPositions(e), h.e.compareRangesUsingStarts), + c = d >= 0 ? l[d] : l[Math.max(0, ~d - 1)], + u = r.length; + for (const e of r) { + if (!h.e.containsRange(e.range, c)) break; + u -= 1 + } + return u + } + } + }, new((r = void 0) || (r = Promise))((function(e, t) { + function o(e) { + try { + l(s.next(e)) + } catch (e) { + t(e) + } + } + + function a(e) { + try { + l(s.throw(e)) + } catch (e) { + t(e) + } + } + + function l(t) { + var i; + t.done ? e(t.value) : (i = t.value, i instanceof r ? i : new r(( + function(e) { + e(i) + }))).then(o, a) + } + l((s = s.apply(i, n || [])).next()) + })); + var i, n, r, s + } + } + j.None = new class extends j { + distance() { + return 0 + } + }; + var K = i(4972), + $ = i(829), + q = i(3557), + Z = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + class G { + constructor(e, t, i, n) { + this.leadingLineContent = e.getLineContent(t.lineNumber).substr(0, t.column - + 1), this.leadingWord = e.getWordUntilPosition(t), this.lineNumber = + t.lineNumber, this.column = t.column, this.auto = i, this.shy = n + } + static shouldAutoTrigger(e) { + if (!e.hasModel()) return !1; + const t = e.getModel(), + i = e.getPosition(); + t.tokenizeIfCheap(i.lineNumber); + const n = t.getWordAtPosition(i); + return !!n && n.endColumn === i.column && !!isNaN(Number(n.word)) + } + } + let Y = class e { + constructor(e, t, i, n, o, r, s) { + this._editor = e, this._editorWorkerService = t, this._clipboardService = + i, this._telemetryService = n, this._logService = o, this._contextKeyService = + r, this._configurationService = s, this._toDispose = new a.SL, this._quickSuggestDelay = + 10, this._triggerCharacterListener = new a.SL, this._triggerQuickSuggest = + new b._F, this._state = 0, this._completionDisposables = new a.SL, + this._onDidCancel = new P.Q5, this._onDidTrigger = new P.Q5, this._onDidSuggest = + new P.Q5, this.onDidCancel = this._onDidCancel.event, this.onDidTrigger = + this._onDidTrigger.event, this.onDidSuggest = this._onDidSuggest.event, + this._telemetryGate = 0, this._currentSelection = this._editor.getSelection() || + new F.Y(1, 1, 1, 1), this._toDispose.add(this._editor.onDidChangeModel( + (() => { + this._updateTriggerCharacters(), this.cancel() + }))), this._toDispose.add(this._editor.onDidChangeModelLanguage((() => { + this._updateTriggerCharacters(), this.cancel() + }))), this._toDispose.add(this._editor.onDidChangeConfiguration((() => { + this._updateTriggerCharacters(), this._updateQuickSuggest() + }))), this._toDispose.add(_.KZ.onDidChange((() => { + this._updateTriggerCharacters(), this._updateActiveSuggestSession() + }))), this._toDispose.add(this._editor.onDidChangeCursorSelection((e => { + this._onCursorChange(e) + }))); + let l = !1; + this._toDispose.add(this._editor.onDidCompositionStart((() => { + l = !0 + }))), this._toDispose.add(this._editor.onDidCompositionEnd((() => { + l = !1, this._refilterCompletionItems() + }))), this._toDispose.add(this._editor.onDidChangeModelContent((() => { + l || this._refilterCompletionItems() + }))), this._updateTriggerCharacters(), this._updateQuickSuggest() + } + dispose() { + (0, a.B9)(this._triggerCharacterListener), (0, a.B9)([this._onDidCancel, + this._onDidSuggest, this._onDidTrigger, this._triggerQuickSuggest + ]), this._toDispose.dispose(), this._completionDisposables.dispose(), + this.cancel() + } + _updateQuickSuggest() { + this._quickSuggestDelay = this._editor.getOption(79), (isNaN(this._quickSuggestDelay) || + !this._quickSuggestDelay && 0 !== this._quickSuggestDelay || this._quickSuggestDelay < + 0) && (this._quickSuggestDelay = 10) + } + _updateTriggerCharacters() { + if (this._triggerCharacterListener.clear(), this._editor.getOption(80) || + !this._editor.hasModel() || !this._editor.getOption(109)) return; + const e = new Map; + for (const t of _.KZ.all(this._editor.getModel())) + for (const i of t.triggerCharacters || []) { + let n = e.get(i); + n || (n = new Set, n.add((0, M.ZJ)()), e.set(i, n)), n.add(t) + } + const t = t => { + if (i = this._contextKeyService, n = this._configurationService, + Boolean(i.getContextKeyValue("inlineSuggestionVisible")) && ! + Boolean(n.getValue( + "editor.inlineSuggest.allowSuggestOnTriggerCharacters"))) return; + var i, n; + if (G.shouldAutoTrigger(this._editor)) return; + if (!t) { + const e = this._editor.getPosition(); + t = this._editor.getModel().getLineContent(e.lineNumber).substr(0, + e.column - 1) + } + let o = ""; + (0, W.YK)(t.charCodeAt(t.length - 1)) ? (0, W.ZG)(t.charCodeAt(t.length - + 2)) && (o = t.substr(t.length - 2)) : o = t.charAt(t.length - 1); + const r = e.get(o); + if (r) { + const e = this._completionModel ? { + items: this._completionModel.adopt(r), + clipboardText: this._completionModel.clipboardText + } : void 0; + this.trigger({ + auto: !0, + shy: !1, + triggerCharacter: o + }, Boolean(this._completionModel), r, e) + } + }; + this._triggerCharacterListener.add(this._editor.onDidType(t)), this._triggerCharacterListener + .add(this._editor.onDidCompositionEnd(t)) + } + get state() { + return this._state + } + cancel(e = !1) { + var t; + 0 !== this._state && (this._triggerQuickSuggest.cancel(), null === (t = + this._requestToken) || void 0 === t || t.cancel(), this._requestToken = + void 0, this._state = 0, this._completionModel = void 0, this._context = + void 0, this._onDidCancel.fire({ + retrigger: e + })) + } + clear() { + this._completionDisposables.clear() + } + _updateActiveSuggestSession() { + 0 !== this._state && (this._editor.hasModel() && _.KZ.has(this._editor + .getModel()) ? this.trigger({ + auto: 2 === this._state, + shy: !1 + }, !0) : this.cancel()) + } + _onCursorChange(e) { + if (!this._editor.hasModel()) return; + const t = this._editor.getModel(), + i = this._currentSelection; + if (this._currentSelection = this._editor.getSelection(), !e.selection + .isEmpty() || 0 !== e.reason && 3 !== e.reason || "keyboard" !== e.source && + "deleteLeft" !== e.source) this.cancel(); + else if (_.KZ.has(t)) + if (0 === this._state && 0 === e.reason) { + if (!1 === this._editor.getOption(78)) return; + if (!i.containsRange(this._currentSelection) && !i.getEndPosition() + .isBeforeOrEqual(this._currentSelection.getPosition())) return; + if (this._editor.getOption(106).snippetsPreventQuickSuggestions && + g.SnippetController2.get(this._editor).isInSnippet()) return; + this.cancel(), this._triggerQuickSuggest.cancelAndSet((() => { + if (0 !== this._state) return; + if (!G.shouldAutoTrigger(this._editor)) return; + if (!this._editor.hasModel()) return; + const e = this._editor.getModel(), + t = this._editor.getPosition(), + i = this._editor.getOption(78); + if (!1 !== i) { + if (!0 === i); + else { + e.tokenizeIfCheap(t.lineNumber); + const n = e.getLineTokens(t.lineNumber), + o = n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max( + t.column - 1 - 1, 0))); + if (!(i.other && 0 === o || i.comments && 1 === o || i.strings && + 2 === o)) return + } + var n, o; + n = this._contextKeyService, o = this._configurationService, (! + Boolean(n.getContextKeyValue("inlineSuggestionVisible")) || + Boolean(o.getValue( + "editor.inlineSuggest.allowQuickSuggestions"))) && this.trigger({ + auto: !0, + shy: !1 + }) + } + }), this._quickSuggestDelay) + } else 0 !== this._state && 3 === e.reason && this._refilterCompletionItems() + } + _refilterCompletionItems() { + Promise.resolve().then((() => { + if (0 === this._state) return; + if (!this._editor.hasModel()) return; + const e = this._editor.getModel(), + t = this._editor.getPosition(), + i = new G(e, t, 2 === this._state, !1); + this._onNewContext(i) + })) + } + trigger(t, i = !1, n, o) { + var s; + if (!this._editor.hasModel()) return; + const a = this._editor.getModel(), + l = t.auto, + d = new G(a, this._editor.getPosition(), l, t.shy); + this.cancel(i), this._state = l ? 2 : 1, this._onDidTrigger.fire({ + auto: l, + shy: t.shy, + position: this._editor.getPosition() + }), this._context = d; + let c = { + triggerKind: null !== (s = t.triggerKind) && void 0 !== s ? s : 0 + }; + t.triggerCharacter && (c = { + triggerKind: 1, + triggerCharacter: t.triggerCharacter + }), this._requestToken = new V.A; + const h = this._editor.getOption(101); + let u = 1; + switch (h) { + case "top": + u = 0; + break; + case "bottom": + u = 2 + } + const { + itemKind: g, + showDeprecated: p + } = e._createSuggestFilter(this._editor), m = j.create(this._editorWorkerService, + this._editor), f = (0, M.kL)(a, this._editor.getPosition(), new M.A9( + u, g, n, p), c, this._requestToken.token); + Promise.all([f, m]).then((([e, i]) => { + return n = this, r = void 0, a = function*() { + var n; + if (null === (n = this._requestToken) || void 0 === n || n.dispose(), ! + this._editor.hasModel()) return; + let r = null == o ? void 0 : o.clipboardText; + if (!r && e.needsClipboard && (r = yield this._clipboardService + .readText()), 0 === this._state) return; + const s = this._editor.getModel(); + let a = e.items; + if (o) { + const e = (0, M.wg)(u); + a = a.concat(o.items).sort(e) + } + const d = new G(s, this._editor.getPosition(), l, t.shy); + this._completionModel = new z(a, this._context.column, { + leadingLineContent: d.leadingLineContent, + characterCountDelta: d.column - this._context.column + }, i, this._editor.getOption(106), this._editor.getOption(101), + r), this._completionDisposables.add(e.disposable), this._onNewContext( + d), this._reportDurationsTelemetry(e.durations) + }, new((s = void 0) || (s = Promise))((function(e, t) { + function i(e) { + try { + l(a.next(e)) + } catch (e) { + t(e) + } + } + + function o(e) { + try { + l(a.throw(e)) + } catch (e) { + t(e) + } + } + + function l(t) { + var n; + t.done ? e(t.value) : (n = t.value, n instanceof s ? n : new s( + (function(e) { + e(n) + }))).then(i, o) + } + l((a = a.apply(n, r || [])).next()) + })); + var n, r, s, a + })).catch(r.dL) + } + _reportDurationsTelemetry(e) { + this._telemetryGate++ % 230 == 0 && setTimeout((() => { + this._telemetryService.publicLog2("suggest.durations.json", { + data: JSON.stringify(e) + }), this._logService.debug("suggest.durations.json", e) + })) + } + static _createSuggestFilter(e) { + const t = new Set; + "none" === e.getOption(101) && t.add(27); + const i = e.getOption(106); + return i.showMethods || t.add(0), i.showFunctions || t.add(1), i.showConstructors || + t.add(2), i.showFields || t.add(3), i.showVariables || t.add(4), i.showClasses || + t.add(5), i.showStructs || t.add(6), i.showInterfaces || t.add(7), i + .showModules || t.add(8), i.showProperties || t.add(9), i.showEvents || + t.add(10), i.showOperators || t.add(11), i.showUnits || t.add(12), i + .showValues || t.add(13), i.showConstants || t.add(14), i.showEnums || + t.add(15), i.showEnumMembers || t.add(16), i.showKeywords || t.add( + 17), i.showWords || t.add(18), i.showColors || t.add(19), i.showFiles || + t.add(20), i.showReferences || t.add(21), i.showColors || t.add(22), + i.showFolders || t.add(23), i.showTypeParameters || t.add(24), i.showSnippets || + t.add(27), i.showUsers || t.add(25), i.showIssues || t.add(26), { + itemKind: t, + showDeprecated: i.showDeprecated + } + } + _onNewContext(e) { + if (this._context) + if (e.lineNumber === this._context.lineNumber) + if ((0, W.V8)(e.leadingLineContent) === (0, W.V8)(this._context.leadingLineContent)) { + if (e.column < this._context.column) e.leadingWord.word ? this.trigger({ + auto: this._context.auto, + shy: !1 + }, !0) : this.cancel(); + else if (this._completionModel) + if (0 !== e.leadingWord.word.length && e.leadingWord.startColumn > + this._context.leadingWord.startColumn) { + const e = new Set(_.KZ.all(this._editor.getModel())); + for (let t of this._completionModel.allProvider) e.delete(t); + const t = this._completionModel.adopt(new Set); + this.trigger({ + auto: this._context.auto, + shy: !1 + }, !0, e, { + items: t, + clipboardText: this._completionModel.clipboardText + }) + } else if (e.column > this._context.column && this._completionModel + .incomplete.size > 0 && 0 !== e.leadingWord.word.length) { + const { + incomplete: e + } = this._completionModel, t = this._completionModel.adopt(e); + this.trigger({ + auto: 2 === this._state, + shy: !1, + triggerKind: 2 + }, !0, e, { + items: t, + clipboardText: this._completionModel.clipboardText + }) + } else { + let t = this._completionModel.lineContext, + i = !1; + if (this._completionModel.lineContext = { + leadingLineContent: e.leadingLineContent, + characterCountDelta: e.column - this._context.column + }, 0 === this._completionModel.items.length) { + if (G.shouldAutoTrigger(this._editor) && this._context.leadingWord + .endColumn < e.leadingWord.startColumn) return void this.trigger({ + auto: this._context.auto, + shy: !1 + }, !0); + if (this._context.auto) return void this.cancel(); + if (this._completionModel.lineContext = t, i = this._completionModel + .items.length > 0, i && 0 === e.leadingWord.word.length) return + void this.cancel() + } + this._onDidSuggest.fire({ + completionModel: this._completionModel, + auto: this._context.auto, + shy: this._context.shy, + isFrozen: i + }) + } + } else this.cancel(); + else this.cancel() + } + }; + Y = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([Z(1, H.p), Z(2, K.p), Z(3, $.b), Z(4, q.VZ), Z(5, I.i6), Z(6, w.Ui)], + Y); + var Q = i(3379), + X = i.n(Q), + J = i(7795), + ee = i.n(J), + te = i(569), + ie = i.n(te), + ne = i(3565), + oe = i.n(ne), + re = i(9216), + se = i.n(re), + ae = i(4589), + le = i.n(ae), + de = i(36), + ce = {}; + ce.styleTagTransform = le(), ce.setAttributes = oe(), ce.insert = ie().bind( + null, "head"), ce.domAPI = ee(), ce.insertStyleElement = se(), X()(de.Z, + ce), de.Z && de.Z.locals && de.Z.locals, i(9899), i(4954); + var he = i(5321), + ue = i(3799), + ge = i(8810), + pe = i(7781), + me = i(3910), + fe = i(6781), + _e = i(3947), + be = i(9365), + ve = i(3046), + we = i(3841); + class Ce { + constructor() { + let e; + this._onDidWillResize = new P.Q5, this.onDidWillResize = this._onDidWillResize + .event, this._onDidResize = new P.Q5, this.onDidResize = this._onDidResize + .event, this._sashListener = new a.SL, this._size = new he.Ro(0, 0), + this._minSize = new he.Ro(0, 0), this._maxSize = new he.Ro(Number.MAX_SAFE_INTEGER, + Number.MAX_SAFE_INTEGER), this.domNode = document.createElement( + "div"), this._eastSash = new we.g(this.domNode, { + getVerticalSashLeft: () => this._size.width + }, { + orientation: 0 + }), this._westSash = new we.g(this.domNode, { + getVerticalSashLeft: () => 0 + }, { + orientation: 0 + }), this._northSash = new we.g(this.domNode, { + getHorizontalSashTop: () => 0 + }, { + orientation: 1, + orthogonalEdge: we.l.North + }), this._southSash = new we.g(this.domNode, { + getHorizontalSashTop: () => this._size.height + }, { + orientation: 1, + orthogonalEdge: we.l.South + }), this._northSash.orthogonalStartSash = this._westSash, this._northSash + .orthogonalEndSash = this._eastSash, this._southSash.orthogonalStartSash = + this._westSash, this._southSash.orthogonalEndSash = this._eastSash; + let t = 0, + i = 0; + this._sashListener.add(P.ju.any(this._northSash.onDidStart, this._eastSash + .onDidStart, this._southSash.onDidStart, this._westSash.onDidStart) + ((() => { + void 0 === e && (this._onDidWillResize.fire(), e = this._size, t = + 0, i = 0) + }))), this._sashListener.add(P.ju.any(this._northSash.onDidEnd, this + ._eastSash.onDidEnd, this._southSash.onDidEnd, this._westSash.onDidEnd + )((() => { + void 0 !== e && (e = void 0, t = 0, i = 0, this._onDidResize.fire({ + dimension: this._size, + done: !0 + })) + }))), this._sashListener.add(this._eastSash.onDidChange((n => { + e && (i = n.currentX - n.startX, this.layout(e.height + t, e.width + + i), this._onDidResize.fire({ + dimension: this._size, + done: !1, + east: !0 + })) + }))), this._sashListener.add(this._westSash.onDidChange((n => { + e && (i = -(n.currentX - n.startX), this.layout(e.height + t, e.width + + i), this._onDidResize.fire({ + dimension: this._size, + done: !1, + west: !0 + })) + }))), this._sashListener.add(this._northSash.onDidChange((n => { + e && (t = -(n.currentY - n.startY), this.layout(e.height + t, e.width + + i), this._onDidResize.fire({ + dimension: this._size, + done: !1, + north: !0 + })) + }))), this._sashListener.add(this._southSash.onDidChange((n => { + e && (t = n.currentY - n.startY, this.layout(e.height + t, e.width + + i), this._onDidResize.fire({ + dimension: this._size, + done: !1, + south: !0 + })) + }))), this._sashListener.add(P.ju.any(this._eastSash.onDidReset, this + ._westSash.onDidReset)((e => { + this._preferredSize && (this.layout(this._size.height, this._preferredSize + .width), this._onDidResize.fire({ + dimension: this._size, + done: !0 + })) + }))), this._sashListener.add(P.ju.any(this._northSash.onDidReset, + this._southSash.onDidReset)((e => { + this._preferredSize && (this.layout(this._preferredSize.height, + this._size.width), this._onDidResize.fire({ + dimension: this._size, + done: !0 + })) + }))) + } + dispose() { + this._northSash.dispose(), this._southSash.dispose(), this._eastSash.dispose(), + this._westSash.dispose(), this._sashListener.dispose(), this._onDidResize + .dispose(), this._onDidWillResize.dispose(), this.domNode.remove() + } + enableSashes(e, t, i, n) { + this._northSash.state = e ? 3 : 0, this._eastSash.state = t ? 3 : 0, + this._southSash.state = i ? 3 : 0, this._westSash.state = n ? 3 : 0 + } + layout(e = this.size.height, t = this.size.width) { + const { + height: i, + width: n + } = this._minSize, { + height: o, + width: r + } = this._maxSize; + e = Math.max(i, Math.min(o, e)), t = Math.max(n, Math.min(r, t)); + const s = new he.Ro(t, e); + he.Ro.equals(s, this._size) || (this.domNode.style.height = e + "px", + this.domNode.style.width = t + "px", this._size = s, this._northSash + .layout(), this._eastSash.layout(), this._southSash.layout(), this._westSash + .layout()) + } + clearSashHoverState() { + this._eastSash.clearSashHoverState(), this._westSash.clearSashHoverState(), + this._northSash.clearSashHoverState(), this._southSash.clearSashHoverState() + } + get size() { + return this._size + } + set maxSize(e) { + this._maxSize = e + } + get maxSize() { + return this._maxSize + } + set minSize(e) { + this._minSize = e + } + get minSize() { + return this._minSize + } + set preferredSize(e) { + this._preferredSize = e + } + get preferredSize() { + return this._preferredSize + } + } + + function ye(e) { + return !!e && Boolean(e.completion.documentation || e.completion.detail && + e.completion.detail !== e.completion.label) + } + let Se = class { + constructor(e, t) { + this._editor = e, this._onDidClose = new P.Q5, this.onDidClose = this + ._onDidClose.event, this._onDidChangeContents = new P.Q5, this.onDidChangeContents = + this._onDidChangeContents.event, this._disposables = new a.SL, this._renderDisposeable = + new a.SL, this._borderWidth = 1, this._size = new he.Ro(330, 0), + this.domNode = he.$(".suggest-details"), this.domNode.classList.add( + "no-docs"), this._markdownRenderer = t.createInstance(_e.$, { + editor: e + }), this._body = he.$(".body"), this._scrollbar = new fe.s$(this._body, {}), + he.R3(this.domNode, this._scrollbar.getDomNode()), this._disposables + .add(this._scrollbar), this._header = he.R3(this._body, he.$( + ".header")), this._close = he.R3(this._header, he.$("span" + ve.lA.close + .cssSelector)), this._close.title = D.N("details.close", "Close"), + this._type = he.R3(this._header, he.$("p.type")), this._docs = he.R3( + this._body, he.$("p.docs")), this._configureFont(), this._disposables + .add(this._editor.onDidChangeConfiguration((e => { + e.hasChanged(42) && this._configureFont() + }))) + } + dispose() { + this._disposables.dispose(), this._renderDisposeable.dispose() + } + _configureFont() { + const e = this._editor.getOptions(), + t = e.get(42), + i = t.fontFamily, + n = e.get(107) || t.fontSize, + o = e.get(108) || t.lineHeight, + r = t.fontWeight, + s = `${n}px`, + a = `${o}px`; + this.domNode.style.fontSize = s, this.domNode.style.lineHeight = a, + this.domNode.style.fontWeight = r, this.domNode.style.fontFeatureSettings = + t.fontFeatureSettings, this._type.style.fontFamily = i, this._close.style + .height = a, this._close.style.width = a + } + getLayoutInfo() { + const e = this._editor.getOption(108) || this._editor.getOption(42).lineHeight, + t = this._borderWidth; + return { + lineHeight: e, + borderWidth: t, + borderHeight: 2 * t, + verticalPadding: 22, + horizontalPadding: 14 + } + } + renderLoading() { + this._type.textContent = D.N("loading", "Loading..."), this._docs.textContent = + "", this.domNode.classList.remove("no-docs", "no-type"), this.layout( + this.size.width, 2 * this.getLayoutInfo().lineHeight), this._onDidChangeContents + .fire(this) + } + renderItem(e, t) { + var i, n; + this._renderDisposeable.clear(); + let { + detail: o, + documentation: r + } = e.completion; + if (t) { + let t = ""; + t += `score: ${e.score[0]}\n`, t += + `prefix: ${null!==(i=e.word)&&void 0!==i?i:"(no prefix)"}\n`, t += + `word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`, + t += `distance: ${e.distance} (localityBonus-setting)\n`, t += + `index: ${e.idx}, based on ${e.completion.sortText&&` + sortText: "${e.completion.sortText}" + `||"label"}\n`, t += + `commit_chars: ${null===(n=e.completion.commitCharacters)||void 0===n?void 0:n.join("")}\n`, + r = (new be.W5).appendCodeblock("empty", t), o = + `Provider: ${e.provider._debugDisplayName}` + } + if (t || ye(e)) { + if (this.domNode.classList.remove("no-docs", "no-type"), o) { + const e = o.length > 1e5 ? `${o.substr(0,1e5)}…` : o; + this._type.textContent = e, this._type.title = e, he.$Z(this._type), + this._type.classList.toggle("auto-wrap", !/\r?\n^\s+/gim.test(e)) + } else he.PO(this._type), this._type.title = "", he.Cp(this._type), + this.domNode.classList.add("no-type"); + if (he.PO(this._docs), "string" == typeof r) this._docs.classList.remove( + "markdown-docs"), this._docs.textContent = r; + else if (r) { + this._docs.classList.add("markdown-docs"), he.PO(this._docs); + const e = this._markdownRenderer.render(r); + this._docs.appendChild(e.element), this._renderDisposeable.add(e), + this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync( + (() => { + this.layout(this._size.width, this._type.clientHeight + this._docs + .clientHeight), this._onDidChangeContents.fire(this) + }))) + } + this.domNode.style.userSelect = "text", this.domNode.tabIndex = -1, + this._close.onmousedown = e => { + e.preventDefault(), e.stopPropagation() + }, this._close.onclick = e => { + e.preventDefault(), e.stopPropagation(), this._onDidClose.fire() + }, this._body.scrollTop = 0, this.layout(this._size.width, this._type + .clientHeight + this._docs.clientHeight), this._onDidChangeContents + .fire(this) + } else this.clearContents() + } + clearContents() { + this.domNode.classList.add("no-docs"), this._type.textContent = "", + this._docs.textContent = "" + } + get size() { + return this._size + } + layout(e, t) { + const i = new he.Ro(e, t); + he.Ro.equals(i, this._size) || (this._size = i, he.dp(this.domNode, e, + t)), this._scrollbar.scanDomNode() + } + scrollDown(e = 8) { + this._body.scrollTop += e + } + scrollUp(e = 8) { + this._body.scrollTop -= e + } + scrollTop() { + this._body.scrollTop = 0 + } + scrollBottom() { + this._body.scrollTop = this._body.scrollHeight + } + pageDown() { + this.scrollDown(80) + } + pageUp() { + this.scrollUp(80) + } + set borderWidth(e) { + this._borderWidth = e + } + get borderWidth() { + return this._borderWidth + } + }; + Se = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([function(e, t) { + return function(i, n) { + t(i, n, e) + } + }(1, v.TG)], Se); + class xe { + constructor(e, t) { + let i, n; + this.widget = e, this._editor = t, this._disposables = new a.SL, this._added = ! + 1, this._resizable = new Ce, this._resizable.domNode.classList.add( + "suggest-details-container"), this._resizable.domNode.appendChild(e.domNode), + this._resizable.enableSashes(!1, !0, !0, !1); + let o = 0, + r = 0; + this._disposables.add(this._resizable.onDidWillResize((() => { + i = this._topLeft, n = this._resizable.size + }))), this._disposables.add(this._resizable.onDidResize((e => { + if (i && n) { + this.widget.layout(e.dimension.width, e.dimension.height); + let t = !1; + e.west && (r = n.width - e.dimension.width, t = !0), e.north && + (o = n.height - e.dimension.height, t = !0), t && this._applyTopLeft({ + top: i.top + o, + left: i.left + r + }) + } + e.done && (i = void 0, n = void 0, o = 0, r = 0, this._userSize = + e.dimension) + }))), this._disposables.add(this.widget.onDidChangeContents((() => { + var e; + this._anchorBox && this._placeAtAnchor(this._anchorBox, null !== + (e = this._userSize) && void 0 !== e ? e : this.widget.size) + }))) + } + dispose() { + this._resizable.dispose(), this._disposables.dispose(), this.hide() + } + getId() { + return "suggest.details" + } + getDomNode() { + return this._resizable.domNode + } + getPosition() { + return null + } + show() { + this._added || (this._editor.addOverlayWidget(this), this.getDomNode() + .style.position = "fixed", this._added = !0) + } + hide(e = !1) { + this._resizable.clearSashHoverState(), this._added && (this._editor.removeOverlayWidget( + this), this._added = !1, this._anchorBox = void 0, this._topLeft = + void 0), e && (this._userSize = void 0, this.widget.clearContents()) + } + placeAtAnchor(e) { + var t; + const i = he.i(e); + this._anchorBox = i, this._placeAtAnchor(this._anchorBox, null !== (t = + this._userSize) && void 0 !== t ? t : this.widget.size) + } + _placeAtAnchor(e, t) { + const i = he.D6(document.body), + n = this.widget.getLayoutInfo(); + let o, r, s, a, l = new he.Ro(220, 2 * n.lineHeight), + d = 0, + c = e.top, + h = e.top + e.height - n.borderHeight, + u = i.width - (e.left + e.width + n.borderWidth + n.horizontalPadding); + d = -n.borderWidth + e.left + e.width, a = !0, o = new he.Ro(u, i.height - + e.top - n.borderHeight - n.verticalPadding), r = o.with(void 0, e.top + + e.height - n.borderHeight - n.verticalPadding), t.width > u && (e.left > + u && (u = e.left - n.borderWidth - n.horizontalPadding, a = !1, d = + Math.max(n.horizontalPadding, e.left - t.width - n.borderWidth), o = + o.with(u), r = o.with(void 0, r.height)), e.width > 1.3 * u && i.height - + (e.top + e.height) > e.height && (u = e.width, d = e.left, c = -n.borderWidth + + e.top + e.height, o = new he.Ro(e.width - n.borderHeight, i.height - + e.top - e.height - n.verticalPadding), r = o.with(void 0, e.top - + n.verticalPadding), l = l.with(o.width))); + let g, p = t.height, + m = Math.max(o.height, r.height); + p > m && (p = m), p <= o.height ? (s = !0, g = o) : (s = !1, g = r), + this._applyTopLeft({ + left: d, + top: s ? c : h - p + }), this.getDomNode().style.position = "fixed", this._resizable.enableSashes(! + s, a, s, !a), this._resizable.minSize = l, this._resizable.maxSize = + g, this._resizable.layout(p, Math.min(g.width, t.width)), this.widget + .layout(this._resizable.size.width, this._resizable.size.height) + } + _applyTopLeft(e) { + this._topLeft = e, this.getDomNode().style.left = + `${this._topLeft.left}px`, this.getDomNode().style.top = + `${this._topLeft.top}px` + } + } + var ke = i(317), + Le = i(1133), + Ne = i(4144), + De = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + class Ee extends Le.Mm { + updateLabel() { + const e = this._keybindingService.lookupKeybinding(this._action.id, + this._contextKeyService); + if (!e) return super.updateLabel(); + this.label && (this.label.textContent = (0, D.N)("ddd", "{0} ({1})", + this._action.label, Ee.symbolPrintEnter(e))) + } + static symbolPrintEnter(e) { + var t; + return null === (t = e.getLabel()) || void 0 === t ? void 0 : t.replace( + /\benter\b/gi, "⏎") + } + } + let Ie = class { + constructor(e, t, i, n) { + this._menuService = i, this._contextKeyService = n, this._menuDisposables = + new a.SL, this.element = he.R3(e, he.$(".suggest-status-bar")); + const o = e => e instanceof Ne.U8 ? t.createInstance(Ee, e, void 0) : + void 0; + this._leftActions = new ke.o(this.element, { + actionViewItemProvider: o + }), this._rightActions = new ke.o(this.element, { + actionViewItemProvider: o + }), this._leftActions.domNode.classList.add("left"), this._rightActions + .domNode.classList.add("right") + } + dispose() { + this._menuDisposables.dispose(), this.element.remove() + } + show() { + const e = this._menuService.createMenu(M.GI, this._contextKeyService), + t = () => { + const t = [], + i = []; + for (let [n, o] of e.getActions()) "left" === n ? t.push(...o) : i.push( + ...o); + this._leftActions.clear(), this._leftActions.push(t), this._rightActions + .clear(), this._rightActions.push(i) + }; + this._menuDisposables.add(e.onDidChange((() => t()))), this._menuDisposables + .add(e) + } + hide() { + this._menuDisposables.clear() + } + }; + Ie = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([De(1, v.TG), De(2, Ne.co), De(3, I.i6)], Ie); + var Te, Me = i(3326), + Ae = i(6663), + Re = i(5935), + Oe = i(1144); + + function Pe(e, t, i, n) { + const o = n === Te.ROOT_FOLDER ? ["rootfolder-icon"] : n === Te.FOLDER ? [ + "folder-icon" + ] : ["file-icon"]; + if (i) { + let r; + if (r = i.scheme === Ae.lg.data ? Re.Vb.parseMetaData(i).get(Re.Vb.META_DATA_LABEL) : + Fe((0, Re.Hx)(i).toLowerCase()), n === Te.FOLDER) o.push( + `${r}-name-folder-icon`); + else { + if (r) { + if (o.push(`${r}-name-file-icon`), r.length <= 255) { + const e = r.split("."); + for (let t = 1; t < e.length; t++) o.push( + `${e.slice(t).join(".")}-ext-file-icon`) + } + o.push("ext-file-icon") + } + const n = function(e, t, i) { + if (!i) return null; + let n = null; + if (i.scheme === Ae.lg.data) { + const e = Re.Vb.parseMetaData(i).get(Re.Vb.META_DATA_MIME); + e && (n = t.getModeId(e)) + } else { + const t = e.getModel(i); + t && (n = t.getModeId()) + } + return n && n !== Oe.XT ? n : t.getModeIdByFilepathOrFirstLine(i) + }(e, t, i); + n && o.push(`${Fe(n)}-lang-file-icon`) + } + } + return o + } + + function Fe(e) { + return e.replace(/[\11\12\14\15\40]/g, "/") + }! function(e) { + e[e.FILE = 0] = "FILE", e[e.FOLDER = 1] = "FOLDER", e[e.ROOT_FOLDER = 2] = + "ROOT_FOLDER" + }(Te || (Te = {})); + var Be, We = i(1200), + ze = i(666), + Ve = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + + function He(e) { + return `suggest-aria-id:${e}` + } + const Ue = (0, i(9554).q5)("suggest-more-info", ve.lA.chevronRight, D.N( + "suggestMoreInfoIcon", + "Icon for more information in the suggest widget.")), + je = new((Be = class e { + extract(t, i) { + if (t.textLabel.match(e._regexStrict)) return i[0] = t.textLabel, ! + 0; + if (t.completion.detail && t.completion.detail.match(e._regexStrict)) + return i[0] = t.completion.detail, !0; + if ("string" == typeof t.completion.documentation) { + const n = e._regexRelaxed.exec(t.completion.documentation); + if (n && (0 === n.index || n.index + n[0].length === t.completion.documentation + .length)) return i[0] = n[0], !0 + } + return !1 + } + })._regexRelaxed = + /(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/, + Be._regexStrict = new RegExp(`^${Be._regexRelaxed.source}$`, "i"), Be); + let Ke = class { + constructor(e, t, i, n) { + this._editor = e, this._modelService = t, this._modeService = i, this + ._themeService = n, this._onDidToggleDetails = new P.Q5, this.onDidToggleDetails = + this._onDidToggleDetails.event, this.templateId = "suggestion" + } + dispose() { + this._onDidToggleDetails.dispose() + } + renderTemplate(e) { + const t = Object.create(null); + t.disposables = new a.SL, t.root = e, t.root.classList.add( + "show-file-icons"), t.icon = (0, he.R3)(e, (0, he.$)(".icon")), t.colorspan = + (0, he.R3)(t.icon, (0, he.$)("span.colorspan")); + const i = (0, he.R3)(e, (0, he.$)(".contents")), + n = (0, he.R3)(i, (0, he.$)(".main")); + t.iconContainer = (0, he.R3)(n, (0, he.$)(".icon-label.codicon")), t.left = + (0, he.R3)(n, (0, he.$)("span.left")), t.right = (0, he.R3)(n, (0, + he.$)("span.right")), t.iconLabel = new Me.g(t.left, { + supportHighlights: !0, + supportIcons: !0 + }), t.disposables.add(t.iconLabel), t.parametersLabel = (0, he.R3)(t + .left, (0, he.$)("span.signature-label")), t.qualifierLabel = (0, + he.R3)(t.left, (0, he.$)("span.qualifier-label")), t.detailsLabel = + (0, he.R3)(t.right, (0, he.$)("span.details-label")), t.readMore = ( + 0, he.R3)(t.right, (0, he.$)("span.readMore" + pe.kS.asCSSSelector( + Ue))), t.readMore.title = D.N("readMore", "Read More"); + const o = () => { + const e = this._editor.getOptions(), + i = e.get(42), + o = i.fontFamily, + r = i.fontFeatureSettings, + s = e.get(107) || i.fontSize, + a = e.get(108) || i.lineHeight, + l = i.fontWeight, + d = `${s}px`, + c = `${a}px`; + t.root.style.fontSize = d, t.root.style.fontWeight = l, n.style.fontFamily = + o, n.style.fontFeatureSettings = r, n.style.lineHeight = c, t.icon + .style.height = c, t.icon.style.width = c, t.readMore.style.height = + c, t.readMore.style.width = c + }; + return o(), t.disposables.add(this._editor.onDidChangeConfiguration(( + e => { + (e.hasChanged(42) || e.hasChanged(107) || e.hasChanged(108)) && + o() + }))), t + } + renderElement(e, t, i) { + const { + completion: n + } = e; + i.root.id = He(t), i.colorspan.style.backgroundColor = ""; + const r = { + labelEscapeNewLines: !0, + matches: (0, B.mB)(e.score) + }; + let s = []; + if (19 === n.kind && je.extract(e, s)) i.icon.className = + "icon customcolor", i.iconContainer.className = "icon hide", i.colorspan + .style.backgroundColor = s[0]; + else if (20 === n.kind && this._themeService.getFileIconTheme().hasFileIcons) { + i.icon.className = "icon hide", i.iconContainer.className = + "icon hide"; + const t = Pe(this._modelService, this._modeService, ze.o.from({ + scheme: "fake", + path: e.textLabel + }), Te.FILE), + o = Pe(this._modelService, this._modeService, ze.o.from({ + scheme: "fake", + path: n.detail + }), Te.FILE); + r.extraClasses = t.length > o.length ? t : o + } else 23 === n.kind && this._themeService.getFileIconTheme().hasFolderIcons ? + (i.icon.className = "icon hide", i.iconContainer.className = + "icon hide", r.extraClasses = (0, o.xH)([Pe(this._modelService, + this._modeService, ze.o.from({ + scheme: "fake", + path: e.textLabel + }), Te.FOLDER), Pe(this._modelService, this._modeService, ze.o.from({ + scheme: "fake", + path: n.detail + }), Te.FOLDER)])) : (i.icon.className = "icon hide", i.iconContainer + .className = "", i.iconContainer.classList.add("suggest-icon", ...( + 0, _.Sy)(n.kind).split(" "))); + n.tags && n.tags.indexOf(1) >= 0 && (r.extraClasses = (r.extraClasses || []) + .concat(["deprecated"]), r.matches = []), i.iconLabel.setLabel(e.textLabel, + void 0, r), "string" == typeof n.label ? (i.parametersLabel.textContent = + "", i.detailsLabel.textContent = $e(n.detail || ""), i.root.classList + .add("string-label")) : (i.parametersLabel.textContent = $e(n.label + .detail || ""), i.detailsLabel.textContent = $e(n.label.description || + ""), i.root.classList.remove("string-label")), this._editor.getOption( + 106).showInlineDetails ? (0, he.$Z)(i.detailsLabel) : (0, he.Cp)(i.detailsLabel), + ye(e) ? (i.right.classList.add("can-expand-details"), (0, he.$Z)(i.readMore), + i.readMore.onmousedown = e => { + e.stopPropagation(), e.preventDefault() + }, i.readMore.onclick = e => { + e.stopPropagation(), e.preventDefault(), this._onDidToggleDetails.fire() + }) : (i.right.classList.remove("can-expand-details"), (0, he.Cp)(i.readMore), + i.readMore.onmousedown = null, i.readMore.onclick = null) + } + disposeTemplate(e) { + e.disposables.dispose() + } + }; + + function $e(e) { + return e.replace(/\r\n|\r|\n/g, "") + } + Ke = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([Ve(1, We.q), Ve(2, y.h), Ve(3, pe.XE)], Ke); + var qe = i(4527), + Ze = i(9870), + Ge = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const Ye = (0, me.P6)("editorSuggestWidget.background", { + dark: me.D0, + light: me.D0, + hc: me.D0 + }, D.N("editorSuggestWidgetBackground", + "Background color of the suggest widget.")), + Qe = (0, me.P6)("editorSuggestWidget.border", { + dark: me.D1, + light: me.D1, + hc: me.D1 + }, D.N("editorSuggestWidgetBorder", + "Border color of the suggest widget.")), + Xe = (0, me.P6)("editorSuggestWidget.foreground", { + dark: me.NO, + light: me.NO, + hc: me.NO + }, D.N("editorSuggestWidgetForeground", + "Foreground color of the suggest widget.")), + Je = (0, me.P6)("editorSuggestWidget.selectedForeground", { + dark: me.NP, + light: me.NP, + hc: me.NP + }, D.N("editorSuggestWidgetSelectedForeground", + "Foreground color of the selected entry in the suggest widget.")), + et = (0, me.P6)("editorSuggestWidget.selectedIconForeground", { + dark: me.cb, + light: me.cb, + hc: me.cb + }, D.N("editorSuggestWidgetSelectedIconForeground", + "Icon foreground color of the selected entry in the suggest widget.")), + tt = (0, me.P6)("editorSuggestWidget.selectedBackground", { + dark: me.Vq, + light: me.Vq, + hc: me.Vq + }, D.N("editorSuggestWidgetSelectedBackground", + "Background color of the selected entry in the suggest widget.")), + it = (0, me.P6)("editorSuggestWidget.highlightForeground", { + dark: me.Gw, + light: me.Gw, + hc: me.Gw + }, D.N("editorSuggestWidgetHighlightForeground", + "Color of the match highlights in the suggest widget.")), + nt = (0, me.P6)("editorSuggestWidget.focusHighlightForeground", { + dark: me.PX, + light: me.PX, + hc: me.PX + }, D.N("editorSuggestWidgetFocusHighlightForeground", + "Color of the match highlights in the suggest widget when an item is focused." + )); + class ot { + constructor(e, t) { + this._service = e, this._key = + `suggestWidget.size/${t.getEditorType()}/${t instanceof qe.H}` + } + restore() { + var e; + const t = null !== (e = this._service.get(this._key, 0)) && void 0 !== + e ? e : ""; + try { + const e = JSON.parse(t); + if (he.Ro.is(e)) return he.Ro.lift(e) + } catch (e) {} + } + store(e) { + this._service.store(this._key, JSON.stringify(e), 0, 1) + } + reset() { + this._service.remove(this._key, 0) + } + } + let rt = class e { + constructor(e, t, i, n, o) { + this.editor = e, this._storageService = t, this._state = 0, this._isAuto = ! + 1, this._ignoreFocusEvents = !1, this._forceRenderingAbove = !1, + this._explainMode = !1, this._showTimeout = new b._F, this._disposables = + new a.SL, this._onDidSelect = new P.Q5, this._onDidFocus = new P.Q5, + this._onDidHide = new P.Q5, this._onDidShow = new P.Q5, this.onDidSelect = + this._onDidSelect.event, this.onDidFocus = this._onDidFocus.event, + this.onDidHide = this._onDidHide.event, this.onDidShow = this._onDidShow + .event, this._onDetailsKeydown = new P.Q5, this.onDetailsKeyDown = + this._onDetailsKeydown.event, this.element = new Ce, this.element.domNode + .classList.add("editor-widget", "suggest-widget"), this._contentWidget = + new st(this, e), this._persistedSize = new ot(t, e); + class r { + constructor(e, t, i = !1, n = !1) { + this.persistedSize = e, this.currentSize = t, this.persistHeight = + i, this.persistWidth = n + } + } + let s; + this._disposables.add(this.element.onDidWillResize((() => { + this._contentWidget.lockPreference(), s = new r(this._persistedSize + .restore(), this.element.size) + }))), this._disposables.add(this.element.onDidResize((e => { + var t, i, n, o; + if (this._resize(e.dimension.width, e.dimension.height), s && (s + .persistHeight = s.persistHeight || !!e.north || !!e.south, s.persistWidth = + s.persistWidth || !!e.east || !!e.west), e.done) { + if (s) { + const { + itemHeight: e, + defaultSize: r + } = this.getLayoutInfo(), a = Math.round(e / 2); + let { + width: l, + height: d + } = this.element.size; + (!s.persistHeight || Math.abs(s.currentSize.height - d) <= a) && + (d = null !== (i = null === (t = s.persistedSize) || void 0 === + t ? void 0 : t.height) && void 0 !== i ? i : r.height), (!s.persistWidth || + Math.abs(s.currentSize.width - l) <= a) && (l = null !== (o = + null === (n = s.persistedSize) || void 0 === n ? void 0 : n.width + ) && void 0 !== o ? o : r.width), this._persistedSize.store( + new he.Ro(l, d)) + } + this._contentWidget.unlockPreference(), s = void 0 + } + }))), this._messageElement = he.R3(this.element.domNode, he.$( + ".message")), this._listElement = he.R3(this.element.domNode, he.$( + ".tree")); + const l = o.createInstance(Se, this.editor); + l.onDidClose(this.toggleDetails, this, this._disposables), this._details = + new xe(l, this.editor); + const d = () => this.element.domNode.classList.toggle("no-icons", ! + this.editor.getOption(106).showIcons); + d(); + const c = o.createInstance(Ke, this.editor); + this._disposables.add(c), this._disposables.add(c.onDidToggleDetails( + (() => this.toggleDetails()))), this._list = new ue.aV( + "SuggestWidget", this._listElement, { + getHeight: e => this.getLayoutInfo().itemHeight, + getTemplateId: e => "suggestion" + }, [c], { + alwaysConsumeMouseWheel: !0, + useShadows: !1, + mouseSupport: !1, + accessibilityProvider: { + getRole: () => "option", + getAriaLabel: e => { + if (e.isResolved && this._isDetailsVisible()) { + const { + documentation: t, + detail: i + } = e.completion, n = W.WU("{0}{1}", i || "", t ? "string" == + typeof t ? t : t.value : ""); + return D.N("ariaCurrenttSuggestionReadDetails", + "{0}, docs: {1}", e.textLabel, n) + } + return e.textLabel + }, + getWidgetAriaLabel: () => D.N("suggest", "Suggest"), + getWidgetRole: () => "listbox" + } + }), this._status = o.createInstance(Ie, this.element.domNode); + const h = () => this.element.domNode.classList.toggle( + "with-status-bar", this.editor.getOption(106).showStatusBar); + h(), this._disposables.add((0, ge.Jl)(this._list, n, { + listInactiveFocusBackground: tt, + listInactiveFocusOutline: me.xL + })), this._disposables.add(n.onDidColorThemeChange((e => this._onThemeChange( + e)))), this._onThemeChange(n.getColorTheme()), this._disposables.add( + this._list.onMouseDown((e => this._onListMouseDownOrTap(e)))), this + ._disposables.add(this._list.onTap((e => this._onListMouseDownOrTap( + e)))), this._disposables.add(this._list.onDidChangeSelection((e => + this._onListSelection(e)))), this._disposables.add(this._list.onDidChangeFocus( + (e => this._onListFocus(e)))), this._disposables.add(this.editor.onDidChangeCursorSelection( + (() => this._onCursorSelectionChanged()))), this._disposables.add( + this.editor.onDidChangeConfiguration((e => { + e.hasChanged(106) && (h(), d()) + }))), this._ctxSuggestWidgetVisible = M._y.Visible.bindTo(i), this._ctxSuggestWidgetDetailsVisible = + M._y.DetailsVisible.bindTo(i), this._ctxSuggestWidgetMultipleSuggestions = + M._y.MultipleSuggestions.bindTo(i), this._disposables.add(he.mu(this + ._details.widget.domNode, "keydown", (e => { + this._onDetailsKeydown.fire(e) + }))), this._disposables.add(this.editor.onMouseDown((e => this._onEditorMouseDown( + e)))) + } + dispose() { + var e; + this._details.widget.dispose(), this._details.dispose(), this._list.dispose(), + this._status.dispose(), this._disposables.dispose(), null === (e = + this._loadingTimeout) || void 0 === e || e.dispose(), this._showTimeout + .dispose(), this._contentWidget.dispose(), this.element.dispose() + } + _onEditorMouseDown(e) { + this._details.widget.domNode.contains(e.target.element) ? this._details + .widget.domNode.focus() : this.element.domNode.contains(e.target.element) && + this.editor.focus() + } + _onCursorSelectionChanged() { + 0 !== this._state && this._contentWidget.layout() + } + _onListMouseDownOrTap(e) { + void 0 !== e.element && void 0 !== e.index && (e.browserEvent.preventDefault(), + e.browserEvent.stopPropagation(), this._select(e.element, e.index)) + } + _onListSelection(e) { + e.elements.length && this._select(e.elements[0], e.indexes[0]) + } + _select(e, t) { + const i = this._completionModel; + i && (this._onDidSelect.fire({ + item: e, + index: t, + model: i + }), this.editor.focus()) + } + _onThemeChange(e) { + const t = e.getColor(Ye); + t && (this.element.domNode.style.backgroundColor = t.toString(), this + ._messageElement.style.backgroundColor = t.toString(), this._details + .widget.domNode.style.backgroundColor = t.toString()); + const i = e.getColor(Qe); + i && (this.element.domNode.style.borderColor = i.toString(), this._messageElement + .style.borderColor = i.toString(), this._status.element.style.borderTopColor = + i.toString(), this._details.widget.domNode.style.borderColor = i.toString(), + this._detailsBorderColor = i.toString()); + const n = e.getColor(me.R8); + n && (this._detailsFocusBorderColor = n.toString()), this._details.widget + .borderWidth = "hc" === e.type ? 2 : 1 + } + _onListFocus(e) { + var t; + if (this._ignoreFocusEvents) return; + if (!e.elements.length) return this._currentSuggestionDetails && ( + this._currentSuggestionDetails.cancel(), this._currentSuggestionDetails = + void 0, this._focusedItem = void 0), void this.editor.setAriaOptions({ + activeDescendant: void 0 + }); + if (!this._completionModel) return; + const i = e.elements[0], + n = e.indexes[0]; + i !== this._focusedItem && (null === (t = this._currentSuggestionDetails) || + void 0 === t || t.cancel(), this._currentSuggestionDetails = void 0, + this._focusedItem = i, this._list.reveal(n), this._currentSuggestionDetails = + (0, b.PG)((e => { + return t = this, n = void 0, r = function*() { + const t = (0, b.Vg)((() => { + this._isDetailsVisible() && this.showDetails(!0) + }), 250); + e.onCancellationRequested((() => t.dispose())); + const n = yield i.resolve(e); + return t.dispose(), n + }, new((o = void 0) || (o = Promise))((function(e, i) { + function s(e) { + try { + l(r.next(e)) + } catch (e) { + i(e) + } + } + + function a(e) { + try { + l(r.throw(e)) + } catch (e) { + i(e) + } + } + + function l(t) { + var i; + t.done ? e(t.value) : (i = t.value, i instanceof o ? i : + new o((function(e) { + e(i) + }))).then(s, a) + } + l((r = r.apply(t, n || [])).next()) + })); + var t, n, o, r + })), this._currentSuggestionDetails.then((() => { + n >= this._list.length || i !== this._list.element(n) || (this._ignoreFocusEvents = ! + 0, this._list.splice(n, 1, [i]), this._list.setFocus([n]), + this._ignoreFocusEvents = !1, this._isDetailsVisible() ? this.showDetails(! + 1) : this.element.domNode.classList.remove("docs-side"), this + .editor.setAriaOptions({ + activeDescendant: He(n) + })) + })).catch(r.dL)), this._onDidFocus.fire({ + item: i, + index: n, + model: this._completionModel + }) + } + _setState(t) { + if (this._state !== t) switch (this._state = t, this.element.domNode.classList + .toggle("frozen", 4 === t), this.element.domNode.classList.remove( + "message"), t) { + case 0: + he.Cp(this._messageElement, this._listElement, this._status.element), + this._details.hide(!0), this._status.hide(), this._contentWidget.hide(), + this._ctxSuggestWidgetVisible.reset(), this._ctxSuggestWidgetMultipleSuggestions + .reset(), this._showTimeout.cancel(), this.element.domNode.classList + .remove("visible"), this._list.splice(0, this._list.length), this + ._focusedItem = void 0, this._cappedHeight = void 0, this._explainMode = ! + 1; + break; + case 1: + this.element.domNode.classList.add("message"), this._messageElement + .textContent = e.LOADING_MESSAGE, he.Cp(this._listElement, this._status + .element), he.$Z(this._messageElement), this._details.hide(), + this._show(), this._focusedItem = void 0; + break; + case 2: + this.element.domNode.classList.add("message"), this._messageElement + .textContent = e.NO_SUGGESTIONS_MESSAGE, he.Cp(this._listElement, + this._status.element), he.$Z(this._messageElement), this._details + .hide(), this._show(), this._focusedItem = void 0; + break; + case 3: + case 4: + he.Cp(this._messageElement), he.$Z(this._listElement, this._status + .element), this._show(); + break; + case 5: + he.Cp(this._messageElement), he.$Z(this._listElement, this._status + .element), this._details.show(), this._show() + } + } + _show() { + this._status.show(), this._contentWidget.show(), this._layout(this._persistedSize + .restore()), this._ctxSuggestWidgetVisible.set(!0), this._showTimeout + .cancelAndSet((() => { + this.element.domNode.classList.add("visible"), this._onDidShow.fire( + this) + }), 100) + } + showTriggered(e, t) { + 0 === this._state && (this._contentWidget.setPosition(this.editor.getPosition()), + this._isAuto = !!e, this._isAuto || (this._loadingTimeout = (0, b.Vg) + ((() => this._setState(1)), t))) + } + showSuggestions(e, t, i, n) { + var o, r; + if (this._contentWidget.setPosition(this.editor.getPosition()), null === + (o = this._loadingTimeout) || void 0 === o || o.dispose(), null === + (r = this._currentSuggestionDetails) || void 0 === r || r.cancel(), + this._currentSuggestionDetails = void 0, this._completionModel !== e && + (this._completionModel = e), i && 2 !== this._state && 0 !== this._state + ) return void this._setState(4); + const s = this._completionModel.items.length, + a = 0 === s; + if (this._ctxSuggestWidgetMultipleSuggestions.set(s > 1), a) return + this._setState(n ? 0 : 2), void(this._completionModel = void 0); + this._focusedItem = void 0, this._list.splice(0, this._list.length, + this._completionModel.items), this._setState(i ? 4 : 3), this._list + .reveal(t, 0), this._list.setFocus([t]), this._layout(this.element.size), + this._detailsBorderColor && (this._details.widget.domNode.style.borderColor = + this._detailsBorderColor) + } + selectNextPage() { + switch (this._state) { + case 0: + return !1; + case 5: + return this._details.widget.pageDown(), !0; + case 1: + return !this._isAuto; + default: + return this._list.focusNextPage(), !0 + } + } + selectNext() { + switch (this._state) { + case 0: + return !1; + case 1: + return !this._isAuto; + default: + return this._list.focusNext(1, !0), !0 + } + } + selectLast() { + switch (this._state) { + case 0: + return !1; + case 5: + return this._details.widget.scrollBottom(), !0; + case 1: + return !this._isAuto; + default: + return this._list.focusLast(), !0 + } + } + selectPreviousPage() { + switch (this._state) { + case 0: + return !1; + case 5: + return this._details.widget.pageUp(), !0; + case 1: + return !this._isAuto; + default: + return this._list.focusPreviousPage(), !0 + } + } + selectPrevious() { + switch (this._state) { + case 0: + return !1; + case 1: + return !this._isAuto; + default: + return this._list.focusPrevious(1, !0), !1 + } + } + selectFirst() { + switch (this._state) { + case 0: + return !1; + case 5: + return this._details.widget.scrollTop(), !0; + case 1: + return !this._isAuto; + default: + return this._list.focusFirst(), !0 + } + } + getFocusedItem() { + if (0 !== this._state && 2 !== this._state && 1 !== this._state && + this._completionModel) return { + item: this._list.getFocusedElements()[0], + index: this._list.getFocus()[0], + model: this._completionModel + } + } + toggleDetailsFocus() { + 5 === this._state ? (this._setState(3), this._detailsBorderColor && ( + this._details.widget.domNode.style.borderColor = this._detailsBorderColor + )) : 3 === this._state && this._isDetailsVisible() && (this._setState( + 5), this._detailsFocusBorderColor && (this._details.widget.domNode + .style.borderColor = this._detailsFocusBorderColor)) + } + toggleDetails() { + this._isDetailsVisible() ? (this._ctxSuggestWidgetDetailsVisible.set(! + 1), this._setDetailsVisible(!1), this._details.hide(), this.element + .domNode.classList.remove("shows-details")) : !ye(this._list.getFocusedElements()[ + 0]) && !this._explainMode || 3 !== this._state && 5 !== this._state && + 4 !== this._state || (this._ctxSuggestWidgetDetailsVisible.set(!0), + this._setDetailsVisible(!0), this.showDetails(!1)) + } + showDetails(e) { + this._details.show(), e ? this._details.widget.renderLoading() : this + ._details.widget.renderItem(this._list.getFocusedElements()[0], this + ._explainMode), this._positionDetails(), this.editor.focus(), this.element + .domNode.classList.add("shows-details") + } + toggleExplainMode() { + this._list.getFocusedElements()[0] && (this._explainMode = !this._explainMode, + this._isDetailsVisible() ? this.showDetails(!1) : this.toggleDetails() + ) + } + resetPersistedSize() { + this._persistedSize.reset() + } + hideWidget() { + var e; + null === (e = this._loadingTimeout) || void 0 === e || e.dispose(), + this._setState(0), this._onDidHide.fire(this), this.element.clearSashHoverState(); + const t = this._persistedSize.restore(), + i = Math.ceil(4.3 * this.getLayoutInfo().itemHeight); + t && t.height < i && this._persistedSize.store(t.with(void 0, i)) + } + isFrozen() { + return 4 === this._state + } + _afterRender(e) { + null !== e ? 2 !== this._state && 1 !== this._state && (this._isDetailsVisible() && + this._details.show(), this._positionDetails()) : this._isDetailsVisible() && + this._details.hide() + } + _layout(e) { + var t, i, n; + if (!this.editor.hasModel()) return; + if (!this.editor.getDomNode()) return; + const o = he.D6(document.body), + r = this.getLayoutInfo(); + e || (e = r.defaultSize); + let s = e.height, + a = e.width; + if (this._status.element.style.lineHeight = `${r.itemHeight}px`, 2 === + this._state || 1 === this._state) s = r.itemHeight + r.borderHeight, + a = r.defaultSize.width / 2, this.element.enableSashes(!1, !1, !1, ! + 1), this.element.minSize = this.element.maxSize = new he.Ro(a, s), + this._contentWidget.setPreference(2); + else { + const l = o.width - r.borderHeight - 2 * r.horizontalPadding; + a > l && (a = l); + const d = this._completionModel ? this._completionModel.stats.pLabelLen * + r.typicalHalfwidthCharacterWidth : a, + c = r.statusBarHeight + this._list.contentHeight + r.borderHeight, + h = r.itemHeight + r.statusBarHeight, + u = he.i(this.editor.getDomNode()), + g = this.editor.getScrolledVisiblePosition(this.editor.getPosition()), + p = u.top + g.top + g.height, + m = Math.min(o.height - p - r.verticalPadding, c), + f = u.top + g.top - r.verticalPadding, + _ = Math.min(f, c); + let b = Math.min(Math.max(_, m) + r.borderHeight, c); + s === (null === (t = this._cappedHeight) || void 0 === t ? void 0 : + t.capped) && (s = this._cappedHeight.wanted), s < h && (s = h), s > + b && (s = b); + const v = 150; + s > m || this._forceRenderingAbove && f > v ? (this._contentWidget.setPreference( + 1), this.element.enableSashes(!0, !0, !1, !1), b = _) : (this._contentWidget + .setPreference(2), this.element.enableSashes(!1, !0, !0, !1), b = + m), this.element.preferredSize = new he.Ro(d, r.defaultSize.height), + this.element.maxSize = new he.Ro(l, b), this.element.minSize = new he + .Ro(220, h), this._cappedHeight = s === c ? { + wanted: null !== (n = null === (i = this._cappedHeight) || void 0 === + i ? void 0 : i.wanted) && void 0 !== n ? n : e.height, + capped: s + } : void 0 + } + this._resize(a, s) + } + _resize(e, t) { + const { + width: i, + height: n + } = this.element.maxSize; + e = Math.min(i, e), t = Math.min(n, t); + const { + statusBarHeight: o + } = this.getLayoutInfo(); + this._list.layout(t - o, e), this._listElement.style.height = t - o + + "px", this.element.layout(t, e), this._contentWidget.layout(), this._positionDetails() + } + _positionDetails() { + this._isDetailsVisible() && this._details.placeAtAnchor(this.element.domNode) + } + getLayoutInfo() { + const e = this.editor.getOption(42), + t = (0, Ze.u)(this.editor.getOption(108) || e.lineHeight, 8, 1e3), + i = this.editor.getOption(106).showStatusBar && 2 !== this._state && + 1 !== this._state ? t : 0, + n = this._details.widget.borderWidth, + o = 2 * n; + return { + itemHeight: t, + statusBarHeight: i, + borderWidth: n, + borderHeight: o, + typicalHalfwidthCharacterWidth: e.typicalHalfwidthCharacterWidth, + verticalPadding: 22, + horizontalPadding: 14, + defaultSize: new he.Ro(430, i + 12 * t + o) + } + } + _isDetailsVisible() { + return this._storageService.getBoolean("expandSuggestionDocs", 0, !1) + } + _setDetailsVisible(e) { + this._storageService.store("expandSuggestionDocs", e, 0, 0) + } + forceRenderingAbove() { + this._forceRenderingAbove || (this._forceRenderingAbove = !0, this._layout( + this._persistedSize.restore())) + } + stopForceRenderingAbove() { + this._forceRenderingAbove = !1 + } + }; + rt.LOADING_MESSAGE = D.N("suggestWidget.loading", "Loading..."), rt.NO_SUGGESTIONS_MESSAGE = + D.N("suggestWidget.noSuggestions", "No suggestions."), rt = function(e, + t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([Ge(1, f.Uy), Ge(2, I.i6), Ge(3, pe.XE), Ge(4, v.TG)], rt); + class st { + constructor(e, t) { + this._widget = e, this._editor = t, this.allowEditorOverflow = !0, + this.suppressMouseDown = !1, this._preferenceLocked = !1, this._added = ! + 1, this._hidden = !1 + } + dispose() { + this._added && (this._added = !1, this._editor.removeContentWidget( + this)) + } + getId() { + return "editor.widget.suggestWidget" + } + getDomNode() { + return this._widget.element.domNode + } + show() { + this._hidden = !1, this._added || (this._added = !0, this._editor.addContentWidget( + this)) + } + hide() { + this._hidden || (this._hidden = !0, this.layout()) + } + layout() { + this._editor.layoutContentWidget(this) + } + getPosition() { + return !this._hidden && this._position && this._preference ? { + position: this._position, + preference: [this._preference] + } : null + } + beforeRender() { + const { + height: e, + width: t + } = this._widget.element.size, { + borderWidth: i, + horizontalPadding: n + } = this._widget.getLayoutInfo(); + return new he.Ro(t + 2 * i + n, e + 2 * i) + } + afterRender(e) { + this._widget._afterRender(e) + } + setPreference(e) { + this._preferenceLocked || (this._preference = e) + } + lockPreference() { + this._preferenceLocked = !0 + } + unlockPreference() { + this._preferenceLocked = !1 + } + setPosition(e) { + this._position = e + } + }(0, pe.Ic)(((e, t) => { + const i = e.getColor(it); + i && t.addRule( + `.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${i}; }` + ); + const n = e.getColor(nt); + i && t.addRule( + `.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight { color: ${n}; }` + ); + const o = e.getColor(Xe); + o && t.addRule( + `.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${o}; }` + ); + const r = e.getColor(Je); + r && t.addRule( + `.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused { color: ${r}; }` + ); + const s = e.getColor(et); + s && t.addRule( + `.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon { color: ${s}; }` + ); + const a = e.getColor(me.ur); + a && t.addRule(`.monaco-editor .suggest-details a { color: ${a}; }`); + const l = e.getColor(me.sg); + l && t.addRule( + `.monaco-editor .suggest-details a:hover { color: ${l}; }`); + const d = e.getColor(me.Sw); + d && t.addRule( + `.monaco-editor .suggest-details code { background-color: ${d}; }`) + })); + let at = class e { + constructor(t, i) { + this._editor = t, this._enabled = !1, this._ckAtEnd = e.AtEnd.bindTo( + i), this._configListener = this._editor.onDidChangeConfiguration((e => + e.hasChanged(111) && this._update())), this._update() + } + dispose() { + var e; + this._configListener.dispose(), null === (e = this._selectionListener) || + void 0 === e || e.dispose(), this._ckAtEnd.reset() + } + _update() { + const e = "on" === this._editor.getOption(111); + if (this._enabled !== e) + if (this._enabled = e, this._enabled) { + const e = () => { + if (!this._editor.hasModel()) return void this._ckAtEnd.set(!1); + const e = this._editor.getModel(), + t = this._editor.getSelection(), + i = e.getWordAtPosition(t.getStartPosition()); + i ? this._ckAtEnd.set(i.endColumn === t.getStartPosition().column) : + this._ckAtEnd.set(!1) + }; + this._selectionListener = this._editor.onDidChangeCursorSelection(e), + e() + } else this._selectionListener && (this._ckAtEnd.reset(), this._selectionListener + .dispose(), this._selectionListener = void 0) + } + }; + at.AtEnd = new I.uy("atEndOfWord", !1), at = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([function(e, t) { + return function(i, n) { + t(i, n, e) + } + }(1, I.i6)], at); + var lt = i(8401), + dt = i(4906); + class ct { + constructor(e, t, i) { + this._disposables = new a.SL, this._disposables.add(t.onDidShow((() => + this._onItem(t.getFocusedItem())))), this._disposables.add(t.onDidFocus( + this._onItem, this)), this._disposables.add(t.onDidHide(this.reset, + this)), this._disposables.add(e.onWillType((n => { + if (this._active && !t.isFrozen()) { + const t = n.charCodeAt(n.length - 1); + this._active.acceptCharacters.has(t) && e.getOption(0) && i(this + ._active.item) + } + }))) + } + _onItem(e) { + if (!e || !(0, o.Of)(e.item.completion.commitCharacters)) return void this + .reset(); + if (this._active && this._active.item.item === e.item) return; + const t = new dt.q; + for (const i of e.item.completion.commitCharacters) i.length > 0 && t.add( + i.charCodeAt(0)); + this._active = { + acceptCharacters: t, + item: e + } + } + reset() { + this._active = void 0 + } + dispose() { + this._disposables.dispose() + } + } + class ht { + constructor(e, t) { + this._disposables = new a.SL, this._lastOvertyped = [], this._empty = ! + 0, this._disposables.add(e.onWillType((() => { + if (!this._empty) return; + if (!e.hasModel()) return; + const t = e.getSelections(), + i = t.length; + let n = !1; + for (let e = 0; e < i; e++) + if (!t[e].isEmpty()) { + n = !0; + break + } + if (!n) return; + this._lastOvertyped = []; + const o = e.getModel(); + for (let e = 0; e < i; e++) { + const i = t[e]; + if (o.getValueLengthInRange(i) > ht._maxSelectionLength) return; + this._lastOvertyped[e] = { + value: o.getValueInRange(i), + multiline: i.startLineNumber !== i.endLineNumber + } + } + this._empty = !1 + }))), this._disposables.add(t.onDidCancel((e => { + this._empty || e.retrigger || (this._empty = !0) + }))) + } + getLastOvertypedInfo(e) { + if (!this._empty && e >= 0 && e < this._lastOvertyped.length) return + this._lastOvertyped[e] + } + dispose() { + this._disposables.dispose() + } + } + ht._maxSelectionLength = 51200; + var ut = i(187), + gt = i(1432), + pt = i(4013), + mt = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + class ft { + constructor(e, t) { + if (this._model = e, this._position = t, e.getLineMaxColumn(t.lineNumber) !== + t.column) { + const i = e.getOffsetAt(t), + n = e.getPositionAt(i + 1); + this._marker = e.deltaDecorations([], [{ + range: h.e.fromPositions(t, n), + options: { + description: "suggest-line-suffix", + stickiness: 1 + } + }]) + } + } + dispose() { + this._marker && !this._model.isDisposed() && this._model.deltaDecorations( + this._marker, []) + } + delta(e) { + if (this._model.isDisposed() || this._position.lineNumber !== e.lineNumber) + return 0; + if (this._marker) { + const t = this._model.getDecorationRange(this._marker[0]); + return this._model.getOffsetAt(t.getStartPosition()) - this._model.getOffsetAt( + e) + } + return this._model.getLineMaxColumn(e.lineNumber) - e.column + } + } + let _t = class e { + constructor(e, t, i, n, o, r) { + this._memoryService = t, this._commandService = i, this._contextKeyService = + n, this._instantiationService = o, this._logService = r, this._lineSuffix = + new a.XK, this._toDispose = new a.SL, this.editor = e, this.model = + o.createInstance(Y, this.editor); + const l = M._y.InsertMode.bindTo(n); + l.set(e.getOption(106).insertMode), this.model.onDidTrigger((() => l.set( + e.getOption(106).insertMode))), this.widget = this._toDispose.add( + new b.Ue((() => { + const e = this._instantiationService.createInstance(rt, this.editor); + this._toDispose.add(e), this._toDispose.add(e.onDidSelect((e => + this._insertSuggestion(e, 0)), this)); + const t = new ct(this.editor, e, (e => this._insertSuggestion(e, + 2))); + this._toDispose.add(t), this._toDispose.add(this.model.onDidSuggest( + (e => { + 0 === e.completionModel.items.length && t.reset() + }))); + const i = M._y.MakesTextEdit.bindTo(this._contextKeyService), + n = M._y.HasInsertAndReplaceRange.bindTo(this._contextKeyService), + o = M._y.CanResolve.bindTo(this._contextKeyService); + return this._toDispose.add((0, a.OF)((() => { + i.reset(), n.reset(), o.reset() + }))), this._toDispose.add(e.onDidFocus((({ + item: e + }) => { + const t = this.editor.getPosition(), + r = e.editStart.column, + s = t.column; + let a = !0; + "smart" !== this.editor.getOption(1) || 2 !== this.model.state || + e.completion.command || e.completion.additionalTextEdits || + 4 & e.completion.insertTextRules || s - r !== e.completion + .insertText.length || (a = this.editor.getModel().getValueInRange({ + startLineNumber: t.lineNumber, + startColumn: r, + endLineNumber: t.lineNumber, + endColumn: s + }) !== e.completion.insertText), i.set(a), n.set(!ut.L.equals( + e.editInsertEnd, e.editReplaceEnd)), o.set(Boolean(e.provider + .resolveCompletionItem) || Boolean(e.completion.documentation) || + e.completion.detail !== e.completion.label) + }))), this._toDispose.add(e.onDetailsKeyDown((e => { + e.toKeybinding().equals(new s.QC(!0, !1, !1, !1, 33)) || gt + .dz && e.toKeybinding().equals(new s.QC(!1, !1, !1, !0, 33)) ? + e.stopPropagation() : e.toKeybinding().isModifierKey() || + this.editor.focus() + }))), e + }))), this._overtypingCapturer = this._toDispose.add(new b.Ue((() => + this._toDispose.add(new ht(this.editor, this.model))))), this._alternatives = + this._toDispose.add(new b.Ue((() => this._toDispose.add(new A(this.editor, + this._contextKeyService))))), this._toDispose.add(o.createInstance( + at, e)), this._toDispose.add(this.model.onDidTrigger((e => { + this.widget.value.showTriggered(e.auto, e.shy ? 250 : 50), this._lineSuffix + .value = new ft(this.editor.getModel(), e.position) + }))), this._toDispose.add(this.model.onDidSuggest((e => { + if (!e.shy) { + let t = this._memoryService.select(this.editor.getModel(), this + .editor.getPosition(), e.completionModel.items); + this.widget.value.showSuggestions(e.completionModel, t, e.isFrozen, + e.auto) + } + }))), this._toDispose.add(this.model.onDidCancel((e => { + e.retrigger || this.widget.value.hideWidget() + }))), this._toDispose.add(this.editor.onDidBlurEditorWidget((() => { + this.model.cancel(), this.model.clear() + }))); + let d = M._y.AcceptSuggestionsOnEnter.bindTo(n), + c = () => { + const e = this.editor.getOption(1); + d.set("on" === e || "smart" === e) + }; + this._toDispose.add(this.editor.onDidChangeConfiguration((() => c()))), + c() + } + static get(t) { + return t.getContribution(e.ID) + } + dispose() { + this._alternatives.dispose(), this._toDispose.dispose(), this.widget.dispose(), + this.model.dispose(), this._lineSuffix.dispose() + } + _insertSuggestion(e, t) { + if (!e || !e.item) return this._alternatives.value.reset(), this.model + .cancel(), void this.model.clear(); + if (!this.editor.hasModel()) return; + const i = this.editor.getModel(), + n = i.getAlternativeVersionId(), + { + item: o + } = e, + s = [], + a = new V.A; + 1 & t || this.editor.pushUndoStop(); + const d = this.getOverwriteInfo(o, Boolean(8 & t)); + if (this._memoryService.memorize(i, this.editor.getPosition(), o), + Array.isArray(o.completion.additionalTextEdits)) { + const e = l.ZF.capture(this.editor); + this.editor.executeEdits( + "suggestController.additionalTextEdits.sync", o.completion.additionalTextEdits + .map((e => c.h.replace(h.e.lift(e.range), e.text)))), e.restoreRelativeVerticalPositionOfCursor( + this.editor) + } else if (!o.isResolved) { + const e = new pt.G(!0); + let n; + const r = i.onDidChangeContent((e => { + if (e.isFlush) return a.cancel(), void r.dispose(); + for (let t of e.changes) { + const e = h.e.getEndPosition(t.range); + n && !ut.L.isBefore(e, n) || (n = e) + } + })); + let d = t; + t |= 2; + let u = !1, + g = this.editor.onWillType((() => { + g.dispose(), u = !0, 2 & d || this.editor.pushUndoStop() + })); + s.push(o.resolve(a.token).then((() => { + if (!o.completion.additionalTextEdits || a.token.isCancellationRequested) + return !1; + if (n && o.completion.additionalTextEdits.some((e => ut.L.isBefore( + n, h.e.getStartPosition(e.range))))) return !1; + u && this.editor.pushUndoStop(); + const e = l.ZF.capture(this.editor); + return this.editor.executeEdits( + "suggestController.additionalTextEdits.async", o.completion.additionalTextEdits + .map((e => c.h.replace(h.e.lift(e.range), e.text)))), e.restoreRelativeVerticalPositionOfCursor( + this.editor), !u && 2 & d || this.editor.pushUndoStop(), !0 + })).then((t => { + this._logService.trace( + "[suggest] async resolving of edits DONE (ms, applied?)", e.elapsed(), + t), r.dispose(), g.dispose() + }))) + } + let { + insertText: u + } = o.completion; + 4 & o.completion.insertTextRules || (u = p.Yj.escape(u)), g.SnippetController2 + .get(this.editor).insert(u, { + overwriteBefore: d.overwriteBefore, + overwriteAfter: d.overwriteAfter, + undoStopBefore: !1, + undoStopAfter: !1, + adjustWhitespace: !(1 & o.completion.insertTextRules), + clipboardText: e.model.clipboardText, + overtypingCapturer: this._overtypingCapturer.value + }), 2 & t || this.editor.pushUndoStop(), o.completion.command ? o.completion + .command.id === bt.id ? this.model.trigger({ + auto: !0, + shy: !1 + }, !0) : (s.push(this._commandService.executeCommand(o.completion.command + .id, ...o.completion.command.arguments ? [...o.completion.command + .arguments + ] : []).catch(r.dL)), this.model.cancel()) : this.model.cancel(), 4 & + t && this._alternatives.value.set(e, (e => { + for (a.cancel(); i.canUndo();) { + n !== i.getAlternativeVersionId() && i.undo(), this._insertSuggestion( + e, 3 | (8 & t ? 8 : 0)); + break + } + })), this._alertCompletionItem(o), Promise.all(s).finally((() => { + this.model.clear(), a.dispose() + })) + } + getOverwriteInfo(e, t) { + (0, lt.p_)(this.editor.hasModel()); + let i = "replace" === this.editor.getOption(106).insertMode; + t && (i = !i); + const n = e.position.column - e.editStart.column, + o = (i ? e.editReplaceEnd.column : e.editInsertEnd.column) - e.position + .column; + return { + overwriteBefore: n + (this.editor.getPosition().column - e.position.column), + overwriteAfter: o + (this._lineSuffix.value ? this._lineSuffix.value + .delta(this.editor.getPosition()) : 0) + } + } + _alertCompletionItem(e) { + if ((0, o.Of)(e.completion.additionalTextEdits)) { + let t = D.N("aria.alert.snippet", + "Accepting '{0}' made {1} additional edits", e.textLabel, e.completion + .additionalTextEdits.length); + (0, n.Z9)(t) + } + } + triggerSuggest(e) { + this.editor.hasModel() && (this.model.trigger({ + auto: !1, + shy: !1 + }, !1, e), this.editor.revealLine(this.editor.getPosition().lineNumber, + 0), this.editor.focus()) + } + triggerSuggestAndAcceptBest(e) { + if (!this.editor.hasModel()) return; + const t = this.editor.getPosition(), + i = () => { + t.equals(this.editor.getPosition()) && this._commandService.executeCommand( + e.fallback) + }, + n = e => { + if (4 & e.completion.insertTextRules || e.completion.additionalTextEdits) + return !0; + const t = this.editor.getPosition(), + i = e.editStart.column, + n = t.column; + return n - i !== e.completion.insertText.length || this.editor.getModel() + .getValueInRange({ + startLineNumber: t.lineNumber, + startColumn: i, + endLineNumber: t.lineNumber, + endColumn: n + }) !== e.completion.insertText + }; + P.ju.once(this.model.onDidTrigger)((e => { + let t = []; + P.ju.any(this.model.onDidTrigger, this.model.onDidCancel)((() => { + (0, a.B9)(t), i() + }), void 0, t), this.model.onDidSuggest((({ + completionModel: e + }) => { + if ((0, a.B9)(t), 0 === e.items.length) return void i(); + const o = this._memoryService.select(this.editor.getModel(), + this.editor.getPosition(), e.items), + r = e.items[o]; + n(r) ? (this.editor.pushUndoStop(), this._insertSuggestion({ + index: o, + item: r, + model: e + }, 7)) : i() + }), void 0, t) + })), this.model.trigger({ + auto: !1, + shy: !0 + }), this.editor.revealLine(t.lineNumber, 0), this.editor.focus() + } + acceptSelectedSuggestion(e, t) { + const i = this.widget.value.getFocusedItem(); + let n = 0; + e && (n |= 4), t && (n |= 8), this._insertSuggestion(i, n) + } + acceptNextSuggestion() { + this._alternatives.value.next() + } + acceptPrevSuggestion() { + this._alternatives.value.prev() + } + cancelSuggestWidget() { + this.model.cancel(), this.model.clear(), this.widget.value.hideWidget() + } + selectNextSuggestion() { + this.widget.value.selectNext() + } + selectNextPageSuggestion() { + this.widget.value.selectNextPage() + } + selectLastSuggestion() { + this.widget.value.selectLast() + } + selectPrevSuggestion() { + this.widget.value.selectPrevious() + } + selectPrevPageSuggestion() { + this.widget.value.selectPreviousPage() + } + selectFirstSuggestion() { + this.widget.value.selectFirst() + } + toggleSuggestionDetails() { + this.widget.value.toggleDetails() + } + toggleExplainMode() { + this.widget.value.toggleExplainMode() + } + toggleSuggestionFocus() { + this.widget.value.toggleDetailsFocus() + } + resetWidgetSize() { + this.widget.value.resetPersistedSize() + } + forceRenderingAbove() { + this.widget.value.forceRenderingAbove() + } + stopForceRenderingAbove() { + this.widget.isInitialized && this.widget.value.stopForceRenderingAbove() + } + }; + _t.ID = "editor.contrib.suggestController", _t = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([mt(1, N), mt(2, E.H), mt(3, I.i6), mt(4, v.TG), mt(5, q.VZ)], _t); + class bt extends d.R6 { + constructor() { + super({ + id: bt.id, + label: D.N("suggest.trigger.label", "Trigger Suggest"), + alias: "Trigger Suggest", + precondition: I.Ao.and(u.u.writable, u.u.hasCompletionItemProvider), + kbOpts: { + kbExpr: u.u.textInputFocus, + primary: 2058, + secondary: [2087], + mac: { + primary: 266, + secondary: [521, 2087] + }, + weight: 100 + } + }) + } + run(e, t) { + const i = _t.get(t); + i && i.triggerSuggest() + } + } + bt.id = "editor.action.triggerSuggest", (0, d._K)(_t.ID, _t), (0, d.Qr)( + bt); + const vt = 190, + wt = d._l.bindToContribution(_t.get); + (0, d.fK)(new wt({ + id: "acceptSelectedSuggestion", + precondition: M._y.Visible, + handler(e) { + e.acceptSelectedSuggestion(!0, !1) + } + })), T.W.registerKeybindingRule({ + id: "acceptSelectedSuggestion", + when: I.Ao.and(M._y.Visible, u.u.textInputFocus), + primary: 2, + weight: vt + }), T.W.registerKeybindingRule({ + id: "acceptSelectedSuggestion", + when: I.Ao.and(M._y.Visible, u.u.textInputFocus, M._y.AcceptSuggestionsOnEnter, + M._y.MakesTextEdit), + primary: 3, + weight: vt + }), Ne.BH.appendMenuItem(M.GI, { + command: { + id: "acceptSelectedSuggestion", + title: D.N("accept.insert", "Insert") + }, + group: "left", + order: 1, + when: M._y.HasInsertAndReplaceRange.toNegated() + }), Ne.BH.appendMenuItem(M.GI, { + command: { + id: "acceptSelectedSuggestion", + title: D.N("accept.insert", "Insert") + }, + group: "left", + order: 1, + when: I.Ao.and(M._y.HasInsertAndReplaceRange, M._y.InsertMode.isEqualTo( + "insert")) + }), Ne.BH.appendMenuItem(M.GI, { + command: { + id: "acceptSelectedSuggestion", + title: D.N("accept.replace", "Replace") + }, + group: "left", + order: 1, + when: I.Ao.and(M._y.HasInsertAndReplaceRange, M._y.InsertMode.isEqualTo( + "replace")) + }), (0, d.fK)(new wt({ + id: "acceptAlternativeSelectedSuggestion", + precondition: I.Ao.and(M._y.Visible, u.u.textInputFocus), + kbOpts: { + weight: vt, + kbExpr: u.u.textInputFocus, + primary: 1027, + secondary: [1026] + }, + handler(e) { + e.acceptSelectedSuggestion(!1, !0) + }, + menuOpts: [{ + menuId: M.GI, + group: "left", + order: 2, + when: I.Ao.and(M._y.HasInsertAndReplaceRange, M._y.InsertMode.isEqualTo( + "insert")), + title: D.N("accept.replace", "Replace") + }, { + menuId: M.GI, + group: "left", + order: 2, + when: I.Ao.and(M._y.HasInsertAndReplaceRange, M._y.InsertMode.isEqualTo( + "replace")), + title: D.N("accept.insert", "Insert") + }] + })), E.P.registerCommandAlias("acceptSelectedSuggestionOnEnter", + "acceptSelectedSuggestion"), (0, d.fK)(new wt({ + id: "hideSuggestWidget", + precondition: M._y.Visible, + handler: e => e.cancelSuggestWidget(), + kbOpts: { + weight: vt, + kbExpr: u.u.textInputFocus, + primary: 9, + secondary: [1033] + } + })), (0, d.fK)(new wt({ + id: "selectNextSuggestion", + precondition: I.Ao.and(M._y.Visible, M._y.MultipleSuggestions), + handler: e => e.selectNextSuggestion(), + kbOpts: { + weight: vt, + kbExpr: u.u.textInputFocus, + primary: 18, + secondary: [2066], + mac: { + primary: 18, + secondary: [2066, 300] + } + } + })), (0, d.fK)(new wt({ + id: "selectNextPageSuggestion", + precondition: I.Ao.and(M._y.Visible, M._y.MultipleSuggestions), + handler: e => e.selectNextPageSuggestion(), + kbOpts: { + weight: vt, + kbExpr: u.u.textInputFocus, + primary: 12, + secondary: [2060] + } + })), (0, d.fK)(new wt({ + id: "selectLastSuggestion", + precondition: I.Ao.and(M._y.Visible, M._y.MultipleSuggestions), + handler: e => e.selectLastSuggestion() + })), (0, d.fK)(new wt({ + id: "selectPrevSuggestion", + precondition: I.Ao.and(M._y.Visible, M._y.MultipleSuggestions), + handler: e => e.selectPrevSuggestion(), + kbOpts: { + weight: vt, + kbExpr: u.u.textInputFocus, + primary: 16, + secondary: [2064], + mac: { + primary: 16, + secondary: [2064, 302] + } + } + })), (0, d.fK)(new wt({ + id: "selectPrevPageSuggestion", + precondition: I.Ao.and(M._y.Visible, M._y.MultipleSuggestions), + handler: e => e.selectPrevPageSuggestion(), + kbOpts: { + weight: vt, + kbExpr: u.u.textInputFocus, + primary: 11, + secondary: [2059] + } + })), (0, d.fK)(new wt({ + id: "selectFirstSuggestion", + precondition: I.Ao.and(M._y.Visible, M._y.MultipleSuggestions), + handler: e => e.selectFirstSuggestion() + })), (0, d.fK)(new wt({ + id: "toggleSuggestionDetails", + precondition: M._y.Visible, + handler: e => e.toggleSuggestionDetails(), + kbOpts: { + weight: vt, + kbExpr: u.u.textInputFocus, + primary: 2058, + mac: { + primary: 266 + } + }, + menuOpts: [{ + menuId: M.GI, + group: "right", + order: 1, + when: I.Ao.and(M._y.DetailsVisible, M._y.CanResolve), + title: D.N("detail.more", "show less") + }, { + menuId: M.GI, + group: "right", + order: 1, + when: I.Ao.and(M._y.DetailsVisible.toNegated(), M._y.CanResolve), + title: D.N("detail.less", "show more") + }] + })), (0, d.fK)(new wt({ + id: "toggleExplainMode", + precondition: M._y.Visible, + handler: e => e.toggleExplainMode(), + kbOpts: { + weight: 100, + primary: 2133 + } + })), (0, d.fK)(new wt({ + id: "toggleSuggestionFocus", + precondition: M._y.Visible, + handler: e => e.toggleSuggestionFocus(), + kbOpts: { + weight: vt, + kbExpr: u.u.textInputFocus, + primary: 2570, + mac: { + primary: 778 + } + } + })), (0, d.fK)(new wt({ + id: "insertBestCompletion", + precondition: I.Ao.and(u.u.textInputFocus, I.Ao.equals( + "config.editor.tabCompletion", "on"), at.AtEnd, M._y.Visible.toNegated(), + A.OtherSuggestions.toNegated(), g.SnippetController2.InSnippetMode.toNegated() + ), + handler: (e, t) => { + e.triggerSuggestAndAcceptBest((0, lt.Kn)(t) ? Object.assign({ + fallback: "tab" + }, t) : { + fallback: "tab" + }) + }, + kbOpts: { + weight: vt, + primary: 2 + } + })), (0, d.fK)(new wt({ + id: "insertNextSuggestion", + precondition: I.Ao.and(u.u.textInputFocus, I.Ao.equals( + "config.editor.tabCompletion", "on"), A.OtherSuggestions, M._y.Visible + .toNegated(), g.SnippetController2.InSnippetMode.toNegated()), + handler: e => e.acceptNextSuggestion(), + kbOpts: { + weight: vt, + kbExpr: u.u.textInputFocus, + primary: 2 + } + })), (0, d.fK)(new wt({ + id: "insertPrevSuggestion", + precondition: I.Ao.and(u.u.textInputFocus, I.Ao.equals( + "config.editor.tabCompletion", "on"), A.OtherSuggestions, M._y.Visible + .toNegated(), g.SnippetController2.InSnippetMode.toNegated()), + handler: e => e.acceptPrevSuggestion(), + kbOpts: { + weight: vt, + kbExpr: u.u.textInputFocus, + primary: 1026 + } + })), (0, d.Qr)(class extends d.R6 { + constructor() { + super({ + id: "editor.action.resetSuggestSize", + label: D.N("suggest.reset.label", "Reset Suggest Widget Size"), + alias: "Reset Suggest Widget Size", + precondition: void 0 + }) + } + run(e, t) { + _t.get(t).resetWidgetSize() + } + }) + }, + 4954: (e, t, i) => { + "use strict"; + var n = i(3580), + o = i(7781), + r = i(3910), + s = i(3046); + const a = (0, r.P6)("symbolIcon.arrayForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.arrayForeground", + "The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + l = (0, r.P6)("symbolIcon.booleanForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.booleanForeground", + "The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + d = (0, r.P6)("symbolIcon.classForeground", { + dark: "#EE9D28", + light: "#D67E00", + hc: "#EE9D28" + }, (0, n.N)("symbolIcon.classForeground", + "The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + c = (0, r.P6)("symbolIcon.colorForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.colorForeground", + "The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + h = (0, r.P6)("symbolIcon.constantForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.constantForeground", + "The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + u = (0, r.P6)("symbolIcon.constructorForeground", { + dark: "#B180D7", + light: "#652D90", + hc: "#B180D7" + }, (0, n.N)("symbolIcon.constructorForeground", + "The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + g = (0, r.P6)("symbolIcon.enumeratorForeground", { + dark: "#EE9D28", + light: "#D67E00", + hc: "#EE9D28" + }, (0, n.N)("symbolIcon.enumeratorForeground", + "The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + p = (0, r.P6)("symbolIcon.enumeratorMemberForeground", { + dark: "#75BEFF", + light: "#007ACC", + hc: "#75BEFF" + }, (0, n.N)("symbolIcon.enumeratorMemberForeground", + "The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + m = (0, r.P6)("symbolIcon.eventForeground", { + dark: "#EE9D28", + light: "#D67E00", + hc: "#EE9D28" + }, (0, n.N)("symbolIcon.eventForeground", + "The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + f = (0, r.P6)("symbolIcon.fieldForeground", { + dark: "#75BEFF", + light: "#007ACC", + hc: "#75BEFF" + }, (0, n.N)("symbolIcon.fieldForeground", + "The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + _ = (0, r.P6)("symbolIcon.fileForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.fileForeground", + "The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + b = (0, r.P6)("symbolIcon.folderForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.folderForeground", + "The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + v = (0, r.P6)("symbolIcon.functionForeground", { + dark: "#B180D7", + light: "#652D90", + hc: "#B180D7" + }, (0, n.N)("symbolIcon.functionForeground", + "The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + w = (0, r.P6)("symbolIcon.interfaceForeground", { + dark: "#75BEFF", + light: "#007ACC", + hc: "#75BEFF" + }, (0, n.N)("symbolIcon.interfaceForeground", + "The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + C = (0, r.P6)("symbolIcon.keyForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.keyForeground", + "The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + y = (0, r.P6)("symbolIcon.keywordForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.keywordForeground", + "The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + S = (0, r.P6)("symbolIcon.methodForeground", { + dark: "#B180D7", + light: "#652D90", + hc: "#B180D7" + }, (0, n.N)("symbolIcon.methodForeground", + "The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + x = (0, r.P6)("symbolIcon.moduleForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.moduleForeground", + "The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + k = (0, r.P6)("symbolIcon.namespaceForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.namespaceForeground", + "The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + L = (0, r.P6)("symbolIcon.nullForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.nullForeground", + "The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + N = (0, r.P6)("symbolIcon.numberForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.numberForeground", + "The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + D = (0, r.P6)("symbolIcon.objectForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.objectForeground", + "The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + E = (0, r.P6)("symbolIcon.operatorForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.operatorForeground", + "The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + I = (0, r.P6)("symbolIcon.packageForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.packageForeground", + "The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + T = (0, r.P6)("symbolIcon.propertyForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.propertyForeground", + "The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + M = (0, r.P6)("symbolIcon.referenceForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.referenceForeground", + "The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + A = (0, r.P6)("symbolIcon.snippetForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.snippetForeground", + "The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + R = (0, r.P6)("symbolIcon.stringForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.stringForeground", + "The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + O = (0, r.P6)("symbolIcon.structForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.structForeground", + "The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + P = (0, r.P6)("symbolIcon.textForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.textForeground", + "The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + F = (0, r.P6)("symbolIcon.typeParameterForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.typeParameterForeground", + "The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + B = (0, r.P6)("symbolIcon.unitForeground", { + dark: r.dR, + light: r.dR, + hc: r.dR + }, (0, n.N)("symbolIcon.unitForeground", + "The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )), + W = (0, r.P6)("symbolIcon.variableForeground", { + dark: "#75BEFF", + light: "#007ACC", + hc: "#75BEFF" + }, (0, n.N)("symbolIcon.variableForeground", + "The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget." + )); + (0, o.Ic)(((e, t) => { + const i = e.getColor(a); + i && t.addRule(`${s.lA.symbolArray.cssSelector} { color: ${i}; }`); + const n = e.getColor(l); + n && t.addRule(`${s.lA.symbolBoolean.cssSelector} { color: ${n}; }`); + const o = e.getColor(d); + o && t.addRule(`${s.lA.symbolClass.cssSelector} { color: ${o}; }`); + const r = e.getColor(S); + r && t.addRule(`${s.lA.symbolMethod.cssSelector} { color: ${r}; }`); + const z = e.getColor(c); + z && t.addRule(`${s.lA.symbolColor.cssSelector} { color: ${z}; }`); + const V = e.getColor(h); + V && t.addRule(`${s.lA.symbolConstant.cssSelector} { color: ${V}; }`); + const H = e.getColor(u); + H && t.addRule( + `${s.lA.symbolConstructor.cssSelector} { color: ${H}; }`); + const U = e.getColor(g); + U && t.addRule( + `\n\t\t\t${s.lA.symbolValue.cssSelector},${s.lA.symbolEnum.cssSelector} { color: ${U}; }` + ); + const j = e.getColor(p); + j && t.addRule(`${s.lA.symbolEnumMember.cssSelector} { color: ${j}; }`); + const K = e.getColor(m); + K && t.addRule(`${s.lA.symbolEvent.cssSelector} { color: ${K}; }`); + const $ = e.getColor(f); + $ && t.addRule(`${s.lA.symbolField.cssSelector} { color: ${$}; }`); + const q = e.getColor(_); + q && t.addRule(`${s.lA.symbolFile.cssSelector} { color: ${q}; }`); + const Z = e.getColor(b); + Z && t.addRule(`${s.lA.symbolFolder.cssSelector} { color: ${Z}; }`); + const G = e.getColor(v); + G && t.addRule(`${s.lA.symbolFunction.cssSelector} { color: ${G}; }`); + const Y = e.getColor(w); + Y && t.addRule(`${s.lA.symbolInterface.cssSelector} { color: ${Y}; }`); + const Q = e.getColor(C); + Q && t.addRule(`${s.lA.symbolKey.cssSelector} { color: ${Q}; }`); + const X = e.getColor(y); + X && t.addRule(`${s.lA.symbolKeyword.cssSelector} { color: ${X}; }`); + const J = e.getColor(x); + J && t.addRule(`${s.lA.symbolModule.cssSelector} { color: ${J}; }`); + const ee = e.getColor(k); + ee && t.addRule( + `${s.lA.symbolNamespace.cssSelector} { color: ${ee}; }`); + const te = e.getColor(L); + te && t.addRule(`${s.lA.symbolNull.cssSelector} { color: ${te}; }`); + const ie = e.getColor(N); + ie && t.addRule(`${s.lA.symbolNumber.cssSelector} { color: ${ie}; }`); + const ne = e.getColor(D); + ne && t.addRule(`${s.lA.symbolObject.cssSelector} { color: ${ne}; }`); + const oe = e.getColor(E); + oe && t.addRule(`${s.lA.symbolOperator.cssSelector} { color: ${oe}; }`); + const re = e.getColor(I); + re && t.addRule(`${s.lA.symbolPackage.cssSelector} { color: ${re}; }`); + const se = e.getColor(T); + se && t.addRule(`${s.lA.symbolProperty.cssSelector} { color: ${se}; }`); + const ae = e.getColor(M); + ae && t.addRule( + `${s.lA.symbolReference.cssSelector} { color: ${ae}; }`); + const le = e.getColor(A); + le && t.addRule(`${s.lA.symbolSnippet.cssSelector} { color: ${le}; }`); + const de = e.getColor(R); + de && t.addRule(`${s.lA.symbolString.cssSelector} { color: ${de}; }`); + const ce = e.getColor(O); + ce && t.addRule(`${s.lA.symbolStruct.cssSelector} { color: ${ce}; }`); + const he = e.getColor(P); + he && t.addRule(`${s.lA.symbolText.cssSelector} { color: ${he}; }`); + const ue = e.getColor(F); + ue && t.addRule( + `${s.lA.symbolTypeParameter.cssSelector} { color: ${ue}; }`); + const ge = e.getColor(B); + ge && t.addRule(`${s.lA.symbolUnit.cssSelector} { color: ${ge}; }`); + const pe = e.getColor(W); + pe && t.addRule(`${s.lA.symbolVariable.cssSelector} { color: ${pe}; }`) + })) + }, + 9720: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + ToggleTabFocusModeAction: () => a + }); + var n = i(3580), + o = i(6346), + r = i(6830), + s = i(6345); + class a extends r.R6 { + constructor() { + super({ + id: a.ID, + label: n.N({ + key: "toggle.tabMovesFocus", + comment: [ + "Turn on/off use of tab key for moving focus around VS Code" + ] + }, "Toggle Tab Key Moves Focus"), + alias: "Toggle Tab Key Moves Focus", + precondition: void 0, + kbOpts: { + kbExpr: null, + primary: 2091, + mac: { + primary: 1323 + }, + weight: 100 + } + }) + } + run(e, t) { + const i = !s.nG.getTabFocusMode(); + s.nG.setTabFocusMode(i), i ? (0, o.Z9)(n.N("toggle.tabMovesFocus.on", + "Pressing Tab will now move focus to the next focusable element")) : + (0, o.Z9)(n.N("toggle.tabMovesFocus.off", + "Pressing Tab will now insert the tab character")) + } + } + a.ID = "editor.action.toggleTabFocusMode", (0, r.Qr)(a) + }, + 1725: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + UnusualLineTerminatorsDetector: () => h + }); + var n = i(3580), + o = i(5976), + r = i(6830), + s = i(1640), + a = i(8820), + l = i(5935), + d = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const c = "ignoreUnusualLineTerminators"; + let h = class extends o.JT { + constructor(e, t, i) { + super(), this._editor = e, this._dialogService = t, this._codeEditorService = + i, this._config = this._editor.getOption(113), this._register(this._editor + .onDidChangeConfiguration((e => { + e.hasChanged(113) && (this._config = this._editor.getOption(113), + this._checkForUnusualLineTerminators()) + }))), this._register(this._editor.onDidChangeModel((() => { + this._checkForUnusualLineTerminators() + }))), this._register(this._editor.onDidChangeModelContent((e => { + e.isUndoing || this._checkForUnusualLineTerminators() + }))) + } + _checkForUnusualLineTerminators() { + return e = this, t = void 0, o = function*() { + if ("off" === this._config) return; + if (!this._editor.hasModel()) return; + const e = this._editor.getModel(); + if (!e.mightContainUnusualLineTerminators()) return; + const t = function(e, t) { + return e.getModelProperty(t.uri, c) + }(this._codeEditorService, e); + !0 !== t && (this._editor.getOption(80) || ("auto" !== this._config ? + (yield this._dialogService.confirm({ + title: n.N("unusualLineTerminators.title", + "Unusual Line Terminators"), + message: n.N("unusualLineTerminators.message", + "Detected unusual line terminators"), + detail: n.N("unusualLineTerminators.detail", + "The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.", ( + 0, l.EZ)(e.uri)), + primaryButton: n.N("unusualLineTerminators.fix", + "Remove Unusual Line Terminators"), + secondaryButton: n.N("unusualLineTerminators.ignore", + "Ignore") + })).confirmed ? e.removeUnusualLineTerminators(this._editor.getSelections()) : + function(e, t, i) { + e.setModelProperty(t.uri, c, !0) + }(this._codeEditorService, e) : e.removeUnusualLineTerminators( + this._editor.getSelections()))) + }, new((i = void 0) || (i = Promise))((function(n, r) { + function s(e) { + try { + l(o.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(o.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? n(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((o = o.apply(e, t || [])).next()) + })); + var e, t, i, o + } + }; + h.ID = "editor.contrib.unusualLineTerminatorsDetector", h = function(e, t, + i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([d(1, a.S), d(2, s.$)], h), (0, r._K)(h.ID, h) + }, + 185: (e, t, i) => { + "use strict"; + i.r(t); + var n = i(5393), + o = i(5976), + r = i(6830), + s = i(4101), + a = i(1200), + l = i(5072), + d = i(7781), + c = i(3108), + h = i(7390), + u = i(9510), + g = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let p = class extends o.JT { + constructor(e, t, i, o) { + super(), this._modelService = t, this._themeService = i, this._configurationService = + o, this._editor = e, this._tokenizeViewport = new n.pY((() => this._tokenizeViewportNow()), + 100), this._outstandingRequests = [], this._register(this._editor.onDidScrollChange( + (() => { + this._tokenizeViewport.schedule() + }))), this._register(this._editor.onDidChangeModel((() => { + this._cancelAll(), this._tokenizeViewport.schedule() + }))), this._register(this._editor.onDidChangeModelContent((e => { + this._cancelAll(), this._tokenizeViewport.schedule() + }))), this._register(s.K7.onDidChange((() => { + this._cancelAll(), this._tokenizeViewport.schedule() + }))), this._register(this._configurationService.onDidChangeConfiguration( + (e => { + e.affectsConfiguration(h.e3) && (this._cancelAll(), this._tokenizeViewport + .schedule()) + }))), this._register(this._themeService.onDidColorThemeChange((() => { + this._cancelAll(), this._tokenizeViewport.schedule() + }))) + } + _cancelAll() { + for (const e of this._outstandingRequests) e.cancel(); + this._outstandingRequests = [] + } + _removeOutstandingRequest(e) { + for (let t = 0, i = this._outstandingRequests.length; t < i; t++) + if (this._outstandingRequests[t] === e) return void this._outstandingRequests + .splice(t, 1) + } + _tokenizeViewportNow() { + if (!this._editor.hasModel()) return; + const e = this._editor.getModel(); + if (e.hasCompleteSemanticTokens()) return; + if (!(0, h.tw)(e, this._themeService, this._configurationService)) + return void(e.hasSomeSemanticTokens() && e.setSemanticTokens(null, ! + 1)); + const t = (0, u.St)(e); + if (!t) return void(e.hasSomeSemanticTokens() && e.setSemanticTokens( + null, !1)); + const i = this._modelService.getSemanticTokensProviderStyling(t), + n = this._editor.getVisibleRangesPlusViewportAboveBelow(); + this._outstandingRequests = this._outstandingRequests.concat(n.map((n => + this._requestRange(e, n, t, i)))) + } + _requestRange(e, t, i, o) { + const r = e.getVersionId(), + s = (0, n.PG)((n => Promise.resolve(i.provideDocumentRangeSemanticTokens( + e, t, n)))); + return s.then((i => { + i && !e.isDisposed() && e.getVersionId() === r && e.setPartialSemanticTokens( + t, (0, l.h)(i, o, e.getLanguageIdentifier())) + })).then((() => this._removeOutstandingRequest(s)), (() => this._removeOutstandingRequest( + s))), s + } + }; + p.ID = "editor.contrib.viewportSemanticTokens", p = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([g(1, a.q), g(2, d.XE), g(3, c.Ui)], p), (0, r._K)(p.ID, p) + }, + 3497: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + getOccurrencesAtPosition: () => L + }); + var n = i(3580), + o = i(9488), + r = i(5393), + s = i(1050), + a = i(7301), + l = i(5976), + d = i(6830), + c = i(4314), + h = i(9102), + u = i(4973), + g = i(6281), + p = i(4101), + m = i(8819), + f = i(3910), + _ = i(7781), + b = i(6346); + const v = (0, f.P6)("editor.wordHighlightBackground", { + dark: "#575757B8", + light: "#57575740", + hc: null + }, n.N("wordHighlight", + "Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations." + ), !0), + w = (0, f.P6)("editor.wordHighlightStrongBackground", { + dark: "#004972B8", + light: "#0e639c40", + hc: null + }, n.N("wordHighlightStrong", + "Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations." + ), !0), + C = (0, f.P6)("editor.wordHighlightBorder", { + light: null, + dark: null, + hc: f.xL + }, n.N("wordHighlightBorder", + "Border color of a symbol during read-access, like reading a variable." + )), + y = (0, f.P6)("editor.wordHighlightStrongBorder", { + light: null, + dark: null, + hc: f.xL + }, n.N("wordHighlightStrongBorder", + "Border color of a symbol during write-access, like writing to a variable." + )), + S = (0, f.P6)("editorOverviewRuler.wordHighlightForeground", { + dark: "#A0A0A0CC", + light: "#A0A0A0CC", + hc: "#A0A0A0CC" + }, n.N("overviewRulerWordHighlightForeground", + "Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations." + ), !0), + x = (0, f.P6)("editorOverviewRuler.wordHighlightStrongForeground", { + dark: "#C0A0C0CC", + light: "#C0A0C0CC", + hc: "#C0A0C0CC" + }, n.N("overviewRulerWordHighlightStrongForeground", + "Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations." + ), !0), + k = new m.uy("hasWordHighlights", !1); + + function L(e, t, i) { + const n = p.vH.ordered(e); + return (0, r.Ps)(n.map((n => () => Promise.resolve(n.provideDocumentHighlights( + e, t, i)).then(void 0, a.Cp))), o.Of) + } + class N { + constructor(e, t, i) { + this._wordRange = this._getCurrentWordRange(e, t), this.result = (0, r + .PG)((n => this._compute(e, t, i, n))) + } + _getCurrentWordRange(e, t) { + const i = e.getWordAtPosition(t.getPosition()); + return i ? new c.e(t.startLineNumber, i.startColumn, t.startLineNumber, + i.endColumn) : null + } + isValid(e, t, i) { + const n = t.startLineNumber, + o = t.startColumn, + r = t.endColumn, + s = this._getCurrentWordRange(e, t); + let a = Boolean(this._wordRange && this._wordRange.equalsRange(s)); + for (let t = 0, s = i.length; !a && t < s; t++) { + let s = e.getDecorationRange(i[t]); + s && s.startLineNumber === n && s.startColumn <= o && s.endColumn >= + r && (a = !0) + } + return a + } + cancel() { + this.result.cancel() + } + } + class D extends N { + _compute(e, t, i, n) { + return L(e, t.getPosition(), n).then((e => e || [])) + } + } + class E extends N { + constructor(e, t, i) { + super(e, t, i), this._selectionIsEmpty = t.isEmpty() + } + _compute(e, t, i, n) { + return (0, r.Vs)(250, n).then((() => { + if (!t.isEmpty()) return []; + const n = e.getWordAtPosition(t.getPosition()); + return !n || n.word.length > 1e3 ? [] : e.findMatches(n.word, !0, ! + 1, !0, i, !1).map((e => ({ + range: e.range, + kind: p.MY.Text + }))) + })) + } + isValid(e, t, i) { + const n = t.isEmpty(); + return this._selectionIsEmpty === n && super.isValid(e, t, i) + } + }(0, d.sb)("_executeDocumentHighlights", ((e, t) => L(e, t, s.T.None))); + class I { + constructor(e, t) { + this.toUnhook = new l.SL, this.workerRequestTokenId = 0, this.workerRequestCompleted = ! + 1, this.workerRequestValue = [], this.lastCursorPositionChangeTime = + 0, this.renderDecorationsTimer = -1, this.editor = e, this._hasWordHighlights = + k.bindTo(t), this._ignorePositionChangeEvent = !1, this.occurrencesHighlight = + this.editor.getOption(71), this.model = this.editor.getModel(), this.toUnhook + .add(e.onDidChangeCursorPosition((e => { + this._ignorePositionChangeEvent || this.occurrencesHighlight && + this._onPositionChanged(e) + }))), this.toUnhook.add(e.onDidChangeModelContent((e => { + this._stopAll() + }))), this.toUnhook.add(e.onDidChangeConfiguration((e => { + let t = this.editor.getOption(71); + this.occurrencesHighlight !== t && (this.occurrencesHighlight = t, + this._stopAll()) + }))), this._decorationIds = [], this.workerRequestTokenId = 0, this.workerRequest = + null, this.workerRequestCompleted = !1, this.lastCursorPositionChangeTime = + 0, this.renderDecorationsTimer = -1 + } + hasDecorations() { + return this._decorationIds.length > 0 + } + restore() { + this.occurrencesHighlight && this._run() + } + _getSortedHighlights() { + return o.kX(this._decorationIds.map((e => this.model.getDecorationRange( + e))).sort(c.e.compareRangesUsingStarts)) + } + moveNext() { + let e = this._getSortedHighlights(), + t = (e.findIndex((e => e.containsPosition(this.editor.getPosition()))) + + 1) % e.length, + i = e[t]; + try { + this._ignorePositionChangeEvent = !0, this.editor.setPosition(i.getStartPosition()), + this.editor.revealRangeInCenterIfOutsideViewport(i); + const n = this._getWord(); + if (n) { + const o = this.editor.getModel().getLineContent(i.startLineNumber); + (0, b.Z9)(`${o}, ${t+1} of ${e.length} for '${n.word}'`) + } + } finally { + this._ignorePositionChangeEvent = !1 + } + } + moveBack() { + let e = this._getSortedHighlights(), + t = (e.findIndex((e => e.containsPosition(this.editor.getPosition()))) - + 1 + e.length) % e.length, + i = e[t]; + try { + this._ignorePositionChangeEvent = !0, this.editor.setPosition(i.getStartPosition()), + this.editor.revealRangeInCenterIfOutsideViewport(i); + const n = this._getWord(); + if (n) { + const o = this.editor.getModel().getLineContent(i.startLineNumber); + (0, b.Z9)(`${o}, ${t+1} of ${e.length} for '${n.word}'`) + } + } finally { + this._ignorePositionChangeEvent = !1 + } + } + _removeDecorations() { + this._decorationIds.length > 0 && (this._decorationIds = this.editor.deltaDecorations( + this._decorationIds, []), this._hasWordHighlights.set(!1)) + } + _stopAll() { + this._removeDecorations(), -1 !== this.renderDecorationsTimer && ( + clearTimeout(this.renderDecorationsTimer), this.renderDecorationsTimer = - + 1), null !== this.workerRequest && (this.workerRequest.cancel(), + this.workerRequest = null), this.workerRequestCompleted || (this.workerRequestTokenId++, + this.workerRequestCompleted = !0) + } + _onPositionChanged(e) { + this.occurrencesHighlight && 3 === e.reason ? this._run() : this._stopAll() + } + _getWord() { + let e = this.editor.getSelection(), + t = e.startLineNumber, + i = e.startColumn; + return this.model.getWordAtPosition({ + lineNumber: t, + column: i + }) + } + _run() { + let e = this.editor.getSelection(); + if (e.startLineNumber !== e.endLineNumber) return void this._stopAll(); + let t = e.startColumn, + i = e.endColumn; + const n = this._getWord(); + if (!n || n.startColumn > t || n.endColumn < i) return void this._stopAll(); + const o = this.workerRequest && this.workerRequest.isValid(this.model, + e, this._decorationIds); + if (this.lastCursorPositionChangeTime = (new Date).getTime(), o) this.workerRequestCompleted && + -1 !== this.renderDecorationsTimer && (clearTimeout(this.renderDecorationsTimer), + this.renderDecorationsTimer = -1, this._beginRenderDecorations()); + else { + this._stopAll(); + let e = ++this.workerRequestTokenId; + this.workerRequestCompleted = !1, this.workerRequest = (r = this.model, + s = this.editor.getSelection(), l = this.editor.getOption(116), p.vH + .has(r) ? new D(r, s, l) : new E(r, s, l)), this.workerRequest.result + .then((t => { + e === this.workerRequestTokenId && (this.workerRequestCompleted = ! + 0, this.workerRequestValue = t || [], this._beginRenderDecorations() + ) + }), a.dL) + } + var r, s, l + } + _beginRenderDecorations() { + let e = (new Date).getTime(), + t = this.lastCursorPositionChangeTime + 250; + e >= t ? (this.renderDecorationsTimer = -1, this.renderDecorations()) : + this.renderDecorationsTimer = setTimeout((() => { + this.renderDecorations() + }), t - e) + } + renderDecorations() { + this.renderDecorationsTimer = -1; + let e = []; + for (const t of this.workerRequestValue) t.range && e.push({ + range: t.range, + options: I._getDecorationOptions(t.kind) + }); + this._decorationIds = this.editor.deltaDecorations(this._decorationIds, + e), this._hasWordHighlights.set(this.hasDecorations()) + } + static _getDecorationOptions(e) { + return e === p.MY.Write ? this._WRITE_OPTIONS : e === p.MY.Text ? this + ._TEXT_OPTIONS : this._REGULAR_OPTIONS + } + dispose() { + this._stopAll(), this.toUnhook.dispose() + } + } + I._WRITE_OPTIONS = g.qx.register({ + description: "word-highlight-strong", + stickiness: 1, + className: "wordHighlightStrong", + overviewRuler: { + color: (0, _.EN)(x), + position: u.sh.Center + } + }), I._TEXT_OPTIONS = g.qx.register({ + description: "selection-highlight", + stickiness: 1, + className: "selectionHighlight", + overviewRuler: { + color: (0, _.EN)(f.SP), + position: u.sh.Center + } + }), I._REGULAR_OPTIONS = g.qx.register({ + description: "word-highlight", + stickiness: 1, + className: "wordHighlight", + overviewRuler: { + color: (0, _.EN)(S), + position: u.sh.Center + } + }); + let T = class e extends l.JT { + constructor(e, t) { + super(), this.wordHighlighter = null; + const i = () => { + e.hasModel() && (this.wordHighlighter = new I(e, t)) + }; + this._register(e.onDidChangeModel((e => { + this.wordHighlighter && (this.wordHighlighter.dispose(), this.wordHighlighter = + null), i() + }))), i() + } + static get(t) { + return t.getContribution(e.ID) + } + saveViewState() { + return !(!this.wordHighlighter || !this.wordHighlighter.hasDecorations()) + } + moveNext() { + this.wordHighlighter && this.wordHighlighter.moveNext() + } + moveBack() { + this.wordHighlighter && this.wordHighlighter.moveBack() + } + restoreViewState(e) { + this.wordHighlighter && e && this.wordHighlighter.restore() + } + dispose() { + this.wordHighlighter && (this.wordHighlighter.dispose(), this.wordHighlighter = + null), super.dispose() + } + }; + var M, A; + T.ID = "editor.contrib.wordHighlighter", T = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(M = 1, A = m.i6, function(e, t) { + A(e, t, M) + })], T); + class R extends d.R6 { + constructor(e, t) { + super(t), this._isNext = e + } + run(e, t) { + const i = T.get(t); + i && (this._isNext ? i.moveNext() : i.moveBack()) + } + } + class O extends d.R6 { + constructor() { + super({ + id: "editor.action.wordHighlight.trigger", + label: n.N("wordHighlight.trigger.label", + "Trigger Symbol Highlight"), + alias: "Trigger Symbol Highlight", + precondition: k.toNegated(), + kbOpts: { + kbExpr: h.u.editorTextFocus, + primary: 0, + weight: 100 + } + }) + } + run(e, t, i) { + const n = T.get(t); + n && n.restoreViewState(!0) + } + }(0, d._K)(T.ID, T), (0, d.Qr)(class extends R { + constructor() { + super(!0, { + id: "editor.action.wordHighlight.next", + label: n.N("wordHighlight.next.label", + "Go to Next Symbol Highlight"), + alias: "Go to Next Symbol Highlight", + precondition: k, + kbOpts: { + kbExpr: h.u.editorTextFocus, + primary: 65, + weight: 100 + } + }) + } + }), (0, d.Qr)(class extends R { + constructor() { + super(!1, { + id: "editor.action.wordHighlight.prev", + label: n.N("wordHighlight.previous.label", + "Go to Previous Symbol Highlight"), + alias: "Go to Previous Symbol Highlight", + precondition: k, + kbOpts: { + kbExpr: h.u.editorTextFocus, + primary: 1089, + weight: 100 + } + }) + } + }), (0, d.Qr)(O), (0, _.Ic)(((e, t) => { + const i = e.getColor(f.Rz); + i && (t.addRule( + `.monaco-editor .focused .selectionHighlight { background-color: ${i}; }` + ), t.addRule( + `.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }` + )); + const n = e.getColor(v); + n && t.addRule( + `.monaco-editor .wordHighlight { background-color: ${n}; }`); + const o = e.getColor(w); + o && t.addRule( + `.monaco-editor .wordHighlightStrong { background-color: ${o}; }`); + const r = e.getColor(f.g_); + r && t.addRule( + `.monaco-editor .selectionHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${r}; box-sizing: border-box; }` + ); + const s = e.getColor(C); + s && t.addRule( + `.monaco-editor .wordHighlight { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; box-sizing: border-box; }` + ); + const a = e.getColor(y); + a && t.addRule( + `.monaco-editor .wordHighlightStrong { border: 1px ${"hc"===e.type?"dashed":"solid"} ${a}; box-sizing: border-box; }` + ) + })) + }, + 9453: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + MoveWordCommand: () => b, + WordLeftCommand: () => v, + WordRightCommand: () => w, + CursorWordStartLeft: () => C, + CursorWordEndLeft: () => y, + CursorWordLeft: () => S, + CursorWordStartLeftSelect: () => x, + CursorWordEndLeftSelect: () => k, + CursorWordLeftSelect: () => L, + CursorWordAccessibilityLeft: () => N, + CursorWordAccessibilityLeftSelect: () => D, + CursorWordStartRight: () => E, + CursorWordEndRight: () => I, + CursorWordRight: () => T, + CursorWordStartRightSelect: () => M, + CursorWordEndRightSelect: () => A, + CursorWordRightSelect: () => R, + CursorWordAccessibilityRight: () => O, + CursorWordAccessibilityRightSelect: () => P, + DeleteWordCommand: () => F, + DeleteWordLeftCommand: () => B, + DeleteWordRightCommand: () => W, + DeleteWordStartLeft: () => z, + DeleteWordEndLeft: () => V, + DeleteWordLeft: () => H, + DeleteWordStartRight: () => U, + DeleteWordEndRight: () => j, + DeleteWordRight: () => K, + DeleteInsideWord: () => $ + }); + var n = i(3580), + o = i(6830), + r = i(1329), + s = i(3181), + a = i(5795), + l = i(9410), + d = i(187), + c = i(4314), + h = i(3860), + u = i(9102), + g = i(1106), + p = i(8819), + m = i(4141), + f = i(3831), + _ = i(9282); + class b extends o._l { + constructor(e) { + super(e), this._inSelectionMode = e.inSelectionMode, this._wordNavigationType = + e.wordNavigationType + } + runEditorCommand(e, t, i) { + if (!t.hasModel()) return; + const n = (0, l.u)(t.getOption(116)), + o = t.getModel(), + r = t.getSelections().map((e => { + const t = new d.L(e.positionLineNumber, e.positionColumn), + i = this._move(n, o, t, this._wordNavigationType); + return this._moveTo(e, i, this._inSelectionMode) + })); + if (o.pushStackElement(), t._getViewModel().setCursorStates( + "moveWordCommand", 3, r.map((e => s.Vi.fromModelSelection(e)))), 1 === + r.length) { + const e = new d.L(r[0].positionLineNumber, r[0].positionColumn); + t.revealPosition(e, 0) + } + } + _moveTo(e, t, i) { + return i ? new h.Y(e.selectionStartLineNumber, e.selectionStartColumn, + t.lineNumber, t.column) : new h.Y(t.lineNumber, t.column, t.lineNumber, + t.column) + } + } + class v extends b { + _move(e, t, i, n) { + return a.w.moveWordLeft(e, t, i, n) + } + } + class w extends b { + _move(e, t, i, n) { + return a.w.moveWordRight(e, t, i, n) + } + } + class C extends v { + constructor() { + super({ + inSelectionMode: !1, + wordNavigationType: 0, + id: "cursorWordStartLeft", + precondition: void 0 + }) + } + } + class y extends v { + constructor() { + super({ + inSelectionMode: !1, + wordNavigationType: 2, + id: "cursorWordEndLeft", + precondition: void 0 + }) + } + } + class S extends v { + constructor() { + var e; + super({ + inSelectionMode: !1, + wordNavigationType: 1, + id: "cursorWordLeft", + precondition: void 0, + kbOpts: { + kbExpr: p.Ao.and(u.u.textInputFocus, null === (e = p.Ao.and(g.U, _ + .c)) || void 0 === e ? void 0 : e.negate()), + primary: 2063, + mac: { + primary: 527 + }, + weight: 100 + } + }) + } + } + class x extends v { + constructor() { + super({ + inSelectionMode: !0, + wordNavigationType: 0, + id: "cursorWordStartLeftSelect", + precondition: void 0 + }) + } + } + class k extends v { + constructor() { + super({ + inSelectionMode: !0, + wordNavigationType: 2, + id: "cursorWordEndLeftSelect", + precondition: void 0 + }) + } + } + class L extends v { + constructor() { + var e; + super({ + inSelectionMode: !0, + wordNavigationType: 1, + id: "cursorWordLeftSelect", + precondition: void 0, + kbOpts: { + kbExpr: p.Ao.and(u.u.textInputFocus, null === (e = p.Ao.and(g.U, _ + .c)) || void 0 === e ? void 0 : e.negate()), + primary: 3087, + mac: { + primary: 1551 + }, + weight: 100 + } + }) + } + } + class N extends v { + constructor() { + super({ + inSelectionMode: !1, + wordNavigationType: 3, + id: "cursorWordAccessibilityLeft", + precondition: void 0 + }) + } + _move(e, t, i, n) { + return super._move((0, l.u)(m.BH.wordSeparators.defaultValue), t, i, n) + } + } + class D extends v { + constructor() { + super({ + inSelectionMode: !0, + wordNavigationType: 3, + id: "cursorWordAccessibilityLeftSelect", + precondition: void 0 + }) + } + _move(e, t, i, n) { + return super._move((0, l.u)(m.BH.wordSeparators.defaultValue), t, i, n) + } + } + class E extends w { + constructor() { + super({ + inSelectionMode: !1, + wordNavigationType: 0, + id: "cursorWordStartRight", + precondition: void 0 + }) + } + } + class I extends w { + constructor() { + var e; + super({ + inSelectionMode: !1, + wordNavigationType: 2, + id: "cursorWordEndRight", + precondition: void 0, + kbOpts: { + kbExpr: p.Ao.and(u.u.textInputFocus, null === (e = p.Ao.and(g.U, _ + .c)) || void 0 === e ? void 0 : e.negate()), + primary: 2065, + mac: { + primary: 529 + }, + weight: 100 + } + }) + } + } + class T extends w { + constructor() { + super({ + inSelectionMode: !1, + wordNavigationType: 2, + id: "cursorWordRight", + precondition: void 0 + }) + } + } + class M extends w { + constructor() { + super({ + inSelectionMode: !0, + wordNavigationType: 0, + id: "cursorWordStartRightSelect", + precondition: void 0 + }) + } + } + class A extends w { + constructor() { + var e; + super({ + inSelectionMode: !0, + wordNavigationType: 2, + id: "cursorWordEndRightSelect", + precondition: void 0, + kbOpts: { + kbExpr: p.Ao.and(u.u.textInputFocus, null === (e = p.Ao.and(g.U, _ + .c)) || void 0 === e ? void 0 : e.negate()), + primary: 3089, + mac: { + primary: 1553 + }, + weight: 100 + } + }) + } + } + class R extends w { + constructor() { + super({ + inSelectionMode: !0, + wordNavigationType: 2, + id: "cursorWordRightSelect", + precondition: void 0 + }) + } + } + class O extends w { + constructor() { + super({ + inSelectionMode: !1, + wordNavigationType: 3, + id: "cursorWordAccessibilityRight", + precondition: void 0 + }) + } + _move(e, t, i, n) { + return super._move((0, l.u)(m.BH.wordSeparators.defaultValue), t, i, n) + } + } + class P extends w { + constructor() { + super({ + inSelectionMode: !0, + wordNavigationType: 3, + id: "cursorWordAccessibilityRightSelect", + precondition: void 0 + }) + } + _move(e, t, i, n) { + return super._move((0, l.u)(m.BH.wordSeparators.defaultValue), t, i, n) + } + } + class F extends o._l { + constructor(e) { + super(e), this._whitespaceHeuristics = e.whitespaceHeuristics, this._wordNavigationType = + e.wordNavigationType + } + runEditorCommand(e, t, i) { + if (!t.hasModel()) return; + const n = (0, l.u)(t.getOption(116)), + o = t.getModel(), + s = t.getSelections(), + a = t.getOption(5), + d = t.getOption(8), + c = f.zu.getAutoClosingPairs(o.getLanguageIdentifier().id), + h = t._getViewModel(), + u = s.map((e => { + const i = this._delete({ + wordSeparators: n, + model: o, + selection: e, + whitespaceHeuristics: this._whitespaceHeuristics, + autoClosingDelete: t.getOption(6), + autoClosingBrackets: a, + autoClosingQuotes: d, + autoClosingPairs: c, + autoClosedCharacters: h.getCursorAutoClosedCharacters() + }, this._wordNavigationType); + return new r.T4(i, "") + })); + t.pushUndoStop(), t.executeCommands(this.id, u), t.pushUndoStop() + } + } + class B extends F { + _delete(e, t) { + return a.w.deleteWordLeft(e, t) || new c.e(1, 1, 1, 1) + } + } + class W extends F { + _delete(e, t) { + let i = a.w.deleteWordRight(e, t); + if (i) return i; + const n = e.model.getLineCount(), + o = e.model.getLineMaxColumn(n); + return new c.e(n, o, n, o) + } + } + class z extends B { + constructor() { + super({ + whitespaceHeuristics: !1, + wordNavigationType: 0, + id: "deleteWordStartLeft", + precondition: u.u.writable + }) + } + } + class V extends B { + constructor() { + super({ + whitespaceHeuristics: !1, + wordNavigationType: 2, + id: "deleteWordEndLeft", + precondition: u.u.writable + }) + } + } + class H extends B { + constructor() { + super({ + whitespaceHeuristics: !0, + wordNavigationType: 0, + id: "deleteWordLeft", + precondition: u.u.writable, + kbOpts: { + kbExpr: u.u.textInputFocus, + primary: 2049, + mac: { + primary: 513 + }, + weight: 100 + } + }) + } + } + class U extends W { + constructor() { + super({ + whitespaceHeuristics: !1, + wordNavigationType: 0, + id: "deleteWordStartRight", + precondition: u.u.writable + }) + } + } + class j extends W { + constructor() { + super({ + whitespaceHeuristics: !1, + wordNavigationType: 2, + id: "deleteWordEndRight", + precondition: u.u.writable + }) + } + } + class K extends W { + constructor() { + super({ + whitespaceHeuristics: !0, + wordNavigationType: 2, + id: "deleteWordRight", + precondition: u.u.writable, + kbOpts: { + kbExpr: u.u.textInputFocus, + primary: 2068, + mac: { + primary: 532 + }, + weight: 100 + } + }) + } + } + class $ extends o.R6 { + constructor() { + super({ + id: "deleteInsideWord", + precondition: u.u.writable, + label: n.N("deleteInsideWord", "Delete Word"), + alias: "Delete Word" + }) + } + run(e, t, i) { + if (!t.hasModel()) return; + const n = (0, l.u)(t.getOption(116)), + o = t.getModel(), + s = t.getSelections().map((e => { + const t = a.w.deleteInsideWord(n, o, e); + return new r.T4(t, "") + })); + t.pushUndoStop(), t.executeCommands(this.id, s), t.pushUndoStop() + } + }(0, o.fK)(new C), (0, o.fK)(new y), (0, o.fK)(new S), (0, o.fK)(new x), ( + 0, o.fK)(new k), (0, o.fK)(new L), (0, o.fK)(new E), (0, o.fK)(new I), ( + 0, o.fK)(new T), (0, o.fK)(new M), (0, o.fK)(new A), (0, o.fK)(new R), ( + 0, o.fK)(new N), (0, o.fK)(new D), (0, o.fK)(new O), (0, o.fK)(new P), ( + 0, o.fK)(new z), (0, o.fK)(new V), (0, o.fK)(new H), (0, o.fK)(new U), ( + 0, o.fK)(new j), (0, o.fK)(new K), (0, o.Qr)($) + }, + 661: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + DeleteWordPartLeft: () => d, + DeleteWordPartRight: () => c, + WordPartLeftCommand: () => h, + CursorWordPartLeft: () => u, + CursorWordPartLeftSelect: () => g, + WordPartRightCommand: () => p, + CursorWordPartRight: () => m, + CursorWordPartRightSelect: () => f + }); + var n = i(6830), + o = i(5795), + r = i(4314), + s = i(9102), + a = i(9453), + l = i(4565); + class d extends a.DeleteWordCommand { + constructor() { + super({ + whitespaceHeuristics: !0, + wordNavigationType: 0, + id: "deleteWordPartLeft", + precondition: s.u.writable, + kbOpts: { + kbExpr: s.u.textInputFocus, + primary: 0, + mac: { + primary: 769 + }, + weight: 100 + } + }) + } + _delete(e, t) { + return o.L.deleteWordPartLeft(e) || new r.e(1, 1, 1, 1) + } + } + class c extends a.DeleteWordCommand { + constructor() { + super({ + whitespaceHeuristics: !0, + wordNavigationType: 2, + id: "deleteWordPartRight", + precondition: s.u.writable, + kbOpts: { + kbExpr: s.u.textInputFocus, + primary: 0, + mac: { + primary: 788 + }, + weight: 100 + } + }) + } + _delete(e, t) { + let i = o.L.deleteWordPartRight(e); + if (i) return i; + const n = e.model.getLineCount(), + s = e.model.getLineMaxColumn(n); + return new r.e(n, s, n, s) + } + } + class h extends a.MoveWordCommand { + _move(e, t, i, n) { + return o.L.moveWordPartLeft(e, t, i) + } + } + class u extends h { + constructor() { + super({ + inSelectionMode: !1, + wordNavigationType: 0, + id: "cursorWordPartLeft", + precondition: void 0, + kbOpts: { + kbExpr: s.u.textInputFocus, + primary: 0, + mac: { + primary: 783 + }, + weight: 100 + } + }) + } + } + l.P.registerCommandAlias("cursorWordPartStartLeft", "cursorWordPartLeft"); + class g extends h { + constructor() { + super({ + inSelectionMode: !0, + wordNavigationType: 0, + id: "cursorWordPartLeftSelect", + precondition: void 0, + kbOpts: { + kbExpr: s.u.textInputFocus, + primary: 0, + mac: { + primary: 1807 + }, + weight: 100 + } + }) + } + } + l.P.registerCommandAlias("cursorWordPartStartLeftSelect", + "cursorWordPartLeftSelect"); + class p extends a.MoveWordCommand { + _move(e, t, i, n) { + return o.L.moveWordPartRight(e, t, i) + } + } + class m extends p { + constructor() { + super({ + inSelectionMode: !1, + wordNavigationType: 2, + id: "cursorWordPartRight", + precondition: void 0, + kbOpts: { + kbExpr: s.u.textInputFocus, + primary: 0, + mac: { + primary: 785 + }, + weight: 100 + } + }) + } + } + class f extends p { + constructor() { + super({ + inSelectionMode: !0, + wordNavigationType: 2, + id: "cursorWordPartRightSelect", + precondition: void 0, + kbOpts: { + kbExpr: s.u.textInputFocus, + primary: 0, + mac: { + primary: 1809 + }, + weight: 100 + } + }) + } + }(0, n.fK)(new d), (0, n.fK)(new c), (0, n.fK)(new u), (0, n.fK)(new g), ( + 0, n.fK)(new m), (0, n.fK)(new f) + }, + 110: (e, t, i) => { + "use strict"; + i.d(t, { + Emitter: () => _l, + MarkerSeverity: () => vl, + MarkerTag: () => wl, + Range: () => bl, + Uri: () => Cl, + editor: () => yl, + languages: () => Sl + }); + var n, o, r, s, a, l, d, c, h, u, g, p, m, f, _, b, v, w, C, y, S, x, k, + L, N, D, E, I, T, M, A, R, O, P, F, B = i(4141), + W = i(1050), + z = i(4669), + V = i(2258), + H = i(666), + U = i(187), + j = i(4314), + K = i(3860), + $ = i(5600); + ! function(e) { + e[e.Unknown = 0] = "Unknown", e[e.Disabled = 1] = "Disabled", e[e.Enabled = + 2] = "Enabled" + }(n || (n = {})), + function(e) { + e[e.KeepWhitespace = 1] = "KeepWhitespace", e[e.InsertAsSnippet = 4] = + "InsertAsSnippet" + }(o || (o = {})), + function(e) { + e[e.Method = 0] = "Method", e[e.Function = 1] = "Function", e[e.Constructor = + 2] = "Constructor", e[e.Field = 3] = "Field", e[e.Variable = 4] = + "Variable", e[e.Class = 5] = "Class", e[e.Struct = 6] = "Struct", e[e.Interface = + 7] = "Interface", e[e.Module = 8] = "Module", e[e.Property = 9] = + "Property", e[e.Event = 10] = "Event", e[e.Operator = 11] = "Operator", + e[e.Unit = 12] = "Unit", e[e.Value = 13] = "Value", e[e.Constant = 14] = + "Constant", e[e.Enum = 15] = "Enum", e[e.EnumMember = 16] = + "EnumMember", e[e.Keyword = 17] = "Keyword", e[e.Text = 18] = "Text", e[ + e.Color = 19] = "Color", e[e.File = 20] = "File", e[e.Reference = 21] = + "Reference", e[e.Customcolor = 22] = "Customcolor", e[e.Folder = 23] = + "Folder", e[e.TypeParameter = 24] = "TypeParameter", e[e.User = 25] = + "User", e[e.Issue = 26] = "Issue", e[e.Snippet = 27] = "Snippet" + }(r || (r = {})), + function(e) { + e[e.Deprecated = 1] = "Deprecated" + }(s || (s = {})), + function(e) { + e[e.Invoke = 0] = "Invoke", e[e.TriggerCharacter = 1] = + "TriggerCharacter", e[e.TriggerForIncompleteCompletions = 2] = + "TriggerForIncompleteCompletions" + }(a || (a = {})), + function(e) { + e[e.EXACT = 0] = "EXACT", e[e.ABOVE = 1] = "ABOVE", e[e.BELOW = 2] = + "BELOW" + }(l || (l = {})), + function(e) { + e[e.NotSet = 0] = "NotSet", e[e.ContentFlush = 1] = "ContentFlush", e[e.RecoverFromMarkers = + 2] = "RecoverFromMarkers", e[e.Explicit = 3] = "Explicit", e[e.Paste = + 4] = "Paste", e[e.Undo = 5] = "Undo", e[e.Redo = 6] = "Redo" + }(d || (d = {})), + function(e) { + e[e.LF = 1] = "LF", e[e.CRLF = 2] = "CRLF" + }(c || (c = {})), + function(e) { + e[e.Text = 0] = "Text", e[e.Read = 1] = "Read", e[e.Write = 2] = "Write" + }(h || (h = {})), + function(e) { + e[e.None = 0] = "None", e[e.Keep = 1] = "Keep", e[e.Brackets = 2] = + "Brackets", e[e.Advanced = 3] = "Advanced", e[e.Full = 4] = "Full" + }(u || (u = {})), + function(e) { + e[e.acceptSuggestionOnCommitCharacter = 0] = + "acceptSuggestionOnCommitCharacter", e[e.acceptSuggestionOnEnter = 1] = + "acceptSuggestionOnEnter", e[e.accessibilitySupport = 2] = + "accessibilitySupport", e[e.accessibilityPageSize = 3] = + "accessibilityPageSize", e[e.ariaLabel = 4] = "ariaLabel", e[e.autoClosingBrackets = + 5] = "autoClosingBrackets", e[e.autoClosingDelete = 6] = + "autoClosingDelete", e[e.autoClosingOvertype = 7] = + "autoClosingOvertype", e[e.autoClosingQuotes = 8] = "autoClosingQuotes", + e[e.autoIndent = 9] = "autoIndent", e[e.automaticLayout = 10] = + "automaticLayout", e[e.autoSurround = 11] = "autoSurround", e[e.bracketPairColorization = + 12] = "bracketPairColorization", e[e.codeLens = 13] = "codeLens", e[e.codeLensFontFamily = + 14] = "codeLensFontFamily", e[e.codeLensFontSize = 15] = + "codeLensFontSize", e[e.colorDecorators = 16] = "colorDecorators", e[e.columnSelection = + 17] = "columnSelection", e[e.comments = 18] = "comments", e[e.contextmenu = + 19] = "contextmenu", e[e.copyWithSyntaxHighlighting = 20] = + "copyWithSyntaxHighlighting", e[e.cursorBlinking = 21] = + "cursorBlinking", e[e.cursorSmoothCaretAnimation = 22] = + "cursorSmoothCaretAnimation", e[e.cursorStyle = 23] = "cursorStyle", e[ + e.cursorSurroundingLines = 24] = "cursorSurroundingLines", e[e.cursorSurroundingLinesStyle = + 25] = "cursorSurroundingLinesStyle", e[e.cursorWidth = 26] = + "cursorWidth", e[e.disableLayerHinting = 27] = "disableLayerHinting", e[ + e.disableMonospaceOptimizations = 28] = + "disableMonospaceOptimizations", e[e.domReadOnly = 29] = "domReadOnly", + e[e.dragAndDrop = 30] = "dragAndDrop", e[e.emptySelectionClipboard = 31] = + "emptySelectionClipboard", e[e.extraEditorClassName = 32] = + "extraEditorClassName", e[e.fastScrollSensitivity = 33] = + "fastScrollSensitivity", e[e.find = 34] = "find", e[e.fixedOverflowWidgets = + 35] = "fixedOverflowWidgets", e[e.folding = 36] = "folding", e[e.foldingStrategy = + 37] = "foldingStrategy", e[e.foldingHighlight = 38] = + "foldingHighlight", e[e.foldingImportsByDefault = 39] = + "foldingImportsByDefault", e[e.unfoldOnClickAfterEndOfLine = 40] = + "unfoldOnClickAfterEndOfLine", e[e.fontFamily = 41] = "fontFamily", e[e + .fontInfo = 42] = "fontInfo", e[e.fontLigatures = 43] = + "fontLigatures", e[e.fontSize = 44] = "fontSize", e[e.fontWeight = 45] = + "fontWeight", e[e.formatOnPaste = 46] = "formatOnPaste", e[e.formatOnType = + 47] = "formatOnType", e[e.glyphMargin = 48] = "glyphMargin", e[e.gotoLocation = + 49] = "gotoLocation", e[e.hideCursorInOverviewRuler = 50] = + "hideCursorInOverviewRuler", e[e.highlightActiveIndentGuide = 51] = + "highlightActiveIndentGuide", e[e.hover = 52] = "hover", e[e.inDiffEditor = + 53] = "inDiffEditor", e[e.inlineSuggest = 54] = "inlineSuggest", e[e.letterSpacing = + 55] = "letterSpacing", e[e.lightbulb = 56] = "lightbulb", e[e.lineDecorationsWidth = + 57] = "lineDecorationsWidth", e[e.lineHeight = 58] = "lineHeight", e[e + .lineNumbers = 59] = "lineNumbers", e[e.lineNumbersMinChars = 60] = + "lineNumbersMinChars", e[e.linkedEditing = 61] = "linkedEditing", e[e.links = + 62] = "links", e[e.matchBrackets = 63] = "matchBrackets", e[e.minimap = + 64] = "minimap", e[e.mouseStyle = 65] = "mouseStyle", e[e.mouseWheelScrollSensitivity = + 66] = "mouseWheelScrollSensitivity", e[e.mouseWheelZoom = 67] = + "mouseWheelZoom", e[e.multiCursorMergeOverlapping = 68] = + "multiCursorMergeOverlapping", e[e.multiCursorModifier = 69] = + "multiCursorModifier", e[e.multiCursorPaste = 70] = "multiCursorPaste", + e[e.occurrencesHighlight = 71] = "occurrencesHighlight", e[e.overviewRulerBorder = + 72] = "overviewRulerBorder", e[e.overviewRulerLanes = 73] = + "overviewRulerLanes", e[e.padding = 74] = "padding", e[e.parameterHints = + 75] = "parameterHints", e[e.peekWidgetDefaultFocus = 76] = + "peekWidgetDefaultFocus", e[e.definitionLinkOpensInPeek = 77] = + "definitionLinkOpensInPeek", e[e.quickSuggestions = 78] = + "quickSuggestions", e[e.quickSuggestionsDelay = 79] = + "quickSuggestionsDelay", e[e.readOnly = 80] = "readOnly", e[e.renameOnType = + 81] = "renameOnType", e[e.renderControlCharacters = 82] = + "renderControlCharacters", e[e.renderIndentGuides = 83] = + "renderIndentGuides", e[e.renderFinalNewline = 84] = + "renderFinalNewline", e[e.renderLineHighlight = 85] = + "renderLineHighlight", e[e.renderLineHighlightOnlyWhenFocus = 86] = + "renderLineHighlightOnlyWhenFocus", e[e.renderValidationDecorations = + 87] = "renderValidationDecorations", e[e.renderWhitespace = 88] = + "renderWhitespace", e[e.revealHorizontalRightPadding = 89] = + "revealHorizontalRightPadding", e[e.roundedSelection = 90] = + "roundedSelection", e[e.rulers = 91] = "rulers", e[e.scrollbar = 92] = + "scrollbar", e[e.scrollBeyondLastColumn = 93] = + "scrollBeyondLastColumn", e[e.scrollBeyondLastLine = 94] = + "scrollBeyondLastLine", e[e.scrollPredominantAxis = 95] = + "scrollPredominantAxis", e[e.selectionClipboard = 96] = + "selectionClipboard", e[e.selectionHighlight = 97] = + "selectionHighlight", e[e.selectOnLineNumbers = 98] = + "selectOnLineNumbers", e[e.showFoldingControls = 99] = + "showFoldingControls", e[e.showUnused = 100] = "showUnused", e[e.snippetSuggestions = + 101] = "snippetSuggestions", e[e.smartSelect = 102] = "smartSelect", e[ + e.smoothScrolling = 103] = "smoothScrolling", e[e.stickyTabStops = 104] = + "stickyTabStops", e[e.stopRenderingLineAfter = 105] = + "stopRenderingLineAfter", e[e.suggest = 106] = "suggest", e[e.suggestFontSize = + 107] = "suggestFontSize", e[e.suggestLineHeight = 108] = + "suggestLineHeight", e[e.suggestOnTriggerCharacters = 109] = + "suggestOnTriggerCharacters", e[e.suggestSelection = 110] = + "suggestSelection", e[e.tabCompletion = 111] = "tabCompletion", e[e.tabIndex = + 112] = "tabIndex", e[e.unusualLineTerminators = 113] = + "unusualLineTerminators", e[e.useShadowDOM = 114] = "useShadowDOM", e[e + .useTabStops = 115] = "useTabStops", e[e.wordSeparators = 116] = + "wordSeparators", e[e.wordWrap = 117] = "wordWrap", e[e.wordWrapBreakAfterCharacters = + 118] = "wordWrapBreakAfterCharacters", e[e.wordWrapBreakBeforeCharacters = + 119] = "wordWrapBreakBeforeCharacters", e[e.wordWrapColumn = 120] = + "wordWrapColumn", e[e.wordWrapOverride1 = 121] = "wordWrapOverride1", e[ + e.wordWrapOverride2 = 122] = "wordWrapOverride2", e[e.wrappingIndent = + 123] = "wrappingIndent", e[e.wrappingStrategy = 124] = + "wrappingStrategy", e[e.showDeprecated = 125] = "showDeprecated", e[e.inlayHints = + 126] = "inlayHints", e[e.editorClassName = 127] = "editorClassName", e[ + e.pixelRatio = 128] = "pixelRatio", e[e.tabFocusMode = 129] = + "tabFocusMode", e[e.layoutInfo = 130] = "layoutInfo", e[e.wrappingInfo = + 131] = "wrappingInfo" + }(g || (g = {})), + function(e) { + e[e.TextDefined = 0] = "TextDefined", e[e.LF = 1] = "LF", e[e.CRLF = 2] = + "CRLF" + }(p || (p = {})), + function(e) { + e[e.LF = 0] = "LF", e[e.CRLF = 1] = "CRLF" + }(m || (m = {})), + function(e) { + e[e.None = 0] = "None", e[e.Indent = 1] = "Indent", e[e.IndentOutdent = + 2] = "IndentOutdent", e[e.Outdent = 3] = "Outdent" + }(f || (f = {})), + function(e) { + e[e.Other = 0] = "Other", e[e.Type = 1] = "Type", e[e.Parameter = 2] = + "Parameter" + }(_ || (_ = {})), + function(e) { + e[e.Automatic = 0] = "Automatic", e[e.Explicit = 1] = "Explicit" + }(b || (b = {})), + function(e) { + e[e.DependsOnKbLayout = -1] = "DependsOnKbLayout", e[e.Unknown = 0] = + "Unknown", e[e.Backspace = 1] = "Backspace", e[e.Tab = 2] = "Tab", e[e.Enter = + 3] = "Enter", e[e.Shift = 4] = "Shift", e[e.Ctrl = 5] = "Ctrl", e[e.Alt = + 6] = "Alt", e[e.PauseBreak = 7] = "PauseBreak", e[e.CapsLock = 8] = + "CapsLock", e[e.Escape = 9] = "Escape", e[e.Space = 10] = "Space", e[e.PageUp = + 11] = "PageUp", e[e.PageDown = 12] = "PageDown", e[e.End = 13] = "End", + e[e.Home = 14] = "Home", e[e.LeftArrow = 15] = "LeftArrow", e[e.UpArrow = + 16] = "UpArrow", e[e.RightArrow = 17] = "RightArrow", e[e.DownArrow = + 18] = "DownArrow", e[e.Insert = 19] = "Insert", e[e.Delete = 20] = + "Delete", e[e.KEY_0 = 21] = "KEY_0", e[e.KEY_1 = 22] = "KEY_1", e[e.KEY_2 = + 23] = "KEY_2", e[e.KEY_3 = 24] = "KEY_3", e[e.KEY_4 = 25] = "KEY_4", e[ + e.KEY_5 = 26] = "KEY_5", e[e.KEY_6 = 27] = "KEY_6", e[e.KEY_7 = 28] = + "KEY_7", e[e.KEY_8 = 29] = "KEY_8", e[e.KEY_9 = 30] = "KEY_9", e[e.KEY_A = + 31] = "KEY_A", e[e.KEY_B = 32] = "KEY_B", e[e.KEY_C = 33] = "KEY_C", e[ + e.KEY_D = 34] = "KEY_D", e[e.KEY_E = 35] = "KEY_E", e[e.KEY_F = 36] = + "KEY_F", e[e.KEY_G = 37] = "KEY_G", e[e.KEY_H = 38] = "KEY_H", e[e.KEY_I = + 39] = "KEY_I", e[e.KEY_J = 40] = "KEY_J", e[e.KEY_K = 41] = "KEY_K", e[ + e.KEY_L = 42] = "KEY_L", e[e.KEY_M = 43] = "KEY_M", e[e.KEY_N = 44] = + "KEY_N", e[e.KEY_O = 45] = "KEY_O", e[e.KEY_P = 46] = "KEY_P", e[e.KEY_Q = + 47] = "KEY_Q", e[e.KEY_R = 48] = "KEY_R", e[e.KEY_S = 49] = "KEY_S", e[ + e.KEY_T = 50] = "KEY_T", e[e.KEY_U = 51] = "KEY_U", e[e.KEY_V = 52] = + "KEY_V", e[e.KEY_W = 53] = "KEY_W", e[e.KEY_X = 54] = "KEY_X", e[e.KEY_Y = + 55] = "KEY_Y", e[e.KEY_Z = 56] = "KEY_Z", e[e.Meta = 57] = "Meta", e[e + .ContextMenu = 58] = "ContextMenu", e[e.F1 = 59] = "F1", e[e.F2 = 60] = + "F2", e[e.F3 = 61] = "F3", e[e.F4 = 62] = "F4", e[e.F5 = 63] = "F5", e[ + e.F6 = 64] = "F6", e[e.F7 = 65] = "F7", e[e.F8 = 66] = "F8", e[e.F9 = + 67] = "F9", e[e.F10 = 68] = "F10", e[e.F11 = 69] = "F11", e[e.F12 = 70] = + "F12", e[e.F13 = 71] = "F13", e[e.F14 = 72] = "F14", e[e.F15 = 73] = + "F15", e[e.F16 = 74] = "F16", e[e.F17 = 75] = "F17", e[e.F18 = 76] = + "F18", e[e.F19 = 77] = "F19", e[e.NumLock = 78] = "NumLock", e[e.ScrollLock = + 79] = "ScrollLock", e[e.US_SEMICOLON = 80] = "US_SEMICOLON", e[e.US_EQUAL = + 81] = "US_EQUAL", e[e.US_COMMA = 82] = "US_COMMA", e[e.US_MINUS = 83] = + "US_MINUS", e[e.US_DOT = 84] = "US_DOT", e[e.US_SLASH = 85] = + "US_SLASH", e[e.US_BACKTICK = 86] = "US_BACKTICK", e[e.US_OPEN_SQUARE_BRACKET = + 87] = "US_OPEN_SQUARE_BRACKET", e[e.US_BACKSLASH = 88] = + "US_BACKSLASH", e[e.US_CLOSE_SQUARE_BRACKET = 89] = + "US_CLOSE_SQUARE_BRACKET", e[e.US_QUOTE = 90] = "US_QUOTE", e[e.OEM_8 = + 91] = "OEM_8", e[e.OEM_102 = 92] = "OEM_102", e[e.NUMPAD_0 = 93] = + "NUMPAD_0", e[e.NUMPAD_1 = 94] = "NUMPAD_1", e[e.NUMPAD_2 = 95] = + "NUMPAD_2", e[e.NUMPAD_3 = 96] = "NUMPAD_3", e[e.NUMPAD_4 = 97] = + "NUMPAD_4", e[e.NUMPAD_5 = 98] = "NUMPAD_5", e[e.NUMPAD_6 = 99] = + "NUMPAD_6", e[e.NUMPAD_7 = 100] = "NUMPAD_7", e[e.NUMPAD_8 = 101] = + "NUMPAD_8", e[e.NUMPAD_9 = 102] = "NUMPAD_9", e[e.NUMPAD_MULTIPLY = 103] = + "NUMPAD_MULTIPLY", e[e.NUMPAD_ADD = 104] = "NUMPAD_ADD", e[e.NUMPAD_SEPARATOR = + 105] = "NUMPAD_SEPARATOR", e[e.NUMPAD_SUBTRACT = 106] = + "NUMPAD_SUBTRACT", e[e.NUMPAD_DECIMAL = 107] = "NUMPAD_DECIMAL", e[e.NUMPAD_DIVIDE = + 108] = "NUMPAD_DIVIDE", e[e.KEY_IN_COMPOSITION = 109] = + "KEY_IN_COMPOSITION", e[e.ABNT_C1 = 110] = "ABNT_C1", e[e.ABNT_C2 = 111] = + "ABNT_C2", e[e.MAX_VALUE = 112] = "MAX_VALUE" + }(v || (v = {})), + function(e) { + e[e.Hint = 1] = "Hint", e[e.Info = 2] = "Info", e[e.Warning = 4] = + "Warning", e[e.Error = 8] = "Error" + }(w || (w = {})), + function(e) { + e[e.Unnecessary = 1] = "Unnecessary", e[e.Deprecated = 2] = "Deprecated" + }(C || (C = {})), + function(e) { + e[e.Inline = 1] = "Inline", e[e.Gutter = 2] = "Gutter" + }(y || (y = {})), + function(e) { + e[e.UNKNOWN = 0] = "UNKNOWN", e[e.TEXTAREA = 1] = "TEXTAREA", e[e.GUTTER_GLYPH_MARGIN = + 2] = "GUTTER_GLYPH_MARGIN", e[e.GUTTER_LINE_NUMBERS = 3] = + "GUTTER_LINE_NUMBERS", e[e.GUTTER_LINE_DECORATIONS = 4] = + "GUTTER_LINE_DECORATIONS", e[e.GUTTER_VIEW_ZONE = 5] = + "GUTTER_VIEW_ZONE", e[e.CONTENT_TEXT = 6] = "CONTENT_TEXT", e[e.CONTENT_EMPTY = + 7] = "CONTENT_EMPTY", e[e.CONTENT_VIEW_ZONE = 8] = "CONTENT_VIEW_ZONE", + e[e.CONTENT_WIDGET = 9] = "CONTENT_WIDGET", e[e.OVERVIEW_RULER = 10] = + "OVERVIEW_RULER", e[e.SCROLLBAR = 11] = "SCROLLBAR", e[e.OVERLAY_WIDGET = + 12] = "OVERLAY_WIDGET", e[e.OUTSIDE_EDITOR = 13] = "OUTSIDE_EDITOR" + }(S || (S = {})), + function(e) { + e[e.TOP_RIGHT_CORNER = 0] = "TOP_RIGHT_CORNER", e[e.BOTTOM_RIGHT_CORNER = + 1] = "BOTTOM_RIGHT_CORNER", e[e.TOP_CENTER = 2] = "TOP_CENTER" + }(x || (x = {})), + function(e) { + e[e.Left = 1] = "Left", e[e.Center = 2] = "Center", e[e.Right = 4] = + "Right", e[e.Full = 7] = "Full" + }(k || (k = {})), + function(e) { + e[e.Off = 0] = "Off", e[e.On = 1] = "On", e[e.Relative = 2] = "Relative", + e[e.Interval = 3] = "Interval", e[e.Custom = 4] = "Custom" + }(L || (L = {})), + function(e) { + e[e.None = 0] = "None", e[e.Text = 1] = "Text", e[e.Blocks = 2] = + "Blocks" + }(N || (N = {})), + function(e) { + e[e.Smooth = 0] = "Smooth", e[e.Immediate = 1] = "Immediate" + }(D || (D = {})), + function(e) { + e[e.Auto = 1] = "Auto", e[e.Hidden = 2] = "Hidden", e[e.Visible = 3] = + "Visible" + }(E || (E = {})), + function(e) { + e[e.LTR = 0] = "LTR", e[e.RTL = 1] = "RTL" + }(I || (I = {})), + function(e) { + e[e.Invoke = 1] = "Invoke", e[e.TriggerCharacter = 2] = + "TriggerCharacter", e[e.ContentChange = 3] = "ContentChange" + }(T || (T = {})), + function(e) { + e[e.File = 0] = "File", e[e.Module = 1] = "Module", e[e.Namespace = 2] = + "Namespace", e[e.Package = 3] = "Package", e[e.Class = 4] = "Class", e[ + e.Method = 5] = "Method", e[e.Property = 6] = "Property", e[e.Field = + 7] = "Field", e[e.Constructor = 8] = "Constructor", e[e.Enum = 9] = + "Enum", e[e.Interface = 10] = "Interface", e[e.Function = 11] = + "Function", e[e.Variable = 12] = "Variable", e[e.Constant = 13] = + "Constant", e[e.String = 14] = "String", e[e.Number = 15] = "Number", e[ + e.Boolean = 16] = "Boolean", e[e.Array = 17] = "Array", e[e.Object = + 18] = "Object", e[e.Key = 19] = "Key", e[e.Null = 20] = "Null", e[e.EnumMember = + 21] = "EnumMember", e[e.Struct = 22] = "Struct", e[e.Event = 23] = + "Event", e[e.Operator = 24] = "Operator", e[e.TypeParameter = 25] = + "TypeParameter" + }(M || (M = {})), + function(e) { + e[e.Deprecated = 1] = "Deprecated" + }(A || (A = {})), + function(e) { + e[e.Hidden = 0] = "Hidden", e[e.Blink = 1] = "Blink", e[e.Smooth = 2] = + "Smooth", e[e.Phase = 3] = "Phase", e[e.Expand = 4] = "Expand", e[e.Solid = + 5] = "Solid" + }(R || (R = {})), + function(e) { + e[e.Line = 1] = "Line", e[e.Block = 2] = "Block", e[e.Underline = 3] = + "Underline", e[e.LineThin = 4] = "LineThin", e[e.BlockOutline = 5] = + "BlockOutline", e[e.UnderlineThin = 6] = "UnderlineThin" + }(O || (O = {})), + function(e) { + e[e.AlwaysGrowsWhenTypingAtEdges = 0] = "AlwaysGrowsWhenTypingAtEdges", + e[e.NeverGrowsWhenTypingAtEdges = 1] = "NeverGrowsWhenTypingAtEdges", e[ + e.GrowsOnlyWhenTypingBefore = 2] = "GrowsOnlyWhenTypingBefore", e[e.GrowsOnlyWhenTypingAfter = + 3] = "GrowsOnlyWhenTypingAfter" + }(P || (P = {})), + function(e) { + e[e.None = 0] = "None", e[e.Same = 1] = "Same", e[e.Indent = 2] = + "Indent", e[e.DeepIndent = 3] = "DeepIndent" + }(F || (F = {})); + class q { + static chord(e, t) { + return (0, V.gx)(e, t) + } + } + + function Z() { + return { + editor: void 0, + languages: void 0, + CancellationTokenSource: W.A, + Emitter: z.Q5, + KeyCode: v, + KeyMod: q, + Position: U.L, + Range: j.e, + Selection: K.Y, + SelectionDirection: I, + MarkerSeverity: w, + MarkerTag: C, + Uri: H.o, + Token: $.WU + } + } + q.CtrlCmd = 2048, q.Shift = 1024, q.Alt = 512, q.WinCtrl = 256; + var G = i(3379), + Y = i.n(G), + Q = i(7795), + X = i.n(Q), + J = i(569), + ee = i.n(J), + te = i(3565), + ie = i.n(te), + ne = i(9216), + oe = i.n(ne), + re = i(4589), + se = i.n(re), + ae = i(643), + le = {}; + le.styleTagTransform = se(), le.setAttributes = ie(), le.insert = ee().bind( + null, "head"), le.domAPI = X(), le.insertStyleElement = oe(), Y()(ae.Z, + le), ae.Z && ae.Z.locals && ae.Z.locals; + var de, ce = i(1640), + he = i(5321), + ue = i(1741), + ge = i(3702), + pe = i(3897), + me = i(6663), + fe = i(5935), + _e = i(4565); + ! function(e) { + e[e.API = 0] = "API", e[e.USER = 1] = "USER" + }(de || (de = {})); + var be = i(988), + ve = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + we = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + Ce = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + let ye = class { + constructor(e) { + this._commandService = e + } + open(e, t) { + return Ce(this, void 0, void 0, (function*() { + if (!(0, be.xn)(e, me.lg.command)) return !1; + if (!(null == t ? void 0 : t.allowCommands)) return !0; + "string" == typeof e && (e = H.o.parse(e)); + let i = []; + try { + i = (0, pe.Q)(decodeURIComponent(e.query)) + } catch (t) { + try { + i = (0, pe.Q)(e.query) + } catch (e) {} + } + return Array.isArray(i) || (i = [i]), yield this._commandService.executeCommand( + e.path, ...i), !0 + })) + } + }; + ye = ve([we(0, _e.H)], ye); + let Se = class { + constructor(e) { + this._editorService = e + } + open(e, t) { + return Ce(this, void 0, void 0, (function*() { + let i; + "string" == typeof e && (e = H.o.parse(e)); + const n = /^L?(\d+)(?:,(\d+))?/.exec(e.fragment); + return n && (i = { + startLineNumber: parseInt(n[1]), + startColumn: n[2] ? parseInt(n[2]) : 1 + }, e = e.with({ + fragment: "" + })), e.scheme === me.lg.file && (e = (0, fe.AH)(e)), yield this._editorService + .openCodeEditor({ + resource: e, + options: Object.assign({ + selection: i, + context: (null == t ? void 0 : t.fromUserGesture) ? de.USER : de + .API + }, null == t ? void 0 : t.editorOptions) + }, this._editorService.getFocusedCodeEditor(), null == t ? void 0 : + t.openToSide), !0 + })) + } + }; + Se = ve([we(0, ce.$)], Se); + let xe = class { + constructor(e, t) { + this._openers = new ue.S, this._validators = new ue.S, this._resolvers = + new ue.S, this._resolvedUriTargets = new ge.Y9((e => e.with({ + path: null, + fragment: null, + query: null + }).toString())), this._externalOpeners = new ue.S, this._defaultExternalOpener = { + openExternal: e => Ce(this, void 0, void 0, (function*() { + return (0, be.xn)(e, me.lg.http) || (0, be.xn)(e, me.lg.https) ? + he.V3(e) : window.location.href = e, !0 + })) + }, this._openers.push({ + open: (e, t) => Ce(this, void 0, void 0, (function*() { + return !!((null == t ? void 0 : t.openExternal) || (0, be.xn)( + e, me.lg.mailto) || (0, be.xn)(e, me.lg.http) || (0, be.xn) + (e, me.lg.https)) && (yield this._doOpenExternal(e, t), !0) + })) + }), this._openers.push(new ye(t)), this._openers.push(new Se(e)) + } + registerOpener(e) { + return { + dispose: this._openers.unshift(e) + } + } + registerValidator(e) { + return { + dispose: this._validators.push(e) + } + } + registerExternalUriResolver(e) { + return { + dispose: this._resolvers.push(e) + } + } + setDefaultExternalOpener(e) { + this._defaultExternalOpener = e + } + registerExternalOpener(e) { + return { + dispose: this._externalOpeners.push(e) + } + } + open(e, t) { + var i; + return Ce(this, void 0, void 0, (function*() { + const n = "string" == typeof e ? H.o.parse(e) : e, + o = null !== (i = this._resolvedUriTargets.get(n)) && void 0 !== + i ? i : e; + for (const e of this._validators) + if (!(yield e.shouldOpen(o))) return !1; + for (const i of this._openers) + if (yield i.open(e, t)) return !0; + return !1 + })) + } + resolveExternalUri(e, t) { + return Ce(this, void 0, void 0, (function*() { + for (const i of this._resolvers) try { + const n = yield i.resolveExternalUri(e, t); + if (n) return this._resolvedUriTargets.has(n.resolved) || this._resolvedUriTargets + .set(n.resolved, e), n + } catch (e) {} + throw new Error("Could not resolve external URI: " + e.toString()) + })) + } + _doOpenExternal(e, t) { + return Ce(this, void 0, void 0, (function*() { + const i = "string" == typeof e ? H.o.parse(e) : e; + let n, o; + try { + n = (yield this.resolveExternalUri(i, t)).resolved + } catch (e) { + n = i + } + if (o = "string" == typeof e && i.toString() === n.toString() ? e : + encodeURI(n.toString(!0)), null == t ? void 0 : t.allowContributedOpeners + ) { + const e = "string" == typeof(null == t ? void 0 : t.allowContributedOpeners) ? + null == t ? void 0 : t.allowContributedOpeners : void 0; + for (const t of this._externalOpeners) + if (yield t.openExternal(o, { + sourceUri: i, + preferredOpenerId: e + }, W.T.None)) return !0 + } + return this._defaultExternalOpener.openExternal(o, { + sourceUri: i + }, W.T.None) + })) + } + dispose() { + this._validators.clear() + } + }; + xe = ve([we(0, ce.$), we(1, _e.H)], xe); + var ke = i(5146), + Le = i(5976), + Ne = i(6248); + const De = { + followsCaret: !0, + ignoreCharChanges: !0, + alwaysRevealFirst: !0 + }; + class Ee extends Le.JT { + constructor(e, t = {}) { + super(), this._onDidUpdate = this._register(new z.Q5), this._editor = + e, this._options = Ne.jB(t, De, !1), this.disposed = !1, this.nextIdx = - + 1, this.ranges = [], this.ignoreSelectionChange = !1, this.revealFirst = + Boolean(this._options.alwaysRevealFirst), this._register(this._editor + .onDidDispose((() => this.dispose()))), this._register(this._editor + .onDidUpdateDiff((() => this._onDiffUpdated()))), this._options.followsCaret && + this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition( + (e => { + this.ignoreSelectionChange || (this.nextIdx = -1) + }))), this._options.alwaysRevealFirst && this._register(this._editor + .getModifiedEditor().onDidChangeModel((e => { + this.revealFirst = !0 + }))), this._init() + } + _init() { + this._editor.getLineChanges() + } + _onDiffUpdated() { + this._init(), this._compute(this._editor.getLineChanges()), this.revealFirst && + null !== this._editor.getLineChanges() && (this.revealFirst = !1, + this.nextIdx = -1, this.next(1)) + } + _compute(e) { + this.ranges = [], e && e.forEach((e => { + !this._options.ignoreCharChanges && e.charChanges ? e.charChanges + .forEach((e => { + this.ranges.push({ + rhs: !0, + range: new j.e(e.modifiedStartLineNumber, e.modifiedStartColumn, + e.modifiedEndLineNumber, e.modifiedEndColumn) + }) + })) : this.ranges.push({ + rhs: !0, + range: new j.e(e.modifiedStartLineNumber, 1, e.modifiedStartLineNumber, + 1) + }) + })), this.ranges.sort(((e, t) => e.range.getStartPosition().isBeforeOrEqual( + t.range.getStartPosition()) ? -1 : t.range.getStartPosition().isBeforeOrEqual( + e.range.getStartPosition()) ? 1 : 0)), this._onDidUpdate.fire(this) + } + _initIdx(e) { + let t = !1, + i = this._editor.getPosition(); + if (i) { + for (let n = 0, o = this.ranges.length; n < o && !t; n++) { + let o = this.ranges[n].range; + i.isBeforeOrEqual(o.getStartPosition()) && (this.nextIdx = n + (e ? + 0 : -1), t = !0) + } + t || (this.nextIdx = e ? 0 : this.ranges.length - 1), this.nextIdx < + 0 && (this.nextIdx = this.ranges.length - 1) + } else this.nextIdx = 0 + } + _move(e, t) { + if (ke.ok(!this.disposed, + "Illegal State - diff navigator has been disposed"), !this.canNavigate()) + return; - 1 === this.nextIdx ? this._initIdx(e) : e ? (this.nextIdx += + 1, this.nextIdx >= this.ranges.length && (this.nextIdx = 0)) : ( + this.nextIdx -= 1, this.nextIdx < 0 && (this.nextIdx = this.ranges.length - + 1)); + let i = this.ranges[this.nextIdx]; + this.ignoreSelectionChange = !0; + try { + let e = i.range.getStartPosition(); + this._editor.setPosition(e), this._editor.revealPositionInCenter(e, + t) + } finally { + this.ignoreSelectionChange = !1 + } + } + canNavigate() { + return this.ranges && this.ranges.length > 0 + } + next(e = 0) { + this._move(!0, e) + } + previous(e = 0) { + this._move(!1, e) + } + dispose() { + super.dispose(), this.ranges = [], this.disposed = !0 + } + } + var Ie = i(7374), + Te = i(6518), + Me = i(4973), + Ae = i(4101), + Re = i(8111), + Oe = i(469), + Pe = i(1531), + Fe = i(8216), + Be = i(5393), + We = i(7301), + ze = i(1432), + Ve = i(8401); + let He = !1; + + function Ue(e) { + ze.$L && (He || (He = !0, console.warn( + "Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq" + )), console.warn(e.message)) + } + class je { + constructor(e) { + this._workerId = -1, this._handler = e, this._lastSentReq = 0, this._pendingReplies = + Object.create(null) + } + setWorkerId(e) { + this._workerId = e + } + sendMessage(e, t) { + let i = String(++this._lastSentReq); + return new Promise(((n, o) => { + this._pendingReplies[i] = { + resolve: n, + reject: o + }, this._send({ + vsWorker: this._workerId, + req: i, + method: e, + args: t + }) + })) + } + handleMessage(e) { + e && e.vsWorker && (-1 !== this._workerId && e.vsWorker !== this._workerId || + this._handleMessage(e)) + } + _handleMessage(e) { + if (e.seq) { + let t = e; + if (!this._pendingReplies[t.seq]) return void console.warn( + "Got reply to unknown seq"); + let i = this._pendingReplies[t.seq]; + if (delete this._pendingReplies[t.seq], t.err) { + let e = t.err; + return t.err.$isError && (e = new Error, e.name = t.err.name, e.message = + t.err.message, e.stack = t.err.stack), void i.reject(e) + } + return void i.resolve(t.res) + } + let t = e, + i = t.req; + this._handler.handleMessage(t.method, t.args).then((e => { + this._send({ + vsWorker: this._workerId, + seq: i, + res: e, + err: void 0 + }) + }), (e => { + e.detail instanceof Error && (e.detail = (0, We.ri)(e.detail)), + this._send({ + vsWorker: this._workerId, + seq: i, + res: void 0, + err: (0, We.ri)(e) + }) + })) + } + _send(e) { + let t = []; + if (e.req) { + const i = e; + for (let e = 0; e < i.args.length; e++) i.args[e] instanceof ArrayBuffer && + t.push(i.args[e]) + } else { + const i = e; + i.res instanceof ArrayBuffer && t.push(i.res) + } + this._handler.sendMessage(e, t) + } + } + class Ke extends Le.JT { + constructor(e, t, i) { + super(); + let n = null; + this._worker = this._register(e.create( + "vs/base/common/worker/simpleWorker", (e => { + this._protocol.handleMessage(e) + }), (e => { + n && n(e) + }))), this._protocol = new je({ + sendMessage: (e, t) => { + this._worker.postMessage(e, t) + }, + handleMessage: (e, t) => { + if ("function" != typeof i[e]) return Promise.reject(new Error( + "Missing method " + e + " on main thread host.")); + try { + return Promise.resolve(i[e].apply(i, t)) + } catch (e) { + return Promise.reject(e) + } + } + }), this._protocol.setWorkerId(this._worker.getId()); + let o = null; + void 0 !== self.require && "function" == typeof self.require.getConfig ? + o = self.require.getConfig() : void 0 !== self.requirejs && (o = + self.requirejs.s.contexts._.config); + const r = Ve.$E(i); + this._onModuleLoaded = this._protocol.sendMessage("$initialize", [ + this._worker.getId(), JSON.parse(JSON.stringify(o)), t, r + ]); + const s = (e, t) => this._request(e, t); + this._lazyProxy = new Promise(((e, i) => { + n = i, this._onModuleLoaded.then((t => { + e(Ve.IU(t, s)) + }), (e => { + i(e), this._onError("Worker failed to load " + t, e) + })) + })) + } + getProxyObject() { + return this._lazyProxy + } + _request(e, t) { + return new Promise(((i, n) => { + this._onModuleLoaded.then((() => { + this._protocol.sendMessage(e, t).then(i, n) + }), n) + })) + } + _onError(e, t) { + console.error(e), console.info(t) + } + } + var $e; + const qe = null === ($e = window.trustedTypes) || void 0 === $e ? void 0 : + $e.createPolicy("defaultWorkerFactory", { + createScriptURL: e => e + }); + class Ze { + constructor(e, t, i, n, o) { + this.id = t; + const r = function(e, t) { + if (ze.li.MonacoEnvironment) { + if ("function" == typeof ze.li.MonacoEnvironment.getWorker) return + ze.li.MonacoEnvironment.getWorker(e, t); + if ("function" == typeof ze.li.MonacoEnvironment.getWorkerUrl) { + const i = ze.li.MonacoEnvironment.getWorkerUrl(e, t); + return new Worker(qe ? qe.createScriptURL(i) : i, { + name: t + }) + } + } + throw new Error( + "You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker" + ) + }("workerMain.js", i); + "function" == typeof r.then ? this.worker = r : this.worker = Promise.resolve( + r), this.postMessage(e, []), this.worker.then((e => { + e.onmessage = function(e) { + n(e.data) + }, e.onmessageerror = o, "function" == typeof e.addEventListener && + e.addEventListener("error", o) + })) + } + getId() { + return this.id + } + postMessage(e, t) { + this.worker && this.worker.then((i => i.postMessage(e, t))) + } + dispose() { + this.worker && this.worker.then((e => e.terminate())), this.worker = + null + } + } + class Ge { + constructor(e) { + this._label = e, this._webWorkerFailedBeforeError = !1 + } + create(e, t, i) { + let n = ++Ge.LAST_WORKER_ID; + if (this._webWorkerFailedBeforeError) throw this._webWorkerFailedBeforeError; + return new Ze(e, n, this._label || "anonymous" + n, t, (e => { + Ue(e), this._webWorkerFailedBeforeError = e, i(e) + })) + } + } + Ge.LAST_WORKER_ID = 0; + var Ye = i(3831), + Qe = i(2484), + Xe = i(7295); + + function Je(e, t, i, n) { + return new Qe.Hs(e, t, i).ComputeDiff(n) + } + class et { + constructor(e) { + const t = [], + i = []; + for (let n = 0, o = e.length; n < o; n++) t[n] = rt(e[n], 1), i[n] = + st(e[n], 1); + this.lines = e, this._startColumns = t, this._endColumns = i + } + getElements() { + const e = []; + for (let t = 0, i = this.lines.length; t < i; t++) e[t] = this.lines[t] + .substring(this._startColumns[t] - 1, this._endColumns[t] - 1); + return e + } + getStrictElement(e) { + return this.lines[e] + } + getStartLineNumber(e) { + return e + 1 + } + getEndLineNumber(e) { + return e + 1 + } + createCharSequence(e, t, i) { + const n = [], + o = [], + r = []; + let s = 0; + for (let a = t; a <= i; a++) { + const t = this.lines[a], + i = e ? this._startColumns[a] : 1, + l = e ? this._endColumns[a] : t.length + 1; + for (let e = i; e < l; e++) n[s] = t.charCodeAt(e - 1), o[s] = a + 1, + r[s] = e, s++ + } + return new tt(n, o, r) + } + } + class tt { + constructor(e, t, i) { + this._charCodes = e, this._lineNumbers = t, this._columns = i + } + getElements() { + return this._charCodes + } + getStartLineNumber(e) { + return this._lineNumbers[e] + } + getStartColumn(e) { + return this._columns[e] + } + getEndLineNumber(e) { + return this._lineNumbers[e] + } + getEndColumn(e) { + return this._columns[e] + 1 + } + } + class it { + constructor(e, t, i, n, o, r, s, a) { + this.originalStartLineNumber = e, this.originalStartColumn = t, this.originalEndLineNumber = + i, this.originalEndColumn = n, this.modifiedStartLineNumber = o, this + .modifiedStartColumn = r, this.modifiedEndLineNumber = s, this.modifiedEndColumn = + a + } + static createFromDiffChange(e, t, i) { + let n, o, r, s, a, l, d, c; + return 0 === e.originalLength ? (n = 0, o = 0, r = 0, s = 0) : (n = t.getStartLineNumber( + e.originalStart), o = t.getStartColumn(e.originalStart), r = t.getEndLineNumber( + e.originalStart + e.originalLength - 1), s = t.getEndColumn(e.originalStart + + e.originalLength - 1)), 0 === e.modifiedLength ? (a = 0, l = 0, d = + 0, c = 0) : (a = i.getStartLineNumber(e.modifiedStart), l = i.getStartColumn( + e.modifiedStart), d = i.getEndLineNumber(e.modifiedStart + e.modifiedLength - + 1), c = i.getEndColumn(e.modifiedStart + e.modifiedLength - 1)), new it( + n, o, r, s, a, l, d, c) + } + } + class nt { + constructor(e, t, i, n, o) { + this.originalStartLineNumber = e, this.originalEndLineNumber = t, this + .modifiedStartLineNumber = i, this.modifiedEndLineNumber = n, this.charChanges = + o + } + static createFromDiffResult(e, t, i, n, o, r, s) { + let a, l, d, c, h; + if (0 === t.originalLength ? (a = i.getStartLineNumber(t.originalStart) - + 1, l = 0) : (a = i.getStartLineNumber(t.originalStart), l = i.getEndLineNumber( + t.originalStart + t.originalLength - 1)), 0 === t.modifiedLength ? ( + d = n.getStartLineNumber(t.modifiedStart) - 1, c = 0) : (d = n.getStartLineNumber( + t.modifiedStart), c = n.getEndLineNumber(t.modifiedStart + t.modifiedLength - + 1)), r && t.originalLength > 0 && t.originalLength < 20 && t.modifiedLength > + 0 && t.modifiedLength < 20 && o()) { + const r = i.createCharSequence(e, t.originalStart, t.originalStart + + t.originalLength - 1), + a = n.createCharSequence(e, t.modifiedStart, t.modifiedStart + t.modifiedLength - + 1); + let l = Je(r, a, o, !0).changes; + s && (l = function(e) { + if (e.length <= 1) return e; + const t = [e[0]]; + let i = t[0]; + for (let n = 1, o = e.length; n < o; n++) { + const o = e[n], + r = o.originalStart - (i.originalStart + i.originalLength), + s = o.modifiedStart - (i.modifiedStart + i.modifiedLength); + Math.min(r, s) < 3 ? (i.originalLength = o.originalStart + o.originalLength - + i.originalStart, i.modifiedLength = o.modifiedStart + o.modifiedLength - + i.modifiedStart) : (t.push(o), i = o) + } + return t + }(l)), h = []; + for (let e = 0, t = l.length; e < t; e++) h.push(it.createFromDiffChange( + l[e], r, a)) + } + return new nt(a, l, d, c, h) + } + } + class ot { + constructor(e, t, i) { + this.shouldComputeCharChanges = i.shouldComputeCharChanges, this.shouldPostProcessCharChanges = + i.shouldPostProcessCharChanges, this.shouldIgnoreTrimWhitespace = i.shouldIgnoreTrimWhitespace, + this.shouldMakePrettyDiff = i.shouldMakePrettyDiff, this.originalLines = + e, this.modifiedLines = t, this.original = new et(e), this.modified = + new et(t), this.continueLineDiff = at(i.maxComputationTime), this.continueCharDiff = + at(0 === i.maxComputationTime ? 0 : Math.min(i.maxComputationTime, + 5e3)) + } + computeDiff() { + if (1 === this.original.lines.length && 0 === this.original.lines[0].length) + return 1 === this.modified.lines.length && 0 === this.modified.lines[ + 0].length ? { + quitEarly: !1, + changes: [] + } : { + quitEarly: !1, + changes: [{ + originalStartLineNumber: 1, + originalEndLineNumber: 1, + modifiedStartLineNumber: 1, + modifiedEndLineNumber: this.modified.lines.length, + charChanges: [{ + modifiedEndColumn: 0, + modifiedEndLineNumber: 0, + modifiedStartColumn: 0, + modifiedStartLineNumber: 0, + originalEndColumn: 0, + originalEndLineNumber: 0, + originalStartColumn: 0, + originalStartLineNumber: 0 + }] + }] + }; + if (1 === this.modified.lines.length && 0 === this.modified.lines[0].length) + return { + quitEarly: !1, + changes: [{ + originalStartLineNumber: 1, + originalEndLineNumber: this.original.lines.length, + modifiedStartLineNumber: 1, + modifiedEndLineNumber: 1, + charChanges: [{ + modifiedEndColumn: 0, + modifiedEndLineNumber: 0, + modifiedStartColumn: 0, + modifiedStartLineNumber: 0, + originalEndColumn: 0, + originalEndLineNumber: 0, + originalStartColumn: 0, + originalStartLineNumber: 0 + }] + }] + }; + const e = Je(this.original, this.modified, this.continueLineDiff, this + .shouldMakePrettyDiff), + t = e.changes, + i = e.quitEarly; + if (this.shouldIgnoreTrimWhitespace) { + const e = []; + for (let i = 0, n = t.length; i < n; i++) e.push(nt.createFromDiffResult( + this.shouldIgnoreTrimWhitespace, t[i], this.original, this.modified, + this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges + )); + return { + quitEarly: i, + changes: e + } + } + const n = []; + let o = 0, + r = 0; + for (let e = -1, i = t.length; e < i; e++) { + const s = e + 1 < i ? t[e + 1] : null, + a = s ? s.originalStart : this.originalLines.length, + l = s ? s.modifiedStart : this.modifiedLines.length; + for (; o < a && r < l;) { + const e = this.originalLines[o], + t = this.modifiedLines[r]; + if (e !== t) { + { + let i = rt(e, 1), + s = rt(t, 1); + for (; i > 1 && s > 1 && e.charCodeAt(i - 2) === t.charCodeAt(s - + 2);) i--, s--; + (i > 1 || s > 1) && this._pushTrimWhitespaceCharChange(n, o + 1, 1, + i, r + 1, 1, s) + } { + let i = st(e, 1), + s = st(t, 1); + const a = e.length + 1, + l = t.length + 1; + for (; i < a && s < l && e.charCodeAt(i - 1) === e.charCodeAt(s - + 1);) i++, s++; + (i < a || s < l) && this._pushTrimWhitespaceCharChange(n, o + 1, i, + a, r + 1, s, l) + } + } + o++, r++ + } + s && (n.push(nt.createFromDiffResult(this.shouldIgnoreTrimWhitespace, + s, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, + this.shouldPostProcessCharChanges)), o += s.originalLength, r += s + .modifiedLength) + } + return { + quitEarly: i, + changes: n + } + } + _pushTrimWhitespaceCharChange(e, t, i, n, o, r, s) { + if (this._mergeTrimWhitespaceCharChange(e, t, i, n, o, r, s)) return; + let a; + this.shouldComputeCharChanges && (a = [new it(t, i, t, n, o, r, o, s)]), + e.push(new nt(t, t, o, o, a)) + } + _mergeTrimWhitespaceCharChange(e, t, i, n, o, r, s) { + const a = e.length; + if (0 === a) return !1; + const l = e[a - 1]; + return 0 !== l.originalEndLineNumber && 0 !== l.modifiedEndLineNumber && + l.originalEndLineNumber + 1 === t && l.modifiedEndLineNumber + 1 === + o && (l.originalEndLineNumber = t, l.modifiedEndLineNumber = o, this.shouldComputeCharChanges && + l.charChanges && l.charChanges.push(new it(t, i, t, n, o, r, o, s)), ! + 0) + } + } + + function rt(e, t) { + const i = Xe.LC(e); + return -1 === i ? t : i + 1 + } + + function st(e, t) { + const i = Xe.ow(e); + return -1 === i ? t : i + 2 + } + + function at(e) { + if (0 === e) return () => !0; + const t = Date.now(); + return () => Date.now() - t < e + } + var lt = i(3544), + dt = i(7461), + ct = i(4906); + class ht { + constructor(e, t, i) { + const n = new Uint8Array(e * t); + for (let o = 0, r = e * t; o < r; o++) n[o] = i; + this._data = n, this.rows = e, this.cols = t + } + get(e, t) { + return this._data[e * this.cols + t] + } + set(e, t, i) { + this._data[e * this.cols + t] = i + } + } + class ut { + constructor(e) { + let t = 0, + i = 0; + for (let n = 0, o = e.length; n < o; n++) { + let [o, r, s] = e[n]; + r > t && (t = r), o > i && (i = o), s > i && (i = s) + } + t++, i++; + let n = new ht(i, t, 0); + for (let t = 0, i = e.length; t < i; t++) { + let [i, o, r] = e[t]; + n.set(i, o, r) + } + this._states = n, this._maxCharCode = t + } + nextState(e, t) { + return t < 0 || t >= this._maxCharCode ? 0 : this._states.get(e, t) + } + } + let gt = null, + pt = null; + class mt { + static _createLink(e, t, i, n, o) { + let r = o - 1; + do { + const i = t.charCodeAt(r); + if (2 !== e.get(i)) break; + r-- + } while (r > n); + if (n > 0) { + const e = t.charCodeAt(n - 1), + i = t.charCodeAt(r); + (40 === e && 41 === i || 91 === e && 93 === i || 123 === e && 125 === + i) && r-- + } + return { + range: { + startLineNumber: i, + startColumn: n + 1, + endLineNumber: i, + endColumn: r + 2 + }, + url: t.substring(n, r + 1) + } + } + static computeLinks(e, t = function() { + return null === gt && (gt = new ut([ + [1, 104, 2], + [1, 72, 2], + [1, 102, 6], + [1, 70, 6], + [2, 116, 3], + [2, 84, 3], + [3, 116, 4], + [3, 84, 4], + [4, 112, 5], + [4, 80, 5], + [5, 115, 9], + [5, 83, 9], + [5, 58, 10], + [6, 105, 7], + [6, 73, 7], + [7, 108, 8], + [7, 76, 8], + [8, 101, 9], + [8, 69, 9], + [9, 58, 10], + [10, 47, 11], + [11, 47, 12] + ])), gt + }()) { + const i = function() { + if (null === pt) { + pt = new ct.N(0); + const e = " \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…"; + for (let t = 0; t < e.length; t++) pt.set(e.charCodeAt(t), 1); + const t = ".,;"; + for (let e = 0; e < t.length; e++) pt.set(t.charCodeAt(e), 2) + } + return pt + }(); + let n = []; + for (let o = 1, r = e.getLineCount(); o <= r; o++) { + const r = e.getLineContent(o), + s = r.length; + let a = 0, + l = 0, + d = 0, + c = 1, + h = !1, + u = !1, + g = !1, + p = !1; + for (; a < s;) { + let e = !1; + const s = r.charCodeAt(a); + if (13 === c) { + let t; + switch (s) { + case 40: + h = !0, t = 0; + break; + case 41: + t = h ? 0 : 1; + break; + case 91: + g = !0, u = !0, t = 0; + break; + case 93: + g = !1, t = u ? 0 : 1; + break; + case 123: + p = !0, t = 0; + break; + case 125: + t = p ? 0 : 1; + break; + case 39: + t = 34 === d || 96 === d ? 0 : 1; + break; + case 34: + t = 39 === d || 96 === d ? 0 : 1; + break; + case 96: + t = 39 === d || 34 === d ? 0 : 1; + break; + case 42: + t = 42 === d ? 1 : 0; + break; + case 124: + t = 124 === d ? 1 : 0; + break; + case 32: + t = g ? 0 : 1; + break; + default: + t = i.get(s) + } + 1 === t && (n.push(mt._createLink(i, r, o, l, a)), e = !0) + } else if (12 === c) { + let t; + 91 === s ? (u = !0, t = 0) : t = i.get(s), 1 === t ? e = !0 : c = + 13 + } else c = t.nextState(c, s), 0 === c && (e = !0); + e && (c = 1, h = !1, u = !1, p = !1, l = a + 1, d = s), a++ + } + 13 === c && n.push(mt._createLink(i, r, o, l, s)) + } + return n + } + } + class ft { + constructor() { + this._defaultValueSet = [ + ["true", "false"], + ["True", "False"], + ["Private", "Public", "Friend", "ReadOnly", "Partial", "Protected", + "WriteOnly" + ], + ["public", "protected", "private"] + ] + } + navigateValueSet(e, t, i, n, o) { + if (e && t) { + let i = this.doNavigateValueSet(t, o); + if (i) return { + range: e, + value: i + } + } + if (i && n) { + let e = this.doNavigateValueSet(n, o); + if (e) return { + range: i, + value: e + } + } + return null + } + doNavigateValueSet(e, t) { + let i = this.numberReplace(e, t); + return null !== i ? i : this.textReplace(e, t) + } + numberReplace(e, t) { + let i = Math.pow(10, e.length - (e.lastIndexOf(".") + 1)), + n = Number(e), + o = parseFloat(e); + return isNaN(n) || isNaN(o) || n !== o ? null : 0 !== n || t ? (n = + Math.floor(n * i), n += t ? i : -i, String(n / i)) : null + } + textReplace(e, t) { + return this.valueSetsReplace(this._defaultValueSet, e, t) + } + valueSetsReplace(e, t, i) { + let n = null; + for (let o = 0, r = e.length; null === n && o < r; o++) n = this.valueSetReplace( + e[o], t, i); + return n + } + valueSetReplace(e, t, i) { + let n = e.indexOf(t); + return n >= 0 ? (n += i ? 1 : -1, n < 0 ? n = e.length - 1 : n %= e.length, + e[n]) : null + } + } + ft.INSTANCE = new ft; + var _t = i(4013), + bt = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class vt extends class { + constructor(e, t, i, n) { + this._uri = e, this._lines = t, this._eol = i, this._versionId = n, + this._lineStarts = null, this._cachedTextValue = null + } + dispose() { + this._lines.length = 0 + } + get version() { + return this._versionId + } + getText() { + return null === this._cachedTextValue && (this._cachedTextValue = this + ._lines.join(this._eol)), this._cachedTextValue + } + onEvents(e) { + e.eol && e.eol !== this._eol && (this._eol = e.eol, this._lineStarts = + null); + const t = e.changes; + for (const e of t) this._acceptDeleteRange(e.range), this._acceptInsertText( + new U.L(e.range.startLineNumber, e.range.startColumn), e.text); + this._versionId = e.versionId, this._cachedTextValue = null + } + _ensureLineStarts() { + if (!this._lineStarts) { + const e = this._eol.length, + t = this._lines.length, + i = new Uint32Array(t); + for (let n = 0; n < t; n++) i[n] = this._lines[n].length + e; + this._lineStarts = new lt.o(i) + } + } + _setLineText(e, t) { + this._lines[e] = t, this._lineStarts && this._lineStarts.changeValue(e, + this._lines[e].length + this._eol.length) + } + _acceptDeleteRange(e) { + if (e.startLineNumber !== e.endLineNumber) this._setLineText(e.startLineNumber - + 1, this._lines[e.startLineNumber - 1].substring(0, e.startColumn - 1) + + this._lines[e.endLineNumber - 1].substring(e.endColumn - 1)), this._lines + .splice(e.startLineNumber, e.endLineNumber - e.startLineNumber), this + ._lineStarts && this._lineStarts.removeValues(e.startLineNumber, e.endLineNumber - + e.startLineNumber); + else { + if (e.startColumn === e.endColumn) return; + this._setLineText(e.startLineNumber - 1, this._lines[e.startLineNumber - + 1].substring(0, e.startColumn - 1) + this._lines[e.startLineNumber - + 1].substring(e.endColumn - 1)) + } + } + _acceptInsertText(e, t) { + if (0 === t.length) return; + let i = (0, Xe.uq)(t); + if (1 === i.length) return void this._setLineText(e.lineNumber - 1, + this._lines[e.lineNumber - 1].substring(0, e.column - 1) + i[0] + + this._lines[e.lineNumber - 1].substring(e.column - 1)); + i[i.length - 1] += this._lines[e.lineNumber - 1].substring(e.column - + 1), this._setLineText(e.lineNumber - 1, this._lines[e.lineNumber - 1] + .substring(0, e.column - 1) + i[0]); + let n = new Uint32Array(i.length - 1); + for (let t = 1; t < i.length; t++) this._lines.splice(e.lineNumber + t - + 1, 0, i[t]), n[t - 1] = i[t].length + this._eol.length; + this._lineStarts && this._lineStarts.insertValues(e.lineNumber, n) + } + } { + get uri() { + return this._uri + } + get eol() { + return this._eol + } + getValue() { + return this.getText() + } + getLinesContent() { + return this._lines.slice(0) + } + getLineCount() { + return this._lines.length + } + getLineContent(e) { + return this._lines[e - 1] + } + getWordAtPosition(e, t) { + let i = (0, dt.t2)(e.column, (0, dt.eq)(t), this._lines[e.lineNumber - + 1], 0); + return i ? new j.e(e.lineNumber, i.startColumn, e.lineNumber, i.endColumn) : + null + } + words(e) { + const t = this._lines, + i = this._wordenize.bind(this); + let n = 0, + o = "", + r = 0, + s = []; + return { * [Symbol.iterator]() { + for (;;) + if (r < s.length) { + const e = o.substring(s[r].start, s[r].end); + r += 1, yield e + } else { + if (!(n < t.length)) break; + o = t[n], s = i(o, e), r = 0, n += 1 + } + } + } + } + getLineWords(e, t) { + let i = this._lines[e - 1], + n = this._wordenize(i, t), + o = []; + for (const e of n) o.push({ + word: i.substring(e.start, e.end), + startColumn: e.start + 1, + endColumn: e.end + 1 + }); + return o + } + _wordenize(e, t) { + const i = []; + let n; + for (t.lastIndex = 0; + (n = t.exec(e)) && 0 !== n[0].length;) i.push({ + start: n.index, + end: n.index + n[0].length + }); + return i + } + getValueInRange(e) { + if ((e = this._validateRange(e)).startLineNumber === e.endLineNumber) + return this._lines[e.startLineNumber - 1].substring(e.startColumn - 1, + e.endColumn - 1); + let t = this._eol, + i = e.startLineNumber - 1, + n = e.endLineNumber - 1, + o = []; + o.push(this._lines[i].substring(e.startColumn - 1)); + for (let e = i + 1; e < n; e++) o.push(this._lines[e]); + return o.push(this._lines[n].substring(0, e.endColumn - 1)), o.join(t) + } + offsetAt(e) { + return e = this._validatePosition(e), this._ensureLineStarts(), this._lineStarts + .getPrefixSum(e.lineNumber - 2) + (e.column - 1) + } + positionAt(e) { + e = Math.floor(e), e = Math.max(0, e), this._ensureLineStarts(); + let t = this._lineStarts.getIndexOf(e), + i = this._lines[t.index].length; + return { + lineNumber: 1 + t.index, + column: 1 + Math.min(t.remainder, i) + } + } + _validateRange(e) { + const t = this._validatePosition({ + lineNumber: e.startLineNumber, + column: e.startColumn + }), + i = this._validatePosition({ + lineNumber: e.endLineNumber, + column: e.endColumn + }); + return t.lineNumber !== e.startLineNumber || t.column !== e.startColumn || + i.lineNumber !== e.endLineNumber || i.column !== e.endColumn ? { + startLineNumber: t.lineNumber, + startColumn: t.column, + endLineNumber: i.lineNumber, + endColumn: i.column + } : e + } + _validatePosition(e) { + if (!U.L.isIPosition(e)) throw new Error("bad position"); + let { + lineNumber: t, + column: i + } = e, n = !1; + if (t < 1) t = 1, i = 1, n = !0; + else if (t > this._lines.length) t = this._lines.length, i = this._lines[ + t - 1].length + 1, n = !0; + else { + let e = this._lines[t - 1].length + 1; + i < 1 ? (i = 1, n = !0) : i > e && (i = e, n = !0) + } + return n ? { + lineNumber: t, + column: i + } : e + } + } + class wt { + constructor(e, t) { + this._host = e, this._models = Object.create(null), this._foreignModuleFactory = + t, this._foreignModule = null + } + dispose() { + this._models = Object.create(null) + } + _getModel(e) { + return this._models[e] + } + _getModels() { + let e = []; + return Object.keys(this._models).forEach((t => e.push(this._models[t]))), + e + } + acceptNewModel(e) { + this._models[e.url] = new vt(H.o.parse(e.url), e.lines, e.EOL, e.versionId) + } + acceptModelChanged(e, t) { + this._models[e] && this._models[e].onEvents(t) + } + acceptRemovedModel(e) { + this._models[e] && delete this._models[e] + } + computeDiff(e, t, i, n) { + return bt(this, void 0, void 0, (function*() { + const o = this._getModel(e), + r = this._getModel(t); + if (!o || !r) return null; + const s = o.getLinesContent(), + a = r.getLinesContent(), + l = new ot(s, a, { + shouldComputeCharChanges: !0, + shouldPostProcessCharChanges: !0, + shouldIgnoreTrimWhitespace: i, + shouldMakePrettyDiff: !0, + maxComputationTime: n + }).computeDiff(), + d = !(l.changes.length > 0) && this._modelsAreIdentical(o, r); + return { + quitEarly: l.quitEarly, + identical: d, + changes: l.changes + } + })) + } + _modelsAreIdentical(e, t) { + const i = e.getLineCount(); + if (i !== t.getLineCount()) return !1; + for (let n = 1; n <= i; n++) + if (e.getLineContent(n) !== t.getLineContent(n)) return !1; + return !0 + } + computeMoreMinimalEdits(e, t) { + return bt(this, void 0, void 0, (function*() { + const i = this._getModel(e); + if (!i) return t; + const n = []; + let o; + t = t.slice(0).sort(((e, t) => e.range && t.range ? j.e.compareRangesUsingStarts( + e.range, t.range) : (e.range ? 0 : 1) - (t.range ? 0 : 1))); + for (let { + range: e, + text: r, + eol: s + } + of t) { + if ("number" == typeof s && (o = s), j.e.isEmpty(e) && !r) + continue; + const t = i.getValueInRange(e); + if (r = r.replace(/\r\n|\n|\r/g, i.eol), t === r) continue; + if (Math.max(r.length, t.length) > wt._diffLimit) { + n.push({ + range: e, + text: r + }); + continue + } + const a = (0, Qe.a$)(t, r, !1), + l = i.offsetAt(j.e.lift(e).getStartPosition()); + for (const e of a) { + const t = i.positionAt(l + e.originalStart), + o = i.positionAt(l + e.originalStart + e.originalLength), + s = { + text: r.substr(e.modifiedStart, e.modifiedLength), + range: { + startLineNumber: t.lineNumber, + startColumn: t.column, + endLineNumber: o.lineNumber, + endColumn: o.column + } + }; + i.getValueInRange(s.range) !== s.text && n.push(s) + } + } + return "number" == typeof o && n.push({ + eol: o, + text: "", + range: { + startLineNumber: 0, + startColumn: 0, + endLineNumber: 0, + endColumn: 0 + } + }), n + })) + } + computeLinks(e) { + return bt(this, void 0, void 0, (function*() { + let t = this._getModel(e); + return t ? function(e) { + return e && "function" == typeof e.getLineCount && "function" == + typeof e.getLineContent ? mt.computeLinks(e) : [] + }(t) : null + })) + } + textualSuggest(e, t, i, n) { + return bt(this, void 0, void 0, (function*() { + const o = new _t.G(!0), + r = new RegExp(i, n), + s = new Set; + e: for (let i of e) { + const e = this._getModel(i); + if (e) + for (let i of e.words(r)) + if (i !== t && isNaN(Number(i)) && (s.add(i), s.size > wt._suggestionsLimit)) + break e + } + return { + words: Array.from(s), + duration: o.elapsed() + } + })) + } + computeWordRanges(e, t, i, n) { + return bt(this, void 0, void 0, (function*() { + let o = this._getModel(e); + if (!o) return Object.create(null); + const r = new RegExp(i, n), + s = Object.create(null); + for (let e = t.startLineNumber; e < t.endLineNumber; e++) { + let t = o.getLineWords(e, r); + for (const i of t) { + if (!isNaN(Number(i.word))) continue; + let t = s[i.word]; + t || (t = [], s[i.word] = t), t.push({ + startLineNumber: e, + startColumn: i.startColumn, + endLineNumber: e, + endColumn: i.endColumn + }) + } + } + return s + })) + } + navigateValueSet(e, t, i, n, o) { + return bt(this, void 0, void 0, (function*() { + let r = this._getModel(e); + if (!r) return null; + let s = new RegExp(n, o); + t.startColumn === t.endColumn && (t = { + startLineNumber: t.startLineNumber, + startColumn: t.startColumn, + endLineNumber: t.endLineNumber, + endColumn: t.endColumn + 1 + }); + let a = r.getValueInRange(t), + l = r.getWordAtPosition({ + lineNumber: t.startLineNumber, + column: t.startColumn + }, s); + if (!l) return null; + let d = r.getValueInRange(l); + return ft.INSTANCE.navigateValueSet(t, a, l, d, i) + })) + } + loadForeignModule(e, t, i) { + let n = { + host: Ve.IU(i, ((e, t) => this._host.fhr(e, t))), + getMirrorModels: () => this._getModels() + }; + return this._foreignModuleFactory ? (this._foreignModule = this._foreignModuleFactory( + n, t), Promise.resolve(Ve.$E(this._foreignModule))) : Promise.reject( + new Error("Unexpected usage")) + } + fmr(e, t) { + if (!this._foreignModule || "function" != typeof this._foreignModule[e]) + return Promise.reject(new Error("Missing requestHandler or method: " + + e)); + try { + return Promise.resolve(this._foreignModule[e].apply(this._foreignModule, + t)) + } catch (e) { + return Promise.reject(e) + } + } + } + wt._diffLimit = 1e5, wt._suggestionsLimit = 1e4, "function" == typeof importScripts && + (ze.li.monaco = Z()); + var Ct = i(1200), + yt = i(3187), + St = i(9488), + xt = i(3557), + kt = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + Lt = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + + function Nt(e, t) { + let i = e.getModel(t); + return !!i && !i.isTooLargeForSyncing() + } + let Dt = class extends Le.JT { + constructor(e, t, i) { + super(), this._modelService = e, this._workerManager = this._register( + new It(this._modelService)), this._logService = i, this._register( + Ae.pM.register("*", { + provideLinks: (e, t) => Nt(this._modelService, e.uri) ? this._workerManager + .withWorker().then((t => t.computeLinks(e.uri))).then((e => e && { + links: e + })) : Promise.resolve({ + links: [] + }) + })), this._register(Ae.KZ.register("*", new Et(this._workerManager, + t, this._modelService))) + } + dispose() { + super.dispose() + } + canComputeDiff(e, t) { + return Nt(this._modelService, e) && Nt(this._modelService, t) + } + computeDiff(e, t, i, n) { + return this._workerManager.withWorker().then((o => o.computeDiff(e, t, + i, n))) + } + computeMoreMinimalEdits(e, t) { + if ((0, St.Of)(t)) { + if (!Nt(this._modelService, e)) return Promise.resolve(t); + const i = _t.G.create(!0), + n = this._workerManager.withWorker().then((i => i.computeMoreMinimalEdits( + e, t))); + return n.finally((() => this._logService.trace( + "FORMAT#computeMoreMinimalEdits", e.toString(!0), i.elapsed()))), + Promise.race([n, (0, Be.Vs)(1e3).then((() => t))]) + } + return Promise.resolve(void 0) + } + canNavigateValueSet(e) { + return Nt(this._modelService, e) + } + navigateValueSet(e, t, i) { + return this._workerManager.withWorker().then((n => n.navigateValueSet( + e, t, i))) + } + canComputeWordRanges(e) { + return Nt(this._modelService, e) + } + computeWordRanges(e, t) { + return this._workerManager.withWorker().then((i => i.computeWordRanges( + e, t))) + } + }; + Dt = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([kt(0, Ct.q), kt(1, yt.V), kt(2, xt.VZ)], Dt); + class Et { + constructor(e, t, i) { + this._debugDisplayName = "wordbasedCompletions", this._workerManager = + e, this._configurationService = t, this._modelService = i + } + provideCompletionItems(e, t) { + return Lt(this, void 0, void 0, (function*() { + const i = this._configurationService.getValue(e.uri, t, "editor"); + if (!i.wordBasedSuggestions) return; + const n = []; + if ("currentDocument" === i.wordBasedSuggestionsMode) Nt(this._modelService, + e.uri) && n.push(e.uri); + else + for (const t of this._modelService.getModels()) Nt(this._modelService, + t.uri) && (t === e ? n.unshift(t.uri) : "allDocuments" !== i.wordBasedSuggestionsMode && + t.getLanguageIdentifier().id !== e.getLanguageIdentifier().id || + n.push(t.uri)); + if (0 === n.length) return; + const o = Ye.zu.getWordDefinition(e.getLanguageIdentifier().id), + r = e.getWordAtPosition(t), + s = r ? new j.e(t.lineNumber, r.startColumn, t.lineNumber, r.endColumn) : + j.e.fromPositions(t), + a = s.setEndPosition(t.lineNumber, t.column), + l = yield this._workerManager.withWorker(), + d = yield l.textualSuggest(n, null == r ? void 0 : r.word, o); + return d ? { + duration: d.duration, + suggestions: d.words.map((e => ({ + kind: 18, + label: e, + insertText: e, + range: { + insert: a, + replace: s + } + }))) + } : void 0 + })) + } + } + class It extends Le.JT { + constructor(e) { + super(), this._modelService = e, this._editorWorkerClient = null, + this._lastWorkerUsedTime = (new Date).getTime(), this._register(new Be + .zh).cancelAndSet((() => this._checkStopIdleWorker()), Math.round( + 15e4)), this._register(this._modelService.onModelRemoved((e => this + ._checkStopEmptyWorker()))) + } + dispose() { + this._editorWorkerClient && (this._editorWorkerClient.dispose(), this + ._editorWorkerClient = null), super.dispose() + } + _checkStopEmptyWorker() { + this._editorWorkerClient && 0 === this._modelService.getModels().length && + (this._editorWorkerClient.dispose(), this._editorWorkerClient = null) + } + _checkStopIdleWorker() { + this._editorWorkerClient && (new Date).getTime() - this._lastWorkerUsedTime > + 3e5 && (this._editorWorkerClient.dispose(), this._editorWorkerClient = + null) + } + withWorker() { + return this._lastWorkerUsedTime = (new Date).getTime(), this._editorWorkerClient || + (this._editorWorkerClient = new Rt(this._modelService, !1, + "editorWorkerService")), Promise.resolve(this._editorWorkerClient) + } + } + class Tt extends Le.JT { + constructor(e, t, i) { + if (super(), this._syncedModels = Object.create(null), this._syncedModelsLastUsedTime = + Object.create(null), this._proxy = e, this._modelService = t, !i) { + let e = new Be.zh; + e.cancelAndSet((() => this._checkStopModelSync()), Math.round(3e4)), + this._register(e) + } + } + dispose() { + for (let e in this._syncedModels)(0, Le.B9)(this._syncedModels[e]); + this._syncedModels = Object.create(null), this._syncedModelsLastUsedTime = + Object.create(null), super.dispose() + } + ensureSyncedResources(e) { + for (const t of e) { + let e = t.toString(); + this._syncedModels[e] || this._beginModelSync(t), this._syncedModels[ + e] && (this._syncedModelsLastUsedTime[e] = (new Date).getTime()) + } + } + _checkStopModelSync() { + let e = (new Date).getTime(), + t = []; + for (let i in this._syncedModelsLastUsedTime) e - this._syncedModelsLastUsedTime[ + i] > 6e4 && t.push(i); + for (const e of t) this._stopModelSync(e) + } + _beginModelSync(e) { + let t = this._modelService.getModel(e); + if (!t) return; + if (t.isTooLargeForSyncing()) return; + let i = e.toString(); + this._proxy.acceptNewModel({ + url: t.uri.toString(), + lines: t.getLinesContent(), + EOL: t.getEOL(), + versionId: t.getVersionId() + }); + const n = new Le.SL; + n.add(t.onDidChangeContent((e => { + this._proxy.acceptModelChanged(i.toString(), e) + }))), n.add(t.onWillDispose((() => { + this._stopModelSync(i) + }))), n.add((0, Le.OF)((() => { + this._proxy.acceptRemovedModel(i) + }))), this._syncedModels[i] = n + } + _stopModelSync(e) { + let t = this._syncedModels[e]; + delete this._syncedModels[e], delete this._syncedModelsLastUsedTime[e], ( + 0, Le.B9)(t) + } + } + class Mt { + constructor(e) { + this._instance = e, this._proxyObj = Promise.resolve(this._instance) + } + dispose() { + this._instance.dispose() + } + getProxyObject() { + return this._proxyObj + } + } + class At { + constructor(e) { + this._workerClient = e + } + fhr(e, t) { + return this._workerClient.fhr(e, t) + } + } + class Rt extends Le.JT { + constructor(e, t, i) { + super(), this._disposed = !1, this._modelService = e, this._keepIdleModels = + t, this._workerFactory = new Ge(i), this._worker = null, this._modelManager = + null + } + fhr(e, t) { + throw new Error("Not implemented!") + } + _getOrCreateWorker() { + if (!this._worker) try { + this._worker = this._register(new Ke(this._workerFactory, + "vs/editor/common/services/editorSimpleWorker", new At(this))) + } catch (e) { + Ue(e), this._worker = new Mt(new wt(new At(this), null)) + } + return this._worker + } + _getProxy() { + return this._getOrCreateWorker().getProxyObject().then(void 0, (e => + (Ue(e), this._worker = new Mt(new wt(new At(this), null)), this._getOrCreateWorker() + .getProxyObject()))) + } + _getOrCreateModelManager(e) { + return this._modelManager || (this._modelManager = this._register(new Tt( + e, this._modelService, this._keepIdleModels))), this._modelManager + } + _withSyncedResources(e) { + return this._disposed ? Promise.reject((0, We.F0)()) : this._getProxy() + .then((t => (this._getOrCreateModelManager(t).ensureSyncedResources( + e), t))) + } + computeDiff(e, t, i, n) { + return this._withSyncedResources([e, t]).then((o => o.computeDiff(e.toString(), + t.toString(), i, n))) + } + computeMoreMinimalEdits(e, t) { + return this._withSyncedResources([e]).then((i => i.computeMoreMinimalEdits( + e.toString(), t))) + } + computeLinks(e) { + return this._withSyncedResources([e]).then((t => t.computeLinks(e.toString()))) + } + textualSuggest(e, t, i) { + return Lt(this, void 0, void 0, (function*() { + const n = yield this._withSyncedResources(e), + o = i.source, + r = (0, Xe.mr)(i); + return n.textualSuggest(e.map((e => e.toString())), t, o, r) + })) + } + computeWordRanges(e, t) { + return this._withSyncedResources([e]).then((i => { + let n = this._modelService.getModel(e); + if (!n) return Promise.resolve(null); + let o = Ye.zu.getWordDefinition(n.getLanguageIdentifier().id), + r = o.source, + s = (0, Xe.mr)(o); + return i.computeWordRanges(e.toString(), t, r, s) + })) + } + navigateValueSet(e, t, i) { + return this._withSyncedResources([e]).then((n => { + let o = this._modelService.getModel(e); + if (!o) return null; + let r = Ye.zu.getWordDefinition(o.getLanguageIdentifier().id), + s = r.source, + a = (0, Xe.mr)(r); + return n.navigateValueSet(e.toString(), t, i, s, a) + })) + } + dispose() { + super.dispose(), this._disposed = !0 + } + } + class Ot extends Rt { + constructor(e, t) { + super(e, t.keepIdleModels || !1, t.label), this._foreignModuleId = t.moduleId, + this._foreignModuleCreateData = t.createData || null, this._foreignModuleHost = + t.host || null, this._foreignProxy = null + } + fhr(e, t) { + if (!this._foreignModuleHost || "function" != typeof this._foreignModuleHost[ + e]) return Promise.reject(new Error("Missing method " + e + + " or missing main thread foreign host.")); + try { + return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost, + t)) + } catch (e) { + return Promise.reject(e) + } + } + _getForeignProxy() { + return this._foreignProxy || (this._foreignProxy = this._getProxy().then( + (e => { + const t = this._foreignModuleHost ? Ve.$E(this._foreignModuleHost) : []; + return e.loadForeignModule(this._foreignModuleId, this._foreignModuleCreateData, + t).then((t => { + this._foreignModuleCreateData = null; + const i = (t, i) => e.fmr(t, i), + n = (e, t) => function() { + const i = Array.prototype.slice.call(arguments, 0); + return t(e, i) + }; + let o = {}; + for (const e of t) o[e] = n(e, i); + return o + })) + }))), this._foreignProxy + } + getProxy() { + return this._getForeignProxy() + } + withSyncedResources(e) { + return this._withSyncedResources(e).then((e => this.getProxy())) + } + } + var Pt, Ft = i(8411), + Bt = i(7736), + Wt = i(3824); + + function zt(e) { + return "string" == typeof e + } + + function Vt(e) { + return !zt(e) + } + + function Ht(e) { + return !e + } + + function Ut(e, t) { + return e.ignoreCase && t ? t.toLowerCase() : t + } + + function jt(e) { + return e.replace(/[&<>'"_]/g, "-") + } + + function Kt(e, t) { + return new Error(`${e.languageId}: ${t}`) + } + + function $t(e, t, i, n, o) { + let r = null; + return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g, (function(t, + s, a, l, d, c, h, u, g) { + return Ht(a) ? Ht(l) ? !Ht(d) && d < n.length ? Ut(e, n[d]) : !Ht(h) && + e && "string" == typeof e[h] ? e[h] : (null === r && (r = o.split( + "."), r.unshift(o)), !Ht(c) && c < r.length ? Ut(e, r[c]) : "") : + Ut(e, i) : "$" + })) + } + + function qt(e, t) { + let i = t; + for (; i && i.length > 0;) { + const t = e.tokenizer[i]; + if (t) return t; + const n = i.lastIndexOf("."); + i = n < 0 ? null : i.substr(0, n) + } + return null + } + class Zt { + constructor(e) { + this._maxCacheDepth = e, this._entries = Object.create(null) + } + static create(e, t) { + return this._INSTANCE.create(e, t) + } + create(e, t) { + if (null !== e && e.depth >= this._maxCacheDepth) return new Gt(e, t); + let i = Gt.getStackElementId(e); + i.length > 0 && (i += "|"), i += t; + let n = this._entries[i]; + return n || (n = new Gt(e, t), this._entries[i] = n, n) + } + } + Zt._INSTANCE = new Zt(5); + class Gt { + constructor(e, t) { + this.parent = e, this.state = t, this.depth = (this.parent ? this.parent + .depth : 0) + 1 + } + static getStackElementId(e) { + let t = ""; + for (; null !== e;) t.length > 0 && (t += "|"), t += e.state, e = e.parent; + return t + } + static _equals(e, t) { + for (; null !== e && null !== t;) { + if (e === t) return !0; + if (e.state !== t.state) return !1; + e = e.parent, t = t.parent + } + return null === e && null === t + } + equals(e) { + return Gt._equals(this, e) + } + push(e) { + return Zt.create(this, e) + } + pop() { + return this.parent + } + popall() { + let e = this; + for (; e.parent;) e = e.parent; + return e + } + switchTo(e) { + return Zt.create(this.parent, e) + } + } + class Yt { + constructor(e, t) { + this.modeId = e, this.state = t + } + equals(e) { + return this.modeId === e.modeId && this.state.equals(e.state) + } + clone() { + return this.state.clone() === this.state ? this : new Yt(this.modeId, + this.state) + } + } + class Qt { + constructor(e) { + this._maxCacheDepth = e, this._entries = Object.create(null) + } + static create(e, t) { + return this._INSTANCE.create(e, t) + } + create(e, t) { + if (null !== t) return new Xt(e, t); + if (null !== e && e.depth >= this._maxCacheDepth) return new Xt(e, t); + let i = Gt.getStackElementId(e), + n = this._entries[i]; + return n || (n = new Xt(e, null), this._entries[i] = n, n) + } + } + Qt._INSTANCE = new Qt(5); + class Xt { + constructor(e, t) { + this.stack = e, this.embeddedModeData = t + } + clone() { + return (this.embeddedModeData ? this.embeddedModeData.clone() : null) === + this.embeddedModeData ? this : Qt.create(this.stack, this.embeddedModeData) + } + equals(e) { + return e instanceof Xt && !!this.stack.equals(e.stack) && (null === + this.embeddedModeData && null === e.embeddedModeData || null !== + this.embeddedModeData && null !== e.embeddedModeData && this.embeddedModeData + .equals(e.embeddedModeData)) + } + } + class Jt { + constructor() { + this._tokens = [], this._language = null, this._lastTokenType = null, + this._lastTokenLanguage = null + } + enterMode(e, t) { + this._language = t + } + emit(e, t) { + this._lastTokenType === t && this._lastTokenLanguage === this._language || + (this._lastTokenType = t, this._lastTokenLanguage = this._language, + this._tokens.push(new $.WU(e, t, this._language))) + } + nestedModeTokenize(e, t, i, n) { + const o = i.modeId, + r = i.state, + s = Ae.RW.get(o); + if (!s) return this.enterMode(n, o), this.emit(n, ""), r; + let a = s.tokenize(e, t, r, n); + return this._tokens = this._tokens.concat(a.tokens), this._lastTokenType = + null, this._lastTokenLanguage = null, this._language = null, a.endState + } + finalize(e) { + return new $.hG(this._tokens, e) + } + } + class ei { + constructor(e, t) { + this._modeService = e, this._theme = t, this._prependTokens = null, + this._tokens = [], this._currentLanguageId = 0, this._lastTokenMetadata = + 0 + } + enterMode(e, t) { + this._currentLanguageId = this._modeService.getLanguageIdentifier(t).id + } + emit(e, t) { + let i = this._theme.match(this._currentLanguageId, t); + this._lastTokenMetadata !== i && (this._lastTokenMetadata = i, this._tokens + .push(e), this._tokens.push(i)) + } + static _merge(e, t, i) { + let n = null !== e ? e.length : 0, + o = t.length, + r = null !== i ? i.length : 0; + if (0 === n && 0 === o && 0 === r) return new Uint32Array(0); + if (0 === n && 0 === o) return i; + if (0 === o && 0 === r) return e; + let s = new Uint32Array(n + o + r); + null !== e && s.set(e); + for (let e = 0; e < o; e++) s[n + e] = t[e]; + return null !== i && s.set(i, n + o), s + } + nestedModeTokenize(e, t, i, n) { + const o = i.modeId, + r = i.state, + s = Ae.RW.get(o); + if (!s) return this.enterMode(n, o), this.emit(n, ""), r; + let a = s.tokenize2(e, t, r, n); + return this._prependTokens = ei._merge(this._prependTokens, this._tokens, + a.tokens), this._tokens = [], this._currentLanguageId = 0, this._lastTokenMetadata = + 0, a.endState + } + finalize(e) { + return new $.Hi(ei._merge(this._prependTokens, this._tokens, null), e) + } + } + class ti { + constructor(e, t, i, n) { + this._modeService = e, this._standaloneThemeService = t, this._modeId = + i, this._lexer = n, this._embeddedModes = Object.create(null), this.embeddedLoaded = + Promise.resolve(void 0); + let o = !1; + this._tokenizationRegistryListener = Ae.RW.onDidChange((e => { + if (o) return; + let t = !1; + for (let i = 0, n = e.changedLanguages.length; i < n; i++) { + let n = e.changedLanguages[i]; + if (this._embeddedModes[n]) { + t = !0; + break + } + } + t && (o = !0, Ae.RW.fire([this._modeId]), o = !1) + })) + } + dispose() { + this._tokenizationRegistryListener.dispose() + } + getLoadStatus() { + let e = []; + for (let t in this._embeddedModes) { + const i = Ae.RW.get(t); + if (i) { + if (i instanceof ti) { + const t = i.getLoadStatus(); + !1 === t.loaded && e.push(t.promise) + } + continue + } + const n = Ae.RW.getPromise(t); + n && e.push(n) + } + return 0 === e.length ? { + loaded: !0 + } : { + loaded: !1, + promise: Promise.all(e).then((e => {})) + } + } + getInitialState() { + let e = Zt.create(null, this._lexer.start); + return Qt.create(e, null) + } + tokenize(e, t, i, n) { + let o = new Jt, + r = this._tokenize(e, t, i, n, o); + return o.finalize(r) + } + tokenize2(e, t, i, n) { + let o = new ei(this._modeService, this._standaloneThemeService.getColorTheme() + .tokenTheme), + r = this._tokenize(e, t, i, n, o); + return o.finalize(r) + } + _tokenize(e, t, i, n, o) { + return i.embeddedModeData ? this._nestedTokenize(e, t, i, n, o) : this + ._myTokenize(e, t, i, n, o) + } + _findLeavingNestedModeOffset(e, t) { + let i = this._lexer.tokenizer[t.stack.state]; + if (!i && (i = qt(this._lexer, t.stack.state), !i)) throw Kt(this._lexer, + "tokenizer state is not defined: " + t.stack.state); + let n = -1, + o = !1; + for (const t of i) { + if (!Vt(t.action) || "@pop" !== t.action.nextEmbedded) continue; + o = !0; + let i = t.regex, + r = t.regex.source; + if ("^(?:" === r.substr(0, 4) && ")" === r.substr(r.length - 1, 1)) { + let e = (i.ignoreCase ? "i" : "") + (i.unicode ? "u" : ""); + i = new RegExp(r.substr(4, r.length - 5), e) + } + let s = e.search(i); - 1 === s || 0 !== s && t.matchOnlyAtLineStart || + (-1 === n || s < n) && (n = s) + } + if (!o) throw Kt(this._lexer, + 'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: ' + + t.stack.state); + return n + } + _nestedTokenize(e, t, i, n, o) { + let r = this._findLeavingNestedModeOffset(e, i); + if (-1 === r) { + let r = o.nestedModeTokenize(e, t, i.embeddedModeData, n); + return Qt.create(i.stack, new Yt(i.embeddedModeData.modeId, r)) + } + let s = e.substring(0, r); + s.length > 0 && o.nestedModeTokenize(s, !1, i.embeddedModeData, n); + let a = e.substring(r); + return this._myTokenize(a, t, i, n + r, o) + } + _safeRuleName(e) { + return e ? e.name : "(unknown)" + } + _myTokenize(e, t, i, n, o) { + o.enterMode(n, this._modeId); + const r = e.length, + s = t && this._lexer.includeLF ? e + "\n" : e, + a = s.length; + let l = i.embeddedModeData, + d = i.stack, + c = 0, + h = null, + u = !0; + for (; u || c < a;) { + const i = c, + m = d.depth, + f = h ? h.groups.length : 0, + _ = d.state; + let b = null, + v = null, + w = null, + C = null, + y = null; + if (h) { + b = h.matches; + const e = h.groups.shift(); + v = e.matched, w = e.action, C = h.rule, 0 === h.groups.length && (h = + null) + } else { + if (!u && c >= a) break; + u = !1; + let e = this._lexer.tokenizer[_]; + if (!e && (e = qt(this._lexer, _), !e)) throw Kt(this._lexer, + "tokenizer state is not defined: " + _); + let t = s.substr(c); + for (const i of e) + if ((0 === c || !i.matchOnlyAtLineStart) && (b = t.match(i.regex), + b)) { + v = b[0], w = i.action; + break + } + } + if (b || (b = [""], v = ""), w || (c < a && (b = [s.charAt(c)], v = b[ + 0]), w = this._lexer.defaultToken), null === v) break; + for (c += v.length; ! function(e) { + return Array.isArray(e) + }(w) && Vt(w) && w.test;) w = w.test(v, b, _, c === a); + let S = null; + if ("string" == typeof w || Array.isArray(w)) S = w; + else if (w.group) S = w.group; + else if (null !== w.token && void 0 !== w.token) { + if (S = w.tokenSubst ? $t(this._lexer, w.token, v, b, _) : w.token, + w.nextEmbedded) + if ("@pop" === w.nextEmbedded) { + if (!l) throw Kt(this._lexer, + "cannot pop embedded mode if not inside one"); + l = null + } else { + if (l) throw Kt(this._lexer, + "cannot enter embedded mode from within an embedded mode"); + y = $t(this._lexer, w.nextEmbedded, v, b, _) + } + if (w.goBack && (c = Math.max(0, c - w.goBack)), w.switchTo && + "string" == typeof w.switchTo) { + let e = $t(this._lexer, w.switchTo, v, b, _); + if ("@" === e[0] && (e = e.substr(1)), !qt(this._lexer, e)) throw Kt( + this._lexer, "trying to switch to a state '" + e + + "' that is undefined in rule: " + this._safeRuleName(C)); + d = d.switchTo(e) + } else { + if (w.transform && "function" == typeof w.transform) throw Kt(this._lexer, + "action.transform not supported"); + if (w.next) + if ("@push" === w.next) { + if (d.depth >= this._lexer.maxStack) throw Kt(this._lexer, + "maximum tokenizer stack size reached: [" + d.state + "," + d.parent + .state + ",...]"); + d = d.push(_) + } else if ("@pop" === w.next) { + if (d.depth <= 1) throw Kt(this._lexer, + "trying to pop an empty stack in rule: " + this._safeRuleName(C) + ); + d = d.pop() + } else if ("@popall" === w.next) d = d.popall(); + else { + let e = $t(this._lexer, w.next, v, b, _); + if ("@" === e[0] && (e = e.substr(1)), !qt(this._lexer, e)) throw Kt( + this._lexer, "trying to set a next state '" + e + + "' that is undefined in rule: " + this._safeRuleName(C)); + d = d.push(e) + } + } + w.log && "string" == typeof w.log && (g = this._lexer, p = this._lexer + .languageId + ": " + $t(this._lexer, w.log, v, b, _), console.log( + `${g.languageId}: ${p}`)) + } + if (null === S) throw Kt(this._lexer, + "lexer rule has no well-defined action in rule: " + this._safeRuleName( + C)); + const x = i => { + let r = this._modeService.getModeIdForLanguageName(i); + r && (i = r); + const s = this._getNestedEmbeddedModeData(i); + if (c < a) { + const i = e.substr(c); + return this._nestedTokenize(i, t, Qt.create(d, s), n + c, o) + } + return Qt.create(d, s) + }; + if (Array.isArray(S)) { + if (h && h.groups.length > 0) throw Kt(this._lexer, + "groups cannot be nested: " + this._safeRuleName(C)); + if (b.length !== S.length + 1) throw Kt(this._lexer, + "matched number of groups does not match the number of actions in rule: " + + this._safeRuleName(C)); + let e = 0; + for (let t = 1; t < b.length; t++) e += b[t].length; + if (e !== v.length) throw Kt(this._lexer, + "with groups, all characters should be matched in consecutive groups in rule: " + + this._safeRuleName(C)); + h = { + rule: C, + matches: b, + groups: [] + }; + for (let e = 0; e < S.length; e++) h.groups[e] = { + action: S[e], + matched: b[e + 1] + }; + c -= v.length + } else { + { + if ("@rematch" === S && (c -= v.length, v = "", b = null, S = "", + null !== y)) return x(y); + if (0 === v.length) { + if (0 === a || m !== d.depth || _ !== d.state || (h ? h.groups.length : + 0) !== f) continue; + throw Kt(this._lexer, "no progress in tokenizer in rule: " + this._safeRuleName( + C)) + } + let e = null; + if (zt(S) && 0 === S.indexOf("@brackets")) { + let t = S.substr("@brackets".length), + i = ii(this._lexer, v); + if (!i) throw Kt(this._lexer, + "@brackets token returned but no bracket defined as: " + v); + e = jt(i.token + t) + } else e = jt("" === S ? "" : S + this._lexer.tokenPostfix); + i < r && o.emit(i + n, e) + } + if (null !== y) return x(y) + } + } + var g, p; + return Qt.create(d, l) + } + _getNestedEmbeddedModeData(e) { + let t = this._locateMode(e); + if (t) { + let e = Ae.RW.get(t); + if (e) return new Yt(t, e.getInitialState()) + } + return new Yt(t || Re.TG, Re.nO) + } + _locateMode(e) { + if (!e || !this._modeService.isRegisteredMode(e)) return null; + if (e === this._modeId) return e; + let t = this._modeService.getModeId(e); + return t && (this._modeService.triggerMode(t), this._embeddedModes[t] = ! + 0), t + } + } + + function ii(e, t) { + if (!t) return null; + t = Ut(e, t); + let i = e.brackets; + for (const e of i) { + if (e.open === t) return { + token: e.token, + bracketType: 1 + }; + if (e.close === t) return { + token: e.token, + bracketType: -1 + } + } + return null + } + const ni = null === (Pt = window.trustedTypes) || void 0 === Pt ? void 0 : + Pt.createPolicy("standaloneColorizer", { + createHTML: e => e + }); + class oi { + static colorizeElement(e, t, i, n) { + let o = (n = n || {}).theme || "vs", + r = n.mimeType || i.getAttribute("lang") || i.getAttribute( + "data-lang"); + if (!r) return console.error("Mode not detected"), Promise.resolve(); + e.setTheme(o); + let s = i.firstChild ? i.firstChild.nodeValue : ""; + return i.className += " " + o, this.colorize(t, s || "", r, n).then((e => { + var t; + const n = null !== (t = null == ni ? void 0 : ni.createHTML(e)) && + void 0 !== t ? t : e; + i.innerHTML = n + }), (e => console.error(e))) + } + static colorize(e, t, i, n) { + let o = 4; + n && "number" == typeof n.tabSize && (o = n.tabSize), Xe.uS(t) && (t = + t.substr(1)); + let r = Xe.uq(t), + s = e.getModeId(i); + if (!s) return Promise.resolve(si(r, o)); + e.triggerMode(s); + const a = Ae.RW.get(s); + if (a) return ri(r, o, a); + const l = Ae.RW.getPromise(s); + return new Promise(l ? (e, t) => { + l.then((i => { + ri(r, o, i).then(e, t) + }), t) + } : (e, t) => { + let i = null, + n = null; + const a = () => { + i && (i.dispose(), i = null), n && (n.dispose(), n = null); + const a = Ae.RW.get(s); + a ? ri(r, o, a).then(e, t) : e(si(r, o)) + }; + n = new Be._F, n.cancelAndSet(a, 500), i = Ae.RW.onDidChange((e => { + e.changedLanguages.indexOf(s) >= 0 && a() + })) + }) + } + static colorizeLine(e, t, i, n, o = 4) { + const r = Wt.wA.isBasicASCII(e, t), + s = Wt.wA.containsRTL(e, r, i); + return (0, Bt.tF)(new Bt.IJ(!1, !0, e, !1, r, s, 0, n, [], o, 0, 0, 0, + 0, -1, "none", !1, !1, null)).html + } + static colorizeModelLine(e, t, i = 4) { + let n = e.getLineContent(t); + e.forceTokenization(t); + let o = e.getLineTokens(t).inflate(); + return this.colorizeLine(n, e.mightContainNonBasicASCII(), e.mightContainRTL(), + o, i) + } + } + + function ri(e, t, i) { + return new Promise(((n, o) => { + const r = () => { + const s = function(e, t, i) { + let n = [], + o = i.getInitialState(); + for (let r = 0, s = e.length; r < s; r++) { + let s = e[r], + a = i.tokenize2(s, !0, o, 0); + Ft.A.convertToEndOffset(a.tokens, s.length); + let l = new Ft.A(a.tokens, s); + const d = Wt.wA.isBasicASCII(s, !0), + c = Wt.wA.containsRTL(s, d, !0); + let h = (0, Bt.tF)(new Bt.IJ(!1, !0, s, !1, d, c, 0, l.inflate(), [], + t, 0, 0, 0, 0, -1, "none", !1, !1, null)); + n = n.concat(h.html), n.push("
    "), o = a.endState + } + return n.join("") + }(e, t, i); + if (i instanceof ti) { + const e = i.getLoadStatus(); + if (!1 === e.loaded) return void e.promise.then(r, o) + } + n(s) + }; + r() + })) + } + + function si(e, t) { + let i = []; + const n = new Uint32Array(2); + n[0] = 0, n[1] = 16793600; + for (let o = 0, r = e.length; o < r; o++) { + let r = e[o]; + n[0] = r.length; + const s = new Ft.A(n, r), + a = Wt.wA.isBasicASCII(r, !0), + l = Wt.wA.containsRTL(r, a, !0); + let d = (0, Bt.tF)(new Bt.IJ(!1, !0, r, !1, a, l, 0, s, [], t, 0, 0, 0, + 0, -1, "none", !1, !1, null)); + i = i.concat(d.html), i.push("
    ") + } + return i.join("") + } + var ai = i(9069), + li = i(4603), + di = i(5520), + ci = i(6007), + hi = i(6345), + ui = i(9386), + gi = i(3108), + pi = i(3193); + class mi { + constructor(e = {}, t = [], i = []) { + this._contents = e, this._keys = t, this._overrides = i, this.isFrozen = ! + 1 + } + get contents() { + return this.checkAndFreeze(this._contents) + } + get overrides() { + return this.checkAndFreeze(this._overrides) + } + get keys() { + return this.checkAndFreeze(this._keys) + } + isEmpty() { + return 0 === this._keys.length && 0 === Object.keys(this._contents).length && + 0 === this._overrides.length + } + getValue(e) { + return e ? (0, gi.Mt)(this.contents, e) : this.contents + } + override(e) { + const t = this.getContentsForOverrideIdentifer(e); + if (!t || "object" != typeof t || !Object.keys(t).length) return this; + let i = {}; + for (const e of St.EB([...Object.keys(this.contents), ...Object.keys(t)])) { + let n = this.contents[e], + o = t[e]; + o && ("object" == typeof n && "object" == typeof o ? (n = Ne.I8(n), + this.mergeContents(n, o)) : n = o), i[e] = n + } + return new mi(i, this.keys, this.overrides) + } + merge(...e) { + const t = Ne.I8(this.contents), + i = Ne.I8(this.overrides), + n = [...this.keys]; + for (const o of e) { + this.mergeContents(t, o.contents); + for (const e of o.overrides) { + const [t] = i.filter((t => St.fS(t.identifiers, e.identifiers))); + t ? this.mergeContents(t.contents, e.contents) : i.push(Ne.I8(e)) + } + for (const e of o.keys) - 1 === n.indexOf(e) && n.push(e) + } + return new mi(t, n, i) + } + freeze() { + return this.isFrozen = !0, this + } + mergeContents(e, t) { + for (const i of Object.keys(t)) i in e && Ve.Kn(e[i]) && Ve.Kn(t[i]) ? + this.mergeContents(e[i], t[i]) : e[i] = Ne.I8(t[i]) + } + checkAndFreeze(e) { + return this.isFrozen && !Object.isFrozen(e) ? Ne._A(e) : e + } + getContentsForOverrideIdentifer(e) { + for (const t of this.overrides) + if (-1 !== t.identifiers.indexOf(e)) return t.contents; + return null + } + toJSON() { + return { + contents: this.contents, + overrides: this.overrides, + keys: this.keys + } + } + setValue(e, t) { + this.addKey(e), (0, gi.KV)(this.contents, e, t, (e => { + throw new Error(e) + })) + } + removeValue(e) { + this.removeKey(e) && (0, gi.xL)(this.contents, e) + } + addKey(e) { + let t = this.keys.length; + for (let i = 0; i < t; i++) 0 === e.indexOf(this.keys[i]) && (t = i); + this.keys.splice(t, 1, e) + } + removeKey(e) { + let t = this.keys.indexOf(e); + return -1 !== t && (this.keys.splice(t, 1), !0) + } + } + class fi extends mi { + constructor() { + const e = (0, gi.O4)(), + t = (0, gi.MR)(), + i = []; + for (const t of Object.keys(e)) pi.G1.test(t) && i.push({ + identifiers: [(0, pi.Uh)(t).trim()], + keys: Object.keys(e[t]), + contents: (0, gi.Od)(e[t], (e => console.error( + `Conflict in default settings file: ${e}`))) + }); + super(e, t, i) + } + } + class _i { + constructor(e, t, i = new mi, n = new mi, o = new ge.Y9, r = new mi, s = + new ge.Y9, a = !0) { + this._defaultConfiguration = e, this._localUserConfiguration = t, this + ._remoteUserConfiguration = i, this._workspaceConfiguration = n, this + ._folderConfigurations = o, this._memoryConfiguration = r, this._memoryConfigurationByResource = + s, this._freeze = a, this._workspaceConsolidatedConfiguration = null, + this._foldersConsolidatedConfigurations = new ge.Y9, this._userConfiguration = + null + } + getValue(e, t, i) { + return this.getConsolidateConfigurationModel(t, i).getValue(e) + } + updateValue(e, t, i = {}) { + let n; + i.resource ? (n = this._memoryConfigurationByResource.get(i.resource), + n || (n = new mi, this._memoryConfigurationByResource.set(i.resource, + n))) : n = this._memoryConfiguration, void 0 === t ? n.removeValue( + e) : n.setValue(e, t), i.resource || (this._workspaceConsolidatedConfiguration = + null) + } + get userConfiguration() { + return this._userConfiguration || (this._userConfiguration = this._remoteUserConfiguration + .isEmpty() ? this._localUserConfiguration : this._localUserConfiguration + .merge(this._remoteUserConfiguration), this._freeze && this._userConfiguration + .freeze()), this._userConfiguration + } + getConsolidateConfigurationModel(e, t) { + let i = this.getConsolidatedConfigurationModelForResource(e, t); + return e.overrideIdentifier ? i.override(e.overrideIdentifier) : i + } + getConsolidatedConfigurationModelForResource({ + resource: e + }, t) { + let i = this.getWorkspaceConsolidatedConfiguration(); + if (t && e) { + const n = t.getFolder(e); + n && (i = this.getFolderConsolidatedConfiguration(n.uri) || i); + const o = this._memoryConfigurationByResource.get(e); + o && (i = i.merge(o)) + } + return i + } + getWorkspaceConsolidatedConfiguration() { + return this._workspaceConsolidatedConfiguration || (this._workspaceConsolidatedConfiguration = + this._defaultConfiguration.merge(this.userConfiguration, this._workspaceConfiguration, + this._memoryConfiguration), this._freeze && (this._workspaceConfiguration = + this._workspaceConfiguration.freeze())), this._workspaceConsolidatedConfiguration + } + getFolderConsolidatedConfiguration(e) { + let t = this._foldersConsolidatedConfigurations.get(e); + if (!t) { + const i = this.getWorkspaceConsolidatedConfiguration(), + n = this._folderConfigurations.get(e); + n ? (t = i.merge(n), this._freeze && (t = t.freeze()), this._foldersConsolidatedConfigurations + .set(e, t)) : t = i + } + return t + } + toData() { + return { + defaults: { + contents: this._defaultConfiguration.contents, + overrides: this._defaultConfiguration.overrides, + keys: this._defaultConfiguration.keys + }, + user: { + contents: this.userConfiguration.contents, + overrides: this.userConfiguration.overrides, + keys: this.userConfiguration.keys + }, + workspace: { + contents: this._workspaceConfiguration.contents, + overrides: this._workspaceConfiguration.overrides, + keys: this._workspaceConfiguration.keys + }, + folders: [...this._folderConfigurations.keys()].reduce(((e, t) => { + const { + contents: i, + overrides: n, + keys: o + } = this._folderConfigurations.get(t); + return e.push([t, { + contents: i, + overrides: n, + keys: o + }]), e + }), []) + } + } + static parse(e) { + const t = this.parseConfigurationModel(e.defaults), + i = this.parseConfigurationModel(e.user), + n = this.parseConfigurationModel(e.workspace), + o = e.folders.reduce(((e, t) => (e.set(H.o.revive(t[0]), this.parseConfigurationModel( + t[1])), e)), new ge.Y9); + return new _i(t, i, new mi, n, o, new mi, new ge.Y9, !1) + } + static parseConfigurationModel(e) { + return new mi(e.contents, e.keys, e.overrides).freeze() + } + } + class bi { + constructor(e, t, i, n) { + this.change = e, this.previous = t, this.currentConfiguraiton = i, + this.currentWorkspace = n, this._previousConfiguration = void 0; + const o = new Set; + e.keys.forEach((e => o.add(e))), e.overrides.forEach((([, e]) => e.forEach( + (e => o.add(e))))), this.affectedKeys = [...o.values()]; + const r = new mi; + this.affectedKeys.forEach((e => r.setValue(e, {}))), this.affectedKeysTree = + r.contents + } + get previousConfiguration() { + return !this._previousConfiguration && this.previous && (this._previousConfiguration = + _i.parse(this.previous.data)), this._previousConfiguration + } + affectsConfiguration(e, t) { + var i; + if (this.doesAffectedKeysTreeContains(this.affectedKeysTree, e)) { + if (t) { + const n = this.previousConfiguration ? this.previousConfiguration.getValue( + e, t, null === (i = this.previous) || void 0 === i ? void 0 : i.workspace + ) : void 0, + o = this.currentConfiguraiton.getValue(e, t, this.currentWorkspace); + return !Ne.fS(n, o) + } + return !0 + } + return !1 + } + doesAffectedKeysTreeContains(e, t) { + let i, n = (0, gi.Od)({ + [t]: !0 + }, (() => {})); + for (; + "object" == typeof n && (i = Object.keys(n)[0]);) { + if (!(e = e[i])) return !1; + n = n[i] + } + return !0 + } + } + var vi = i(3580); + class wi extends Le.JT { + constructor(e, t, i, n, o) { + super(), this._contextKeyService = e, this._commandService = t, this._telemetryService = + i, this._notificationService = n, this._logService = o, this._onDidUpdateKeybindings = + this._register(new z.Q5), this._currentChord = null, this._currentChordChecker = + new Be.zh, this._currentChordStatusMessage = null, this._currentSingleModifier = + null, this._currentSingleModifierClearTimeout = new Be._F, this._logging = ! + 1 + } + get onDidUpdateKeybindings() { + return this._onDidUpdateKeybindings ? this._onDidUpdateKeybindings.event : + z.ju.None + } + dispose() { + super.dispose() + } + _log(e) { + this._logging && this._logService.info(`[KeybindingService]: ${e}`) + } + getKeybindings() { + return this._getResolver().getKeybindings() + } + lookupKeybinding(e, t) { + const i = this._getResolver().lookupPrimaryKeybinding(e, t || this._contextKeyService); + if (i) return i.resolvedKeybinding + } + dispatchEvent(e, t) { + return this._dispatch(e, t) + } + softDispatch(e, t) { + const i = this.resolveKeyboardEvent(e); + if (i.isChord()) return console.warn( + "Unexpected keyboard event mapped to a chord"), null; + const [n] = i.getDispatchParts(); + if (null === n) return null; + const o = this._contextKeyService.getContext(t), + r = this._currentChord ? this._currentChord.keypress : null; + return this._getResolver().resolve(o, r, n) + } + _enterChordMode(e, t) { + this._currentChord = { + keypress: e, + label: t + }, this._currentChordStatusMessage = this._notificationService.status( + vi.N("first.chord", + "({0}) was pressed. Waiting for second key of chord...", t)); + const i = Date.now(); + this._currentChordChecker.cancelAndSet((() => { + this._documentHasFocus() ? Date.now() - i > 5e3 && this._leaveChordMode() : + this._leaveChordMode() + }), 500) + } + _leaveChordMode() { + this._currentChordStatusMessage && (this._currentChordStatusMessage.dispose(), + this._currentChordStatusMessage = null), this._currentChordChecker.cancel(), + this._currentChord = null + } + _dispatch(e, t) { + return this._doDispatch(this.resolveKeyboardEvent(e), t, !1) + } + _singleModifierDispatch(e, t) { + const i = this.resolveKeyboardEvent(e), + [n] = i.getSingleModifierDispatchParts(); + return null !== n && null === this._currentSingleModifier ? (this._log( + `+ Storing single modifier for possible chord ${n}.`), this._currentSingleModifier = + n, this._currentSingleModifierClearTimeout.cancelAndSet((() => { + this._log("+ Clearing single modifier due to 300ms elapsed."), + this._currentSingleModifier = null + }), 300), !1) : null !== n && n === this._currentSingleModifier ? ( + this._log(`/ Dispatching single modifier chord ${n} ${n}`), this._currentSingleModifierClearTimeout + .cancel(), this._currentSingleModifier = null, this._doDispatch(i, + t, !0)) : (this._currentSingleModifierClearTimeout.cancel(), this._currentSingleModifier = + null, !1) + } + _doDispatch(e, t, i = !1) { + let n = !1; + if (e.isChord()) return console.warn( + "Unexpected keyboard event mapped to a chord"), !1; + let o = null, + r = null; + if (i) { + const [t] = e.getSingleModifierDispatchParts(); + o = t, r = t + } else [o] = e.getDispatchParts(), r = this._currentChord ? this._currentChord + .keypress : null; + if (null === o) return this._log( + "\\ Keyboard event cannot be dispatched in keydown phase."), n; + const s = this._contextKeyService.getContext(t), + a = e.getLabel(), + l = this._getResolver().resolve(s, r, o); + return this._logService.trace("KeybindingService#dispatch", a, null == + l ? void 0 : l.commandId), l && l.enterChord ? (n = !0, this._enterChordMode( + o, a), n) : (this._currentChord && (l && l.commandId || (this._notificationService + .status(vi.N("missing.chord", + "The key combination ({0}, {1}) is not a command.", this._currentChord + .label, a), { + hideAfter: 1e4 + }), n = !0)), this._leaveChordMode(), l && l.commandId && (l.bubble || + (n = !0), void 0 === l.commandArgs ? this._commandService.executeCommand( + l.commandId).then(void 0, (e => this._notificationService.warn(e))) : + this._commandService.executeCommand(l.commandId, l.commandArgs).then( + void 0, (e => this._notificationService.warn(e))), this._telemetryService + .publicLog2("workbenchActionExecuted", { + id: l.commandId, + from: "keybinding" + })), n) + } + mightProducePrintableCharacter(e) { + return !e.ctrlKey && !e.metaKey && (e.keyCode >= 31 && e.keyCode <= + 56 || e.keyCode >= 21 && e.keyCode <= 30) + } + } + var Ci = i(8819); + class yi { + constructor(e, t, i) { + this._log = i, this._defaultKeybindings = e, this._defaultBoundCommands = + new Map; + for (let t = 0, i = e.length; t < i; t++) { + const i = e[t].command; + i && this._defaultBoundCommands.set(i, !0) + } + this._map = new Map, this._lookupMap = new Map, this._keybindings = yi + .combine(e, t); + for (let e = 0, t = this._keybindings.length; e < t; e++) { + let t = this._keybindings[e]; + 0 !== t.keypressParts.length && (t.when && 0 === t.when.type || this._addKeyPress( + t.keypressParts[0], t)) + } + } + static _isTargetedForRemoval(e, t, i, n, o) { + if (e.command !== n) return !1; + if (t && e.keypressParts[0] !== t) return !1; + if (i && e.keypressParts[1] !== i) return !1; + if (o) { + if (!e.when) return !1; + if (!o.equals(e.when)) return !1 + } + return !0 + } + static combine(e, t) { + e = e.slice(0); + let i = []; + for (const n of t) { + if (!n.command || 0 === n.command.length || "-" !== n.command.charAt( + 0)) { + i.push(n); + continue + } + const t = n.command.substr(1), + o = n.keypressParts[0], + r = n.keypressParts[1], + s = n.when; + for (let i = e.length - 1; i >= 0; i--) this._isTargetedForRemoval(e[ + i], o, r, t, s) && e.splice(i, 1) + } + return e.concat(i) + } + _addKeyPress(e, t) { + const i = this._map.get(e); + if (void 0 === i) return this._map.set(e, [t]), void this._addToLookupMap( + t); + for (let e = i.length - 1; e >= 0; e--) { + let n = i[e]; + if (n.command === t.command) continue; + const o = n.keypressParts.length > 1, + r = t.keypressParts.length > 1; + o && r && n.keypressParts[1] !== t.keypressParts[1] || yi.whenIsEntirelyIncluded( + n.when, t.when) && this._removeFromLookupMap(n) + } + i.push(t), this._addToLookupMap(t) + } + _addToLookupMap(e) { + if (!e.command) return; + let t = this._lookupMap.get(e.command); + void 0 === t ? (t = [e], this._lookupMap.set(e.command, t)) : t.push(e) + } + _removeFromLookupMap(e) { + if (!e.command) return; + let t = this._lookupMap.get(e.command); + if (void 0 !== t) + for (let i = 0, n = t.length; i < n; i++) + if (t[i] === e) return void t.splice(i, 1) + } + static whenIsEntirelyIncluded(e, t) { + return !t || 1 === t.type || !(!e || 1 === e.type) && (0, Ci.K8)(e, t) + } + getKeybindings() { + return this._keybindings + } + lookupPrimaryKeybinding(e, t) { + const i = this._lookupMap.get(e); + if (void 0 === i || 0 === i.length) return null; + if (1 === i.length) return i[0]; + for (let e = i.length - 1; e >= 0; e--) { + const n = i[e]; + if (t.contextMatchesRules(n.when)) return n + } + return i[i.length - 1] + } + resolve(e, t, i) { + this._log(`| Resolving ${i}${t?` + chorded from $ { + t + } + `:""}`); + let n = null; + if (null !== t) { + const e = this._map.get(t); + if (void 0 === e) return this._log("\\ No keybinding entries."), null; + n = []; + for (let t = 0, o = e.length; t < o; t++) { + let o = e[t]; + o.keypressParts[1] === i && n.push(o) + } + } else { + const e = this._map.get(i); + if (void 0 === e) return this._log("\\ No keybinding entries."), null; + n = e + } + let o = this._findCommand(e, n); + return o ? null === t && o.keypressParts.length > 1 && null !== o.keypressParts[ + 1] ? (this._log( + `\\ From ${n.length} keybinding entries, matched chord, when: ${Si(o.when)}, source: ${xi(o)}.` + ), { + enterChord: !0, + leaveChord: !1, + commandId: null, + commandArgs: null, + bubble: !1 + }) : (this._log( + `\\ From ${n.length} keybinding entries, matched ${o.command}, when: ${Si(o.when)}, source: ${xi(o)}.` + ), { + enterChord: !1, + leaveChord: o.keypressParts.length > 1, + commandId: o.command, + commandArgs: o.commandArgs, + bubble: o.bubble + }) : (this._log( + `\\ From ${n.length} keybinding entries, no when clauses matched the context.` + ), null) + } + _findCommand(e, t) { + for (let i = t.length - 1; i >= 0; i--) { + let n = t[i]; + if (yi.contextMatchesRules(e, n.when)) return n + } + return null + } + static contextMatchesRules(e, t) { + return !t || t.evaluate(e) + } + } + + function Si(e) { + return e ? `${e.serialize()}` : "no when condition" + } + + function xi(e) { + return e.extensionId ? e.isBuiltinExtension ? + `built-in extension ${e.extensionId}` : + `user extension ${e.extensionId}` : e.isDefault ? "built-in" : "user" + } + var ki = i(9989); + class Li { + constructor(e, t, i, n, o, r, s) { + this._resolvedKeybindingItemBrand = void 0, this.resolvedKeybinding = + e, this.keypressParts = e ? Ni(e.getDispatchParts()) : [], e && 0 === + this.keypressParts.length && (this.keypressParts = Ni(e.getSingleModifierDispatchParts())), + this.bubble = !!t && 94 === t.charCodeAt(0), this.command = this.bubble ? + t.substr(1) : t, this.commandArgs = i, this.when = n, this.isDefault = + o, this.extensionId = r, this.isBuiltinExtension = s + } + } + + function Ni(e) { + let t = []; + for (let i = 0, n = e.length; i < n; i++) { + const n = e[i]; + if (!n) return t; + t.push(n) + } + return t + } + var Di = i(8030); + class Ei extends V.f1 { + constructor(e, t) { + if (super(), 0 === t.length) throw (0, We.b1)("parts"); + this._os = e, this._parts = t + } + getLabel() { + return Di.xo.toLabel(this._os, this._parts, (e => this._getLabel(e))) + } + getAriaLabel() { + return Di.X4.toLabel(this._os, this._parts, (e => this._getAriaLabel( + e))) + } + isChord() { + return this._parts.length > 1 + } + getParts() { + return this._parts.map((e => this._getPart(e))) + } + _getPart(e) { + return new V.BQ(e.ctrlKey, e.shiftKey, e.altKey, e.metaKey, this._getLabel( + e), this._getAriaLabel(e)) + } + getDispatchParts() { + return this._parts.map((e => this._getDispatchPart(e))) + } + getSingleModifierDispatchParts() { + return this._parts.map((e => this._getSingleModifierDispatchPart(e))) + } + } + class Ii extends Ei { + constructor(e, t) { + super(t, e.parts) + } + _keyCodeToUILabel(e) { + if (2 === this._os) switch (e) { + case 15: + return "←"; + case 16: + return "↑"; + case 17: + return "→"; + case 18: + return "↓" + } + return V.kL.toString(e) + } + _getLabel(e) { + return e.isDuplicateModifierCase() ? "" : this._keyCodeToUILabel(e.keyCode) + } + _getAriaLabel(e) { + return e.isDuplicateModifierCase() ? "" : V.kL.toString(e.keyCode) + } + _getDispatchPart(e) { + return Ii.getDispatchStr(e) + } + static getDispatchStr(e) { + if (e.isModifierKey()) return null; + let t = ""; + return e.ctrlKey && (t += "ctrl+"), e.shiftKey && (t += "shift+"), e.altKey && + (t += "alt+"), e.metaKey && (t += "meta+"), t += V.kL.toString(e.keyCode), + t + } + _getSingleModifierDispatchPart(e) { + return 5 !== e.keyCode || e.shiftKey || e.altKey || e.metaKey ? 4 !== + e.keyCode || e.ctrlKey || e.altKey || e.metaKey ? 6 !== e.keyCode || + e.ctrlKey || e.shiftKey || e.metaKey ? 57 !== e.keyCode || e.ctrlKey || + e.shiftKey || e.altKey ? null : "meta" : "alt" : "shift" : "ctrl" + } + } + var Ti = i(9422), + Mi = i(382), + Ai = i(913), + Ri = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + Oi = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + Pi = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class Fi { + constructor(e) { + this.disposed = !1, this.model = e, this._onWillDispose = new z.Q5 + } + get textEditorModel() { + return this.model + } + dispose() { + this.disposed = !0, this._onWillDispose.fire() + } + } + let Bi = class { + constructor(e) { + this.modelService = e + } + setEditor(e) { + this.editor = e + } + createModelReference(e) { + let t = null; + var i, n, o; + return this.editor && (i = this.editor, n = t => this.findModel(t, e), + o = t => this.findModel(t.getOriginalEditor(), e) || this.findModel( + t.getModifiedEditor(), e), t = (0, di.CL)(i) ? n(i) : o(i)), t ? + Promise.resolve(new Le.Jz(new Fi(t))) : Promise.reject(new Error( + "Model not found")) + } + findModel(e, t) { + let i = this.modelService.getModel(t); + return i && i.uri.toString() !== t.toString() ? null : i + } + }; + Bi = Ri([Oi(0, Ct.q)], Bi); + class Wi { + show() { + return Wi.NULL_PROGRESS_RUNNER + } + showWhile(e, t) { + return Pi(this, void 0, void 0, (function*() { + yield e + })) + } + } + Wi.NULL_PROGRESS_RUNNER = { + done: () => {}, + total: () => {}, + worked: () => {} + }; + class zi { + confirm(e) { + return this.doConfirm(e).then((e => ({ + confirmed: e, + checkboxChecked: !1 + }))) + } + doConfirm(e) { + let t = e.message; + return e.detail && (t = t + "\n\n" + e.detail), Promise.resolve(window + .confirm(t)) + } + show(e, t, i, n) { + return Promise.resolve({ + choice: 0 + }) + } + } + class Vi { + info(e) { + return this.notify({ + severity: li.Z.Info, + message: e + }) + } + warn(e) { + return this.notify({ + severity: li.Z.Warning, + message: e + }) + } + error(e) { + return this.notify({ + severity: li.Z.Error, + message: e + }) + } + notify(e) { + switch (e.severity) { + case li.Z.Error: + console.error(e.message); + break; + case li.Z.Warning: + console.warn(e.message); + break; + default: + console.log(e.message) + } + return Vi.NO_OP + } + status(e, t) { + return Le.JT.None + } + } + Vi.NO_OP = new Ti.EO; + class Hi { + constructor(e) { + this._onWillExecuteCommand = new z.Q5, this._onDidExecuteCommand = new z + .Q5, this.onDidExecuteCommand = this._onDidExecuteCommand.event, this + ._instantiationService = e + } + executeCommand(e, ...t) { + const i = _e.P.getCommand(e); + if (!i) return Promise.reject(new Error(`command '${e}' not found`)); + try { + this._onWillExecuteCommand.fire({ + commandId: e, + args: t + }); + const n = this._instantiationService.invokeFunction.apply(this._instantiationService, [ + i.handler, ...t + ]); + return this._onDidExecuteCommand.fire({ + commandId: e, + args: t + }), Promise.resolve(n) + } catch (e) { + return Promise.reject(e) + } + } + } + class Ui extends wi { + constructor(e, t, i, n, o, r) { + super(e, t, i, n, o), this._cachedResolver = null, this._dynamicKeybindings = [], + this._register(he.nm(r, he.tw.KEY_DOWN, (e => { + const t = new ai.y(e); + this._dispatch(t, t.target) && (t.preventDefault(), t.stopPropagation()) + }))), this._register(he.nm(window, he.tw.KEY_UP, (e => { + const t = new ai.y(e); + this._singleModifierDispatch(t, t.target) && t.preventDefault() + }))) + } + addDynamicKeybinding(e, t, i, n) { + const o = (0, V.gm)(t, ze.OS), + r = new Le.SL; + return o && (this._dynamicKeybindings.push({ + keybinding: o, + command: e, + when: n, + weight1: 1e3, + weight2: 0, + extensionId: null, + isBuiltinExtension: !1 + }), r.add((0, Le.OF)((() => { + for (let t = 0; t < this._dynamicKeybindings.length; t++) + if (this._dynamicKeybindings[t].command === e) return this._dynamicKeybindings + .splice(t, 1), void this.updateResolver({ + source: 1 + }) + })))), r.add(_e.P.registerCommand(e, i)), this.updateResolver({ + source: 1 + }), r + } + updateResolver(e) { + this._cachedResolver = null, this._onDidUpdateKeybindings.fire(e) + } + _getResolver() { + if (!this._cachedResolver) { + const e = this._toNormalizedKeybindingItems(ki.W.getDefaultKeybindings(), ! + 0), + t = this._toNormalizedKeybindingItems(this._dynamicKeybindings, !1); + this._cachedResolver = new yi(e, t, (e => this._log(e))) + } + return this._cachedResolver + } + _documentHasFocus() { + return document.hasFocus() + } + _toNormalizedKeybindingItems(e, t) { + let i = [], + n = 0; + for (const o of e) { + const e = o.when || void 0, + r = o.keybinding; + if (r) { + const s = this.resolveKeybinding(r); + for (const r of s) i[n++] = new Li(r, o.command, o.commandArgs, e, t, + null, !1) + } else i[n++] = new Li(void 0, o.command, o.commandArgs, e, t, null, ! + 1) + } + return i + } + resolveKeybinding(e) { + return [new Ii(e, ze.OS)] + } + resolveKeyboardEvent(e) { + let t = new V.QC(e.ctrlKey, e.shiftKey, e.altKey, e.metaKey, e.keyCode) + .toChord(); + return new Ii(t, ze.OS) + } + } + + function ji(e) { + return e && "object" == typeof e && (!e.overrideIdentifier || "string" == + typeof e.overrideIdentifier) && (!e.resource || e.resource instanceof H + .o) + } + class Ki { + constructor() { + this._onDidChangeConfiguration = new z.Q5, this.onDidChangeConfiguration = + this._onDidChangeConfiguration.event, this._configuration = new _i( + new fi, new mi) + } + getValue(e, t) { + const i = "string" == typeof e ? e : void 0, + n = ji(e) ? e : ji(t) ? t : {}; + return this._configuration.getValue(i, n, void 0) + } + updateValues(e) { + const t = { + data: this._configuration.toData() + }; + let i = []; + for (const t of e) { + const [e, n] = t; + this.getValue(e) !== n && (this._configuration.updateValue(e, n), i.push( + e)) + } + if (i.length > 0) { + const e = new bi({ + keys: i, + overrides: [] + }, t, this._configuration); + e.source = 7, e.sourceConfig = null, this._onDidChangeConfiguration.fire( + e) + } + return Promise.resolve() + } + } + class $i { + constructor(e) { + this.configurationService = e, this._onDidChangeConfiguration = new z.Q5, + this.configurationService.onDidChangeConfiguration((e => { + this._onDidChangeConfiguration.fire({ + affectedKeys: e.affectedKeys, + affectsConfiguration: (t, i) => e.affectsConfiguration(i) + }) + })) + } + getValue(e, t, i) { + const n = U.L.isIPosition(t) && t ? "string" == typeof i ? i : void 0 : + "string" == typeof t ? t : void 0; + return void 0 === n ? this.configurationService.getValue() : this.configurationService + .getValue(n) + } + } + let qi = class { + constructor(e) { + this.configurationService = e + } + getEOL(e, t) { + const i = this.configurationService.getValue("files.eol", { + overrideIdentifier: t, + resource: e + }); + return i && "string" == typeof i && "auto" !== i ? i : ze.IJ || ze.dz ? + "\n" : "\r\n" + } + }; + qi = Ri([Oi(0, gi.Ui)], qi); + class Zi { + publicLog(e, t) { + return Promise.resolve(void 0) + } + publicLog2(e, t) { + return this.publicLog(e, t) + } + } + class Gi { + constructor() { + const e = H.o.from({ + scheme: Gi.SCHEME, + authority: "model", + path: "/" + }); + this.workspace = { + id: "4064f6ec-cb38-4ad0-af64-ee6467e63c82", + folders: [new Mi.md({ + uri: e, + name: "", + index: 0 + })] + } + } + getWorkspace() { + return this.workspace + } + } + + function Yi(e, t, i) { + if (!t) return; + if (!(e instanceof Ki)) return; + let n = []; + Object.keys(t).forEach((e => { + (0, hi.ei)(e) && n.push([`editor.${e}`, t[e]]), i && (0, hi.Pe)(e) && + n.push([`diffEditor.${e}`, t[e]]) + })), n.length > 0 && e.updateValues(n) + } + Gi.SCHEME = "inmemory"; + class Qi { + constructor(e) { + this._modelService = e + } + hasPreviewHandler() { + return !1 + } + apply(e, t) { + return Pi(this, void 0, void 0, (function*() { + const t = new Map; + for (let i of e) { + if (!(i instanceof ci.Gl)) throw new Error( + "bad edit - only text edits are supported"); + const e = this._modelService.getModel(i.resource); + if (!e) throw new Error("bad edit - model not found"); + if ("number" == typeof i.versionId && e.getVersionId() !== i.versionId) + throw new Error("bad state - model changed in the meantime"); + let n = t.get(e); + n || (n = [], t.set(e, n)), n.push(ui.h.replaceMove(j.e.lift(i.textEdit + .range), i.textEdit.text)) + } + let i = 0, + n = 0; + for (const [e, o] of t) e.pushStackElement(), e.pushEditOperations( + [], o, (() => [])), e.pushStackElement(), n += 1, i += o.length; + return { + ariaSummary: Xe.WU(Ai.UL.bulkEditServiceSummary, i, n) + } + })) + } + } + class Xi { + getUriLabel(e, t) { + return "file" === e.scheme ? e.fsPath : e.path + } + } + class Ji { + constructor(e, t) { + this._codeEditorService = e, this._container = t, this.onDidLayout = z + .ju.None + } + get dimension() { + return this._dimension || (this._dimension = he.D6(window.document.body)), + this._dimension + } + get container() { + return this._container + } + focus() { + var e; + null === (e = this._codeEditorService.getFocusedCodeEditor()) || void 0 === + e || e.focus() + } + } + var en = i(6346), + tn = i(6341), + nn = i(2360), + on = {}; + on.styleTagTransform = se(), on.setAttributes = ie(), on.insert = ee().bind( + null, "head"), on.domAPI = X(), on.insertStyleElement = oe(), Y()(nn.Z, + on), nn.Z && nn.Z.locals && nn.Z.locals; + var rn = i(8626), + sn = i(3841), + an = i(9052), + ln = i(9925), + dn = i(4504), + cn = {}; + cn.styleTagTransform = se(), cn.setAttributes = ie(), cn.insert = ee().bind( + null, "head"), cn.domAPI = X(), cn.insertStyleElement = oe(), Y()(dn.Z, + cn), dn.Z && dn.Z.locals && dn.Z.locals; + var hn, un = i(317), + gn = i(6781), + pn = i(4741), + mn = i(6830), + fn = i(7869), + _n = i(3910), + bn = i(7781), + vn = i(3046), + wn = i(9554); + class Cn { + constructor(e, t, i, n) { + this.originalLineStart = e, this.originalLineEnd = t, this.modifiedLineStart = + i, this.modifiedLineEnd = n + } + getType() { + return 0 === this.originalLineStart ? 1 : 0 === this.modifiedLineStart ? + 2 : 0 + } + } + class yn { + constructor(e) { + this.entries = e + } + } + const Sn = (0, wn.q5)("diff-review-insert", vn.lA.add, vi.N( + "diffReviewInsertIcon", "Icon for 'Insert' in diff review.")), + xn = (0, wn.q5)("diff-review-remove", vn.lA.remove, vi.N( + "diffReviewRemoveIcon", "Icon for 'Remove' in diff review.")), + kn = (0, wn.q5)("diff-review-close", vn.lA.close, vi.N( + "diffReviewCloseIcon", "Icon for 'Close' in diff review.")); + class Ln extends Le.JT { + constructor(e) { + super(), this._width = 0, this._diffEditor = e, this._isVisible = !1, + this.shadow = (0, rn.X)(document.createElement("div")), this.shadow.setClassName( + "diff-review-shadow"), this.actionBarContainer = (0, rn.X)(document + .createElement("div")), this.actionBarContainer.setClassName( + "diff-review-actions"), this._actionBar = this._register(new un.o( + this.actionBarContainer.domNode)), this._actionBar.push(new pn.aU( + "diffreview.close", vi.N("label.close", "Close"), + "close-diff-review " + bn.kS.asClassName(kn), !0, (() => { + return e = this, t = void 0, n = function*() { + return this.hide() + }, new((i = void 0) || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : + new i((function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })); + var e, t, i, n + })), { + label: !1, + icon: !0 + }), this.domNode = (0, rn.X)(document.createElement("div")), this.domNode + .setClassName("diff-review monaco-editor-background"), this._content = + (0, rn.X)(document.createElement("div")), this._content.setClassName( + "diff-review-content"), this._content.setAttribute("role", "code"), + this.scrollbar = this._register(new gn.s$(this._content.domNode, {})), + this.domNode.domNode.appendChild(this.scrollbar.getDomNode()), this._register( + e.onDidUpdateDiff((() => { + this._isVisible && (this._diffs = this._compute(), this._render()) + }))), this._register(e.getModifiedEditor().onDidChangeCursorPosition( + (() => { + this._isVisible && this._render() + }))), this._register(he.mu(this.domNode.domNode, "click", (e => { + e.preventDefault(); + let t = he.Fx(e.target, "diff-review-row"); + t && this._goToRow(t) + }))), this._register(he.mu(this.domNode.domNode, "keydown", (e => { + (e.equals(18) || e.equals(2066) || e.equals(530)) && (e.preventDefault(), + this._goToRow(this._getNextRow())), (e.equals(16) || e.equals( + 2064) || e.equals(528)) && (e.preventDefault(), this._goToRow( + this._getPrevRow())), (e.equals(9) || e.equals(2057) || e.equals( + 521) || e.equals(1033)) && (e.preventDefault(), this.hide()), ( + e.equals(10) || e.equals(3)) && (e.preventDefault(), this.accept()) + }))), this._diffs = [], this._currentDiff = null + } + prev() { + let e = 0; + if (this._isVisible || (this._diffs = this._compute()), this._isVisible) { + let t = -1; + for (let e = 0, i = this._diffs.length; e < i; e++) + if (this._diffs[e] === this._currentDiff) { + t = e; + break + } + e = this._diffs.length + t - 1 + } else e = this._findDiffIndex(this._diffEditor.getPosition()); + if (0 === this._diffs.length) return; + e %= this._diffs.length; + const t = this._diffs[e].entries; + this._diffEditor.setPosition(new U.L(t[0].modifiedLineStart, 1)), + this._diffEditor.setSelection({ + startColumn: 1, + startLineNumber: t[0].modifiedLineStart, + endColumn: 1073741824, + endLineNumber: t[t.length - 1].modifiedLineEnd + }), this._isVisible = !0, this._diffEditor.doLayout(), this._render(), + this._goToRow(this._getNextRow()) + } + next() { + let e = 0; + if (this._isVisible || (this._diffs = this._compute()), this._isVisible) { + let t = -1; + for (let e = 0, i = this._diffs.length; e < i; e++) + if (this._diffs[e] === this._currentDiff) { + t = e; + break + } + e = t + 1 + } else e = this._findDiffIndex(this._diffEditor.getPosition()); + if (0 === this._diffs.length) return; + e %= this._diffs.length; + const t = this._diffs[e].entries; + this._diffEditor.setPosition(new U.L(t[0].modifiedLineStart, 1)), + this._diffEditor.setSelection({ + startColumn: 1, + startLineNumber: t[0].modifiedLineStart, + endColumn: 1073741824, + endLineNumber: t[t.length - 1].modifiedLineEnd + }), this._isVisible = !0, this._diffEditor.doLayout(), this._render(), + this._goToRow(this._getNextRow()) + } + accept() { + let e = -1, + t = this._getCurrentFocusedRow(); + if (t) { + let i = parseInt(t.getAttribute("data-line"), 10); + isNaN(i) || (e = i) + } + this.hide(), -1 !== e && (this._diffEditor.setPosition(new U.L(e, 1)), + this._diffEditor.revealPosition(new U.L(e, 1), 1)) + } + hide() { + this._isVisible = !1, this._diffEditor.updateOptions({ + readOnly: !1 + }), this._diffEditor.focus(), this._diffEditor.doLayout(), this._render() + } + _getPrevRow() { + let e = this._getCurrentFocusedRow(); + return e ? e.previousElementSibling ? e.previousElementSibling : e : + this._getFirstRow() + } + _getNextRow() { + let e = this._getCurrentFocusedRow(); + return e ? e.nextElementSibling ? e.nextElementSibling : e : this._getFirstRow() + } + _getFirstRow() { + return this.domNode.domNode.querySelector(".diff-review-row") + } + _getCurrentFocusedRow() { + let e = document.activeElement; + return e && /diff-review-row/.test(e.className) ? e : null + } + _goToRow(e) { + let t = this._getCurrentFocusedRow(); + e.tabIndex = 0, e.focus(), t && t !== e && (t.tabIndex = -1), this.scrollbar + .scanDomNode() + } + isVisible() { + return this._isVisible + } + layout(e, t, i) { + this._width = t, this.shadow.setTop(e - 6), this.shadow.setWidth(t), + this.shadow.setHeight(this._isVisible ? 6 : 0), this.domNode.setTop( + e), this.domNode.setWidth(t), this.domNode.setHeight(i), this._content + .setHeight(i), this._content.setWidth(t), this._isVisible ? (this.actionBarContainer + .setAttribute("aria-hidden", "false"), this.actionBarContainer.setDisplay( + "block")) : (this.actionBarContainer.setAttribute("aria-hidden", + "true"), this.actionBarContainer.setDisplay("none")) + } + _compute() { + const e = this._diffEditor.getLineChanges(); + if (!e || 0 === e.length) return []; + const t = this._diffEditor.getOriginalEditor().getModel(), + i = this._diffEditor.getModifiedEditor().getModel(); + return t && i ? Ln._mergeAdjacent(e, t.getLineCount(), i.getLineCount()) : [] + } + static _mergeAdjacent(e, t, i) { + if (!e || 0 === e.length) return []; + let n = [], + o = 0; + for (let r = 0, s = e.length; r < s; r++) { + const a = e[r], + l = a.originalStartLineNumber, + d = a.originalEndLineNumber, + c = a.modifiedStartLineNumber, + h = a.modifiedEndLineNumber; + let u = [], + g = 0; { + const t = 0 === d ? l : l - 1, + i = 0 === h ? c : c - 1; + let n = 1, + o = 1; + if (r > 0) { + const t = e[r - 1]; + n = 0 === t.originalEndLineNumber ? t.originalStartLineNumber + 1 : + t.originalEndLineNumber + 1, o = 0 === t.modifiedEndLineNumber ? + t.modifiedStartLineNumber + 1 : t.modifiedEndLineNumber + 1 + } + let s = t - 3 + 1, + a = i - 3 + 1; + if (s < n) { + const e = n - s; + s += e, a += e + } + if (a < o) { + const e = o - a; + s += e, a += e + } + u[g++] = new Cn(s, t, a, i) + } + 0 !== d && (u[g++] = new Cn(l, d, 0, 0)), 0 !== h && (u[g++] = new Cn( + 0, 0, c, h)); { + const n = 0 === d ? l + 1 : d + 1, + o = 0 === h ? c + 1 : h + 1; + let a = t, + p = i; + if (r + 1 < s) { + const t = e[r + 1]; + a = 0 === t.originalEndLineNumber ? t.originalStartLineNumber : t.originalStartLineNumber - + 1, p = 0 === t.modifiedEndLineNumber ? t.modifiedStartLineNumber : + t.modifiedStartLineNumber - 1 + } + let m = n + 3 - 1, + f = o + 3 - 1; + if (m > a) { + const e = a - m; + m += e, f += e + } + if (f > p) { + const e = p - f; + m += e, f += e + } + u[g++] = new Cn(n, m, o, f) + } + n[o++] = new yn(u) + } + let r = n[0].entries, + s = [], + a = 0; + for (let e = 1, t = n.length; e < t; e++) { + const t = n[e].entries, + i = r[r.length - 1], + o = t[0]; + 0 === i.getType() && 0 === o.getType() && o.originalLineStart <= i.originalLineEnd ? + (r[r.length - 1] = new Cn(i.originalLineStart, o.originalLineEnd, i + .modifiedLineStart, o.modifiedLineEnd), r = r.concat(t.slice(1))) : + (s[a++] = new yn(r), r = t) + } + return s[a++] = new yn(r), s + } + _findDiffIndex(e) { + const t = e.lineNumber; + for (let e = 0, i = this._diffs.length; e < i; e++) { + const i = this._diffs[e].entries; + if (t <= i[i.length - 1].modifiedLineEnd) return e + } + return 0 + } + _render() { + const e = this._diffEditor.getOriginalEditor().getOptions(), + t = this._diffEditor.getModifiedEditor().getOptions(), + i = this._diffEditor.getOriginalEditor().getModel(), + n = this._diffEditor.getModifiedEditor().getModel(), + o = i.getOptions(), + r = n.getOptions(); + if (!this._isVisible || !i || !n) return he.PO(this._content.domNode), + this._currentDiff = null, void this.scrollbar.scanDomNode(); + this._diffEditor.updateOptions({ + readOnly: !0 + }); + const s = this._findDiffIndex(this._diffEditor.getPosition()); + if (this._diffs[s] === this._currentDiff) return; + this._currentDiff = this._diffs[s]; + const a = this._diffs[s].entries; + let l = document.createElement("div"); + l.className = "diff-review-table", l.setAttribute("role", "list"), l.setAttribute( + "aria-label", + 'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands' + ), an.V.applyFontInfoSlow(l, t.get(42)); + let d = 0, + c = 0, + h = 0, + u = 0; + for (let e = 0, t = a.length; e < t; e++) { + const t = a[e], + i = t.originalLineStart, + n = t.originalLineEnd, + o = t.modifiedLineStart, + r = t.modifiedLineEnd; + 0 !== i && (0 === d || i < d) && (d = i), 0 !== n && (0 === c || n > + c) && (c = n), 0 !== o && (0 === h || o < h) && (h = o), 0 !== r && + (0 === u || r > u) && (u = r) + } + let g = document.createElement("div"); + g.className = "diff-review-row"; + let p = document.createElement("div"); + p.className = "diff-review-cell diff-review-summary"; + const m = c - d + 1, + f = u - h + 1; + p.appendChild(document.createTextNode( + `${s+1}/${this._diffs.length}: @@ -${d},${m} +${h},${f} @@`)), g.setAttribute( + "data-line", String(h)); + const _ = e => 0 === e ? vi.N("no_lines_changed", "no lines changed") : + 1 === e ? vi.N("one_line_changed", "1 line changed") : vi.N( + "more_lines_changed", "{0} lines changed", e), + b = _(m), + v = _(f); + g.setAttribute("aria-label", vi.N({ + key: "header", + comment: ["This is the ARIA label for a git diff header.", + "A git diff header looks like this: @@ -154,12 +159,39 @@.", + "That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.", + "Variables 0 and 1 refer to the diff index out of total number of diffs.", + "Variables 2 and 4 will be numbers (a line number).", + 'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.' + ] + }, + "Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}", + s + 1, this._diffs.length, d, b, h, v)), g.appendChild(p), g.setAttribute( + "role", "listitem"), l.appendChild(g); + const w = t.get(58); + let C = h; + for (let s = 0, d = a.length; s < d; s++) { + const d = a[s]; + Ln._renderSection(l, d, C, w, this._width, e, i, o, t, n, r), 0 !== + d.modifiedLineStart && (C = d.modifiedLineEnd) + } + he.PO(this._content.domNode), this._content.domNode.appendChild(l), + this.scrollbar.scanDomNode() + } + static _renderSection(e, t, i, n, o, r, s, a, l, d, c) { + const h = t.getType(); + let u = "diff-review-row", + g = "", + p = null; + switch (h) { + case 1: + u = "diff-review-row line-insert", g = " char-insert", p = Sn; + break; + case 2: + u = "diff-review-row line-delete", g = " char-delete", p = xn + } + const m = t.originalLineStart, + f = t.originalLineEnd, + _ = t.modifiedLineStart, + b = t.modifiedLineEnd, + v = Math.max(b - _, f - m), + w = r.get(130), + C = w.glyphMarginWidth + w.lineNumbersWidth, + y = l.get(130), + S = 10 + y.glyphMarginWidth + y.lineNumbersWidth; + for (let t = 0; t <= v; t++) { + const f = 0 === m ? 0 : m + t, + b = 0 === _ ? 0 : _ + t, + v = document.createElement("div"); + v.style.minWidth = o + "px", v.className = u, v.setAttribute("role", + "listitem"), 0 !== b && (i = b), v.setAttribute("data-line", + String(i)); + let w = document.createElement("div"); + w.className = "diff-review-cell", w.style.height = `${n}px`, v.appendChild( + w); + const y = document.createElement("span"); + y.style.width = C + "px", y.style.minWidth = C + "px", y.className = + "diff-review-line-number" + g, 0 !== f ? y.appendChild(document.createTextNode( + String(f))) : y.innerText = " ", w.appendChild(y); + const x = document.createElement("span"); + x.style.width = S + "px", x.style.minWidth = S + "px", x.style.paddingRight = + "10px", x.className = "diff-review-line-number" + g, 0 !== b ? x.appendChild( + document.createTextNode(String(b))) : x.innerText = " ", w.appendChild( + x); + const k = document.createElement("span"); + if (k.className = "diff-review-spacer", p) { + const e = document.createElement("span"); + e.className = bn.kS.asClassName(p), e.innerText = " ", k.appendChild( + e) + } else k.innerText = " "; + let L; + if (w.appendChild(k), 0 !== b) { + let e = this._renderLine(d, l, c.tabSize, b); + Ln._ttPolicy && (e = Ln._ttPolicy.createHTML(e)), w.insertAdjacentHTML( + "beforeend", e), L = d.getLineContent(b) + } else { + let e = this._renderLine(s, r, a.tabSize, f); + Ln._ttPolicy && (e = Ln._ttPolicy.createHTML(e)), w.insertAdjacentHTML( + "beforeend", e), L = s.getLineContent(f) + } + 0 === L.length && (L = vi.N("blankLine", "blank")); + let N = ""; + switch (h) { + case 0: + N = f === b ? vi.N({ + key: "unchangedLine", + comment: [ + "The placeholders are contents of the line and should not be translated." + ] + }, "{0} unchanged line {1}", L, f) : vi.N("equalLine", + "{0} original line {1} modified line {2}", L, f, b); + break; + case 1: + N = vi.N("insertLine", "+ {0} modified line {1}", L, b); + break; + case 2: + N = vi.N("deleteLine", "- {0} original line {1}", L, f) + } + v.setAttribute("aria-label", N), e.appendChild(v) + } + } + static _renderLine(e, t, i, n) { + const o = e.getLineContent(n), + r = t.get(42), + s = Ft.A.createEmpty(o), + a = Wt.wA.isBasicASCII(o, e.mightContainNonBasicASCII()), + l = Wt.wA.containsRTL(o, a, e.mightContainRTL()); + return (0, Bt.tF)(new Bt.IJ(r.isMonospace && !t.get(28), r.canUseHalfwidthRightwardsArrow, + o, !1, a, l, 0, s, [], i, 0, r.spaceWidth, r.middotWidth, r.wsmiddotWidth, + t.get(105), t.get(88), t.get(82), t.get(43) !== B.n0.OFF, null)).html + } + } + Ln._ttPolicy = null === (hn = window.trustedTypes) || void 0 === hn ? + void 0 : hn.createPolicy("diffReview", { + createHTML: e => e + }), (0, bn.Ic)(((e, t) => { + const i = e.getColor(fn.hw); + i && t.addRule( + `.monaco-diff-editor .diff-review-line-number { color: ${i}; }`); + const n = e.getColor(_n._w); + n && t.addRule( + `.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }` + ) + })); + class Nn extends mn.R6 { + constructor() { + super({ + id: "editor.action.diffReview.next", + label: vi.N("editor.action.diffReview.next", + "Go to Next Difference"), + alias: "Go to Next Difference", + precondition: Ci.Ao.has("isInDiffEditor"), + kbOpts: { + kbExpr: null, + primary: 65, + weight: 100 + } + }) + } + run(e, t) { + const i = En(e); + i && i.diffReviewNext() + } + } + class Dn extends mn.R6 { + constructor() { + super({ + id: "editor.action.diffReview.prev", + label: vi.N("editor.action.diffReview.prev", + "Go to Previous Difference"), + alias: "Go to Previous Difference", + precondition: Ci.Ao.has("isInDiffEditor"), + kbOpts: { + kbExpr: null, + primary: 1089, + weight: 100 + } + }) + } + run(e, t) { + const i = En(e); + i && i.diffReviewPrev() + } + } + + function En(e) { + const t = e.get(ce.$), + i = t.listDiffEditors(), + n = t.getActiveCodeEditor(); + if (!n) return null; + for (let e = 0, t = i.length; e < t; e++) { + const t = i[e]; + if (t.getModifiedEditor().getId() === n.getId() || t.getOriginalEditor() + .getId() === n.getId()) return t + } + return null + }(0, mn.Qr)(Nn), (0, mn.Qr)(Dn); + var In = i(72), + Tn = i(6281), + Mn = i(2003), + An = i(2550), + Rn = i(2065), + On = i(972), + Pn = i(5606), + Fn = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class Bn extends Le.JT { + constructor(e, t, i, n, o, r) { + super(), this._viewZoneId = e, this._marginDomNode = t, this.editor = + i, this.diff = n, this._contextMenuService = o, this._clipboardService = + r, this._visibility = !1, this._marginDomNode.style.zIndex = "10", + this._diffActions = document.createElement("div"), this._diffActions + .className = vn.lA.lightBulb.classNames + " lightbulb-glyph", this._diffActions + .style.position = "absolute"; + const s = i.getOption(58), + a = i.getModel().getEOL(); + this._diffActions.style.right = "0px", this._diffActions.style.visibility = + "hidden", this._diffActions.style.height = `${s}px`, this._diffActions + .style.lineHeight = `${s}px`, this._marginDomNode.appendChild(this._diffActions); + const l = []; + l.push(new pn.aU("diff.clipboard.copyDeletedContent", n.originalEndLineNumber > + n.modifiedStartLineNumber ? vi.N( + "diff.clipboard.copyDeletedLinesContent.label", + "Copy deleted lines") : vi.N( + "diff.clipboard.copyDeletedLinesContent.single.label", + "Copy deleted line"), void 0, !0, (() => Fn(this, void 0, void 0, ( + function*() { + const e = new j.e(n.originalStartLineNumber, 1, n.originalEndLineNumber + + 1, 1), + t = n.originalModel.getValueInRange(e); + yield this._clipboardService.writeText(t) + }))))); + let d, c = 0; + n.originalEndLineNumber > n.modifiedStartLineNumber && (d = new pn.aU( + "diff.clipboard.copyDeletedLineContent", vi.N( + "diff.clipboard.copyDeletedLineContent.label", + "Copy deleted line ({0})", n.originalStartLineNumber), void 0, !0, ( + () => Fn(this, void 0, void 0, (function*() { + const e = n.originalModel.getLineContent(n.originalStartLineNumber + + c); + yield this._clipboardService.writeText(e) + })))), l.push(d)), i.getOption(80) || l.push(new pn.aU( + "diff.inline.revertChange", vi.N("diff.inline.revertChange.label", + "Revert this change"), void 0, !0, (() => Fn(this, void 0, void 0, ( + function*() { + const e = new j.e(n.originalStartLineNumber, 1, n.originalEndLineNumber, + n.originalModel.getLineMaxColumn(n.originalEndLineNumber)), + t = n.originalModel.getValueInRange(e); + if (0 === n.modifiedEndLineNumber) { + const e = i.getModel().getLineMaxColumn(n.modifiedStartLineNumber); + i.executeEdits("diffEditor", [{ + range: new j.e(n.modifiedStartLineNumber, e, n.modifiedStartLineNumber, + e), + text: a + t + }]) + } else { + const e = i.getModel().getLineMaxColumn(n.modifiedEndLineNumber); + i.executeEdits("diffEditor", [{ + range: new j.e(n.modifiedStartLineNumber, 1, n.modifiedEndLineNumber, + e), + text: t + }]) + } + }))))); + const h = (e, t) => { + this._contextMenuService.showContextMenu({ + getAnchor: () => ({ + x: e, + y: t + }), + getActions: () => (d && (d.label = vi.N( + "diff.clipboard.copyDeletedLineContent.label", + "Copy deleted line ({0})", n.originalStartLineNumber + c)), l), + autoSelectFirstItem: !0 + }) + }; + this._register(he.mu(this._diffActions, "mousedown", (e => { + const { + top: t, + height: i + } = he.i(this._diffActions); + let n = Math.floor(s / 3); + e.preventDefault(), h(e.posx, t + i + n) + }))), this._register(i.onMouseMove((e => { + (8 === e.target.type || 5 === e.target.type) && e.target.detail.viewZoneId === + this._viewZoneId ? (this.visibility = !0, c = this._updateLightBulbPosition( + this._marginDomNode, e.event.browserEvent.y, s)) : this.visibility = ! + 1 + }))), this._register(i.onMouseDown((e => { + !e.event.rightButton || 8 !== e.target.type && 5 !== e.target.type || + e.target.detail.viewZoneId === this._viewZoneId && (e.event.preventDefault(), + c = this._updateLightBulbPosition(this._marginDomNode, e.event + .browserEvent.y, s), h(e.event.posx, e.event.posy + s)) + }))) + } + get visibility() { + return this._visibility + } + set visibility(e) { + this._visibility !== e && (this._visibility = e, this._diffActions.style + .visibility = e ? "visible" : "hidden") + } + _updateLightBulbPosition(e, t, i) { + const { + top: n + } = he.i(e), o = t - n, r = Math.floor(o / i), s = r * i; + if (this._diffActions.style.top = `${s}px`, this.diff.viewLineCounts) { + let e = 0; + for (let t = 0; t < this.diff.viewLineCounts.length; t++) + if (e += this.diff.viewLineCounts[t], r < e) return t + } + return r + } + } + var Wn, zn = i(4972), + Vn = i(535), + Hn = i(4534), + Un = i(1185), + jn = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + class Kn { + constructor(e, t) { + this._contextMenuService = e, this._clipboardService = t, this._zones = [], + this._inlineDiffMargins = [], this._zonesMap = {}, this._decorations = [] + } + getForeignViewZones(e) { + return e.filter((e => !this._zonesMap[String(e.id)])) + } + clean(e) { + this._zones.length > 0 && e.changeViewZones((e => { + for (const t of this._zones) e.removeZone(t) + })), this._zones = [], this._zonesMap = {}, this._decorations = e.deltaDecorations( + this._decorations, []) + } + apply(e, t, i, n) { + const o = n ? ln.ZF.capture(e) : null; + e.changeViewZones((t => { + for (const e of this._zones) t.removeZone(e); + for (const e of this._inlineDiffMargins) e.dispose(); + this._zones = [], this._zonesMap = {}, this._inlineDiffMargins = []; + for (let n = 0, o = i.zones.length; n < o; n++) { + const o = i.zones[n]; + o.suppressMouseDown = !0; + const r = t.addZone(o); + this._zones.push(r), this._zonesMap[String(r)] = !0, i.zones[n].diff && + o.marginDomNode && (o.suppressMouseDown = !1, this._inlineDiffMargins + .push(new Bn(r, o.marginDomNode, e, i.zones[n].diff, this._contextMenuService, + this._clipboardService))) + } + })), o && o.restore(e), this._decorations = e.deltaDecorations(this._decorations, + i.decorations), t && t.setZones(i.overviewZones) + } + } + let $n = 0; + const qn = (0, wn.q5)("diff-insert", vn.lA.add, vi.N("diffInsertIcon", + "Line decoration for inserts in the diff editor.")), + Zn = (0, wn.q5)("diff-remove", vn.lA.remove, vi.N("diffRemoveIcon", + "Line decoration for removals in the diff editor.")), + Gn = null === (Wn = window.trustedTypes) || void 0 === Wn ? void 0 : Wn.createPolicy( + "diffEditorWidget", { + createHTML: e => e + }); + let Yn = class e extends Le.JT { + constructor(t, i, n, o, r, s, a, l, d, c, h, u) { + super(), this._editorProgressService = u, this._onDidDispose = this._register( + new z.Q5), this.onDidDispose = this._onDidDispose.event, this._onDidUpdateDiff = + this._register(new z.Q5), this.onDidUpdateDiff = this._onDidUpdateDiff + .event, this._onDidContentSizeChange = this._register(new z.Q5), + this._lastOriginalWarning = null, this._lastModifiedWarning = null, + this._editorWorkerService = r, this._codeEditorService = l, this._contextKeyService = + this._register(s.createScoped(t)), this._instantiationService = a.createChild( + new On.y([Ci.i6, this._contextKeyService])), this._contextKeyService + .createKey("isInDiffEditor", !0), this._themeService = d, this._notificationService = + c, this._id = ++$n, this._state = 0, this._updatingDiffProgress = + null, this._domElement = t, i = i || {}, this._renderSideBySide = !0, + void 0 !== i.renderSideBySide && (this._renderSideBySide = i.renderSideBySide), + this._maxComputationTime = 5e3, void 0 !== i.maxComputationTime && ( + this._maxComputationTime = i.maxComputationTime), this._ignoreTrimWhitespace = ! + 0, void 0 !== i.ignoreTrimWhitespace && (this._ignoreTrimWhitespace = + i.ignoreTrimWhitespace), this._renderIndicators = !0, void 0 !== i.renderIndicators && + (this._renderIndicators = i.renderIndicators), this._originalIsEditable = + (0, B.O7)(i.originalEditable, !1), this._diffCodeLens = (0, B.O7)(i.diffCodeLens, ! + 1), this._diffWordWrap = so(i.diffWordWrap, "inherit"), void 0 !== + i.isInEmbeddedEditor ? this._contextKeyService.createKey( + "isInEmbeddedDiffEditor", i.isInEmbeddedEditor) : this._contextKeyService + .createKey("isInEmbeddedDiffEditor", !1), this._renderOverviewRuler = ! + 0, void 0 !== i.renderOverviewRuler && (this._renderOverviewRuler = + Boolean(i.renderOverviewRuler)), this._updateDecorationsRunner = + this._register(new Be.pY((() => this._updateDecorations()), 0)), + this._containerDomElement = document.createElement("div"), this._containerDomElement + .className = e._getClassName(this._themeService.getColorTheme(), + this._renderSideBySide), this._containerDomElement.style.position = + "relative", this._containerDomElement.style.height = "100%", this._domElement + .appendChild(this._containerDomElement), this._overviewViewportDomElement = + (0, rn.X)(document.createElement("div")), this._overviewViewportDomElement + .setClassName("diffViewport"), this._overviewViewportDomElement.setPosition( + "absolute"), this._overviewDomElement = document.createElement( + "div"), this._overviewDomElement.className = "diffOverview", this._overviewDomElement + .style.position = "absolute", this._overviewDomElement.appendChild( + this._overviewViewportDomElement.domNode), this._register(he.mu( + this._overviewDomElement, "mousedown", (e => { + this._modifiedEditor.delegateVerticalScrollbarMouseDown(e) + }))), this._renderOverviewRuler && this._containerDomElement.appendChild( + this._overviewDomElement), this._originalDomNode = document.createElement( + "div"), this._originalDomNode.className = "editor original", this._originalDomNode + .style.position = "absolute", this._originalDomNode.style.height = + "100%", this._containerDomElement.appendChild(this._originalDomNode), + this._modifiedDomNode = document.createElement("div"), this._modifiedDomNode + .className = "editor modified", this._modifiedDomNode.style.position = + "absolute", this._modifiedDomNode.style.height = "100%", this._containerDomElement + .appendChild(this._modifiedDomNode), this._beginUpdateDecorationsTimeout = - + 1, this._currentlyChangingViewZones = !1, this._diffComputationToken = + 0, this._originalEditorState = new Kn(h, o), this._modifiedEditorState = + new Kn(h, o), this._isVisible = !0, this._isHandlingScrollEvent = !1, + this._elementSizeObserver = this._register(new Hn.I(this._containerDomElement, + i.dimension, (() => this._onDidContainerSizeChanged()))), i.automaticLayout && + this._elementSizeObserver.startObserving(), this._diffComputationResult = + null, this._originalEditor = this._createLeftHandSideEditor(i, n.originalEditor || {}), + this._modifiedEditor = this._createRightHandSideEditor(i, n.modifiedEditor || {}), + this._originalOverviewRuler = null, this._modifiedOverviewRuler = + null, this._reviewPane = new Ln(this), this._containerDomElement.appendChild( + this._reviewPane.domNode.domNode), this._containerDomElement.appendChild( + this._reviewPane.shadow.domNode), this._containerDomElement.appendChild( + this._reviewPane.actionBarContainer.domNode), this._enableSplitViewResizing = ! + 0, void 0 !== i.enableSplitViewResizing && (this._enableSplitViewResizing = + i.enableSplitViewResizing), this._renderSideBySide ? this._setStrategy( + new io(this._createDataSource(), this._enableSplitViewResizing)) : + this._setStrategy(new oo(this._createDataSource(), this._enableSplitViewResizing)), + this._register(d.onDidColorThemeChange((t => { + this._strategy && this._strategy.applyColors(t) && this._updateDecorationsRunner + .schedule(), this._containerDomElement.className = e._getClassName( + this._themeService.getColorTheme(), this._renderSideBySide) + }))); + const g = mn.Uc.getDiffEditorContributions(); + for (const e of g) try { + this._register(a.createInstance(e.ctor, this)) + } catch (e) { + (0, We.dL)(e) + } + this._codeEditorService.addDiffEditor(this) + } + _setState(e) { + this._state !== e && (this._state = e, this._updatingDiffProgress && + (this._updatingDiffProgress.done(), this._updatingDiffProgress = + null), 1 === this._state && (this._updatingDiffProgress = this._editorProgressService + .show(!0, 1e3))) + } + diffReviewNext() { + this._reviewPane.next() + } + diffReviewPrev() { + this._reviewPane.prev() + } + static _getClassName(e, t) { + let i = "monaco-diff-editor monaco-editor-background "; + return t && (i += "side-by-side "), i += (0, bn.m6)(e.type), i + } + _recreateOverviewRulers() { + this._renderOverviewRuler && (this._originalOverviewRuler && (this._overviewDomElement + .removeChild(this._originalOverviewRuler.getDomNode()), this._originalOverviewRuler + .dispose()), this._originalEditor.hasModel() && (this._originalOverviewRuler = + this._originalEditor.createOverviewRuler( + "original diffOverviewRuler"), this._overviewDomElement.appendChild( + this._originalOverviewRuler.getDomNode())), this._modifiedOverviewRuler && + (this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()), + this._modifiedOverviewRuler.dispose()), this._modifiedEditor.hasModel() && + (this._modifiedOverviewRuler = this._modifiedEditor.createOverviewRuler( + "modified diffOverviewRuler"), this._overviewDomElement.appendChild( + this._modifiedOverviewRuler.getDomNode())), this._layoutOverviewRulers() + ) + } + _createLeftHandSideEditor(t, i) { + const n = this._createInnerEditor(this._instantiationService, this._originalDomNode, + this._adjustOptionsForLeftHandSide(t), i); + this._register(n.onDidScrollChange((e => { + this._isHandlingScrollEvent || (e.scrollTopChanged || e.scrollLeftChanged || + e.scrollHeightChanged) && (this._isHandlingScrollEvent = !0, + this._modifiedEditor.setScrollPosition({ + scrollLeft: e.scrollLeft, + scrollTop: e.scrollTop + }), this._isHandlingScrollEvent = !1, this._layoutOverviewViewport() + ) + }))), this._register(n.onDidChangeViewZones((() => { + this._onViewZonesChanged() + }))), this._register(n.onDidChangeConfiguration((e => { + n.getModel() && (e.hasChanged(42) && this._updateDecorationsRunner + .schedule(), e.hasChanged(131) && (this._updateDecorationsRunner + .cancel(), this._updateDecorations())) + }))), this._register(n.onDidChangeModelContent((() => { + this._isVisible && this._beginUpdateDecorationsSoon() + }))); + const o = this._contextKeyService.createKey("isInDiffLeftEditor", n.hasWidgetFocus()); + return this._register(n.onDidFocusEditorWidget((() => o.set(!0)))), + this._register(n.onDidBlurEditorWidget((() => o.set(!1)))), this._register( + n.onDidContentSizeChange((t => { + const i = this._originalEditor.getContentWidth() + this._modifiedEditor + .getContentWidth() + e.ONE_OVERVIEW_WIDTH, + n = Math.max(this._modifiedEditor.getContentHeight(), this._originalEditor + .getContentHeight()); + this._onDidContentSizeChange.fire({ + contentHeight: n, + contentWidth: i, + contentHeightChanged: t.contentHeightChanged, + contentWidthChanged: t.contentWidthChanged + }) + }))), n + } + _createRightHandSideEditor(t, i) { + const n = this._createInnerEditor(this._instantiationService, this._modifiedDomNode, + this._adjustOptionsForRightHandSide(t), i); + this._register(n.onDidScrollChange((e => { + this._isHandlingScrollEvent || (e.scrollTopChanged || e.scrollLeftChanged || + e.scrollHeightChanged) && (this._isHandlingScrollEvent = !0, + this._originalEditor.setScrollPosition({ + scrollLeft: e.scrollLeft, + scrollTop: e.scrollTop + }), this._isHandlingScrollEvent = !1, this._layoutOverviewViewport() + ) + }))), this._register(n.onDidChangeViewZones((() => { + this._onViewZonesChanged() + }))), this._register(n.onDidChangeConfiguration((e => { + n.getModel() && (e.hasChanged(42) && this._updateDecorationsRunner + .schedule(), e.hasChanged(131) && (this._updateDecorationsRunner + .cancel(), this._updateDecorations())) + }))), this._register(n.onDidChangeModelContent((() => { + this._isVisible && this._beginUpdateDecorationsSoon() + }))), this._register(n.onDidChangeModelOptions((e => { + e.tabSize && this._updateDecorationsRunner.schedule() + }))); + const o = this._contextKeyService.createKey("isInDiffRightEditor", n.hasWidgetFocus()); + return this._register(n.onDidFocusEditorWidget((() => o.set(!0)))), + this._register(n.onDidBlurEditorWidget((() => o.set(!1)))), this._register( + n.onDidContentSizeChange((t => { + const i = this._originalEditor.getContentWidth() + this._modifiedEditor + .getContentWidth() + e.ONE_OVERVIEW_WIDTH, + n = Math.max(this._modifiedEditor.getContentHeight(), this._originalEditor + .getContentHeight()); + this._onDidContentSizeChange.fire({ + contentHeight: n, + contentWidth: i, + contentHeightChanged: t.contentHeightChanged, + contentWidthChanged: t.contentWidthChanged + }) + }))), n + } + _createInnerEditor(e, t, i, n) { + return e.createInstance(tn.Gm, t, i, n) + } + dispose() { + this._codeEditorService.removeDiffEditor(this), -1 !== this._beginUpdateDecorationsTimeout && + (window.clearTimeout(this._beginUpdateDecorationsTimeout), this._beginUpdateDecorationsTimeout = - + 1), this._cleanViewZonesAndDecorations(), this._originalOverviewRuler && + (this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()), + this._originalOverviewRuler.dispose()), this._modifiedOverviewRuler && + (this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()), + this._modifiedOverviewRuler.dispose()), this._overviewDomElement.removeChild( + this._overviewViewportDomElement.domNode), this._renderOverviewRuler && + this._containerDomElement.removeChild(this._overviewDomElement), + this._containerDomElement.removeChild(this._originalDomNode), this._originalEditor + .dispose(), this._containerDomElement.removeChild(this._modifiedDomNode), + this._modifiedEditor.dispose(), this._strategy.dispose(), this._containerDomElement + .removeChild(this._reviewPane.domNode.domNode), this._containerDomElement + .removeChild(this._reviewPane.shadow.domNode), this._containerDomElement + .removeChild(this._reviewPane.actionBarContainer.domNode), this._reviewPane + .dispose(), this._domElement.removeChild(this._containerDomElement), + this._onDidDispose.fire(), super.dispose() + } + getId() { + return this.getEditorType() + ":" + this._id + } + getEditorType() { + return Te.g.IDiffEditor + } + getLineChanges() { + return this._diffComputationResult ? this._diffComputationResult.changes : + null + } + getOriginalEditor() { + return this._originalEditor + } + getModifiedEditor() { + return this._modifiedEditor + } + updateOptions(t) { + let i = !1; + void 0 !== t.renderSideBySide && this._renderSideBySide !== t.renderSideBySide && + (this._renderSideBySide = t.renderSideBySide, i = !0), void 0 !== t.maxComputationTime && + (this._maxComputationTime = t.maxComputationTime, this._isVisible && + this._beginUpdateDecorationsSoon()); + let n = !1; + void 0 !== t.ignoreTrimWhitespace && this._ignoreTrimWhitespace !== t + .ignoreTrimWhitespace && (this._ignoreTrimWhitespace = t.ignoreTrimWhitespace, + n = !0), void 0 !== t.renderIndicators && this._renderIndicators !== + t.renderIndicators && (this._renderIndicators = t.renderIndicators, + n = !0), n && this._beginUpdateDecorations(), this._originalIsEditable = + (0, B.O7)(t.originalEditable, this._originalIsEditable), this._diffCodeLens = + (0, B.O7)(t.diffCodeLens, this._diffCodeLens), this._diffWordWrap = + so(t.diffWordWrap, this._diffWordWrap), this._modifiedEditor.updateOptions( + this._adjustOptionsForRightHandSide(t)), this._originalEditor.updateOptions( + this._adjustOptionsForLeftHandSide(t)), void 0 !== t.enableSplitViewResizing && + (this._enableSplitViewResizing = t.enableSplitViewResizing), this._strategy + .setEnableSplitViewResizing(this._enableSplitViewResizing), i && ( + this._renderSideBySide ? this._setStrategy(new io(this._createDataSource(), + this._enableSplitViewResizing)) : this._setStrategy(new oo(this._createDataSource(), + this._enableSplitViewResizing)), this._containerDomElement.className = + e._getClassName(this._themeService.getColorTheme(), this._renderSideBySide) + ), void 0 !== t.renderOverviewRuler && this._renderOverviewRuler !== + t.renderOverviewRuler && (this._renderOverviewRuler = t.renderOverviewRuler, + this._renderOverviewRuler ? this._containerDomElement.appendChild( + this._overviewDomElement) : this._containerDomElement.removeChild( + this._overviewDomElement)) + } + getModel() { + return { + original: this._originalEditor.getModel(), + modified: this._modifiedEditor.getModel() + } + } + setModel(e) { + if (e && (!e.original || !e.modified)) throw new Error(e.original ? + "DiffEditorWidget.setModel: Modified model is null" : + "DiffEditorWidget.setModel: Original model is null"); + this._cleanViewZonesAndDecorations(), this._originalEditor.setModel(e ? + e.original : null), this._modifiedEditor.setModel(e ? e.modified : + null), this._updateDecorationsRunner.cancel(), e && (this._originalEditor + .setScrollTop(0), this._modifiedEditor.setScrollTop(0)), this._diffComputationResult = + null, this._diffComputationToken++, this._setState(0), e && (this._recreateOverviewRulers(), + this._beginUpdateDecorations()), this._layoutOverviewViewport() + } + getDomNode() { + return this._domElement + } + getVisibleColumnFromPosition(e) { + return this._modifiedEditor.getVisibleColumnFromPosition(e) + } + getPosition() { + return this._modifiedEditor.getPosition() + } + setPosition(e) { + this._modifiedEditor.setPosition(e) + } + revealLine(e, t = 0) { + this._modifiedEditor.revealLine(e, t) + } + revealLineInCenter(e, t = 0) { + this._modifiedEditor.revealLineInCenter(e, t) + } + revealLineInCenterIfOutsideViewport(e, t = 0) { + this._modifiedEditor.revealLineInCenterIfOutsideViewport(e, t) + } + revealLineNearTop(e, t = 0) { + this._modifiedEditor.revealLineNearTop(e, t) + } + revealPosition(e, t = 0) { + this._modifiedEditor.revealPosition(e, t) + } + revealPositionInCenter(e, t = 0) { + this._modifiedEditor.revealPositionInCenter(e, t) + } + revealPositionInCenterIfOutsideViewport(e, t = 0) { + this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e, t) + } + revealPositionNearTop(e, t = 0) { + this._modifiedEditor.revealPositionNearTop(e, t) + } + getSelection() { + return this._modifiedEditor.getSelection() + } + getSelections() { + return this._modifiedEditor.getSelections() + } + setSelection(e) { + this._modifiedEditor.setSelection(e) + } + setSelections(e) { + this._modifiedEditor.setSelections(e) + } + revealLines(e, t, i = 0) { + this._modifiedEditor.revealLines(e, t, i) + } + revealLinesInCenter(e, t, i = 0) { + this._modifiedEditor.revealLinesInCenter(e, t, i) + } + revealLinesInCenterIfOutsideViewport(e, t, i = 0) { + this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e, t, i) + } + revealLinesNearTop(e, t, i = 0) { + this._modifiedEditor.revealLinesNearTop(e, t, i) + } + revealRange(e, t = 0, i = !1, n = !0) { + this._modifiedEditor.revealRange(e, t, i, n) + } + revealRangeInCenter(e, t = 0) { + this._modifiedEditor.revealRangeInCenter(e, t) + } + revealRangeInCenterIfOutsideViewport(e, t = 0) { + this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e, t) + } + revealRangeNearTop(e, t = 0) { + this._modifiedEditor.revealRangeNearTop(e, t) + } + revealRangeNearTopIfOutsideViewport(e, t = 0) { + this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e, t) + } + revealRangeAtTop(e, t = 0) { + this._modifiedEditor.revealRangeAtTop(e, t) + } + getSupportedActions() { + return this._modifiedEditor.getSupportedActions() + } + saveViewState() { + return { + original: this._originalEditor.saveViewState(), + modified: this._modifiedEditor.saveViewState() + } + } + restoreViewState(e) { + if (e && e.original && e.modified) { + const t = e; + this._originalEditor.restoreViewState(t.original), this._modifiedEditor + .restoreViewState(t.modified) + } + } + layout(e) { + this._elementSizeObserver.observe(e) + } + focus() { + this._modifiedEditor.focus() + } + hasTextFocus() { + return this._originalEditor.hasTextFocus() || this._modifiedEditor.hasTextFocus() + } + trigger(e, t, i) { + this._modifiedEditor.trigger(e, t, i) + } + changeDecorations(e) { + return this._modifiedEditor.changeDecorations(e) + } + _onDidContainerSizeChanged() { + this._doLayout() + } + _getReviewHeight() { + return this._reviewPane.isVisible() ? this._elementSizeObserver.getHeight() : + 0 + } + _layoutOverviewRulers() { + if (!this._renderOverviewRuler) return; + if (!this._originalOverviewRuler || !this._modifiedOverviewRuler) + return; + const t = this._elementSizeObserver.getHeight(), + i = this._getReviewHeight(), + n = e.ENTIRE_DIFF_OVERVIEW_WIDTH - 2 * e.ONE_OVERVIEW_WIDTH; + this._modifiedEditor.getLayoutInfo() && (this._originalOverviewRuler.setLayout({ + top: 0, + width: e.ONE_OVERVIEW_WIDTH, + right: n + e.ONE_OVERVIEW_WIDTH, + height: t - i + }), this._modifiedOverviewRuler.setLayout({ + top: 0, + right: 0, + width: e.ONE_OVERVIEW_WIDTH, + height: t - i + })) + } + _onViewZonesChanged() { + this._currentlyChangingViewZones || this._updateDecorationsRunner.schedule() + } + _beginUpdateDecorationsSoon() { + -1 !== this._beginUpdateDecorationsTimeout && (window.clearTimeout( + this._beginUpdateDecorationsTimeout), this._beginUpdateDecorationsTimeout = - + 1), this._beginUpdateDecorationsTimeout = window.setTimeout((() => + this._beginUpdateDecorations()), e.UPDATE_DIFF_DECORATIONS_DELAY) + } + static _equals(e, t) { + return !e && !t || !(!e || !t) && e.toString() === t.toString() + } + _beginUpdateDecorations() { + this._beginUpdateDecorationsTimeout = -1; + const t = this._originalEditor.getModel(), + i = this._modifiedEditor.getModel(); + if (!t || !i) return; + this._diffComputationToken++; + const n = this._diffComputationToken; + this._setState(1), this._editorWorkerService.canComputeDiff(t.uri, i.uri) ? + this._editorWorkerService.computeDiff(t.uri, i.uri, this._ignoreTrimWhitespace, + this._maxComputationTime).then((e => { + n === this._diffComputationToken && t === this._originalEditor.getModel() && + i === this._modifiedEditor.getModel() && (this._setState(2), + this._diffComputationResult = e, this._updateDecorationsRunner.schedule(), + this._onDidUpdateDiff.fire()) + }), (e => { + n === this._diffComputationToken && t === this._originalEditor.getModel() && + i === this._modifiedEditor.getModel() && (this._setState(2), + this._diffComputationResult = null, this._updateDecorationsRunner + .schedule()) + })) : e._equals(t.uri, this._lastOriginalWarning) && e._equals(i.uri, + this._lastModifiedWarning) || (this._lastOriginalWarning = t.uri, + this._lastModifiedWarning = i.uri, this._notificationService.warn( + vi.N("diff.tooLarge", + "Cannot compare files because one file is too large."))) + } + _cleanViewZonesAndDecorations() { + this._originalEditorState.clean(this._originalEditor), this._modifiedEditorState + .clean(this._modifiedEditor) + } + _updateDecorations() { + if (!this._originalEditor.getModel() || !this._modifiedEditor.getModel()) + return; + const e = this._diffComputationResult ? this._diffComputationResult.changes : [], + t = this._originalEditorState.getForeignViewZones(this._originalEditor + .getWhitespaces()), + i = this._modifiedEditorState.getForeignViewZones(this._modifiedEditor + .getWhitespaces()), + n = this._strategy.getEditorsDiffDecorations(e, this._ignoreTrimWhitespace, + this._renderIndicators, t, i); + try { + this._currentlyChangingViewZones = !0, this._originalEditorState.apply( + this._originalEditor, this._originalOverviewRuler, n.original, !1), + this._modifiedEditorState.apply(this._modifiedEditor, this._modifiedOverviewRuler, + n.modified, !0) + } finally { + this._currentlyChangingViewZones = !1 + } + } + _adjustOptionsForSubEditor(e) { + const t = Object.assign({}, e); + return t.inDiffEditor = !0, t.automaticLayout = !1, t.scrollbar = + Object.assign({}, t.scrollbar || {}), t.scrollbar.vertical = + "visible", t.folding = !1, t.codeLens = this._diffCodeLens, t.fixedOverflowWidgets = ! + 0, t.minimap = Object.assign({}, t.minimap || {}), t.minimap.enabled = ! + 1, t + } + _adjustOptionsForLeftHandSide(e) { + const t = this._adjustOptionsForSubEditor(e); + return this._renderSideBySide ? t.wordWrapOverride1 = this._diffWordWrap : + t.wordWrapOverride1 = "off", e.originalAriaLabel && (t.ariaLabel = e + .originalAriaLabel), t.readOnly = !this._originalIsEditable, t.extraEditorClassName = + "original-in-monaco-diff-editor", Object.assign(Object.assign({}, t), { + dimension: { + height: 0, + width: 0 + } + }) + } + _adjustOptionsForRightHandSide(t) { + const i = this._adjustOptionsForSubEditor(t); + return t.modifiedAriaLabel && (i.ariaLabel = t.modifiedAriaLabel), i.wordWrapOverride1 = + this._diffWordWrap, i.revealHorizontalRightPadding = B.BH.revealHorizontalRightPadding + .defaultValue + e.ENTIRE_DIFF_OVERVIEW_WIDTH, i.scrollbar.verticalHasArrows = ! + 1, i.extraEditorClassName = "modified-in-monaco-diff-editor", Object + .assign(Object.assign({}, i), { + dimension: { + height: 0, + width: 0 + } + }) + } + doLayout() { + this._elementSizeObserver.observe(), this._doLayout() + } + _doLayout() { + const t = this._elementSizeObserver.getWidth(), + i = this._elementSizeObserver.getHeight(), + n = this._getReviewHeight(), + o = this._strategy.layout(); + this._originalDomNode.style.width = o + "px", this._originalDomNode.style + .left = "0px", this._modifiedDomNode.style.width = t - o + "px", + this._modifiedDomNode.style.left = o + "px", this._overviewDomElement + .style.top = "0px", this._overviewDomElement.style.height = i - n + + "px", this._overviewDomElement.style.width = e.ENTIRE_DIFF_OVERVIEW_WIDTH + + "px", this._overviewDomElement.style.left = t - e.ENTIRE_DIFF_OVERVIEW_WIDTH + + "px", this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH), + this._overviewViewportDomElement.setHeight(30), this._originalEditor + .layout({ + width: o, + height: i - n + }), this._modifiedEditor.layout({ + width: t - o - (this._renderOverviewRuler ? e.ENTIRE_DIFF_OVERVIEW_WIDTH : + 0), + height: i - n + }), (this._originalOverviewRuler || this._modifiedOverviewRuler) && + this._layoutOverviewRulers(), this._reviewPane.layout(i - n, t, n), + this._layoutOverviewViewport() + } + _layoutOverviewViewport() { + const e = this._computeOverviewViewport(); + e ? (this._overviewViewportDomElement.setTop(e.top), this._overviewViewportDomElement + .setHeight(e.height)) : (this._overviewViewportDomElement.setTop(0), + this._overviewViewportDomElement.setHeight(0)) + } + _computeOverviewViewport() { + const e = this._modifiedEditor.getLayoutInfo(); + if (!e) return null; + const t = this._modifiedEditor.getScrollTop(), + i = this._modifiedEditor.getScrollHeight(), + n = Math.max(0, e.height), + o = Math.max(0, n - 0), + r = i > 0 ? o / i : 0; + return { + height: Math.max(0, Math.floor(e.height * r)), + top: Math.floor(t * r) + } + } + _createDataSource() { + return { + getWidth: () => this._elementSizeObserver.getWidth(), + getHeight: () => this._elementSizeObserver.getHeight() - this._getReviewHeight(), + getOptions: () => ({ + renderOverviewRuler: this._renderOverviewRuler + }), + getContainerDomNode: () => this._containerDomElement, + relayoutEditors: () => { + this._doLayout() + }, + getOriginalEditor: () => this._originalEditor, + getModifiedEditor: () => this._modifiedEditor + } + } + _setStrategy(e) { + this._strategy && this._strategy.dispose(), this._strategy = e, e.applyColors( + this._themeService.getColorTheme()), this._diffComputationResult && + this._updateDecorations(), this._doLayout() + } + _getLineChangeAtOrBeforeLineNumber(e, t) { + const i = this._diffComputationResult ? this._diffComputationResult.changes : []; + if (0 === i.length || e < t(i[0])) return null; + let n = 0, + o = i.length - 1; + for (; n < o;) { + const r = Math.floor((n + o) / 2), + s = t(i[r]), + a = r + 1 <= o ? t(i[r + 1]) : 1073741824; + e < s ? o = r - 1 : e >= a ? n = r + 1 : (n = r, o = r) + } + return i[n] + } + _getEquivalentLineForOriginalLineNumber(e) { + const t = this._getLineChangeAtOrBeforeLineNumber(e, (e => e.originalStartLineNumber)); + if (!t) return e; + const i = t.originalStartLineNumber + (t.originalEndLineNumber > 0 ? + -1 : 0), + n = t.modifiedStartLineNumber + (t.modifiedEndLineNumber > 0 ? -1 : + 0), + o = t.originalEndLineNumber > 0 ? t.originalEndLineNumber - t.originalStartLineNumber + + 1 : 0, + r = t.modifiedEndLineNumber > 0 ? t.modifiedEndLineNumber - t.modifiedStartLineNumber + + 1 : 0, + s = e - i; + return s <= o ? n + Math.min(s, r) : n + r - o + s + } + _getEquivalentLineForModifiedLineNumber(e) { + const t = this._getLineChangeAtOrBeforeLineNumber(e, (e => e.modifiedStartLineNumber)); + if (!t) return e; + const i = t.originalStartLineNumber + (t.originalEndLineNumber > 0 ? + -1 : 0), + n = t.modifiedStartLineNumber + (t.modifiedEndLineNumber > 0 ? -1 : + 0), + o = t.originalEndLineNumber > 0 ? t.originalEndLineNumber - t.originalStartLineNumber + + 1 : 0, + r = t.modifiedEndLineNumber > 0 ? t.modifiedEndLineNumber - t.modifiedStartLineNumber + + 1 : 0, + s = e - n; + return s <= r ? i + Math.min(s, o) : i + o - r + s + } + getDiffLineInformationForOriginal(e) { + return this._diffComputationResult ? { + equivalentLineNumber: this._getEquivalentLineForOriginalLineNumber( + e) + } : null + } + getDiffLineInformationForModified(e) { + return this._diffComputationResult ? { + equivalentLineNumber: this._getEquivalentLineForModifiedLineNumber( + e) + } : null + } + }; + Yn.ONE_OVERVIEW_WIDTH = 15, Yn.ENTIRE_DIFF_OVERVIEW_WIDTH = 30, Yn.UPDATE_DIFF_DECORATIONS_DELAY = + 200, Yn = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([jn(3, zn.p), jn(4, Oe.p), jn(5, Ci.i6), jn(6, Rn.TG), jn(7, ce.$), jn( + 8, bn.XE), jn(9, Ti.lT), jn(10, Pn.i), jn(11, Vn.e)], Yn); + class Qn extends Le.JT { + constructor(e) { + super(), this._dataSource = e, this._insertColor = null, this._removeColor = + null + } + applyColors(e) { + const t = (e.getColor(_n.yp) || _n.Cz).transparent(2), + i = (e.getColor(_n.P4) || _n.ke).transparent(2), + n = !t.equals(this._insertColor) || !i.equals(this._removeColor); + return this._insertColor = t, this._removeColor = i, n + } + getEditorsDiffDecorations(e, t, i, n, o) { + o = o.sort(((e, t) => e.afterLineNumber - t.afterLineNumber)), n = n.sort( + ((e, t) => e.afterLineNumber - t.afterLineNumber)); + const r = this._getViewZones(e, n, o, i), + s = this._getOriginalEditorDecorations(e, t, i), + a = this._getModifiedEditorDecorations(e, t, i); + return { + original: { + decorations: s.decorations, + overviewZones: s.overviewZones, + zones: r.original + }, + modified: { + decorations: a.decorations, + overviewZones: a.overviewZones, + zones: r.modified + } + } + } + } + class Xn { + constructor(e) { + this._source = e, this._index = -1, this.current = null, this.advance() + } + advance() { + this._index++, this._index < this._source.length ? this.current = this + ._source[this._index] : this.current = null + } + } + class Jn { + constructor(e, t, i, n, o) { + this._lineChanges = e, this._originalForeignVZ = t, this._modifiedForeignVZ = + i, this._originalEditor = n, this._modifiedEditor = o + } + static _getViewLineCount(e, t, i) { + const n = e.getModel(), + o = e._getViewModel(); + if (n && o) { + const e = ho(n, o, t, i); + return e.endLineNumber - e.startLineNumber + 1 + } + return i - t + 1 + } + getViewZones() { + const e = this._originalEditor.getOption(58), + t = this._modifiedEditor.getOption(58), + i = -1 !== this._originalEditor.getOption(131).wrappingColumn, + n = -1 !== this._modifiedEditor.getOption(131).wrappingColumn, + o = i || n, + r = this._originalEditor.getModel(), + s = this._originalEditor._getViewModel().coordinatesConverter, + a = this._modifiedEditor._getViewModel().coordinatesConverter, + l = [], + d = []; + let c = 0, + h = 0, + u = 0, + g = 0, + p = 0, + m = 0; + const f = (e, t) => e.afterLineNumber - t.afterLineNumber, + _ = (e, t) => { + if (null === t.domNode && e.length > 0) { + const i = e[e.length - 1]; + if (i.afterLineNumber === t.afterLineNumber && null === i.domNode) + return void(i.heightInLines += t.heightInLines) + } + e.push(t) + }, + b = new Xn(this._modifiedForeignVZ), + v = new Xn(this._originalForeignVZ); + let w = 1, + C = 1; + for (let i = 0, n = this._lineChanges.length; i <= n; i++) { + const y = i < n ? this._lineChanges[i] : null; + null !== y ? (u = y.originalStartLineNumber + (y.originalEndLineNumber > + 0 ? -1 : 0), g = y.modifiedStartLineNumber + (y.modifiedEndLineNumber > + 0 ? -1 : 0), h = y.originalEndLineNumber > 0 ? Jn._getViewLineCount( + this._originalEditor, y.originalStartLineNumber, y.originalEndLineNumber + ) : 0, c = y.modifiedEndLineNumber > 0 ? Jn._getViewLineCount(this._modifiedEditor, + y.modifiedStartLineNumber, y.modifiedEndLineNumber) : 0, p = Math.max( + y.originalStartLineNumber, y.originalEndLineNumber), m = Math.max( + y.modifiedStartLineNumber, y.modifiedEndLineNumber)) : (u += 1e7 + + h, g += 1e7 + c, p = u, m = g); + let S = [], + x = []; + if (o) { + let e; + e = y ? y.originalEndLineNumber > 0 ? y.originalStartLineNumber - w : + y.modifiedStartLineNumber - C : r.getLineCount() - w; + for (let t = 0; t < e; t++) { + const e = w + t, + i = C + t, + n = s.getModelLineViewLineCount(e), + o = a.getModelLineViewLineCount(i); + n < o ? S.push({ + afterLineNumber: e, + heightInLines: o - n, + domNode: null, + marginDomNode: null + }) : n > o && x.push({ + afterLineNumber: i, + heightInLines: n - o, + domNode: null, + marginDomNode: null + }) + } + y && (w = (y.originalEndLineNumber > 0 ? y.originalEndLineNumber : y + .originalStartLineNumber) + 1, C = (y.modifiedEndLineNumber > 0 ? + y.modifiedEndLineNumber : y.modifiedStartLineNumber) + 1) + } + for (; b.current && b.current.afterLineNumber <= m;) { + let e; + e = b.current.afterLineNumber <= g ? u - g + b.current.afterLineNumber : + p; + let i = null; + y && y.modifiedStartLineNumber <= b.current.afterLineNumber && b.current + .afterLineNumber <= y.modifiedEndLineNumber && (i = this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()), + S.push({ + afterLineNumber: e, + heightInLines: b.current.height / t, + domNode: null, + marginDomNode: i + }), b.advance() + } + for (; v.current && v.current.afterLineNumber <= p;) { + let t; + t = v.current.afterLineNumber <= u ? g - u + v.current.afterLineNumber : + m, x.push({ + afterLineNumber: t, + heightInLines: v.current.height / e, + domNode: null + }), v.advance() + } + if (null !== y && ao(y)) { + const e = this._produceOriginalFromDiff(y, h, c); + e && S.push(e) + } + if (null !== y && lo(y)) { + const e = this._produceModifiedFromDiff(y, h, c); + e && x.push(e) + } + let k = 0, + L = 0; + for (S = S.sort(f), x = x.sort(f); k < S.length && L < x.length;) { + const e = S[k], + t = x[L], + i = e.afterLineNumber - u, + n = t.afterLineNumber - g; + i < n ? (_(l, e), k++) : n < i ? (_(d, t), L++) : e.shouldNotShrink ? + (_(l, e), k++) : t.shouldNotShrink ? (_(d, t), L++) : e.heightInLines >= + t.heightInLines ? (e.heightInLines -= t.heightInLines, L++) : (t.heightInLines -= + e.heightInLines, k++) + } + for (; k < S.length;) _(l, S[k]), k++; + for (; L < x.length;) _(d, x[L]), L++ + } + return { + original: Jn._ensureDomNodes(l), + modified: Jn._ensureDomNodes(d) + } + } + static _ensureDomNodes(e) { + return e.map((e => (e.domNode || (e.domNode = co()), e))) + } + } + + function eo(e, t, i, n, o) { + return { + range: new j.e(e, t, i, n), + options: o + } + } + const to = { + charDelete: Tn.qx.register({ + description: "diff-editor-char-delete", + className: "char-delete" + }), + charDeleteWholeLine: Tn.qx.register({ + description: "diff-editor-char-delete-whole-line", + className: "char-delete", + isWholeLine: !0 + }), + charInsert: Tn.qx.register({ + description: "diff-editor-char-insert", + className: "char-insert" + }), + charInsertWholeLine: Tn.qx.register({ + description: "diff-editor-char-insert-whole-line", + className: "char-insert", + isWholeLine: !0 + }), + lineInsert: Tn.qx.register({ + description: "diff-editor-line-insert", + className: "line-insert", + marginClassName: "line-insert", + isWholeLine: !0 + }), + lineInsertWithSign: Tn.qx.register({ + description: "diff-editor-line-insert-with-sign", + className: "line-insert", + linesDecorationsClassName: "insert-sign " + bn.kS.asClassName(qn), + marginClassName: "line-insert", + isWholeLine: !0 + }), + lineDelete: Tn.qx.register({ + description: "diff-editor-line-delete", + className: "line-delete", + marginClassName: "line-delete", + isWholeLine: !0 + }), + lineDeleteWithSign: Tn.qx.register({ + description: "diff-editor-line-delete-with-sign", + className: "line-delete", + linesDecorationsClassName: "delete-sign " + bn.kS.asClassName(Zn), + marginClassName: "line-delete", + isWholeLine: !0 + }), + lineDeleteMargin: Tn.qx.register({ + description: "diff-editor-line-delete-margin", + marginClassName: "line-delete" + }) + }; + class io extends Qn { + constructor(e, t) { + super(e), this._disableSash = !1 === t, this._sashRatio = null, this._sashPosition = + null, this._startSashPosition = null, this._sash = this._register(new sn + .g(this._dataSource.getContainerDomNode(), this, { + orientation: 0 + })), this._disableSash && (this._sash.state = 0), this._sash.onDidStart( + (() => this._onSashDragStart())), this._sash.onDidChange((e => this._onSashDrag( + e))), this._sash.onDidEnd((() => this._onSashDragEnd())), this._sash + .onDidReset((() => this._onSashReset())) + } + setEnableSplitViewResizing(e) { + const t = !1 === e; + this._disableSash !== t && (this._disableSash = t, this._sash.state = + this._disableSash ? 0 : 3) + } + layout(e = this._sashRatio) { + const t = this._dataSource.getWidth() - (this._dataSource.getOptions() + .renderOverviewRuler ? Yn.ENTIRE_DIFF_OVERVIEW_WIDTH : 0); + let i = Math.floor((e || .5) * t); + const n = Math.floor(.5 * t); + return i = this._disableSash ? n : i || n, t > 2 * io.MINIMUM_EDITOR_WIDTH ? + (i < io.MINIMUM_EDITOR_WIDTH && (i = io.MINIMUM_EDITOR_WIDTH), i > t - + io.MINIMUM_EDITOR_WIDTH && (i = t - io.MINIMUM_EDITOR_WIDTH)) : i = + n, this._sashPosition !== i && (this._sashPosition = i, this._sash.layout()), + this._sashPosition + } + _onSashDragStart() { + this._startSashPosition = this._sashPosition + } + _onSashDrag(e) { + const t = this._dataSource.getWidth() - (this._dataSource.getOptions() + .renderOverviewRuler ? Yn.ENTIRE_DIFF_OVERVIEW_WIDTH : 0), + i = this.layout((this._startSashPosition + (e.currentX - e.startX)) / + t); + this._sashRatio = i / t, this._dataSource.relayoutEditors() + } + _onSashDragEnd() { + this._sash.layout() + } + _onSashReset() { + this._sashRatio = .5, this._dataSource.relayoutEditors(), this._sash.layout() + } + getVerticalSashTop(e) { + return 0 + } + getVerticalSashLeft(e) { + return this._sashPosition + } + getVerticalSashHeight(e) { + return this._dataSource.getHeight() + } + _getViewZones(e, t, i) { + const n = this._dataSource.getOriginalEditor(), + o = this._dataSource.getModifiedEditor(); + return new no(e, t, i, n, o).getViewZones() + } + _getOriginalEditorDecorations(e, t, i) { + const n = this._dataSource.getOriginalEditor(), + o = String(this._removeColor), + r = { + decorations: [], + overviewZones: [] + }, + s = n.getModel(), + a = n._getViewModel(); + for (const n of e) + if (lo(n)) { + r.decorations.push({ + range: new j.e(n.originalStartLineNumber, 1, n.originalEndLineNumber, + 1073741824), + options: i ? to.lineDeleteWithSign : to.lineDelete + }), ao(n) && n.charChanges || r.decorations.push(eo(n.originalStartLineNumber, + 1, n.originalEndLineNumber, 1073741824, to.charDeleteWholeLine)); + const e = ho(s, a, n.originalStartLineNumber, n.originalEndLineNumber); + if (r.overviewZones.push(new Mn.EY(e.startLineNumber, e.endLineNumber, + o)), n.charChanges) + for (const e of n.charChanges) + if (lo(e)) + if (t) + for (let t = e.originalStartLineNumber; t <= e.originalEndLineNumber; t++) { + let i, n; + i = t === e.originalStartLineNumber ? e.originalStartColumn : s + .getLineFirstNonWhitespaceColumn(t), n = t === e.originalEndLineNumber ? + e.originalEndColumn : s.getLineLastNonWhitespaceColumn(t), r.decorations + .push(eo(t, i, t, n, to.charDelete)) + } else r.decorations.push(eo(e.originalStartLineNumber, e.originalStartColumn, + e.originalEndLineNumber, e.originalEndColumn, to.charDelete)) + } + return r + } + _getModifiedEditorDecorations(e, t, i) { + const n = this._dataSource.getModifiedEditor(), + o = String(this._insertColor), + r = { + decorations: [], + overviewZones: [] + }, + s = n.getModel(), + a = n._getViewModel(); + for (const n of e) + if (ao(n)) { + r.decorations.push({ + range: new j.e(n.modifiedStartLineNumber, 1, n.modifiedEndLineNumber, + 1073741824), + options: i ? to.lineInsertWithSign : to.lineInsert + }), lo(n) && n.charChanges || r.decorations.push(eo(n.modifiedStartLineNumber, + 1, n.modifiedEndLineNumber, 1073741824, to.charInsertWholeLine)); + const e = ho(s, a, n.modifiedStartLineNumber, n.modifiedEndLineNumber); + if (r.overviewZones.push(new Mn.EY(e.startLineNumber, e.endLineNumber, + o)), n.charChanges) + for (const e of n.charChanges) + if (ao(e)) + if (t) + for (let t = e.modifiedStartLineNumber; t <= e.modifiedEndLineNumber; t++) { + let i, n; + i = t === e.modifiedStartLineNumber ? e.modifiedStartColumn : s + .getLineFirstNonWhitespaceColumn(t), n = t === e.modifiedEndLineNumber ? + e.modifiedEndColumn : s.getLineLastNonWhitespaceColumn(t), r.decorations + .push(eo(t, i, t, n, to.charInsert)) + } else r.decorations.push(eo(e.modifiedStartLineNumber, e.modifiedStartColumn, + e.modifiedEndLineNumber, e.modifiedEndColumn, to.charInsert)) + } + return r + } + } + io.MINIMUM_EDITOR_WIDTH = 100; + class no extends Jn { + constructor(e, t, i, n, o) { + super(e, t, i, n, o) + } + _createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion() { + return null + } + _produceOriginalFromDiff(e, t, i) { + return i > t ? { + afterLineNumber: Math.max(e.originalStartLineNumber, e.originalEndLineNumber), + heightInLines: i - t, + domNode: null + } : null + } + _produceModifiedFromDiff(e, t, i) { + return t > i ? { + afterLineNumber: Math.max(e.modifiedStartLineNumber, e.modifiedEndLineNumber), + heightInLines: t - i, + domNode: null + } : null + } + } + class oo extends Qn { + constructor(e, t) { + super(e), this._decorationsLeft = e.getOriginalEditor().getLayoutInfo() + .decorationsLeft, this._register(e.getOriginalEditor().onDidLayoutChange( + (t => { + this._decorationsLeft !== t.decorationsLeft && (this._decorationsLeft = + t.decorationsLeft, e.relayoutEditors()) + }))) + } + setEnableSplitViewResizing(e) {} + _getViewZones(e, t, i, n) { + const o = this._dataSource.getOriginalEditor(), + r = this._dataSource.getModifiedEditor(); + return new ro(e, t, i, o, r, n).getViewZones() + } + _getOriginalEditorDecorations(e, t, i) { + const n = String(this._removeColor), + o = { + decorations: [], + overviewZones: [] + }, + r = this._dataSource.getOriginalEditor(), + s = r.getModel(), + a = r._getViewModel(); + for (const t of e) + if (lo(t)) { + o.decorations.push({ + range: new j.e(t.originalStartLineNumber, 1, t.originalEndLineNumber, + 1073741824), + options: to.lineDeleteMargin + }); + const e = ho(s, a, t.originalStartLineNumber, t.originalEndLineNumber); + o.overviewZones.push(new Mn.EY(e.startLineNumber, e.endLineNumber, n)) + } + return o + } + _getModifiedEditorDecorations(e, t, i) { + const n = this._dataSource.getModifiedEditor(), + o = String(this._insertColor), + r = { + decorations: [], + overviewZones: [] + }, + s = n.getModel(), + a = n._getViewModel(); + for (const n of e) + if (ao(n)) { + r.decorations.push({ + range: new j.e(n.modifiedStartLineNumber, 1, n.modifiedEndLineNumber, + 1073741824), + options: i ? to.lineInsertWithSign : to.lineInsert + }); + const e = ho(s, a, n.modifiedStartLineNumber, n.modifiedEndLineNumber); + if (r.overviewZones.push(new Mn.EY(e.startLineNumber, e.endLineNumber, + o)), n.charChanges) { + for (const e of n.charChanges) + if (ao(e)) + if (t) + for (let t = e.modifiedStartLineNumber; t <= e.modifiedEndLineNumber; t++) { + let i, n; + i = t === e.modifiedStartLineNumber ? e.modifiedStartColumn : s + .getLineFirstNonWhitespaceColumn(t), n = t === e.modifiedEndLineNumber ? + e.modifiedEndColumn : s.getLineLastNonWhitespaceColumn(t), r.decorations + .push(eo(t, i, t, n, to.charInsert)) + } else r.decorations.push(eo(e.modifiedStartLineNumber, e.modifiedStartColumn, + e.modifiedEndLineNumber, e.modifiedEndColumn, to.charInsert)) + } else r.decorations.push(eo(n.modifiedStartLineNumber, 1, n.modifiedEndLineNumber, + 1073741824, to.charInsertWholeLine)) + } + return r + } + layout() { + return Math.max(5, this._decorationsLeft) + } + } + class ro extends Jn { + constructor(e, t, i, n, o, r) { + super(e, t, i, n, o), this._originalModel = n.getModel(), this._renderIndicators = + r, this._pendingLineChange = [], this._pendingViewZones = [], this._lineBreaksComputer = + this._modifiedEditor._getViewModel().createLineBreaksComputer() + } + getViewZones() { + const e = super.getViewZones(); + return this._finalize(e), e + } + _createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion() { + const e = document.createElement("div"); + return e.className = "inline-added-margin-view-zone", e + } + _produceOriginalFromDiff(e, t, i) { + const n = document.createElement("div"); + return n.className = "inline-added-margin-view-zone", { + afterLineNumber: Math.max(e.originalStartLineNumber, e.originalEndLineNumber), + heightInLines: i, + domNode: document.createElement("div"), + marginDomNode: n + } + } + _produceModifiedFromDiff(e, t, i) { + const n = document.createElement("div"); + n.className = `view-lines line-delete ${Un.S}`; + const o = document.createElement("div"); + o.className = "inline-deleted-margin-view-zone"; + const r = { + shouldNotShrink: !0, + afterLineNumber: 0 === e.modifiedEndLineNumber ? e.modifiedStartLineNumber : e + .modifiedStartLineNumber - 1, + heightInLines: t, + minWidthInPx: 0, + domNode: n, + marginDomNode: o, + diff: { + originalStartLineNumber: e.originalStartLineNumber, + originalEndLineNumber: e.originalEndLineNumber, + modifiedStartLineNumber: e.modifiedStartLineNumber, + modifiedEndLineNumber: e.modifiedEndLineNumber, + originalModel: this._originalModel, + viewLineCounts: null + } + }; + for (let t = e.originalStartLineNumber; t <= e.originalEndLineNumber; t++) + this._lineBreaksComputer.addRequest(this._originalModel.getLineContent( + t), null, null); + return this._pendingLineChange.push(e), this._pendingViewZones.push(r), + r + } + _finalize(e) { + const t = this._modifiedEditor.getOptions(), + i = this._modifiedEditor.getModel().getOptions().tabSize, + n = t.get(42), + o = t.get(28), + r = n.typicalHalfwidthCharacterWidth, + s = t.get(93), + a = this._originalModel.mightContainNonBasicASCII(), + l = this._originalModel.mightContainRTL(), + d = t.get(58), + c = t.get(130).decorationsWidth, + h = t.get(105), + u = t.get(88), + g = t.get(82), + p = t.get(43), + m = this._lineBreaksComputer.finalize(); + let f = 0; + for (let t = 0; t < this._pendingLineChange.length; t++) { + const _ = this._pendingLineChange[t], + b = this._pendingViewZones[t], + v = b.domNode; + an.V.applyFontInfoSlow(v, n); + const w = b.marginDomNode; + an.V.applyFontInfoSlow(w, n); + const C = []; + if (_.charChanges) + for (const e of _.charChanges) lo(e) && C.push(new Wt.$t(new j.e(e.originalStartLineNumber, + e.originalStartColumn, e.originalEndLineNumber, e.originalEndColumn + ), "char-delete", 0)); + const y = C.length > 0, + S = (0, In.l$)(1e4); + let x = 0, + k = 0, + L = null; + for (let t = _.originalStartLineNumber; t <= _.originalEndLineNumber; t++) { + const r = t - _.originalStartLineNumber, + s = this._originalModel.getLineTokens(t), + v = s.getLineContent(), + N = m[f++], + D = An.Kp.filter(C, t, 1, v.length + 1); + if (N) { + let m = 0; + for (const e of N.breakOffsets) { + const t = s.sliceAndInflate(m, e, 0), + r = v.substring(m, e); + x = Math.max(x, this._renderOriginalLine(k++, r, t, An.Kp.extractWrapped( + D, m, e), y, a, l, n, o, d, c, h, u, g, p, i, S, w)), m = e + } + for (L || (L = []); L.length < r;) L[L.length] = 1; + L[r] = N.breakOffsets.length, b.heightInLines += N.breakOffsets.length - + 1; + const f = document.createElement("div"); + f.className = "line-delete", e.original.push({ + afterLineNumber: t, + afterColumn: 0, + heightInLines: N.breakOffsets.length - 1, + domNode: co(), + marginDomNode: f + }) + } else x = Math.max(x, this._renderOriginalLine(k++, v, s, D, y, a, + l, n, o, d, c, h, u, g, p, i, S, w)) + } + x += s; + const N = S.build(), + D = Gn ? Gn.createHTML(N) : N; + if (v.innerHTML = D, b.minWidthInPx = x * r, L) { + const e = _.originalEndLineNumber - _.originalStartLineNumber; + for (; L.length <= e;) L[L.length] = 1 + } + b.diff.viewLineCounts = L + } + e.original.sort(((e, t) => e.afterLineNumber - t.afterLineNumber)) + } + _renderOriginalLine(e, t, i, n, o, r, s, a, l, d, c, h, u, g, p, m, f, _) { + f.appendASCIIString('
    '); + const b = Wt.wA.isBasicASCII(t, r), + v = Wt.wA.containsRTL(t, b, s), + w = (0, Bt.d1)(new Bt.IJ(a.isMonospace && !l, a.canUseHalfwidthRightwardsArrow, + t, !1, b, v, 0, i, n, m, 0, a.spaceWidth, a.middotWidth, a.wsmiddotWidth, + h, u, g, p !== B.n0.OFF, null), f); + if (f.appendASCIIString("
    "), this._renderIndicators) { + const t = document.createElement("div"); + t.className = `delete-sign ${bn.kS.asClassName(Zn)}`, t.setAttribute( + "style", + `position:absolute;top:${e*d}px;width:${c}px;height:${d}px;right:0;` + ), _.appendChild(t) + } + return w.characterMapping.getAbsoluteOffset(w.characterMapping.length) + } + } + + function so(e, t) { + return (0, B.NY)(e, t, ["off", "on", "inherit"]) + } + + function ao(e) { + return e.modifiedEndLineNumber > 0 + } + + function lo(e) { + return e.originalEndLineNumber > 0 + } + + function co() { + const e = document.createElement("div"); + return e.className = "diagonal-fill", e + } + + function ho(e, t, i, n) { + const o = e.getLineCount(); + return i = Math.min(o, Math.max(1, i)), n = Math.min(o, Math.max(1, n)), + t.coordinatesConverter.convertModelRangeToViewRange(new j.e(i, e.getLineMinColumn( + i), n, e.getLineMaxColumn(n))) + }(0, bn.Ic)(((e, t) => { + const i = e.getColor(_n.yp); + i && (t.addRule( + `.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${i}; }` + ), t.addRule( + `.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }` + ), t.addRule( + `.monaco-editor .inline-added-margin-view-zone { background-color: ${i}; }` + )); + const n = e.getColor(_n.P4); + n && (t.addRule( + `.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${n}; }` + ), t.addRule( + `.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${n}; }` + ), t.addRule( + `.monaco-editor .inline-deleted-margin-view-zone { background-color: ${n}; }` + )); + const o = e.getColor(_n.XL); + o && t.addRule( + `.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${o}; }` + ); + const r = e.getColor(_n.mH); + r && t.addRule( + `.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${r}; }` + ); + const s = e.getColor(_n._w); + s && t.addRule( + `.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${s}; }` + ); + const a = e.getColor(_n.LL); + a && t.addRule( + `.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }` + ); + const l = e.getColor(_n.et); + l && t.addRule( + `\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${l};\n\t\t\t}\n\t\t` + ); + const d = e.getColor(_n.AB); + d && t.addRule( + `\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${d};\n\t\t\t}\n\t\t` + ); + const c = e.getColor(_n.yn); + c && t.addRule( + `\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${c};\n\t\t\t}\n\t\t` + ); + const h = e.getColor(_n.L_); + t.addRule( + `\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${h} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${h} 50%, ${h} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t` + ) + })); + var uo = i(653), + go = i(2095), + po = i(4144), + mo = i(1847), + fo = i(1106); + class _o extends Le.JT { + constructor() { + super(), this._onCodeEditorAdd = this._register(new z.Q5), this.onCodeEditorAdd = + this._onCodeEditorAdd.event, this._onCodeEditorRemove = this._register( + new z.Q5), this.onCodeEditorRemove = this._onCodeEditorRemove.event, + this._onDiffEditorAdd = this._register(new z.Q5), this._onDiffEditorRemove = + this._register(new z.Q5), this._onDecorationTypeRegistered = this._register( + new z.Q5), this._modelProperties = new Map, this._codeEditors = + Object.create(null), this._diffEditors = Object.create(null) + } + addCodeEditor(e) { + this._codeEditors[e.getId()] = e, this._onCodeEditorAdd.fire(e) + } + removeCodeEditor(e) { + delete this._codeEditors[e.getId()] && this._onCodeEditorRemove.fire( + e) + } + listCodeEditors() { + return Object.keys(this._codeEditors).map((e => this._codeEditors[e])) + } + addDiffEditor(e) { + this._diffEditors[e.getId()] = e, this._onDiffEditorAdd.fire(e) + } + removeDiffEditor(e) { + delete this._diffEditors[e.getId()] && this._onDiffEditorRemove.fire( + e) + } + listDiffEditors() { + return Object.keys(this._diffEditors).map((e => this._diffEditors[e])) + } + getFocusedCodeEditor() { + let e = null; + const t = this.listCodeEditors(); + for (const i of t) { + if (i.hasTextFocus()) return i; + i.hasWidgetFocus() && (e = i) + } + return e + } + setModelProperty(e, t, i) { + const n = e.toString(); + let o; + this._modelProperties.has(n) ? o = this._modelProperties.get(n) : (o = + new Map, this._modelProperties.set(n, o)), o.set(t, i) + } + getModelProperty(e, t) { + const i = e.toString(); + if (this._modelProperties.has(i)) return this._modelProperties.get(i) + .get(t) + } + } + class bo { + constructor(e, t, i) { + this._parent = e, this._editorId = t, this._styleSheet = i, this._refCount = + 0 + } + ref() { + this._refCount++ + } + unref() { + var e; + this._refCount--, 0 === this._refCount && (null === (e = this._styleSheet + .parentNode) || void 0 === e || e.removeChild(this._styleSheet), + this._parent._removeEditorStyleSheets(this._editorId)) + } + insertRule(e, t) { + this._styleSheet.sheet.insertRule(e, t) + } + removeRulesContainingSelector(e) { + he.uN(e, this._styleSheet) + } + } + class vo { + constructor(e) { + this._styleSheet = e + } + ref() {} + unref() {} + insertRule(e, t) { + this._styleSheet.sheet.insertRule(e, t) + } + removeRulesContainingSelector(e) { + he.uN(e, this._styleSheet) + } + } + let wo = class extends _o { + constructor(e, t) { + super(), this._decorationOptionProviders = new Map, this._editorStyleSheets = + new Map, this._globalStyleSheet = e || null, this._themeService = t + } + _getOrCreateGlobalStyleSheet() { + return this._globalStyleSheet || (this._globalStyleSheet = new vo(he.dS())), + this._globalStyleSheet + } + _getOrCreateStyleSheet(e) { + if (!e) return this._getOrCreateGlobalStyleSheet(); + const t = e.getContainerDomNode(); + if (!he.OO(t)) return this._getOrCreateGlobalStyleSheet(); + const i = e.getId(); + if (!this._editorStyleSheets.has(i)) { + const e = new bo(this, i, he.dS(t)); + this._editorStyleSheets.set(i, e) + } + return this._editorStyleSheets.get(i) + } + _removeEditorStyleSheets(e) { + this._editorStyleSheets.delete(e) + } + registerDecorationType(e, t, i, n, o) { + let r = this._decorationOptionProviders.get(t); + if (!r) { + const s = this._getOrCreateStyleSheet(o), + a = { + styleSheet: s, + key: t, + parentTypeKey: n, + options: i || Object.create(null) + }; + r = n ? new So(this._themeService, s, a) : new xo(e, this._themeService, + s, a), this._decorationOptionProviders.set(t, r), this._onDecorationTypeRegistered + .fire(t) + } + r.refCount++ + } + removeDecorationType(e) { + const t = this._decorationOptionProviders.get(e); + t && (t.refCount--, t.refCount <= 0 && (this._decorationOptionProviders + .delete(e), t.dispose(), this.listCodeEditors().forEach((t => t.removeDecorations( + e))))) + } + resolveDecorationOptions(e, t) { + const i = this._decorationOptionProviders.get(e); + if (!i) throw new Error("Unknown decoration type key: " + e); + return i.getOptions(this, t) + } + }; + var Co, yo; + wo = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(Co = 1, yo = bn.XE, function(e, t) { + yo(e, t, Co) + })], wo); + class So { + constructor(e, t, i) { + this._styleSheet = t, this._styleSheet.ref(), this._parentTypeKey = i.parentTypeKey, + this.refCount = 0, this._beforeContentRules = new Lo(3, i, e), this._afterContentRules = + new Lo(4, i, e) + } + getOptions(e, t) { + const i = e.resolveDecorationOptions(this._parentTypeKey, !0); + return this._beforeContentRules && (i.beforeContentClassName = this._beforeContentRules + .className), this._afterContentRules && (i.afterContentClassName = + this._afterContentRules.className), i + } + dispose() { + this._beforeContentRules && (this._beforeContentRules.dispose(), this._beforeContentRules = + null), this._afterContentRules && (this._afterContentRules.dispose(), + this._afterContentRules = null), this._styleSheet.unref() + } + } + class xo { + constructor(e, t, i, n) { + this._disposables = new Le.SL, this.description = e, this._styleSheet = + i, this._styleSheet.ref(), this.refCount = 0; + const o = e => { + const i = new Lo(e, n, t); + if (this._disposables.add(i), i.hasContent) return i.className + }, + r = e => { + const i = new Lo(e, n, t); + return this._disposables.add(i), i.hasContent ? { + className: i.className, + hasLetterSpacing: i.hasLetterSpacing + } : null + }; + this.className = o(0); + const s = r(1); + if (s && (this.inlineClassName = s.className, this.inlineClassNameAffectsLetterSpacing = + s.hasLetterSpacing), this.beforeContentClassName = o(3), this.afterContentClassName = + o(4), n.options.beforeInjectedText && n.options.beforeInjectedText.contentText + ) { + const e = r(5); + this.beforeInjectedText = { + content: n.options.beforeInjectedText.contentText, + inlineClassName: null == e ? void 0 : e.className, + inlineClassNameAffectsLetterSpacing: (null == e ? void 0 : e.hasLetterSpacing) || + n.options.beforeInjectedText.affectsLetterSpacing + } + } + if (n.options.afterInjectedText && n.options.afterInjectedText.contentText) { + const e = r(6); + this.afterInjectedText = { + content: n.options.afterInjectedText.contentText, + inlineClassName: null == e ? void 0 : e.className, + inlineClassNameAffectsLetterSpacing: (null == e ? void 0 : e.hasLetterSpacing) || + n.options.afterInjectedText.affectsLetterSpacing + } + } + this.glyphMarginClassName = o(2); + const a = n.options; + this.isWholeLine = Boolean(a.isWholeLine), this.stickiness = a.rangeBehavior; + const l = a.light && a.light.overviewRulerColor || a.overviewRulerColor, + d = a.dark && a.dark.overviewRulerColor || a.overviewRulerColor; + void 0 === l && void 0 === d || (this.overviewRuler = { + color: l || d, + darkColor: d || l, + position: a.overviewRulerLane || Me.sh.Center + }) + } + getOptions(e, t) { + return t ? { + description: this.description, + inlineClassName: this.inlineClassName, + beforeContentClassName: this.beforeContentClassName, + afterContentClassName: this.afterContentClassName, + className: this.className, + glyphMarginClassName: this.glyphMarginClassName, + isWholeLine: this.isWholeLine, + overviewRuler: this.overviewRuler, + stickiness: this.stickiness, + before: this.beforeInjectedText + } : this + } + dispose() { + this._disposables.dispose(), this._styleSheet.unref() + } + } + const ko = { + color: "color:{0} !important;", + opacity: "opacity:{0};", + backgroundColor: "background-color:{0};", + outline: "outline:{0};", + outlineColor: "outline-color:{0};", + outlineStyle: "outline-style:{0};", + outlineWidth: "outline-width:{0};", + border: "border:{0};", + borderColor: "border-color:{0};", + borderRadius: "border-radius:{0};", + borderSpacing: "border-spacing:{0};", + borderStyle: "border-style:{0};", + borderWidth: "border-width:{0};", + fontStyle: "font-style:{0};", + fontWeight: "font-weight:{0};", + fontSize: "font-size:{0};", + fontFamily: "font-family:{0};", + textDecoration: "text-decoration:{0};", + cursor: "cursor:{0};", + letterSpacing: "letter-spacing:{0};", + gutterIconPath: "background:{0} center center no-repeat;", + gutterIconSize: "background-size:{0};", + contentText: "content:'{0}';", + contentIconPath: "content:{0};", + margin: "margin:{0};", + padding: "padding:{0};", + width: "width:{0};", + height: "height:{0};", + verticalAlign: "vertical-align:{0};" + }; + class Lo { + constructor(e, t, i) { + this._theme = i.getColorTheme(), this._ruleType = e, this._providerArgs = + t, this._usesThemeColors = !1, this._hasContent = !1, this._hasLetterSpacing = ! + 1; + let n = No.getClassName(this._providerArgs.key, e); + this._providerArgs.parentTypeKey && (n = n + " " + No.getClassName( + this._providerArgs.parentTypeKey, e)), this._className = n, this._unThemedSelector = + No.getSelector(this._providerArgs.key, this._providerArgs.parentTypeKey, + e), this._buildCSS(), this._usesThemeColors ? this._themeListener = + i.onDidColorThemeChange((e => { + this._theme = i.getColorTheme(), this._removeCSS(), this._buildCSS() + })) : this._themeListener = null + } + dispose() { + this._hasContent && (this._removeCSS(), this._hasContent = !1), this._themeListener && + (this._themeListener.dispose(), this._themeListener = null) + } + get hasContent() { + return this._hasContent + } + get hasLetterSpacing() { + return this._hasLetterSpacing + } + get className() { + return this._className + } + _buildCSS() { + const e = this._providerArgs.options; + let t, i, n; + switch (this._ruleType) { + case 0: + t = this.getCSSTextForModelDecorationClassName(e), i = this.getCSSTextForModelDecorationClassName( + e.light), n = this.getCSSTextForModelDecorationClassName(e.dark); + break; + case 1: + t = this.getCSSTextForModelDecorationInlineClassName(e), i = this.getCSSTextForModelDecorationInlineClassName( + e.light), n = this.getCSSTextForModelDecorationInlineClassName(e.dark); + break; + case 2: + t = this.getCSSTextForModelDecorationGlyphMarginClassName(e), i = + this.getCSSTextForModelDecorationGlyphMarginClassName(e.light), n = + this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark); + break; + case 3: + t = this.getCSSTextForModelDecorationContentClassName(e.before), i = + this.getCSSTextForModelDecorationContentClassName(e.light && e.light + .before), n = this.getCSSTextForModelDecorationContentClassName(e.dark && + e.dark.before); + break; + case 4: + t = this.getCSSTextForModelDecorationContentClassName(e.after), i = + this.getCSSTextForModelDecorationContentClassName(e.light && e.light + .after), n = this.getCSSTextForModelDecorationContentClassName(e.dark && + e.dark.after); + break; + case 5: + t = this.getCSSTextForModelDecorationContentClassName(e.beforeInjectedText), + i = this.getCSSTextForModelDecorationContentClassName(e.light && e.light + .beforeInjectedText), n = this.getCSSTextForModelDecorationContentClassName( + e.dark && e.dark.beforeInjectedText); + break; + case 6: + t = this.getCSSTextForModelDecorationContentClassName(e.afterInjectedText), + i = this.getCSSTextForModelDecorationContentClassName(e.light && e.light + .afterInjectedText), n = this.getCSSTextForModelDecorationContentClassName( + e.dark && e.dark.afterInjectedText); + break; + default: + throw new Error("Unknown rule type: " + this._ruleType) + } + const o = this._providerArgs.styleSheet; + let r = !1; + t.length > 0 && (o.insertRule(`${this._unThemedSelector} {${t}}`, 0), + r = !0), i.length > 0 && (o.insertRule( + `.vs${this._unThemedSelector} {${i}}`, 0), r = !0), n.length > 0 && + (o.insertRule( + `.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${n}}`, + 0), r = !0), this._hasContent = r + } + _removeCSS() { + this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector) + } + getCSSTextForModelDecorationClassName(e) { + if (!e) return ""; + const t = []; + return this.collectCSSText(e, ["backgroundColor"], t), this.collectCSSText( + e, ["outline", "outlineColor", "outlineStyle", "outlineWidth"], t), + this.collectBorderSettingsCSSText(e, t), t.join("") + } + getCSSTextForModelDecorationInlineClassName(e) { + if (!e) return ""; + const t = []; + return this.collectCSSText(e, ["fontStyle", "fontWeight", + "textDecoration", "cursor", "color", "opacity", "letterSpacing" + ], t), e.letterSpacing && (this._hasLetterSpacing = !0), t.join("") + } + getCSSTextForModelDecorationContentClassName(e) { + if (!e) return ""; + const t = []; + if (void 0 !== e) { + if (this.collectBorderSettingsCSSText(e, t), void 0 !== e.contentIconPath && + t.push(Xe.WU(ko.contentIconPath, he.wY(H.o.revive(e.contentIconPath)))), + "string" == typeof e.contentText) { + const i = e.contentText.match(/^.*$/m)[0].replace(/['\\]/g, "\\$&"); + t.push(Xe.WU(ko.contentText, i)) + } + this.collectCSSText(e, ["verticalAlign", "fontStyle", "fontWeight", + "fontSize", "fontFamily", "textDecoration", "color", "opacity", + "backgroundColor", "margin", "padding" + ], t), this.collectCSSText(e, ["width", "height"], t) && t.push( + "display:inline-block;") + } + return t.join("") + } + getCSSTextForModelDecorationGlyphMarginClassName(e) { + if (!e) return ""; + const t = []; + return void 0 !== e.gutterIconPath && (t.push(Xe.WU(ko.gutterIconPath, + he.wY(H.o.revive(e.gutterIconPath)))), void 0 !== e.gutterIconSize && + t.push(Xe.WU(ko.gutterIconSize, e.gutterIconSize))), t.join("") + } + collectBorderSettingsCSSText(e, t) { + return !!this.collectCSSText(e, ["border", "borderColor", + "borderRadius", "borderSpacing", "borderStyle", "borderWidth" + ], t) && (t.push(Xe.WU("box-sizing: border-box;")), !0) + } + collectCSSText(e, t, i) { + const n = i.length; + for (let n of t) { + const t = this.resolveValue(e[n]); + "string" == typeof t && i.push(Xe.WU(ko[n], t)) + } + return i.length !== n + } + resolveValue(e) { + if ((0, Te.I)(e)) { + this._usesThemeColors = !0; + const t = this._theme.getColor(e.id); + return t ? t.toString() : "transparent" + } + return e + } + } + class No { + static getClassName(e, t) { + return "ced-" + e + "-" + t + } + static getSelector(e, t, i) { + let n = ".monaco-editor ." + this.getClassName(e, i); + return t && (n = n + "." + this.getClassName(t, i)), 3 === i ? n += + "::before" : 4 === i && (n += "::after"), n + } + } + var Do = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let Eo = class extends wo { + constructor(e, t, i) { + super(e, i), this.onCodeEditorAdd((() => this._checkContextKey())), + this.onCodeEditorRemove((() => this._checkContextKey())), this._editorIsOpen = + t.createKey("editorIsOpen", !1), this._activeCodeEditor = null + } + _checkContextKey() { + let e = !1; + for (const t of this.listCodeEditors()) + if (!t.isSimpleWidget) { + e = !0; + break + } + this._editorIsOpen.set(e) + } + setActiveCodeEditor(e) { + this._activeCodeEditor = e + } + getActiveCodeEditor() { + return this._activeCodeEditor + } + openCodeEditor(e, t, i) { + return t ? Promise.resolve(this.doOpenEditor(t, e)) : Promise.resolve( + null) + } + doOpenEditor(e, t) { + if (!this.findModel(e, t.resource)) { + if (t.resource) { + const i = t.resource.scheme; + if (i === me.lg.http || i === me.lg.https) return (0, he.V3)(t.resource + .toString()), e + } + return null + } + const i = t.options ? t.options.selection : null; + if (i) + if ("number" == typeof i.endLineNumber && "number" == typeof i.endColumn) + e.setSelection(i), e.revealRangeInCenter(i, 1); + else { + const t = { + lineNumber: i.startLineNumber, + column: i.startColumn + }; + e.setPosition(t), e.revealPositionInCenter(t, 1) + } + return e + } + findModel(e, t) { + const i = e.getModel(); + return i && i.uri.toString() !== t.toString() ? null : i + } + }; + Eo = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([Do(1, Ci.i6), Do(2, bn.XE)], Eo); + var Io = i(1170), + To = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + Mo = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let Ao = 0, + Ro = !1, + Oo = class extends tn.Gm { + constructor(e, t, i, n, o, r, s, a, l, d) { + const c = Object.assign({}, t); + c.ariaLabel = c.ariaLabel || Ai.B8.editorViewAccessibleLabel, c.ariaLabel = + c.ariaLabel + ";" + Ai.B8.accessibilityHelpMessage, super(e, c, {}, + i, n, o, r, a, l, d), this._standaloneKeybindingService = s instanceof Ui ? + s : null, Ro || (Ro = !0, en.wW(document.body)) + } + addCommand(e, t, i) { + if (!this._standaloneKeybindingService) return console.warn( + "Cannot add command because the editor is configured with an unrecognized KeybindingService" + ), null; + let n = "DYNAMIC_" + ++Ao, + o = Ci.Ao.deserialize(i); + return this._standaloneKeybindingService.addDynamicKeybinding(n, e, t, + o), n + } + createContextKey(e, t) { + return this._contextKeyService.createKey(e, t) + } + addAction(e) { + if ("string" != typeof e.id || "string" != typeof e.label || + "function" != typeof e.run) throw new Error( + "Invalid action descriptor, `id`, `label` and `run` are required properties!" + ); + if (!this._standaloneKeybindingService) return console.warn( + "Cannot add keybinding because the editor is configured with an unrecognized KeybindingService" + ), Le.JT.None; + const t = e.id, + i = e.label, + n = Ci.Ao.and(Ci.Ao.equals("editorId", this.getId()), Ci.Ao.deserialize( + e.precondition)), + o = e.keybindings, + r = Ci.Ao.and(n, Ci.Ao.deserialize(e.keybindingContext)), + s = e.contextMenuGroupId || null, + a = e.contextMenuOrder || 0, + l = (t, ...i) => Promise.resolve(e.run(this, ...i)), + d = new Le.SL, + c = this.getId() + ":" + t; + if (d.add(_e.P.registerCommand(c, l)), s) { + let e = { + command: { + id: c, + title: i + }, + when: n, + group: s, + order: a + }; + d.add(po.BH.appendMenuItem(po.eH.EditorContext, e)) + } + if (Array.isArray(o)) + for (const e of o) d.add(this._standaloneKeybindingService.addDynamicKeybinding( + c, e, l, r)); + let h = new uo.p(c, i, i, n, l, this._contextKeyService); + return this._actions[t] = h, d.add((0, Le.OF)((() => { + delete this._actions[t] + }))), d + } + _triggerCommand(e, t) { + if (this._codeEditorService instanceof Eo) try { + this._codeEditorService.setActiveCodeEditor(this), super._triggerCommand( + e, t) + } finally { + this._codeEditorService.setActiveCodeEditor(null) + } else super._triggerCommand(e, t) + } + }; + Oo = To([Mo(2, Rn.TG), Mo(3, ce.$), Mo(4, _e.H), Mo(5, Ci.i6), Mo(6, mo.d), + Mo(7, bn.XE), Mo(8, Ti.lT), Mo(9, fo.F) + ], Oo); + let Po = class extends Oo { + constructor(e, t, i, n, o, r, s, a, l, d, c, h, u, g, p) { + const m = Object.assign({}, t); + Yi(h, m, !1); + const f = d.registerEditorContainer(e); + "string" == typeof m.theme && d.setTheme(m.theme), void 0 !== m.autoDetectHighContrast && + d.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast)); + let _, b = m.model; + if (delete m.model, super(e, m, n, o, r, s, a, d, c, u), this._contextViewService = + l, this._configurationService = h, this._standaloneThemeService = d, + this._register(i), this._register(f), void 0 === b ? (_ = Bo(g, p, m + .value || "", m.language || Io.vW.text, void 0), this._ownsModel = ! + 0) : (_ = b, this._ownsModel = !1), this._attachModel(_), _) { + let e = { + oldModelUrl: null, + newModelUrl: _.uri + }; + this._onDidChangeModel.fire(e) + } + } + dispose() { + super.dispose() + } + updateOptions(e) { + Yi(this._configurationService, e, !1), "string" == typeof e.theme && + this._standaloneThemeService.setTheme(e.theme), void 0 !== e.autoDetectHighContrast && + this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)), + super.updateOptions(e) + } + _attachModel(e) { + super._attachModel(e), this._modelData && this._contextViewService.setContainer( + this._modelData.view.domNode.domNode) + } + _postDetachModelCleanup(e) { + super._postDetachModelCleanup(e), e && this._ownsModel && (e.dispose(), + this._ownsModel = !1) + } + }; + Po = To([Mo(3, Rn.TG), Mo(4, ce.$), Mo(5, _e.H), Mo(6, Ci.i6), Mo(7, mo.d), + Mo(8, Pn.u), Mo(9, go.Z), Mo(10, Ti.lT), Mo(11, gi.Ui), Mo(12, fo.F), + Mo(13, Ct.q), Mo(14, Pe.h) + ], Po); + let Fo = class extends Yn { + constructor(e, t, i, n, o, r, s, a, l, d, c, h, u, g, p) { + const m = Object.assign({}, t); + Yi(h, m, !0); + const f = d.registerEditorContainer(e); + "string" == typeof m.theme && d.setTheme(m.theme), void 0 !== m.autoDetectHighContrast && + d.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast)), + super(e, m, {}, p, a, o, n, l, d, c, u, g), this._contextViewService = + s, this._configurationService = h, this._standaloneThemeService = d, + this._register(i), this._register(f), this._contextViewService.setContainer( + this._containerDomElement) + } + dispose() { + super.dispose() + } + updateOptions(e) { + Yi(this._configurationService, e, !0), "string" == typeof e.theme && + this._standaloneThemeService.setTheme(e.theme), void 0 !== e.autoDetectHighContrast && + this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)), + super.updateOptions(e) + } + _createInnerEditor(e, t, i) { + return e.createInstance(Oo, t, i) + } + getOriginalEditor() { + return super.getOriginalEditor() + } + getModifiedEditor() { + return super.getModifiedEditor() + } + addCommand(e, t, i) { + return this.getModifiedEditor().addCommand(e, t, i) + } + createContextKey(e, t) { + return this.getModifiedEditor().createContextKey(e, t) + } + addAction(e) { + return this.getModifiedEditor().addAction(e) + } + }; + + function Bo(e, t, i, n, o) { + if (i = i || "", !n) { + const n = i.indexOf("\n"); + let r = i; + return -1 !== n && (r = i.substring(0, n)), Wo(e, i, t.createByFilepathOrFirstLine( + o || null, r), o) + } + return Wo(e, i, t.create(n), o) + } + + function Wo(e, t, i, n) { + return e.createModel(t, i, n) + } + Fo = To([Mo(3, Rn.TG), Mo(4, Ci.i6), Mo(5, mo.d), Mo(6, Pn.u), Mo(7, Oe.p), + Mo(8, ce.$), Mo(9, go.Z), Mo(10, Ti.lT), Mo(11, gi.Ui), Mo(12, Pn.i), + Mo(13, Vn.e), Mo(14, zn.p) + ], Fo); + class zo { + constructor(e) { + this._languageIdentifier = e + } + getId() { + return this._languageIdentifier.language + } + } + var Vo = i(1144), + Ho = i(9872); + const Uo = Object.prototype.hasOwnProperty; + class jo extends Le.JT { + constructor(e = !0, t = !1) { + super(), this._onDidChange = this._register(new z.Q5), this.onDidChange = + this._onDidChange.event, this._warnOnOverwrite = t, this._nextLanguageId2 = + 1, this._languageIdToLanguage = [], this._languageToLanguageId = + Object.create(null), this._languages = {}, this._mimeTypesMap = {}, + this._nameMap = {}, this._lowercaseNameMap = {}, e && (this._initializeFromRegistry(), + this._register(Vo.dQ.onDidChangeLanguages((e => this._initializeFromRegistry()))) + ) + } + _initializeFromRegistry() { + this._languages = {}, this._mimeTypesMap = {}, this._nameMap = {}, + this._lowercaseNameMap = {}; + const e = Vo.dQ.getLanguages(); + this._registerLanguages(e) + } + _registerLanguages(e) { + for (const t of e) this._registerLanguage(t); + this._mimeTypesMap = {}, this._nameMap = {}, this._lowercaseNameMap = {}, + Object.keys(this._languages).forEach((e => { + let t = this._languages[e]; + t.name && (this._nameMap[t.name] = t.identifier), t.aliases.forEach( + (e => { + this._lowercaseNameMap[e.toLowerCase()] = t.identifier + })), t.mimetypes.forEach((e => { + this._mimeTypesMap[e] = t.identifier + })) + })), Ho.B.as(pi.IP.Configuration).registerOverrideIdentifiers(Vo.dQ.getLanguages() + .map((e => e.id))), this._onDidChange.fire() + } + _getLanguageId(e) { + if (this._languageToLanguageId[e]) return this._languageToLanguageId[ + e]; + const t = this._nextLanguageId2++; + return this._languageIdToLanguage[t] = e, this._languageToLanguageId[ + e] = t, t + } + _registerLanguage(e) { + const t = e.id; + let i; + if (Uo.call(this._languages, t)) i = this._languages[t]; + else { + const e = this._getLanguageId(t); + i = { + identifier: new Ae.rl(t, e), + name: null, + mimetypes: [], + aliases: [], + extensions: [], + filenames: [], + configurationFiles: [] + }, this._languages[t] = i + } + this._mergeLanguage(i, e) + } + _mergeLanguage(e, t) { + const i = t.id; + let n = null; + if (Array.isArray(t.mimetypes) && t.mimetypes.length > 0 && (e.mimetypes + .push(...t.mimetypes), n = t.mimetypes[0]), n || (n = `text/x-${i}`, + e.mimetypes.push(n)), Array.isArray(t.extensions)) { + t.configuration ? e.extensions = t.extensions.concat(e.extensions) : + e.extensions = e.extensions.concat(t.extensions); + for (let e of t.extensions) Io.sA({ + id: i, + mime: n, + extension: e + }, this._warnOnOverwrite) + } + if (Array.isArray(t.filenames)) + for (let o of t.filenames) Io.sA({ + id: i, + mime: n, + filename: o + }, this._warnOnOverwrite), e.filenames.push(o); + if (Array.isArray(t.filenamePatterns)) + for (let e of t.filenamePatterns) Io.sA({ + id: i, + mime: n, + filepattern: e + }, this._warnOnOverwrite); + if ("string" == typeof t.firstLine && t.firstLine.length > 0) { + let e = t.firstLine; + "^" !== e.charAt(0) && (e = "^" + e); + try { + let t = new RegExp(e); + Xe.IO(t) || Io.sA({ + id: i, + mime: n, + firstline: t + }, this._warnOnOverwrite) + } catch (e) { + (0, We.dL)(e) + } + } + e.aliases.push(i); + let o = null; + if (void 0 !== t.aliases && Array.isArray(t.aliases) && (o = 0 === t.aliases + .length ? [null] : t.aliases), null !== o) + for (const t of o) t && 0 !== t.length && e.aliases.push(t); + let r = null !== o && o.length > 0; + if (r && null === o[0]); + else { + let t = (r ? o[0] : null) || i; + !r && e.name || (e.name = t) + } + t.configuration && e.configurationFiles.push(t.configuration) + } + isRegisteredMode(e) { + return !!Uo.call(this._mimeTypesMap, e) || Uo.call(this._languages, e) + } + getModeIdForLanguageNameLowercase(e) { + return Uo.call(this._lowercaseNameMap, e) ? this._lowercaseNameMap[e] + .language : null + } + extractModeIds(e) { + return e ? e.split(",").map((e => e.trim())).map((e => Uo.call(this._mimeTypesMap, + e) ? this._mimeTypesMap[e].language : e)).filter((e => Uo.call(this + ._languages, e))) : [] + } + getLanguageIdentifier(e) { + if (e === Re.TG || 0 === e) return Re.pA; + let t; + if ("string" == typeof e) t = e; + else if (t = this._languageIdToLanguage[e], !t) return null; + return Uo.call(this._languages, t) ? this._languages[t].identifier : + null + } + getModeIdsFromFilepathOrFirstLine(e, t) { + if (!e && !t) return []; + let i = Io.G8(e, t); + return this.extractModeIds(i.join(",")) + } + } + class Ko { + constructor(e, t) { + let i; + this._selector = t, this.languageIdentifier = this._selector(), this._onDidChange = + new z.Q5({ + onFirstListenerAdd: () => { + i = e((() => this._evaluate())) + }, + onLastListenerRemove: () => { + i.dispose() + } + }), this.onDidChange = this._onDidChange.event + } + _evaluate() { + let e = this._selector(); + e.id !== this.languageIdentifier.id && (this.languageIdentifier = e, + this._onDidChange.fire(this.languageIdentifier)) + } + } + class $o extends Le.JT { + constructor(e = !1) { + super(), this._onDidCreateMode = this._register(new z.Q5), this.onDidCreateMode = + this._onDidCreateMode.event, this._onLanguagesMaybeChanged = this._register( + new z.Q5({ + leakWarningThreshold: 200 + })), this.onLanguagesMaybeChanged = this._onLanguagesMaybeChanged.event, + this._instantiatedModes = {}, this._registry = this._register(new jo(! + 0, e)), this._register(this._registry.onDidChange((() => this._onLanguagesMaybeChanged + .fire()))) + } + isRegisteredMode(e) { + return this._registry.isRegisteredMode(e) + } + getModeIdForLanguageName(e) { + return this._registry.getModeIdForLanguageNameLowercase(e) + } + getModeIdByFilepathOrFirstLine(e, t) { + const i = this._registry.getModeIdsFromFilepathOrFirstLine(e, t); + return (0, St.Xh)(i, null) + } + getModeId(e) { + const t = this._registry.extractModeIds(e); + return (0, St.Xh)(t, null) + } + getLanguageIdentifier(e) { + return this._registry.getLanguageIdentifier(e) + } + create(e) { + return new Ko(this.onLanguagesMaybeChanged, (() => { + const t = this.getModeId(e); + return this._createModeAndGetLanguageIdentifier(t) + })) + } + createByFilepathOrFirstLine(e, t) { + return new Ko(this.onLanguagesMaybeChanged, (() => { + const i = this.getModeIdByFilepathOrFirstLine(e, t); + return this._createModeAndGetLanguageIdentifier(i) + })) + } + _createModeAndGetLanguageIdentifier(e) { + const t = this.getLanguageIdentifier(e || "plaintext") || Re.pA; + return this._getOrCreateMode(t.language), t + } + triggerMode(e) { + const t = this.getModeId(e); + this._getOrCreateMode(t || "plaintext") + } + _getOrCreateMode(e) { + if (!this._instantiatedModes.hasOwnProperty(e)) { + let t = this.getLanguageIdentifier(e) || Re.pA; + this._instantiatedModes[e] = new zo(t), this._onDidCreateMode.fire( + this._instantiatedModes[e]) + } + return this._instantiatedModes[e] + } + } + var qo = i(7390), + Zo = i(1264); + class Go { + constructor(e, t, i, n, o) { + this._parsedThemeRuleBrand = void 0, this.token = e, this.index = t, + this.fontStyle = i, this.foreground = n, this.background = o + } + } + const Yo = /^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/; + class Qo { + constructor() { + this._lastColorId = 0, this._id2color = [], this._color2id = new Map + } + getId(e) { + if (null === e) return 0; + const t = e.match(Yo); + if (!t) throw new Error("Illegal value for token color: " + e); + e = t[1].toUpperCase(); + let i = this._color2id.get(e); + return i || (i = ++this._lastColorId, this._color2id.set(e, i), this._id2color[ + i] = Zo.Il.fromHex("#" + e), i) + } + getColorMap() { + return this._id2color.slice(0) + } + } + class Xo { + constructor(e, t) { + this._colorMap = e, this._root = t, this._cache = new Map + } + static createFromRawTokenTheme(e, t) { + return this.createFromParsedTokenTheme(function(e) { + if (!e || !Array.isArray(e)) return []; + let t = [], + i = 0; + for (let n = 0, o = e.length; n < o; n++) { + let o = e[n], + r = -1; + if ("string" == typeof o.fontStyle) { + r = 0; + let e = o.fontStyle.split(" "); + for (let t = 0, i = e.length; t < i; t++) switch (e[t]) { + case "italic": + r |= 1; + break; + case "bold": + r |= 2; + break; + case "underline": + r |= 4 + } + } + let s = null; + "string" == typeof o.foreground && (s = o.foreground); + let a = null; + "string" == typeof o.background && (a = o.background), t[i++] = + new Go(o.token || "", n, r, s, a) + } + return t + }(e), t) + } + static createFromParsedTokenTheme(e, t) { + return function(e, t) { + e.sort(((e, t) => { + let i = function(e, t) { + return e < t ? -1 : e > t ? 1 : 0 + }(e.token, t.token); + return 0 !== i ? i : e.index - t.index + })); + let i = 0, + n = "000000", + o = "ffffff"; + for (; e.length >= 1 && "" === e[0].token;) { + let t = e.shift(); - 1 !== t.fontStyle && (i = t.fontStyle), null !== + t.foreground && (n = t.foreground), null !== t.background && (o = + t.background) + } + let r = new Qo; + for (let e of t) r.getId(e); + let s = r.getId(n), + a = r.getId(o), + l = new er(i, s, a), + d = new tr(l); + for (let t = 0, i = e.length; t < i; t++) { + let i = e[t]; + d.insert(i.token, i.fontStyle, r.getId(i.foreground), r.getId(i.background)) + } + return new Xo(r, d) + }(e, t) + } + getColorMap() { + return this._colorMap.getColorMap() + } + _match(e) { + return this._root.match(e) + } + match(e, t) { + let i = this._cache.get(t); + if (void 0 === i) { + let e = this._match(t), + n = function(e) { + let t = e.match(Jo); + if (!t) return 0; + switch (t[1]) { + case "comment": + return 1; + case "string": + return 2; + case "regex": + case "regexp": + return 4 + } + throw new Error("Unexpected match for standard token type!") + }(t); + i = (e.metadata | n << 8) >>> 0, this._cache.set(t, i) + } + return (i | e << 0) >>> 0 + } + } + const Jo = /\b(comment|string|regex|regexp)\b/; + class er { + constructor(e, t, i) { + this._themeTrieElementRuleBrand = void 0, this._fontStyle = e, this._foreground = + t, this._background = i, this.metadata = (this._fontStyle << 11 | + this._foreground << 14 | this._background << 23) >>> 0 + } + clone() { + return new er(this._fontStyle, this._foreground, this._background) + } + acceptOverwrite(e, t, i) { + -1 !== e && (this._fontStyle = e), 0 !== t && (this._foreground = t), + 0 !== i && (this._background = i), this.metadata = (this._fontStyle << + 11 | this._foreground << 14 | this._background << 23) >>> 0 + } + } + class tr { + constructor(e) { + this._themeTrieElementBrand = void 0, this._mainRule = e, this._children = + new Map + } + match(e) { + if ("" === e) return this._mainRule; + let t, i, n = e.indexOf("."); - 1 === n ? (t = e, i = "") : (t = e.substring( + 0, n), i = e.substring(n + 1)); + let o = this._children.get(t); + return void 0 !== o ? o.match(i) : this._mainRule + } + insert(e, t, i, n) { + if ("" === e) return void this._mainRule.acceptOverwrite(t, i, n); + let o, r, s = e.indexOf("."); - 1 === s ? (o = e, r = "") : (o = e.substring( + 0, s), r = e.substring(s + 1)); + let a = this._children.get(o); + void 0 === a && (a = new tr(this._mainRule.clone()), this._children.set( + o, a)), a.insert(r, t, i, n) + } + } + const ir = { + base: "vs", + inherit: !1, + rules: [{ + token: "", + foreground: "000000", + background: "fffffe" + }, { + token: "invalid", + foreground: "cd3131" + }, { + token: "emphasis", + fontStyle: "italic" + }, { + token: "strong", + fontStyle: "bold" + }, { + token: "variable", + foreground: "001188" + }, { + token: "variable.predefined", + foreground: "4864AA" + }, { + token: "constant", + foreground: "dd0000" + }, { + token: "comment", + foreground: "008000" + }, { + token: "number", + foreground: "098658" + }, { + token: "number.hex", + foreground: "3030c0" + }, { + token: "regexp", + foreground: "800000" + }, { + token: "annotation", + foreground: "808080" + }, { + token: "type", + foreground: "008080" + }, { + token: "delimiter", + foreground: "000000" + }, { + token: "delimiter.html", + foreground: "383838" + }, { + token: "delimiter.xml", + foreground: "0000FF" + }, { + token: "tag", + foreground: "800000" + }, { + token: "tag.id.pug", + foreground: "4F76AC" + }, { + token: "tag.class.pug", + foreground: "4F76AC" + }, { + token: "meta.scss", + foreground: "800000" + }, { + token: "metatag", + foreground: "e00000" + }, { + token: "metatag.content.html", + foreground: "FF0000" + }, { + token: "metatag.html", + foreground: "808080" + }, { + token: "metatag.xml", + foreground: "808080" + }, { + token: "metatag.php", + fontStyle: "bold" + }, { + token: "key", + foreground: "863B00" + }, { + token: "string.key.json", + foreground: "A31515" + }, { + token: "string.value.json", + foreground: "0451A5" + }, { + token: "attribute.name", + foreground: "FF0000" + }, { + token: "attribute.value", + foreground: "0451A5" + }, { + token: "attribute.value.number", + foreground: "098658" + }, { + token: "attribute.value.unit", + foreground: "098658" + }, { + token: "attribute.value.html", + foreground: "0000FF" + }, { + token: "attribute.value.xml", + foreground: "0000FF" + }, { + token: "string", + foreground: "A31515" + }, { + token: "string.html", + foreground: "0000FF" + }, { + token: "string.sql", + foreground: "FF0000" + }, { + token: "string.yaml", + foreground: "0451A5" + }, { + token: "keyword", + foreground: "0000FF" + }, { + token: "keyword.json", + foreground: "0451A5" + }, { + token: "keyword.flow", + foreground: "AF00DB" + }, { + token: "keyword.flow.scss", + foreground: "0000FF" + }, { + token: "operator.scss", + foreground: "666666" + }, { + token: "operator.sql", + foreground: "778899" + }, { + token: "operator.swift", + foreground: "666666" + }, { + token: "predefined.sql", + foreground: "C700C7" + }], + colors: { + [_n.cv]: "#FFFFFE", [_n.NO]: "#000000", [_n.ES]: "#E5EBF1", [fn.tR]: + "#D3D3D3", [fn.Ym]: "#939393", [_n.Rz]: "#ADD6FF4D" + } + }, + nr = { + base: "vs-dark", + inherit: !1, + rules: [{ + token: "", + foreground: "D4D4D4", + background: "1E1E1E" + }, { + token: "invalid", + foreground: "f44747" + }, { + token: "emphasis", + fontStyle: "italic" + }, { + token: "strong", + fontStyle: "bold" + }, { + token: "variable", + foreground: "74B0DF" + }, { + token: "variable.predefined", + foreground: "4864AA" + }, { + token: "variable.parameter", + foreground: "9CDCFE" + }, { + token: "constant", + foreground: "569CD6" + }, { + token: "comment", + foreground: "608B4E" + }, { + token: "number", + foreground: "B5CEA8" + }, { + token: "number.hex", + foreground: "5BB498" + }, { + token: "regexp", + foreground: "B46695" + }, { + token: "annotation", + foreground: "cc6666" + }, { + token: "type", + foreground: "3DC9B0" + }, { + token: "delimiter", + foreground: "DCDCDC" + }, { + token: "delimiter.html", + foreground: "808080" + }, { + token: "delimiter.xml", + foreground: "808080" + }, { + token: "tag", + foreground: "569CD6" + }, { + token: "tag.id.pug", + foreground: "4F76AC" + }, { + token: "tag.class.pug", + foreground: "4F76AC" + }, { + token: "meta.scss", + foreground: "A79873" + }, { + token: "meta.tag", + foreground: "CE9178" + }, { + token: "metatag", + foreground: "DD6A6F" + }, { + token: "metatag.content.html", + foreground: "9CDCFE" + }, { + token: "metatag.html", + foreground: "569CD6" + }, { + token: "metatag.xml", + foreground: "569CD6" + }, { + token: "metatag.php", + fontStyle: "bold" + }, { + token: "key", + foreground: "9CDCFE" + }, { + token: "string.key.json", + foreground: "9CDCFE" + }, { + token: "string.value.json", + foreground: "CE9178" + }, { + token: "attribute.name", + foreground: "9CDCFE" + }, { + token: "attribute.value", + foreground: "CE9178" + }, { + token: "attribute.value.number.css", + foreground: "B5CEA8" + }, { + token: "attribute.value.unit.css", + foreground: "B5CEA8" + }, { + token: "attribute.value.hex.css", + foreground: "D4D4D4" + }, { + token: "string", + foreground: "CE9178" + }, { + token: "string.sql", + foreground: "FF0000" + }, { + token: "keyword", + foreground: "569CD6" + }, { + token: "keyword.flow", + foreground: "C586C0" + }, { + token: "keyword.json", + foreground: "CE9178" + }, { + token: "keyword.flow.scss", + foreground: "569CD6" + }, { + token: "operator.scss", + foreground: "909090" + }, { + token: "operator.sql", + foreground: "778899" + }, { + token: "operator.swift", + foreground: "909090" + }, { + token: "predefined.sql", + foreground: "FF00FF" + }], + colors: { + [_n.cv]: "#1E1E1E", [_n.NO]: "#D4D4D4", [_n.ES]: "#3A3D41", [fn.tR]: + "#404040", [fn.Ym]: "#707070", [_n.Rz]: "#ADD6FF26" + } + }, + or = { + base: "hc-black", + inherit: !1, + rules: [{ + token: "", + foreground: "FFFFFF", + background: "000000" + }, { + token: "invalid", + foreground: "f44747" + }, { + token: "emphasis", + fontStyle: "italic" + }, { + token: "strong", + fontStyle: "bold" + }, { + token: "variable", + foreground: "1AEBFF" + }, { + token: "variable.parameter", + foreground: "9CDCFE" + }, { + token: "constant", + foreground: "569CD6" + }, { + token: "comment", + foreground: "608B4E" + }, { + token: "number", + foreground: "FFFFFF" + }, { + token: "regexp", + foreground: "C0C0C0" + }, { + token: "annotation", + foreground: "569CD6" + }, { + token: "type", + foreground: "3DC9B0" + }, { + token: "delimiter", + foreground: "FFFF00" + }, { + token: "delimiter.html", + foreground: "FFFF00" + }, { + token: "tag", + foreground: "569CD6" + }, { + token: "tag.id.pug", + foreground: "4F76AC" + }, { + token: "tag.class.pug", + foreground: "4F76AC" + }, { + token: "meta", + foreground: "D4D4D4" + }, { + token: "meta.tag", + foreground: "CE9178" + }, { + token: "metatag", + foreground: "569CD6" + }, { + token: "metatag.content.html", + foreground: "1AEBFF" + }, { + token: "metatag.html", + foreground: "569CD6" + }, { + token: "metatag.xml", + foreground: "569CD6" + }, { + token: "metatag.php", + fontStyle: "bold" + }, { + token: "key", + foreground: "9CDCFE" + }, { + token: "string.key", + foreground: "9CDCFE" + }, { + token: "string.value", + foreground: "CE9178" + }, { + token: "attribute.name", + foreground: "569CD6" + }, { + token: "attribute.value", + foreground: "3FF23F" + }, { + token: "string", + foreground: "CE9178" + }, { + token: "string.sql", + foreground: "FF0000" + }, { + token: "keyword", + foreground: "569CD6" + }, { + token: "keyword.flow", + foreground: "C586C0" + }, { + token: "operator.sql", + foreground: "778899" + }, { + token: "operator.swift", + foreground: "909090" + }, { + token: "predefined.sql", + foreground: "FF00FF" + }], + colors: { + [_n.cv]: "#000000", [_n.NO]: "#FFFFFF", [fn.tR]: "#FFFFFF", [fn.Ym]: + "#FFFFFF" + } + }; + var rr = i(2321); + const sr = "vs", + ar = "vs-dark", + lr = "hc-black", + dr = Ho.B.as(_n.IP.ColorContribution), + cr = Ho.B.as(bn.IP.ThemingContribution); + class hr { + constructor(e, t) { + this.semanticHighlighting = !1, this.themeData = t; + let i = t.base; + e.length > 0 ? (ur(e) ? this.id = e : this.id = i + " " + e, this.themeName = + e) : (this.id = i, this.themeName = i), this.colors = null, this.defaultColors = + Object.create(null), this._tokenTheme = null + } + get base() { + return this.themeData.base + } + notifyBaseUpdated() { + this.themeData.inherit && (this.colors = null, this._tokenTheme = null) + } + getColors() { + if (!this.colors) { + const e = new Map; + for (let t in this.themeData.colors) e.set(t, Zo.Il.fromHex(this.themeData + .colors[t])); + if (this.themeData.inherit) { + let t = gr(this.themeData.base); + for (let i in t.colors) e.has(i) || e.set(i, Zo.Il.fromHex(t.colors[ + i])) + } + this.colors = e + } + return this.colors + } + getColor(e, t) { + return this.getColors().get(e) || (!1 !== t ? this.getDefault(e) : + void 0) + } + getDefault(e) { + let t = this.defaultColors[e]; + return t || (t = dr.resolveDefaultColor(e, this), this.defaultColors[e] = + t, t) + } + defines(e) { + return Object.prototype.hasOwnProperty.call(this.getColors(), e) + } + get type() { + switch (this.base) { + case sr: + return rr.e.LIGHT; + case lr: + return rr.e.HIGH_CONTRAST; + default: + return rr.e.DARK + } + } + get tokenTheme() { + if (!this._tokenTheme) { + let e = [], + t = []; + if (this.themeData.inherit) { + let i = gr(this.themeData.base); + e = i.rules, i.encodedTokensColors && (t = i.encodedTokensColors) + } + e = e.concat(this.themeData.rules), this.themeData.encodedTokensColors && + (t = this.themeData.encodedTokensColors), this._tokenTheme = Xo.createFromRawTokenTheme( + e, t) + } + return this._tokenTheme + } + getTokenStyleMetadata(e, t, i) { + const n = this.tokenTheme._match([e].concat(t).join(".")).metadata, + o = Ae.NX.getForeground(n), + r = Ae.NX.getFontStyle(n); + return { + foreground: o, + italic: Boolean(1 & r), + bold: Boolean(2 & r), + underline: Boolean(4 & r) + } + } + } + + function ur(e) { + return e === sr || e === ar || e === lr + } + + function gr(e) { + switch (e) { + case sr: + return ir; + case ar: + return nr; + case lr: + return or + } + } + + function pr(e) { + let t = gr(e); + return new hr(e, t) + } + class mr extends Le.JT { + constructor() { + super(), this._onColorThemeChange = this._register(new z.Q5), this.onDidColorThemeChange = + this._onColorThemeChange.event, this._environment = Object.create( + null), this._autoDetectHighContrast = !0, this._knownThemes = new Map, + this._knownThemes.set(sr, pr(sr)), this._knownThemes.set(ar, pr(ar)), + this._knownThemes.set(lr, pr(lr)); + const e = function() { + const e = new z.Q5, + t = (0, wn.Ks)(); + return t.onDidChange((() => e.fire())), { + onDidChange: e.event, + getCSS() { + const e = {}, + i = i => { + let n = i.defaults; + for (; bn.kS.isThemeIcon(n);) { + const e = t.getIcon(n.id); + if (!e) return; + n = e.defaults + } + const o = n.fontId; + if (o) { + const r = t.getIconFont(o); + if (r) return e[o] = r, + `.codicon-${i.id}:before { content: '${n.fontCharacter}'; font-family: ${(0,he._h)(o)}; }` + } + return + `.codicon-${i.id}:before { content: '${n.fontCharacter}'; }` + }, + n = []; + for (let e of t.getIcons()) { + const t = i(e); + t && n.push(t) + } + for (let t in e) { + const i = e[t].definition.src.map((e => + `${(0,he.wY)(e.location)} format('${e.format}')`)).join(", "); + n.push( + `@font-face { src: ${i}; font-family: ${(0,he._h)(t)}; font-display: block; }` + ) + } + return n.join("\n") + } + } + }(); + this._codiconCSS = e.getCSS(), this._themeCSS = "", this._allCSS = + `${this._codiconCSS}\n${this._themeCSS}`, this._globalStyleElement = + null, this._styleElements = [], this._colorMapOverride = null, this.setTheme( + sr), e.onDidChange((() => { + this._codiconCSS = e.getCSS(), this._updateCSS() + })), he.uB("(forced-colors: active)", (() => { + this._updateActualTheme() + })) + } + registerEditorContainer(e) { + return he.OO(e) ? this._registerShadowDomContainer(e) : this._registerRegularEditorContainer() + } + _registerRegularEditorContainer() { + return this._globalStyleElement || (this._globalStyleElement = he.dS(), + this._globalStyleElement.className = "monaco-colors", this._globalStyleElement + .textContent = this._allCSS, this._styleElements.push(this._globalStyleElement) + ), Le.JT.None + } + _registerShadowDomContainer(e) { + const t = he.dS(e); + return t.className = "monaco-colors", t.textContent = this._allCSS, + this._styleElements.push(t), { + dispose: () => { + for (let e = 0; e < this._styleElements.length; e++) + if (this._styleElements[e] === t) return void this._styleElements + .splice(e, 1) + } + } + } + defineTheme(e, t) { + if (!/^[a-z0-9\-]+$/i.test(e)) throw new Error("Illegal theme name!"); + if (!ur(t.base) && !ur(e)) throw new Error("Illegal theme base!"); + this._knownThemes.set(e, new hr(e, t)), ur(e) && this._knownThemes.forEach( + (t => { + t.base === e && t.notifyBaseUpdated() + })), this._theme.themeName === e && this.setTheme(e) + } + getColorTheme() { + return this._theme + } + setColorMapOverride(e) { + this._colorMapOverride = e, this._updateThemeOrColorMap() + } + setTheme(e) { + let t; + t = this._knownThemes.has(e) ? this._knownThemes.get(e) : this._knownThemes + .get(sr), this._desiredTheme = t, this._updateActualTheme() + } + _updateActualTheme() { + const e = this._autoDetectHighContrast && window.matchMedia( + "(forced-colors: active)").matches ? this._knownThemes.get(lr) : + this._desiredTheme; + this._theme !== e && (this._theme = e, this._updateThemeOrColorMap()) + } + setAutoDetectHighContrast(e) { + this._autoDetectHighContrast = e, this._updateActualTheme() + } + _updateThemeOrColorMap() { + let e = [], + t = {}, + i = { + addRule: i => { + t[i] || (e.push(i), t[i] = !0) + } + }; + cr.getThemingParticipants().forEach((e => e(this._theme, i, this._environment))); + const n = this._colorMapOverride || this._theme.tokenTheme.getColorMap(); + i.addRule(function(e) { + let t = []; + for (let i = 1, n = e.length; i < n; i++) { + let n = e[i]; + t[i] = `.mtk${i} { color: ${n}; }` + } + return t.push(".mtki { font-style: italic; }"), t.push( + ".mtkb { font-weight: bold; }"), t.push( + ".mtku { text-decoration: underline; text-underline-position: under; }" + ), t.join("\n") + }(n)), this._themeCSS = e.join("\n"), this._updateCSS(), Ae.RW.setColorMap( + n), this._onColorThemeChange.fire(this._theme) + } + _updateCSS() { + this._allCSS = `${this._codiconCSS}\n${this._themeCSS}`, this._styleElements + .forEach((e => e.textContent = this._allCSS)) + } + getFileIconTheme() { + return { + hasFileIcons: !1, + hasFolderIcons: !1, + hidesExplorerArrows: !1 + } + } + } + var fr = i(3725); + const _r = "data-keybinding-context"; + class br { + constructor(e, t) { + this._id = e, this._parent = t, this._value = Object.create(null), + this._value._contextId = e + } + setValue(e, t) { + return this._value[e] !== t && (this._value[e] = t, !0) + } + removeValue(e) { + return e in this._value && (delete this._value[e], !0) + } + getValue(e) { + const t = this._value[e]; + return void 0 === t && this._parent ? this._parent.getValue(e) : t + } + } + class vr extends br { + constructor() { + super(-1, null) + } + setValue(e, t) { + return !1 + } + removeValue(e) { + return !1 + } + getValue(e) {} + } + vr.INSTANCE = new vr; + class wr extends br { + constructor(e, t, i) { + super(e, null), this._configurationService = t, this._values = ge.Id.forConfigKeys(), + this._listener = this._configurationService.onDidChangeConfiguration( + (e => { + if (6 === e.source) { + const e = Array.from(fr.$.map(this._values, (([e]) => e))); + this._values.clear(), i.fire(new Sr(e)) + } else { + const t = []; + for (const i of e.affectedKeys) { + const e = `config.${i}`, + n = this._values.findSuperstr(e); + void 0 !== n && (t.push(...fr.$.map(n, (([e]) => e))), this._values + .deleteSuperstr(e)), this._values.has(e) && (t.push(e), this._values + .delete(e)) + } + i.fire(new Sr(t)) + } + })) + } + dispose() { + this._listener.dispose() + } + getValue(e) { + if (0 !== e.indexOf(wr._keyPrefix)) return super.getValue(e); + if (this._values.has(e)) return this._values.get(e); + const t = e.substr(wr._keyPrefix.length), + i = this._configurationService.getValue(t); + let n; + switch (typeof i) { + case "number": + case "boolean": + case "string": + n = i; + break; + default: + n = Array.isArray(i) ? JSON.stringify(i) : i + } + return this._values.set(e, n), n + } + setValue(e, t) { + return super.setValue(e, t) + } + removeValue(e) { + return super.removeValue(e) + } + } + wr._keyPrefix = "config."; + class Cr { + constructor(e, t, i) { + this._service = e, this._key = t, this._defaultValue = i, this.reset() + } + set(e) { + this._service.setContext(this._key, e) + } + reset() { + void 0 === this._defaultValue ? this._service.removeContext(this._key) : + this._service.setContext(this._key, this._defaultValue) + } + get() { + return this._service.getContextKeyValue(this._key) + } + } + class yr { + constructor(e) { + this.key = e + } + affectsSome(e) { + return e.has(this.key) + } + } + class Sr { + constructor(e) { + this.keys = e + } + affectsSome(e) { + for (const t of this.keys) + if (e.has(t)) return !0; + return !1 + } + } + class xr { + constructor(e) { + this.events = e + } + affectsSome(e) { + for (const t of this.events) + if (t.affectsSome(e)) return !0; + return !1 + } + } + class kr { + constructor(e) { + this._onDidChangeContext = new z.K3({ + merge: e => new xr(e) + }), this.onDidChangeContext = this._onDidChangeContext.event, this._isDisposed = ! + 1, this._myContextId = e + } + createKey(e, t) { + if (this._isDisposed) throw new Error( + "AbstractContextKeyService has been disposed"); + return new Cr(this, e, t) + } + bufferChangeEvents(e) { + this._onDidChangeContext.pause(); + try { + e() + } finally { + this._onDidChangeContext.resume() + } + } + createScoped(e) { + if (this._isDisposed) throw new Error( + "AbstractContextKeyService has been disposed"); + return new Nr(this, e) + } + contextMatchesRules(e) { + if (this._isDisposed) throw new Error( + "AbstractContextKeyService has been disposed"); + const t = this.getContextValuesContainer(this._myContextId); + return yi.contextMatchesRules(t, e) + } + getContextKeyValue(e) { + if (!this._isDisposed) return this.getContextValuesContainer(this._myContextId) + .getValue(e) + } + setContext(e, t) { + if (this._isDisposed) return; + const i = this.getContextValuesContainer(this._myContextId); + i && i.setValue(e, t) && this._onDidChangeContext.fire(new yr(e)) + } + removeContext(e) { + this._isDisposed || this.getContextValuesContainer(this._myContextId).removeValue( + e) && this._onDidChangeContext.fire(new yr(e)) + } + getContext(e) { + return this._isDisposed ? vr.INSTANCE : this.getContextValuesContainer( + function(e) { + for (; e;) { + if (e.hasAttribute(_r)) { + const t = e.getAttribute(_r); + return t ? parseInt(t, 10) : NaN + } + e = e.parentElement + } + return 0 + }(e)) + } + } + let Lr = class extends kr { + constructor(e) { + super(0), this._contexts = new Map, this._toDispose = new Le.SL, this + ._lastContextId = 0; + const t = new wr(this._myContextId, e, this._onDidChangeContext); + this._contexts.set(this._myContextId, t), this._toDispose.add(t) + } + dispose() { + this._onDidChangeContext.dispose(), this._isDisposed = !0, this._toDispose + .dispose() + } + getContextValuesContainer(e) { + return this._isDisposed ? vr.INSTANCE : this._contexts.get(e) || vr.INSTANCE + } + createChildContext(e = this._myContextId) { + if (this._isDisposed) throw new Error( + "ContextKeyService has been disposed"); + let t = ++this._lastContextId; + return this._contexts.set(t, new br(t, this.getContextValuesContainer( + e))), t + } + disposeContext(e) { + this._isDisposed || this._contexts.delete(e) + } + }; + Lr = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([function(e, t) { + return function(i, n) { + t(i, n, e) + } + }(0, gi.Ui)], Lr); + class Nr extends kr { + constructor(e, t) { + if (super(e.createChildContext()), this._parentChangeListener = new Le + .XK, this._parent = e, this._updateParentChangeListener(), this._domNode = + t, this._domNode.hasAttribute(_r)) { + let e = ""; + this._domNode.classList && (e = Array.from(this._domNode.classList.values()) + .join(", ")), console.error("Element already has context attribute" + + (e ? ": " + e : "")) + } + this._domNode.setAttribute(_r, String(this._myContextId)) + } + _updateParentChangeListener() { + this._parentChangeListener.value = this._parent.onDidChangeContext( + this._onDidChangeContext.fire, this._onDidChangeContext) + } + dispose() { + this._isDisposed || (this._onDidChangeContext.dispose(), this._parent.disposeContext( + this._myContextId), this._parentChangeListener.dispose(), this._domNode + .removeAttribute(_r), this._isDisposed = !0) + } + getContextValuesContainer(e) { + return this._isDisposed ? vr.INSTANCE : this._parent.getContextValuesContainer( + e) + } + createChildContext(e = this._myContextId) { + if (this._isDisposed) throw new Error( + "ScopedContextKeyService has been disposed"); + return this._parent.createChildContext(e) + } + disposeContext(e) { + this._isDisposed || this._parent.disposeContext(e) + } + } + _e.P.registerCommand(Ci.Eq, (function(e, t, i) { + e.get(Ci.i6).createKey(String(t), i) + })), _e.P.registerCommand({ + id: "getContextKeyInfo", + handler: () => [...Ci.uy.all()].sort(((e, t) => e.key.localeCompare(t.key))), + description: { + description: (0, vi.N)("getContextKeyInfo", + "A command that returns information about context keys"), + args: [] + } + }), _e.P.registerCommand("_generateContextKeyInfo", (function() { + const e = [], + t = new Set; + for (let i of Ci.uy.all()) t.has(i.key) || (t.add(i.key), e.push(i)); + e.sort(((e, t) => e.key.localeCompare(t.key))), console.log(JSON.stringify( + e, void 0, 2)) + })); + var Dr, Er = i(829), + Ir = i(3938), + Tr = i(6268), + Mr = i(553), + Ar = i(6033), + Rr = i(9899), + Or = i(161), + Pr = i(1134), + Fr = i(6328), + Br = {}; + + function Wr(e, t, i) { + const n = i.mode === Dr.ALIGN ? i.offset : i.offset + i.size, + o = i.mode === Dr.ALIGN ? i.offset + i.size : i.offset; + return 0 === i.position ? t <= e - n ? n : t <= o ? o - t : Math.max(e - + t, 0) : t <= o ? o - t : t <= e - n ? n : 0 + } + Br.styleTagTransform = se(), Br.setAttributes = ie(), Br.insert = ee().bind( + null, "head"), Br.domAPI = X(), Br.insertStyleElement = oe(), Y()(Fr.Z, + Br), Fr.Z && Fr.Z.locals && Fr.Z.locals, + function(e) { + e[e.AVOID = 0] = "AVOID", e[e.ALIGN = 1] = "ALIGN" + }(Dr || (Dr = {})); + class zr extends Le.JT { + constructor(e, t) { + super(), this.container = null, this.delegate = null, this.toDisposeOnClean = + Le.JT.None, this.toDisposeOnSetContainer = Le.JT.None, this.shadowRoot = + null, this.shadowRootHostElement = null, this.view = he.$( + ".context-view"), this.useFixedPosition = !1, this.useShadowDOM = ! + 1, he.Cp(this.view), this.setContainer(e, t), this._register((0, Le.OF) + ((() => this.setContainer(null, 1)))) + } + setContainer(e, t) { + var i; + if (this.container && (this.toDisposeOnSetContainer.dispose(), this.shadowRoot ? + (this.shadowRoot.removeChild(this.view), this.shadowRoot = null, + null === (i = this.shadowRootHostElement) || void 0 === i || i.remove(), + this.shadowRootHostElement = null) : this.container.removeChild( + this.view), this.container = null), e) { + if (this.container = e, this.useFixedPosition = 1 !== t, this.useShadowDOM = + 3 === t, this.useShadowDOM) { + this.shadowRootHostElement = he.$(".shadow-root-host"), this.container + .appendChild(this.shadowRootHostElement), this.shadowRoot = this.shadowRootHostElement + .attachShadow({ + mode: "open" + }); + const e = document.createElement("style"); + e.textContent = Vr, this.shadowRoot.appendChild(e), this.shadowRoot + .appendChild(this.view), this.shadowRoot.appendChild(he.$("slot")) + } else this.container.appendChild(this.view); + const i = new Le.SL; + zr.BUBBLE_UP_EVENTS.forEach((e => { + i.add(he.mu(this.container, e, (e => { + this.onDOMEvent(e, !1) + }))) + })), zr.BUBBLE_DOWN_EVENTS.forEach((e => { + i.add(he.mu(this.container, e, (e => { + this.onDOMEvent(e, !0) + }), !0)) + })), this.toDisposeOnSetContainer = i + } + } + show(e) { + this.isVisible() && this.hide(), he.PO(this.view), this.view.className = + "context-view", this.view.style.top = "0px", this.view.style.left = + "0px", this.view.style.zIndex = "2500", this.view.style.position = + this.useFixedPosition ? "fixed" : "absolute", he.$Z(this.view), this + .toDisposeOnClean = e.render(this.view) || Le.JT.None, this.delegate = + e, this.doLayout(), this.delegate.focus && this.delegate.focus() + } + getViewElement() { + return this.view + } + layout() { + this.isVisible() && (!1 !== this.delegate.canRelayout || ze.gn && Or.D + .pointerEvents ? (this.delegate.layout && this.delegate.layout(), + this.doLayout()) : this.hide()) + } + doLayout() { + if (!this.isVisible()) return; + let e, t = this.delegate.getAnchor(); + if (he.Re(t)) { + let i = he.i(t); + e = { + top: i.top, + left: i.left, + width: i.width, + height: i.height + } + } else e = { + top: t.y, + left: t.x, + width: t.width || 1, + height: t.height || 2 + }; + const i = he.w(this.view), + n = he.wn(this.view), + o = this.delegate.anchorPosition || 0, + r = this.delegate.anchorAlignment || 0; + let s, a; + if (0 === (this.delegate.anchorAxisAlignment || 0)) { + const t = { + offset: e.top - window.pageYOffset, + size: e.height, + position: 0 === o ? 0 : 1 + }, + l = { + offset: e.left, + size: e.width, + position: 0 === r ? 0 : 1, + mode: Dr.ALIGN + }; + s = Wr(window.innerHeight, n, t) + window.pageYOffset, Pr.e.intersects({ + start: s, + end: s + n + }, { + start: t.offset, + end: t.offset + t.size + }) && (l.mode = Dr.AVOID), a = Wr(window.innerWidth, i, l) + } else { + const t = { + offset: e.left, + size: e.width, + position: 0 === r ? 0 : 1 + }, + l = { + offset: e.top, + size: e.height, + position: 0 === o ? 0 : 1, + mode: Dr.ALIGN + }; + a = Wr(window.innerWidth, i, t), Pr.e.intersects({ + start: a, + end: a + i + }, { + start: t.offset, + end: t.offset + t.size + }) && (l.mode = Dr.AVOID), s = Wr(window.innerHeight, n, l) + + window.pageYOffset + } + this.view.classList.remove("top", "bottom", "left", "right"), this.view + .classList.add(0 === o ? "bottom" : "top"), this.view.classList.add( + 0 === r ? "left" : "right"), this.view.classList.toggle("fixed", + this.useFixedPosition); + const l = he.i(this.container); + this.view.style.top = s - (this.useFixedPosition ? he.i(this.view).top : + l.top) + "px", this.view.style.left = a - (this.useFixedPosition ? + he.i(this.view).left : l.left) + "px", this.view.style.width = + "initial" + } + hide(e) { + const t = this.delegate; + this.delegate = null, (null == t ? void 0 : t.onHide) && t.onHide(e), + this.toDisposeOnClean.dispose(), he.Cp(this.view) + } + isVisible() { + return !!this.delegate + } + onDOMEvent(e, t) { + this.delegate && (this.delegate.onDOMEvent ? this.delegate.onDOMEvent( + e, document.activeElement) : t && !he.jg(e.target, this.container) && + this.hide()) + } + dispose() { + this.hide(), super.dispose() + } + } + zr.BUBBLE_UP_EVENTS = ["click", "keydown", "focus", "blur"], zr.BUBBLE_DOWN_EVENTS = [ + "click" + ]; + let Vr = + '\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: "codicon";\n\t\tfont-display: block;\n\t\tsrc: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n'; + var Hr = i(1212); + const Ur = /\(&([^\s&])\)|(^|[^&])&([^\s&])/, + jr = /(&)?(&)([^\s&])/g, + Kr = (0, vn.CM)("menu-selection", vn.lA.check), + $r = (0, vn.CM)("menu-submenu", vn.lA.chevronRight); + var qr; + ! function(e) { + e[e.Right = 0] = "Right", e[e.Left = 1] = "Left" + }(qr || (qr = {})); + class Zr extends un.o { + constructor(e, t, i = {}) { + e.classList.add("monaco-menu-container"), e.setAttribute("role", + "presentation"); + const n = document.createElement("div"); + n.classList.add("monaco-menu"), n.setAttribute("role", "presentation"), + super(n, { + orientation: 1, + actionViewItemProvider: e => this.doGetActionViewItem(e, i, o), + context: i.context, + actionRunner: i.actionRunner, + ariaLabel: i.ariaLabel, + focusOnlyEnabledItems: !0, + triggerKeys: { + keys: [3, ...ze.dz || ze.IJ ? [10] : []], + keyDown: !0 + } + }), this.menuElement = n, this.actionsList.setAttribute("role", + "menu"), this.actionsList.tabIndex = 0, this.menuDisposables = this + ._register(new Le.SL), this.initializeStyleSheet(e), this._register( + Mr.o.addTarget(n)), (0, he.nm)(n, he.tw.KEY_DOWN, (e => { + new ai.y(e).equals(2) && e.preventDefault() + })), i.enableMnemonics && this.menuDisposables.add((0, he.nm)(n, he.tw + .KEY_DOWN, (e => { + const t = e.key.toLocaleLowerCase(); + if (this.mnemonics.has(t)) { + he.zB.stop(e, !0); + const i = this.mnemonics.get(t); + if (1 === i.length && (i[0] instanceof Yr && i[0].container && + this.focusItemByElement(i[0].container), i[0].onClick(e)), i.length > + 1) { + const e = i.shift(); + e && e.container && (this.focusItemByElement(e.container), i.push( + e)), this.mnemonics.set(t, i) + } + } + }))), ze.IJ && this._register((0, he.nm)(n, he.tw.KEY_DOWN, (e => { + const t = new ai.y(e); + t.equals(14) || t.equals(11) ? (this.focusedItem = this.viewItems + .length - 1, this.focusNext(), he.zB.stop(e, !0)) : (t.equals( + 13) || t.equals(12)) && (this.focusedItem = 0, this.focusPrevious(), + he.zB.stop(e, !0)) + }))), this._register((0, he.nm)(this.domNode, he.tw.MOUSE_OUT, (e => { + let t = e.relatedTarget; + (0, he.jg)(t, this.domNode) || (this.focusedItem = void 0, this.updateFocus(), + e.stopPropagation()) + }))), this._register((0, he.nm)(this.actionsList, he.tw.MOUSE_OVER, ( + e => { + let t = e.target; + if (t && (0, he.jg)(t, this.actionsList) && t !== this.actionsList) { + for (; t.parentElement !== this.actionsList && null !== t.parentElement;) + t = t.parentElement; + if (t.classList.contains("action-item")) { + const e = this.focusedItem; + this.setFocusedItem(t), e !== this.focusedItem && this.updateFocus() + } + } + }))), this._register(Mr.o.addTarget(this.actionsList)), this._register( + (0, he.nm)(this.actionsList, Mr.t.Tap, (e => { + let t = e.initialTarget; + if (t && (0, he.jg)(t, this.actionsList) && t !== this.actionsList) { + for (; t.parentElement !== this.actionsList && null !== t.parentElement;) + t = t.parentElement; + if (t.classList.contains("action-item")) { + const e = this.focusedItem; + this.setFocusedItem(t), e !== this.focusedItem && this.updateFocus() + } + } + }))); + let o = { + parent: this + }; + this.mnemonics = new Map, this.scrollableElement = this._register(new gn + .s$(n, { + alwaysConsumeMouseWheel: !0, + horizontal: 2, + vertical: 3, + verticalScrollbarSize: 7, + handleMouseWheel: !0, + useShadows: !0 + })); + const r = this.scrollableElement.getDomNode(); + r.style.position = "", this._register((0, he.nm)(n, Mr.t.Change, (e => { + he.zB.stop(e, !0); + const t = this.scrollableElement.getScrollPosition().scrollTop; + this.scrollableElement.setScrollPosition({ + scrollTop: t - e.translationY + }) + }))), this._register((0, he.nm)(r, he.tw.MOUSE_UP, (e => { + e.preventDefault() + }))), n.style.maxHeight = + `${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`, + t = t.filter((e => { + var t; + return !(null === (t = i.submenuIds) || void 0 === t ? void 0 : t + .has(e.id)) || (console.warn(`Found submenu cycle: ${e.id}`), ! + 1) + })), this.push(t, { + icon: !0, + label: !0, + isMenu: !0 + }), e.appendChild(this.scrollableElement.getDomNode()), this.scrollableElement + .scanDomNode(), this.viewItems.filter((e => !(e instanceof Qr))).forEach( + ((e, t, i) => { + e.updatePositionInSet(t + 1, i.length) + })) + } + initializeStyleSheet(e) { + (0, he.OO)(e) ? (this.styleSheet = (0, he.dS)(e), this.styleSheet.textContent = + Xr) : (Zr.globalStyleSheet || (Zr.globalStyleSheet = (0, he.dS)(), + Zr.globalStyleSheet.textContent = Xr), this.styleSheet = Zr.globalStyleSheet) + } + style(e) { + const t = this.getContainer(), + i = e.foregroundColor ? `${e.foregroundColor}` : "", + n = e.backgroundColor ? `${e.backgroundColor}` : "", + o = e.borderColor ? `1px solid ${e.borderColor}` : "", + r = e.shadowColor ? `0 2px 4px ${e.shadowColor}` : ""; + t.style.border = o, this.domNode.style.color = i, this.domNode.style.backgroundColor = + n, t.style.boxShadow = r, this.viewItems && this.viewItems.forEach(( + t => { + (t instanceof Gr || t instanceof Qr) && t.style(e) + })) + } + getContainer() { + return this.scrollableElement.getDomNode() + } + get onScroll() { + return this.scrollableElement.onScroll + } + focusItemByElement(e) { + const t = this.focusedItem; + this.setFocusedItem(e), t !== this.focusedItem && this.updateFocus() + } + setFocusedItem(e) { + for (let t = 0; t < this.actionsList.children.length; t++) + if (e === this.actionsList.children[t]) { + this.focusedItem = t; + break + } + } + updateFocus(e) { + super.updateFocus(e, !0), void 0 !== this.focusedItem && this.scrollableElement + .setScrollPosition({ + scrollTop: Math.round(this.menuElement.scrollTop) + }) + } + doGetActionViewItem(e, t, i) { + if (e instanceof pn.Z0) return new Qr(t.context, e, { + icon: !0 + }); + if (e instanceof pn.wY) { + const n = new Yr(e, e.actions, i, Object.assign(Object.assign({}, t), { + submenuIds: new Set([...t.submenuIds || [], e.id]) + })); + if (t.enableMnemonics) { + const e = n.getMnemonic(); + if (e && n.isEnabled()) { + let t = []; + this.mnemonics.has(e) && (t = this.mnemonics.get(e)), t.push(n), + this.mnemonics.set(e, t) + } + } + return n + } { + const i = { + enableMnemonics: t.enableMnemonics, + useEventAsContext: t.useEventAsContext + }; + if (t.getKeyBinding) { + const n = t.getKeyBinding(e); + if (n) { + const e = n.getLabel(); + e && (i.keybinding = e) + } + } + const n = new Gr(t.context, e, i); + if (t.enableMnemonics) { + const e = n.getMnemonic(); + if (e && n.isEnabled()) { + let t = []; + this.mnemonics.has(e) && (t = this.mnemonics.get(e)), t.push(n), + this.mnemonics.set(e, t) + } + } + return n + } + } + } + class Gr extends Ar.Y { + constructor(e, t, i = {}) { + if (i.isMenu = !0, super(t, t, i), this.options = i, this.options.icon = + void 0 !== i.icon && i.icon, this.options.label = void 0 === i.label || + i.label, this.cssClass = "", this.options.label && i.enableMnemonics + ) { + let e = this.getAction().label; + if (e) { + let t = Ur.exec(e); + t && (this.mnemonic = (t[1] ? t[1] : t[3]).toLocaleLowerCase()) + } + } + this.runOnceToEnableMouseUp = new Be.pY((() => { + this.element && (this._register((0, he.nm)(this.element, he.tw.MOUSE_UP, ( + e => { + if (he.zB.stop(e, !0), Tr.vU) { + if (new Ir.n(e).rightButton) return; + this.onClick(e) + } else setTimeout((() => { + this.onClick(e) + }), 0) + }))), this._register((0, he.nm)(this.element, he.tw.CONTEXT_MENU, ( + e => { + he.zB.stop(e, !0) + })))) + }), 100), this._register(this.runOnceToEnableMouseUp) + } + render(e) { + super.render(e), this.element && (this.container = e, this.item = (0, + he.R3)(this.element, (0, he.$)("a.action-menu-item")), this._action + .id === pn.Z0.ID ? this.item.setAttribute("role", "presentation") : + (this.item.setAttribute("role", "menuitem"), this.mnemonic && this.item + .setAttribute("aria-keyshortcuts", `${this.mnemonic}`)), this.check = + (0, he.R3)(this.item, (0, he.$)("span.menu-item-check" + Kr.cssSelector)), + this.check.setAttribute("role", "none"), this.label = (0, he.R3)( + this.item, (0, he.$)("span.action-label")), this.options.label && + this.options.keybinding && ((0, he.R3)(this.item, (0, he.$)( + "span.keybinding")).textContent = this.options.keybinding), this.runOnceToEnableMouseUp + .schedule(), this.updateClass(), this.updateLabel(), this.updateTooltip(), + this.updateEnabled(), this.updateChecked()) + } + blur() { + super.blur(), this.applyStyle() + } + focus() { + super.focus(), this.item && this.item.focus(), this.applyStyle() + } + updatePositionInSet(e, t) { + this.item && (this.item.setAttribute("aria-posinset", `${e}`), this.item + .setAttribute("aria-setsize", `${t}`)) + } + updateLabel() { + if (this.label && this.options.label) { + (0, he.PO)(this.label); + let e = (0, Hr.x$)(this.getAction().label); + if (e) { + const t = function(e) { + const t = Ur, + i = t.exec(e); + if (!i) return e; + const n = !i[1]; + return e.replace(t, n ? "$2$3" : "").trim() + }(e); + this.options.enableMnemonics || (e = t), this.label.setAttribute( + "aria-label", t.replace(/&&/g, "&")); + const i = Ur.exec(e); + if (i) { + e = Xe.YU(e), jr.lastIndex = 0; + let t = jr.exec(e); + for (; t && t[1];) t = jr.exec(e); + const n = e => e.replace(/&&/g, "&"); + t ? this.label.append(Xe.j3(n(e.substr(0, t.index)), " "), (0, he.$) + ("u", { + "aria-hidden": "true" + }, t[3]), Xe.oL(n(e.substr(t.index + t[0].length)), " ")) : this + .label.innerText = n(e).trim(), this.item && this.item.setAttribute( + "aria-keyshortcuts", (i[1] ? i[1] : i[3]).toLocaleLowerCase()) + } else this.label.innerText = e.replace(/&&/g, "&").trim() + } + } + } + updateTooltip() { + let e = null; + this.getAction().tooltip ? e = this.getAction().tooltip : !this.options + .label && this.getAction().label && this.options.icon && (e = this.getAction() + .label, this.options.keybinding && (e = vi.N({ + key: "titleLabel", + comment: ["action title", "action keybinding"] + }, "{0} ({1})", e, this.options.keybinding))), e && this.item && ( + this.item.title = e) + } + updateClass() { + this.cssClass && this.item && this.item.classList.remove(...this.cssClass + .split(" ")), this.options.icon && this.label ? (this.cssClass = + this.getAction().class || "", this.label.classList.add("icon"), + this.cssClass && this.label.classList.add(...this.cssClass.split( + " ")), this.updateEnabled()) : this.label && this.label.classList.remove( + "icon") + } + updateEnabled() { + this.getAction().enabled ? (this.element && (this.element.classList.remove( + "disabled"), this.element.removeAttribute("aria-disabled")), this.item && + (this.item.classList.remove("disabled"), this.item.removeAttribute( + "aria-disabled"), this.item.tabIndex = 0)) : (this.element && ( + this.element.classList.add("disabled"), this.element.setAttribute( + "aria-disabled", "true")), this.item && (this.item.classList.add( + "disabled"), this.item.setAttribute("aria-disabled", "true"))) + } + updateChecked() { + this.item && (this.getAction().checked ? (this.item.classList.add( + "checked"), this.item.setAttribute("role", "menuitemcheckbox"), + this.item.setAttribute("aria-checked", "true")) : (this.item.classList + .remove("checked"), this.item.setAttribute("role", "menuitem"), + this.item.setAttribute("aria-checked", "false"))) + } + getMnemonic() { + return this.mnemonic + } + applyStyle() { + if (!this.menuStyle) return; + const e = this.element && this.element.classList.contains("focused"), + t = e && this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : + this.menuStyle.foregroundColor, + i = e && this.menuStyle.selectionBackgroundColor ? this.menuStyle.selectionBackgroundColor : + void 0, + n = e && this.menuStyle.selectionBorderColor ? + `thin solid ${this.menuStyle.selectionBorderColor}` : ""; + this.item && (this.item.style.color = t ? t.toString() : "", this.item + .style.backgroundColor = i ? i.toString() : ""), this.check && ( + this.check.style.color = t ? t.toString() : ""), this.container && + (this.container.style.border = n) + } + style(e) { + this.menuStyle = e, this.applyStyle() + } + } + class Yr extends Gr { + constructor(e, t, i, n) { + super(e, e, n), this.submenuActions = t, this.parentData = i, this.submenuOptions = + n, this.mysubmenu = null, this.submenuDisposables = this._register( + new Le.SL), this.mouseOver = !1, this.expandDirection = n && void 0 !== + n.expandDirection ? n.expandDirection : qr.Right, this.showScheduler = + new Be.pY((() => { + this.mouseOver && (this.cleanupExistingSubmenu(!1), this.createSubmenu(! + 1)) + }), 250), this.hideScheduler = new Be.pY((() => { + this.element && !(0, he.jg)((0, he.vY)(), this.element) && this.parentData + .submenu === this.mysubmenu && (this.parentData.parent.focus(!1), + this.cleanupExistingSubmenu(!0)) + }), 750) + } + render(e) { + super.render(e), this.element && (this.item && (this.item.classList.add( + "monaco-submenu-item"), this.item.tabIndex = 0, this.item.setAttribute( + "aria-haspopup", "true"), this.updateAriaExpanded("false"), this.submenuIndicator = + (0, he.R3)(this.item, (0, he.$)("span.submenu-indicator" + $r.cssSelector)), + this.submenuIndicator.setAttribute("aria-hidden", "true")), this._register( + (0, he.nm)(this.element, he.tw.KEY_UP, (e => { + let t = new ai.y(e); + (t.equals(17) || t.equals(3)) && (he.zB.stop(e, !0), this.createSubmenu(! + 0)) + }))), this._register((0, he.nm)(this.element, he.tw.KEY_DOWN, (e => { + let t = new ai.y(e); + (0, he.vY)() === this.item && (t.equals(17) || t.equals(3)) && + he.zB.stop(e, !0) + }))), this._register((0, he.nm)(this.element, he.tw.MOUSE_OVER, (e => { + this.mouseOver || (this.mouseOver = !0, this.showScheduler.schedule()) + }))), this._register((0, he.nm)(this.element, he.tw.MOUSE_LEAVE, (e => { + this.mouseOver = !1 + }))), this._register((0, he.nm)(this.element, he.tw.FOCUS_OUT, (e => { + this.element && !(0, he.jg)((0, he.vY)(), this.element) && this.hideScheduler + .schedule() + }))), this._register(this.parentData.parent.onScroll((() => { + this.parentData.parent.focus(!1), this.cleanupExistingSubmenu(!1) + })))) + } + updateEnabled() {} + onClick(e) { + he.zB.stop(e, !0), this.cleanupExistingSubmenu(!1), this.createSubmenu(! + 0) + } + cleanupExistingSubmenu(e) { + if (this.parentData.submenu && (e || this.parentData.submenu !== this.mysubmenu)) { + try { + this.parentData.submenu.dispose() + } catch (e) {} + this.parentData.submenu = void 0, this.updateAriaExpanded("false"), + this.submenuContainer && (this.submenuDisposables.clear(), this.submenuContainer = + void 0) + } + } + calculateSubmenuMenuLayout(e, t, i, n) { + const o = { + top: 0, + left: 0 + }; + return o.left = Wr(e.width, t.width, { + position: n === qr.Right ? 0 : 1, + offset: i.left, + size: i.width + }), o.left >= i.left && o.left < i.left + i.width && (i.left + 10 + t + .width <= e.width && (o.left = i.left + 10), i.top += 10, i.height = + 0), o.top = Wr(e.height, t.height, { + position: 0, + offset: i.top, + size: 0 + }), o.top + t.height === i.top && o.top + i.height + t.height <= e.height && + (o.top += i.height), o + } + createSubmenu(e = !0) { + if (this.element) + if (this.parentData.submenu) this.parentData.submenu.focus(!1); + else { + this.updateAriaExpanded("true"), this.submenuContainer = (0, he.R3)( + this.element, (0, he.$)("div.monaco-submenu")), this.submenuContainer + .classList.add("menubar-menu-items-holder", "context-view"); + const t = getComputedStyle(this.parentData.parent.domNode), + i = parseFloat(t.paddingTop || "0") || 0; + this.submenuContainer.style.zIndex = "1", this.submenuContainer.style + .position = "fixed", this.submenuContainer.style.top = "0", this.submenuContainer + .style.left = "0", this.parentData.submenu = new Zr(this.submenuContainer, + this.submenuActions.length ? this.submenuActions : [new pn.eZ], + this.submenuOptions), this.menuStyle && this.parentData.submenu.style( + this.menuStyle); + const n = this.element.getBoundingClientRect(), + o = { + top: n.top - i, + left: n.left, + height: n.height + 2 * i, + width: n.width + }, + r = this.submenuContainer.getBoundingClientRect(), + { + top: s, + left: a + } = this.calculateSubmenuMenuLayout(new he.Ro(window.innerWidth, + window.innerHeight), he.Ro.lift(r), o, this.expandDirection); + this.submenuContainer.style.left = `${a}px`, this.submenuContainer.style + .top = `${s}px`, this.submenuDisposables.add((0, he.nm)(this.submenuContainer, + he.tw.KEY_UP, (e => { + new ai.y(e).equals(15) && (he.zB.stop(e, !0), this.parentData.parent + .focus(), this.cleanupExistingSubmenu(!0)) + }))), this.submenuDisposables.add((0, he.nm)(this.submenuContainer, + he.tw.KEY_DOWN, (e => { + new ai.y(e).equals(15) && he.zB.stop(e, !0) + }))), this.submenuDisposables.add(this.parentData.submenu.onDidCancel( + (() => { + this.parentData.parent.focus(), this.cleanupExistingSubmenu(!0) + }))), this.parentData.submenu.focus(e), this.mysubmenu = this.parentData + .submenu + } + } + updateAriaExpanded(e) { + var t; + this.item && (null === (t = this.item) || void 0 === t || t.setAttribute( + "aria-expanded", e)) + } + applyStyle() { + if (super.applyStyle(), !this.menuStyle) return; + const e = this.element && this.element.classList.contains("focused") && + this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : + this.menuStyle.foregroundColor; + this.submenuIndicator && (this.submenuIndicator.style.color = e ? + `${e}` : ""), this.parentData.submenu && this.parentData.submenu.style( + this.menuStyle) + } + dispose() { + super.dispose(), this.hideScheduler.dispose(), this.mysubmenu && (this + .mysubmenu.dispose(), this.mysubmenu = null), this.submenuContainer && + (this.submenuContainer = void 0) + } + } + class Qr extends Ar.g { + style(e) { + this.label && (this.label.style.borderBottomColor = e.separatorColor ? + `${e.separatorColor}` : "") + } + } + let Xr = + `\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${(0,Rr.a)(Kr)}\n${(0,Rr.a)($r)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}\n`; + var Jr = i(4932), + es = {}; + es.styleTagTransform = se(), es.setAttributes = ie(), es.insert = ee().bind( + null, "head"), es.domAPI = X(), es.insertStyleElement = oe(), Y()(Jr.Z, + es), Jr.Z && Jr.Z.locals && Jr.Z.locals; + var ts = i(8810); + class is { + constructor(e, t, i, n, o) { + this.contextViewService = e, this.telemetryService = t, this.notificationService = + i, this.keybindingService = n, this.themeService = o, this.focusToReturn = + null, this.block = null, this.options = { + blockMouse: !0 + } + } + configure(e) { + this.options = e + } + showContextMenu(e) { + const t = e.getActions(); + if (!t.length) return; + let i; + this.focusToReturn = document.activeElement; + let n = (0, he.Re)(e.domForShadowRoot) ? e.domForShadowRoot : void 0; + this.contextViewService.showContextView({ + getAnchor: () => e.getAnchor(), + canRelayout: !1, + anchorAlignment: e.anchorAlignment, + anchorAxisAlignment: e.anchorAxisAlignment, + render: n => { + let o = e.getMenuClassName ? e.getMenuClassName() : ""; + o && (n.className += " " + o), this.options.blockMouse && (this.block = + n.appendChild((0, he.$)(".context-view-block")), this.block.style + .position = "fixed", this.block.style.cursor = "initial", this.block + .style.left = "0", this.block.style.top = "0", this.block.style + .width = "100%", this.block.style.height = "100%", this.block.style + .zIndex = "-1", (0, he.nm)(this.block, he.tw.MOUSE_DOWN, (e => + e.stopPropagation()))); + const r = new Le.SL, + s = e.actionRunner || new pn.Wi; + return s.onBeforeRun(this.onActionRun, this, r), s.onDidRun(this.onDidActionRun, + this, r), i = new Zr(n, t, { + actionViewItemProvider: e.getActionViewItem, + context: e.getActionsContext ? e.getActionsContext() : null, + actionRunner: s, + getKeyBinding: e.getKeyBinding ? e.getKeyBinding : e => this.keybindingService + .lookupKeybinding(e.id) + }), r.add((0, ts.tj)(i, this.themeService)), i.onDidCancel((() => + this.contextViewService.hideContextView(!0)), null, r), i.onDidBlur( + (() => this.contextViewService.hideContextView(!0)), null, r), + r.add((0, he.nm)(window, he.tw.BLUR, (() => this.contextViewService + .hideContextView(!0)))), r.add((0, he.nm)(window, he.tw.MOUSE_DOWN, ( + e => { + if (e.defaultPrevented) return; + let t = new Ir.n(e), + i = t.target; + if (!t.rightButton) { + for (; i;) { + if (i === n) return; + i = i.parentElement + } + this.contextViewService.hideContextView(!0) + } + }))), (0, Le.F8)(r, i) + }, + focus: () => { + i && i.focus(!!e.autoSelectFirstItem) + }, + onHide: t => { + e.onHide && e.onHide(!!t), this.block && (this.block.remove(), + this.block = null), this.focusToReturn && this.focusToReturn.focus() + } + }, n, !!n) + } + onActionRun(e) { + this.telemetryService.publicLog2("workbenchActionExecuted", { + id: e.action.id, + from: "contextMenu" + }), this.contextViewService.hideContextView(!1), this.focusToReturn && + this.focusToReturn.focus() + } + onDidActionRun(e) { + e.error && !(0, We.VV)(e.error) && this.notificationService.error(e.error) + } + } + var ns = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let os = class extends Le.JT { + constructor(e, t, i, n, o) { + super(), this.contextMenuHandler = new is(i, e, t, n, o) + } + configure(e) { + this.contextMenuHandler.configure(e) + } + showContextMenu(e) { + this.contextMenuHandler.showContextMenu(e), he._q.getInstance().resetKeyStatus() + } + }; + os = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([ns(0, Er.b), ns(1, Ti.lT), ns(2, Pn.u), ns(3, mo.d), ns(4, bn.XE)], + os); + const rs = (0, Rn.yh)("layoutService"); + let ss = class extends Le.JT { + constructor(e) { + super(), this.layoutService = e, this.currentViewDisposable = Le.JT.None, + this.container = e.container, this.contextView = this._register(new zr( + this.container, 1)), this.layout(), this._register(e.onDidLayout((() => + this.layout()))) + } + setContainer(e, t) { + this.contextView.setContainer(e, t || 1) + } + showContextView(e, t, i) { + t ? t !== this.container && (this.container = t, this.setContainer(t, + i ? 3 : 2)) : this.container !== this.layoutService.container && ( + this.container = this.layoutService.container, this.setContainer( + this.container, 1)), this.contextView.show(e); + const n = (0, Le.OF)((() => { + this.currentViewDisposable === n && this.hideContextView() + })); + return this.currentViewDisposable = n, n + } + getContextViewElement() { + return this.contextView.getViewElement() + } + layout() { + this.contextView.layout() + } + hideContextView(e) { + this.contextView.hide(e) + } + }; + ss = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([function(e, t) { + return function(i, n) { + t(i, n, e) + } + }(0, rs)], ss); + var as = i(8820), + ls = i(7108); + class ds { + constructor(e) { + this.incoming = new Map, this.outgoing = new Map, this.data = e + } + } + class cs { + constructor(e) { + this._hashFn = e, this._nodes = new Map + } + roots() { + const e = []; + for (let t of this._nodes.values()) 0 === t.outgoing.size && e.push(t); + return e + } + insertEdge(e, t) { + const i = this.lookupOrInsertNode(e), + n = this.lookupOrInsertNode(t); + i.outgoing.set(this._hashFn(t), n), n.incoming.set(this._hashFn(e), i) + } + removeNode(e) { + const t = this._hashFn(e); + this._nodes.delete(t); + for (let e of this._nodes.values()) e.outgoing.delete(t), e.incoming.delete( + t) + } + lookupOrInsertNode(e) { + const t = this._hashFn(e); + let i = this._nodes.get(t); + return i || (i = new ds(e), this._nodes.set(t, i)), i + } + isEmpty() { + return 0 === this._nodes.size + } + toString() { + let e = []; + for (let [t, i] of this._nodes) e.push( + `${t}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]` + ); + return e.join("\n") + } + findCycleSlow() { + for (let [e, t] of this._nodes) { + const i = new Set([e]), + n = this._findCycle(t, i); + if (n) return n + } + } + _findCycle(e, t) { + for (let [i, n] of e.outgoing) { + if (t.has(i)) return [...t, i].join(" -> "); + t.add(i); + const e = this._findCycle(n, t); + if (e) return e; + t.delete(i) + } + } + } + class hs extends Error { + constructor(e) { + var t; + super("cyclic dependency between services"), this.message = null !== ( + t = e.findCycleSlow()) && void 0 !== t ? t : + `UNABLE to detect cycle, dumping graph: \n${e.toString()}` + } + } + class us { + constructor(e = new On.y, t = !1, i) { + this._activeInstantiations = new Set, this._services = e, this._strict = + t, this._parent = i, this._services.set(Rn.TG, this) + } + createChild(e) { + return new us(e, this._strict, this) + } + invokeFunction(e, ...t) { + let i = gs.traceInvocation(e), + n = !1; + try { + return e({ + get: (e, t) => { + if (n) throw (0, We.L6)( + "service accessor is only valid during the invocation of its target method" + ); + const o = this._getOrCreateServiceInstance(e, i); + if (!o && t !== Rn.jt) throw new Error( + `[invokeFunction] unknown service '${e}'`); + return o + } + }, ...t) + } finally { + n = !0, i.stop() + } + } + createInstance(e, ...t) { + let i, n; + return e instanceof ls.M ? (i = gs.traceCreation(e.ctor), n = this._createInstance( + e.ctor, e.staticArguments.concat(t), i)) : (i = gs.traceCreation(e), + n = this._createInstance(e, t, i)), i.stop(), n + } + _createInstance(e, t = [], i) { + let n = Rn.I8.getServiceDependencies(e).sort(((e, t) => e.index - t.index)), + o = []; + for (const t of n) { + let n = this._getOrCreateServiceInstance(t.id, i); + if (!n && this._strict && !t.optional) throw new Error( + `[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`); + o.push(n) + } + let r = n.length > 0 ? n[0].index : t.length; + if (t.length !== r) { + console.warn( + `[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments` + ); + let i = r - t.length; + t = i > 0 ? t.concat(new Array(i)) : t.slice(0, r) + } + return new e(...[...t, ...o]) + } + _setServiceInstance(e, t) { + if (this._services.get(e) instanceof ls.M) this._services.set(e, t); + else { + if (!this._parent) throw new Error( + "illegalState - setting UNKNOWN service instance"); + this._parent._setServiceInstance(e, t) + } + } + _getServiceInstanceOrDescriptor(e) { + let t = this._services.get(e); + return !t && this._parent ? this._parent._getServiceInstanceOrDescriptor( + e) : t + } + _getOrCreateServiceInstance(e, t) { + let i = this._getServiceInstanceOrDescriptor(e); + return i instanceof ls.M ? this._safeCreateAndCacheServiceInstance(e, + i, t.branch(e, !0)) : (t.branch(e, !1), i) + } + _safeCreateAndCacheServiceInstance(e, t, i) { + if (this._activeInstantiations.has(e)) throw new Error( + `illegal state - RECURSIVELY instantiating service '${e}'`); + this._activeInstantiations.add(e); + try { + return this._createAndCacheServiceInstance(e, t, i) + } finally { + this._activeInstantiations.delete(e) + } + } + _createAndCacheServiceInstance(e, t, i) { + const n = new cs((e => e.id.toString())); + let o = 0; + const r = [{ + id: e, + desc: t, + _trace: i + }]; + for (; r.length;) { + const t = r.pop(); + if (n.lookupOrInsertNode(t), o++ > 1e3) throw new hs(n); + for (let i of Rn.I8.getServiceDependencies(t.desc.ctor)) { + let o = this._getServiceInstanceOrDescriptor(i.id); + if (o || i.optional || console.warn( + `[createInstance] ${e} depends on ${i.id} which is NOT registered.` + ), o instanceof ls.M) { + const e = { + id: i.id, + desc: o, + _trace: t._trace.branch(i.id, !0) + }; + n.insertEdge(t, e), r.push(e) + } + } + } + for (;;) { + const e = n.roots(); + if (0 === e.length) { + if (!n.isEmpty()) throw new hs(n); + break + } + for (const { + data: t + } + of e) { + if (this._getServiceInstanceOrDescriptor(t.id) instanceof ls.M) { + const e = this._createServiceInstanceWithOwner(t.id, t.desc.ctor, t + .desc.staticArguments, t.desc.supportsDelayedInstantiation, t._trace + ); + this._setServiceInstance(t.id, e) + } + n.removeNode(t) + } + } + return this._getServiceInstanceOrDescriptor(e) + } + _createServiceInstanceWithOwner(e, t, i = [], n, o) { + if (this._services.get(e) instanceof ls.M) return this._createServiceInstance( + t, i, n, o); + if (this._parent) return this._parent._createServiceInstanceWithOwner( + e, t, i, n, o); + throw new Error( + `illegalState - creating UNKNOWN service instance ${t.name}`) + } + _createServiceInstance(e, t = [], i, n) { + if (i) { + const i = new Be.Ue((() => this._createInstance(e, t, n))); + return new Proxy(Object.create(null), { + get(e, t) { + if (t in e) return e[t]; + let n = i.value, + o = n[t]; + return "function" != typeof o || (o = o.bind(n), e[t] = o), o + }, set: (e, t, n) => (i.value[t] = n, !0) + }) + } + return this._createInstance(e, t, n) + } + } + class gs { + constructor(e, t) { + this.type = e, this.name = t, this._start = Date.now(), this._dep = [] + } + static traceInvocation(e) { + return gs._None + } + static traceCreation(e) { + return gs._None + } + branch(e, t) { + let i = new gs(2, e.toString()); + return this._dep.push([e, t, i]), i + } + stop() { + let e = Date.now() - this._start; + gs._totals += e; + let t = !1, + i = [`${0===this.type?"CREATE":"CALL"} ${this.name}`, + `${function e(i,n){let o=[],r=new Array(i+1).join("\t");for(const[s,a,l]of n._dep)if(a&&l){t=!0,o.push(` + $ { + r + } + CREATES - > $ { + s + } + `);let n=e(i+1,l);n&&o.push(n)}else o.push(` + $ { + r + } + uses - > $ { + s + } + `);return o.join("\n")}(1,this)}`, + `DONE, took ${e.toFixed(2)}ms (grand total ${gs._totals.toFixed(2)}ms)` + ]; + (e > 2 || t) && console.log(i.join("\n")) + } + } + gs._None = new class extends gs { + constructor() { + super(-1, null) + } + stop() {} + branch() { + return this + } + }, gs._totals = 0; + var ps = i(4349), + ms = i(3738), + fs = i(8674); + class _s { + constructor() { + this._byResource = new ge.Y9, this._byOwner = new Map + } + set(e, t, i) { + let n = this._byResource.get(e); + n || (n = new Map, this._byResource.set(e, n)), n.set(t, i); + let o = this._byOwner.get(t); + o || (o = new ge.Y9, this._byOwner.set(t, o)), o.set(e, i) + } + get(e, t) { + let i = this._byResource.get(e); + return null == i ? void 0 : i.get(t) + } + delete(e, t) { + let i = !1, + n = !1, + o = this._byResource.get(e); + o && (i = o.delete(t)); + let r = this._byOwner.get(t); + if (r && (n = r.delete(e)), i !== n) throw new Error("illegal state"); + return i && n + } + values(e) { + var t, i, n, o; + return "string" == typeof e ? null !== (i = null === (t = this._byOwner + .get(e)) || void 0 === t ? void 0 : t.values()) && void 0 !== i ? i : + fr.$.empty() : H.o.isUri(e) ? null !== (o = null === (n = this._byResource + .get(e)) || void 0 === n ? void 0 : n.values()) && void 0 !== o ? o : + fr.$.empty() : fr.$.map(fr.$.concat(...this._byOwner.values()), (e => + e[1])) + } + } + class bs { + constructor(e) { + this.errors = 0, this.infos = 0, this.warnings = 0, this.unknowns = 0, + this._data = new ge.Y9, this._service = e, this._subscription = e.onMarkerChanged( + this._update, this) + } + dispose() { + this._subscription.dispose() + } + _update(e) { + for (const t of e) { + const e = this._data.get(t); + e && this._substract(e); + const i = this._resourceStats(t); + this._add(i), this._data.set(t, i) + } + } + _resourceStats(e) { + const t = { + errors: 0, + warnings: 0, + infos: 0, + unknowns: 0 + }; + if (e.scheme === me.lg.inMemory || e.scheme === me.lg.walkThrough || e + .scheme === me.lg.walkThroughSnippet) return t; + for (const { + severity: i + } + of this._service.read({ + resource: e + })) i === fs.ZL.Error ? t.errors += 1 : i === fs.ZL.Warning ? t.warnings += + 1 : i === fs.ZL.Info ? t.infos += 1 : t.unknowns += 1; + return t + } + _substract(e) { + this.errors -= e.errors, this.warnings -= e.warnings, this.infos -= e.infos, + this.unknowns -= e.unknowns + } + _add(e) { + this.errors += e.errors, this.warnings += e.warnings, this.infos += e.infos, + this.unknowns += e.unknowns + } + } + class vs { + constructor() { + this._onMarkerChanged = new z.D0({ + delay: 0, + merge: vs._merge + }), this.onMarkerChanged = this._onMarkerChanged.event, this._data = + new _s, this._stats = new bs(this) + } + dispose() { + this._stats.dispose(), this._onMarkerChanged.dispose() + } + remove(e, t) { + for (const i of t || []) this.changeOne(e, i, []) + } + changeOne(e, t, i) { + if ((0, St.XY)(i)) this._data.delete(t, e) && this._onMarkerChanged.fire( + [t]); + else { + const n = []; + for (const o of i) { + const i = vs._toMarker(e, t, o); + i && n.push(i) + } + this._data.set(t, e, n), this._onMarkerChanged.fire([t]) + } + } + static _toMarker(e, t, i) { + let { + code: n, + severity: o, + message: r, + source: s, + startLineNumber: a, + startColumn: l, + endLineNumber: d, + endColumn: c, + relatedInformation: h, + tags: u + } = i; + if (r) return a = a > 0 ? a : 1, l = l > 0 ? l : 1, d = d >= a ? d : a, + c = c > 0 ? c : l, { + resource: t, + owner: e, + code: n, + severity: o, + message: r, + source: s, + startLineNumber: a, + startColumn: l, + endLineNumber: d, + endColumn: c, + relatedInformation: h, + tags: u + } + } + read(e = Object.create(null)) { + let { + owner: t, + resource: i, + severities: n, + take: o + } = e; + if ((!o || o < 0) && (o = -1), t && i) { + const e = this._data.get(i, t); + if (e) { + const t = []; + for (const i of e) + if (vs._accept(i, n)) { + const e = t.push(i); + if (o > 0 && e === o) break + } + return t + } + return [] + } + if (t || i) { + const e = this._data.values(null != i ? i : t), + r = []; + for (const t of e) + for (const e of t) + if (vs._accept(e, n)) { + const t = r.push(e); + if (o > 0 && t === o) return r + } + return r + } { + const e = []; + for (let t of this._data.values()) + for (let i of t) + if (vs._accept(i, n)) { + const t = e.push(i); + if (o > 0 && t === o) return e + } + return e + } + } + static _accept(e, t) { + return void 0 === t || (t & e.severity) === e.severity + } + static _merge(e) { + const t = new ge.Y9; + for (let i of e) + for (let e of i) t.set(e, !0); + return Array.from(t.keys()) + } + } + var ws = i(6904), + Cs = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + ys = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let Ss = class { + constructor(e) { + this._commandService = e + } + createMenu(e, t, i) { + return new xs(e, Object.assign({ + emitEventsForSubmenuChanges: !1, + eventDebounceDelay: 50 + }, i), this._commandService, t, this) + } + }; + Ss = Cs([ys(0, _e.H)], Ss); + let xs = class e { + constructor(e, t, i, n, o) { + this._id = e, this._options = t, this._commandService = i, this._contextKeyService = + n, this._menuService = o, this._disposables = new Le.SL, this._menuGroups = [], + this._contextKeys = new Set, this._build(); + const r = new Be.pY((() => { + this._build(), this._onDidChange.fire(this) + }), t.eventDebounceDelay); + this._disposables.add(r), this._disposables.add(po.BH.onDidChangeMenu( + (t => { + t.has(e) && r.schedule() + }))); + const s = this._disposables.add(new Le.SL); + this._onDidChange = new z.Q5({ + onFirstListenerAdd: () => { + const e = new Be.pY((() => this._onDidChange.fire(this)), t.eventDebounceDelay); + s.add(e), s.add(n.onDidChangeContext((t => { + t.affectsSome(this._contextKeys) && e.schedule() + }))) + }, + onLastListenerRemove: s.clear.bind(s) + }), this.onDidChange = this._onDidChange.event + } + dispose() { + this._disposables.dispose(), this._onDidChange.dispose() + } + _build() { + this._menuGroups.length = 0, this._contextKeys.clear(); + const t = po.BH.getMenuItems(this._id); + let i; + t.sort(e._compareMenuItems); + for (const e of t) { + const t = e.group || ""; + i && i[0] === t || (i = [t, []], this._menuGroups.push(i)), i[1].push( + e), this._collectContextKeys(e) + } + } + _collectContextKeys(t) { + if (e._fillInKbExprKeys(t.when, this._contextKeys), (0, po.vr)(t)) { + if (t.command.precondition && e._fillInKbExprKeys(t.command.precondition, + this._contextKeys), t.command.toggled) { + const i = t.command.toggled.condition || t.command.toggled; + e._fillInKbExprKeys(i, this._contextKeys) + } + } else this._options.emitEventsForSubmenuChanges && po.BH.getMenuItems( + t.submenu).forEach(this._collectContextKeys, this) + } + getActions(e) { + const t = []; + for (let i of this._menuGroups) { + const [n, o] = i, r = []; + for (const t of o) + if (this._contextKeyService.contextMatchesRules(t.when)) { + const i = (0, po.vr)(t) ? new po.U8(t.command, t.alt, e, this._contextKeyService, + this._commandService) : new po.NZ(t, this._menuService, this._contextKeyService, + e); + r.push(i) + } + r.length > 0 && t.push([n, r]) + } + return t + } + static _fillInKbExprKeys(e, t) { + if (e) + for (let i of e.keys()) t.add(i) + } + static _compareMenuItems(t, i) { + let n = t.group, + o = i.group; + if (n !== o) { + if (!n) return 1; + if (!o) return -1; + if ("navigation" === n) return -1; + if ("navigation" === o) return 1; + let e = n.localeCompare(o); + if (0 !== e) return e + } + let r = t.order || 0, + s = i.order || 0; + return r < s ? -1 : r > s ? 1 : e._compareTitles((0, po.vr)(t) ? t.command + .title : t.title, (0, po.vr)(i) ? i.command.title : i.title) + } + static _compareTitles(e, t) { + const i = "string" == typeof e ? e : e.original, + n = "string" == typeof t ? t : t.original; + return i.localeCompare(n) + } + }; + xs = Cs([ys(2, _e.H), ys(3, Ci.i6), ys(4, po.co)], xs); + var ks = i(6479), + Ls = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + class Ns extends Le.JT { + constructor(e) { + super(), this.model = e, this._markersData = new Map, this._register( + (0, Le.OF)((() => { + this.model.deltaDecorations([...this._markersData.keys()], []), + this._markersData.clear() + }))) + } + update(e, t) { + const i = [...this._markersData.keys()]; + this._markersData.clear(); + const n = this.model.deltaDecorations(i, t); + for (let t = 0; t < n.length; t++) this._markersData.set(n[t], e[t]); + return 0 !== i.length || 0 !== n.length + } + getMarker(e) { + return this._markersData.get(e.id) + } + } + let Ds = class extends Le.JT { + constructor(e, t) { + super(), this._markerService = t, this._onDidChangeMarker = this._register( + new z.Q5), this._markerDecorations = new ge.Y9, e.getModels().forEach( + (e => this._onModelAdded(e))), this._register(e.onModelAdded(this._onModelAdded, + this)), this._register(e.onModelRemoved(this._onModelRemoved, this)), + this._register(this._markerService.onMarkerChanged(this._handleMarkerChange, + this)) + } + dispose() { + super.dispose(), this._markerDecorations.forEach((e => e.dispose())), + this._markerDecorations.clear() + } + getMarker(e, t) { + const i = this._markerDecorations.get(e); + return i && i.getMarker(t) || null + } + _handleMarkerChange(e) { + e.forEach((e => { + const t = this._markerDecorations.get(e); + t && this._updateDecorations(t) + })) + } + _onModelAdded(e) { + const t = new Ns(e); + this._markerDecorations.set(e.uri, t), this._updateDecorations(t) + } + _onModelRemoved(e) { + const t = this._markerDecorations.get(e.uri); + t && (t.dispose(), this._markerDecorations.delete(e.uri)), e.uri.scheme !== + me.lg.inMemory && e.uri.scheme !== me.lg.internal && e.uri.scheme !== + me.lg.vscode || this._markerService && this._markerService.read({ + resource: e.uri + }).map((e => e.owner)).forEach((t => this._markerService.remove(t, [ + e.uri + ]))) + } + _updateDecorations(e) { + const t = this._markerService.read({ + resource: e.model.uri, + take: 500 + }); + let i = t.map((t => ({ + range: this._createDecorationRange(e.model, t), + options: this._createDecorationOption(t) + }))); + e.update(t, i) && this._onDidChangeMarker.fire(e.model) + } + _createDecorationRange(e, t) { + let i = j.e.lift(t); + if (t.severity !== fs.ZL.Hint || this._hasMarkerTag(t, 1) || this._hasMarkerTag( + t, 2) || (i = i.setEndPosition(i.startLineNumber, i.startColumn + 2)), + i = e.validateRange(i), i.isEmpty()) { + let t = e.getWordAtPosition(i.getStartPosition()); + if (t) i = new j.e(i.startLineNumber, t.startColumn, i.endLineNumber, + t.endColumn); + else { + let t = e.getLineLastNonWhitespaceColumn(i.startLineNumber) || e.getLineMaxColumn( + i.startLineNumber); + 1 === t || (i = i.endColumn >= t ? new j.e(i.startLineNumber, t - 1, + i.endLineNumber, t) : new j.e(i.startLineNumber, i.startColumn, + i.endLineNumber, i.endColumn + 1)) + } + } else if (t.endColumn === Number.MAX_VALUE && 1 === t.startColumn && + i.startLineNumber === i.endLineNumber) { + let n = e.getLineFirstNonWhitespaceColumn(t.startLineNumber); + n < i.endColumn && (i = new j.e(i.startLineNumber, n, i.endLineNumber, + i.endColumn), t.startColumn = n) + } + return i + } + _createDecorationOption(e) { + let t, i, n, o, r; + switch (e.severity) { + case fs.ZL.Hint: + t = this._hasMarkerTag(e, 2) ? void 0 : this._hasMarkerTag(e, 1) ? + "squiggly-unnecessary" : "squiggly-hint", n = 0; + break; + case fs.ZL.Warning: + t = "squiggly-warning", i = (0, bn.EN)(fn.Re), n = 20, r = { + color: (0, bn.EN)(_n.Iv), + position: Me.F5.Inline + }; + break; + case fs.ZL.Info: + t = "squiggly-info", i = (0, bn.EN)(fn.eS), n = 10; + break; + case fs.ZL.Error: + default: + t = "squiggly-error", i = (0, bn.EN)(fn.lK), n = 30, r = { + color: (0, bn.EN)(_n.Gj), + position: Me.F5.Inline + } + } + return e.tags && (-1 !== e.tags.indexOf(1) && (o = + "squiggly-inline-unnecessary"), -1 !== e.tags.indexOf(2) && (o = + "squiggly-inline-deprecated")), { + description: "marker-decoration", + stickiness: 1, + className: t, + showIfCollapsed: !0, + overviewRuler: { + color: i, + position: Me.sh.Right + }, + minimap: r, + zIndex: n, + inlineClassName: o + } + } + _hasMarkerTag(e, t) { + return !!e.tags && e.tags.indexOf(t) >= 0 + } + }; + Ds = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([Ls(0, Ct.q), Ls(1, fs.lT)], Ds); + var Es = i(5026), + Is = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let Ts = class extends Le.JT { + constructor(e, t) { + super(), this._contextKeyService = e, this._configurationService = t, + this._accessibilitySupport = 0, this._onDidChangeScreenReaderOptimized = + new z.Q5, this._accessibilityModeEnabledContext = fo.U.bindTo(this._contextKeyService); + const i = () => this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized()); + this._register(this._configurationService.onDidChangeConfiguration((e => { + e.affectsConfiguration("editor.accessibilitySupport") && (i(), + this._onDidChangeScreenReaderOptimized.fire()) + }))), i(), this.onDidChangeScreenReaderOptimized((() => i())) + } + get onDidChangeScreenReaderOptimized() { + return this._onDidChangeScreenReaderOptimized.event + } + isScreenReaderOptimized() { + const e = this._configurationService.getValue( + "editor.accessibilitySupport"); + return "on" === e || "auto" === e && 2 === this._accessibilitySupport + } + getAccessibilitySupport() { + return this._accessibilitySupport + } + }; + Ts = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([Is(0, Ci.i6), Is(1, gi.Ui)], Ts); + var Ms = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class As { + constructor() { + this.mapTextToType = new Map, this.findText = "" + } + writeText(e, t) { + return Ms(this, void 0, void 0, (function*() { + if (t) return void this.mapTextToType.set(t, e); + try { + return yield navigator.clipboard.writeText(e) + } catch (e) { + console.error(e) + } + const i = document.activeElement, + n = document.body.appendChild((0, he.$)("textarea", { + "aria-hidden": !0 + })); + n.style.height = "1px", n.style.width = "1px", n.style.position = + "absolute", n.value = e, n.focus(), n.select(), document.execCommand( + "copy"), i instanceof HTMLElement && i.focus(), document.body.removeChild( + n) + })) + } + readText(e) { + return Ms(this, void 0, void 0, (function*() { + if (e) return this.mapTextToType.get(e) || ""; + try { + return yield navigator.clipboard.readText() + } catch (e) { + return console.error(e), "" + } + })) + } + readFindText() { + return Ms(this, void 0, void 0, (function*() { + return this.findText + })) + } + writeFindText(e) { + return Ms(this, void 0, void 0, (function*() { + this.findText = e + })) + } + } + var Rs = i(4862), + Os = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + Ps = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + + function Fs(e) { + return e.scheme === me.lg.file ? e.fsPath : e.path + } + let Bs = 0; + class Ws { + constructor(e, t, i, n, o, r, s) { + this.id = ++Bs, this.type = 0, this.actual = e, this.label = e.label, + this.confirmBeforeUndo = e.confirmBeforeUndo || !1, this.resourceLabel = + t, this.strResource = i, this.resourceLabels = [this.resourceLabel], + this.strResources = [this.strResource], this.groupId = n, this.groupOrder = + o, this.sourceId = r, this.sourceOrder = s, this.isValid = !0 + } + setValid(e) { + this.isValid = e + } + toString() { + return + `[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}` + } + } + class zs { + constructor(e, t) { + this.resourceLabel = e, this.reason = t + } + } + class Vs { + constructor() { + this.elements = new Map + } + createMessage() { + const e = [], + t = []; + for (const [, i] of this.elements)(0 === i.reason ? e : t).push(i.resourceLabel); + let i = []; + return e.length > 0 && i.push(vi.N({ + key: "externalRemoval", + comment: ["{0} is a list of filenames"] + }, + "The following files have been closed and modified on disk: {0}.", + e.join(", "))), t.length > 0 && i.push(vi.N({ + key: "noParallelUniverses", + comment: ["{0} is a list of filenames"] + }, + "The following files have been modified in an incompatible way: {0}.", + t.join(", "))), i.join("\n") + } + get size() { + return this.elements.size + } + has(e) { + return this.elements.has(e) + } + set(e, t) { + this.elements.set(e, t) + } + delete(e) { + return this.elements.delete(e) + } + } + class Hs { + constructor(e, t, i, n, o, r, s) { + this.id = ++Bs, this.type = 1, this.actual = e, this.label = e.label, + this.confirmBeforeUndo = e.confirmBeforeUndo || !1, this.resourceLabels = + t, this.strResources = i, this.groupId = n, this.groupOrder = o, this + .sourceId = r, this.sourceOrder = s, this.removedResources = null, + this.invalidatedResources = null + } + canSplit() { + return "function" == typeof this.actual.split + } + removeResource(e, t, i) { + this.removedResources || (this.removedResources = new Vs), this.removedResources + .has(t) || this.removedResources.set(t, new zs(e, i)) + } + setValid(e, t, i) { + i ? this.invalidatedResources && (this.invalidatedResources.delete(t), + 0 === this.invalidatedResources.size && (this.invalidatedResources = + null)) : (this.invalidatedResources || (this.invalidatedResources = + new Vs), this.invalidatedResources.has(t) || this.invalidatedResources + .set(t, new zs(e, 0))) + } + toString() { + return + `[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}` + } + } + class Us { + constructor(e, t) { + this.resourceLabel = e, this.strResource = t, this._past = [], this._future = [], + this.locked = !1, this.versionId = 1 + } + dispose() { + for (const e of this._past) 1 === e.type && e.removeResource(this.resourceLabel, + this.strResource, 0); + for (const e of this._future) 1 === e.type && e.removeResource(this.resourceLabel, + this.strResource, 0); + this.versionId++ + } + toString() { + let e = []; + e.push(`* ${this.strResource}:`); + for (let t = 0; t < this._past.length; t++) e.push( + ` * [UNDO] ${this._past[t]}`); + for (let t = this._future.length - 1; t >= 0; t--) e.push( + ` * [REDO] ${this._future[t]}`); + return e.join("\n") + } + flushAllElements() { + this._past = [], this._future = [], this.versionId++ + } + _setElementValidFlag(e, t) { + 1 === e.type ? e.setValid(this.resourceLabel, this.strResource, t) : e + .setValid(t) + } + setElementsValidFlag(e, t) { + for (const i of this._past) t(i.actual) && this._setElementValidFlag(i, + e); + for (const i of this._future) t(i.actual) && this._setElementValidFlag( + i, e) + } + pushElement(e) { + for (const e of this._future) 1 === e.type && e.removeResource(this.resourceLabel, + this.strResource, 1); + this._future = [], this._past.push(e), this.versionId++ + } + createSnapshot(e) { + const t = []; + for (let e = 0, i = this._past.length; e < i; e++) t.push(this._past[e] + .id); + for (let e = this._future.length - 1; e >= 0; e--) t.push(this._future[ + e].id); + return new Rs.YO(e, t) + } + restoreSnapshot(e) { + const t = e.elements.length; + let i = !0, + n = 0, + o = -1; + for (let r = 0, s = this._past.length; r < s; r++, n++) { + const s = this._past[r]; + i && (n >= t || s.id !== e.elements[n]) && (i = !1, o = 0), i || 1 !== + s.type || s.removeResource(this.resourceLabel, this.strResource, 0) + } + let r = -1; + for (let o = this._future.length - 1; o >= 0; o--, n++) { + const s = this._future[o]; + i && (n >= t || s.id !== e.elements[n]) && (i = !1, r = o), i || 1 !== + s.type || s.removeResource(this.resourceLabel, this.strResource, 0) + } - 1 !== o && (this._past = this._past.slice(0, o)), -1 !== r && ( + this._future = this._future.slice(r + 1)), this.versionId++ + } + getElements() { + const e = [], + t = []; + for (const t of this._past) e.push(t.actual); + for (const e of this._future) t.push(e.actual); + return { + past: e, + future: t + } + } + getClosestPastElement() { + return 0 === this._past.length ? null : this._past[this._past.length - + 1] + } + getSecondClosestPastElement() { + return this._past.length < 2 ? null : this._past[this._past.length - 2] + } + getClosestFutureElement() { + return 0 === this._future.length ? null : this._future[this._future.length - + 1] + } + hasPastElements() { + return this._past.length > 0 + } + hasFutureElements() { + return this._future.length > 0 + } + splitPastWorkspaceElement(e, t) { + for (let i = this._past.length - 1; i >= 0; i--) + if (this._past[i] === e) { + t.has(this.strResource) ? this._past[i] = t.get(this.strResource) : + this._past.splice(i, 1); + break + } + this.versionId++ + } + splitFutureWorkspaceElement(e, t) { + for (let i = this._future.length - 1; i >= 0; i--) + if (this._future[i] === e) { + t.has(this.strResource) ? this._future[i] = t.get(this.strResource) : + this._future.splice(i, 1); + break + } + this.versionId++ + } + moveBackward(e) { + this._past.pop(), this._future.push(e), this.versionId++ + } + moveForward(e) { + this._future.pop(), this._past.push(e), this.versionId++ + } + } + class js { + constructor(e) { + this.editStacks = e, this._versionIds = []; + for (let e = 0, t = this.editStacks.length; e < t; e++) this._versionIds[ + e] = this.editStacks[e].versionId + } + isValid() { + for (let e = 0, t = this.editStacks.length; e < t; e++) + if (this._versionIds[e] !== this.editStacks[e].versionId) return !1; + return !0 + } + } + const Ks = new Us("", ""); + Ks.locked = !0; + let $s = class { + constructor(e, t) { + this._dialogService = e, this._notificationService = t, this._editStacks = + new Map, this._uriComparisonKeyComputers = [] + } + getUriComparisonKey(e) { + for (const t of this._uriComparisonKeyComputers) + if (t[0] === e.scheme) return t[1].getComparisonKey(e); + return e.toString() + } + _print(e) { + console.log("------------------------------------"), console.log( + `AFTER ${e}: `); + let t = []; + for (const e of this._editStacks) t.push(e[1].toString()); + console.log(t.join("\n")) + } + pushElement(e, t = Rs.Xt.None, i = Rs.gJ.None) { + if (0 === e.type) { + const n = Fs(e.resource), + o = this.getUriComparisonKey(e.resource); + this._pushElement(new Ws(e, n, o, t.id, t.nextOrder(), i.id, i.nextOrder())) + } else { + const n = new Set, + o = [], + r = []; + for (const t of e.resources) { + const e = Fs(t), + i = this.getUriComparisonKey(t); + n.has(i) || (n.add(i), o.push(e), r.push(i)) + } + 1 === o.length ? this._pushElement(new Ws(e, o[0], r[0], t.id, t.nextOrder(), + i.id, i.nextOrder())) : this._pushElement(new Hs(e, o, r, t.id, t.nextOrder(), + i.id, i.nextOrder())) + } + } + _pushElement(e) { + for (let t = 0, i = e.strResources.length; t < i; t++) { + const i = e.resourceLabels[t], + n = e.strResources[t]; + let o; + this._editStacks.has(n) ? o = this._editStacks.get(n) : (o = new Us( + i, n), this._editStacks.set(n, o)), o.pushElement(e) + } + } + getLastElement(e) { + const t = this.getUriComparisonKey(e); + if (this._editStacks.has(t)) { + const e = this._editStacks.get(t); + if (e.hasFutureElements()) return null; + const i = e.getClosestPastElement(); + return i ? i.actual : null + } + return null + } + _splitPastWorkspaceElement(e, t) { + const i = e.actual.split(), + n = new Map; + for (const e of i) { + const t = Fs(e.resource), + i = this.getUriComparisonKey(e.resource), + o = new Ws(e, t, i, 0, 0, 0, 0); + n.set(o.strResource, o) + } + for (const i of e.strResources) t && t.has(i) || this._editStacks.get( + i).splitPastWorkspaceElement(e, n) + } + _splitFutureWorkspaceElement(e, t) { + const i = e.actual.split(), + n = new Map; + for (const e of i) { + const t = Fs(e.resource), + i = this.getUriComparisonKey(e.resource), + o = new Ws(e, t, i, 0, 0, 0, 0); + n.set(o.strResource, o) + } + for (const i of e.strResources) t && t.has(i) || this._editStacks.get( + i).splitFutureWorkspaceElement(e, n) + } + removeElements(e) { + const t = "string" == typeof e ? e : this.getUriComparisonKey(e); + this._editStacks.has(t) && (this._editStacks.get(t).dispose(), this._editStacks + .delete(t)) + } + setElementsValidFlag(e, t, i) { + const n = this.getUriComparisonKey(e); + this._editStacks.has(n) && this._editStacks.get(n).setElementsValidFlag( + t, i) + } + createSnapshot(e) { + const t = this.getUriComparisonKey(e); + return this._editStacks.has(t) ? this._editStacks.get(t).createSnapshot( + e) : new Rs.YO(e, []) + } + restoreSnapshot(e) { + const t = this.getUriComparisonKey(e.resource); + if (this._editStacks.has(t)) { + const i = this._editStacks.get(t); + i.restoreSnapshot(e), i.hasPastElements() || i.hasFutureElements() || + (i.dispose(), this._editStacks.delete(t)) + } + } + getElements(e) { + const t = this.getUriComparisonKey(e); + return this._editStacks.has(t) ? this._editStacks.get(t).getElements() : { + past: [], + future: [] + } + } + _findClosestUndoElementWithSource(e) { + if (!e) return [null, null]; + let t = null, + i = null; + for (const [n, o] of this._editStacks) { + const r = o.getClosestPastElement(); + r && r.sourceId === e && (!t || r.sourceOrder > t.sourceOrder) && (t = + r, i = n) + } + return [t, i] + } + canUndo(e) { + if (e instanceof Rs.gJ) { + const [, t] = this._findClosestUndoElementWithSource(e.id); + return !!t + } + const t = this.getUriComparisonKey(e); + return !!this._editStacks.has(t) && this._editStacks.get(t).hasPastElements() + } + _onError(e, t) { + (0, We.dL)(e); + for (const e of t.strResources) this.removeElements(e); + this._notificationService.error(e) + } + _acquireLocks(e) { + for (const t of e.editStacks) + if (t.locked) throw new Error("Cannot acquire edit stack lock"); + for (const t of e.editStacks) t.locked = !0; + return () => { + for (const t of e.editStacks) t.locked = !1 + } + } + _safeInvokeWithLocks(e, t, i, n, o) { + const r = this._acquireLocks(i); + let s; + try { + s = t() + } catch (t) { + return r(), n.dispose(), this._onError(t, e) + } + return s ? s.then((() => (r(), n.dispose(), o())), (t => (r(), n.dispose(), + this._onError(t, e)))) : (r(), n.dispose(), o()) + } + _invokeWorkspacePrepare(e) { + return Ps(this, void 0, void 0, (function*() { + if (void 0 === e.actual.prepareUndoRedo) return Le.JT.None; + const t = e.actual.prepareUndoRedo(); + return void 0 === t ? Le.JT.None : t + })) + } + _invokeResourcePrepare(e, t) { + if (1 !== e.actual.type || void 0 === e.actual.prepareUndoRedo) return + t(Le.JT.None); + const i = e.actual.prepareUndoRedo(); + return i ? (0, Le.Wf)(i) ? t(i) : i.then((e => t(e))) : t(Le.JT.None) + } + _getAffectedEditStacks(e) { + const t = []; + for (const i of e.strResources) t.push(this._editStacks.get(i) || Ks); + return new js(t) + } + _tryToSplitAndUndo(e, t, i, n) { + if (t.canSplit()) return this._splitPastWorkspaceElement(t, i), this._notificationService + .warn(n), new qs(this._undo(e, 0, !0)); + for (const e of t.strResources) this.removeElements(e); + return this._notificationService.warn(n), new qs + } + _checkWorkspaceUndo(e, t, i, n) { + if (t.removedResources) return this._tryToSplitAndUndo(e, t, t.removedResources, + vi.N({ + key: "cannotWorkspaceUndo", + comment: [ + "{0} is a label for an operation. {1} is another message." + ] + }, "Could not undo '{0}' across all files. {1}", t.label, t.removedResources + .createMessage())); + if (n && t.invalidatedResources) return this._tryToSplitAndUndo(e, t, + t.invalidatedResources, vi.N({ + key: "cannotWorkspaceUndo", + comment: [ + "{0} is a label for an operation. {1} is another message." + ] + }, "Could not undo '{0}' across all files. {1}", t.label, t.invalidatedResources + .createMessage())); + const o = []; + for (const e of i.editStacks) e.getClosestPastElement() !== t && o.push( + e.resourceLabel); + if (o.length > 0) return this._tryToSplitAndUndo(e, t, null, vi.N({ + key: "cannotWorkspaceUndoDueToChanges", + comment: [ + "{0} is a label for an operation. {1} is a list of filenames." + ] + }, + "Could not undo '{0}' across all files because changes were made to {1}", + t.label, o.join(", "))); + const r = []; + for (const e of i.editStacks) e.locked && r.push(e.resourceLabel); + return r.length > 0 ? this._tryToSplitAndUndo(e, t, null, vi.N({ + key: "cannotWorkspaceUndoDueToInProgressUndoRedo", + comment: [ + "{0} is a label for an operation. {1} is a list of filenames." + ] + }, + "Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}", + t.label, r.join(", "))) : i.isValid() ? null : this._tryToSplitAndUndo( + e, t, null, vi.N({ + key: "cannotWorkspaceUndoDueToInMeantimeUndoRedo", + comment: [ + "{0} is a label for an operation. {1} is a list of filenames." + ] + }, + "Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime", + t.label)) + } + _workspaceUndo(e, t, i) { + const n = this._getAffectedEditStacks(t), + o = this._checkWorkspaceUndo(e, t, n, !1); + return o ? o.returnValue : this._confirmAndExecuteWorkspaceUndo(e, t, + n, i) + } + _isPartOfUndoGroup(e) { + if (!e.groupId) return !1; + for (const [, t] of this._editStacks) { + const i = t.getClosestPastElement(); + if (i) { + if (i === e) { + const i = t.getSecondClosestPastElement(); + if (i && i.groupId === e.groupId) return !0 + } + if (i.groupId === e.groupId) return !0 + } + } + return !1 + } + _confirmAndExecuteWorkspaceUndo(e, t, i, n) { + return Ps(this, void 0, void 0, (function*() { + if (t.canSplit() && !this._isPartOfUndoGroup(t)) { + const o = yield this._dialogService.show(li.Z.Info, vi.N( + "confirmWorkspace", + "Would you like to undo '{0}' across all files?", t.label), [ + vi.N({ + key: "ok", + comment: ["{0} denotes a number that is > 1"] + }, "Undo in {0} Files", i.editStacks.length), vi.N("nok", + "Undo this File"), vi.N("cancel", "Cancel") + ], { + cancelId: 2 + }); + if (2 === o.choice) return; + if (1 === o.choice) return this._splitPastWorkspaceElement(t, + null), this._undo(e, 0, !0); + const r = this._checkWorkspaceUndo(e, t, i, !1); + if (r) return r.returnValue; + n = !0 + } + let o; + try { + o = yield this._invokeWorkspacePrepare(t) + } catch (e) { + return this._onError(e, t) + } + const r = this._checkWorkspaceUndo(e, t, i, !0); + if (r) return o.dispose(), r.returnValue; + for (const e of i.editStacks) e.moveBackward(t); + return this._safeInvokeWithLocks(t, (() => t.actual.undo()), i, o, ( + () => this._continueUndoInGroup(t.groupId, n))) + })) + } + _resourceUndo(e, t, i) { + if (t.isValid) { + if (!e.locked) return this._invokeResourcePrepare(t, (n => (e.moveBackward( + t), this._safeInvokeWithLocks(t, (() => t.actual.undo()), new js( + [e]), n, (() => this._continueUndoInGroup(t.groupId, i)))))); { + const e = vi.N({ + key: "cannotResourceUndoDueToInProgressUndoRedo", + comment: ["{0} is a label for an operation."] + }, + "Could not undo '{0}' because there is already an undo or redo operation running.", + t.label); + this._notificationService.warn(e) + } + } else e.flushAllElements() + } + _findClosestUndoElementInGroup(e) { + if (!e) return [null, null]; + let t = null, + i = null; + for (const [n, o] of this._editStacks) { + const r = o.getClosestPastElement(); + r && r.groupId === e && (!t || r.groupOrder > t.groupOrder) && (t = + r, i = n) + } + return [t, i] + } + _continueUndoInGroup(e, t) { + if (!e) return; + const [, i] = this._findClosestUndoElementInGroup(e); + return i ? this._undo(i, 0, t) : void 0 + } + undo(e) { + if (e instanceof Rs.gJ) { + const [, t] = this._findClosestUndoElementWithSource(e.id); + return t ? this._undo(t, e.id, !1) : void 0 + } + return "string" == typeof e ? this._undo(e, 0, !1) : this._undo(this.getUriComparisonKey( + e), 0, !1) + } + _undo(e, t = 0, i) { + if (!this._editStacks.has(e)) return; + const n = this._editStacks.get(e), + o = n.getClosestPastElement(); + if (o) { + if (o.groupId) { + const [e, n] = this._findClosestUndoElementInGroup(o.groupId); + if (o !== e && n) return this._undo(n, t, i) + } + if ((o.sourceId !== t || o.confirmBeforeUndo) && !i) return this._confirmAndContinueUndo( + e, t, o); + try { + return 1 === o.type ? this._workspaceUndo(e, o, i) : this._resourceUndo( + n, o, i) + } finally {} + } + } + _confirmAndContinueUndo(e, t, i) { + return Ps(this, void 0, void 0, (function*() { + if (1 !== (yield this._dialogService.show(li.Z.Info, vi.N( + "confirmDifferentSource", "Would you like to undo '{0}'?", i.label + ), [vi.N("confirmDifferentSource.yes", "Yes"), vi.N("cancel", + "Cancel")], { + cancelId: 1 + })).choice) return this._undo(e, t, !0) + })) + } + _findClosestRedoElementWithSource(e) { + if (!e) return [null, null]; + let t = null, + i = null; + for (const [n, o] of this._editStacks) { + const r = o.getClosestFutureElement(); + r && r.sourceId === e && (!t || r.sourceOrder < t.sourceOrder) && (t = + r, i = n) + } + return [t, i] + } + canRedo(e) { + if (e instanceof Rs.gJ) { + const [, t] = this._findClosestRedoElementWithSource(e.id); + return !!t + } + const t = this.getUriComparisonKey(e); + return !!this._editStacks.has(t) && this._editStacks.get(t).hasFutureElements() + } + _tryToSplitAndRedo(e, t, i, n) { + if (t.canSplit()) return this._splitFutureWorkspaceElement(t, i), + this._notificationService.warn(n), new qs(this._redo(e)); + for (const e of t.strResources) this.removeElements(e); + return this._notificationService.warn(n), new qs + } + _checkWorkspaceRedo(e, t, i, n) { + if (t.removedResources) return this._tryToSplitAndRedo(e, t, t.removedResources, + vi.N({ + key: "cannotWorkspaceRedo", + comment: [ + "{0} is a label for an operation. {1} is another message." + ] + }, "Could not redo '{0}' across all files. {1}", t.label, t.removedResources + .createMessage())); + if (n && t.invalidatedResources) return this._tryToSplitAndRedo(e, t, + t.invalidatedResources, vi.N({ + key: "cannotWorkspaceRedo", + comment: [ + "{0} is a label for an operation. {1} is another message." + ] + }, "Could not redo '{0}' across all files. {1}", t.label, t.invalidatedResources + .createMessage())); + const o = []; + for (const e of i.editStacks) e.getClosestFutureElement() !== t && o.push( + e.resourceLabel); + if (o.length > 0) return this._tryToSplitAndRedo(e, t, null, vi.N({ + key: "cannotWorkspaceRedoDueToChanges", + comment: [ + "{0} is a label for an operation. {1} is a list of filenames." + ] + }, + "Could not redo '{0}' across all files because changes were made to {1}", + t.label, o.join(", "))); + const r = []; + for (const e of i.editStacks) e.locked && r.push(e.resourceLabel); + return r.length > 0 ? this._tryToSplitAndRedo(e, t, null, vi.N({ + key: "cannotWorkspaceRedoDueToInProgressUndoRedo", + comment: [ + "{0} is a label for an operation. {1} is a list of filenames." + ] + }, + "Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}", + t.label, r.join(", "))) : i.isValid() ? null : this._tryToSplitAndRedo( + e, t, null, vi.N({ + key: "cannotWorkspaceRedoDueToInMeantimeUndoRedo", + comment: [ + "{0} is a label for an operation. {1} is a list of filenames." + ] + }, + "Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime", + t.label)) + } + _workspaceRedo(e, t) { + const i = this._getAffectedEditStacks(t), + n = this._checkWorkspaceRedo(e, t, i, !1); + return n ? n.returnValue : this._executeWorkspaceRedo(e, t, i) + } + _executeWorkspaceRedo(e, t, i) { + return Ps(this, void 0, void 0, (function*() { + let n; + try { + n = yield this._invokeWorkspacePrepare(t) + } catch (e) { + return this._onError(e, t) + } + const o = this._checkWorkspaceRedo(e, t, i, !0); + if (o) return n.dispose(), o.returnValue; + for (const e of i.editStacks) e.moveForward(t); + return this._safeInvokeWithLocks(t, (() => t.actual.redo()), i, n, ( + () => this._continueRedoInGroup(t.groupId))) + })) + } + _resourceRedo(e, t) { + if (t.isValid) { + if (!e.locked) return this._invokeResourcePrepare(t, (i => (e.moveForward( + t), this._safeInvokeWithLocks(t, (() => t.actual.redo()), new js( + [e]), i, (() => this._continueRedoInGroup(t.groupId)))))); { + const e = vi.N({ + key: "cannotResourceRedoDueToInProgressUndoRedo", + comment: ["{0} is a label for an operation."] + }, + "Could not redo '{0}' because there is already an undo or redo operation running.", + t.label); + this._notificationService.warn(e) + } + } else e.flushAllElements() + } + _findClosestRedoElementInGroup(e) { + if (!e) return [null, null]; + let t = null, + i = null; + for (const [n, o] of this._editStacks) { + const r = o.getClosestFutureElement(); + r && r.groupId === e && (!t || r.groupOrder < t.groupOrder) && (t = + r, i = n) + } + return [t, i] + } + _continueRedoInGroup(e) { + if (!e) return; + const [, t] = this._findClosestRedoElementInGroup(e); + return t ? this._redo(t) : void 0 + } + redo(e) { + if (e instanceof Rs.gJ) { + const [, t] = this._findClosestRedoElementWithSource(e.id); + return t ? this._redo(t) : void 0 + } + return "string" == typeof e ? this._redo(e) : this._redo(this.getUriComparisonKey( + e)) + } + _redo(e) { + if (!this._editStacks.has(e)) return; + const t = this._editStacks.get(e), + i = t.getClosestFutureElement(); + if (i) { + if (i.groupId) { + const [e, t] = this._findClosestRedoElementInGroup(i.groupId); + if (i !== e && t) return this._redo(t) + } + try { + return 1 === i.type ? this._workspaceRedo(e, i) : this._resourceRedo( + t, i) + } finally {} + } + } + }; + $s = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([Os(0, as.S), Os(1, Ti.lT)], $s); + class qs { + constructor(e) { + this.returnValue = e + } + }(0, Es.z)(Rs.tJ, $s); + var Zs = i(3198), + Gs = {}; + Gs.styleTagTransform = se(), Gs.setAttributes = ie(), Gs.insert = ee().bind( + null, "head"), Gs.domAPI = X(), Gs.insertStyleElement = oe(), Y()(Zs.Z, + Gs), Zs.Z && Zs.Z.locals && Zs.Z.locals; + var Ys = i(6811), + Qs = i(2013), + Xs = {}; + Xs.styleTagTransform = se(), Xs.setAttributes = ie(), Xs.insert = ee().bind( + null, "head"), Xs.domAPI = X(), Xs.insertStyleElement = oe(), Y()(Qs.Z, + Xs), Qs.Z && Qs.Z.locals && Qs.Z.locals; + const Js = { + buttonBackground: Zo.Il.fromHex("#0E639C"), + buttonHoverBackground: Zo.Il.fromHex("#006BB3"), + buttonForeground: Zo.Il.white + }; + class ea extends Le.JT { + constructor(e, t) { + super(), this._onDidClick = this._register(new z.Q5), this.options = + t || Object.create(null), (0, Ne.jB)(this.options, Js, !1), this.buttonForeground = + this.options.buttonForeground, this.buttonBackground = this.options.buttonBackground, + this.buttonHoverBackground = this.options.buttonHoverBackground, + this.buttonSecondaryForeground = this.options.buttonSecondaryForeground, + this.buttonSecondaryBackground = this.options.buttonSecondaryBackground, + this.buttonSecondaryHoverBackground = this.options.buttonSecondaryHoverBackground, + this.buttonBorder = this.options.buttonBorder, this._element = + document.createElement("a"), this._element.classList.add( + "monaco-button"), this._element.tabIndex = 0, this._element.setAttribute( + "role", "button"), e.appendChild(this._element), this._register(Mr.o + .addTarget(this._element)), [he.tw.CLICK, Mr.t.Tap].forEach((e => { + this._register((0, he.nm)(this._element, e, (e => { + this.enabled ? this._onDidClick.fire(e) : he.zB.stop(e) + }))) + })), this._register((0, he.nm)(this._element, he.tw.KEY_DOWN, (e => { + const t = new ai.y(e); + let i = !1; + this.enabled && (t.equals(3) || t.equals(10)) ? (this._onDidClick + .fire(e), i = !0) : t.equals(9) && (this._element.blur(), i = ! + 0), i && he.zB.stop(t, !0) + }))), this._register((0, he.nm)(this._element, he.tw.MOUSE_OVER, (e => { + this._element.classList.contains("disabled") || this.setHoverBackground() + }))), this._register((0, he.nm)(this._element, he.tw.MOUSE_OUT, (e => { + this.applyStyles() + }))), this.focusTracker = this._register((0, he.go)(this._element)), + this._register(this.focusTracker.onDidFocus((() => this.setHoverBackground()))), + this._register(this.focusTracker.onDidBlur((() => this.applyStyles()))), + this.applyStyles() + } + get onDidClick() { + return this._onDidClick.event + } + setHoverBackground() { + let e; + e = this.options.secondary ? this.buttonSecondaryHoverBackground ? + this.buttonSecondaryHoverBackground.toString() : null : this.buttonHoverBackground ? + this.buttonHoverBackground.toString() : null, e && (this._element.style + .backgroundColor = e) + } + style(e) { + this.buttonForeground = e.buttonForeground, this.buttonBackground = e + .buttonBackground, this.buttonHoverBackground = e.buttonHoverBackground, + this.buttonSecondaryForeground = e.buttonSecondaryForeground, this.buttonSecondaryBackground = + e.buttonSecondaryBackground, this.buttonSecondaryHoverBackground = e + .buttonSecondaryHoverBackground, this.buttonBorder = e.buttonBorder, + this.applyStyles() + } + applyStyles() { + if (this._element) { + let e, t; + this.options.secondary ? (t = this.buttonSecondaryForeground ? this.buttonSecondaryForeground + .toString() : "", e = this.buttonSecondaryBackground ? this.buttonSecondaryBackground + .toString() : "") : (t = this.buttonForeground ? this.buttonForeground + .toString() : "", e = this.buttonBackground ? this.buttonBackground + .toString() : ""); + const i = this.buttonBorder ? this.buttonBorder.toString() : ""; + this._element.style.color = t, this._element.style.backgroundColor = + e, this._element.style.borderWidth = i ? "1px" : "", this._element.style + .borderStyle = i ? "solid" : "", this._element.style.borderColor = + i + } + } + get element() { + return this._element + } + set label(e) { + this._element.classList.add("monaco-text-button"), this.options.supportIcons ? + (0, he.mc)(this._element, ...(0, Ys.T)(e)) : this._element.textContent = + e, "string" == typeof this.options.title ? this._element.title = + this.options.title : this.options.title && (this._element.title = e) + } + set enabled(e) { + e ? (this._element.classList.remove("disabled"), this._element.setAttribute( + "aria-disabled", String(!1)), this._element.tabIndex = 0) : (this._element + .classList.add("disabled"), this._element.setAttribute( + "aria-disabled", String(!0))) + } + get enabled() { + return !this._element.classList.contains("disabled") + } + } + var ta = i(9162), + ia = i(4185), + na = {}; + na.styleTagTransform = se(), na.setAttributes = ie(), na.insert = ee().bind( + null, "head"), na.domAPI = X(), na.insertStyleElement = oe(), Y()(ia.Z, + na), ia.Z && ia.Z.locals && ia.Z.locals; + const oa = "done", + ra = "active", + sa = "infinite", + aa = "discrete", + la = { + progressBarBackground: Zo.Il.fromHex("#0E70C0") + }; + class da extends Le.JT { + constructor(e, t) { + super(), this.options = t || Object.create(null), (0, Ne.jB)(this.options, + la, !1), this.workedVal = 0, this.progressBarBackground = this.options + .progressBarBackground, this._register(this.showDelayedScheduler = + new Be.pY((() => (0, he.$Z)(this.element)), 0)), this.create(e) + } + create(e) { + this.element = document.createElement("div"), this.element.classList.add( + "monaco-progress-container"), this.element.setAttribute("role", + "progressbar"), this.element.setAttribute("aria-valuemin", "0"), e.appendChild( + this.element), this.bit = document.createElement("div"), this.bit.classList + .add("progress-bit"), this.element.appendChild(this.bit), this.applyStyles() + } + off() { + this.bit.style.width = "inherit", this.bit.style.opacity = "1", this.element + .classList.remove(ra, sa, aa), this.workedVal = 0, this.totalWork = + void 0 + } + stop() { + return this.doDone(!1) + } + doDone(e) { + return this.element.classList.add(oa), this.element.classList.contains( + sa) ? (this.bit.style.opacity = "0", e ? setTimeout((() => this.off()), + 200) : this.off()) : (this.bit.style.width = "inherit", e ? + setTimeout((() => this.off()), 200) : this.off()), this + } + infinite() { + return this.bit.style.width = "2%", this.bit.style.opacity = "1", + this.element.classList.remove(aa, oa), this.element.classList.add(ra, + sa), this + } + getContainer() { + return this.element + } + style(e) { + this.progressBarBackground = e.progressBarBackground, this.applyStyles() + } + applyStyles() { + if (this.bit) { + const e = this.progressBarBackground ? this.progressBarBackground.toString() : + ""; + this.bit.style.backgroundColor = e + } + } + } + var ca = i(4742), + ha = i(3257), + ua = {}; + ua.styleTagTransform = se(), ua.setAttributes = ie(), ua.insert = ee().bind( + null, "head"), ua.domAPI = X(), ua.insertStyleElement = oe(), Y()(ha.Z, + ua), ha.Z && ha.Z.locals && ha.Z.locals; + const ga = {}, + pa = new ca.R("quick-input-button-icon-"); + + function ma(e) { + if (!e) return; + let t; + const i = e.dark.toString(); + return ga[i] ? t = ga[i] : (t = pa.nextId(), he.fk(`.${t}`, + `background-image: ${he.wY(e.light||e.dark)}`), he.fk( + `.vs-dark .${t}, .hc-black .${t}`, + `background-image: ${he.wY(e.dark)}`), ga[i] = t), t + } + var fa = i(7746), + _a = i(4299); + const ba = he.$; + class va extends Le.JT { + constructor(e) { + super(), this.parent = e, this.onKeyDown = e => he.nm(this.inputBox.inputElement, + he.tw.KEY_DOWN, (t => { + e(new ai.y(t)) + })), this.onMouseDown = e => he.nm(this.inputBox.inputElement, he.tw + .MOUSE_DOWN, (t => { + e(new Ir.n(t)) + })), this.onDidChange = e => this.inputBox.onDidChange(e), this.container = + he.R3(this.parent, ba(".quick-input-box")), this.inputBox = this._register( + new _a.W(this.container, void 0)) + } + get value() { + return this.inputBox.value + } + set value(e) { + this.inputBox.value = e + } + select(e = null) { + this.inputBox.select(e) + } + isSelectionAtEnd() { + return this.inputBox.isSelectionAtEnd() + } + get placeholder() { + return this.inputBox.inputElement.getAttribute("placeholder") || "" + } + set placeholder(e) { + this.inputBox.setPlaceHolder(e) + } + get ariaLabel() { + return this.inputBox.getAriaLabel() + } + set ariaLabel(e) { + this.inputBox.setAriaLabel(e) + } + get password() { + return "password" === this.inputBox.inputElement.type + } + set password(e) { + this.inputBox.inputElement.type = e ? "password" : "text" + } + setAttribute(e, t) { + this.inputBox.inputElement.setAttribute(e, t) + } + removeAttribute(e) { + this.inputBox.inputElement.removeAttribute(e) + } + showDecoration(e) { + e === li.Z.Ignore ? this.inputBox.hideMessage() : this.inputBox.showMessage({ + type: e === li.Z.Info ? 1 : e === li.Z.Warning ? 2 : 3, + content: "" + }) + } + stylesForType(e) { + return this.inputBox.stylesForType(e === li.Z.Info ? 1 : e === li.Z.Warning ? + 2 : 3) + } + setFocus() { + this.inputBox.focus() + } + layout() { + this.inputBox.layout() + } + style(e) { + this.inputBox.style(e) + } + } + var wa = i(4650), + Ca = i(3326), + ya = i(2298), + Sa = {}; + Sa.styleTagTransform = se(), Sa.setAttributes = ie(), Sa.insert = ee().bind( + null, "head"), Sa.domAPI = X(), Sa.insertStyleElement = oe(), Y()(ya.Z, + Sa), ya.Z && ya.Z.locals && ya.Z.locals; + const xa = he.$; + class ka { + constructor(e, t, i) { + this.os = t, this.keyElements = new Set, this.options = i || Object.create( + null), this.labelBackground = this.options.keybindingLabelBackground, + this.labelForeground = this.options.keybindingLabelForeground, this.labelBorder = + this.options.keybindingLabelBorder, this.labelBottomBorder = this.options + .keybindingLabelBottomBorder, this.labelShadow = this.options.keybindingLabelShadow, + this.domNode = he.R3(e, xa(".monaco-keybinding")), this.didEverRender = ! + 1, e.appendChild(this.domNode) + } + get element() { + return this.domNode + } + set(e, t) { + this.didEverRender && this.keybinding === e && ka.areSame(this.matches, + t) || (this.keybinding = e, this.matches = t, this.render()) + } + render() { + if (this.clear(), this.keybinding) { + let [e, t] = this.keybinding.getParts(); + e && this.renderPart(this.domNode, e, this.matches ? this.matches.firstPart : + null), t && (he.R3(this.domNode, xa( + "span.monaco-keybinding-key-chord-separator", void 0, " ")), this.renderPart( + this.domNode, t, this.matches ? this.matches.chordPart : null)), + this.domNode.title = this.keybinding.getAriaLabel() || "" + } else this.options && this.options.renderUnboundKeybindings && this.renderUnbound( + this.domNode); + this.applyStyles(), this.didEverRender = !0 + } + clear() { + he.PO(this.domNode), this.keyElements.clear() + } + renderPart(e, t, i) { + const n = Di.xo.modifierLabels[this.os]; + t.ctrlKey && this.renderKey(e, n.ctrlKey, Boolean(null == i ? void 0 : + i.ctrlKey), n.separator), t.shiftKey && this.renderKey(e, n.shiftKey, + Boolean(null == i ? void 0 : i.shiftKey), n.separator), t.altKey && + this.renderKey(e, n.altKey, Boolean(null == i ? void 0 : i.altKey), n + .separator), t.metaKey && this.renderKey(e, n.metaKey, Boolean(null == + i ? void 0 : i.metaKey), n.separator); + const o = t.keyLabel; + o && this.renderKey(e, o, Boolean(null == i ? void 0 : i.keyCode), "") + } + renderKey(e, t, i, n) { + he.R3(e, this.createKeyElement(t, i ? ".highlight" : "")), n && he.R3( + e, xa("span.monaco-keybinding-key-separator", void 0, n)) + } + renderUnbound(e) { + he.R3(e, this.createKeyElement((0, vi.N)("unbound", "Unbound"))) + } + createKeyElement(e, t = "") { + const i = xa("span.monaco-keybinding-key" + t, void 0, e); + return this.keyElements.add(i), i + } + style(e) { + this.labelBackground = e.keybindingLabelBackground, this.labelForeground = + e.keybindingLabelForeground, this.labelBorder = e.keybindingLabelBorder, + this.labelBottomBorder = e.keybindingLabelBottomBorder, this.labelShadow = + e.keybindingLabelShadow, this.applyStyles() + } + applyStyles() { + var e; + if (this.element) { + for (const t of this.keyElements) this.labelBackground && (t.style.backgroundColor = + null === (e = this.labelBackground) || void 0 === e ? void 0 : e.toString() + ), this.labelBorder && (t.style.borderColor = this.labelBorder.toString()), + this.labelBottomBorder && (t.style.borderBottomColor = this.labelBottomBorder + .toString()), this.labelShadow && (t.style.boxShadow = + `inset 0 -1px 0 ${this.labelShadow}`); + this.labelForeground && (this.element.style.color = this.labelForeground + .toString()) + } + } + static areSame(e, t) { + return e === t || !e && !t || !!e && !!t && (0, Ne.fS)(e.firstPart, t.firstPart) && + (0, Ne.fS)(e.chordPart, t.chordPart) + } + } + const La = new Be.Ue((() => { + const e = new Intl.Collator(void 0, { + numeric: !0, + sensitivity: "base" + }); + return { + collator: e, + collatorIsNumeric: e.resolvedOptions().numeric + } + })); + var Na = i(9898), + Da = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }; + const Ea = he.$; + class Ia { + constructor(e) { + this.hidden = !1, this._onChecked = new z.Q5, this.onChecked = this._onChecked + .event, Object.assign(this, e) + } + get checked() { + return !!this._checked + } + set checked(e) { + e !== this._checked && (this._checked = e, this._onChecked.fire(e)) + } + dispose() { + this._onChecked.dispose() + } + } + class Ta { + get templateId() { + return Ta.ID + } + renderTemplate(e) { + const t = Object.create(null); + t.toDisposeElement = [], t.toDisposeTemplate = [], t.entry = he.R3(e, + Ea(".quick-input-list-entry")); + const i = he.R3(t.entry, Ea("label.quick-input-list-label")); + t.toDisposeTemplate.push(he.mu(i, he.tw.CLICK, (e => { + t.checkbox.offsetParent || e.preventDefault() + }))), t.checkbox = he.R3(i, Ea("input.quick-input-list-checkbox")), t + .checkbox.type = "checkbox", t.toDisposeTemplate.push(he.mu(t.checkbox, + he.tw.CHANGE, (e => { + t.element.checked = t.checkbox.checked + }))); + const n = he.R3(i, Ea(".quick-input-list-rows")), + o = he.R3(n, Ea(".quick-input-list-row")), + r = he.R3(n, Ea(".quick-input-list-row")); + t.label = new Ca.g(o, { + supportHighlights: !0, + supportDescriptionHighlights: !0, + supportIcons: !0 + }); + const s = he.R3(o, Ea(".quick-input-list-entry-keybinding")); + t.keybinding = new ka(s, ze.OS); + const a = he.R3(r, Ea(".quick-input-list-label-meta")); + return t.detail = new wa.q(a, !0), t.separator = he.R3(t.entry, Ea( + ".quick-input-list-separator")), t.actionBar = new un.o(t.entry), t.actionBar + .domNode.classList.add("quick-input-list-entry-action-bar"), t.toDisposeTemplate + .push(t.actionBar), t + } + renderElement(e, t, i) { + i.toDisposeElement = (0, Le.B9)(i.toDisposeElement), i.element = e, i.checkbox + .checked = e.checked, i.toDisposeElement.push(e.onChecked((e => i.checkbox + .checked = e))); + const { + labelHighlights: n, + descriptionHighlights: o, + detailHighlights: r + } = e, s = Object.create(null); + s.matches = n || [], s.descriptionTitle = e.saneDescription, s.descriptionMatches = + o || [], s.extraClasses = e.item.iconClasses, s.italic = e.item.italic, + s.strikethrough = e.item.strikethrough, i.label.setLabel(e.saneLabel, + e.saneDescription, s), i.keybinding.set(e.item.keybinding), i.detail + .set(e.saneDetail, r), e.separator && e.separator.label ? (i.separator + .textContent = e.separator.label, i.separator.style.display = "") : + i.separator.style.display = "none", i.entry.classList.toggle( + "quick-input-list-separator-border", !!e.separator), i.actionBar.clear(); + const a = e.item.buttons; + a && a.length ? (i.actionBar.push(a.map(((t, i) => { + let n = t.iconClass || (t.iconPath ? ma(t.iconPath) : void 0); + t.alwaysVisible && (n = n ? `${n} always-visible` : + "always-visible"); + const o = new pn.aU(`id-${i}`, "", n, !0, (() => { + return i = this, n = void 0, r = function*() { + e.fireButtonTriggered({ + button: t, + item: e.item + }) + }, new((o = void 0) || (o = Promise))((function(e, t) { + function s(e) { + try { + l(r.next(e)) + } catch (e) { + t(e) + } + } + + function a(e) { + try { + l(r.throw(e)) + } catch (e) { + t(e) + } + } + + function l(t) { + var i; + t.done ? e(t.value) : (i = t.value, i instanceof o ? i : + new o((function(e) { + e(i) + }))).then(s, a) + } + l((r = r.apply(i, n || [])).next()) + })); + var i, n, o, r + })); + return o.tooltip = t.tooltip || "", o + })), { + icon: !0, + label: !1 + }), i.entry.classList.add("has-actions")) : i.entry.classList.remove( + "has-actions") + } + disposeElement(e, t, i) { + i.toDisposeElement = (0, Le.B9)(i.toDisposeElement) + } + disposeTemplate(e) { + e.toDisposeElement = (0, Le.B9)(e.toDisposeElement), e.toDisposeTemplate = + (0, Le.B9)(e.toDisposeTemplate) + } + } + Ta.ID = "listelement"; + class Ma { + getHeight(e) { + return e.saneDetail ? 44 : 22 + } + getTemplateId(e) { + return Ta.ID + } + } + var Aa; + ! function(e) { + e[e.First = 1] = "First", e[e.Second = 2] = "Second", e[e.Last = 3] = + "Last", e[e.Next = 4] = "Next", e[e.Previous = 5] = "Previous", e[e.NextPage = + 6] = "NextPage", e[e.PreviousPage = 7] = "PreviousPage" + }(Aa || (Aa = {})); + class Ra { + constructor(e, t, i) { + this.parent = e, this.inputElements = [], this.elements = [], this.elementsToIndexes = + new Map, this.matchOnDescription = !1, this.matchOnDetail = !1, this.matchOnLabel = ! + 0, this.matchOnMeta = !0, this.sortByLabel = !0, this._onChangedAllVisibleChecked = + new z.Q5, this.onChangedAllVisibleChecked = this._onChangedAllVisibleChecked + .event, this._onChangedCheckedCount = new z.Q5, this.onChangedCheckedCount = + this._onChangedCheckedCount.event, this._onChangedVisibleCount = new z + .Q5, this.onChangedVisibleCount = this._onChangedVisibleCount.event, + this._onChangedCheckedElements = new z.Q5, this.onChangedCheckedElements = + this._onChangedCheckedElements.event, this._onButtonTriggered = new z + .Q5, this.onButtonTriggered = this._onButtonTriggered.event, this._onKeyDown = + new z.Q5, this.onKeyDown = this._onKeyDown.event, this._onLeave = new z + .Q5, this.onLeave = this._onLeave.event, this._fireCheckedEvents = !0, + this.elementDisposables = [], this.disposables = [], this.id = t, + this.container = he.R3(this.parent, Ea(".quick-input-list")); + const n = new Ma, + o = new Oa; + this.list = i.createList("QuickInput", this.container, n, [new Ta], { + identityProvider: { + getId: e => e.saneLabel + }, + setRowLineHeight: !1, + multipleSelectionSupport: !1, + horizontalScrolling: !1, + accessibilityProvider: o + }), this.list.getHTMLElement().id = t, this.disposables.push(this.list), + this.disposables.push(this.list.onKeyDown((e => { + const t = new ai.y(e); + switch (t.keyCode) { + case 10: + this.toggleCheckbox(); + break; + case 31: + (ze.dz ? e.metaKey : e.ctrlKey) && this.list.setFocus((0, St.w6) + (this.list.length)); + break; + case 16: + const t = this.list.getFocus(); + 1 === t.length && 0 === t[0] && this._onLeave.fire(); + break; + case 18: + const i = this.list.getFocus(); + 1 === i.length && i[0] === this.list.length - 1 && this._onLeave + .fire() + } + this._onKeyDown.fire(t) + }))), this.disposables.push(this.list.onMouseDown((e => { + 2 !== e.browserEvent.button && e.browserEvent.preventDefault() + }))), this.disposables.push(he.nm(this.container, he.tw.CLICK, (e => { + (e.x || e.y) && this._onLeave.fire() + }))), this.disposables.push(this.list.onMouseMiddleClick((e => { + this._onLeave.fire() + }))), this.disposables.push(this.list.onContextMenu((e => { + "number" == typeof e.index && (e.browserEvent.preventDefault(), + this.list.setSelection([e.index])) + }))), this.disposables.push(this._onChangedAllVisibleChecked, this._onChangedCheckedCount, + this._onChangedVisibleCount, this._onChangedCheckedElements, this._onButtonTriggered, + this._onLeave, this._onKeyDown) + } + get onDidChangeFocus() { + return z.ju.map(this.list.onDidChangeFocus, (e => e.elements.map((e => + e.item)))) + } + get onDidChangeSelection() { + return z.ju.map(this.list.onDidChangeSelection, (e => ({ + items: e.elements.map((e => e.item)), + event: e.browserEvent + }))) + } + getAllVisibleChecked() { + return this.allVisibleChecked(this.elements, !1) + } + allVisibleChecked(e, t = !0) { + for (let i = 0, n = e.length; i < n; i++) { + const n = e[i]; + if (!n.hidden) { + if (!n.checked) return !1; + t = !0 + } + } + return t + } + getCheckedCount() { + let e = 0; + const t = this.elements; + for (let i = 0, n = t.length; i < n; i++) t[i].checked && e++; + return e + } + getVisibleCount() { + let e = 0; + const t = this.elements; + for (let i = 0, n = t.length; i < n; i++) t[i].hidden || e++; + return e + } + setAllVisibleChecked(e) { + try { + this._fireCheckedEvents = !1, this.elements.forEach((t => { + t.hidden || (t.checked = e) + })) + } finally { + this._fireCheckedEvents = !0, this.fireCheckedEvents() + } + } + setElements(e) { + this.elementDisposables = (0, Le.B9)(this.elementDisposables); + const t = e => this.fireButtonTriggered(e); + this.inputElements = e, this.elements = e.reduce(((i, n, o) => { + var r, s, a; + if ("separator" !== n.type) { + const l = o && e[o - 1], + d = n.label && n.label.replace(/\r?\n/g, " "), + c = n.meta && n.meta.replace(/\r?\n/g, " "), + h = n.description && n.description.replace(/\r?\n/g, " "), + u = n.detail && n.detail.replace(/\r?\n/g, " "), + g = n.ariaLabel || [d, h, u].map((e => (0, vn.JL)(e))).filter((e => + !!e)).join(", "); + i.push(new Ia({ + index: o, + item: n, + saneLabel: d, + saneMeta: c, + saneAriaLabel: g, + saneDescription: h, + saneDetail: u, + labelHighlights: null === (r = n.highlights) || void 0 === r ? + void 0 : r.label, + descriptionHighlights: null === (s = n.highlights) || void 0 === + s ? void 0 : s.description, + detailHighlights: null === (a = n.highlights) || void 0 === a ? + void 0 : a.detail, + checked: !1, + separator: l && "separator" === l.type ? l : void 0, + fireButtonTriggered: t + })) + } + return i + }), []), this.elementDisposables.push(...this.elements), this.elementDisposables + .push(...this.elements.map((e => e.onChecked((() => this.fireCheckedEvents()))))), + this.elementsToIndexes = this.elements.reduce(((e, t, i) => (e.set(t.item, + i), e)), new Map), this.list.splice(0, this.list.length), this.list.splice( + 0, this.list.length, this.elements), this._onChangedVisibleCount.fire( + this.elements.length) + } + getFocusedElements() { + return this.list.getFocusedElements().map((e => e.item)) + } + setFocusedElements(e) { + if (this.list.setFocus(e.filter((e => this.elementsToIndexes.has(e))).map( + (e => this.elementsToIndexes.get(e)))), e.length > 0) { + const e = this.list.getFocus()[0]; + "number" == typeof e && this.list.reveal(e) + } + } + getActiveDescendant() { + return this.list.getHTMLElement().getAttribute("aria-activedescendant") + } + setSelectedElements(e) { + this.list.setSelection(e.filter((e => this.elementsToIndexes.has(e))).map( + (e => this.elementsToIndexes.get(e)))) + } + getCheckedElements() { + return this.elements.filter((e => e.checked)).map((e => e.item)) + } + setCheckedElements(e) { + try { + this._fireCheckedEvents = !1; + const t = new Set; + for (const i of e) t.add(i); + for (const e of this.elements) e.checked = t.has(e.item) + } finally { + this._fireCheckedEvents = !0, this.fireCheckedEvents() + } + } + set enabled(e) { + this.list.getHTMLElement().style.pointerEvents = e ? "" : "none" + } + focus(e) { + if (!this.list.length) return; + switch (e === Aa.Next && this.list.getFocus()[0] === this.list.length - + 1 && (e = Aa.First), e === Aa.Previous && 0 === this.list.getFocus()[ + 0] && (e = Aa.Last), e === Aa.Second && this.list.length < 2 && (e = + Aa.First), e) { + case Aa.First: + this.list.focusFirst(); + break; + case Aa.Second: + this.list.focusNth(1); + break; + case Aa.Last: + this.list.focusLast(); + break; + case Aa.Next: + this.list.focusNext(); + break; + case Aa.Previous: + this.list.focusPrevious(); + break; + case Aa.NextPage: + this.list.focusNextPage(); + break; + case Aa.PreviousPage: + this.list.focusPreviousPage() + } + const t = this.list.getFocus()[0]; + "number" == typeof t && this.list.reveal(t) + } + clearFocus() { + this.list.setFocus([]) + } + domFocus() { + this.list.domFocus() + } + layout(e) { + this.list.getHTMLElement().style.maxHeight = e ? + `calc(${44*Math.floor(e/44)}px)` : "", this.list.layout() + } + filter(e) { + if (!(this.sortByLabel || this.matchOnLabel || this.matchOnDescription || + this.matchOnDetail)) return this.list.layout(), !1; + if ((e = e.trim()) && (this.matchOnLabel || this.matchOnDescription || + this.matchOnDetail)) { + let t; + this.elements.forEach((i => { + const n = this.matchOnLabel ? (0, Ve.f6)((0, Hr.Gt)(e, (0, Hr.Ho) + (i.saneLabel))) : void 0, + o = this.matchOnDescription ? (0, Ve.f6)((0, Hr.Gt)(e, (0, Hr.Ho) + (i.saneDescription || ""))) : void 0, + r = this.matchOnDetail ? (0, Ve.f6)((0, Hr.Gt)(e, (0, Hr.Ho)(i.saneDetail || + ""))) : void 0, + s = this.matchOnMeta ? (0, Ve.f6)((0, Hr.Gt)(e, (0, Hr.Ho)(i.saneMeta || + ""))) : void 0; + if (n || o || r || s ? (i.labelHighlights = n, i.descriptionHighlights = + o, i.detailHighlights = r, i.hidden = !1) : (i.labelHighlights = + void 0, i.descriptionHighlights = void 0, i.detailHighlights = + void 0, i.hidden = !i.item.alwaysShow), i.separator = void 0, ! + this.sortByLabel) { + const e = i.index && this.inputElements[i.index - 1]; + t = e && "separator" === e.type ? e : t, t && !i.hidden && (i.separator = + t, t = void 0) + } + })) + } else this.elements.forEach((e => { + e.labelHighlights = void 0, e.descriptionHighlights = void 0, e.detailHighlights = + void 0, e.hidden = !1; + const t = e.index && this.inputElements[e.index - 1]; + e.separator = t && "separator" === t.type ? t : void 0 + })); + const t = this.elements.filter((e => !e.hidden)); + if (this.sortByLabel && e) { + const i = e.toLowerCase(); + t.sort(((e, t) => function(e, t, i) { + const n = e.labelHighlights || [], + o = t.labelHighlights || []; + return n.length && !o.length ? -1 : !n.length && o.length ? 1 : 0 === + n.length && 0 === o.length ? 0 : function(e, t, i) { + const n = e.toLowerCase(), + o = t.toLowerCase(), + r = function(e, t, i) { + const n = e.toLowerCase(), + o = t.toLowerCase(), + r = n.startsWith(i), + s = o.startsWith(i); + if (r !== s) return r ? -1 : 1; + if (r && s) { + if (n.length < o.length) return -1; + if (n.length > o.length) return 1 + } + return 0 + }(e, t, i); + if (r) return r; + const s = n.endsWith(i); + if (s !== o.endsWith(i)) return s ? -1 : 1; + const a = function(e, t, i = !1) { + const n = e || "", + o = t || "", + r = La.value.collator.compare(n, o); + return La.value.collatorIsNumeric && 0 === r && n !== o ? n < + o ? -1 : 1 : r + }(n, o); + return 0 !== a ? a : n.localeCompare(o) + }(e.saneLabel, t.saneLabel, i) + }(e, t, i))) + } + return this.elementsToIndexes = t.reduce(((e, t, i) => (e.set(t.item, + i), e)), new Map), this.list.splice(0, this.list.length, t), this.list + .setFocus([]), this.list.layout(), this._onChangedAllVisibleChecked.fire( + this.getAllVisibleChecked()), this._onChangedVisibleCount.fire(t.length), ! + 0 + } + toggleCheckbox() { + try { + this._fireCheckedEvents = !1; + const e = this.list.getFocusedElements(), + t = this.allVisibleChecked(e); + for (const i of e) i.checked = !t + } finally { + this._fireCheckedEvents = !0, this.fireCheckedEvents() + } + } + display(e) { + this.container.style.display = e ? "" : "none" + } + isDisplayed() { + return "none" !== this.container.style.display + } + dispose() { + this.elementDisposables = (0, Le.B9)(this.elementDisposables), this.disposables = + (0, Le.B9)(this.disposables) + } + fireCheckedEvents() { + this._fireCheckedEvents && (this._onChangedAllVisibleChecked.fire(this + .getAllVisibleChecked()), this._onChangedCheckedCount.fire(this.getCheckedCount()), + this._onChangedCheckedElements.fire(this.getCheckedElements())) + } + fireButtonTriggered(e) { + this._onButtonTriggered.fire(e) + } + style(e) { + this.list.style(e) + } + } + Da([Na.H], Ra.prototype, "onDidChangeFocus", null), Da([Na.H], Ra.prototype, + "onDidChangeSelection", null); + class Oa { + getWidgetAriaLabel() { + return (0, vi.N)("quickInput", "Quick Input") + } + getAriaLabel(e) { + return e.saneAriaLabel + } + getWidgetRole() { + return "listbox" + } + getRole() { + return "option" + } + } + var Pa = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + const Fa = he.$, + Ba = { + iconClass: (0, vn.CM)("quick-input-back", vn.lA.arrowLeft).classNames, + tooltip: (0, vi.N)("quickInput.back", "Back"), + handle: -1 + }; + class Wa extends Le.JT { + constructor(e) { + super(), this.ui = e, this.visible = !1, this._enabled = !0, this._busy = ! + 1, this._ignoreFocusOut = !1, this._buttons = [], this.noValidationMessage = + Wa.noPromptMessage, this._severity = li.Z.Ignore, this.buttonsUpdated = ! + 1, this.onDidTriggerButtonEmitter = this._register(new z.Q5), this.onDidHideEmitter = + this._register(new z.Q5), this.onDisposeEmitter = this._register(new z + .Q5), this.visibleDisposables = this._register(new Le.SL), this.onDidHide = + this.onDidHideEmitter.event + } + get title() { + return this._title + } + set title(e) { + this._title = e, this.update() + } + get description() { + return this._description + } + set description(e) { + this._description = e, this.update() + } + get step() { + return this._steps + } + set step(e) { + this._steps = e, this.update() + } + get totalSteps() { + return this._totalSteps + } + set totalSteps(e) { + this._totalSteps = e, this.update() + } + get enabled() { + return this._enabled + } + set enabled(e) { + this._enabled = e, this.update() + } + get contextKey() { + return this._contextKey + } + set contextKey(e) { + this._contextKey = e, this.update() + } + get busy() { + return this._busy + } + set busy(e) { + this._busy = e, this.update() + } + get ignoreFocusOut() { + return this._ignoreFocusOut + } + set ignoreFocusOut(e) { + const t = this._ignoreFocusOut !== e && !ze.gn; + this._ignoreFocusOut = e && !ze.gn, t && this.update() + } + get buttons() { + return this._buttons + } + set buttons(e) { + this._buttons = e, this.buttonsUpdated = !0, this.update() + } + get validationMessage() { + return this._validationMessage + } + set validationMessage(e) { + this._validationMessage = e, this.update() + } + get severity() { + return this._severity + } + set severity(e) { + this._severity = e, this.update() + } + show() { + this.visible || (this.visibleDisposables.add(this.ui.onDidTriggerButton( + (e => { + -1 !== this.buttons.indexOf(e) && this.onDidTriggerButtonEmitter + .fire(e) + }))), this.ui.show(this), this.visible = !0, this._lastValidationMessage = + void 0, this._lastSeverity = void 0, this.buttons.length && (this.buttonsUpdated = ! + 0), this.update()) + } + hide() { + this.visible && this.ui.hide() + } + didHide(e = fa.Jq.Other) { + this.visible = !1, this.visibleDisposables.clear(), this.onDidHideEmitter + .fire({ + reason: e + }) + } + update() { + if (!this.visible) return; + const e = this.getTitle(); + e && this.ui.title.textContent !== e ? this.ui.title.textContent = e : + e || " " === this.ui.title.innerHTML || (this.ui.title.innerText = + " "); + const t = this.getDescription(); + if (this.ui.description1.textContent !== t && (this.ui.description1.textContent = + t), this.ui.description2.textContent !== t && (this.ui.description2 + .textContent = t), this.busy && !this.busyDelay && (this.busyDelay = + new Be._F, this.busyDelay.setIfNotSet((() => { + this.visible && this.ui.progressBar.infinite() + }), 800)), !this.busy && this.busyDelay && (this.ui.progressBar.stop(), + this.busyDelay.cancel(), this.busyDelay = void 0), this.buttonsUpdated) { + this.buttonsUpdated = !1, this.ui.leftActionBar.clear(); + const e = this.buttons.filter((e => e === Ba)); + this.ui.leftActionBar.push(e.map(((e, t) => { + const i = new pn.aU(`id-${t}`, "", e.iconClass || ma(e.iconPath), ! + 0, (() => Pa(this, void 0, void 0, (function*() { + this.onDidTriggerButtonEmitter.fire(e) + })))); + return i.tooltip = e.tooltip || "", i + })), { + icon: !0, + label: !1 + }), this.ui.rightActionBar.clear(); + const t = this.buttons.filter((e => e !== Ba)); + this.ui.rightActionBar.push(t.map(((e, t) => { + const i = new pn.aU(`id-${t}`, "", e.iconClass || ma(e.iconPath), ! + 0, (() => Pa(this, void 0, void 0, (function*() { + this.onDidTriggerButtonEmitter.fire(e) + })))); + return i.tooltip = e.tooltip || "", i + })), { + icon: !0, + label: !1 + }) + } + this.ui.ignoreFocusOut = this.ignoreFocusOut, this.ui.setEnabled(this + .enabled), this.ui.setContextKey(this.contextKey); + const i = this.validationMessage || this.noValidationMessage; + this._lastValidationMessage !== i && (this._lastValidationMessage = i, + he.mc(this.ui.message, ...(0, Ys.T)(i))), this._lastSeverity !== + this.severity && (this._lastSeverity = this.severity, this.showMessageDecoration( + this.severity)) + } + getTitle() { + return this.title && this.step ? `${this.title} (${this.getSteps()})` : + this.title ? this.title : this.step ? this.getSteps() : "" + } + getDescription() { + return this.description || "" + } + getSteps() { + return this.step && this.totalSteps ? (0, vi.N)("quickInput.steps", + "{0}/{1}", this.step, this.totalSteps) : this.step ? String(this.step) : + "" + } + showMessageDecoration(e) { + if (this.ui.inputBox.showDecoration(e), e !== li.Z.Ignore) { + const t = this.ui.inputBox.stylesForType(e); + this.ui.message.style.color = t.foreground ? `${t.foreground}` : "", + this.ui.message.style.backgroundColor = t.background ? + `${t.background}` : "", this.ui.message.style.border = t.border ? + `1px solid ${t.border}` : "", this.ui.message.style.paddingBottom = + "4px" + } else this.ui.message.style.color = "", this.ui.message.style.backgroundColor = + "", this.ui.message.style.border = "", this.ui.message.style.paddingBottom = + "" + } + dispose() { + this.hide(), this.onDisposeEmitter.fire(), super.dispose() + } + } + Wa.noPromptMessage = (0, vi.N)("inputModeEntry", + "Press 'Enter' to confirm your input or 'Escape' to cancel"); + class za extends Wa { + constructor() { + super(...arguments), this._value = "", this.onDidChangeValueEmitter = + this._register(new z.Q5), this.onWillAcceptEmitter = this._register( + new z.Q5), this.onDidAcceptEmitter = this._register(new z.Q5), this.onDidCustomEmitter = + this._register(new z.Q5), this._items = [], this.itemsUpdated = !1, + this._canSelectMany = !1, this._canAcceptInBackground = !1, this._matchOnDescription = ! + 1, this._matchOnDetail = !1, this._matchOnLabel = !0, this._sortByLabel = ! + 0, this._autoFocusOnList = !0, this._itemActivation = this.ui.isScreenReaderOptimized() ? + fa.jG.NONE : fa.jG.FIRST, this._activeItems = [], this.activeItemsUpdated = ! + 1, this.activeItemsToConfirm = [], this.onDidChangeActiveEmitter = + this._register(new z.Q5), this._selectedItems = [], this.selectedItemsUpdated = ! + 1, this.selectedItemsToConfirm = [], this.onDidChangeSelectionEmitter = + this._register(new z.Q5), this.onDidTriggerItemButtonEmitter = this._register( + new z.Q5), this.valueSelectionUpdated = !0, this._ok = "default", + this._customButton = !1, this.filterValue = e => e, this.onDidChangeValue = + this.onDidChangeValueEmitter.event, this.onWillAccept = this.onWillAcceptEmitter + .event, this.onDidAccept = this.onDidAcceptEmitter.event, this.onDidChangeActive = + this.onDidChangeActiveEmitter.event, this.onDidChangeSelection = this + .onDidChangeSelectionEmitter.event, this.onDidTriggerItemButton = + this.onDidTriggerItemButtonEmitter.event + } + get quickNavigate() { + return this._quickNavigate + } + set quickNavigate(e) { + this._quickNavigate = e, this.update() + } + get value() { + return this._value + } + set value(e) { + this._value !== e && (this._value = e || "", this.update(), this.onDidChangeValueEmitter + .fire(this._value)) + } + set ariaLabel(e) { + this._ariaLabel = e, this.update() + } + get ariaLabel() { + return this._ariaLabel + } + get placeholder() { + return this._placeholder + } + set placeholder(e) { + this._placeholder = e, this.update() + } + get items() { + return this._items + } + set items(e) { + this._items = e, this.itemsUpdated = !0, this.update() + } + get canSelectMany() { + return this._canSelectMany + } + set canSelectMany(e) { + this._canSelectMany = e, this.update() + } + get canAcceptInBackground() { + return this._canAcceptInBackground + } + set canAcceptInBackground(e) { + this._canAcceptInBackground = e + } + get matchOnDescription() { + return this._matchOnDescription + } + set matchOnDescription(e) { + this._matchOnDescription = e, this.update() + } + get matchOnDetail() { + return this._matchOnDetail + } + set matchOnDetail(e) { + this._matchOnDetail = e, this.update() + } + get matchOnLabel() { + return this._matchOnLabel + } + set matchOnLabel(e) { + this._matchOnLabel = e, this.update() + } + get sortByLabel() { + return this._sortByLabel + } + set sortByLabel(e) { + this._sortByLabel = e, this.update() + } + get autoFocusOnList() { + return this._autoFocusOnList + } + set autoFocusOnList(e) { + this._autoFocusOnList = e, this.update() + } + get itemActivation() { + return this._itemActivation + } + set itemActivation(e) { + this._itemActivation = e + } + get activeItems() { + return this._activeItems + } + set activeItems(e) { + this._activeItems = e, this.activeItemsUpdated = !0, this.update() + } + get selectedItems() { + return this._selectedItems + } + set selectedItems(e) { + this._selectedItems = e, this.selectedItemsUpdated = !0, this.update() + } + get keyMods() { + return this._quickNavigate ? fa.X5 : this.ui.keyMods + } + set valueSelection(e) { + this._valueSelection = e, this.valueSelectionUpdated = !0, this.update() + } + get customButton() { + return this._customButton + } + set customButton(e) { + this._customButton = e, this.update() + } + get customLabel() { + return this._customButtonLabel + } + set customLabel(e) { + this._customButtonLabel = e, this.update() + } + get customHover() { + return this._customButtonHover + } + set customHover(e) { + this._customButtonHover = e, this.update() + } + get ok() { + return this._ok + } + set ok(e) { + this._ok = e, this.update() + } + get hideInput() { + return !!this._hideInput + } + set hideInput(e) { + this._hideInput = e, this.update() + } + trySelectFirst() { + this.autoFocusOnList && (this.canSelectMany || this.ui.list.focus(Aa.First)) + } + show() { + this.visible || (this.visibleDisposables.add(this.ui.inputBox.onDidChange( + (e => { + e !== this.value && (this._value = e, this.ui.list.filter(this.filterValue( + this.ui.inputBox.value)) && this.trySelectFirst(), this.onDidChangeValueEmitter + .fire(e)) + }))), this.visibleDisposables.add(this.ui.inputBox.onMouseDown((e => { + this.autoFocusOnList || this.ui.list.clearFocus() + }))), this.visibleDisposables.add((this._hideInput ? this.ui.list : + this.ui.inputBox).onKeyDown((e => { + switch (e.keyCode) { + case 18: + this.ui.list.focus(Aa.Next), this.canSelectMany && this.ui.list + .domFocus(), he.zB.stop(e, !0); + break; + case 16: + this.ui.list.getFocusedElements().length ? this.ui.list.focus( + Aa.Previous) : this.ui.list.focus(Aa.Last), this.canSelectMany && + this.ui.list.domFocus(), he.zB.stop(e, !0); + break; + case 12: + this.ui.list.focus(Aa.NextPage), this.canSelectMany && this.ui + .list.domFocus(), he.zB.stop(e, !0); + break; + case 11: + this.ui.list.focus(Aa.PreviousPage), this.canSelectMany && + this.ui.list.domFocus(), he.zB.stop(e, !0); + break; + case 17: + if (!this._canAcceptInBackground) return; + if (!this.ui.inputBox.isSelectionAtEnd()) return; + this.activeItems[0] && (this._selectedItems = [this.activeItems[ + 0]], this.onDidChangeSelectionEmitter.fire(this.selectedItems), + this.handleAccept(!0)); + break; + case 14: + !e.ctrlKey && !e.metaKey || e.shiftKey || e.altKey || (this.ui + .list.focus(Aa.First), he.zB.stop(e, !0)); + break; + case 13: + !e.ctrlKey && !e.metaKey || e.shiftKey || e.altKey || (this.ui + .list.focus(Aa.Last), he.zB.stop(e, !0)) + } + }))), this.visibleDisposables.add(this.ui.onDidAccept((() => { + !this.canSelectMany && this.activeItems[0] && (this._selectedItems = [ + this.activeItems[0] + ], this.onDidChangeSelectionEmitter.fire(this.selectedItems)), + this.handleAccept(!1) + }))), this.visibleDisposables.add(this.ui.onDidCustom((() => { + this.onDidCustomEmitter.fire() + }))), this.visibleDisposables.add(this.ui.list.onDidChangeFocus((e => { + this.activeItemsUpdated || this.activeItemsToConfirm !== this._activeItems && + (0, St.fS)(e, this._activeItems, ((e, t) => e === t)) || (this._activeItems = + e, this.onDidChangeActiveEmitter.fire(e)) + }))), this.visibleDisposables.add(this.ui.list.onDidChangeSelection( + (({ + items: e, + event: t + }) => { + this.canSelectMany ? e.length && this.ui.list.setSelectedElements( + []) : this.selectedItemsToConfirm !== this._selectedItems && ( + 0, St.fS)(e, this._selectedItems, ((e, t) => e === t)) || ( + this._selectedItems = e, this.onDidChangeSelectionEmitter.fire( + e), e.length && this.handleAccept(t instanceof MouseEvent && + 1 === t.button)) + }))), this.visibleDisposables.add(this.ui.list.onChangedCheckedElements( + (e => { + this.canSelectMany && (this.selectedItemsToConfirm !== this._selectedItems && + (0, St.fS)(e, this._selectedItems, ((e, t) => e === t)) || ( + this._selectedItems = e, this.onDidChangeSelectionEmitter.fire( + e))) + }))), this.visibleDisposables.add(this.ui.list.onButtonTriggered((e => + this.onDidTriggerItemButtonEmitter.fire(e)))), this.visibleDisposables + .add(this.registerQuickNavigation()), this.valueSelectionUpdated = ! + 0), super.show() + } + handleAccept(e) { + let t = !1; + this.onWillAcceptEmitter.fire({ + veto: () => t = !0 + }), t || this.onDidAcceptEmitter.fire({ + inBackground: e + }) + } + registerQuickNavigation() { + return he.nm(this.ui.container, he.tw.KEY_UP, (e => { + if (this.canSelectMany || !this._quickNavigate) return; + const t = new ai.y(e), + i = t.keyCode; + this._quickNavigate.keybindings.some((e => { + const [n, o] = e.getParts(); + return !(o || (n.shiftKey && 4 === i ? t.ctrlKey || t.altKey || + t.metaKey : !(n.altKey && 6 === i || n.ctrlKey && 5 === i || + n.metaKey && 57 === i))) + })) && (this.activeItems[0] && (this._selectedItems = [this.activeItems[ + 0]], this.onDidChangeSelectionEmitter.fire(this.selectedItems), + this.handleAccept(!1)), this._quickNavigate = void 0) + })) + } + update() { + if (!this.visible) return; + const e = !!this._hideInput && this._items.length > 0; + this.ui.container.classList.toggle("hidden-input", e && !this.description); + const t = { + title: !!this.title || !!this.step || !!this.buttons.length, + description: !!this.description, + checkAll: this.canSelectMany && !this._hideCheckAll, + checkBox: this.canSelectMany, + inputBox: !e, + progressBar: !e, + visibleCount: !0, + count: this.canSelectMany, + ok: "default" === this.ok ? this.canSelectMany : this.ok, + list: !0, + message: !!this.validationMessage, + customButton: this.customButton + }; + this.ui.setVisibilities(t), super.update(), this.ui.inputBox.value !== + this.value && (this.ui.inputBox.value = this.value), this.valueSelectionUpdated && + (this.valueSelectionUpdated = !1, this.ui.inputBox.select(this._valueSelection && { + start: this._valueSelection[0], + end: this._valueSelection[1] + })), this.ui.inputBox.placeholder !== (this.placeholder || "") && ( + this.ui.inputBox.placeholder = this.placeholder || ""); + const i = this.ariaLabel || this.placeholder || za.DEFAULT_ARIA_LABEL; + if (this.ui.inputBox.ariaLabel !== i && (this.ui.inputBox.ariaLabel = + i), this.ui.list.matchOnDescription = this.matchOnDescription, this.ui + .list.matchOnDetail = this.matchOnDetail, this.ui.list.matchOnLabel = + this.matchOnLabel, this.ui.list.sortByLabel = this.sortByLabel, this.itemsUpdated + ) switch (this.itemsUpdated = !1, this.ui.list.setElements(this.items), + this.ui.list.filter(this.filterValue(this.ui.inputBox.value)), this.ui + .checkAll.checked = this.ui.list.getAllVisibleChecked(), this.ui.visibleCount + .setCount(this.ui.list.getVisibleCount()), this.ui.count.setCount( + this.ui.list.getCheckedCount()), this._itemActivation) { + case fa.jG.NONE: + this._itemActivation = fa.jG.FIRST; + break; + case fa.jG.SECOND: + this.ui.list.focus(Aa.Second), this._itemActivation = fa.jG.FIRST; + break; + case fa.jG.LAST: + this.ui.list.focus(Aa.Last), this._itemActivation = fa.jG.FIRST; + break; + default: + this.trySelectFirst() + } + this.ui.container.classList.contains("show-checkboxes") !== !!this.canSelectMany && + (this.canSelectMany ? this.ui.list.clearFocus() : this.trySelectFirst()), + this.activeItemsUpdated && (this.activeItemsUpdated = !1, this.activeItemsToConfirm = + this._activeItems, this.ui.list.setFocusedElements(this.activeItems), + this.activeItemsToConfirm === this._activeItems && (this.activeItemsToConfirm = + null)), this.selectedItemsUpdated && (this.selectedItemsUpdated = ! + 1, this.selectedItemsToConfirm = this._selectedItems, this.canSelectMany ? + this.ui.list.setCheckedElements(this.selectedItems) : this.ui.list.setSelectedElements( + this.selectedItems), this.selectedItemsToConfirm === this._selectedItems && + (this.selectedItemsToConfirm = null)), this.ui.customButton.label = + this.customLabel || "", this.ui.customButton.element.title = this.customHover || + "", this.ui.setComboboxAccessibility(!0), t.inputBox || (this.ui.list + .domFocus(), this.canSelectMany && this.ui.list.focus(Aa.First)) + } + } + za.DEFAULT_ARIA_LABEL = (0, vi.N)("quickInputBox.ariaLabel", + "Type to narrow down results."); + class Va extends Le.JT { + constructor(e) { + super(), this.options = e, this.comboboxAccessibility = !1, this.enabled = ! + 0, this.onDidAcceptEmitter = this._register(new z.Q5), this.onDidCustomEmitter = + this._register(new z.Q5), this.onDidTriggerButtonEmitter = this._register( + new z.Q5), this.keyMods = { + ctrlCmd: !1, + alt: !1 + }, this.controller = null, this.onShowEmitter = this._register(new z + .Q5), this.onShow = this.onShowEmitter.event, this.onHideEmitter = + this._register(new z.Q5), this.onHide = this.onHideEmitter.event, + this.idPrefix = e.idPrefix, this.parentElement = e.container, this.styles = + e.styles, this.registerKeyModsListeners() + } + registerKeyModsListeners() { + const e = e => { + this.keyMods.ctrlCmd = e.ctrlKey || e.metaKey, this.keyMods.alt = e + .altKey + }; + this._register(he.nm(window, he.tw.KEY_DOWN, e, !0)), this._register( + he.nm(window, he.tw.KEY_UP, e, !0)), this._register(he.nm(window, + he.tw.MOUSE_DOWN, e, !0)) + } + getUI() { + if (this.ui) return this.ui; + const e = he.R3(this.parentElement, Fa( + ".quick-input-widget.show-file-icons")); + e.tabIndex = -1, e.style.display = "none"; + const t = he.dS(e), + i = he.R3(e, Fa(".quick-input-titlebar")), + n = this._register(new un.o(i)); + n.domNode.classList.add("quick-input-left-action-bar"); + const o = he.R3(i, Fa(".quick-input-title")), + r = this._register(new un.o(i)); + r.domNode.classList.add("quick-input-right-action-bar"); + const s = he.R3(e, Fa(".quick-input-description")), + a = he.R3(e, Fa(".quick-input-header")), + l = he.R3(a, Fa("input.quick-input-check-all")); + l.type = "checkbox", this._register(he.mu(l, he.tw.CHANGE, (e => { + const t = l.checked; + y.setAllVisibleChecked(t) + }))), this._register(he.nm(l, he.tw.CLICK, (e => { + (e.x || e.y) && u.setFocus() + }))); + const d = he.R3(a, Fa(".quick-input-description")), + c = he.R3(a, Fa(".quick-input-and-message")), + h = he.R3(c, Fa(".quick-input-filter")), + u = this._register(new va(h)); + u.setAttribute("aria-describedby", `${this.idPrefix}message`); + const g = he.R3(h, Fa(".quick-input-visible-count")); + g.setAttribute("aria-live", "polite"), g.setAttribute("aria-atomic", + "true"); + const p = new ta.Z(g, { + countFormat: (0, vi.N)({ + key: "quickInput.visibleCount", + comment: [ + "This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers." + ] + }, "{0} Results") + }), + m = he.R3(h, Fa(".quick-input-count")); + m.setAttribute("aria-live", "polite"); + const f = new ta.Z(m, { + countFormat: (0, vi.N)({ + key: "quickInput.countSelected", + comment: [ + "This tells the user how many items are selected in a list of items to select from. The items can be anything." + ] + }, "{0} Selected") + }), + _ = he.R3(a, Fa(".quick-input-action")), + b = new ea(_); + b.label = (0, vi.N)("ok", "OK"), this._register(b.onDidClick((e => { + this.onDidAcceptEmitter.fire() + }))); + const v = he.R3(a, Fa(".quick-input-action")), + w = new ea(v); + w.label = (0, vi.N)("custom", "Custom"), this._register(w.onDidClick( + (e => { + this.onDidCustomEmitter.fire() + }))); + const C = he.R3(c, Fa(`#${this.idPrefix}message.quick-input-message`)), + y = this._register(new Ra(e, this.idPrefix + "list", this.options)); + this._register(y.onChangedAllVisibleChecked((e => { + l.checked = e + }))), this._register(y.onChangedVisibleCount((e => { + p.setCount(e) + }))), this._register(y.onChangedCheckedCount((e => { + f.setCount(e) + }))), this._register(y.onLeave((() => { + setTimeout((() => { + u.setFocus(), this.controller instanceof za && this.controller + .canSelectMany && y.clearFocus() + }), 0) + }))), this._register(y.onDidChangeFocus((() => { + this.comboboxAccessibility && this.getUI().inputBox.setAttribute( + "aria-activedescendant", this.getUI().list.getActiveDescendant() || + "") + }))); + const S = new da(e); + S.getContainer().classList.add("quick-input-progress"); + const x = he.go(e); + return this._register(x), this._register(he.nm(e, he.tw.FOCUS, (e => { + this.previousFocusElement = e.relatedTarget instanceof HTMLElement ? + e.relatedTarget : void 0 + }), !0)), this._register(x.onDidBlur((() => { + this.getUI().ignoreFocusOut || this.options.ignoreFocusOut() || + this.hide(fa.Jq.Blur), this.previousFocusElement = void 0 + }))), this._register(he.nm(e, he.tw.FOCUS, (e => { + u.setFocus() + }))), this._register(he.nm(e, he.tw.KEY_DOWN, (t => { + const i = new ai.y(t); + switch (i.keyCode) { + case 3: + he.zB.stop(t, !0), this.onDidAcceptEmitter.fire(); + break; + case 9: + he.zB.stop(t, !0), this.hide(fa.Jq.Gesture); + break; + case 2: + if (!i.altKey && !i.ctrlKey && !i.metaKey) { + const n = [".action-label.codicon"]; + e.classList.contains("show-checkboxes") ? n.push("input") : n + .push("input[type=text]"), this.getUI().list.isDisplayed() && + n.push(".monaco-list"); + const o = e.querySelectorAll(n.join(", ")); + i.shiftKey && i.target === o[0] ? (he.zB.stop(t, !0), o[o.length - + 1].focus()) : i.shiftKey || i.target !== o[o.length - 1] || + (he.zB.stop(t, !0), o[0].focus()) + } + } + }))), this.ui = { + container: e, + styleSheet: t, + leftActionBar: n, + titleBar: i, + title: o, + description1: s, + description2: d, + rightActionBar: r, + checkAll: l, + filterContainer: h, + inputBox: u, + visibleCountContainer: g, + visibleCount: p, + countContainer: m, + count: f, + okContainer: _, + ok: b, + message: C, + customButtonContainer: v, + customButton: w, + list: y, + progressBar: S, + onDidAccept: this.onDidAcceptEmitter.event, + onDidCustom: this.onDidCustomEmitter.event, + onDidTriggerButton: this.onDidTriggerButtonEmitter.event, + ignoreFocusOut: !1, + keyMods: this.keyMods, + isScreenReaderOptimized: () => this.options.isScreenReaderOptimized(), + show: e => this.show(e), + hide: () => this.hide(), + setVisibilities: e => this.setVisibilities(e), + setComboboxAccessibility: e => this.setComboboxAccessibility(e), + setEnabled: e => this.setEnabled(e), + setContextKey: e => this.options.setContextKey(e) + }, this.updateStyles(), this.ui + } + pick(e, t = {}, i = W.T.None) { + return new Promise(((n, o) => { + let r = e => { + r = n, t.onKeyMods && t.onKeyMods(s.keyMods), n(e) + }; + if (i.isCancellationRequested) return void r(void 0); + const s = this.createQuickPick(); + let a; + const l = [s, s.onDidAccept((() => { + if (s.canSelectMany) r(s.selectedItems.slice()), s.hide(); + else { + const e = s.activeItems[0]; + e && (r(e), s.hide()) + } + })), s.onDidChangeActive((e => { + const i = e[0]; + i && t.onDidFocus && t.onDidFocus(i) + })), s.onDidChangeSelection((e => { + if (!s.canSelectMany) { + const t = e[0]; + t && (r(t), s.hide()) + } + })), s.onDidTriggerItemButton((e => t.onDidTriggerItemButton && + t.onDidTriggerItemButton(Object.assign(Object.assign({}, e), { + removeItem: () => { + const t = s.items.indexOf(e.item); + if (-1 !== t) { + const e = s.items.slice(), + i = e.splice(t, 1), + n = s.activeItems.filter((e => e !== i[0])); + s.items = e, n && (s.activeItems = n) + } + } + })))), s.onDidChangeValue((e => { + !a || e || 1 === s.activeItems.length && s.activeItems[0] === + a || (s.activeItems = [a]) + })), i.onCancellationRequested((() => { + s.hide() + })), s.onDidHide((() => { + (0, Le.B9)(l), r(void 0) + }))]; + s.title = t.title, s.canSelectMany = !!t.canPickMany, s.placeholder = + t.placeHolder, s.ignoreFocusOut = !!t.ignoreFocusLost, s.matchOnDescription = ! + !t.matchOnDescription, s.matchOnDetail = !!t.matchOnDetail, s.matchOnLabel = + void 0 === t.matchOnLabel || t.matchOnLabel, s.autoFocusOnList = + void 0 === t.autoFocusOnList || t.autoFocusOnList, s.quickNavigate = + t.quickNavigate, s.contextKey = t.contextKey, s.busy = !0, + Promise.all([e, t.activeItem]).then((([e, t]) => { + a = t, s.busy = !1, s.items = e, s.canSelectMany && (s.selectedItems = + e.filter((e => "separator" !== e.type && e.picked))), a && + (s.activeItems = [a]) + })), s.show(), Promise.resolve(e).then(void 0, (e => { + o(e), s.hide() + })) + })) + } + createQuickPick() { + const e = this.getUI(); + return new za(e) + } + show(e) { + const t = this.getUI(); + this.onShowEmitter.fire(); + const i = this.controller; + this.controller = e, i && i.didHide(), this.setEnabled(!0), t.leftActionBar + .clear(), t.title.textContent = "", t.description1.textContent = "", + t.description2.textContent = "", t.rightActionBar.clear(), t.checkAll + .checked = !1, t.inputBox.placeholder = "", t.inputBox.password = !1, + t.inputBox.showDecoration(li.Z.Ignore), t.visibleCount.setCount(0), + t.count.setCount(0), he.mc(t.message), t.progressBar.stop(), t.list.setElements( + []), t.list.matchOnDescription = !1, t.list.matchOnDetail = !1, t.list + .matchOnLabel = !0, t.list.sortByLabel = !0, t.ignoreFocusOut = !1, + this.setComboboxAccessibility(!1), t.inputBox.ariaLabel = ""; + const n = this.options.backKeybindingLabel(); + Ba.tooltip = n ? (0, vi.N)("quickInput.backWithKeybinding", + "Back ({0})", n) : (0, vi.N)("quickInput.back", "Back"), t.container + .style.display = "", this.updateLayout(), t.inputBox.setFocus() + } + setVisibilities(e) { + const t = this.getUI(); + t.title.style.display = e.title ? "" : "none", t.description1.style.display = + e.description && (e.inputBox || e.checkAll) ? "" : "none", t.description2 + .style.display = !e.description || e.inputBox || e.checkAll ? "none" : + "", t.checkAll.style.display = e.checkAll ? "" : "none", t.filterContainer + .style.display = e.inputBox ? "" : "none", t.visibleCountContainer.style + .display = e.visibleCount ? "" : "none", t.countContainer.style.display = + e.count ? "" : "none", t.okContainer.style.display = e.ok ? "" : + "none", t.customButtonContainer.style.display = e.customButton ? "" : + "none", t.message.style.display = e.message ? "" : "none", t.progressBar + .getContainer().style.display = e.progressBar ? "" : "none", t.list.display(! + !e.list), t.container.classList[e.checkBox ? "add" : "remove"]( + "show-checkboxes"), this.updateLayout() + } + setComboboxAccessibility(e) { + if (e !== this.comboboxAccessibility) { + const t = this.getUI(); + this.comboboxAccessibility = e, this.comboboxAccessibility ? (t.inputBox + .setAttribute("role", "combobox"), t.inputBox.setAttribute( + "aria-haspopup", "true"), t.inputBox.setAttribute( + "aria-autocomplete", "list"), t.inputBox.setAttribute( + "aria-activedescendant", t.list.getActiveDescendant() || "")) : ( + t.inputBox.removeAttribute("role"), t.inputBox.removeAttribute( + "aria-haspopup"), t.inputBox.removeAttribute("aria-autocomplete"), + t.inputBox.removeAttribute("aria-activedescendant")) + } + } + setEnabled(e) { + if (e !== this.enabled) { + this.enabled = e; + for (const t of this.getUI().leftActionBar.viewItems) t.getAction().enabled = + e; + for (const t of this.getUI().rightActionBar.viewItems) t.getAction() + .enabled = e; + this.getUI().checkAll.disabled = !e, this.getUI().ok.enabled = e, + this.getUI().list.enabled = e + } + } + hide(e) { + var t; + const i = this.controller; + if (i) { + const n = !(null === (t = this.ui) || void 0 === t ? void 0 : t.container + .contains(document.activeElement)); + this.controller = null, this.onHideEmitter.fire(), this.getUI().container + .style.display = "none", n || (this.previousFocusElement && this.previousFocusElement + .offsetParent ? (this.previousFocusElement.focus(), this.previousFocusElement = + void 0) : this.options.returnFocus()), i.didHide(e) + } + } + layout(e, t) { + this.dimension = e, this.titleBarOffset = t, this.updateLayout() + } + updateLayout() { + if (this.ui) { + this.ui.container.style.top = `${this.titleBarOffset}px`; + const e = this.ui.container.style, + t = Math.min(.62 * this.dimension.width, Va.MAX_WIDTH); + e.width = t + "px", e.marginLeft = "-" + t / 2 + "px", this.ui.inputBox + .layout(), this.ui.list.layout(this.dimension && .4 * this.dimension + .height) + } + } + applyStyles(e) { + this.styles = e, this.updateStyles() + } + updateStyles() { + if (this.ui) { + const { + quickInputTitleBackground: e, + quickInputBackground: t, + quickInputForeground: i, + contrastBorder: n, + widgetShadow: o + } = this.styles.widget; + this.ui.titleBar.style.backgroundColor = e ? e.toString() : "", this + .ui.container.style.backgroundColor = t ? t.toString() : "", this.ui + .container.style.color = i ? i.toString() : "", this.ui.container.style + .border = n ? `1px solid ${n}` : "", this.ui.container.style.boxShadow = + o ? `0 0 8px 2px ${o}` : "", this.ui.inputBox.style(this.styles.inputBox), + this.ui.count.style(this.styles.countBadge), this.ui.ok.style(this.styles + .button), this.ui.customButton.style(this.styles.button), this.ui.progressBar + .style(this.styles.progressBar), this.ui.list.style(this.styles.list); + const r = []; + this.styles.list.pickerGroupBorder && r.push( + `.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }` + ), this.styles.list.pickerGroupForeground && r.push( + `.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }` + ), (this.styles.keybindingLabel.keybindingLabelBackground || this.styles + .keybindingLabel.keybindingLabelBorder || this.styles.keybindingLabel + .keybindingLabelBottomBorder || this.styles.keybindingLabel.keybindingLabelShadow || + this.styles.keybindingLabel.keybindingLabelForeground) && (r.push( + ".quick-input-list .monaco-keybinding > .monaco-keybinding-key {" + ), this.styles.keybindingLabel.keybindingLabelBackground && r.push( + `background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};` + ), this.styles.keybindingLabel.keybindingLabelBorder && r.push( + `border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};` + ), this.styles.keybindingLabel.keybindingLabelBottomBorder && r.push( + `border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};` + ), this.styles.keybindingLabel.keybindingLabelShadow && r.push( + `box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};` + ), this.styles.keybindingLabel.keybindingLabelForeground && r.push( + `color: ${this.styles.keybindingLabel.keybindingLabelForeground};` + ), r.push("}")); + const s = r.join("\n"); + s !== this.ui.styleSheet.textContent && (this.ui.styleSheet.textContent = + s) + } + } + } + Va.MAX_WIDTH = 600; + var Ha = i(8289), + Ua = i(725), + ja = i(1157), + Ka = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let $a = class extends Le.JT { + constructor(e, t) { + super(), this.quickInputService = e, this.instantiationService = t, + this.registry = Ho.B.as(Ua.IP.Quickaccess), this.mapProviderToDescriptor = + new Map, this.lastAcceptedPickerValues = new Map, this.visibleQuickAccess = + void 0 + } + show(e = "", t) { + this.doShowOrPick(e, !1, t) + } + doShowOrPick(e, t, i) { + var n; + const [o, r] = this.getOrInstantiateProvider(e), s = this.visibleQuickAccess, + a = null == s ? void 0 : s.descriptor; + if (s && r && a === r) return e === r.prefix || (null == i ? void 0 : + i.preserveValue) || (s.picker.value = e), void this.adjustValueSelection( + s.picker, r, i); + if (r && !(null == i ? void 0 : i.preserveValue)) { + let t; + if (s && a && a !== r) { + const e = s.value.substr(a.prefix.length); + e && (t = `${r.prefix}${e}`) + } + if (!t) { + const e = null == o ? void 0 : o.defaultFilterValue; + e === Ua.Ry.LAST ? t = this.lastAcceptedPickerValues.get(r) : + "string" == typeof e && (t = `${r.prefix}${e}`) + } + "string" == typeof t && (e = t) + } + const l = new Le.SL, + d = l.add(this.quickInputService.createQuickPick()); + let c, h; + d.value = e, this.adjustValueSelection(d, r, i), d.placeholder = null == + r ? void 0 : r.placeholder, d.quickNavigate = null == i ? void 0 : i + .quickNavigateConfiguration, d.hideInput = !!d.quickNavigate && !s, ( + "number" == typeof(null == i ? void 0 : i.itemActivation) || (null == + i ? void 0 : i.quickNavigateConfiguration)) && (d.itemActivation = + null !== (n = null == i ? void 0 : i.itemActivation) && void 0 !== + n ? n : ja.jG.SECOND), d.contextKey = null == r ? void 0 : r.contextKey, + d.filterValue = e => e.substring(r ? r.prefix.length : 0), (null == + r ? void 0 : r.placeholder) && (d.ariaLabel = null == r ? void 0 : + r.placeholder), t && (c = new Promise((e => h = e)), l.add((0, Ha.I) + (d.onWillAccept)((e => { + e.veto(), d.hide() + })))), l.add(this.registerPickerListeners(d, o, r, e)); + const u = l.add(new W.A); + return o && l.add(o.provide(d, u.token)), (0, Ha.I)(d.onDidHide)((() => { + 0 === d.selectedItems.length && u.cancel(), l.dispose(), null == + h || h(d.selectedItems) + })), d.show(), t ? c : void 0 + } + adjustValueSelection(e, t, i) { + var n; + let o; + o = (null == i ? void 0 : i.preserveValue) ? [e.value.length, e.value + .length + ] : [null !== (n = null == t ? void 0 : t.prefix.length) && void 0 !== + n ? n : 0, e.value.length + ], e.valueSelection = o + } + registerPickerListeners(e, t, i, n) { + const o = new Le.SL, + r = this.visibleQuickAccess = { + picker: e, + descriptor: i, + value: n + }; + return o.add((0, Le.OF)((() => { + r === this.visibleQuickAccess && (this.visibleQuickAccess = void 0) + }))), o.add(e.onDidChangeValue((e => { + const [i] = this.getOrInstantiateProvider(e); + i !== t ? this.show(e, { + preserveValue: !0 + }) : r.value = e + }))), i && o.add(e.onDidAccept((() => { + this.lastAcceptedPickerValues.set(i, e.value) + }))), o + } + getOrInstantiateProvider(e) { + const t = this.registry.getQuickAccessProvider(e); + if (!t) return [void 0, void 0]; + let i = this.mapProviderToDescriptor.get(t); + return i || (i = this.instantiationService.createInstance(t.ctor), + this.mapProviderToDescriptor.set(t, i)), [i, t] + } + }; + $a = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([Ka(0, ja.eJ), Ka(1, Rn.TG)], $a); + var qa = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let Za = class extends bn.bB { + constructor(e, t, i, n, o) { + super(i), this.instantiationService = e, this.contextKeyService = t, + this.accessibilityService = n, this.layoutService = o, this.contexts = + new Map + } + get controller() { + return this._controller || (this._controller = this._register(this.createController())), + this._controller + } + get quickAccess() { + return this._quickAccess || (this._quickAccess = this._register(this.instantiationService + .createInstance($a))), this._quickAccess + } + createController(e = this.layoutService, t) { + var i, n; + const o = { + idPrefix: "quickInput_", + container: e.container, + ignoreFocusOut: () => !1, + isScreenReaderOptimized: () => this.accessibilityService.isScreenReaderOptimized(), + backKeybindingLabel: () => {}, + setContextKey: e => this.setContextKey(e), + returnFocus: () => e.focus(), + createList: (e, t, i, n, o) => this.instantiationService.createInstance( + ms.ev, e, t, i, n, o), + styles: this.computeStyles() + }, + r = this._register(new Va(Object.assign(Object.assign({}, o), t))); + return r.layout(e.dimension, null !== (n = null === (i = e.offset) || + void 0 === i ? void 0 : i.top) && void 0 !== n ? n : 0), this._register( + e.onDidLayout((t => { + var i, n; + return r.layout(t, null !== (n = null === (i = e.offset) || void 0 === + i ? void 0 : i.top) && void 0 !== n ? n : 0) + }))), this._register(r.onShow((() => this.resetContextKeys()))), + this._register(r.onHide((() => this.resetContextKeys()))), r + } + setContextKey(e) { + let t; + e && (t = this.contexts.get(e), t || (t = new Ci.uy(e, !1).bindTo( + this.contextKeyService), this.contexts.set(e, t))), t && t.get() || + (this.resetContextKeys(), t && t.set(!0)) + } + resetContextKeys() { + this.contexts.forEach((e => { + e.get() && e.reset() + })) + } + pick(e, t = {}, i = W.T.None) { + return this.controller.pick(e, t, i) + } + createQuickPick() { + return this.controller.createQuickPick() + } + updateStyles() { + this.controller.applyStyles(this.computeStyles()) + } + computeStyles() { + return { + widget: Object.assign({}, (0, ts.o)(this.theme, { + quickInputBackground: _n.zK, + quickInputForeground: _n.tZ, + quickInputTitleBackground: _n.lo, + contrastBorder: _n.lR, + widgetShadow: _n.rh + })), + inputBox: (0, ts.o)(this.theme, { + inputForeground: _n.zJ, + inputBackground: _n.sE, + inputBorder: _n.dt, + inputValidationInfoBackground: _n._l, + inputValidationInfoForeground: _n.YI, + inputValidationInfoBorder: _n.EP, + inputValidationWarningBackground: _n.RV, + inputValidationWarningForeground: _n.SU, + inputValidationWarningBorder: _n.C3, + inputValidationErrorBackground: _n.p, + inputValidationErrorForeground: _n._t, + inputValidationErrorBorder: _n.OZ + }), + countBadge: (0, ts.o)(this.theme, { + badgeBackground: _n.g8, + badgeForeground: _n.qe, + badgeBorder: _n.lR + }), + button: (0, ts.o)(this.theme, { + buttonForeground: _n.j5, + buttonBackground: _n.b7, + buttonHoverBackground: _n.GO, + buttonBorder: _n.lR + }), + progressBar: (0, ts.o)(this.theme, { + progressBarBackground: _n.zR + }), + keybindingLabel: (0, ts.o)(this.theme, { + keybindingLabelBackground: _n.oQ, + keybindingLabelForeground: _n.lW, + keybindingLabelBorder: _n.AW, + keybindingLabelBottomBorder: _n.K1, + keybindingLabelShadow: _n.rh + }), + list: (0, ts.o)(this.theme, { + listBackground: _n.zK, + listInactiveFocusForeground: _n.NP, + listInactiveSelectionIconForeground: _n.cb, + listInactiveFocusBackground: _n.Vq, + listFocusOutline: _n.xL, + listInactiveFocusOutline: _n.xL, + pickerGroupBorder: _n.op, + pickerGroupForeground: _n.kJ + }) + } + } + }; + Za = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([qa(0, Rn.TG), qa(1, Ci.i6), qa(2, bn.XE), qa(3, fo.F), qa(4, rs)], Za); + var Ga = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + Ya = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let Qa = class extends Za { + constructor(e, t, i, n, o, r) { + super(t, i, n, o, r), this.host = void 0; + const s = Ja.get(e); + this.host = { + _serviceBrand: void 0, + get container() { + return s.widget.getDomNode() + }, + get dimension() { + return e.getLayoutInfo() + }, + get onDidLayout() { + return e.onDidLayoutChange + }, + focus: () => e.focus() + } + } + createController() { + return super.createController(this.host) + } + }; + Qa = Ga([Ya(1, Rn.TG), Ya(2, Ci.i6), Ya(3, bn.XE), Ya(4, fo.F), Ya(5, rs)], + Qa); + let Xa = class { + constructor(e, t) { + this.instantiationService = e, this.codeEditorService = t, this.mapEditorToService = + new Map + } + get activeService() { + const e = this.codeEditorService.getFocusedCodeEditor(); + if (!e) throw new Error( + "Quick input service needs a focused editor to work."); + let t = this.mapEditorToService.get(e); + if (!t) { + const i = t = this.instantiationService.createInstance(Qa, e); + this.mapEditorToService.set(e, t), (0, Ha.I)(e.onDidDispose)((() => { + i.dispose(), this.mapEditorToService.delete(e) + })) + } + return t + } + get quickAccess() { + return this.activeService.quickAccess + } + pick(e, t = {}, i = W.T.None) { + return this.activeService.pick(e, t, i) + } + createQuickPick() { + return this.activeService.createQuickPick() + } + }; + Xa = Ga([Ya(0, Rn.TG), Ya(1, ce.$)], Xa); + class Ja { + constructor(e) { + this.editor = e, this.widget = new el(this.editor) + } + static get(e) { + return e.getContribution(Ja.ID) + } + dispose() { + this.widget.dispose() + } + } + Ja.ID = "editor.controller.quickInput"; + class el { + constructor(e) { + this.codeEditor = e, this.domNode = document.createElement("div"), + this.codeEditor.addOverlayWidget(this) + } + getId() { + return el.ID + } + getDomNode() { + return this.domNode + } + getPosition() { + return { + preference: 2 + } + } + dispose() { + this.codeEditor.removeOverlayWidget(this) + } + } + var tl; + el.ID = "editor.contrib.quickInputWidget", (0, mn._K)(Ja.ID, Ja), + function(e) { + const t = new On.y; + class i { + constructor(e, t) { + this._serviceId = e, this._factory = t, this._value = null + } + get id() { + return this._serviceId + } + get(e) { + if (!this._value) { + if (e && (this._value = e[this._serviceId.toString()]), this._value || + (this._value = this._factory(e)), !this._value) throw new Error( + "Service " + this._serviceId + " is missing!"); + t.set(this._serviceId, this._value) + } + return this._value + } + } + e.LazyStaticService = i; + let n = []; + + function o(e, t) { + let o = new i(e, t); + return n.push(o), o + } + e.init = function(e) { + let t = new On.y; + for (const [e, i] of(0, Es.d)()) t.set(e, i); + for (let i in e) e.hasOwnProperty(i) && t.set((0, Rn.yh)(i), e[i]); + n.forEach((i => t.set(i.id, i.get(e)))); + let i = new us(t, !0); + return t.set(Rn.TG, i), [t, i] + }, e.instantiationService = o(Rn.TG, (() => new us(t, !0))); + const r = new Ki; + e.configurationService = o(gi.Ui, (() => r)), e.resourceConfigurationService = + o(yt.V, (() => new $i(r))), e.resourcePropertiesService = o(yt.y, (() => + new qi(r))), e.contextService = o(Mi.ec, (() => new Gi)), e.labelService = + o(ps.e, (() => new Xi)), e.telemetryService = o(Er.b, (() => new Zi)), + e.dialogService = o(as.S, (() => new zi)), e.notificationService = o( + Ti.lT, (() => new Vi)), e.markerService = o(fs.lT, (() => new vs)), e + .modeService = o(Pe.h, (e => new $o)), e.standaloneThemeService = o(go + .Z, (() => new mr)), e.logService = o(xt.VZ, (() => new xt.$V(new xt.kw))), + e.undoRedoService = o(Rs.tJ, (t => new $s(e.dialogService.get(t), e.notificationService + .get(t)))), e.modelService = o(Ct.q, (t => new qo.BR(e.configurationService + .get(t), e.resourcePropertiesService.get(t), e.standaloneThemeService + .get(t), e.logService.get(t), e.undoRedoService.get(t)))), e.markerDecorationsService = + o(ks.i, (t => new Ds(e.modelService.get(t), e.markerService.get(t)))), + e.contextKeyService = o(Ci.i6, (t => new Lr(e.configurationService.get( + t)))), e.codeEditorService = o(ce.$, (t => new Eo(null, e.contextKeyService + .get(t), e.standaloneThemeService.get(t)))), e.editorProgressService = + o(Vn.e, (() => new Wi)), e.storageService = o(ws.Uy, (() => new ws.vm)), + e.editorWorkerService = o(Oe.p, (t => new Dt(e.modelService.get(t), e.resourceConfigurationService + .get(t), e.logService.get(t)))) + }(tl || (tl = {})); + class il extends Le.JT { + constructor(e, t) { + super(); + const [i, n] = tl.init(t); + this._serviceCollection = i, this._instantiationService = n; + const o = this.get(gi.Ui), + r = this.get(Ti.lT), + s = this.get(Er.b), + a = this.get(bn.XE), + l = this.get(xt.VZ), + d = this.get(Ci.i6); + let c = (e, i) => { + let n = null; + return t && (n = t[e.toString()]), n || (n = i()), this._serviceCollection + .set(e, n), n + }; + c(fo.F, (() => new Ts(d, o))), c(ms.Lw, (() => new ms.XN(a))); + let h = c(_e.H, (() => new Hi(this._instantiationService))), + u = c(mo.d, (() => this._register(new Ui(d, h, s, r, l, e)))), + g = c(rs, (() => new Ji(tl.codeEditorService.get(ce.$), e))); + c(ja.eJ, (() => new Xa(n, tl.codeEditorService.get(ce.$)))); + let p = c(Pn.u, (() => this._register(new ss(g)))); + c(zn.p, (() => new As)), c(Pn.i, (() => { + const e = new os(s, r, p, u, a); + return e.configure({ + blockMouse: !1 + }), this._register(e) + })), c(po.co, (() => new Ss(h))), c(ci.vu, (() => new Qi(tl.modelService + .get(Ct.q)))) + } + get(e) { + let t = this._serviceCollection.get(e); + if (!t) throw new Error("Missing service " + e); + return t + } + set(e, t) { + this._serviceCollection.set(e, t) + } + has(e) { + return this._serviceCollection.has(e) + } + } + + function nl(e, t, i) { + let n = new il(e, t), + o = null; + n.has(Fe.S) || (o = new Bi(tl.modelService.get()), n.set(Fe.S, o)), n.has( + be.v4) || n.set(be.v4, new xe(n.get(ce.$), n.get(_e.H))); + let r = i(n); + return o && o.setEditor(r), r + } + + function ol(e, t) { + return "boolean" == typeof e ? e : t + } + + function rl(e, t) { + return "string" == typeof e ? e : t + } + + function sl(e, t = !1) { + t && (e = e.map((function(e) { + return e.toLowerCase() + }))); + const i = function(e) { + const t = {}; + for (const i of e) t[i] = !0; + return t + }(e); + return t ? function(e) { + return void 0 !== i[e.toLowerCase()] && i.hasOwnProperty(e.toLowerCase()) + } : function(e) { + return void 0 !== i[e] && i.hasOwnProperty(e) + } + } + + function al(e, t) { + t = t.replace(/@@/g, ""); + let i, n = 0; + do { + i = !1, t = t.replace(/@(\w+)/g, (function(n, o) { + i = !0; + let r = ""; + if ("string" == typeof e[o]) r = e[o]; + else { + if (!(e[o] && e[o] instanceof RegExp)) throw void 0 === e[o] ? Kt( + e, "language definition does not contain attribute '" + o + + "', used at: " + t) : Kt(e, "attribute reference '" + o + + "' must be a string, used at: " + t); + r = e[o].source + } + return Ht(r) ? "" : "(?:" + r + ")" + })), n++ + } while (i && n < 5); + t = t.replace(/\x01/g, "@"); + let o = (e.ignoreCase ? "i" : "") + (e.unicode ? "u" : ""); + return new RegExp(t, o) + } + + function ll(e, t, i, n) { + let o = -1, + r = i, + s = i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/); + s && (s[3] && (o = parseInt(s[3]), s[2] && (o += 100)), r = s[4]); + let a, l = "~", + d = r; + if (r && 0 !== r.length ? /^\w*$/.test(d) ? l = "==" : (s = r.match( + /^(@|!@|~|!~|==|!=)(.*)$/), s && (l = s[1], d = s[2])) : (l = "!=", d = + ""), "~" !== l && "!~" !== l || !/^(\w|\|)*$/.test(d)) + if ("@" === l || "!@" === l) { + let i = e[d]; + if (!i) throw Kt(e, "the @ match target '" + d + + "' is not defined, in rule: " + t); + if (! function(e, t) { + if (!t) return !1; + if (!Array.isArray(t)) return !1; + for (const e of t) + if ("string" != typeof e) return !1; + return !0 + }(0, i)) throw Kt(e, "the @ match target '" + d + + "' must be an array of strings, in rule: " + t); + let n = sl(i, e.ignoreCase); + a = function(e) { + return "@" === l ? n(e) : !n(e) + } + } else if ("~" === l || "!~" === l) + if (d.indexOf("$") < 0) { + let t = al(e, "^" + d + "$"); + a = function(e) { + return "~" === l ? t.test(e) : !t.test(e) + } + } else a = function(t, i, n, o) { + return al(e, "^" + $t(e, d, i, n, o) + "$").test(t) + }; + else if (d.indexOf("$") < 0) { + let t = Ut(e, d); + a = function(e) { + return "==" === l ? e === t : e !== t + } + } else { + let t = Ut(e, d); + a = function(i, n, o, r, s) { + let a = $t(e, t, n, o, r); + return "==" === l ? i === a : i !== a + } + } else { + let t = sl(d.split("|"), e.ignoreCase); + a = function(e) { + return "~" === l ? t(e) : !t(e) + } + } + return -1 === o ? { + name: i, + value: n, + test: function(e, t, i, n) { + return a(e, e, t, i, n) + } + } : { + name: i, + value: n, + test: function(e, t, i, n) { + let r = function(e, t, i, n) { + if (n < 0) return e; + if (n < t.length) return t[n]; + if (n >= 100) { + n -= 100; + let e = i.split("."); + if (e.unshift(i), n < e.length) return e[n] + } + return null + }(e, t, i, o); + return a(r || "", e, t, i, n) + } + } + } + + function dl(e, t, i) { + if (i) { + if ("string" == typeof i) return i; + if (i.token || "" === i.token) { + if ("string" != typeof i.token) throw Kt(e, + "a 'token' attribute must be of type string, in rule: " + t); { + let n = { + token: i.token + }; + if (i.token.indexOf("$") >= 0 && (n.tokenSubst = !0), "string" == + typeof i.bracket) + if ("@open" === i.bracket) n.bracket = 1; + else { + if ("@close" !== i.bracket) throw Kt(e, + "a 'bracket' attribute must be either '@open' or '@close', in rule: " + + t); + n.bracket = -1 + } + if (i.next) { + if ("string" != typeof i.next) throw Kt(e, + "the next state must be a string value in rule: " + t); { + let o = i.next; + if (!/^(@pop|@push|@popall)$/.test(o) && ("@" === o[0] && (o = o.substr( + 1)), o.indexOf("$") < 0 && ! function(e, t) { + let i = t; + for (; i && i.length > 0;) { + if (e.stateNames[i]) return !0; + const t = i.lastIndexOf("."); + i = t < 0 ? null : i.substr(0, t) + } + return !1 + }(e, $t(e, o, "", [], "")))) throw Kt(e, "the next state '" + i.next + + "' is not defined in rule: " + t); + n.next = o + } + } + return "number" == typeof i.goBack && (n.goBack = i.goBack), "string" == + typeof i.switchTo && (n.switchTo = i.switchTo), "string" == typeof i + .log && (n.log = i.log), "string" == typeof i.nextEmbedded && (n.nextEmbedded = + i.nextEmbedded, e.usesEmbedded = !0), n + } + } + if (Array.isArray(i)) { + let n = []; + for (let o = 0, r = i.length; o < r; o++) n[o] = dl(e, t, i[o]); + return { + group: n + } + } + if (i.cases) { + let n = []; + for (let o in i.cases) + if (i.cases.hasOwnProperty(o)) { + const r = dl(e, t, i.cases[o]); + "@default" === o || "@" === o || "" === o ? n.push({ + test: void 0, + value: r, + name: o + }) : "@eos" === o ? n.push({ + test: function(e, t, i, n) { + return n + }, + value: r, + name: o + }) : n.push(ll(e, t, o, r)) + } + const o = e.defaultToken; + return { + test: function(e, t, i, r) { + for (const o of n) + if (!o.test || o.test(e, t, i, r)) return o.value; + return o + } + } + } + throw Kt(e, + "an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: " + + t) + } + return { + token: "" + } + } + class cl { + constructor(e) { + this.regex = new RegExp(""), this.action = { + token: "" + }, this.matchOnlyAtLineStart = !1, this.name = "", this.name = e + } + setRegex(e, t) { + let i; + if ("string" == typeof t) i = t; + else { + if (!(t instanceof RegExp)) throw Kt(e, + "rules must start with a match string or regular expression: " + + this.name); + i = t.source + } + this.matchOnlyAtLineStart = i.length > 0 && "^" === i[0], this.name = + this.name + ": " + i, this.regex = al(e, "^(?:" + (this.matchOnlyAtLineStart ? + i.substr(1) : i) + ")") + } + setAction(e, t) { + this.action = dl(e, this.name, t) + } + } + class hl { + constructor(e, t) { + this._languageIdentifier = e, this._actual = t + } + getInitialState() { + return this._actual.getInitialState() + } + tokenize(e, t, i, n) { + if ("function" == typeof this._actual.tokenize) return ul.adaptTokenize( + this._languageIdentifier.language, this._actual, e, i, n); + throw new Error("Not supported!") + } + tokenize2(e, t, i) { + let n = this._actual.tokenizeEncoded(e, i); + return new $.Hi(n.tokens, n.endState) + } + } + class ul { + constructor(e, t, i) { + this._standaloneThemeService = e, this._languageIdentifier = t, this._actual = + i + } + getInitialState() { + return this._actual.getInitialState() + } + static _toClassicTokens(e, t, i) { + let n = [], + o = 0; + for (let r = 0, s = e.length; r < s; r++) { + const s = e[r]; + let a = s.startIndex; + 0 === r ? a = 0 : a < o && (a = o), n[r] = new $.WU(a + i, s.scopes, + t), o = a + } + return n + } + static adaptTokenize(e, t, i, n, o) { + let r, s = t.tokenize(i, n), + a = ul._toClassicTokens(s.tokens, e, o); + return r = s.endState.equals(n) ? n : s.endState, new $.hG(a, r) + } + tokenize(e, t, i, n) { + return ul.adaptTokenize(this._languageIdentifier.language, this._actual, + e, i, n) + } + _toBinaryTokens(e, t) { + const i = this._languageIdentifier.id, + n = this._standaloneThemeService.getColorTheme().tokenTheme; + let o = [], + r = 0, + s = 0; + for (let a = 0, l = e.length; a < l; a++) { + const l = e[a], + d = n.match(i, l.scopes); + if (r > 0 && o[r - 1] === d) continue; + let c = l.startIndex; + 0 === a ? c = 0 : c < s && (c = s), o[r++] = c + t, o[r++] = d, s = c + } + let a = new Uint32Array(r); + for (let e = 0; e < r; e++) a[e] = o[e]; + return a + } + tokenize2(e, t, i, n) { + let o, r = this._actual.tokenize(e, i), + s = this._toBinaryTokens(r.tokens, n); + return o = r.endState.equals(i) ? i : r.endState, new $.Hi(s, o) + } + } + + function gl(e) { + return e && "function" == typeof e.then + } + var pl, ml = i(3606); + B.BH.wrappingIndent.defaultValue = 0, B.BH.glyphMargin.defaultValue = !1, + B.BH.autoIndent.defaultValue = 3, B.BH.overviewRulerLanes.defaultValue = + 2, ml.xC.setFormatterSelector(((e, t, i) => Promise.resolve(e[0]))); + const fl = Z(); + fl.editor = { + create: function(e, t, i) { + return nl(e, i || {}, (i => new Po(e, t, i, i.get(Rn.TG), i.get(ce.$), + i.get(_e.H), i.get(Ci.i6), i.get(mo.d), i.get(Pn.u), i.get(go.Z), + i.get(Ti.lT), i.get(gi.Ui), i.get(fo.F), i.get(Ct.q), i.get(Pe.h) + ))) + }, + onDidCreateEditor: function(e) { + return tl.codeEditorService.get().onCodeEditorAdd((t => { + e(t) + })) + }, + createDiffEditor: function(e, t, i) { + return nl(e, i || {}, (i => new Fo(e, t, i, i.get(Rn.TG), i.get(Ci.i6), + i.get(mo.d), i.get(Pn.u), i.get(Oe.p), i.get(ce.$), i.get(go.Z), + i.get(Ti.lT), i.get(gi.Ui), i.get(Pn.i), i.get(Vn.e), i.get(zn.p) + ))) + }, + createDiffNavigator: function(e, t) { + return new Ee(e, t) + }, + createModel: function(e, t, i) { + return Bo(tl.modelService.get(), tl.modeService.get(), e, t, i) + }, + setModelLanguage: function(e, t) { + tl.modelService.get().setMode(e, tl.modeService.get().create(t)) + }, + setModelMarkers: function(e, t, i) { + e && tl.markerService.get().changeOne(t, e.uri, i) + }, + getModelMarkers: function(e) { + return tl.markerService.get().read(e) + }, + onDidChangeMarkers: function(e) { + return tl.markerService.get().onMarkerChanged(e) + }, + getModels: function() { + return tl.modelService.get().getModels() + }, + getModel: function(e) { + return tl.modelService.get().getModel(e) + }, + onDidCreateModel: function(e) { + return tl.modelService.get().onModelAdded(e) + }, + onWillDisposeModel: function(e) { + return tl.modelService.get().onModelRemoved(e) + }, + onDidChangeModelLanguage: function(e) { + return tl.modelService.get().onModelModeChanged((t => { + e({ + model: t.model, + oldLanguage: t.oldModeId + }) + })) + }, + createWebWorker: function(e) { + return function(e, t) { + return new Ot(e, t) + }(tl.modelService.get(), e) + }, + colorizeElement: function(e, t) { + const i = tl.standaloneThemeService.get(); + return i.registerEditorContainer(e), oi.colorizeElement(i, tl.modeService + .get(), e, t) + }, + colorize: function(e, t, i) { + return tl.standaloneThemeService.get().registerEditorContainer( + document.body), oi.colorize(tl.modeService.get(), e, t, i) + }, + colorizeModelLine: function(e, t, i = 4) { + return tl.standaloneThemeService.get().registerEditorContainer( + document.body), oi.colorizeModelLine(e, t, i) + }, + tokenize: function(e, t) { + tl.modeService.get().triggerMode(t); + let i = (n = t, Ae.RW.get(n) || { + getInitialState: () => Re.nO, + tokenize: (e, t, i, o) => (0, Re.Ri)(n, e, i, o) + }); + var n; + let o = (0, Xe.uq)(e), + r = [], + s = i.getInitialState(); + for (let e = 0, t = o.length; e < t; e++) { + let t = o[e], + n = i.tokenize(t, !0, s, 0); + r[e] = n.tokens, s = n.endState + } + return r + }, + defineTheme: function(e, t) { + tl.standaloneThemeService.get().defineTheme(e, t) + }, + setTheme: function(e) { + tl.standaloneThemeService.get().setTheme(e) + }, + remeasureFonts: function() { + (0, an.P)() + }, + registerCommand: function(e, t) { + return _e.P.registerCommand({ + id: e, + handler: t + }) + }, + AccessibilitySupport: n, + ContentWidgetPositionPreference: l, + CursorChangeReason: d, + DefaultEndOfLine: c, + EditorAutoIndentStrategy: u, + EditorOption: g, + EndOfLinePreference: p, + EndOfLineSequence: m, + MinimapPosition: y, + MouseTargetType: S, + OverlayWidgetPositionPreference: x, + OverviewRulerLane: k, + RenderLineNumbersType: L, + RenderMinimap: N, + ScrollbarVisibility: E, + ScrollType: D, + TextEditorCursorBlinkingStyle: R, + TextEditorCursorStyle: O, + TrackedRangeStickiness: P, + WrappingIndent: F, + ConfigurationChangedEvent: B.Bb, + BareFontInfo: Ie.E4, + FontInfo: Ie.pR, + TextModelResolvedOptions: Me.dJ, + FindMatch: Me.tk, + EditorType: Te.g, + EditorOptions: B.BH + }, fl.languages = { + register: function(e) { + Vo.dQ.registerLanguage(e) + }, + getLanguages: function() { + let e = []; + return e = e.concat(Vo.dQ.getLanguages()), e + }, + onLanguage: function(e, t) { + let i = tl.modeService.get().onDidCreateMode((n => { + n.getId() === e && (i.dispose(), t()) + })); + return i + }, + getEncodedLanguageId: function(e) { + let t = tl.modeService.get().getLanguageIdentifier(e); + return t ? t.id : 0 + }, + setLanguageConfiguration: function(e, t) { + let i = tl.modeService.get().getLanguageIdentifier(e); + if (!i) throw new Error( + `Cannot set configuration for unknown language ${e}`); + return Ye.zu.register(i, t, 100) + }, + setColorMap: function(e) { + if (e) { + const t = [null]; + for (let i = 1, n = e.length; i < n; i++) t[i] = Zo.Il.fromHex(e[i]); + tl.standaloneThemeService.get().setColorMapOverride(t) + } else tl.standaloneThemeService.get().setColorMapOverride(null) + }, + setTokensProvider: function(e, t) { + let i = tl.modeService.get().getLanguageIdentifier(e); + if (!i) throw new Error( + `Cannot set tokens provider for unknown language ${e}`); + const n = e => function(e) { + return "tokenizeEncoded" in e + }(e) ? new hl(i, e) : new ul(tl.standaloneThemeService.get(), i, e); + return gl(t) ? Ae.RW.registerPromise(e, t.then((e => n(e)))) : Ae.RW.register( + e, n(t)) + }, + setMonarchTokensProvider: function(e, t) { + const i = t => function(e, t, i, n) { + return new ti(e, t, i, n) + }(tl.modeService.get(), tl.standaloneThemeService.get(), e, function( + e, t) { + if (!t || "object" != typeof t) throw new Error( + "Monarch: expecting a language definition object"); + let i = {}; + i.languageId = e, i.includeLF = ol(t.includeLF, !1), i.noThrow = ! + 1, i.maxStack = 100, i.start = "string" == typeof t.start ? t.start : + null, i.ignoreCase = ol(t.ignoreCase, !1), i.unicode = ol(t.unicode, ! + 1), i.tokenPostfix = rl(t.tokenPostfix, "." + i.languageId), i.defaultToken = + rl(t.defaultToken, "source"), i.usesEmbedded = !1; + let n = t; + + function o(e, r, s) { + for (const a of s) { + let s = a.include; + if (s) { + if ("string" != typeof s) throw Kt(i, + "an 'include' attribute must be a string at: " + e); + if ("@" === s[0] && (s = s.substr(1)), !t.tokenizer[s]) throw Kt( + i, "include target '" + s + "' is not defined at: " + e); + o(e + "." + s, r, t.tokenizer[s]) + } else { + const t = new cl(e); + if (Array.isArray(a) && a.length >= 1 && a.length <= 3) + if (t.setRegex(n, a[0]), a.length >= 3) + if ("string" == typeof a[1]) t.setAction(n, { + token: a[1], + next: a[2] + }); + else { + if ("object" != typeof a[1]) throw Kt(i, + "a next state as the last element of a rule can only be given if the action is either an object or a string, at: " + + e); { + const e = a[1]; + e.next = a[2], t.setAction(n, e) + } + } else t.setAction(n, a[1]); + else { + if (!a.regex) throw Kt(i, + "a rule must either be an array, or an object with a 'regex' or 'include' field at: " + + e); + a.name && "string" == typeof a.name && (t.name = a.name), a.matchOnlyAtStart && + (t.matchOnlyAtLineStart = ol(a.matchOnlyAtLineStart, !1)), t.setRegex( + n, a.regex), t.setAction(n, a.action) + } + r.push(t) + } + } + } + if (n.languageId = e, n.includeLF = i.includeLF, n.ignoreCase = i.ignoreCase, + n.unicode = i.unicode, n.noThrow = i.noThrow, n.usesEmbedded = i.usesEmbedded, + n.stateNames = t.tokenizer, n.defaultToken = i.defaultToken, !t.tokenizer || + "object" != typeof t.tokenizer) throw Kt(i, + "a language definition must define the 'tokenizer' attribute as an object" + ); + i.tokenizer = []; + for (let e in t.tokenizer) + if (t.tokenizer.hasOwnProperty(e)) { + i.start || (i.start = e); + const n = t.tokenizer[e]; + i.tokenizer[e] = new Array, o("tokenizer." + e, i.tokenizer[e], + n) + } + if (i.usesEmbedded = n.usesEmbedded, t.brackets) { + if (!Array.isArray(t.brackets)) throw Kt(i, + "the 'brackets' attribute must be defined as an array") + } else t.brackets = [{ + open: "{", + close: "}", + token: "delimiter.curly" + }, { + open: "[", + close: "]", + token: "delimiter.square" + }, { + open: "(", + close: ")", + token: "delimiter.parenthesis" + }, { + open: "<", + close: ">", + token: "delimiter.angle" + }]; + let r = []; + for (let e of t.brackets) { + let t = e; + if (t && Array.isArray(t) && 3 === t.length && (t = { + token: t[2], + open: t[0], + close: t[1] + }), t.open === t.close) throw Kt(i, + "open and close brackets in a 'brackets' attribute must be different: " + + t.open + + "\n hint: use the 'bracket' attribute if matching on equal brackets is required." + ); + if ("string" != typeof t.open || "string" != typeof t.token || + "string" != typeof t.close) throw Kt(i, + "every element in the 'brackets' array must be a '{open,close,token}' object or array" + ); + r.push({ + token: t.token + i.tokenPostfix, + open: Ut(i, t.open), + close: Ut(i, t.close) + }) + } + return i.brackets = r, i.noThrow = !0, i + }(e, t)); + return gl(t) ? Ae.RW.registerPromise(e, t.then((e => i(e)))) : Ae.RW.register( + e, i(t)) + }, + registerReferenceProvider: function(e, t) { + return Ae.FL.register(e, t) + }, + registerRenameProvider: function(e, t) { + return Ae.G0.register(e, t) + }, + registerCompletionItemProvider: function(e, t) { + return Ae.KZ.register(e, t) + }, + registerSignatureHelpProvider: function(e, t) { + return Ae.nD.register(e, t) + }, + registerHoverProvider: function(e, t) { + return Ae.xp.register(e, { + provideHover: (e, i, n) => { + let o = e.getWordAtPosition(i); + return Promise.resolve(t.provideHover(e, i, n)).then((e => { + if (e) return !e.range && o && (e.range = new j.e(i.lineNumber, + o.startColumn, i.lineNumber, o.endColumn)), e.range || (e + .range = new j.e(i.lineNumber, i.column, i.lineNumber, i.column) + ), e + })) + } + }) + }, + registerDocumentSymbolProvider: function(e, t) { + return Ae.vJ.register(e, t) + }, + registerDocumentHighlightProvider: function(e, t) { + return Ae.vH.register(e, t) + }, + registerLinkedEditingRangeProvider: function(e, t) { + return Ae.id.register(e, t) + }, + registerDefinitionProvider: function(e, t) { + return Ae.Ct.register(e, t) + }, + registerImplementationProvider: function(e, t) { + return Ae.vI.register(e, t) + }, + registerTypeDefinitionProvider: function(e, t) { + return Ae.tA.register(e, t) + }, + registerCodeLensProvider: function(e, t) { + return Ae.He.register(e, t) + }, + registerCodeActionProvider: function(e, t, i) { + return Ae.H9.register(e, { + providedCodeActionKinds: null == i ? void 0 : i.providedCodeActionKinds, + provideCodeActions: (e, i, n, o) => { + let r = tl.markerService.get().read({ + resource: e.uri + }).filter((e => j.e.areIntersectingOrTouching(e, i))); + return t.provideCodeActions(e, i, { + markers: r, + only: n.only + }, o) + } + }) + }, + registerDocumentFormattingEditProvider: function(e, t) { + return Ae.Az.register(e, t) + }, + registerDocumentRangeFormattingEditProvider: function(e, t) { + return Ae.vN.register(e, t) + }, + registerOnTypeFormattingEditProvider: function(e, t) { + return Ae.ln.register(e, t) + }, + registerLinkProvider: function(e, t) { + return Ae.pM.register(e, t) + }, + registerColorProvider: function(e, t) { + return Ae.OH.register(e, t) + }, + registerFoldingRangeProvider: function(e, t) { + return Ae.aC.register(e, t) + }, + registerDeclarationProvider: function(e, t) { + return Ae.RN.register(e, t) + }, + registerSelectionRangeProvider: function(e, t) { + return Ae.AC.register(e, t) + }, + registerDocumentSemanticTokensProvider: function(e, t) { + return Ae.wT.register(e, t) + }, + registerDocumentRangeSemanticTokensProvider: function(e, t) { + return Ae.K7.register(e, t) + }, + registerInlineCompletionsProvider: function(e, t) { + return Ae.zu.register(e, t) + }, + registerInlayHintsProvider: function(e, t) { + return Ae.mX.register(e, t) + }, + DocumentHighlightKind: h, + CompletionItemKind: r, + CompletionItemTag: s, + CompletionItemInsertTextRule: o, + SymbolKind: M, + SymbolTag: A, + IndentAction: f, + CompletionTriggerKind: a, + SignatureHelpTriggerKind: T, + InlayHintKind: _, + InlineCompletionTriggerKind: b, + FoldingRangeKind: Ae.AD + }, fl.CancellationTokenSource; + const _l = fl.Emitter, + bl = (fl.KeyCode, fl.KeyMod, fl.Position, fl.Range), + vl = (fl.Selection, fl.SelectionDirection, fl.MarkerSeverity), + wl = fl.MarkerTag, + Cl = fl.Uri, + yl = (fl.Token, fl.editor), + Sl = fl.languages; + ((null === (pl = ze.li.MonacoEnvironment) || void 0 === pl ? void 0 : pl.globalAPI) || + "function" == typeof define && i.amdO) && (self.monaco = fl), void 0 !== + self.require && "function" == typeof self.require.config && self.require + .config({ + ignoreDuplicateModules: ["vscode-languageserver-types", + "vscode-languageserver-types/main", + "vscode-languageserver-textdocument", + "vscode-languageserver-textdocument/main", "vscode-nls", + "vscode-nls/vscode-nls", "jsonc-parser", "jsonc-parser/main", + "vscode-uri", "vscode-uri/index", + "vs/basic-languages/typescript/typescript" + ] + }) + }, + 5898: (e, t, i) => { + "use strict"; + i.r(t); + var n = i(3379), + o = i.n(n), + r = i(7795), + s = i.n(r), + a = i(569), + l = i.n(a), + d = i(3565), + c = i.n(d), + h = i(9216), + u = i.n(h), + g = i(4589), + p = i.n(g), + m = i(8844), + f = {}; + f.styleTagTransform = p(), f.setAttributes = c(), f.insert = l().bind( + null, "head"), f.domAPI = s(), f.insertStyleElement = u(), o()(m.Z, f), + m.Z && m.Z.locals && m.Z.locals; + var _ = i(5321), + b = i(8626), + v = i(8764), + w = i(6346), + C = i(3794), + y = i(5976), + S = i(1432), + x = i(7295), + k = i(666), + L = i(6830), + N = i(9102), + D = i(9720), + E = i(8819), + I = i(2065), + T = i(1847), + M = i(988), + A = i(3910), + R = i(7781), + O = i(913), + P = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + F = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const B = new E.uy("accessibilityHelpWidgetVisible", !1); + let W = class e extends y.JT { + constructor(e, t) { + super(), this._editor = e, this._widget = this._register(t.createInstance( + z, this._editor)) + } + static get(t) { + return t.getContribution(e.ID) + } + show() { + this._widget.show() + } + hide() { + this._widget.hide() + } + }; + W.ID = "editor.contrib.accessibilityHelpController", W = P([F(1, I.TG)], + W); + let z = class e extends C.$ { + constructor(e, t, i, n) { + super(), this._contextKeyService = t, this._keybindingService = i, + this._openerService = n, this._editor = e, this._isVisibleKey = B.bindTo( + this._contextKeyService), this._domNode = (0, b.X)(document.createElement( + "div")), this._domNode.setClassName("accessibilityHelpWidget"), + this._domNode.setDisplay("none"), this._domNode.setAttribute("role", + "dialog"), this._domNode.setAttribute("aria-hidden", "true"), this._contentDomNode = + (0, b.X)(document.createElement("div")), this._contentDomNode.setAttribute( + "role", "document"), this._domNode.appendChild(this._contentDomNode), + this._isVisible = !1, this._register(this._editor.onDidLayoutChange( + (() => { + this._isVisible && this._layout() + }))), this._register(_.mu(this._contentDomNode.domNode, "keydown", ( + e => { + if (this._isVisible && (e.equals(2083) && ((0, w.Z9)(O.Oe.emergencyConfOn), + this._editor.updateOptions({ + accessibilitySupport: "on" + }), _.PO(this._contentDomNode.domNode), this._buildContent(), + this._contentDomNode.domNode.focus(), e.preventDefault(), e.stopPropagation() + ), e.equals(2086))) { + (0, w.Z9)(O.Oe.openingDocs); + let t = this._editor.getRawOptions().accessibilityHelpUrl; + void 0 === t && (t = + "https://go.microsoft.com/fwlink/?linkid=852450"), this._openerService + .open(k.o.parse(t)), e.preventDefault(), e.stopPropagation() + } + }))), this.onblur(this._contentDomNode.domNode, (() => { + this.hide() + })), this._editor.addOverlayWidget(this) + } + dispose() { + this._editor.removeOverlayWidget(this), super.dispose() + } + getId() { + return e.ID + } + getDomNode() { + return this._domNode.domNode + } + getPosition() { + return { + preference: null + } + } + show() { + this._isVisible || (this._isVisible = !0, this._isVisibleKey.set(!0), + this._layout(), this._domNode.setDisplay("block"), this._domNode.setAttribute( + "aria-hidden", "false"), this._contentDomNode.domNode.tabIndex = 0, + this._buildContent(), this._contentDomNode.domNode.focus()) + } + _descriptionForCommand(e, t, i) { + let n = this._keybindingService.lookupKeybinding(e); + return n ? x.WU(t, n.getAriaLabel()) : x.WU(i, e) + } + _buildContent() { + const e = this._editor.getOptions(), + t = this._editor.getSelections(); + let i = 0; + if (t) { + const e = this._editor.getModel(); + e && t.forEach((t => { + i += e.getValueLengthInRange(t) + })) + } + let n = function(e, t) { + return e && 0 !== e.length ? 1 === e.length ? t ? x.WU(O.Oe.singleSelectionRange, + e[0].positionLineNumber, e[0].positionColumn, t) : x.WU(O.Oe.singleSelection, + e[0].positionLineNumber, e[0].positionColumn) : t ? x.WU(O.Oe.multiSelectionRange, + e.length, t) : e.length > 0 ? x.WU(O.Oe.multiSelection, e.length) : + "" : O.Oe.noSelection + }(t, i); + e.get(53) ? e.get(80) ? n += O.Oe.readonlyDiffEditor : n += O.Oe.editableDiffEditor : + e.get(80) ? n += O.Oe.readonlyEditor : n += O.Oe.editableEditor; + const o = S.dz ? O.Oe.changeConfigToOnMac : O.Oe.changeConfigToOnWinLinux; + switch (e.get(2)) { + case 0: + n += "\n\n - " + o; + break; + case 2: + n += "\n\n - " + O.Oe.auto_on; + break; + case 1: + n += "\n\n - " + O.Oe.auto_off, n += " " + o + } + e.get(129) ? n += "\n\n - " + this._descriptionForCommand(D.ToggleTabFocusModeAction + .ID, O.Oe.tabFocusModeOnMsg, O.Oe.tabFocusModeOnMsgNoKb) : n += + "\n\n - " + this._descriptionForCommand(D.ToggleTabFocusModeAction.ID, + O.Oe.tabFocusModeOffMsg, O.Oe.tabFocusModeOffMsgNoKb), n += + "\n\n - " + (S.dz ? O.Oe.openDocMac : O.Oe.openDocWinLinux), n += + "\n\n" + O.Oe.outroMsg, this._contentDomNode.domNode.appendChild((0, + v.BO)(n)), this._contentDomNode.domNode.setAttribute("aria-label", + n) + } + hide() { + this._isVisible && (this._isVisible = !1, this._isVisibleKey.reset(), + this._domNode.setDisplay("none"), this._domNode.setAttribute( + "aria-hidden", "true"), this._contentDomNode.domNode.tabIndex = -1, + _.PO(this._contentDomNode.domNode), this._editor.focus()) + } + _layout() { + let t = this._editor.getLayoutInfo(), + i = Math.max(5, Math.min(e.WIDTH, t.width - 40)), + n = Math.max(5, Math.min(e.HEIGHT, t.height - 40)); + this._domNode.setWidth(i), this._domNode.setHeight(n); + let o = Math.round((t.height - n) / 2); + this._domNode.setTop(o); + let r = Math.round((t.width - i) / 2); + this._domNode.setLeft(r) + } + }; + z.ID = "editor.contrib.accessibilityHelpWidget", z.WIDTH = 500, z.HEIGHT = + 300, z = P([F(1, E.i6), F(2, T.d), F(3, M.v4)], z); + class V extends L.R6 { + constructor() { + super({ + id: "editor.action.showAccessibilityHelp", + label: O.Oe.showAccessibilityHelpAction, + alias: "Show Accessibility Help", + precondition: void 0, + kbOpts: { + primary: 571, + weight: 100, + linux: { + primary: 1595, + secondary: [571] + } + } + }) + } + run(e, t) { + let i = W.get(t); + i && i.show() + } + }(0, L._K)(W.ID, W), (0, L.Qr)(V); + const H = L._l.bindToContribution(W.get); + (0, L.fK)(new H({ + id: "closeAccessibilityHelp", + precondition: B, + handler: e => e.hide(), + kbOpts: { + weight: 200, + kbExpr: N.u.focus, + primary: 9, + secondary: [1033] + } + })), (0, R.Ic)(((e, t) => { + const i = e.getColor(A.D0); + i && t.addRule( + `.monaco-editor .accessibilityHelpWidget { background-color: ${i}; }` + ); + const n = e.getColor(A.Hf); + n && t.addRule( + `.monaco-editor .accessibilityHelpWidget { color: ${n}; }`); + const o = e.getColor(A.rh); + o && t.addRule( + `.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${o}; }` + ); + const r = e.getColor(A.lR); + r && t.addRule( + `.monaco-editor .accessibilityHelpWidget { border: 2px solid ${r}; }` + ) + })) + }, + 1321: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + IPadShowKeyboard: () => C + }); + var n = i(3379), + o = i.n(n), + r = i(7795), + s = i.n(r), + a = i(569), + l = i.n(a), + d = i(3565), + c = i.n(d), + h = i(9216), + u = i.n(h), + g = i(4589), + p = i.n(g), + m = i(1556), + f = {}; + f.styleTagTransform = p(), f.setAttributes = c(), f.insert = l().bind( + null, "head"), f.domAPI = s(), f.insertStyleElement = u(), o()(m.Z, f), + m.Z && m.Z.locals && m.Z.locals; + var _ = i(5321), + b = i(5976), + v = i(6830), + w = i(1432); + class C extends b.JT { + constructor(e) { + super(), this.editor = e, this.widget = null, w.gn && (this._register( + e.onDidChangeConfiguration((() => this.update()))), this.update()) + } + update() { + const e = !this.editor.getOption(80); + !this.widget && e ? this.widget = new y(this.editor) : this.widget && + !e && (this.widget.dispose(), this.widget = null) + } + dispose() { + super.dispose(), this.widget && (this.widget.dispose(), this.widget = + null) + } + } + C.ID = "editor.contrib.iPadShowKeyboard"; + class y extends b.JT { + constructor(e) { + super(), this.editor = e, this._domNode = document.createElement( + "textarea"), this._domNode.className = "iPadShowKeyboard", this._register( + _.nm(this._domNode, "touchstart", (e => { + this.editor.focus() + }))), this._register(_.nm(this._domNode, "focus", (e => { + this.editor.focus() + }))), this.editor.addOverlayWidget(this) + } + dispose() { + this.editor.removeOverlayWidget(this), super.dispose() + } + getId() { + return y.ID + } + getDomNode() { + return this._domNode + } + getPosition() { + return { + preference: 1 + } + } + } + y.ID = "editor.contrib.ShowKeyboardWidget", (0, v._K)(C.ID, C) + }, + 154: (e, t, i) => { + "use strict"; + i.r(t); + var n = i(3379), + o = i.n(n), + r = i(7795), + s = i.n(r), + a = i(569), + l = i.n(a), + d = i(3565), + c = i.n(d), + h = i(9216), + u = i.n(h), + g = i(4589), + p = i.n(g), + m = i(5189), + f = {}; + f.styleTagTransform = p(), f.setAttributes = c(), f.insert = l().bind( + null, "head"), f.domAPI = s(), f.insertStyleElement = u(), o()(m.Z, f), + m.Z && m.Z.locals && m.Z.locals; + var _ = i(5321), + b = i(1264), + v = i(5976), + w = i(6830), + C = i(4101), + y = i(8111), + S = i(1531), + x = i(2095), + k = i(3910), + L = i(7781), + N = i(913), + D = i(2321), + E = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let I = class e extends v.JT { + constructor(e, t, i) { + super(), this._editor = e, this._modeService = i, this._widget = null, + this._register(this._editor.onDidChangeModel((e => this.stop()))), + this._register(this._editor.onDidChangeModelLanguage((e => this.stop()))), + this._register(C.RW.onDidChange((e => this.stop()))), this._register( + this._editor.onKeyUp((e => 9 === e.keyCode && this.stop()))) + } + static get(t) { + return t.getContribution(e.ID) + } + dispose() { + this.stop(), super.dispose() + } + launch() { + this._widget || this._editor.hasModel() && (this._widget = new M(this + ._editor, this._modeService)) + } + stop() { + this._widget && (this._widget.dispose(), this._widget = null) + } + }; + I.ID = "editor.contrib.inspectTokens", I = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([E(1, x.Z), E(2, S.h)], I); + class T extends w.R6 { + constructor() { + super({ + id: "editor.action.inspectTokens", + label: N.ug.inspectTokensAction, + alias: "Developer: Inspect Tokens", + precondition: void 0 + }) + } + run(e, t) { + let i = I.get(t); + i && i.launch() + } + } + class M extends v.JT { + constructor(e, t) { + var i; + super(), this.allowEditorOverflow = !0, this._editor = e, this._modeService = + t, this._model = this._editor.getModel(), this._domNode = document.createElement( + "div"), this._domNode.className = "tokens-inspect-widget", this._tokenizationSupport = + (i = this._model.getLanguageIdentifier(), C.RW.get(i.language) || { + getInitialState: () => y.nO, + tokenize: (e, t, n, o) => (0, y.Ri)(i.language, e, n, o), + tokenize2: (e, t, n, o) => (0, y.mh)(i.id, e, n, o) + }), this._compute(this._editor.getPosition()), this._register(this._editor + .onDidChangeCursorPosition((e => this._compute(this._editor.getPosition()))) + ), this._editor.addContentWidget(this) + } + dispose() { + this._editor.removeContentWidget(this), super.dispose() + } + getId() { + return M._ID + } + _compute(e) { + let t = this._getTokensAtLine(e.lineNumber), + i = 0; + for (let n = t.tokens1.length - 1; n >= 0; n--) { + let o = t.tokens1[n]; + if (e.column - 1 >= o.offset) { + i = n; + break + } + } + let n = 0; + for (let i = t.tokens2.length >>> 1; i >= 0; i--) + if (e.column - 1 >= t.tokens2[i << 1]) { + n = i; + break + } + let o = this._model.getLineContent(e.lineNumber), + r = ""; + if (i < t.tokens1.length) { + let e = t.tokens1[i].offset, + n = i + 1 < t.tokens1.length ? t.tokens1[i + 1].offset : o.length; + r = o.substring(e, n) + }(0, _.mc)(this._domNode, (0, _.$)("h2.tm-token", void 0, function(e) { + let t = ""; + for (let i = 0, n = e.length; i < n; i++) { + let n = e.charCodeAt(i); + switch (n) { + case 9: + t += "→"; + break; + case 32: + t += "·"; + break; + default: + t += String.fromCharCode(n) + } + } + return t + }(r), (0, _.$)("span.tm-token-length", void 0, + `${r.length} ${1===r.length?"char":"chars"}`))), (0, _.R3)(this._domNode, ( + 0, _.$)("hr.tokens-inspect-separator", { + style: "clear:both" + })); + const s = 1 + (n << 1) < t.tokens2.length ? this._decodeMetadata(t.tokens2[ + 1 + (n << 1)]) : null; + (0, _.R3)(this._domNode, (0, _.$)("table.tm-metadata-table", void 0, ( + 0, _.$)("tbody", void 0, (0, _.$)("tr", void 0, (0, _.$)( + "td.tm-metadata-key", void 0, "language"), (0, _.$)( + "td.tm-metadata-value", void 0, + `${s?s.languageIdentifier.language:"-?-"}`)), (0, _.$)("tr", void 0, ( + 0, _.$)("td.tm-metadata-key", void 0, "token type"), (0, _.$)( + "td.tm-metadata-value", void 0, + `${s?this._tokenTypeToString(s.tokenType):"-?-"}`)), (0, _.$)( + "tr", void 0, (0, _.$)("td.tm-metadata-key", void 0, "font style"), ( + 0, _.$)("td.tm-metadata-value", void 0, + `${s?this._fontStyleToString(s.fontStyle):"-?-"}`)), (0, _.$)( + "tr", void 0, (0, _.$)("td.tm-metadata-key", void 0, "foreground"), ( + 0, _.$)("td.tm-metadata-value", void 0, + `${s?b.Il.Format.CSS.formatHex(s.foreground):"-?-"}`)), (0, _.$) + ("tr", void 0, (0, _.$)("td.tm-metadata-key", void 0, "background"), ( + 0, _.$)("td.tm-metadata-value", void 0, + `${s?b.Il.Format.CSS.formatHex(s.background):"-?-"}`))))), (0, _.R3) + (this._domNode, (0, _.$)("hr.tokens-inspect-separator")), i < t.tokens1 + .length && (0, _.R3)(this._domNode, (0, _.$)("span.tm-token-type", + void 0, t.tokens1[i].type)), this._editor.layoutContentWidget(this) + } + _decodeMetadata(e) { + let t = C.RW.getColorMap(), + i = C.NX.getLanguageId(e), + n = C.NX.getTokenType(e), + o = C.NX.getFontStyle(e), + r = C.NX.getForeground(e), + s = C.NX.getBackground(e); + return { + languageIdentifier: this._modeService.getLanguageIdentifier(i), + tokenType: n, + fontStyle: o, + foreground: t[r], + background: t[s] + } + } + _tokenTypeToString(e) { + switch (e) { + case 0: + return "Other"; + case 1: + return "Comment"; + case 2: + return "String"; + case 4: + return "RegEx"; + default: + return "??" + } + } + _fontStyleToString(e) { + let t = ""; + return 1 & e && (t += "italic "), 2 & e && (t += "bold "), 4 & e && ( + t += "underline "), 0 === t.length && (t = "---"), t + } + _getTokensAtLine(e) { + let t = this._getStateBeforeLine(e), + i = this._tokenizationSupport.tokenize(this._model.getLineContent(e), ! + 0, t, 0), + n = this._tokenizationSupport.tokenize2(this._model.getLineContent(e), ! + 0, t, 0); + return { + startState: t, + tokens1: i.tokens, + tokens2: n.tokens, + endState: i.endState + } + } + _getStateBeforeLine(e) { + let t = this._tokenizationSupport.getInitialState(); + for (let i = 1; i < e; i++) t = this._tokenizationSupport.tokenize( + this._model.getLineContent(i), !0, t, 0).endState; + return t + } + getDomNode() { + return this._domNode + } + getPosition() { + return { + position: this._editor.getPosition(), + preference: [2, 1] + } + } + } + M._ID = "editor.contrib.inspectTokensWidget", (0, w._K)(I.ID, I), (0, w.Qr) + (T), (0, L.Ic)(((e, t) => { + const i = e.getColor(k.CN); + if (i) { + let n = e.type === D.e.HIGH_CONTRAST ? 2 : 1; + t.addRule( + `.monaco-editor .tokens-inspect-widget { border: ${n}px solid ${i}; }` + ), t.addRule( + `.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${i}; }` + ) + } + const n = e.getColor(k.yJ); + n && t.addRule( + `.monaco-editor .tokens-inspect-widget { background-color: ${n}; }` + ); + const o = e.getColor(k.Sb); + o && t.addRule( + `.monaco-editor .tokens-inspect-widget { color: ${o}; }`) + })) + }, + 7720: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + GotoLineAction: () => j, + StandaloneCommandsQuickAccessProvider: () => U + }); + var n = i(9872), + o = i(725), + r = i(913), + s = i(1640), + a = i(9488), + l = i(8401), + d = i(3580); + + function c(e, t) { + return t && (e.stack || e.stacktrace) ? d.N("stackTrace.format", + "{0}: {1}", u(e), h(e.stack) || h(e.stacktrace)) : u(e) + } + + function h(e) { + return Array.isArray(e) ? e.join("\n") : e + } + + function u(e) { + return "string" == typeof e.code && "number" == typeof e.errno && + "string" == typeof e.syscall ? d.N("nodeExceptionMessage", + "A system error occurred ({0})", e.message) : e.message || d.N( + "error.defaultMessage", + "An unknown error occurred. Please consult the log for more details.") + } + + function g(e = null, t = !1) { + if (!e) return d.N("error.defaultMessage", + "An unknown error occurred. Please consult the log for more details." + ); + if (Array.isArray(e)) { + const i = a.kX(e), + n = g(i[0], t); + return i.length > 1 ? d.N("error.moreErrors", + "{0} ({1} errors in total)", n, i.length) : n + } + if (l.HD(e)) return e; + if (e.detail) { + const i = e.detail; + if (i.error) return c(i.error, t); + if (i.exception) return c(i.exception, t) + } + return e.stack ? c(e, t) : e.message ? e.message : d.N( + "error.defaultMessage", + "An unknown error occurred. Please consult the log for more details.") + } + var p, m = i(7301), + f = i(5392), + _ = i(5976), + b = i(3702), + v = i(4603), + w = i(4565), + C = i(3108), + y = i(8820), + S = i(2065), + x = i(1847), + k = i(5393), + L = i(1050), + N = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + + function D(e) { + const t = e; + return Array.isArray(t.items) + }! function(e) { + e[e.NO_ACTION = 0] = "NO_ACTION", e[e.CLOSE_PICKER = 1] = "CLOSE_PICKER", + e[e.REFRESH_PICKER = 2] = "REFRESH_PICKER", e[e.REMOVE_ITEM = 3] = + "REMOVE_ITEM" + }(p || (p = {})); + class E extends _.JT { + constructor(e, t) { + super(), this.prefix = e, this.options = t + } + provide(e, t) { + var i; + const n = new _.SL; + let o; + e.canAcceptInBackground = !!(null === (i = this.options) || void 0 === + i ? void 0 : i.canAcceptInBackground), e.matchOnLabel = e.matchOnDescription = + e.matchOnDetail = e.sortByLabel = !1; + const r = n.add(new _.XK), + s = () => N(this, void 0, void 0, (function*() { + const i = r.value = new _.SL; + null == o || o.dispose(!0), e.busy = !1, o = new L.A(t); + const n = o.token, + s = e.value.substr(this.prefix.length).trim(), + a = this._getPicks(s, i, n), + l = (t, i) => { + var n; + let o, r; + if (D(t) ? (o = t.items, r = t.active) : o = t, 0 === o.length) { + if (i) return !1; + s.length > 0 && (null === (n = this.options) || void 0 === n ? + void 0 : n.noResultsPick) && (o = [this.options.noResultsPick]) + } + return e.items = o, r && (e.activeItems = [r]), !0 + }; + if (null === a); + else if (function(e) { + const t = e; + return !!t.picks && t.additionalPicks instanceof Promise + }(a)) { + let t = !1, + i = !1; + yield Promise.all([(() => N(this, void 0, void 0, (function*() { + yield(0, k.Vs)(E.FAST_PICKS_RACE_DELAY), n.isCancellationRequested || + i || (t = l(a.picks, !0)) + })))(), (() => N(this, void 0, void 0, (function*() { + e.busy = !0; + try { + const o = yield a.additionalPicks; + if (n.isCancellationRequested) return; + let r, s, d, c; + if (D(a.picks) ? (r = a.picks.items, s = a.picks.active) : + r = a.picks, D(o) ? (d = o.items, c = o.active) : d = o, + d.length > 0 || !t) { + let t; + if (!s && !c) { + const i = e.activeItems[0]; + i && -1 !== r.indexOf(i) && (t = i) + } + l({ + items: [...r, ...d], + active: s || c || t + }) + } + } finally { + n.isCancellationRequested || (e.busy = !1), i = !0 + } + })))()]) + } else if (a instanceof Promise) { + e.busy = !0; + try { + const t = yield a; + if (n.isCancellationRequested) return; + l(t) + } finally { + n.isCancellationRequested || (e.busy = !1) + } + } else l(a) + })); + return n.add(e.onDidChangeValue((() => s()))), s(), n.add(e.onDidAccept( + (t => { + const [i] = e.selectedItems; + "function" == typeof(null == i ? void 0 : i.accept) && (t.inBackground || + e.hide(), i.accept(e.keyMods, t)) + }))), n.add(e.onDidTriggerItemButton((({ + button: i, + item: n + }) => N(this, void 0, void 0, (function*() { + var o, r; + if ("function" == typeof n.trigger) { + const a = null !== (r = null === (o = n.buttons) || void 0 === + o ? void 0 : o.indexOf(i)) && void 0 !== r ? r : -1; + if (a >= 0) { + const i = n.trigger(a, e.keyMods), + o = "number" == typeof i ? i : yield i; + if (t.isCancellationRequested) return; + switch (o) { + case p.NO_ACTION: + break; + case p.CLOSE_PICKER: + e.hide(); + break; + case p.REFRESH_PICKER: + s(); + break; + case p.REMOVE_ITEM: + const t = e.items.indexOf(n); + if (-1 !== t) { + const i = e.items.slice(); + i.splice(t, 1), e.items = i + } + } + } + } + }))))), n + } + } + E.FAST_PICKS_RACE_DELAY = 200; + var I = i(6904), + T = i(829), + M = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + A = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + R = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + let O = class e extends E { + constructor(t, i, n, o, r, s) { + super(e.PREFIX, t), this.instantiationService = i, this.keybindingService = + n, this.commandService = o, this.telemetryService = r, this.dialogService = + s, this.commandsHistory = this._register(this.instantiationService.createInstance( + P)), this.options = t + } + _getPicks(t, i, n) { + return R(this, void 0, void 0, (function*() { + const o = yield this.getCommandPicks(i, n); + if (n.isCancellationRequested) return []; + const r = []; + for (const i of o) { + const n = (0, l.f6)(e.WORD_FILTER(t, i.label)), + o = i.commandAlias ? (0, l.f6)(e.WORD_FILTER(t, i.commandAlias)) : + void 0; + n || o ? (i.highlights = { + label: n, + detail: this.options.showAlias ? o : void 0 + }, r.push(i)) : t === i.commandId && r.push(i) + } + const s = new Map; + for (const e of r) { + const t = s.get(e.label); + t ? (e.description = e.commandId, t.description = t.commandId) : + s.set(e.label, e) + } + r.sort(((e, t) => { + const i = this.commandsHistory.peek(e.commandId), + n = this.commandsHistory.peek(t.commandId); + return i && n ? i > n ? -1 : 1 : i ? -1 : n ? 1 : e.label.localeCompare( + t.label) + })); + const a = []; + let c = !1; + for (let e = 0; e < r.length; e++) { + const t = r[e], + i = this.keybindingService.lookupKeybinding(t.commandId), + n = i ? (0, d.N)("commandPickAriaLabelWithKeybinding", + "{0}, {1}", t.label, i.getAriaLabel()) : t.label; + 0 === e && this.commandsHistory.peek(t.commandId) && (a.push({ + type: "separator", + label: (0, d.N)("recentlyUsed", "recently used") + }), c = !0), 0 !== e && c && !this.commandsHistory.peek(t.commandId) && + (a.push({ + type: "separator", + label: (0, d.N)("morecCommands", "other commands") + }), c = !1), a.push(Object.assign(Object.assign({}, t), { + ariaLabel: n, + detail: this.options.showAlias && t.commandAlias !== t.label ? + t.commandAlias : void 0, + keybinding: i, + accept: () => R(this, void 0, void 0, (function*() { + this.commandsHistory.push(t.commandId), this.telemetryService + .publicLog2("workbenchActionExecuted", { + id: t.commandId, + from: "quick open" + }); + try { + yield this.commandService.executeCommand(t.commandId) + } catch (e) { + (0, m.VV)(e) || this.dialogService.show(v.Z.Error, (0, + d.N)("canNotRun", + "Command '{0}' resulted in an error ({1})", t.label, + g(e))) + } + })) + })) + } + return a + })) + } + }; + O.PREFIX = ">", O.WORD_FILTER = (0, f.or)(f.Ji, f.KZ, f.ir), O = M([A(1, + S.TG), A(2, x.d), A(3, w.H), A(4, T.b), A(5, y.S)], O); + let P = class e extends _.JT { + constructor(e, t) { + super(), this.storageService = e, this.configurationService = t, this + .configuredCommandsHistoryLength = 0, this.updateConfiguration(), + this.load(), this.registerListeners() + } + registerListeners() { + this._register(this.configurationService.onDidChangeConfiguration((() => + this.updateConfiguration()))) + } + updateConfiguration() { + this.configuredCommandsHistoryLength = e.getConfiguredCommandHistoryLength( + this.configurationService), e.cache && e.cache.limit !== this.configuredCommandsHistoryLength && + (e.cache.limit = this.configuredCommandsHistoryLength, e.saveState( + this.storageService)) + } + load() { + const t = this.storageService.get(e.PREF_KEY_CACHE, 0); + let i; + if (t) try { + i = JSON.parse(t) + } catch (e) {} + const n = e.cache = new b.z6(this.configuredCommandsHistoryLength, 1); + if (i) { + let e; + e = i.usesLRU ? i.entries : i.entries.sort(((e, t) => e.value - t.value)), + e.forEach((e => n.set(e.key, e.value))) + } + e.counter = this.storageService.getNumber(e.PREF_KEY_COUNTER, 0, e.counter) + } + push(t) { + e.cache && (e.cache.set(t, e.counter++), e.saveState(this.storageService)) + } + peek(t) { + var i; + return null === (i = e.cache) || void 0 === i ? void 0 : i.peek(t) + } + static saveState(t) { + if (!e.cache) return; + const i = { + usesLRU: !0, + entries: [] + }; + e.cache.forEach(((e, t) => i.entries.push({ + key: t, + value: e + }))), t.store(e.PREF_KEY_CACHE, JSON.stringify(i), 0, 0), t.store(e.PREF_KEY_COUNTER, + e.counter, 0, 0) + } + static getConfiguredCommandHistoryLength(t) { + var i, n; + const o = null === (n = null === (i = t.getValue().workbench) || void 0 === + i ? void 0 : i.commandPalette) || void 0 === n ? void 0 : n.history; + return "number" == typeof o ? o : e.DEFAULT_COMMANDS_HISTORY_LENGTH + } + }; + P.DEFAULT_COMMANDS_HISTORY_LENGTH = 50, P.PREF_KEY_CACHE = + "commandPalette.mru.cache", P.PREF_KEY_COUNTER = + "commandPalette.mru.counter", P.counter = 1, P = M([A(0, I.Uy), A(1, C.Ui)], + P); + var F = i(1212); + class B extends O { + constructor(e, t, i, n, o, r) { + super(e, t, i, n, o, r) + } + getCodeEditorCommandPicks() { + const e = this.activeTextEditorControl; + if (!e) return []; + const t = []; + for (const i of e.getSupportedActions()) t.push({ + commandId: i.id, + commandAlias: i.alias, + label: (0, F.x$)(i.label) || i.id + }); + return t + } + } + var W = i(6830), + z = i(9102), + V = i(1157), + H = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let U = class extends B { + constructor(e, t, i, n, o, r) { + super({ + showAlias: !1 + }, e, i, n, o, r), this.codeEditorService = t + } + get activeTextEditorControl() { + return (0, l.f6)(this.codeEditorService.getFocusedCodeEditor()) + } + getCommandPicks() { + return e = this, t = void 0, n = function*() { + return this.getCodeEditorCommandPicks() + }, new((i = void 0) || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })); + var e, t, i, n + } + }; + U = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([H(0, S.TG), H(1, s.$), H(2, x.d), H(3, w.H), H(4, T.b), H(5, y.S)], U), + n.B.as(o.IP.Quickaccess).registerQuickAccessProvider({ + ctor: U, + prefix: U.PREFIX, + helpEntries: [{ + description: r.UX.quickCommandHelp, + needsEditor: !0 + }] + }); + class j extends W.R6 { + constructor() { + super({ + id: "editor.action.quickCommand", + label: r.UX.quickCommandActionLabel, + alias: "Command Palette", + precondition: void 0, + kbOpts: { + kbExpr: z.u.focus, + primary: 59, + weight: 100 + }, + contextMenuOpts: { + group: "z_commands", + order: 1 + } + }) + } + run(e) { + e.get(V.eJ).quickAccess.show(U.PREFIX) + } + }(0, W.Qr)(j) + }, + 2097: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + GotoLineAction: () => w, + StandaloneGotoLineQuickAccessProvider: () => _ + }); + var n = i(3580), + o = i(5976), + r = i(8275), + s = i(5520); + class a extends r.X { + constructor() { + super({ + canAcceptInBackground: !0 + }) + } + provideWithoutTextEditor(e) { + const t = (0, n.N)("cannotRunGotoLine", + "Open a text editor first to go to a line."); + return e.items = [{ + label: t + }], e.ariaLabel = t, o.JT.None + } + provideWithTextEditor(e, t, i) { + const n = e.editor, + r = new o.SL; + r.add(t.onDidAccept((i => { + const [o] = t.selectedItems; + if (o) { + if (!this.isValidLineNumber(n, o.lineNumber)) return; + this.gotoLocation(e, { + range: this.toRange(o.lineNumber, o.column), + keyMods: t.keyMods, + preserveFocus: i.inBackground + }), i.inBackground || t.hide() + } + }))); + const l = () => { + const e = this.parsePosition(n, t.value.trim().substr(a.PREFIX.length)), + i = this.getPickLabel(n, e.lineNumber, e.column); + if (t.items = [{ + lineNumber: e.lineNumber, + column: e.column, + label: i + }], t.ariaLabel = i, !this.isValidLineNumber(n, e.lineNumber)) + return void this.clearDecorations(n); + const o = this.toRange(e.lineNumber, e.column); + n.revealRangeInCenter(o, 0), this.addDecorations(n, o) + }; + l(), r.add(t.onDidChangeValue((() => l()))); + const d = (0, s.Pi)(n); + return d && 2 === d.getOptions().get(59).renderType && (d.updateOptions({ + lineNumbers: "on" + }), r.add((0, o.OF)((() => d.updateOptions({ + lineNumbers: "relative" + }))))), r + } + toRange(e = 1, t = 1) { + return { + startLineNumber: e, + startColumn: t, + endLineNumber: e, + endColumn: t + } + } + parsePosition(e, t) { + const i = t.split(/,|:|#/).map((e => parseInt(e, 10))).filter((e => ! + isNaN(e))), + n = this.lineCount(e) + 1; + return { + lineNumber: i[0] > 0 ? i[0] : n + i[0], + column: i[1] + } + } + getPickLabel(e, t, i) { + if (this.isValidLineNumber(e, t)) return this.isValidColumn(e, t, i) ? + (0, n.N)("gotoLineColumnLabel", "Go to line {0} and character {1}.", + t, i) : (0, n.N)("gotoLineLabel", "Go to line {0}.", t); + const o = e.getPosition() || { + lineNumber: 1, + column: 1 + }, + r = this.lineCount(e); + return r > 1 ? (0, n.N)("gotoLineLabelEmptyWithLimit", + "Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.", + o.lineNumber, o.column, r) : (0, n.N)("gotoLineLabelEmpty", + "Current Line: {0}, Character: {1}. Type a line number to navigate to.", + o.lineNumber, o.column) + } + isValidLineNumber(e, t) { + return !(!t || "number" != typeof t) && t > 0 && t <= this.lineCount( + e) + } + isValidColumn(e, t, i) { + if (!i || "number" != typeof i) return !1; + const n = this.getModel(e); + if (!n) return !1; + const o = { + lineNumber: t, + column: i + }; + return n.validatePosition(o).equals(o) + } + lineCount(e) { + var t, i; + return null !== (i = null === (t = this.getModel(e)) || void 0 === t ? + void 0 : t.getLineCount()) && void 0 !== i ? i : 0 + } + } + a.PREFIX = ":"; + var l = i(9872), + d = i(725), + c = i(1640), + h = i(8401), + u = i(913), + g = i(4669), + p = i(6830), + m = i(9102), + f = i(1157); + let _ = class extends a { + constructor(e) { + super(), this.editorService = e, this.onDidActiveTextEditorControlChange = + g.ju.None + } + get activeTextEditorControl() { + return (0, h.f6)(this.editorService.getFocusedCodeEditor()) + } + }; + var b, v; + _ = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(b = 0, v = c.$, function(e, t) { + v(e, t, b) + })], _), l.B.as(d.IP.Quickaccess).registerQuickAccessProvider({ + ctor: _, + prefix: _.PREFIX, + helpEntries: [{ + description: u.qq.gotoLineActionLabel, + needsEditor: !0 + }] + }); + class w extends p.R6 { + constructor() { + super({ + id: "editor.action.gotoLine", + label: u.qq.gotoLineActionLabel, + alias: "Go to Line/Column...", + precondition: void 0, + kbOpts: { + kbExpr: m.u.focus, + primary: 2085, + mac: { + primary: 293 + }, + weight: 100 + } + }) + } + run(e) { + e.get(f.eJ).quickAccess.show(_.PREFIX) + } + }(0, p.Qr)(w) + }, + 8936: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + GotoLineAction: () => W, + StandaloneGotoSymbolQuickAccessProvider: () => P + }), i(9899), i(4954); + var n = i(3580), + o = i(1050), + r = i(5976), + s = i(4314), + a = i(8275), + l = i(4101), + d = i(6895), + c = i(7295), + h = i(5392), + u = i(8721), + g = i(1432); + const p = [void 0, []]; + + function m(e, t, i = 0, n = 0) { + const o = t; + return o.values && o.values.length > 1 ? function(e, t, i, n) { + let o = 0; + const r = []; + for (const s of t) { + const [t, a] = f(e, s, i, n); + if ("number" != typeof t) return p; + o += t, r.push(...a) + } + return [o, _(r)] + }(e, o.values, i, n) : f(e, t, i, n) + } + + function f(e, t, i, n) { + const o = (0, h.EW)(t.original, t.originalLowercase, i, e, e.toLowerCase(), + n, !0); + return o ? [o[0], (0, h.mB)(o)] : p + } + + function _(e) { + const t = e.sort(((e, t) => e.start - t.start)), + i = []; + let n; + for (const e of t) !n || (r = e, (o = n).end < r.start || r.end < o.start) ? + (n = e, i.push(e)) : (n.start = Math.min(n.start, e.start), n.end = + Math.max(n.end, e.end)); + var o, r; + return i + } + + function b(e) { + return e.startsWith('"') && e.endsWith('"') + } + + function v(e) { + "string" != typeof e && (e = ""); + const t = e.toLowerCase(), + { + pathNormalized: i, + normalized: n, + normalizedLowercase: o + } = w(e), + r = i.indexOf(u.ir) >= 0, + s = b(e); + let a; + const l = e.split(" "); + if (l.length > 1) + for (const e of l) { + const t = b(e), + { + pathNormalized: i, + normalized: n, + normalizedLowercase: o + } = w(e); + n && (a || (a = []), a.push({ + original: e, + originalLowercase: e.toLowerCase(), + pathNormalized: i, + normalized: n, + normalizedLowercase: o, + expectContiguousMatch: t + })) + } + return { + original: e, + originalLowercase: t, + pathNormalized: i, + normalized: n, + normalizedLowercase: o, + values: a, + containsPathSeparator: r, + expectContiguousMatch: s + } + } + + function w(e) { + let t; + t = g.ED ? e.replace(/\//g, u.ir) : e.replace(/\\/g, u.ir); + const i = (0, c.R1)(t).replace(/\s|"/g, ""); + return { + pathNormalized: t, + normalized: i, + normalizedLowercase: i.toLowerCase() + } + } + + function C(e) { + return Array.isArray(e) ? v(e.map((e => e.original)).join(" ")) : v(e.original) + } + var y = i(3046), + S = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + class x extends a.X { + constructor(e = Object.create(null)) { + super(e), this.options = e, this.options.canAcceptInBackground = !0 + } + provideWithoutTextEditor(e) { + return this.provideLabelPick(e, (0, n.N)( + "cannotRunGotoSymbolWithoutEditor", + "To go to a symbol, first open a text editor with symbol information." + )), r.JT.None + } + provideWithTextEditor(e, t, i) { + const n = e.editor, + o = this.getModel(n); + return o ? l.vJ.has(o) ? this.doProvideWithEditorSymbols(e, o, t, i) : + this.doProvideWithoutEditorSymbols(e, o, t, i) : r.JT.None + } + doProvideWithoutEditorSymbols(e, t, i, o) { + const s = new r.SL; + return this.provideLabelPick(i, (0, n.N)( + "cannotRunGotoSymbolWithoutSymbolProvider", + "The active text editor does not provide symbol information.")), (() => { + S(this, void 0, void 0, (function*() { + (yield this.waitForLanguageSymbolRegistry(t, s)) && !o.isCancellationRequested && + s.add(this.doProvideWithEditorSymbols(e, t, i, o)) + })) + })(), s + } + provideLabelPick(e, t) { + e.items = [{ + label: t, + index: 0, + kind: 14 + }], e.ariaLabel = t + } + waitForLanguageSymbolRegistry(e, t) { + return S(this, void 0, void 0, (function*() { + if (l.vJ.has(e)) return !0; + let i; + const n = new Promise((e => i = e)), + o = t.add(l.vJ.onDidChange((() => { + l.vJ.has(e) && (o.dispose(), i(!0)) + }))); + return t.add((0, r.OF)((() => i(!1)))), n + })) + } + doProvideWithEditorSymbols(e, t, i, s) { + const a = e.editor, + l = new r.SL; + l.add(i.onDidAccept((t => { + const [n] = i.selectedItems; + n && n.range && (this.gotoLocation(e, { + range: n.range.selection, + keyMods: i.keyMods, + preserveFocus: t.inBackground + }), t.inBackground || i.hide()) + }))), l.add(i.onDidTriggerItemButton((({ + item: t + }) => { + t && t.range && (this.gotoLocation(e, { + range: t.range.selection, + keyMods: i.keyMods, + forceSideBySide: !0 + }), i.hide()) + }))); + const d = this.getDocumentSymbols(t, s); + let c; + const h = () => S(this, void 0, void 0, (function*() { + null == c || c.dispose(!0), i.busy = !1, c = new o.A(s), i.busy = ! + 0; + try { + const e = v(i.value.substr(x.PREFIX.length).trim()), + t = yield this.doGetSymbolPicks(d, e, void 0, c.token); + if (s.isCancellationRequested) return; + t.length > 0 ? i.items = t : e.original.length > 0 ? this.provideLabelPick( + i, (0, n.N)("noMatchingSymbolResults", + "No matching editor symbols")) : this.provideLabelPick(i, (0, + n.N)("noSymbolResults", "No editor symbols")) + } finally { + s.isCancellationRequested || (i.busy = !1) + } + })); + l.add(i.onDidChangeValue((() => h()))), h(); + let u = !0; + return l.add(i.onDidChangeActive((() => { + const [e] = i.activeItems; + if (e && e.range) { + if (u) return void(u = !1); + a.revealRangeInCenter(e.range.selection, 0), this.addDecorations( + a, e.range.decoration) + } + }))), l + } + doGetSymbolPicks(e, t, i, o) { + return S(this, void 0, void 0, (function*() { + const r = yield e; + if (o.isCancellationRequested) return []; + const a = 0 === t.original.indexOf(x.SCOPE_PREFIX), + d = a ? 1 : 0; + let h, u; + t.values && t.values.length > 1 ? (h = C(t.values[0]), u = C(t.values + .slice(1))) : h = t; + const g = []; + for (let e = 0; e < r.length; e++) { + const o = r[e], + a = (0, c.fy)(o.name), + p = `$(symbol-${l.uZ.toString(o.kind)||"property"}) ${a}`, + f = p.length - a.length; + let _, b, v, w, C = o.containerName; + if ((null == i ? void 0 : i.extraContainerLabel) && (C = C ? + `${i.extraContainerLabel} • ${C}` : i.extraContainerLabel), t.original + .length > d) { + let e = !1; + if (h !== t && ([_, b] = m(p, Object.assign(Object.assign({}, t), { + values: void 0 + }), d, f), "number" == typeof _ && (e = !0)), "number" != + typeof _ && ([_, b] = m(p, h, d, f), "number" != typeof _)) + continue; + if (!e && u) { + if (C && u.original.length > 0 && ([v, w] = m(C, u)), "number" != + typeof v) continue; + "number" == typeof _ && (_ += v) + } + } + const S = o.tags && o.tags.indexOf(1) >= 0; + g.push({ + index: e, + kind: o.kind, + score: _, + label: p, + ariaLabel: a, + description: C, + highlights: S ? void 0 : { + label: b, + description: w + }, + range: { + selection: s.e.collapseToStart(o.selectionRange), + decoration: o.range + }, + strikethrough: S, + buttons: (() => { + var e, t; + const i = (null === (e = this.options) || void 0 === e ? + void 0 : e.openSideBySideDirection) ? null === (t = this + .options) || void 0 === t ? void 0 : t.openSideBySideDirection() : + void 0; + if (i) return [{ + iconClass: "right" === i ? y.lA.splitHorizontal.classNames : y + .lA.splitVertical.classNames, + tooltip: "right" === i ? (0, n.N)("openToSide", + "Open to the Side") : (0, n.N)("openToBottom", + "Open to the Bottom") + }] + })() + }) + } + const p = g.sort(((e, t) => a ? this.compareByKindAndScore(e, t) : + this.compareByScore(e, t))); + let f = []; + if (a) { + let e, t, i = 0; + + function n() { + t && "number" == typeof e && i > 0 && (t.label = (0, c.WU)(L[e] || + k, i)) + } + for (const o of p) e !== o.kind ? (n(), e = o.kind, i = 1, t = { + type: "separator" + }, f.push(t)) : i++, f.push(o); + n() + } else p.length > 0 && (f = [{ + label: (0, n.N)("symbols", "symbols ({0})", g.length), + type: "separator" + }, ...p]); + return f + })) + } + compareByScore(e, t) { + if ("number" != typeof e.score && "number" == typeof t.score) return 1; + if ("number" == typeof e.score && "number" != typeof t.score) return - + 1; + if ("number" == typeof e.score && "number" == typeof t.score) { + if (e.score > t.score) return -1; + if (e.score < t.score) return 1 + } + return e.index < t.index ? -1 : e.index > t.index ? 1 : 0 + } + compareByKindAndScore(e, t) { + const i = L[e.kind] || k, + n = L[t.kind] || k, + o = i.localeCompare(n); + return 0 === o ? this.compareByScore(e, t) : o + } + getDocumentSymbols(e, t) { + return S(this, void 0, void 0, (function*() { + const i = yield d.C3.create(e, t); + return t.isCancellationRequested ? [] : i.asListOfDocumentSymbols() + })) + } + } + x.PREFIX = "@", x.SCOPE_PREFIX = ":", x.PREFIX_BY_CATEGORY = + `${x.PREFIX}${x.SCOPE_PREFIX}`; + const k = (0, n.N)("property", "properties ({0})"), + L = { + 5: (0, n.N)("method", "methods ({0})"), + 11: (0, n.N)("function", "functions ({0})"), + 8: (0, n.N)("_constructor", "constructors ({0})"), + 12: (0, n.N)("variable", "variables ({0})"), + 4: (0, n.N)("class", "classes ({0})"), + 22: (0, n.N)("struct", "structs ({0})"), + 23: (0, n.N)("event", "events ({0})"), + 24: (0, n.N)("operator", "operators ({0})"), + 10: (0, n.N)("interface", "interfaces ({0})"), + 2: (0, n.N)("namespace", "namespaces ({0})"), + 3: (0, n.N)("package", "packages ({0})"), + 25: (0, n.N)("typeParameter", "type parameters ({0})"), + 1: (0, n.N)("modules", "modules ({0})"), + 6: (0, n.N)("property", "properties ({0})"), + 9: (0, n.N)("enum", "enumerations ({0})"), + 21: (0, n.N)("enumMember", "enumeration members ({0})"), + 14: (0, n.N)("string", "strings ({0})"), + 0: (0, n.N)("file", "files ({0})"), + 17: (0, n.N)("array", "arrays ({0})"), + 15: (0, n.N)("number", "numbers ({0})"), + 16: (0, n.N)("boolean", "booleans ({0})"), + 18: (0, n.N)("object", "objects ({0})"), + 19: (0, n.N)("key", "keys ({0})"), + 7: (0, n.N)("field", "fields ({0})"), + 13: (0, n.N)("constant", "constants ({0})") + }; + var N = i(9872), + D = i(725), + E = i(1640), + I = i(8401), + T = i(913), + M = i(4669), + A = i(6830), + R = i(9102), + O = i(1157); + let P = class extends x { + constructor(e) { + super(), this.editorService = e, this.onDidActiveTextEditorControlChange = + M.ju.None + } + get activeTextEditorControl() { + return (0, I.f6)(this.editorService.getFocusedCodeEditor()) + } + }; + var F, B; + P = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(F = 0, B = E.$, function(e, t) { + B(e, t, F) + })], P), N.B.as(D.IP.Quickaccess).registerQuickAccessProvider({ + ctor: P, + prefix: x.PREFIX, + helpEntries: [{ + description: T.aq.quickOutlineActionLabel, + prefix: x.PREFIX, + needsEditor: !0 + }, { + description: T.aq.quickOutlineByCategoryActionLabel, + prefix: x.PREFIX_BY_CATEGORY, + needsEditor: !0 + }] + }); + class W extends A.R6 { + constructor() { + super({ + id: "editor.action.quickOutline", + label: T.aq.quickOutlineActionLabel, + alias: "Go to Symbol...", + precondition: R.u.hasDocumentSymbolProvider, + kbOpts: { + kbExpr: R.u.focus, + primary: 3117, + weight: 100 + }, + contextMenuOpts: { + group: "navigation", + order: 3 + } + }) + } + run(e) { + e.get(O.eJ).quickAccess.show(x.PREFIX) + } + }(0, A.Qr)(W) + }, + 8944: (e, t, i) => { + "use strict"; + i.r(t); + var n = i(9872), + o = i(725), + r = i(913), + s = i(5976), + a = i(3580), + l = i(1157); + let d = class e { + constructor(e) { + this.quickInputService = e, this.registry = n.B.as(o.IP.Quickaccess) + } + provide(t) { + const i = new s.SL; + i.add(t.onDidAccept((() => { + const [e] = t.selectedItems; + e && this.quickInputService.quickAccess.show(e.prefix, { + preserveValue: !0 + }) + }))), i.add(t.onDidChangeValue((t => { + const i = this.registry.getQuickAccessProvider(t.substr(e.PREFIX + .length)); + i && i.prefix && i.prefix !== e.PREFIX && this.quickInputService + .quickAccess.show(i.prefix, { + preserveValue: !0 + }) + }))); + const { + editorProviders: n, + globalProviders: o + } = this.getQuickAccessProviders(); + return t.items = 0 === n.length || 0 === o.length ? [...0 === n.length ? + o : n + ] : [{ + label: (0, a.N)("globalCommands", "global commands"), + type: "separator" + }, ...o, { + label: (0, a.N)("editorCommands", "editor commands"), + type: "separator" + }, ...n], i + } + getQuickAccessProviders() { + const t = [], + i = []; + for (const n of this.registry.getQuickAccessProviders().sort(((e, t) => + e.prefix.localeCompare(t.prefix)))) + if (n.prefix !== e.PREFIX) + for (const e of n.helpEntries) { + const o = e.prefix || n.prefix, + r = o || "…"; + (e.needsEditor ? i : t).push({ + prefix: o, + label: r, + ariaLabel: (0, a.N)("helpPickAriaLabel", "{0}, {1}", r, e.description), + description: e.description + }) + } + return { + editorProviders: i, + globalProviders: t + } + } + }; + var c, h; + d.PREFIX = "?", d = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([(c = 0, h = l.eJ, function(e, t) { + h(e, t, c) + })], d), n.B.as(o.IP.Quickaccess).registerQuickAccessProvider({ + ctor: d, + prefix: "", + helpEntries: [{ + description: r.ld.helpQuickAccessActionLabel, + needsEditor: !0 + }] + }) + }, + 5048: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + StandaloneReferencesController: () => u + }); + var n = i(6830), + o = i(1640), + r = i(2406), + s = i(3108), + a = i(8819), + l = i(2065), + d = i(9422), + c = i(6904), + h = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + let u = class extends r.J { + constructor(e, t, i, n, o, r, s) { + super(!0, e, t, i, n, o, r, s) + } + }; + u = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([h(1, a.i6), h(2, o.$), h(3, d.lT), h(4, l.TG), h(5, c.Uy), h(6, s.Ui)], + u), (0, n._K)(r.J.ID, u) + }, + 5662: (e, t, i) => { + "use strict"; + i.r(t); + var n = i(6830), + o = i(2095), + r = i(913); + class s extends n.R6 { + constructor() { + super({ + id: "editor.action.toggleHighContrast", + label: r.xi.toggleHighContrast, + alias: "Toggle High Contrast Theme", + precondition: void 0 + }), this._originalThemeName = null + } + run(e, t) { + const i = e.get(o.Z); + this._originalThemeName ? (i.setTheme(this._originalThemeName), this._originalThemeName = + null) : (this._originalThemeName = i.getColorTheme().themeName, i.setTheme( + "hc-black")) + } + }(0, n.Qr)(s) + }, + 2095: (e, t, i) => { + "use strict"; + i.d(t, { + Z: () => n + }); + const n = (0, i(2065).yh)("themeService") + }, + 1460: (e, t, i) => { + "use strict"; + i.d(t, { + Q5: () => n.Emitter, + ZL: () => n.MarkerSeverity, + e6: () => n.Range, + Sf: () => n.Uri, + j6: () => n.editor, + Mj: () => n.languages + }); + var n = i(158) + }, + 605: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + cssDefaults: () => a, + scssDefaults: () => l, + lessDefaults: () => d + }), i(158); + var n = i(1460), + o = function() { + function e(e, t, i) { + this._onDidChange = new n.Q5, this._languageId = e, this.setOptions(t), + this.setModeConfiguration(i) + } + return Object.defineProperty(e.prototype, "onDidChange", { + get: function() { + return this._onDidChange.event + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "languageId", { + get: function() { + return this._languageId + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "modeConfiguration", { + get: function() { + return this._modeConfiguration + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "diagnosticsOptions", { + get: function() { + return this.options + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "options", { + get: function() { + return this._options + }, + enumerable: !1, + configurable: !0 + }), e.prototype.setOptions = function(e) { + this._options = e || Object.create(null), this._onDidChange.fire(this) + }, e.prototype.setDiagnosticsOptions = function(e) { + this.setOptions(e) + }, e.prototype.setModeConfiguration = function(e) { + this._modeConfiguration = e || Object.create(null), this._onDidChange + .fire(this) + }, e + }(), + r = { + validate: !0, + lint: { + compatibleVendorPrefixes: "ignore", + vendorPrefix: "warning", + duplicateProperties: "warning", + emptyRules: "warning", + importStatement: "ignore", + boxModel: "ignore", + universalSelector: "ignore", + zeroUnits: "ignore", + fontFaceProperties: "warning", + hexColorLength: "error", + argumentsInColorFunction: "error", + unknownProperties: "warning", + ieHack: "ignore", + unknownVendorSpecificProperties: "ignore", + propertyIgnoredDueToDisplay: "warning", + important: "ignore", + float: "ignore", + idSelector: "ignore" + }, + data: { + useDefaultDataProvider: !0 + } + }, + s = { + completionItems: !0, + hovers: !0, + documentSymbols: !0, + definitions: !0, + references: !0, + documentHighlights: !0, + rename: !0, + colors: !0, + foldingRanges: !0, + diagnostics: !0, + selectionRanges: !0 + }, + a = new o("css", r, s), + l = new o("scss", r, s), + d = new o("less", r, s); + + function c() { + return i.e(403).then(i.bind(i, 2403)) + } + n.Mj.css = { + cssDefaults: a, + lessDefaults: d, + scssDefaults: l + }, n.Mj.onLanguage("less", (function() { + c().then((function(e) { + return e.setupMode(d) + })) + })), n.Mj.onLanguage("scss", (function() { + c().then((function(e) { + return e.setupMode(l) + })) + })), n.Mj.onLanguage("css", (function() { + c().then((function(e) { + return e.setupMode(a) + })) + })) + }, + 7650: (e, t, i) => { + "use strict"; + i.d(t, { + Q5: () => n.Emitter, + e6: () => n.Range, + Sf: () => n.Uri, + j6: () => n.editor, + Mj: () => n.languages + }); + var n = i(158) + }, + 8423: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + htmlLanguageService: () => c, + htmlDefaults: () => h, + handlebarLanguageService: () => u, + handlebarDefaults: () => g, + razorLanguageService: () => p, + razorDefaults: () => m, + registerHTMLLanguageService: () => f + }), i(158); + var n = i(7650), + o = function() { + function e(e, t, i) { + this._onDidChange = new n.Q5, this._languageId = e, this.setOptions(t), + this.setModeConfiguration(i) + } + return Object.defineProperty(e.prototype, "onDidChange", { + get: function() { + return this._onDidChange.event + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "languageId", { + get: function() { + return this._languageId + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "options", { + get: function() { + return this._options + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "modeConfiguration", { + get: function() { + return this._modeConfiguration + }, + enumerable: !1, + configurable: !0 + }), e.prototype.setOptions = function(e) { + this._options = e || Object.create(null), this._onDidChange.fire(this) + }, e.prototype.setModeConfiguration = function(e) { + this._modeConfiguration = e || Object.create(null), this._onDidChange + .fire(this) + }, e + }(), + r = { + format: { + tabSize: 4, + insertSpaces: !1, + wrapLineLength: 120, + unformatted: 'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var', + contentUnformatted: "pre", + indentInnerHtml: !1, + preserveNewLines: !0, + maxPreserveNewLines: null, + indentHandlebars: !1, + endWithNewline: !1, + extraLiners: "head, body, /html", + wrapAttributes: "auto" + }, + suggest: {}, + data: { + useDefaultDataProvider: !0 + } + }; + + function s(e) { + return { + completionItems: !0, + hovers: !0, + documentSymbols: !0, + links: !0, + documentHighlights: !0, + rename: !0, + colors: !0, + foldingRanges: !0, + selectionRanges: !0, + diagnostics: e === a, + documentFormattingEdits: e === a, + documentRangeFormattingEdits: e === a + } + } + var a = "html", + l = "handlebars", + d = "razor", + c = f(a, r, s(a)), + h = c.defaults, + u = f(l, r, s(l)), + g = u.defaults, + p = f(d, r, s(d)), + m = p.defaults; + + function f(e, t, a) { + var l = this; + void 0 === t && (t = r), void 0 === a && (a = s(e)); + var d, c = new o(e, t, a), + h = n.Mj.onLanguage(e, (function() { + return e = l, t = void 0, o = function() { + return function(e, t) { + var i, n, o, r, s = { + label: 0, + sent: function() { + if (1 & o[0]) throw o[1]; + return o[1] + }, + trys: [], + ops: [] + }; + return r = { + next: a(0), + throw: a(1), + return: a(2) + }, "function" == typeof Symbol && (r[Symbol.iterator] = + function() { + return this + }), r; + + function a(r) { + return function(a) { + return function(r) { + if (i) throw new TypeError( + "Generator is already executing."); + for (; s;) try { + if (i = 1, n && (o = 2 & r[0] ? n.return : r[0] ? n.throw || + ((o = n.return) && o.call(n), 0) : n.next) && !(o = o.call( + n, r[1])).done) return o; + switch (n = 0, o && (r = [2 & r[0], o.value]), r[0]) { + case 0: + case 1: + o = r; + break; + case 4: + return s.label++, { + value: r[1], + done: !1 + }; + case 5: + s.label++, n = r[1], r = [0]; + continue; + case 7: + r = s.ops.pop(), s.trys.pop(); + continue; + default: + if (!((o = (o = s.trys).length > 0 && o[o.length - 1]) || + 6 !== r[0] && 2 !== r[0])) { + s = 0; + continue + } + if (3 === r[0] && (!o || r[1] > o[0] && r[1] < o[3])) { + s.label = r[1]; + break + } + if (6 === r[0] && s.label < o[1]) { + s.label = o[1], o = r; + break + } + if (o && s.label < o[2]) { + s.label = o[2], s.ops.push(r); + break + } + o[2] && s.ops.pop(), s.trys.pop(); + continue + } + r = t.call(e, s) + } catch (e) { + r = [6, e], n = 0 + } finally { + i = o = 0 + } + if (5 & r[0]) throw r[1]; + return { + value: r[0] ? r[1] : void 0, + done: !0 + } + }([r, a]) + } + } + }(this, (function(e) { + switch (e.label) { + case 0: + return [4, i.e(706).then(i.bind(i, 6706))]; + case 1: + return d = e.sent().setupMode(c), [2] + } + })) + }, new((n = void 0) || (n = Promise))((function(i, r) { + function s(e) { + try { + l(o.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(o.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? i(e.value) : (t = e.value, t instanceof n ? t : new n( + (function(e) { + e(t) + }))).then(s, a) + } + l((o = o.apply(e, t || [])).next()) + })); + var e, t, n, o + })); + return { + defaults: c, + dispose: function() { + h.dispose(), null == d || d.dispose(), d = void 0 + } + } + } + n.Mj.html = { + htmlDefaults: h, + razorDefaults: m, + handlebarDefaults: g, + htmlLanguageService: c, + handlebarLanguageService: u, + razorLanguageService: p, + registerHTMLLanguageService: f + } + }, + 1174: (e, t, i) => { + "use strict"; + i.d(t, { + Q5: () => n.Emitter, + ZL: () => n.MarkerSeverity, + e6: () => n.Range, + j6: () => n.editor, + Mj: () => n.languages + }); + var n = i(158) + }, + 2323: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + jsonDefaults: () => o + }), i(158); + var n = i(1174), + o = new(function() { + function e(e, t, i) { + this._onDidChange = new n.Q5, this._languageId = e, this.setDiagnosticsOptions( + t), this.setModeConfiguration(i) + } + return Object.defineProperty(e.prototype, "onDidChange", { + get: function() { + return this._onDidChange.event + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "languageId", { + get: function() { + return this._languageId + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "modeConfiguration", { + get: function() { + return this._modeConfiguration + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "diagnosticsOptions", { + get: function() { + return this._diagnosticsOptions + }, + enumerable: !1, + configurable: !0 + }), e.prototype.setDiagnosticsOptions = function(e) { + this._diagnosticsOptions = e || Object.create(null), this._onDidChange + .fire(this) + }, e.prototype.setModeConfiguration = function(e) { + this._modeConfiguration = e || Object.create(null), this._onDidChange + .fire(this) + }, e + }())("json", { + validate: !0, + allowComments: !0, + schemas: [], + enableSchemaRequest: !1, + schemaRequest: "warning", + schemaValidation: "warning", + comments: "error", + trailingCommas: "error" + }, { + documentFormattingEdits: !0, + documentRangeFormattingEdits: !0, + completionItems: !0, + hovers: !0, + documentSymbols: !0, + tokens: !0, + colors: !0, + foldingRanges: !0, + diagnostics: !0, + selectionRanges: !0 + }); + n.Mj.json = { + jsonDefaults: o + }, n.Mj.register({ + id: "json", + extensions: [".json", ".bowerrc", ".jshintrc", ".jscsrc", ".eslintrc", + ".babelrc", ".har" + ], + aliases: ["JSON", "json"], + mimetypes: ["application/json"] + }), n.Mj.onLanguage("json", (function() { + i.e(99).then(i.bind(i, 1099)).then((function(e) { + return e.setupMode(o) + })) + })) + }, + 1429: (e, t, i) => { + "use strict"; + i.d(t, { + Q5: () => n.Emitter, + ZL: () => n.MarkerSeverity, + eB: () => n.MarkerTag, + e6: () => n.Range, + Sf: () => n.Uri, + j6: () => n.editor, + Mj: () => n.languages + }); + var n = i(158) + }, + 8828: (e, t, i) => { + "use strict"; + i.r(t), i.d(t, { + JsxEmit: () => o, + ModuleKind: () => n, + ModuleResolutionKind: () => a, + NewLineKind: () => r, + ScriptTarget: () => s, + getJavaScriptWorker: () => p, + getTypeScriptWorker: () => g, + javascriptDefaults: () => u, + typescriptDefaults: () => h, + typescriptVersion: () => c + }), i(158); + var n, o, r, s, a, l = i(1429); + ! function(e) { + e[e.None = 0] = "None", e[e.CommonJS = 1] = "CommonJS", e[e.AMD = 2] = + "AMD", e[e.UMD = 3] = "UMD", e[e.System = 4] = "System", e[e.ES2015 = 5] = + "ES2015", e[e.ESNext = 99] = "ESNext" + }(n || (n = {})), + function(e) { + e[e.None = 0] = "None", e[e.Preserve = 1] = "Preserve", e[e.React = 2] = + "React", e[e.ReactNative = 3] = "ReactNative", e[e.ReactJSX = 4] = + "ReactJSX", e[e.ReactJSXDev = 5] = "ReactJSXDev" + }(o || (o = {})), + function(e) { + e[e.CarriageReturnLineFeed = 0] = "CarriageReturnLineFeed", e[e.LineFeed = + 1] = "LineFeed" + }(r || (r = {})), + function(e) { + e[e.ES3 = 0] = "ES3", e[e.ES5 = 1] = "ES5", e[e.ES2015 = 2] = "ES2015", + e[e.ES2016 = 3] = "ES2016", e[e.ES2017 = 4] = "ES2017", e[e.ES2018 = 5] = + "ES2018", e[e.ES2019 = 6] = "ES2019", e[e.ES2020 = 7] = "ES2020", e[e.ESNext = + 99] = "ESNext", e[e.JSON = 100] = "JSON", e[e.Latest = 99] = "Latest" + }(s || (s = {})), + function(e) { + e[e.Classic = 1] = "Classic", e[e.NodeJs = 2] = "NodeJs" + }(a || (a = {})); + var d = function() { + function e(e, t, i, n) { + this._onDidChange = new l.Q5, this._onDidExtraLibsChange = new l.Q5, + this._extraLibs = Object.create(null), this._removedExtraLibs = + Object.create(null), this._eagerModelSync = !1, this.setCompilerOptions( + e), this.setDiagnosticsOptions(t), this.setWorkerOptions(i), this.setInlayHintsOptions( + n), this._onDidExtraLibsChangeTimeout = -1 + } + return Object.defineProperty(e.prototype, "onDidChange", { + get: function() { + return this._onDidChange.event + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "onDidExtraLibsChange", { + get: function() { + return this._onDidExtraLibsChange.event + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "workerOptions", { + get: function() { + return this._workerOptions + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "inlayHintsOptions", { + get: function() { + return this._inlayHintsOptions + }, + enumerable: !1, + configurable: !0 + }), e.prototype.getExtraLibs = function() { + return this._extraLibs + }, e.prototype.addExtraLib = function(e, t) { + var i, n = this; + if (i = void 0 === t ? "ts:extralib-" + Math.random().toString(36).substring( + 2, 15) : t, this._extraLibs[i] && this._extraLibs[i].content === e) + return { + dispose: function() {} + }; + var o = 1; + return this._removedExtraLibs[i] && (o = this._removedExtraLibs[i] + + 1), this._extraLibs[i] && (o = this._extraLibs[i].version + 1), + this._extraLibs[i] = { + content: e, + version: o + }, this._fireOnDidExtraLibsChangeSoon(), { + dispose: function() { + var e = n._extraLibs[i]; + e && e.version === o && (delete n._extraLibs[i], n._removedExtraLibs[ + i] = o, n._fireOnDidExtraLibsChangeSoon()) + } + } + }, e.prototype.setExtraLibs = function(e) { + for (var t in this._extraLibs) this._removedExtraLibs[t] = this._extraLibs[ + t].version; + if (this._extraLibs = Object.create(null), e && e.length > 0) + for (var i = 0, n = e; i < n.length; i++) { + var o = n[i], + r = (t = o.filePath || "ts:extralib-" + Math.random().toString(36) + .substring(2, 15), o.content), + s = 1; + this._removedExtraLibs[t] && (s = this._removedExtraLibs[t] + 1), + this._extraLibs[t] = { + content: r, + version: s + } + } + this._fireOnDidExtraLibsChangeSoon() + }, e.prototype._fireOnDidExtraLibsChangeSoon = function() { + var e = this; - 1 === this._onDidExtraLibsChangeTimeout && (this._onDidExtraLibsChangeTimeout = + setTimeout((function() { + e._onDidExtraLibsChangeTimeout = -1, e._onDidExtraLibsChange.fire( + void 0) + }), 0)) + }, e.prototype.getCompilerOptions = function() { + return this._compilerOptions + }, e.prototype.setCompilerOptions = function(e) { + this._compilerOptions = e || Object.create(null), this._onDidChange.fire( + void 0) + }, e.prototype.getDiagnosticsOptions = function() { + return this._diagnosticsOptions + }, e.prototype.setDiagnosticsOptions = function(e) { + this._diagnosticsOptions = e || Object.create(null), this._onDidChange + .fire(void 0) + }, e.prototype.setWorkerOptions = function(e) { + this._workerOptions = e || Object.create(null), this._onDidChange.fire( + void 0) + }, e.prototype.setInlayHintsOptions = function(e) { + this._inlayHintsOptions = e || Object.create(null), this._onDidChange + .fire(void 0) + }, e.prototype.setMaximumWorkerIdleTime = function(e) {}, e.prototype.setEagerModelSync = + function(e) { + this._eagerModelSync = e + }, e.prototype.getEagerModelSync = function() { + return this._eagerModelSync + }, e + }(), + c = "4.4.2", + h = new d({ + allowNonTsExtensions: !0, + target: s.Latest + }, { + noSemanticValidation: !1, + noSyntaxValidation: !1, + onlyVisible: !1 + }, {}, {}), + u = new d({ + allowNonTsExtensions: !0, + allowJs: !0, + target: s.Latest + }, { + noSemanticValidation: !0, + noSyntaxValidation: !1, + onlyVisible: !1 + }, {}, {}), + g = function() { + return m().then((function(e) { + return e.getTypeScriptWorker() + })) + }, + p = function() { + return m().then((function(e) { + return e.getJavaScriptWorker() + })) + }; + + function m() { + return i.e(183).then(i.bind(i, 8183)) + } + l.Mj.typescript = { + ModuleKind: n, + JsxEmit: o, + NewLineKind: r, + ScriptTarget: s, + ModuleResolutionKind: a, + typescriptVersion: c, + typescriptDefaults: h, + javascriptDefaults: u, + getTypeScriptWorker: g, + getJavaScriptWorker: p + }, l.Mj.onLanguage("typescript", (function() { + return m().then((function(e) { + return e.setupTypeScript(h) + })) + })), l.Mj.onLanguage("javascript", (function() { + return m().then((function(e) { + return e.setupJavaScript(u) + })) + })) + }, + 3580: (e, t, i) => { + "use strict"; + + function n(e, t, ...i) { + return function(e, t) { + let i; + return i = 0 === t.length ? e : e.replace(/\{(\d+)\}/g, (function(e, i) { + const n = i[0]; + return void 0 !== t[n] ? t[n] : e + })), i + }(t, i) + } + i.d(t, { + N: () => n + }) + }, + 1106: (e, t, i) => { + "use strict"; + i.d(t, { + F: () => o, + U: () => r + }); + var n = i(8819); + const o = (0, i(2065).yh)("accessibilityService"), + r = new n.uy("accessibilityModeEnabled", !1) + }, + 1133: (e, t, i) => { + "use strict"; + i.d(t, { + Mm: () => j, + Id: () => q, + vr: () => U + }); + var n = i(5321), + o = i(9069), + r = i(6033), + s = i(553), + a = i(4741), + l = i(4669), + d = i(3379), + c = i.n(d), + h = i(7795), + u = i.n(h), + g = i(569), + p = i.n(g), + m = i(3565), + f = i.n(m), + _ = i(9216), + b = i.n(_), + v = i(4589), + w = i.n(v), + C = i(5035), + y = {}; + y.styleTagTransform = w(), y.setAttributes = f(), y.insert = p().bind( + null, "head"), y.domAPI = u(), y.insertStyleElement = b(), c()(C.Z, y), + C.Z && C.Z.locals && C.Z.locals; + class S extends a.Wi { + constructor(e, t) { + super(), this._onDidChangeVisibility = new l.Q5, this.onDidChangeVisibility = + this._onDidChangeVisibility.event, this._element = (0, n.R3)(e, (0, + n.$)(".monaco-dropdown")), this._label = (0, n.R3)(this._element, ( + 0, n.$)(".dropdown-label")); + let i = t.labelRenderer; + i || (i = e => (e.textContent = t.label || "", null)); + for (const e of[n.tw.CLICK, n.tw.MOUSE_DOWN, s.t.Tap]) this._register( + (0, n.nm)(this.element, e, (e => n.zB.stop(e, !0)))); + for (const e of[n.tw.MOUSE_DOWN, s.t.Tap]) this._register((0, n.nm)( + this._label, e, (e => { + e instanceof MouseEvent && e.detail > 1 || (this.visible ? this.hide() : + this.show()) + }))); + this._register((0, n.nm)(this._label, n.tw.KEY_UP, (e => { + const t = new o.y(e); + (t.equals(3) || t.equals(10)) && (n.zB.stop(e, !0), this.visible ? + this.hide() : this.show()) + }))); + const r = i(this._label); + r && this._register(r), this._register(s.o.addTarget(this._label)) + } + get element() { + return this._element + } + show() { + this.visible || (this.visible = !0, this._onDidChangeVisibility.fire(! + 0)) + } + hide() { + this.visible && (this.visible = !1, this._onDidChangeVisibility.fire(! + 1)) + } + dispose() { + super.dispose(), this.hide(), this.boxContainer && (this.boxContainer + .remove(), this.boxContainer = void 0), this.contents && (this.contents + .remove(), this.contents = void 0), this._label && (this._label.remove(), + this._label = void 0) + } + } + class x extends S { + constructor(e, t) { + super(e, t), this._actions = [], this._contextMenuProvider = t.contextMenuProvider, + this.actions = t.actions || [], this.actionProvider = t.actionProvider, + this.menuClassName = t.menuClassName || "", this.menuAsChild = !!t.menuAsChild + } + set menuOptions(e) { + this._menuOptions = e + } + get menuOptions() { + return this._menuOptions + } + get actions() { + return this.actionProvider ? this.actionProvider.getActions() : this._actions + } + set actions(e) { + this._actions = e + } + show() { + super.show(), this.element.classList.add("active"), this._contextMenuProvider + .showContextMenu({ + getAnchor: () => this.element, + getActions: () => this.actions, + getActionsContext: () => this.menuOptions ? this.menuOptions.context : null, + getActionViewItem: e => this.menuOptions && this.menuOptions.actionViewItemProvider ? + this.menuOptions.actionViewItemProvider(e) : void 0, + getKeyBinding: e => this.menuOptions && this.menuOptions.getKeyBinding ? + this.menuOptions.getKeyBinding(e) : void 0, + getMenuClassName: () => this.menuClassName, + onHide: () => this.onHide(), + actionRunner: this.menuOptions ? this.menuOptions.actionRunner : void 0, + anchorAlignment: this.menuOptions ? this.menuOptions.anchorAlignment : 0, + domForShadowRoot: this.menuAsChild ? this.element : void 0 + }) + } + hide() { + super.hide() + } + onHide() { + this.hide(), this.element.classList.remove("active") + } + } + class k extends r.Y { + constructor(e, t, i, n = Object.create(null)) { + super(null, e, n), this.actionItem = null, this._onDidChangeVisibility = + this._register(new l.Q5), this.menuActionsOrProvider = t, this.contextMenuProvider = + i, this.options = n, this.options.actionRunner && (this.actionRunner = + this.options.actionRunner) + } + render(e) { + this.actionItem = e; + const t = Array.isArray(this.menuActionsOrProvider), + i = { + contextMenuProvider: this.contextMenuProvider, + labelRenderer: e => { + this.element = (0, n.R3)(e, (0, n.$)("a.action-label")); + let t = []; + return "string" == typeof this.options.classNames ? t = this.options + .classNames.split(/\s+/g).filter((e => !!e)) : this.options.classNames && + (t = this.options.classNames), t.find((e => "icon" === e)) || t.push( + "codicon"), this.element.classList.add(...t), this.element.setAttribute( + "role", "button"), this.element.setAttribute("aria-haspopup", + "true"), this.element.setAttribute("aria-expanded", "false"), + this.element.title = this._action.label || "", null + }, + menuAsChild: this.options.menuAsChild, + actions: t ? this.menuActionsOrProvider : void 0, + actionProvider: t ? void 0 : this.menuActionsOrProvider + }; + if (this.dropdownMenu = this._register(new x(e, i)), this._register( + this.dropdownMenu.onDidChangeVisibility((e => { + var t; + null === (t = this.element) || void 0 === t || t.setAttribute( + "aria-expanded", `${e}`), this._onDidChangeVisibility.fire(e) + }))), this.dropdownMenu.menuOptions = { + actionViewItemProvider: this.options.actionViewItemProvider, + actionRunner: this.actionRunner, + getKeyBinding: this.options.keybindingProvider, + context: this._context + }, this.options.anchorAlignmentProvider) { + const e = this; + this.dropdownMenu.menuOptions = Object.assign(Object.assign({}, this + .dropdownMenu.menuOptions), {get anchorAlignment() { + return e.options.anchorAlignmentProvider() + } + }) + } + this.updateEnabled() + } + setActionContext(e) { + super.setActionContext(e), this.dropdownMenu && (this.dropdownMenu.menuOptions ? + this.dropdownMenu.menuOptions.context = e : this.dropdownMenu.menuOptions = { + context: e + }) + } + updateEnabled() { + var e, t; + const i = !this.getAction().enabled; + null === (e = this.actionItem) || void 0 === e || e.classList.toggle( + "disabled", i), null === (t = this.element) || void 0 === t || t.classList + .toggle("disabled", i) + } + } + var L = i(8030), + N = i(5976), + D = i(1432), + E = i(1854), + I = {}; + I.styleTagTransform = w(), I.setAttributes = f(), I.insert = p().bind( + null, "head"), I.domAPI = u(), I.insertStyleElement = b(), c()(E.Z, I), + E.Z && E.Z.locals && E.Z.locals; + var T = i(3580), + M = i(4144), + A = i(8819), + R = i(5606), + O = i(2065), + P = i(1847), + F = i(9422), + B = i(6904), + W = i(7781), + z = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + V = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }, + H = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + + function U(e, t, i, n, o, r, s) { + const l = e.getActions(t); + return function(e, t, i, n = (e => "navigation" === e), o = Number.MAX_SAFE_INTEGER, + r = (() => !1), s = !1) { + let l, d; + Array.isArray(t) ? (l = t, d = t) : (l = t.primary, d = t.secondary); + const c = new Set; + for (const [t, o] of e) { + let e; + n(t) ? (e = l, e.length > 0 && s && e.push(new a.Z0)) : (e = d, e.length > + 0 && e.push(new a.Z0)); + for (let n of o) { + i && (n = n instanceof M.U8 && n.alt ? n.alt : n); + const o = e.push(n); + n instanceof a.wY && c.add({ + group: t, + action: n, + index: o - 1 + }) + } + } + for (const { + group: e, + action: t, + index: i + } + of c) { + const s = n(e) ? l : d, + a = t.actions; + (a.length <= 1 || s.length + a.length - 2 <= o) && r(t, e, s.length) && + s.splice(i, 1, ...a) + } + if (l !== d && l.length > o) { + const e = l.splice(o, l.length - o); + d.unshift(...e, new a.Z0) + } + }(l, i, !1, "string" == typeof n ? e => e === n : n, o, r, s), + function(e) { + const t = new N.SL; + for (const [, i] of e) + for (const e of i) t.add(e); + return t + }(l) + } + let j = class extends r.g { + constructor(e, t, i, o, r) { + super(void 0, e, { + icon: !(!e.class && !e.item.icon), + label: !e.class && !e.item.icon, + draggable: null == t ? void 0 : t.draggable + }), this._keybindingService = i, this._notificationService = o, this + ._contextKeyService = r, this._wantsAltCommand = !1, this._itemClassDispose = + this._register(new N.XK), this._altKey = n._q.getInstance() + } + get _menuItemAction() { + return this._action + } + get _commandAction() { + return this._wantsAltCommand && this._menuItemAction.alt || this._menuItemAction + } + onClick(e) { + return H(this, void 0, void 0, (function*() { + e.preventDefault(), e.stopPropagation(); + try { + yield this.actionRunner.run(this._commandAction, this._context) + } catch (e) { + this._notificationService.error(e) + } + })) + } + render(e) { + super.render(e), e.classList.add("menu-entry"), this._updateItemClass( + this._menuItemAction.item); + let t = !1, + i = this._altKey.keyStatus.altKey || (D.ED || D.IJ) && this._altKey.keyStatus + .shiftKey; + const o = () => { + const e = t && i; + e !== this._wantsAltCommand && (this._wantsAltCommand = e, this.updateLabel(), + this.updateTooltip(), this.updateClass()) + }; + this._menuItemAction.alt && this._register(this._altKey.event((e => { + i = e.altKey || (D.ED || D.IJ) && e.shiftKey, o() + }))), this._register((0, n.nm)(e, "mouseleave", (e => { + t = !1, o() + }))), this._register((0, n.nm)(e, "mouseenter", (e => { + t = !0, o() + }))) + } + updateLabel() { + this.options.label && this.label && (this.label.textContent = this._commandAction + .label) + } + updateTooltip() { + if (this.label) { + const e = this._keybindingService.lookupKeybinding(this._commandAction + .id, this._contextKeyService), + t = e && e.getLabel(), + i = this._commandAction.tooltip || this._commandAction.label; + let n = t ? (0, T.N)("titleAndKb", "{0} ({1})", i, t) : i; + if (!this._wantsAltCommand && this._menuItemAction.alt) { + const e = this._menuItemAction.alt.tooltip || this._menuItemAction.alt + .label, + t = this._keybindingService.lookupKeybinding(this._menuItemAction.alt + .id, this._contextKeyService), + i = t && t.getLabel(), + o = i ? (0, T.N)("titleAndKb", "{0} ({1})", e, i) : e; + n += `\n[${L.xo.modifierLabels[D.OS].altKey}] ${o}` + } + this.label.title = n + } + } + updateClass() { + this.options.icon && (this._commandAction !== this._menuItemAction ? + this._menuItemAction.alt && this._updateItemClass(this._menuItemAction + .alt.item) : this._menuItemAction.alt && this._updateItemClass( + this._menuItemAction.item)) + } + _updateItemClass(e) { + var t; + this._itemClassDispose.value = void 0; + const { + element: i, + label: o + } = this; + if (!i || !o) return; + const r = this._commandAction.checked && (null === (t = e.toggled) || + void 0 === t ? void 0 : t.icon) ? e.toggled.icon : e.icon; + if (r) + if (W.kS.isThemeIcon(r)) { + const e = W.kS.asClassNameArray(r); + o.classList.add(...e), this._itemClassDispose.value = (0, N.OF)((() => { + o.classList.remove(...e) + })) + } else r.light && o.style.setProperty("--menu-entry-icon-light", (0, + n.wY)(r.light)), r.dark && o.style.setProperty( + "--menu-entry-icon-dark", (0, n.wY)(r.dark)), o.classList.add( + "icon"), this._itemClassDispose.value = (0, N.OF)((() => { + o.classList.remove("icon"), o.style.removeProperty( + "--menu-entry-icon-light"), o.style.removeProperty( + "--menu-entry-icon-dark") + })) + } + }; + j = z([V(2, P.d), V(3, F.lT), V(4, A.i6)], j); + let K = class extends k { + constructor(e, t, i) { + var n, o; + const r = Object.assign({}, null != t ? t : Object.create(null), { + menuAsChild: null === (n = null == t ? void 0 : t.menuAsChild) || + void 0 === n || n, + classNames: null !== (o = null == t ? void 0 : t.classNames) && + void 0 !== o ? o : W.kS.isThemeIcon(e.item.icon) ? W.kS.asClassName( + e.item.icon) : void 0 + }); + super(e, { + getActions: () => e.actions + }, i, r) + } + render(e) { + if (super.render(e), this.element) { + e.classList.add("menu-entry"); + const { + icon: t + } = this._action.item; + t && !W.kS.isThemeIcon(t) && (this.element.classList.add("icon"), t.light && + this.element.style.setProperty("--menu-entry-icon-light", (0, n.wY) + (t.light)), t.dark && this.element.style.setProperty( + "--menu-entry-icon-dark", (0, n.wY)(t.dark))) + } + } + }; + K = z([V(2, R.i)], K); + let $ = class extends r.Y { + constructor(e, t, i, n, o, r, s, l) { + var d, c, h; + let u; + super(null, e), this._keybindingService = i, this._notificationService = + n, this._contextMenuService = o, this._menuService = r, this._instaService = + s, this._storageService = l, this._container = null, this._storageKey = + `${e.item.submenu._debugName}_lastActionId`; + let g = l.get(this._storageKey, 1); + g && (u = e.actions.find((e => g === e.id))), u || (u = e.actions[0]), + this._defaultAction = this._instaService.createInstance(j, u, void 0); + const p = Object.assign({}, null != t ? t : Object.create(null), { + menuAsChild: null === (d = null == t ? void 0 : t.menuAsChild) || + void 0 === d || d, + classNames: null !== (c = null == t ? void 0 : t.classNames) && + void 0 !== c ? c : ["codicon", "codicon-chevron-down"], + actionRunner: null !== (h = null == t ? void 0 : t.actionRunner) && + void 0 !== h ? h : new a.Wi + }); + this._dropdown = new k(e, e.actions, this._contextMenuService, p), + this._dropdown.actionRunner.onDidRun((e => { + e.action instanceof M.U8 && this.update(e.action) + })) + } + update(e) { + this._storageService.store(this._storageKey, e.id, 1, 0), this._defaultAction + .dispose(), this._defaultAction = this._instaService.createInstance( + j, e, void 0), this._defaultAction.actionRunner = new class extends a + .Wi { + runAction(e, t) { + return H(this, void 0, void 0, (function*() { + yield e.run(void 0) + })) + } + }, this._container && this._defaultAction.render((0, n.Ce)(this._container, ( + 0, n.$)(".action-container"))) + } + setActionContext(e) { + super.setActionContext(e), this._defaultAction.setActionContext(e), + this._dropdown.setActionContext(e) + } + render(e) { + this._container = e, super.render(this._container), this._container.classList + .add("monaco-dropdown-with-default"); + const t = (0, n.$)(".action-container"); + this._defaultAction.render((0, n.R3)(this._container, t)), this._register( + (0, n.nm)(t, n.tw.KEY_DOWN, (e => { + const t = new o.y(e); + t.equals(17) && (this._defaultAction.element.tabIndex = -1, this + ._dropdown.focus(), t.stopPropagation()) + }))); + const i = (0, n.$)(".dropdown-action-container"); + this._dropdown.render((0, n.R3)(this._container, i)), this._register( + (0, n.nm)(i, n.tw.KEY_DOWN, (e => { + var t; + const i = new o.y(e); + i.equals(15) && (this._defaultAction.element.tabIndex = 0, this._dropdown + .setFocusable(!1), null === (t = this._defaultAction.element) || + void 0 === t || t.focus(), i.stopPropagation()) + }))) + } + focus(e) { + e ? this._dropdown.focus() : (this._defaultAction.element.tabIndex = + 0, this._defaultAction.element.focus()) + } + blur() { + this._defaultAction.element.tabIndex = -1, this._dropdown.blur(), + this._container.blur() + } + setFocusable(e) { + e ? this._defaultAction.element.tabIndex = 0 : (this._defaultAction.element + .tabIndex = -1, this._dropdown.setFocusable(!1)) + } + dispose() { + this._defaultAction.dispose(), this._dropdown.dispose(), super.dispose() + } + }; + + function q(e, t, i) { + return t instanceof M.U8 ? e.createInstance(j, t, void 0) : t instanceof M + .NZ ? t.item.rememberDefaultAction ? e.createInstance($, t, i) : e.createInstance( + K, t, i) : void 0 + } + $ = z([V(2, P.d), V(3, F.lT), V(4, R.i), V(5, M.co), V(6, O.TG), V(7, B.Uy)], + $) + }, + 4144: (e, t, i) => { + "use strict"; + i.d(t, { + vr: () => p, + eH: () => m, + co: () => f, + BH: () => _, + NZ: () => b, + U8: () => v + }); + var n = i(4741), + o = i(3046), + r = i(4669), + s = i(3725), + a = i(5976), + l = i(1741), + d = i(4565), + c = i(8819), + h = i(2065), + u = i(7781), + g = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + + function p(e) { + return void 0 !== e.command + } + class m { + constructor(e) { + this.id = m._idPool++, this._debugName = e + } + } + m._idPool = 0, m.CommandPalette = new m("CommandPalette"), m.EditorContext = + new m("EditorContext"), m.SimpleEditorContext = new m( + "SimpleEditorContext"), m.EditorContextCopy = new m("EditorContextCopy"), + m.EditorContextPeek = new m("EditorContextPeek"), m.MenubarEditMenu = + new m("MenubarEditMenu"), m.MenubarCopy = new m("MenubarCopy"), m.MenubarGoMenu = + new m("MenubarGoMenu"), m.MenubarSelectionMenu = new m( + "MenubarSelectionMenu"), m.InlineCompletionsActions = new m( + "InlineCompletionsActions"); + const f = (0, h.yh)("menuService"), + _ = new class { + constructor() { + this._commands = new Map, this._menuItems = new Map, this._onDidChangeMenu = + new r.Q5, this.onDidChangeMenu = this._onDidChangeMenu.event, this._commandPaletteChangeEvent = { + has: e => e === m.CommandPalette + } + } + addCommand(e) { + return this.addCommands(s.$.single(e)) + } + addCommands(e) { + for (const t of e) this._commands.set(t.id, t); + return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent), ( + 0, a.OF)((() => { + let t = !1; + for (const i of e) t = this._commands.delete(i.id) || t; + t && this._onDidChangeMenu.fire(this._commandPaletteChangeEvent) + })) + } + getCommand(e) { + return this._commands.get(e) + } + getCommands() { + const e = new Map; + return this._commands.forEach(((t, i) => e.set(i, t))), e + } + appendMenuItem(e, t) { + return this.appendMenuItems(s.$.single({ + id: e, + item: t + })) + } + appendMenuItems(e) { + const t = new Set, + i = new l.S; + for (const { + id: n, + item: o + } + of e) { + let e = this._menuItems.get(n); + e || (e = new l.S, this._menuItems.set(n, e)), i.push(e.push(o)), t.add( + n) + } + return this._onDidChangeMenu.fire(t), (0, a.OF)((() => { + if (i.size > 0) { + for (let e of i) e(); + this._onDidChangeMenu.fire(t), i.clear() + } + })) + } + getMenuItems(e) { + let t; + return t = this._menuItems.has(e) ? [...this._menuItems.get(e)] : [], + e === m.CommandPalette && this._appendImplicitItems(t), t + } + _appendImplicitItems(e) { + const t = new Set; + for (const i of e) p(i) && (t.add(i.command.id), i.alt && t.add(i.alt + .id)); + this._commands.forEach(((i, n) => { + t.has(n) || e.push({ + command: i + }) + })) + } + }; + class b extends n.wY { + constructor(e, t, i, n) { + super(`submenuitem.${e.submenu.id}`, "string" == typeof e.title ? e.title : + e.title.value, [], "submenu"), this.item = e, this._menuService = t, + this._contextKeyService = i, this._options = n + } + get actions() { + const e = [], + t = this._menuService.createMenu(this.item.submenu, this._contextKeyService), + i = t.getActions(this._options); + t.dispose(); + for (const [, t] of i) t.length > 0 && (e.push(...t), e.push(new n.Z0)); + return e.length && e.pop(), e + } + } + let v = class e { + constructor(t, i, n, r, s) { + var a, l; + if (this._commandService = s, this.id = t.id, this.label = (null == n ? + void 0 : n.renderShortTitle) && t.shortTitle ? "string" == typeof t + .shortTitle ? t.shortTitle : t.shortTitle.value : "string" == typeof t + .title ? t.title : t.title.value, this.tooltip = null !== (l = + "string" == typeof t.tooltip ? t.tooltip : null === (a = t.tooltip) || + void 0 === a ? void 0 : a.value) && void 0 !== l ? l : "", this.enabled = ! + t.precondition || r.contextMatchesRules(t.precondition), this.checked = ! + 1, t.toggled) { + const e = t.toggled.condition ? t.toggled : { + condition: t.toggled + }; + this.checked = r.contextMatchesRules(e.condition), this.checked && e + .tooltip && (this.tooltip = "string" == typeof e.tooltip ? e.tooltip : + e.tooltip.value), e.title && (this.label = "string" == typeof e.title ? + e.title : e.title.value) + } + this.item = t, this.alt = i ? new e(i, void 0, n, r, s) : void 0, + this._options = n, u.kS.isThemeIcon(t.icon) && (this.class = o.dT.asClassName( + t.icon)) + } + dispose() {} + run(...e) { + var t, i; + let n = []; + return (null === (t = this._options) || void 0 === t ? void 0 : t.arg) && + (n = [...n, this._options.arg]), (null === (i = this._options) || + void 0 === i ? void 0 : i.shouldForwardArgs) && (n = [...n, ...e]), + this._commandService.executeCommand(this.id, ...n) + } + }; + v = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }([g(3, c.i6), g(4, d.H)], v) + }, + 4972: (e, t, i) => { + "use strict"; + i.d(t, { + p: () => n + }); + const n = (0, i(2065).yh)("clipboardService") + }, + 4565: (e, t, i) => { + "use strict"; + i.d(t, { + H: () => l, + P: () => d + }); + var n = i(4669), + o = i(3725), + r = i(5976), + s = i(1741), + a = i(8401); + const l = (0, i(2065).yh)("commandService"), + d = new class { + constructor() { + this._commands = new Map, this._onDidRegisterCommand = new n.Q5, this + .onDidRegisterCommand = this._onDidRegisterCommand.event + } + registerCommand(e, t) { + if (!e) throw new Error("invalid command"); + if ("string" == typeof e) { + if (!t) throw new Error("invalid command"); + return this.registerCommand({ + id: e, + handler: t + }) + } + if (e.description) { + const t = []; + for (let i of e.description.args) t.push(i.constraint); + const i = e.handler; + e.handler = function(e, ...n) { + return (0, a.D8)(n, t), i(e, ...n) + } + } + const { + id: i + } = e; + let n = this._commands.get(i); + n || (n = new s.S, this._commands.set(i, n)); + let o = n.unshift(e), + l = (0, r.OF)((() => { + o(); + const e = this._commands.get(i); + (null == e ? void 0 : e.isEmpty()) && this._commands.delete(i) + })); + return this._onDidRegisterCommand.fire(i), l + } + registerCommandAlias(e, t) { + return d.registerCommand(e, ((e, ...i) => e.get(l).executeCommand(t, + ...i))) + } + getCommand(e) { + const t = this._commands.get(e); + if (t && !t.isEmpty()) return o.$.first(t) + } + getCommands() { + const e = new Map; + for (const t of this._commands.keys()) { + const i = this.getCommand(t); + i && e.set(t, i) + } + return e + } + }; + d.registerCommand("noop", (() => {})) + }, + 3108: (e, t, i) => { + "use strict"; + i.d(t, { + Ui: () => s, + Od: () => a, + KV: () => l, + xL: () => d, + Mt: () => h, + MR: () => u, + O4: () => g + }); + var n = i(3193), + o = i(2065), + r = i(9872); + const s = (0, o.yh)("configurationService"); + + function a(e, t) { + const i = Object.create(null); + for (let n in e) l(i, n, e[n], t); + return i + } + + function l(e, t, i, n) { + const o = t.split("."), + r = o.pop(); + let s = e; + for (let e = 0; e < o.length; e++) { + let i = o[e], + r = s[i]; + switch (typeof r) { + case "undefined": + r = s[i] = Object.create(null); + break; + case "object": + break; + default: + return void n( + `Ignoring ${t} as ${o.slice(0,e+1).join(".")} is ${JSON.stringify(r)}` + ) + } + s = r + } + if ("object" == typeof s && null !== s) try { + s[r] = i + } catch (e) { + n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(s)}`) + } else n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(s)}`) + } + + function d(e, t) { + c(e, t.split(".")) + } + + function c(e, t) { + const i = t.shift(); + if (0 !== t.length) { + if (-1 !== Object.keys(e).indexOf(i)) { + const n = e[i]; + "object" != typeof n || Array.isArray(n) || (c(n, t), 0 === Object.keys( + n).length && delete e[i]) + } + } else delete e[i] + } + + function h(e, t, i) { + const n = function(e, t) { + let i = e; + for (const e of t) { + if ("object" != typeof i || null === i) return; + i = i[e] + } + return i + }(e, t.split(".")); + return void 0 === n ? i : n + } + + function u() { + const e = r.B.as(n.IP.Configuration).getConfigurationProperties(); + return Object.keys(e) + } + + function g() { + const e = Object.create(null), + t = r.B.as(n.IP.Configuration).getConfigurationProperties(); + for (let i in t) l(e, i, t[i].default, (e => console.error( + `Conflict in default settings: ${e}`))); + return e + } + }, + 3193: (e, t, i) => { + "use strict"; + i.d(t, { + IP: () => l, + G1: () => _, + Uh: () => b + }); + var n = i(4669), + o = i(8401), + r = i(3580), + s = i(1294), + a = i(9872); + const l = { + Configuration: "base.contributions.configuration" + }, + d = { + properties: {}, + patternProperties: {} + }, + c = { + properties: {}, + patternProperties: {} + }, + h = { + properties: {}, + patternProperties: {} + }, + u = { + properties: {}, + patternProperties: {} + }, + g = { + properties: {}, + patternProperties: {} + }, + p = { + properties: {}, + patternProperties: {} + }, + m = "vscode://schemas/settings/resourceLanguage", + f = a.B.as(s.I.JSONContribution), + _ = new RegExp("\\[.*\\]$"); + + function b(e) { + return e.substring(1, e.length - 1) + } + const v = new class { + constructor() { + this.overrideIdentifiers = new Set, this._onDidSchemaChange = new n.Q5, + this._onDidUpdateConfiguration = new n.Q5, this.defaultValues = {}, + this.defaultLanguageConfigurationOverridesNode = { + id: "defaultOverrides", + title: r.N("defaultLanguageConfigurationOverrides.title", + "Default Language Configuration Overrides"), + properties: {} + }, this.configurationContributors = [this.defaultLanguageConfigurationOverridesNode], + this.resourceLanguageSettingsSchema = { + properties: {}, + patternProperties: {}, + additionalProperties: !1, + errorMessage: "Unknown editor configuration setting", + allowTrailingCommas: !0, + allowComments: !0 + }, this.configurationProperties = {}, this.excludedConfigurationProperties = {}, + f.registerSchema(m, this.resourceLanguageSettingsSchema) + } + registerConfiguration(e, t = !0) { + this.registerConfigurations([e], t) + } + registerConfigurations(e, t = !0) { + const i = []; + e.forEach((e => { + i.push(...this.validateAndRegisterProperties(e, t, e.extensionInfo)), + this.configurationContributors.push(e), this.registerJSONConfiguration( + e) + })), f.registerSchema(m, this.resourceLanguageSettingsSchema), this._onDidSchemaChange + .fire(), this._onDidUpdateConfiguration.fire(i) + } + registerOverrideIdentifiers(e) { + for (const t of e) this.overrideIdentifiers.add(t); + this.updateOverridePropertyPatternKey() + } + validateAndRegisterProperties(e, t = !0, i, n = 3) { + var r; + n = o.Jp(e.scope) ? n : e.scope; + let s = [], + a = e.properties; + if (a) + for (let e in a) { + if (t && w(e)) { + delete a[e]; + continue + } + const l = a[e]; + this.updatePropertyDefaultValue(e, l), _.test(e) ? l.scope = void 0 : + (l.scope = o.Jp(l.scope) ? n : l.scope, l.restricted = o.Jp(l.restricted) ? + !!(null === (r = null == i ? void 0 : i.restrictedConfigurations) || + void 0 === r ? void 0 : r.includes(e)) : l.restricted), !a[e].hasOwnProperty( + "included") || a[e].included ? (this.configurationProperties[e] = + a[e], !a[e].deprecationMessage && a[e].markdownDeprecationMessage && + (a[e].deprecationMessage = a[e].markdownDeprecationMessage), s.push( + e)) : (this.excludedConfigurationProperties[e] = a[e], delete a[ + e]) + } + let l = e.allOf; + if (l) + for (let e of l) s.push(...this.validateAndRegisterProperties(e, t, + i, n)); + return s + } + getConfigurationProperties() { + return this.configurationProperties + } + registerJSONConfiguration(e) { + const t = e => { + let i = e.properties; + if (i) + for (const e in i) this.updateSchema(e, i[e]); + let n = e.allOf; + n && n.forEach(t) + }; + t(e) + } + updateSchema(e, t) { + switch (d.properties[e] = t, t.scope) { + case 1: + c.properties[e] = t; + break; + case 2: + h.properties[e] = t; + break; + case 6: + u.properties[e] = t; + break; + case 3: + g.properties[e] = t; + break; + case 4: + p.properties[e] = t; + break; + case 5: + p.properties[e] = t, this.resourceLanguageSettingsSchema.properties[ + e] = t + } + } + updateOverridePropertyPatternKey() { + for (const e of this.overrideIdentifiers.values()) { + const t = `[${e}]`, + i = { + type: "object", + description: r.N("overrideSettings.defaultDescription", + "Configure editor settings to be overridden for a language."), + errorMessage: r.N("overrideSettings.errorMessage", + "This setting does not support per-language configuration."), + $ref: m + }; + this.updatePropertyDefaultValue(t, i), d.properties[t] = i, c.properties[ + t] = i, h.properties[t] = i, u.properties[t] = i, g.properties[t] = + i, p.properties[t] = i + } + this._onDidSchemaChange.fire() + } + updatePropertyDefaultValue(e, t) { + let i = this.defaultValues[e]; + o.o8(i) && (i = t.default), o.o8(i) && (i = function(e) { + switch (Array.isArray(e) ? e[0] : e) { + case "boolean": + return !1; + case "integer": + case "number": + return 0; + case "string": + return ""; + case "array": + return []; + case "object": + return {}; + default: + return null + } + }(t.type)), t.default = i + } + }; + + function w(e) { + return e.trim() ? _.test(e) ? r.N("config.property.languageDefault", + "Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.", + e) : void 0 !== v.getConfigurationProperties()[e] ? r.N( + "config.property.duplicate", + "Cannot register '{0}'. This property is already registered.", e) : + null : r.N("config.property.empty", "Cannot register an empty property") + } + a.B.add(l.Configuration, v) + }, + 8819: (e, t, i) => { + "use strict"; + i.d(t, { + Ao: () => d, + uy: () => N, + i6: () => D, + Eq: () => E, + K8: () => M + }); + var n = i(1432), + o = i(7295), + r = i(2065); + let s = n.WE || ""; + const a = new Map; + a.set("false", !1), a.set("true", !0), a.set("isMac", n.dz), a.set( + "isLinux", n.IJ), a.set("isWindows", n.ED), a.set("isWeb", n.$L), a.set( + "isMacNative", n.dz && !n.$L), a.set("isEdge", s.indexOf("Edg/") >= 0), + a.set("isFirefox", s.indexOf("Firefox") >= 0), a.set("isChrome", s.indexOf( + "Chrome") >= 0), a.set("isSafari", s.indexOf("Safari") >= 0); + const l = Object.prototype.hasOwnProperty; + class d { + static has(e) { + return g.create(e) + } + static equals(e, t) { + return p.create(e, t) + } + static regex(e, t) { + return S.create(e, t) + } + static not(e) { + return b.create(e) + } + static and(...e) { + return k.create(e, null) + } + static or(...e) { + return L.create(e, null, !0) + } + static deserialize(e, t = !1) { + if (e) return this._deserializeOrExpression(e, t) + } + static _deserializeOrExpression(e, t) { + let i = e.split("||"); + return L.create(i.map((e => this._deserializeAndExpression(e, t))), + null, !0) + } + static _deserializeAndExpression(e, t) { + let i = e.split("&&"); + return k.create(i.map((e => this._deserializeOne(e, t))), null) + } + static _deserializeOne(e, t) { + if ((e = e.trim()).indexOf("!=") >= 0) { + let i = e.split("!="); + return _.create(i[0].trim(), this._deserializeValue(i[1], t)) + } + if (e.indexOf("==") >= 0) { + let i = e.split("=="); + return p.create(i[0].trim(), this._deserializeValue(i[1], t)) + } + if (e.indexOf("=~") >= 0) { + let i = e.split("=~"); + return S.create(i[0].trim(), this._deserializeRegexValue(i[1], t)) + } + if (e.indexOf(" in ") >= 0) { + let t = e.split(" in "); + return m.create(t[0].trim(), t[1].trim()) + } + if (/^[^<=>]+>=[^<=>]+$/.test(e)) { + const t = e.split(">="); + return w.create(t[0].trim(), t[1].trim()) + } + if (/^[^<=>]+>[^<=>]+$/.test(e)) { + const t = e.split(">"); + return v.create(t[0].trim(), t[1].trim()) + } + if (/^[^<=>]+<=[^<=>]+$/.test(e)) { + const t = e.split("<="); + return y.create(t[0].trim(), t[1].trim()) + } + if (/^[^<=>]+<[^<=>]+$/.test(e)) { + const t = e.split("<"); + return C.create(t[0].trim(), t[1].trim()) + } + return /^\!\s*/.test(e) ? b.create(e.substr(1).trim()) : g.create(e) + } + static _deserializeValue(e, t) { + if ("true" === (e = e.trim())) return !0; + if ("false" === e) return !1; + let i = /^'([^']*)'$/.exec(e); + return i ? i[1].trim() : e + } + static _deserializeRegexValue(e, t) { + if ((0, o.m5)(e)) { + if (t) throw new Error("missing regexp-value for =~-expression"); + return console.warn("missing regexp-value for =~-expression"), null + } + let i = e.indexOf("/"), + n = e.lastIndexOf("/"); + if (i === n || i < 0) { + if (t) throw new Error(`bad regexp-value '${e}', missing /-enclosure`); + return console.warn(`bad regexp-value '${e}', missing /-enclosure`), + null + } + let r = e.slice(i + 1, n), + s = "i" === e[n + 1] ? "i" : ""; + try { + return new RegExp(r, s) + } catch (i) { + if (t) throw new Error(`bad regexp-value '${e}', parse error: ${i}`); + return console.warn(`bad regexp-value '${e}', parse error: ${i}`), + null + } + } + } + + function c(e, t) { + return e.cmp(t) + } + class h { + constructor() { + this.type = 0 + } + cmp(e) { + return this.type - e.type + } + equals(e) { + return e.type === this.type + } + evaluate(e) { + return !1 + } + serialize() { + return "false" + } + keys() { + return [] + } + negate() { + return u.INSTANCE + } + } + h.INSTANCE = new h; + class u { + constructor() { + this.type = 1 + } + cmp(e) { + return this.type - e.type + } + equals(e) { + return e.type === this.type + } + evaluate(e) { + return !0 + } + serialize() { + return "true" + } + keys() { + return [] + } + negate() { + return h.INSTANCE + } + } + u.INSTANCE = new u; + class g { + constructor(e, t) { + this.key = e, this.negated = t, this.type = 2 + } + static create(e, t = null) { + const i = a.get(e); + return "boolean" == typeof i ? i ? u.INSTANCE : h.INSTANCE : new g(e, + t) + } + cmp(e) { + return e.type !== this.type ? this.type - e.type : I(this.key, e.key) + } + equals(e) { + return e.type === this.type && this.key === e.key + } + evaluate(e) { + return !!e.getValue(this.key) + } + serialize() { + return this.key + } + keys() { + return [this.key] + } + negate() { + return this.negated || (this.negated = b.create(this.key, this)), this + .negated + } + } + class p { + constructor(e, t, i) { + this.key = e, this.value = t, this.negated = i, this.type = 4 + } + static create(e, t, i = null) { + if ("boolean" == typeof t) return t ? g.create(e, i) : b.create(e, i); + const n = a.get(e); + return "boolean" == typeof n ? t === (n ? "true" : "false") ? u.INSTANCE : + h.INSTANCE : new p(e, t, i) + } + cmp(e) { + return e.type !== this.type ? this.type - e.type : T(this.key, this.value, + e.key, e.value) + } + equals(e) { + return e.type === this.type && this.key === e.key && this.value === e.value + } + evaluate(e) { + return e.getValue(this.key) == this.value + } + serialize() { + return `${this.key} == '${this.value}'` + } + keys() { + return [this.key] + } + negate() { + return this.negated || (this.negated = _.create(this.key, this.value, + this)), this.negated + } + } + class m { + constructor(e, t) { + this.key = e, this.valueKey = t, this.type = 10, this.negated = null + } + static create(e, t) { + return new m(e, t) + } + cmp(e) { + return e.type !== this.type ? this.type - e.type : T(this.key, this.valueKey, + e.key, e.valueKey) + } + equals(e) { + return e.type === this.type && this.key === e.key && this.valueKey === + e.valueKey + } + evaluate(e) { + const t = e.getValue(this.valueKey), + i = e.getValue(this.key); + return Array.isArray(t) ? t.indexOf(i) >= 0 : "string" == typeof i && + "object" == typeof t && null !== t && l.call(t, i) + } + serialize() { + return `${this.key} in '${this.valueKey}'` + } + keys() { + return [this.key, this.valueKey] + } + negate() { + return this.negated || (this.negated = f.create(this)), this.negated + } + } + class f { + constructor(e) { + this._actual = e, this.type = 11 + } + static create(e) { + return new f(e) + } + cmp(e) { + return e.type !== this.type ? this.type - e.type : this._actual.cmp(e._actual) + } + equals(e) { + return e.type === this.type && this._actual.equals(e._actual) + } + evaluate(e) { + return !this._actual.evaluate(e) + } + serialize() { + throw new Error("Method not implemented.") + } + keys() { + return this._actual.keys() + } + negate() { + return this._actual + } + } + class _ { + constructor(e, t, i) { + this.key = e, this.value = t, this.negated = i, this.type = 5 + } + static create(e, t, i = null) { + if ("boolean" == typeof t) return t ? b.create(e, i) : g.create(e, i); + const n = a.get(e); + return "boolean" == typeof n ? t === (n ? "true" : "false") ? h.INSTANCE : + u.INSTANCE : new _(e, t, i) + } + cmp(e) { + return e.type !== this.type ? this.type - e.type : T(this.key, this.value, + e.key, e.value) + } + equals(e) { + return e.type === this.type && this.key === e.key && this.value === e.value + } + evaluate(e) { + return e.getValue(this.key) != this.value + } + serialize() { + return `${this.key} != '${this.value}'` + } + keys() { + return [this.key] + } + negate() { + return this.negated || (this.negated = p.create(this.key, this.value, + this)), this.negated + } + } + class b { + constructor(e, t) { + this.key = e, this.negated = t, this.type = 3 + } + static create(e, t = null) { + const i = a.get(e); + return "boolean" == typeof i ? i ? h.INSTANCE : u.INSTANCE : new b(e, + t) + } + cmp(e) { + return e.type !== this.type ? this.type - e.type : I(this.key, e.key) + } + equals(e) { + return e.type === this.type && this.key === e.key + } + evaluate(e) { + return !e.getValue(this.key) + } + serialize() { + return `!${this.key}` + } + keys() { + return [this.key] + } + negate() { + return this.negated || (this.negated = g.create(this.key, this)), this + .negated + } + } + class v { + constructor(e, t, i) { + this.key = e, this.value = t, this.negated = i, this.type = 12 + } + static create(e, t, i = null) { + return new v(e, t, i) + } + cmp(e) { + return e.type !== this.type ? this.type - e.type : T(this.key, this.value, + e.key, e.value) + } + equals(e) { + return e.type === this.type && this.key === e.key && this.value === e.value + } + evaluate(e) { + return parseFloat(e.getValue(this.key)) > parseFloat(this.value) + } + serialize() { + return `${this.key} > ${this.value}` + } + keys() { + return [this.key] + } + negate() { + return this.negated || (this.negated = y.create(this.key, this.value, + this)), this.negated + } + } + class w { + constructor(e, t, i) { + this.key = e, this.value = t, this.negated = i, this.type = 13 + } + static create(e, t, i = null) { + return new w(e, t, i) + } + cmp(e) { + return e.type !== this.type ? this.type - e.type : T(this.key, this.value, + e.key, e.value) + } + equals(e) { + return e.type === this.type && this.key === e.key && this.value === e.value + } + evaluate(e) { + return parseFloat(e.getValue(this.key)) >= parseFloat(this.value) + } + serialize() { + return `${this.key} >= ${this.value}` + } + keys() { + return [this.key] + } + negate() { + return this.negated || (this.negated = C.create(this.key, this.value, + this)), this.negated + } + } + class C { + constructor(e, t, i) { + this.key = e, this.value = t, this.negated = i, this.type = 14 + } + static create(e, t, i = null) { + return new C(e, t, i) + } + cmp(e) { + return e.type !== this.type ? this.type - e.type : T(this.key, this.value, + e.key, e.value) + } + equals(e) { + return e.type === this.type && this.key === e.key && this.value === e.value + } + evaluate(e) { + return parseFloat(e.getValue(this.key)) < parseFloat(this.value) + } + serialize() { + return `${this.key} < ${this.value}` + } + keys() { + return [this.key] + } + negate() { + return this.negated || (this.negated = w.create(this.key, this.value, + this)), this.negated + } + } + class y { + constructor(e, t, i) { + this.key = e, this.value = t, this.negated = i, this.type = 15 + } + static create(e, t, i = null) { + return new y(e, t, i) + } + cmp(e) { + return e.type !== this.type ? this.type - e.type : T(this.key, this.value, + e.key, e.value) + } + equals(e) { + return e.type === this.type && this.key === e.key && this.value === e.value + } + evaluate(e) { + return parseFloat(e.getValue(this.key)) <= parseFloat(this.value) + } + serialize() { + return `${this.key} <= ${this.value}` + } + keys() { + return [this.key] + } + negate() { + return this.negated || (this.negated = v.create(this.key, this.value, + this)), this.negated + } + } + class S { + constructor(e, t) { + this.key = e, this.regexp = t, this.type = 7, this.negated = null + } + static create(e, t) { + return new S(e, t) + } + cmp(e) { + if (e.type !== this.type) return this.type - e.type; + if (this.key < e.key) return -1; + if (this.key > e.key) return 1; + const t = this.regexp ? this.regexp.source : "", + i = e.regexp ? e.regexp.source : ""; + return t < i ? -1 : t > i ? 1 : 0 + } + equals(e) { + if (e.type === this.type) { + const t = this.regexp ? this.regexp.source : "", + i = e.regexp ? e.regexp.source : ""; + return this.key === e.key && t === i + } + return !1 + } + evaluate(e) { + let t = e.getValue(this.key); + return !!this.regexp && this.regexp.test(t) + } + serialize() { + const e = this.regexp ? + `/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}` : + "/invalid/"; + return `${this.key} =~ ${e}` + } + keys() { + return [this.key] + } + negate() { + return this.negated || (this.negated = x.create(this)), this.negated + } + } + class x { + constructor(e) { + this._actual = e, this.type = 8 + } + static create(e) { + return new x(e) + } + cmp(e) { + return e.type !== this.type ? this.type - e.type : this._actual.cmp(e._actual) + } + equals(e) { + return e.type === this.type && this._actual.equals(e._actual) + } + evaluate(e) { + return !this._actual.evaluate(e) + } + serialize() { + throw new Error("Method not implemented.") + } + keys() { + return this._actual.keys() + } + negate() { + return this._actual + } + } + class k { + constructor(e, t) { + this.expr = e, this.negated = t, this.type = 6 + } + static create(e, t) { + return k._normalizeArr(e, t) + } + cmp(e) { + if (e.type !== this.type) return this.type - e.type; + if (this.expr.length < e.expr.length) return -1; + if (this.expr.length > e.expr.length) return 1; + for (let t = 0, i = this.expr.length; t < i; t++) { + const i = c(this.expr[t], e.expr[t]); + if (0 !== i) return i + } + return 0 + } + equals(e) { + if (e.type === this.type) { + if (this.expr.length !== e.expr.length) return !1; + for (let t = 0, i = this.expr.length; t < i; t++) + if (!this.expr[t].equals(e.expr[t])) return !1; + return !0 + } + return !1 + } + evaluate(e) { + for (let t = 0, i = this.expr.length; t < i; t++) + if (!this.expr[t].evaluate(e)) return !1; + return !0 + } + static _normalizeArr(e, t) { + const i = []; + let n = !1; + for (const t of e) + if (t) + if (1 !== t.type) { + if (0 === t.type) return h.INSTANCE; + 6 !== t.type ? i.push(t) : i.push(...t.expr) + } else n = !0; + if (0 === i.length && n) return u.INSTANCE; + if (0 !== i.length) { + if (1 === i.length) return i[0]; + i.sort(c); + for (let e = 1; e < i.length; e++) i[e - 1].equals(i[e]) && (i.splice( + e, 1), e--); + if (1 === i.length) return i[0]; + for (; i.length > 1;) { + const e = i[i.length - 1]; + if (9 !== e.type) break; + i.pop(); + const t = i.pop(), + n = 0 === i.length, + o = L.create(e.expr.map((e => k.create([e, t], null))), null, n); + o && (i.push(o), i.sort(c)) + } + return 1 === i.length ? i[0] : new k(i, t) + } + } + serialize() { + return this.expr.map((e => e.serialize())).join(" && ") + } + keys() { + const e = []; + for (let t of this.expr) e.push(...t.keys()); + return e + } + negate() { + if (!this.negated) { + const e = []; + for (let t of this.expr) e.push(t.negate()); + this.negated = L.create(e, this, !0) + } + return this.negated + } + } + class L { + constructor(e, t) { + this.expr = e, this.negated = t, this.type = 9 + } + static create(e, t, i) { + return L._normalizeArr(e, t, i) + } + cmp(e) { + if (e.type !== this.type) return this.type - e.type; + if (this.expr.length < e.expr.length) return -1; + if (this.expr.length > e.expr.length) return 1; + for (let t = 0, i = this.expr.length; t < i; t++) { + const i = c(this.expr[t], e.expr[t]); + if (0 !== i) return i + } + return 0 + } + equals(e) { + if (e.type === this.type) { + if (this.expr.length !== e.expr.length) return !1; + for (let t = 0, i = this.expr.length; t < i; t++) + if (!this.expr[t].equals(e.expr[t])) return !1; + return !0 + } + return !1 + } + evaluate(e) { + for (let t = 0, i = this.expr.length; t < i; t++) + if (this.expr[t].evaluate(e)) return !0; + return !1 + } + static _normalizeArr(e, t, i) { + let n = [], + o = !1; + if (e) { + for (let t = 0, i = e.length; t < i; t++) { + const i = e[t]; + if (i) + if (0 !== i.type) { + if (1 === i.type) return u.INSTANCE; + 9 !== i.type ? n.push(i) : n = n.concat(i.expr) + } else o = !0 + } + if (0 === n.length && o) return h.INSTANCE; + n.sort(c) + } + if (0 !== n.length) { + if (1 === n.length) return n[0]; + for (let e = 1; e < n.length; e++) n[e - 1].equals(n[e]) && (n.splice( + e, 1), e--); + if (1 === n.length) return n[0]; + if (i) { + for (let e = 0; e < n.length; e++) + for (let t = e + 1; t < n.length; t++) M(n[e], n[t]) && (n.splice(t, + 1), t--); + if (1 === n.length) return n[0] + } + return new L(n, t) + } + } + serialize() { + return this.expr.map((e => e.serialize())).join(" || ") + } + keys() { + const e = []; + for (let t of this.expr) e.push(...t.keys()); + return e + } + negate() { + if (!this.negated) { + let e = []; + for (let t of this.expr) e.push(t.negate()); + for (; e.length > 1;) { + const t = e.shift(), + i = e.shift(), + n = []; + for (const e of A(t)) + for (const t of A(i)) n.push(k.create([e, t], null)); + const o = 0 === e.length; + e.unshift(L.create(n, null, o)) + } + this.negated = e[0] + } + return this.negated + } + } + class N extends g { + constructor(e, t, i) { + super(e, null), this._defaultValue = t, "object" == typeof i ? N._info + .push(Object.assign(Object.assign({}, i), { + key: e + })) : !0 !== i && N._info.push({ + key: e, + description: i, + type: null != t ? typeof t : void 0 + }) + } + static all() { + return N._info.values() + } + bindTo(e) { + return e.createKey(this.key, this._defaultValue) + } + getValue(e) { + return e.getContextKeyValue(this.key) + } + toNegated() { + return this.negate() + } + isEqualTo(e) { + return p.create(this.key, e) + } + } + N._info = []; + const D = (0, r.yh)("contextKeyService"), + E = "setContext"; + + function I(e, t) { + return e < t ? -1 : e > t ? 1 : 0 + } + + function T(e, t, i, n) { + return e < i ? -1 : e > i ? 1 : t < n ? -1 : t > n ? 1 : 0 + } + + function M(e, t) { + if (6 === t.type && 9 !== e.type && 6 !== e.type) + for (const i of t.expr) + if (e.equals(i)) return !0; + const i = A(e.negate()).concat(A(t)); + i.sort(c); + for (let e = 0; e < i.length; e++) { + const t = i[e].negate(); + for (let n = e + 1; n < i.length; n++) { + const e = i[n]; + if (t.equals(e)) return !0 + } + } + return !1 + } + + function A(e) { + return 9 === e.type ? e.expr : [e] + } + }, + 9282: (e, t, i) => { + "use strict"; + i.d(t, { + c: () => r, + d: () => s + }); + var n = i(1432), + o = i(3580); + const r = new(i(8819).uy)("isWindows", n.ED, (0, o.N)("isWindows", + "Whether the operating system is Windows")), + s = "inputFocus" + }, + 5606: (e, t, i) => { + "use strict"; + i.d(t, { + u: () => o, + i: () => r + }); + var n = i(2065); + const o = (0, n.yh)("contextViewService"), + r = (0, n.yh)("contextMenuService") + }, + 8820: (e, t, i) => { + "use strict"; + i.d(t, { + S: () => n + }); + const n = (0, i(2065).yh)("dialogService") + }, + 7108: (e, t, i) => { + "use strict"; + i.d(t, { + M: () => n + }); + class n { + constructor(e, t = [], i = !1) { + this.ctor = e, this.staticArguments = t, this.supportsDelayedInstantiation = + i + } + } + }, + 5026: (e, t, i) => { + "use strict"; + i.d(t, { + z: () => r, + d: () => s + }); + var n = i(7108); + const o = []; + + function r(e, t, i) { + t instanceof n.M || (t = new n.M(t, [], i)), o.push([e, t]) + } + + function s() { + return o + } + }, + 2065: (e, t, i) => { + "use strict"; + var n; + i.d(t, { + I8: () => n, + TG: () => o, + yh: () => s, + jt: () => a + }), + function(e) { + e.serviceIds = new Map, e.DI_TARGET = "$di$target", e.DI_DEPENDENCIES = + "$di$dependencies", e.getServiceDependencies = function(t) { + return t[e.DI_DEPENDENCIES] || [] + } + }(n || (n = {})); + const o = s("instantiationService"); + + function r(e, t, i, o) { + t[n.DI_TARGET] === t ? t[n.DI_DEPENDENCIES].push({ + id: e, + index: i, + optional: o + }) : (t[n.DI_DEPENDENCIES] = [{ + id: e, + index: i, + optional: o + }], t[n.DI_TARGET] = t) + } + + function s(e) { + if (n.serviceIds.has(e)) return n.serviceIds.get(e); + const t = function(e, i, n) { + if (3 !== arguments.length) throw new Error( + "@IServiceName-decorator can only be used to decorate a parameter"); + r(t, e, n, !1) + }; + return t.toString = () => e, n.serviceIds.set(e, t), t + } + + function a(e) { + return function(t, i, n) { + if (3 !== arguments.length) throw new Error( + "@optional-decorator can only be used to decorate a parameter"); + r(e, t, n, !0) + } + } + }, + 972: (e, t, i) => { + "use strict"; + i.d(t, { + y: () => n + }); + class n { + constructor(...e) { + this._entries = new Map; + for (let [t, i] of e) this.set(t, i) + } + set(e, t) { + const i = this._entries.get(e); + return this._entries.set(e, t), i + } + has(e) { + return this._entries.has(e) + } + get(e) { + return this._entries.get(e) + } + } + }, + 1294: (e, t, i) => { + "use strict"; + i.d(t, { + I: () => r + }); + var n = i(4669), + o = i(9872); + const r = { + JSONContribution: "base.contributions.json" + }, + s = new class { + constructor() { + this._onDidChangeSchema = new n.Q5, this.schemasById = {} + } + registerSchema(e, t) { + var i; + this.schemasById[(i = e, i.length > 0 && "#" === i.charAt(i.length - + 1) ? i.substring(0, i.length - 1) : i)] = t, this._onDidChangeSchema + .fire(e) + } + notifySchemaChanged(e) { + this._onDidChangeSchema.fire(e) + } + }; + o.B.add(r.JSONContribution, s) + }, + 1847: (e, t, i) => { + "use strict"; + i.d(t, { + d: () => n + }); + const n = (0, i(2065).yh)("keybindingService") + }, + 9989: (e, t, i) => { + "use strict"; + i.d(t, { + W: () => l + }); + var n = i(2258), + o = i(1432), + r = i(4565), + s = i(9872); + class a { + constructor() { + this._coreKeybindings = [], this._extensionKeybindings = [], this._cachedMergedKeybindings = + null + } + static bindToCurrentPlatform(e) { + if (1 === o.OS) { + if (e && e.win) return e.win + } else if (2 === o.OS) { + if (e && e.mac) return e.mac + } else if (e && e.linux) return e.linux; + return e + } + registerKeybindingRule(e) { + const t = a.bindToCurrentPlatform(e); + if (t && t.primary) { + const i = (0, n.gm)(t.primary, o.OS); + i && this._registerDefaultKeybinding(i, e.id, e.args, e.weight, 0, e.when) + } + if (t && Array.isArray(t.secondary)) + for (let i = 0, r = t.secondary.length; i < r; i++) { + const r = t.secondary[i], + s = (0, n.gm)(r, o.OS); + s && this._registerDefaultKeybinding(s, e.id, e.args, e.weight, -i - + 1, e.when) + } + } + registerCommandAndKeybindingRule(e) { + this.registerKeybindingRule(e), r.P.registerCommand(e) + } + static _mightProduceChar(e) { + return e >= 21 && e <= 30 || e >= 31 && e <= 56 || 80 === e || 81 === + e || 82 === e || 83 === e || 84 === e || 85 === e || 86 === e || 110 === + e || 111 === e || 87 === e || 88 === e || 89 === e || 90 === e || 91 === + e || 92 === e + } + _assertNoCtrlAlt(e, t) { + e.ctrlKey && e.altKey && !e.metaKey && a._mightProduceChar(e.keyCode) && + console.warn( + "Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ", + e, " for ", t) + } + _registerDefaultKeybinding(e, t, i, n, r, s) { + 1 === o.OS && this._assertNoCtrlAlt(e.parts[0], t), this._coreKeybindings + .push({ + keybinding: e, + command: t, + commandArgs: i, + when: s, + weight1: n, + weight2: r, + extensionId: null, + isBuiltinExtension: !1 + }), this._cachedMergedKeybindings = null + } + getDefaultKeybindings() { + return this._cachedMergedKeybindings || (this._cachedMergedKeybindings = [] + .concat(this._coreKeybindings).concat(this._extensionKeybindings), + this._cachedMergedKeybindings.sort(d)), this._cachedMergedKeybindings + .slice(0) + } + } + const l = new a; + + function d(e, t) { + return e.weight1 !== t.weight1 ? e.weight1 - t.weight1 : e.command < t.command ? + -1 : e.command > t.command ? 1 : e.weight2 - t.weight2 + } + s.B.add("platform.keybindingsRegistry", l) + }, + 4349: (e, t, i) => { + "use strict"; + i.d(t, { + e: () => n + }); + const n = (0, i(2065).yh)("labelService") + }, + 3738: (e, t, i) => { + "use strict"; + i.d(t, { + Lw: () => at, + XN: () => lt, + ls: () => Ut, + ev: () => Mt, + CQ: () => ht + }); + var n = i(5321), + o = i(9488), + r = i(1050), + s = i(4669), + a = i(5976), + l = (i(3164), i(3799)); + class d { + constructor(e, t) { + this.renderer = e, this.modelProvider = t + } + get templateId() { + return this.renderer.templateId + } + renderTemplate(e) { + return { + data: this.renderer.renderTemplate(e), + disposable: a.JT.None + } + } + renderElement(e, t, i, n) { + if (i.disposable && i.disposable.dispose(), !i.data) return; + const o = this.modelProvider(); + if (o.isResolved(e)) return this.renderer.renderElement(o.get(e), e, i + .data, n); + const s = new r.A, + a = o.resolve(e, s.token); + i.disposable = { + dispose: () => s.cancel() + }, this.renderer.renderPlaceholder(e, i.data), a.then((t => this.renderer + .renderElement(t, e, i.data, n))) + } + disposeTemplate(e) { + e.disposable && (e.disposable.dispose(), e.disposable = void 0), e.data && + (this.renderer.disposeTemplate(e.data), e.data = void 0) + } + } + class c { + constructor(e, t) { + this.modelProvider = e, this.accessibilityProvider = t + } + getWidgetAriaLabel() { + return this.accessibilityProvider.getWidgetAriaLabel() + } + getAriaLabel(e) { + const t = this.modelProvider(); + return t.isResolved(e) ? this.accessibilityProvider.getAriaLabel(t.get( + e)) : null + } + } + var h = i(9782), + u = i(3379), + g = i.n(u), + p = i(7795), + m = i.n(p), + f = i(569), + _ = i.n(f), + b = i(3565), + v = i.n(b), + w = i(9216), + C = i.n(w), + y = i(4589), + S = i.n(y), + x = i(1728), + k = {}; + k.styleTagTransform = S(), k.setAttributes = v(), k.insert = _().bind( + null, "head"), k.domAPI = m(), k.insertStyleElement = C(), g()(x.Z, k), + x.Z && x.Z.locals && x.Z.locals; + class L { + constructor(e, t, i) { + this.columns = e, this.getColumnSize = i, this.templateId = L.TemplateId, + this.renderedTemplates = new Set; + const n = new Map(t.map((e => [e.templateId, e]))); + this.renderers = []; + for (const t of e) { + const e = n.get(t.templateId); + if (!e) throw new Error( + `Table cell renderer for template id ${t.templateId} not found.`); + this.renderers.push(e) + } + } + renderTemplate(e) { + const t = (0, n.R3)(e, (0, n.$)(".monaco-table-tr")), + i = [], + o = []; + for (let e = 0; e < this.columns.length; e++) { + const r = this.renderers[e], + s = (0, n.R3)(t, (0, n.$)(".monaco-table-td", { + "data-col-index": e + })); + s.style.width = `${this.getColumnSize(e)}px`, i.push(s), o.push(r.renderTemplate( + s)) + } + const r = { + container: e, + cellContainers: i, + cellTemplateData: o + }; + return this.renderedTemplates.add(r), r + } + renderElement(e, t, i, n) { + for (let o = 0; o < this.columns.length; o++) { + const r = this.columns[o].project(e); + this.renderers[o].renderElement(r, t, i.cellTemplateData[o], n) + } + } + disposeElement(e, t, i, n) { + for (let o = 0; o < this.columns.length; o++) { + const r = this.renderers[o]; + if (r.disposeElement) { + const s = this.columns[o].project(e); + r.disposeElement(s, t, i.cellTemplateData[o], n) + } + } + } + disposeTemplate(e) { + for (let t = 0; t < this.columns.length; t++) this.renderers[t].disposeTemplate( + e.cellTemplateData[t]); + (0, n.PO)(e.container), this.renderedTemplates.delete(e) + } + layoutColumn(e, t) { + for (const { + cellContainers: i + } + of this.renderedTemplates) i[e].style.width = `${t}px` + } + } + L.TemplateId = "row"; + class N { + constructor(e, t) { + this.column = e, this.index = t, this._onDidLayout = new s.Q5, this.onDidLayout = + this._onDidLayout.event, this.element = (0, n.$)(".monaco-table-th", { + "data-col-index": t, + title: e.tooltip + }, e.label) + } + get minimumSize() { + var e; + return null !== (e = this.column.minimumWidth) && void 0 !== e ? e : + 120 + } + get maximumSize() { + var e; + return null !== (e = this.column.maximumWidth) && void 0 !== e ? e : + Number.POSITIVE_INFINITY + } + get onDidChange() { + var e; + return null !== (e = this.column.onDidChangeWidthConstraints) && void 0 !== + e ? e : s.ju.None + } + layout(e) { + this._onDidLayout.fire([this.index, e]) + } + } + class D { + constructor(e, t, i, o, r, a) { + this.virtualDelegate = i, this.domId = "table_id_" + ++D.InstanceCount, + this.cachedHeight = 0, this.domNode = (0, n.R3)(t, (0, n.$)( + `.monaco-table.${this.domId}`)); + const d = o.map(((e, t) => new N(e, t))), + c = { + size: d.reduce(((e, t) => e + t.column.weight), 0), + views: d.map((e => ({ + size: e.column.weight, + view: e + }))) + }; + this.splitview = new h.z(this.domNode, { + orientation: 1, + scrollbarVisibility: 2, + getSashOrthogonalSize: () => this.cachedHeight, + descriptor: c + }), this.splitview.el.style.height = `${i.headerRowHeight}px`, this.splitview + .el.style.lineHeight = `${i.headerRowHeight}px`; + const u = new L(o, r, (e => this.splitview.getViewSize(e))); + var g; + this.list = new l.aV(e, this.domNode, (g = i, { + getHeight: e => g.getHeight(e), + getTemplateId: () => L.TemplateId + }), [u], a), this.columnLayoutDisposable = s.ju.any(...d.map((e => e.onDidLayout))) + ((([e, t]) => u.layoutColumn(e, t))), this.styleElement = (0, n.dS)( + this.domNode), this.style({}) + } + get onDidChangeFocus() { + return this.list.onDidChangeFocus + } + get onDidChangeSelection() { + return this.list.onDidChangeSelection + } + get onMouseDblClick() { + return this.list.onMouseDblClick + } + get onPointer() { + return this.list.onPointer + } + get onDidFocus() { + return this.list.onDidFocus + } + get onDidDispose() { + return this.list.onDidDispose + } + updateOptions(e) { + this.list.updateOptions(e) + } + splice(e, t, i = []) { + this.list.splice(e, t, i) + } + getHTMLElement() { + return this.domNode + } + style(e) { + const t = []; + t.push( + `.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}` + ), this.styleElement.textContent = t.join("\n"), this.list.style(e) + } + getSelectedElements() { + return this.list.getSelectedElements() + } + getSelection() { + return this.list.getSelection() + } + getFocus() { + return this.list.getFocus() + } + dispose() { + this.splitview.dispose(), this.list.dispose(), this.columnLayoutDisposable + .dispose() + } + } + D.InstanceCount = 0; + var E, I = i(5707), + T = i(3547), + M = i(4850), + A = i(9069); + ! function(e) { + e[e.Unknown = 0] = "Unknown", e[e.Twistie = 1] = "Twistie", e[e.Element = + 2] = "Element" + }(E || (E = {})); + class R extends Error { + constructor(e, t) { + super(`TreeError [${e}] ${t}`) + } + } + class O { + constructor(e) { + this.fn = e, this._map = new WeakMap + } + map(e) { + let t = this._map.get(e); + return t || (t = this.fn(e), this._map.set(e, t)), t + } + } + var P = i(2484), + F = i(3725); + + function B(e) { + return "object" == typeof e && "visibility" in e && "data" in e + } + + function W(e) { + switch (e) { + case !0: + return 1; + case !1: + return 0; + default: + return e + } + } + + function z(e) { + return "boolean" == typeof e.collapsible + } + class V { + constructor(e, t, i, n = {}) { + this.user = e, this.list = t, this.rootRef = [], this.eventBufferer = + new s.E7, this._onDidChangeCollapseState = new s.Q5, this.onDidChangeCollapseState = + this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event), + this._onDidChangeRenderNodeCount = new s.Q5, this.onDidChangeRenderNodeCount = + this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event), + this._onDidSplice = new s.Q5, this.onDidSplice = this._onDidSplice.event, + this.collapseByDefault = void 0 !== n.collapseByDefault && n.collapseByDefault, + this.filter = n.filter, this.autoExpandSingleChildren = void 0 !== n.autoExpandSingleChildren && + n.autoExpandSingleChildren, this.root = { + parent: void 0, + element: i, + children: [], + depth: 0, + visibleChildrenCount: 0, + visibleChildIndex: -1, + collapsible: !1, + collapsed: !1, + renderNodeCount: 0, + visibility: 1, + visible: !0, + filterData: void 0 + } + } + splice(e, t, i = F.$.empty(), n = {}) { + if (0 === e.length) throw new R(this.user, "Invalid tree location"); + n.diffIdentityProvider ? this.spliceSmart(n.diffIdentityProvider, e, t, + i, n) : this.spliceSimple(e, t, i, n) + } + spliceSmart(e, t, i, n, o, r) { + var s; + void 0 === n && (n = F.$.empty()), void 0 === r && (r = null !== (s = + o.diffDepth) && void 0 !== s ? s : 0); + const { + parentNode: a + } = this.getParentNodeWithListIndex(t), l = [...n], d = t[t.length - 1], + c = new P.Hs({ + getElements: () => a.children.map((t => e.getId(t.element).toString())) + }, { + getElements: () => [...a.children.slice(0, d), ...l, ...a.children.slice( + d + i)].map((t => e.getId(t.element).toString())) + }).ComputeDiff(!1); + if (c.quitEarly) return this.spliceSimple(t, i, l, o); + const h = t.slice(0, -1), + u = (t, i, n) => { + if (r > 0) + for (let s = 0; s < n; s++) t--, i--, this.spliceSmart(e, [...h, t, + 0 + ], Number.MAX_SAFE_INTEGER, l[i].children, o, r - 1) + }; + let g = Math.min(a.children.length, d + i), + p = l.length; + for (const e of c.changes.sort(((e, t) => t.originalStart - e.originalStart))) + u(g, p, g - (e.originalStart + e.originalLength)), g = e.originalStart, + p = e.modifiedStart - d, this.spliceSimple([...h, g], e.originalLength, + F.$.slice(l, p, p + e.modifiedLength), o); + u(g, p, g) + } + spliceSimple(e, t, i = F.$.empty(), { + onDidCreateNode: n, + onDidDeleteNode: r + }) { + const { + parentNode: s, + listIndex: a, + revealed: l, + visible: d + } = this.getParentNodeWithListIndex(e), c = [], h = F.$.map(i, (e => + this.createTreeNode(e, s, s.visible ? 1 : 0, l, c, n))), u = e[e.length - + 1], g = s.children.length > 0; + let p = 0; + for (let e = u; e >= 0 && e < s.children.length; e--) { + const t = s.children[e]; + if (t.visible) { + p = t.visibleChildIndex; + break + } + } + const m = []; + let f = 0, + _ = 0; + for (const e of h) m.push(e), _ += e.renderNodeCount, e.visible && (e.visibleChildIndex = + p + f++); + const b = (0, o.db)(s.children, u, t, m); + let v = 0; + for (const e of b) e.visible && v++; + if (0 !== v) + for (let e = u + m.length; e < s.children.length; e++) { + const t = s.children[e]; + t.visible && (t.visibleChildIndex -= v) + } + if (s.visibleChildrenCount += f - v, l && d) { + const e = b.reduce(((e, t) => e + (t.visible ? t.renderNodeCount : 0)), + 0); + this._updateAncestorsRenderNodeCount(s, _ - e), this.list.splice(a, e, + c) + } + if (b.length > 0 && r) { + const e = t => { + r(t), t.children.forEach(e) + }; + b.forEach(e) + } + const w = s.children.length > 0; + g !== w && this.setCollapsible(e.slice(0, -1), w), this._onDidSplice.fire({ + insertedNodes: m, + deletedNodes: b + }); + let C = s; + for (; C;) { + if (2 === C.visibility) { + this.refilter(); + break + } + C = C.parent + } + } + rerender(e) { + if (0 === e.length) throw new R(this.user, "Invalid tree location"); + const { + node: t, + listIndex: i, + revealed: n + } = this.getTreeNodeWithListIndex(e); + t.visible && n && this.list.splice(i, 1, [t]) + } + has(e) { + return this.hasTreeNode(e) + } + getListIndex(e) { + const { + listIndex: t, + visible: i, + revealed: n + } = this.getTreeNodeWithListIndex(e); + return i && n ? t : -1 + } + getListRenderCount(e) { + return this.getTreeNode(e).renderNodeCount + } + isCollapsible(e) { + return this.getTreeNode(e).collapsible + } + setCollapsible(e, t) { + const i = this.getTreeNode(e); + void 0 === t && (t = !i.collapsible); + const n = { + collapsible: t + }; + return this.eventBufferer.bufferEvents((() => this._setCollapseState(e, + n))) + } + isCollapsed(e) { + return this.getTreeNode(e).collapsed + } + setCollapsed(e, t, i) { + const n = this.getTreeNode(e); + void 0 === t && (t = !n.collapsed); + const o = { + collapsed: t, + recursive: i || !1 + }; + return this.eventBufferer.bufferEvents((() => this._setCollapseState(e, + o))) + } + _setCollapseState(e, t) { + const { + node: i, + listIndex: n, + revealed: o + } = this.getTreeNodeWithListIndex(e), r = this._setListNodeCollapseState( + i, n, o, t); + if (i !== this.root && this.autoExpandSingleChildren && r && !z(t) && + i.collapsible && !i.collapsed && !t.recursive) { + let n = -1; + for (let e = 0; e < i.children.length; e++) + if (i.children[e].visible) { + if (n > -1) { + n = -1; + break + } + n = e + } + n > -1 && this._setCollapseState([...e, n], t) + } + return r + } + _setListNodeCollapseState(e, t, i, n) { + const o = this._setNodeCollapseState(e, n, !1); + if (!i || !e.visible || !o) return o; + const r = e.renderNodeCount, + s = this.updateNodeAfterCollapseChange(e), + a = r - (-1 === t ? 0 : 1); + return this.list.splice(t + 1, a, s.slice(1)), o + } + _setNodeCollapseState(e, t, i) { + let n; + if (e === this.root ? n = !1 : (z(t) ? (n = e.collapsible !== t.collapsible, + e.collapsible = t.collapsible) : e.collapsible ? (n = e.collapsed !== + t.collapsed, e.collapsed = t.collapsed) : n = !1, n && this._onDidChangeCollapseState + .fire({ + node: e, + deep: i + })), !z(t) && t.recursive) + for (const i of e.children) n = this._setNodeCollapseState(i, t, !0) || + n; + return n + } + expandTo(e) { + this.eventBufferer.bufferEvents((() => { + let t = this.getTreeNode(e); + for (; t.parent;) t = t.parent, e = e.slice(0, e.length - 1), t.collapsed && + this._setCollapseState(e, { + collapsed: !1, + recursive: !1 + }) + })) + } + refilter() { + const e = this.root.renderNodeCount, + t = this.updateNodeAfterFilterChange(this.root); + this.list.splice(0, e, t) + } + createTreeNode(e, t, i, n, o, r) { + const s = { + parent: t, + element: e.element, + children: [], + depth: t.depth + 1, + visibleChildrenCount: 0, + visibleChildIndex: -1, + collapsible: "boolean" == typeof e.collapsible ? e.collapsible : void 0 !== + e.collapsed, + collapsed: void 0 === e.collapsed ? this.collapseByDefault : e.collapsed, + renderNodeCount: 1, + visibility: 1, + visible: !0, + filterData: void 0 + }, + a = this._filterNode(s, i); + s.visibility = a, n && o.push(s); + const l = e.children || F.$.empty(), + d = n && 0 !== a && !s.collapsed, + c = F.$.map(l, (e => this.createTreeNode(e, s, a, d, o, r))); + let h = 0, + u = 1; + for (const e of c) s.children.push(e), u += e.renderNodeCount, e.visible && + (e.visibleChildIndex = h++); + return s.collapsible = s.collapsible || s.children.length > 0, s.visibleChildrenCount = + h, s.visible = 2 === a ? h > 0 : 1 === a, s.visible ? s.collapsed || + (s.renderNodeCount = u) : (s.renderNodeCount = 0, n && o.pop()), r && + r(s), s + } + updateNodeAfterCollapseChange(e) { + const t = e.renderNodeCount, + i = []; + return this._updateNodeAfterCollapseChange(e, i), this._updateAncestorsRenderNodeCount( + e.parent, i.length - t), i + } + _updateNodeAfterCollapseChange(e, t) { + if (!1 === e.visible) return 0; + if (t.push(e), e.renderNodeCount = 1, !e.collapsed) + for (const i of e.children) e.renderNodeCount += this._updateNodeAfterCollapseChange( + i, t); + return this._onDidChangeRenderNodeCount.fire(e), e.renderNodeCount + } + updateNodeAfterFilterChange(e) { + const t = e.renderNodeCount, + i = []; + return this._updateNodeAfterFilterChange(e, e.visible ? 1 : 0, i), + this._updateAncestorsRenderNodeCount(e.parent, i.length - t), i + } + _updateNodeAfterFilterChange(e, t, i, n = !0) { + let o; + if (e !== this.root) { + if (o = this._filterNode(e, t), 0 === o) return e.visible = !1, e.renderNodeCount = + 0, !1; + n && i.push(e) + } + const r = i.length; + e.renderNodeCount = e === this.root ? 0 : 1; + let s = !1; + if (e.collapsed && 0 === o) e.visibleChildrenCount = 0; + else { + let t = 0; + for (const r of e.children) s = this._updateNodeAfterFilterChange(r, + o, i, n && !e.collapsed) || s, r.visible && (r.visibleChildIndex = + t++); + e.visibleChildrenCount = t + } + return e !== this.root && (e.visible = 2 === o ? s : 1 === o), e.visible ? + e.collapsed || (e.renderNodeCount += i.length - r) : (e.renderNodeCount = + 0, n && i.pop()), this._onDidChangeRenderNodeCount.fire(e), e.visible + } + _updateAncestorsRenderNodeCount(e, t) { + if (0 !== t) + for (; e;) e.renderNodeCount += t, this._onDidChangeRenderNodeCount.fire( + e), e = e.parent + } + _filterNode(e, t) { + const i = this.filter ? this.filter.filter(e.element, t) : 1; + return "boolean" == typeof i ? (e.filterData = void 0, i ? 1 : 0) : B( + i) ? (e.filterData = i.data, W(i.visibility)) : (e.filterData = void 0, + W(i)) + } + hasTreeNode(e, t = this.root) { + if (!e || 0 === e.length) return !0; + const [i, ...n] = e; + return !(i < 0 || i > t.children.length) && this.hasTreeNode(n, t.children[ + i]) + } + getTreeNode(e, t = this.root) { + if (!e || 0 === e.length) return t; + const [i, ...n] = e; + if (i < 0 || i > t.children.length) throw new R(this.user, + "Invalid tree location"); + return this.getTreeNode(n, t.children[i]) + } + getTreeNodeWithListIndex(e) { + if (0 === e.length) return { + node: this.root, + listIndex: -1, + revealed: !0, + visible: !1 + }; + const { + parentNode: t, + listIndex: i, + revealed: n, + visible: o + } = this.getParentNodeWithListIndex(e), r = e[e.length - 1]; + if (r < 0 || r > t.children.length) throw new R(this.user, + "Invalid tree location"); + const s = t.children[r]; + return { + node: s, + listIndex: i, + revealed: n, + visible: o && s.visible + } + } + getParentNodeWithListIndex(e, t = this.root, i = 0, n = !0, o = !0) { + const [r, ...s] = e; + if (r < 0 || r > t.children.length) throw new R(this.user, + "Invalid tree location"); + for (let e = 0; e < r; e++) i += t.children[e].renderNodeCount; + return n = n && !t.collapsed, o = o && t.visible, 0 === s.length ? { + parentNode: t, + listIndex: i, + revealed: n, + visible: o + } : this.getParentNodeWithListIndex(s, t.children[r], i + 1, n, o) + } + getNode(e = []) { + return this.getTreeNode(e) + } + getNodeLocation(e) { + const t = []; + let i = e; + for (; i.parent;) t.push(i.parent.children.indexOf(i)), i = i.parent; + return t.reverse() + } + getParentNodeLocation(e) { + return 0 === e.length ? void 0 : 1 === e.length ? [] : (0, o.JH)(e)[0] + } + } + var H = i(3046); + const U = (0, H.CM)("tree-item-expanded", H.lA.chevronDown), + j = (0, H.CM)("tree-filter-on-type-on", H.lA.listFilter), + K = (0, H.CM)("tree-filter-on-type-off", H.lA.listSelection), + $ = (0, H.CM)("tree-filter-clear", H.lA.close), + q = (0, H.CM)("tree-item-loading", H.lA.loading); + var Z = i(5393), + G = i(6626), + Y = i(5392), + Q = i(9870), + X = i(1432), + J = i(1766), + ee = {}; + ee.styleTagTransform = S(), ee.setAttributes = v(), ee.insert = _().bind( + null, "head"), ee.domAPI = m(), ee.insertStyleElement = C(), g()(J.Z, + ee), J.Z && J.Z.locals && J.Z.locals; + var te, ie = i(3580); + class ne extends I.kX { + constructor(e) { + super(e.elements.map((e => e.element))), this.data = e + } + } + + function oe(e) { + return e instanceof I.kX ? new ne(e) : e + } + class re { + constructor(e, t) { + this.modelProvider = e, this.dnd = t, this.autoExpandDisposable = a.JT + .None + } + getDragURI(e) { + return this.dnd.getDragURI(e.element) + } + getDragLabel(e, t) { + if (this.dnd.getDragLabel) return this.dnd.getDragLabel(e.map((e => e.element)), + t) + } + onDragStart(e, t) { + this.dnd.onDragStart && this.dnd.onDragStart(oe(e), t) + } + onDragOver(e, t, i, n, r = !0) { + const s = this.dnd.onDragOver(oe(e), t && t.element, i, n), + a = this.autoExpandNode !== t; + if (a && (this.autoExpandDisposable.dispose(), this.autoExpandNode = t), + void 0 === t) return s; + if (a && "boolean" != typeof s && s.autoExpand && (this.autoExpandDisposable = + (0, Z.Vg)((() => { + const e = this.modelProvider(), + i = e.getNodeLocation(t); + e.isCollapsed(i) && e.setCollapsed(i, !1), this.autoExpandNode = + void 0 + }), 500)), "boolean" == typeof s || !s.accept || void 0 === s.bubble || + s.feedback) return r ? s : { + accept: "boolean" == typeof s ? s : s.accept, + effect: "boolean" == typeof s ? void 0 : s.effect, + feedback: [i] + }; + if (1 === s.bubble) { + const i = this.modelProvider(), + o = i.getNodeLocation(t), + r = i.getParentNodeLocation(o), + s = i.getNode(r), + a = r && i.getListIndex(r); + return this.onDragOver(e, s, a, n, !1) + } + const l = this.modelProvider(), + d = l.getNodeLocation(t), + c = l.getListIndex(d), + h = l.getListRenderCount(d); + return Object.assign(Object.assign({}, s), { + feedback: (0, o.w6)(c, c + h) + }) + } + drop(e, t, i, n) { + this.autoExpandDisposable.dispose(), this.autoExpandNode = void 0, + this.dnd.drop(oe(e), t && t.element, i, n) + } + onDragEnd(e) { + this.dnd.onDragEnd && this.dnd.onDragEnd(e) + } + } + class se { + constructor(e) { + this.delegate = e + } + getHeight(e) { + return this.delegate.getHeight(e.element) + } + getTemplateId(e) { + return this.delegate.getTemplateId(e.element) + } + hasDynamicHeight(e) { + return !!this.delegate.hasDynamicHeight && this.delegate.hasDynamicHeight( + e.element) + } + setDynamicHeight(e, t) { + this.delegate.setDynamicHeight && this.delegate.setDynamicHeight(e.element, + t) + } + }! function(e) { + e.None = "none", e.OnHover = "onHover", e.Always = "always" + }(te || (te = {})); + class ae { + constructor(e, t = []) { + this._elements = t, this.onDidChange = s.ju.forEach(e, (e => this._elements = + e)) + } + get elements() { + return this._elements + } + } + class le { + constructor(e, t, i, n, o = {}) { + this.renderer = e, this.modelProvider = t, this.activeNodes = n, this.renderedElements = + new Map, this.renderedNodes = new Map, this.indent = le.DefaultIndent, + this.hideTwistiesOfChildlessElements = !1, this.shouldRenderIndentGuides = ! + 1, this.renderedIndentGuides = new G.r, this.activeIndentNodes = new Set, + this.indentGuidesDisposable = a.JT.None, this.disposables = new a.SL, + this.templateId = e.templateId, this.updateOptions(o), s.ju.map(i, (e => + e.node))(this.onDidChangeNodeTwistieState, this, this.disposables), + e.onDidChangeTwistieState && e.onDidChangeTwistieState(this.onDidChangeTwistieState, + this, this.disposables) + } + updateOptions(e = {}) { + if (void 0 !== e.indent && (this.indent = (0, Q.u)(e.indent, 0, 40)), + void 0 !== e.renderIndentGuides) { + const t = e.renderIndentGuides !== te.None; + if (t !== this.shouldRenderIndentGuides && (this.shouldRenderIndentGuides = + t, this.indentGuidesDisposable.dispose(), t)) { + const e = new a.SL; + this.activeNodes.onDidChange(this._onDidChangeActiveNodes, this, e), + this.indentGuidesDisposable = e, this._onDidChangeActiveNodes(this.activeNodes + .elements) + } + } + void 0 !== e.hideTwistiesOfChildlessElements && (this.hideTwistiesOfChildlessElements = + e.hideTwistiesOfChildlessElements) + } + renderTemplate(e) { + const t = (0, n.R3)(e, (0, n.$)(".monaco-tl-row")), + i = (0, n.R3)(t, (0, n.$)(".monaco-tl-indent")), + o = (0, n.R3)(t, (0, n.$)(".monaco-tl-twistie")), + r = (0, n.R3)(t, (0, n.$)(".monaco-tl-contents")), + s = this.renderer.renderTemplate(r); + return { + container: e, + indent: i, + twistie: o, + indentGuidesDisposable: a.JT.None, + templateData: s + } + } + renderElement(e, t, i, n) { + "number" == typeof n && (this.renderedNodes.set(e, { + templateData: i, + height: n + }), this.renderedElements.set(e.element, e)); + const o = le.DefaultIndent + (e.depth - 1) * this.indent; + i.twistie.style.paddingLeft = `${o}px`, i.indent.style.width = o + + this.indent - 16 + "px", this.renderTwistie(e, i), "number" == typeof n && + this.renderIndentGuides(e, i), this.renderer.renderElement(e, t, i.templateData, + n) + } + disposeElement(e, t, i, n) { + i.indentGuidesDisposable.dispose(), this.renderer.disposeElement && + this.renderer.disposeElement(e, t, i.templateData, n), "number" == + typeof n && (this.renderedNodes.delete(e), this.renderedElements.delete( + e.element)) + } + disposeTemplate(e) { + this.renderer.disposeTemplate(e.templateData) + } + onDidChangeTwistieState(e) { + const t = this.renderedElements.get(e); + t && this.onDidChangeNodeTwistieState(t) + } + onDidChangeNodeTwistieState(e) { + const t = this.renderedNodes.get(e); + t && (this.renderTwistie(e, t.templateData), this._onDidChangeActiveNodes( + this.activeNodes.elements), this.renderIndentGuides(e, t.templateData)) + } + renderTwistie(e, t) { + t.twistie.classList.remove(...U.classNamesArray); + let i = !1; + this.renderer.renderTwistie && (i = this.renderer.renderTwistie(e.element, + t.twistie)), e.collapsible && (!this.hideTwistiesOfChildlessElements || + e.visibleChildrenCount > 0) ? (i || t.twistie.classList.add(...U.classNamesArray), + t.twistie.classList.add("collapsible"), t.twistie.classList.toggle( + "collapsed", e.collapsed)) : t.twistie.classList.remove( + "collapsible", "collapsed"), e.collapsible ? t.container.setAttribute( + "aria-expanded", String(!e.collapsed)) : t.container.removeAttribute( + "aria-expanded") + } + renderIndentGuides(e, t) { + if ((0, n.PO)(t.indent), t.indentGuidesDisposable.dispose(), !this.shouldRenderIndentGuides) + return; + const i = new a.SL, + o = this.modelProvider(); + let r = e; + for (;;) { + const e = o.getNodeLocation(r), + s = o.getParentNodeLocation(e); + if (!s) break; + const l = o.getNode(s), + d = (0, n.$)(".indent-guide", { + style: `width: ${this.indent}px` + }); + this.activeIndentNodes.has(l) && d.classList.add("active"), 0 === t.indent + .childElementCount ? t.indent.appendChild(d) : t.indent.insertBefore( + d, t.indent.firstElementChild), this.renderedIndentGuides.add(l, d), + i.add((0, a.OF)((() => this.renderedIndentGuides.delete(l, d)))), r = + l + } + t.indentGuidesDisposable = i + } + _onDidChangeActiveNodes(e) { + if (!this.shouldRenderIndentGuides) return; + const t = new Set, + i = this.modelProvider(); + e.forEach((e => { + const n = i.getNodeLocation(e); + try { + const o = i.getParentNodeLocation(n); + e.collapsible && e.children.length > 0 && !e.collapsed ? t.add(e) : + o && t.add(i.getNode(o)) + } catch (e) {} + })), this.activeIndentNodes.forEach((e => { + t.has(e) || this.renderedIndentGuides.forEach(e, (e => e.classList + .remove("active"))) + })), t.forEach((e => { + this.activeIndentNodes.has(e) || this.renderedIndentGuides.forEach( + e, (e => e.classList.add("active"))) + })), this.activeIndentNodes = t + } + dispose() { + this.renderedNodes.clear(), this.renderedElements.clear(), this.indentGuidesDisposable + .dispose(), (0, a.B9)(this.disposables) + } + } + le.DefaultIndent = 8; + class de { + constructor(e, t, i) { + this.tree = e, this.keyboardNavigationLabelProvider = t, this._filter = + i, this._totalCount = 0, this._matchCount = 0, this._pattern = "", + this._lowercasePattern = "", this.disposables = new a.SL, e.onWillRefilter( + this.reset, this, this.disposables) + } + get totalCount() { + return this._totalCount + } + get matchCount() { + return this._matchCount + } + set pattern(e) { + this._pattern = e, this._lowercasePattern = e.toLowerCase() + } + filter(e, t) { + if (this._filter) { + const i = this._filter.filter(e, t); + if (this.tree.options.simpleKeyboardNavigation) return i; + let n; + if (n = "boolean" == typeof i ? i ? 1 : 0 : B(i) ? W(i.visibility) : + i, 0 === n) return !1 + } + if (this._totalCount++, this.tree.options.simpleKeyboardNavigation || + !this._pattern) return this._matchCount++, { + data: Y.CL.Default, + visibility: !0 + }; + const i = this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel( + e), + n = Array.isArray(i) ? i : [i]; + for (const e of n) { + const t = e && e.toString(); + if (void 0 === t) return { + data: Y.CL.Default, + visibility: !0 + }; + const i = (0, Y.EW)(this._pattern, this._lowercasePattern, 0, t, t.toLowerCase(), + 0, !0); + if (i) return this._matchCount++, 1 === n.length ? { + data: i, + visibility: !0 + } : { + data: { + label: t, + score: i + }, + visibility: !0 + } + } + return this.tree.options.filterOnType ? 2 : { + data: Y.CL.Default, + visibility: !0 + } + } + reset() { + this._totalCount = 0, this._matchCount = 0 + } + dispose() { + (0, a.B9)(this.disposables) + } + } + class ce { + constructor(e, t, i, o, r) { + this.tree = e, this.view = i, this.filter = o, this.keyboardNavigationDelegate = + r, this._enabled = !1, this._pattern = "", this._empty = !1, this._onDidChangeEmptyState = + new s.Q5, this.positionClassName = "ne", this.automaticKeyboardNavigation = ! + 0, this.triggered = !1, this._onDidChangePattern = new s.Q5, this.enabledDisposables = + new a.SL, this.disposables = new a.SL, this.domNode = (0, n.$)( + `.monaco-list-type-filter.${this.positionClassName}`), this.domNode.draggable = ! + 0, this.disposables.add((0, n.nm)(this.domNode, "dragstart", (() => + this.onDragStart()))), this.messageDomNode = (0, n.R3)(i.getHTMLElement(), ( + 0, n.$)(".monaco-list-type-filter-message")), this.labelDomNode = (0, + n.R3)(this.domNode, (0, n.$)("span.label")); + const l = (0, n.R3)(this.domNode, (0, n.$)(".controls")); + this._filterOnType = !!e.options.filterOnType, this.filterOnTypeDomNode = + (0, n.R3)(l, (0, n.$)("input.filter")), this.filterOnTypeDomNode.type = + "checkbox", this.filterOnTypeDomNode.checked = this._filterOnType, + this.filterOnTypeDomNode.tabIndex = -1, this.updateFilterOnTypeTitleAndIcon(), + this.disposables.add((0, n.nm)(this.filterOnTypeDomNode, "input", (() => + this.onDidChangeFilterOnType()))), this.clearDomNode = (0, n.R3)(l, ( + 0, n.$)("button.clear" + $.cssSelector)), this.clearDomNode.tabIndex = - + 1, this.clearDomNode.title = (0, ie.N)("clear", "Clear"), this.keyboardNavigationEventFilter = + e.options.keyboardNavigationEventFilter, t.onDidSplice(this.onDidSpliceModel, + this, this.disposables), this.updateOptions(e.options) + } + get enabled() { + return this._enabled + } + get pattern() { + return this._pattern + } + get filterOnType() { + return this._filterOnType + } + updateOptions(e) { + e.simpleKeyboardNavigation ? this.disable() : this.enable(), void 0 !== + e.filterOnType && (this._filterOnType = !!e.filterOnType, this.filterOnTypeDomNode + .checked = this._filterOnType, this.updateFilterOnTypeTitleAndIcon() + ), void 0 !== e.automaticKeyboardNavigation && (this.automaticKeyboardNavigation = + e.automaticKeyboardNavigation), this.tree.refilter(), this.render(), + this.automaticKeyboardNavigation || this.onEventOrInput("") + } + enable() { + if (this._enabled) return; + const e = this.enabledDisposables.add(new M.Y(this.view.getHTMLElement(), + "keydown")), + t = s.ju.chain(e.event).filter((e => !(0, l.cK)(e.target) || e.target === + this.filterOnTypeDomNode)).filter((e => "Dead" !== e.key && ! + /^Media/.test(e.key))).map((e => new A.y(e))).filter(this.keyboardNavigationEventFilter || + (() => !0)).filter((() => this.automaticKeyboardNavigation || this.triggered)) + .filter((e => this.keyboardNavigationDelegate.mightProducePrintableCharacter( + e) && !(18 === e.keyCode || 16 === e.keyCode || 15 === e.keyCode || + 17 === e.keyCode) || (this.pattern.length > 0 || this.triggered) && + (9 === e.keyCode || 1 === e.keyCode) && !e.altKey && !e.ctrlKey && + !e.metaKey || 1 === e.keyCode && (X.dz ? e.altKey && !e.metaKey : e + .ctrlKey) && !e.shiftKey)).forEach((e => { + e.stopPropagation(), e.preventDefault() + })).event, + i = this.enabledDisposables.add(new M.Y(this.clearDomNode, "click")); + s.ju.chain(s.ju.any(t, i.event)).event(this.onEventOrInput, this, this + .enabledDisposables), this.filter.pattern = "", this.tree.refilter(), + this.render(), this._enabled = !0, this.triggered = !1 + } + disable() { + this._enabled && (this.domNode.remove(), this.enabledDisposables.clear(), + this.tree.refilter(), this.render(), this._enabled = !1, this.triggered = ! + 1) + } + onEventOrInput(e) { + "string" == typeof e ? this.onInput(e) : e instanceof MouseEvent || 9 === + e.keyCode || 1 === e.keyCode && (X.dz ? e.altKey : e.ctrlKey) ? this.onInput( + "") : 1 === e.keyCode ? this.onInput(0 === this.pattern.length ? "" : + this.pattern.substr(0, this.pattern.length - 1)) : this.onInput(this + .pattern + e.browserEvent.key) + } + onInput(e) { + const t = this.view.getHTMLElement(); + e && !this.domNode.parentElement ? t.append(this.domNode) : !e && this + .domNode.parentElement && (this.domNode.remove(), this.tree.domFocus()), + this._pattern = e, this._onDidChangePattern.fire(e), this.filter.pattern = + e, this.tree.refilter(), e && this.tree.focusNext(0, !0, void 0, (e => + !Y.CL.isDefault(e.filterData))); + const i = this.tree.getFocus(); + if (i.length > 0) { + const e = i[0]; + null === this.tree.getRelativeTop(e) && this.tree.reveal(e, .5) + } + this.render(), e || (this.triggered = !1) + } + onDragStart() { + const e = this.view.getHTMLElement(), + { + left: t + } = (0, n.i)(e), + i = e.clientWidth, + o = i / 2, + r = this.domNode.clientWidth, + s = new a.SL; + let l = this.positionClassName; + const d = () => { + switch (l) { + case "nw": + this.domNode.style.top = "4px", this.domNode.style.left = "4px"; + break; + case "ne": + this.domNode.style.top = "4px", this.domNode.style.left = i - r - + 6 + "px" + } + }, + c = () => { + this.positionClassName = l, this.domNode.className = + `monaco-list-type-filter ${this.positionClassName}`, this.domNode.style + .top = "", this.domNode.style.left = "", (0, a.B9)(s) + }; + d(), this.domNode.classList.remove(l), this.domNode.classList.add( + "dragging"), s.add((0, a.OF)((() => this.domNode.classList.remove( + "dragging")))), s.add((0, n.nm)(document, "dragover", (e => (e => { + e.preventDefault(); + const i = e.clientX - t; + e.dataTransfer && (e.dataTransfer.dropEffect = "none"), l = i < + o ? "nw" : "ne", d() + })(e)))), s.add((0, n.nm)(this.domNode, "dragend", (() => c()))), T.P$ + .CurrentDragAndDropData = new T.TN("vscode-ui"), s.add((0, a.OF)((() => + T.P$.CurrentDragAndDropData = void 0))) + } + onDidSpliceModel() { + this._enabled && 0 !== this.pattern.length && (this.tree.refilter(), + this.render()) + } + onDidChangeFilterOnType() { + this.tree.updateOptions({ + filterOnType: this.filterOnTypeDomNode.checked + }), this.tree.refilter(), this.tree.domFocus(), this.render(), this.updateFilterOnTypeTitleAndIcon() + } + updateFilterOnTypeTitleAndIcon() { + this.filterOnType ? (this.filterOnTypeDomNode.classList.remove(...K.classNamesArray), + this.filterOnTypeDomNode.classList.add(...j.classNamesArray), this.filterOnTypeDomNode + .title = (0, ie.N)("disable filter on type", + "Disable Filter on Type")) : (this.filterOnTypeDomNode.classList.remove( + ...j.classNamesArray), this.filterOnTypeDomNode.classList.add(...K.classNamesArray), + this.filterOnTypeDomNode.title = (0, ie.N)("enable filter on type", + "Enable Filter on Type")) + } + render() { + const e = this.filter.totalCount > 0 && 0 === this.filter.matchCount; + this.pattern && this.tree.options.filterOnType && e ? (this.messageDomNode + .textContent = (0, ie.N)("empty", "No elements found"), this._empty = ! + 0) : (this.messageDomNode.innerText = "", this._empty = !1), this.domNode + .classList.toggle("no-matches", e), this.domNode.title = (0, ie.N)( + "found", "Matched {0} out of {1} elements", this.filter.matchCount, + this.filter.totalCount), this.labelDomNode.textContent = this.pattern + .length > 16 ? "…" + this.pattern.substr(this.pattern.length - 16) : + this.pattern, this._onDidChangeEmptyState.fire(this._empty) + } + shouldAllowFocus(e) { + return !(this.enabled && this.pattern && !this.filterOnType) || this.filter + .totalCount > 0 && this.filter.matchCount <= 1 || !Y.CL.isDefault(e.filterData) + } + dispose() { + this._enabled && (this.domNode.remove(), this.enabledDisposables.dispose(), + this._enabled = !1, this.triggered = !1), this._onDidChangePattern.dispose(), ( + 0, a.B9)(this.disposables) + } + } + + function he(e) { + let t = E.Unknown; + return (0, n.uU)(e.browserEvent.target, "monaco-tl-twistie", + "monaco-tl-row") ? t = E.Twistie : (0, n.uU)(e.browserEvent.target, + "monaco-tl-contents", "monaco-tl-row") && (t = E.Element), { + browserEvent: e.browserEvent, + element: e.element ? e.element.element : null, + target: t + } + } + + function ue(e, t) { + t(e), e.children.forEach((e => ue(e, t))) + } + class ge { + constructor(e, t) { + this.getFirstViewElementWithTrait = e, this.identityProvider = t, this + .nodes = [], this._onDidChange = new s.Q5, this.onDidChange = this._onDidChange + .event + } + get nodeSet() { + return this._nodeSet || (this._nodeSet = this.createNodeSet()), this._nodeSet + } + set(e, t) { + var i; + !(null === (i = t) || void 0 === i ? void 0 : i.__forceEvent) && (0, o + .fS)(this.nodes, e) || this._set(e, !1, t) + } + _set(e, t, i) { + if (this.nodes = [...e], this.elements = void 0, this._nodeSet = void 0, ! + t) { + const e = this; + this._onDidChange.fire({get elements() { + return e.get() + }, + browserEvent: i + }) + } + } + get() { + return this.elements || (this.elements = this.nodes.map((e => e.element))), [ + ...this.elements + ] + } + getNodes() { + return this.nodes + } + has(e) { + return this.nodeSet.has(e) + } + onDidModelSplice({ + insertedNodes: e, + deletedNodes: t + }) { + if (!this.identityProvider) { + const e = this.createNodeSet(), + i = t => e.delete(t); + return t.forEach((e => ue(e, i))), void this.set([...e.values()]) + } + const i = new Set, + n = e => i.add(this.identityProvider.getId(e.element).toString()); + t.forEach((e => ue(e, n))); + const o = new Map, + r = e => o.set(this.identityProvider.getId(e.element).toString(), e); + e.forEach((e => ue(e, r))); + const s = []; + for (const e of this.nodes) { + const t = this.identityProvider.getId(e.element).toString(); + if (i.has(t)) { + const e = o.get(t); + e && s.push(e) + } else s.push(e) + } + if (this.nodes.length > 0 && 0 === s.length) { + const e = this.getFirstViewElementWithTrait(); + e && s.push(e) + } + this._set(s, !0) + } + createNodeSet() { + const e = new Set; + for (const t of this.nodes) e.add(t); + return e + } + } + class pe extends l.sx { + constructor(e, t) { + super(e), this.tree = t + } + onViewPointer(e) { + if ((0, l.cK)(e.browserEvent.target) || (0, l.hD)(e.browserEvent.target)) + return; + const t = e.element; + if (!t) return super.onViewPointer(e); + if (this.isSelectionRangeChangeEvent(e) || this.isSelectionSingleChangeEvent( + e)) return super.onViewPointer(e); + const i = e.browserEvent.target, + n = i.classList.contains("monaco-tl-twistie") || i.classList.contains( + "monaco-icon-label") && i.classList.contains("folder-icon") && e.browserEvent + .offsetX < 16; + let o = !1; + if (o = "function" == typeof this.tree.expandOnlyOnTwistieClick ? + this.tree.expandOnlyOnTwistieClick(t.element) : !!this.tree.expandOnlyOnTwistieClick, + o && !n && 2 !== e.browserEvent.detail) return super.onViewPointer(e); + if (!this.tree.expandOnDoubleClick && 2 === e.browserEvent.detail) + return super.onViewPointer(e); + if (t.collapsible) { + const i = this.tree.model, + r = i.getNodeLocation(t), + s = e.browserEvent.altKey; + if (this.tree.setFocus([r]), i.setCollapsed(r, void 0, s), o && n) + return + } + super.onViewPointer(e) + } + onDoubleClick(e) { + !e.browserEvent.target.classList.contains("monaco-tl-twistie") && + this.tree.expandOnDoubleClick && super.onDoubleClick(e) + } + } + class me extends l.aV { + constructor(e, t, i, n, o, r, s, a) { + super(e, t, i, n, a), this.focusTrait = o, this.selectionTrait = r, + this.anchorTrait = s + } + createMouseController(e) { + return new pe(this, e.tree) + } + splice(e, t, i = []) { + if (super.splice(e, t, i), 0 === i.length) return; + const n = [], + r = []; + let s; + i.forEach(((t, i) => { + this.focusTrait.has(t) && n.push(e + i), this.selectionTrait.has( + t) && r.push(e + i), this.anchorTrait.has(t) && (s = e + i) + })), n.length > 0 && super.setFocus((0, o.cU)([...super.getFocus(), + ...n + ])), r.length > 0 && super.setSelection((0, o.cU)([...super.getSelection(), + ...r + ])), "number" == typeof s && super.setAnchor(s) + } + setFocus(e, t, i = !1) { + super.setFocus(e, t), i || this.focusTrait.set(e.map((e => this.element( + e))), t) + } + setSelection(e, t, i = !1) { + super.setSelection(e, t), i || this.selectionTrait.set(e.map((e => + this.element(e))), t) + } + setAnchor(e, t = !1) { + super.setAnchor(e), t || (void 0 === e ? this.anchorTrait.set([]) : + this.anchorTrait.set([this.element(e)])) + } + } + class fe { + constructor(e, t, i, o, r = {}) { + this._options = r, this.eventBufferer = new s.E7, this.disposables = + new a.SL, this._onWillRefilter = new s.Q5, this.onWillRefilter = this + ._onWillRefilter.event, this._onDidUpdateOptions = new s.Q5; + const d = new se(i), + c = new s.ZD, + h = new s.ZD, + u = new ae(h.event); + this.renderers = o.map((e => new le(e, (() => this.model), c.event, u, + r))); + for (let e of this.renderers) this.disposables.add(e); + let g; + r.keyboardNavigationLabelProvider && (g = new de(this, r.keyboardNavigationLabelProvider, + r.filter), r = Object.assign(Object.assign({}, r), { + filter: g + }), this.disposables.add(g)), this.focus = new ge((() => this.view.getFocusedElements()[ + 0]), r.identityProvider), this.selection = new ge((() => this.view.getSelectedElements()[ + 0]), r.identityProvider), this.anchor = new ge((() => this.view.getAnchorElement()), + r.identityProvider), this.view = new me(e, t, d, this.renderers, + this.focus, this.selection, this.anchor, Object.assign(Object.assign({}, + function(e, t) { + return t && Object.assign(Object.assign({}, t), { + identityProvider: t.identityProvider && { + getId: e => t.identityProvider.getId(e.element) + }, + dnd: t.dnd && new re(e, t.dnd), + multipleSelectionController: t.multipleSelectionController && { + isSelectionSingleChangeEvent: e => t.multipleSelectionController + .isSelectionSingleChangeEvent(Object.assign(Object.assign({}, + e), { + element: e.element + })), + isSelectionRangeChangeEvent: e => t.multipleSelectionController + .isSelectionRangeChangeEvent(Object.assign(Object.assign({}, + e), { + element: e.element + })) + }, + accessibilityProvider: t.accessibilityProvider && Object.assign( + Object.assign({}, t.accessibilityProvider), { + getSetSize(t) { + const i = e(), + n = i.getNodeLocation(t), + o = i.getParentNodeLocation(n); + return i.getNode(o).visibleChildrenCount + }, getPosInSet: e => e.visibleChildIndex + 1, isChecked: t + .accessibilityProvider && t.accessibilityProvider.isChecked ? + e => t.accessibilityProvider.isChecked(e.element) : void 0, + getRole: t.accessibilityProvider && t.accessibilityProvider + .getRole ? e => t.accessibilityProvider.getRole(e.element) : + () => "treeitem", getAriaLabel: e => t.accessibilityProvider + .getAriaLabel(e.element), getWidgetAriaLabel: () => t.accessibilityProvider + .getWidgetAriaLabel(), getWidgetRole: t.accessibilityProvider && + t.accessibilityProvider.getWidgetRole ? () => t.accessibilityProvider + .getWidgetRole() : () => "tree", getAriaLevel: t.accessibilityProvider && + t.accessibilityProvider.getAriaLevel ? e => t.accessibilityProvider + .getAriaLevel(e.element) : e => e.depth, + getActiveDescendantId: t.accessibilityProvider.getActiveDescendantId && + (e => t.accessibilityProvider.getActiveDescendantId(e.element)) + }), + keyboardNavigationLabelProvider: t.keyboardNavigationLabelProvider && + Object.assign(Object.assign({}, t.keyboardNavigationLabelProvider), { + getKeyboardNavigationLabel: e => t.keyboardNavigationLabelProvider + .getKeyboardNavigationLabel(e.element) + }), + enableKeyboardNavigation: t.simpleKeyboardNavigation + }) + }((() => this.model), r)), { + tree: this + })), this.model = this.createModel(e, this.view, r), c.input = this.model + .onDidChangeCollapseState; + const p = s.ju.forEach(this.model.onDidSplice, (e => { + this.eventBufferer.bufferEvents((() => { + this.focus.onDidModelSplice(e), this.selection.onDidModelSplice( + e) + })) + })); + if (p((() => null), null, this.disposables), h.input = s.ju.chain(s.ju + .any(p, this.focus.onDidChange, this.selection.onDidChange)).debounce( + (() => null), 0).map((() => { + const e = new Set; + for (const t of this.focus.getNodes()) e.add(t); + for (const t of this.selection.getNodes()) e.add(t); + return [...e.values()] + })).event, !1 !== r.keyboardSupport) { + const e = s.ju.chain(this.view.onKeyDown).filter((e => !(0, l.cK)(e.target))) + .map((e => new A.y(e))); + e.filter((e => 15 === e.keyCode)).on(this.onLeftArrow, this, this.disposables), + e.filter((e => 17 === e.keyCode)).on(this.onRightArrow, this, this.disposables), + e.filter((e => 10 === e.keyCode)).on(this.onSpace, this, this.disposables) + } + if (r.keyboardNavigationLabelProvider) { + const e = r.keyboardNavigationDelegate || l.WK; + this.typeFilterController = new ce(this, this.model, this.view, g, e), + this.focusNavigationFilter = e => this.typeFilterController.shouldAllowFocus( + e), this.disposables.add(this.typeFilterController) + } + this.styleElement = (0, n.dS)(this.view.getHTMLElement()), this.getHTMLElement() + .classList.toggle("always", this._options.renderIndentGuides === te.Always) + } + get onDidChangeFocus() { + return this.eventBufferer.wrapEvent(this.focus.onDidChange) + } + get onDidChangeSelection() { + return this.eventBufferer.wrapEvent(this.selection.onDidChange) + } + get onMouseDblClick() { + return s.ju.map(this.view.onMouseDblClick, he) + } + get onPointer() { + return s.ju.map(this.view.onPointer, he) + } + get onDidFocus() { + return this.view.onDidFocus + } + get onDidChangeCollapseState() { + return this.model.onDidChangeCollapseState + } + get expandOnDoubleClick() { + return void 0 === this._options.expandOnDoubleClick || this._options.expandOnDoubleClick + } + get expandOnlyOnTwistieClick() { + return void 0 === this._options.expandOnlyOnTwistieClick || this._options + .expandOnlyOnTwistieClick + } + get onDidDispose() { + return this.view.onDidDispose + } + updateOptions(e = {}) { + this._options = Object.assign(Object.assign({}, this._options), e); + for (const t of this.renderers) t.updateOptions(e); + this.view.updateOptions(Object.assign(Object.assign({}, this._options), { + enableKeyboardNavigation: this._options.simpleKeyboardNavigation + })), this.typeFilterController && this.typeFilterController.updateOptions( + this._options), this._onDidUpdateOptions.fire(this._options), this.getHTMLElement() + .classList.toggle("always", this._options.renderIndentGuides === te.Always) + } + get options() { + return this._options + } + getHTMLElement() { + return this.view.getHTMLElement() + } + get scrollTop() { + return this.view.scrollTop + } + set scrollTop(e) { + this.view.scrollTop = e + } + domFocus() { + this.view.domFocus() + } + layout(e, t) { + this.view.layout(e, t) + } + style(e) { + const t = `.${this.view.domId}`, + i = []; + e.treeIndentGuidesStroke && (i.push( + `.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }` + ), i.push( + `.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }` + )), this.styleElement.textContent = i.join("\n"), this.view.style(e) + } + collapse(e, t = !1) { + return this.model.setCollapsed(e, !0, t) + } + expand(e, t = !1) { + return this.model.setCollapsed(e, !1, t) + } + isCollapsible(e) { + return this.model.isCollapsible(e) + } + setCollapsible(e, t) { + return this.model.setCollapsible(e, t) + } + isCollapsed(e) { + return this.model.isCollapsed(e) + } + refilter() { + this._onWillRefilter.fire(void 0), this.model.refilter() + } + setSelection(e, t) { + const i = e.map((e => this.model.getNode(e))); + this.selection.set(i, t); + const n = e.map((e => this.model.getListIndex(e))).filter((e => e > -1)); + this.view.setSelection(n, t, !0) + } + getSelection() { + return this.selection.get() + } + setFocus(e, t) { + const i = e.map((e => this.model.getNode(e))); + this.focus.set(i, t); + const n = e.map((e => this.model.getListIndex(e))).filter((e => e > -1)); + this.view.setFocus(n, t, !0) + } + focusNext(e = 1, t = !1, i, n = this.focusNavigationFilter) { + this.view.focusNext(e, t, i, n) + } + getFocus() { + return this.focus.get() + } + reveal(e, t) { + this.model.expandTo(e); + const i = this.model.getListIndex(e); - 1 !== i && this.view.reveal(i, + t) + } + getRelativeTop(e) { + const t = this.model.getListIndex(e); + return -1 === t ? null : this.view.getRelativeTop(t) + } + onLeftArrow(e) { + e.preventDefault(), e.stopPropagation(); + const t = this.view.getFocusedElements(); + if (0 === t.length) return; + const i = t[0], + n = this.model.getNodeLocation(i); + if (!this.model.setCollapsed(n, !0)) { + const e = this.model.getParentNodeLocation(n); + if (!e) return; + const t = this.model.getListIndex(e); + this.view.reveal(t), this.view.setFocus([t]) + } + } + onRightArrow(e) { + e.preventDefault(), e.stopPropagation(); + const t = this.view.getFocusedElements(); + if (0 === t.length) return; + const i = t[0], + n = this.model.getNodeLocation(i); + if (!this.model.setCollapsed(n, !1)) { + if (!i.children.some((e => e.visible))) return; + const [e] = this.view.getFocus(), t = e + 1; + this.view.reveal(t), this.view.setFocus([t]) + } + } + onSpace(e) { + e.preventDefault(), e.stopPropagation(); + const t = this.view.getFocusedElements(); + if (0 === t.length) return; + const i = t[0], + n = this.model.getNodeLocation(i), + o = e.browserEvent.altKey; + this.model.setCollapsed(n, void 0, o) + } + dispose() { + (0, a.B9)(this.disposables), this.view.dispose() + } + } + class _e { + constructor(e, t, i = {}) { + this.user = e, this.rootRef = null, this.nodes = new Map, this.nodesByIdentity = + new Map, this.model = new V(e, t, null, i), this.onDidSplice = this.model + .onDidSplice, this.onDidChangeCollapseState = this.model.onDidChangeCollapseState, + this.onDidChangeRenderNodeCount = this.model.onDidChangeRenderNodeCount, + i.sorter && (this.sorter = { + compare: (e, t) => i.sorter.compare(e.element, t.element) + }), this.identityProvider = i.identityProvider + } + setChildren(e, t = F.$.empty(), i = {}) { + const n = this.getElementLocation(e); + this._setChildren(n, this.preserveCollapseState(t), i) + } + _setChildren(e, t = F.$.empty(), i) { + const n = new Set, + o = new Set; + this.model.splice([...e, 0], Number.MAX_VALUE, t, Object.assign(Object + .assign({}, i), { + onDidCreateNode: e => { + var t; + if (null === e.element) return; + const r = e; + if (n.add(r.element), this.nodes.set(r.element, r), this.identityProvider) { + const e = this.identityProvider.getId(r.element).toString(); + o.add(e), this.nodesByIdentity.set(e, r) + } + null === (t = i.onDidCreateNode) || void 0 === t || t.call(i, r) + }, + onDidDeleteNode: e => { + var t; + if (null === e.element) return; + const r = e; + if (n.has(r.element) || this.nodes.delete(r.element), this.identityProvider) { + const e = this.identityProvider.getId(r.element).toString(); + o.has(e) || this.nodesByIdentity.delete(e) + } + null === (t = i.onDidDeleteNode) || void 0 === t || t.call(i, r) + } + })) + } + preserveCollapseState(e = F.$.empty()) { + return this.sorter && (e = [...e].sort(this.sorter.compare.bind(this.sorter))), + F.$.map(e, (e => { + let t = this.nodes.get(e.element); + if (!t && this.identityProvider) { + const i = this.identityProvider.getId(e.element).toString(); + t = this.nodesByIdentity.get(i) + } + if (!t) return Object.assign(Object.assign({}, e), { + children: this.preserveCollapseState(e.children) + }); + const i = "boolean" == typeof e.collapsible ? e.collapsible : t.collapsible, + n = void 0 !== e.collapsed ? e.collapsed : t.collapsed; + return Object.assign(Object.assign({}, e), { + collapsible: i, + collapsed: n, + children: this.preserveCollapseState(e.children) + }) + })) + } + rerender(e) { + const t = this.getElementLocation(e); + this.model.rerender(t) + } + has(e) { + return this.nodes.has(e) + } + getListIndex(e) { + const t = this.getElementLocation(e); + return this.model.getListIndex(t) + } + getListRenderCount(e) { + const t = this.getElementLocation(e); + return this.model.getListRenderCount(t) + } + isCollapsible(e) { + const t = this.getElementLocation(e); + return this.model.isCollapsible(t) + } + setCollapsible(e, t) { + const i = this.getElementLocation(e); + return this.model.setCollapsible(i, t) + } + isCollapsed(e) { + const t = this.getElementLocation(e); + return this.model.isCollapsed(t) + } + setCollapsed(e, t, i) { + const n = this.getElementLocation(e); + return this.model.setCollapsed(n, t, i) + } + expandTo(e) { + const t = this.getElementLocation(e); + this.model.expandTo(t) + } + refilter() { + this.model.refilter() + } + getNode(e = null) { + if (null === e) return this.model.getNode(this.model.rootRef); + const t = this.nodes.get(e); + if (!t) throw new R(this.user, `Tree element not found: ${e}`); + return t + } + getNodeLocation(e) { + return e.element + } + getParentNodeLocation(e) { + if (null === e) throw new R(this.user, + "Invalid getParentNodeLocation call"); + const t = this.nodes.get(e); + if (!t) throw new R(this.user, `Tree element not found: ${e}`); + const i = this.model.getNodeLocation(t), + n = this.model.getParentNodeLocation(i); + return this.model.getNode(n).element + } + getElementLocation(e) { + if (null === e) return []; + const t = this.nodes.get(e); + if (!t) throw new R(this.user, `Tree element not found: ${e}`); + return this.model.getNodeLocation(t) + } + } + + function be(e) { + return { + element: { + elements: [e.element], + incompressible: e.incompressible || !1 + }, + children: F.$.map(F.$.from(e.children), be), + collapsible: e.collapsible, + collapsed: e.collapsed + } + } + + function ve(e) { + const t = [e.element], + i = e.incompressible || !1; + let n, o; + for (; + [o, n] = F.$.consume(F.$.from(e.children), 2), 1 === o.length && !o[0].incompressible; + ) e = o[0], t.push(e.element); + return { + element: { + elements: t, + incompressible: i + }, + children: F.$.map(F.$.concat(o, n), ve), + collapsible: e.collapsible, + collapsed: e.collapsed + } + } + + function we(e, t = 0) { + let i; + return i = t < e.element.elements.length - 1 ? [we(e, t + 1)] : F.$.map( + F.$.from(e.children), (e => we(e, 0))), 0 === t && e.element.incompressible ? { + element: e.element.elements[t], + children: i, + incompressible: !0, + collapsible: e.collapsible, + collapsed: e.collapsed + } : { + element: e.element.elements[t], + children: i, + collapsible: e.collapsible, + collapsed: e.collapsed + } + } + + function Ce(e) { + return we(e, 0) + } + + function ye(e, t, i) { + return e.element === t ? Object.assign(Object.assign({}, e), { + children: i + }) : Object.assign(Object.assign({}, e), { + children: F.$.map(F.$.from(e.children), (e => ye(e, t, i))) + }) + } + class Se { + constructor(e, t, i = {}) { + this.user = e, this.rootRef = null, this.nodes = new Map, this.model = + new _e(e, t, i), this.enabled = void 0 === i.compressionEnabled || i.compressionEnabled, + this.identityProvider = i.identityProvider + } + get onDidSplice() { + return this.model.onDidSplice + } + get onDidChangeCollapseState() { + return this.model.onDidChangeCollapseState + } + get onDidChangeRenderNodeCount() { + return this.model.onDidChangeRenderNodeCount + } + setChildren(e, t = F.$.empty(), i) { + const n = i.diffIdentityProvider && (o = i.diffIdentityProvider, { + getId: e => e.elements.map((e => o.getId(e).toString())).join("\0") + }); + var o; + if (null === e) { + const e = F.$.map(t, this.enabled ? ve : be); + return void this._setChildren(null, e, { + diffIdentityProvider: n, + diffDepth: 1 / 0 + }) + } + const r = this.nodes.get(e); + if (!r) throw new Error("Unknown compressed tree node"); + const s = this.model.getNode(r), + a = this.model.getParentNodeLocation(r), + l = this.model.getNode(a), + d = ye(Ce(s), e, t), + c = (this.enabled ? ve : be)(d), + h = l.children.map((e => e === s ? c : e)); + this._setChildren(l.element, h, { + diffIdentityProvider: n, + diffDepth: s.depth - l.depth + }) + } + setCompressionEnabled(e) { + if (e === this.enabled) return; + this.enabled = e; + const t = this.model.getNode().children, + i = F.$.map(t, Ce), + n = F.$.map(i, e ? ve : be); + this._setChildren(null, n, { + diffIdentityProvider: this.identityProvider, + diffDepth: 1 / 0 + }) + } + _setChildren(e, t, i) { + const n = new Set; + this.model.setChildren(e, t, Object.assign(Object.assign({}, i), { + onDidCreateNode: e => { + for (const t of e.element.elements) n.add(t), this.nodes.set(t, + e.element) + }, + onDidDeleteNode: e => { + for (const t of e.element.elements) n.has(t) || this.nodes.delete( + t) + } + })) + } + has(e) { + return this.nodes.has(e) + } + getListIndex(e) { + const t = this.getCompressedNode(e); + return this.model.getListIndex(t) + } + getListRenderCount(e) { + const t = this.getCompressedNode(e); + return this.model.getListRenderCount(t) + } + getNode(e) { + if (void 0 === e) return this.model.getNode(); + const t = this.getCompressedNode(e); + return this.model.getNode(t) + } + getNodeLocation(e) { + const t = this.model.getNodeLocation(e); + return null === t ? null : t.elements[t.elements.length - 1] + } + getParentNodeLocation(e) { + const t = this.getCompressedNode(e), + i = this.model.getParentNodeLocation(t); + return null === i ? null : i.elements[i.elements.length - 1] + } + isCollapsible(e) { + const t = this.getCompressedNode(e); + return this.model.isCollapsible(t) + } + setCollapsible(e, t) { + const i = this.getCompressedNode(e); + return this.model.setCollapsible(i, t) + } + isCollapsed(e) { + const t = this.getCompressedNode(e); + return this.model.isCollapsed(t) + } + setCollapsed(e, t, i) { + const n = this.getCompressedNode(e); + return this.model.setCollapsed(n, t, i) + } + expandTo(e) { + const t = this.getCompressedNode(e); + this.model.expandTo(t) + } + rerender(e) { + const t = this.getCompressedNode(e); + this.model.rerender(t) + } + refilter() { + this.model.refilter() + } + getCompressedNode(e) { + if (null === e) return null; + const t = this.nodes.get(e); + if (!t) throw new R(this.user, `Tree element not found: ${e}`); + return t + } + } + const xe = e => e[e.length - 1]; + class ke { + constructor(e, t) { + this.unwrapper = e, this.node = t + } + get element() { + return null === this.node.element ? null : this.unwrapper(this.node.element) + } + get children() { + return this.node.children.map((e => new ke(this.unwrapper, e))) + } + get depth() { + return this.node.depth + } + get visibleChildrenCount() { + return this.node.visibleChildrenCount + } + get visibleChildIndex() { + return this.node.visibleChildIndex + } + get collapsible() { + return this.node.collapsible + } + get collapsed() { + return this.node.collapsed + } + get visible() { + return this.node.visible + } + get filterData() { + return this.node.filterData + } + } + class Le { + constructor(e, t, i = {}) { + this.rootRef = null, this.elementMapper = i.elementMapper || xe; + const n = e => this.elementMapper(e.elements); + this.nodeMapper = new O((e => new ke(n, e))), this.model = new Se(e, + function(e, t) { + return { + splice(i, n, o) { + t.splice(i, n, o.map((t => e.map(t)))) + }, updateElementHeight(e, i) { + t.updateElementHeight(e, i) + } + } + }(this.nodeMapper, t), + function(e, t) { + return Object.assign(Object.assign({}, t), { + identityProvider: t.identityProvider && { + getId: i => t.identityProvider.getId(e(i)) + }, + sorter: t.sorter && { + compare: (e, i) => t.sorter.compare(e.elements[0], i.elements[ + 0]) + }, + filter: t.filter && { + filter: (i, n) => t.filter.filter(e(i), n) + } + }) + }(n, i)) + } + get onDidSplice() { + return s.ju.map(this.model.onDidSplice, (({ + insertedNodes: e, + deletedNodes: t + }) => ({ + insertedNodes: e.map((e => this.nodeMapper.map(e))), + deletedNodes: t.map((e => this.nodeMapper.map(e))) + }))) + } + get onDidChangeCollapseState() { + return s.ju.map(this.model.onDidChangeCollapseState, (({ + node: e, + deep: t + }) => ({ + node: this.nodeMapper.map(e), + deep: t + }))) + } + get onDidChangeRenderNodeCount() { + return s.ju.map(this.model.onDidChangeRenderNodeCount, (e => this.nodeMapper + .map(e))) + } + setChildren(e, t = F.$.empty(), i = {}) { + this.model.setChildren(e, t, i) + } + setCompressionEnabled(e) { + this.model.setCompressionEnabled(e) + } + has(e) { + return this.model.has(e) + } + getListIndex(e) { + return this.model.getListIndex(e) + } + getListRenderCount(e) { + return this.model.getListRenderCount(e) + } + getNode(e) { + return this.nodeMapper.map(this.model.getNode(e)) + } + getNodeLocation(e) { + return e.element + } + getParentNodeLocation(e) { + return this.model.getParentNodeLocation(e) + } + isCollapsible(e) { + return this.model.isCollapsible(e) + } + setCollapsible(e, t) { + return this.model.setCollapsible(e, t) + } + isCollapsed(e) { + return this.model.isCollapsed(e) + } + setCollapsed(e, t, i) { + return this.model.setCollapsed(e, t, i) + } + expandTo(e) { + return this.model.expandTo(e) + } + rerender(e) { + return this.model.rerender(e) + } + refilter() { + return this.model.refilter() + } + getCompressedTreeNode(e = null) { + return this.model.getNode(e) + } + } + var Ne = i(9898); + class De extends fe { + constructor(e, t, i, n, o = {}) { + super(e, t, i, n, o) + } + get onDidChangeCollapseState() { + return this.model.onDidChangeCollapseState + } + setChildren(e, t = F.$.empty(), i) { + this.model.setChildren(e, t, i) + } + rerender(e) { + void 0 !== e ? this.model.rerender(e) : this.view.rerender() + } + hasElement(e) { + return this.model.has(e) + } + createModel(e, t, i) { + return new _e(e, t, i) + } + } + class Ee { + constructor(e, t) { + this._compressedTreeNodeProvider = e, this.renderer = t, this.templateId = + t.templateId, t.onDidChangeTwistieState && (this.onDidChangeTwistieState = + t.onDidChangeTwistieState) + } + get compressedTreeNodeProvider() { + return this._compressedTreeNodeProvider() + } + renderTemplate(e) { + return { + compressedTreeNode: void 0, + data: this.renderer.renderTemplate(e) + } + } + renderElement(e, t, i, n) { + const o = this.compressedTreeNodeProvider.getCompressedTreeNode(e.element); + 1 === o.element.elements.length ? (i.compressedTreeNode = void 0, this + .renderer.renderElement(e, t, i.data, n)) : (i.compressedTreeNode = + o, this.renderer.renderCompressedElements(o, t, i.data, n)) + } + disposeElement(e, t, i, n) { + i.compressedTreeNode ? this.renderer.disposeCompressedElements && this + .renderer.disposeCompressedElements(i.compressedTreeNode, t, i.data, + n) : this.renderer.disposeElement && this.renderer.disposeElement(e, + t, i.data, n) + } + disposeTemplate(e) { + this.renderer.disposeTemplate(e.data) + } + renderTwistie(e, t) { + return !!this.renderer.renderTwistie && this.renderer.renderTwistie(e, + t) + } + }! function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + r > 3 && s && Object.defineProperty(t, i, s) + }([Ne.H], Ee.prototype, "compressedTreeNodeProvider", null); + class Ie extends De { + constructor(e, t, i, n, o = {}) { + const r = () => this; + super(e, t, i, n.map((e => new Ee(r, e))), function(e, t) { + return t && Object.assign(Object.assign({}, t), { + keyboardNavigationLabelProvider: t.keyboardNavigationLabelProvider && { + getKeyboardNavigationLabel(i) { + let n; + try { + n = e().getCompressedTreeNode(i) + } catch (e) { + return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel( + i) + } + return 1 === n.element.elements.length ? t.keyboardNavigationLabelProvider + .getKeyboardNavigationLabel(i) : t.keyboardNavigationLabelProvider + .getCompressedNodeKeyboardNavigationLabel(n.element.elements) + } + } + }) + }(r, o)) + } + setChildren(e, t = F.$.empty(), i) { + this.model.setChildren(e, t, i) + } + createModel(e, t, i) { + return new Le(e, t, i) + } + updateOptions(e = {}) { + super.updateOptions(e), void 0 !== e.compressionEnabled && this.model.setCompressionEnabled( + e.compressionEnabled) + } + getCompressedTreeNode(e = null) { + return this.model.getCompressedTreeNode(e) + } + } + var Te = i(7301), + Me = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + + function Ae(e) { + return Object.assign(Object.assign({}, e), { + children: [], + refreshPromise: void 0, + stale: !0, + slow: !1, + collapsedByDefault: void 0 + }) + } + + function Re(e, t) { + return !!t.parent && (t.parent === e || Re(e, t.parent)) + } + class Oe { + constructor(e) { + this.node = e + } + get element() { + return this.node.element.element + } + get children() { + return this.node.children.map((e => new Oe(e))) + } + get depth() { + return this.node.depth + } + get visibleChildrenCount() { + return this.node.visibleChildrenCount + } + get visibleChildIndex() { + return this.node.visibleChildIndex + } + get collapsible() { + return this.node.collapsible + } + get collapsed() { + return this.node.collapsed + } + get visible() { + return this.node.visible + } + get filterData() { + return this.node.filterData + } + } + class Pe { + constructor(e, t, i) { + this.renderer = e, this.nodeMapper = t, this.onDidChangeTwistieState = + i, this.renderedNodes = new Map, this.templateId = e.templateId + } + renderTemplate(e) { + return { + templateData: this.renderer.renderTemplate(e) + } + } + renderElement(e, t, i, n) { + this.renderer.renderElement(this.nodeMapper.map(e), t, i.templateData, + n) + } + renderTwistie(e, t) { + return e.slow ? (t.classList.add(...q.classNamesArray), !0) : (t.classList + .remove(...q.classNamesArray), !1) + } + disposeElement(e, t, i, n) { + this.renderer.disposeElement && this.renderer.disposeElement(this.nodeMapper + .map(e), t, i.templateData, n) + } + disposeTemplate(e) { + this.renderer.disposeTemplate(e.templateData) + } + dispose() { + this.renderedNodes.clear() + } + } + + function Fe(e) { + return { + browserEvent: e.browserEvent, + elements: e.elements.map((e => e.element)) + } + } + + function Be(e) { + return { + browserEvent: e.browserEvent, + element: e.element && e.element.element, + target: e.target + } + } + class We extends I.kX { + constructor(e) { + super(e.elements.map((e => e.element))), this.data = e + } + } + + function ze(e) { + return e instanceof I.kX ? new We(e) : e + } + class Ve { + constructor(e) { + this.dnd = e + } + getDragURI(e) { + return this.dnd.getDragURI(e.element) + } + getDragLabel(e, t) { + if (this.dnd.getDragLabel) return this.dnd.getDragLabel(e.map((e => e.element)), + t) + } + onDragStart(e, t) { + this.dnd.onDragStart && this.dnd.onDragStart(ze(e), t) + } + onDragOver(e, t, i, n, o = !0) { + return this.dnd.onDragOver(ze(e), t && t.element, i, n) + } + drop(e, t, i, n) { + this.dnd.drop(ze(e), t && t.element, i, n) + } + onDragEnd(e) { + this.dnd.onDragEnd && this.dnd.onDragEnd(e) + } + } + + function He(e) { + return e && Object.assign(Object.assign({}, e), { + collapseByDefault: !0, + identityProvider: e.identityProvider && { + getId: t => e.identityProvider.getId(t.element) + }, + dnd: e.dnd && new Ve(e.dnd), + multipleSelectionController: e.multipleSelectionController && { + isSelectionSingleChangeEvent: t => e.multipleSelectionController.isSelectionSingleChangeEvent( + Object.assign(Object.assign({}, t), { + element: t.element + })), + isSelectionRangeChangeEvent: t => e.multipleSelectionController.isSelectionRangeChangeEvent( + Object.assign(Object.assign({}, t), { + element: t.element + })) + }, + accessibilityProvider: e.accessibilityProvider && Object.assign( + Object.assign({}, e.accessibilityProvider), { + getPosInSet: void 0, + getSetSize: void 0, + getRole: e.accessibilityProvider.getRole ? t => e.accessibilityProvider + .getRole(t.element) : () => "treeitem", + isChecked: e.accessibilityProvider.isChecked ? t => { + var i; + return !!(null === (i = e.accessibilityProvider) || void 0 === i ? + void 0 : i.isChecked(t.element)) + } : void 0, + getAriaLabel: t => e.accessibilityProvider.getAriaLabel(t.element), + getWidgetAriaLabel: () => e.accessibilityProvider.getWidgetAriaLabel(), + getWidgetRole: e.accessibilityProvider.getWidgetRole ? () => e.accessibilityProvider + .getWidgetRole() : () => "tree", + getAriaLevel: e.accessibilityProvider.getAriaLevel && (t => e.accessibilityProvider + .getAriaLevel(t.element)), + getActiveDescendantId: e.accessibilityProvider.getActiveDescendantId && + (t => e.accessibilityProvider.getActiveDescendantId(t.element)) + }), + filter: e.filter && { + filter: (t, i) => e.filter.filter(t.element, i) + }, + keyboardNavigationLabelProvider: e.keyboardNavigationLabelProvider && + Object.assign(Object.assign({}, e.keyboardNavigationLabelProvider), { + getKeyboardNavigationLabel: t => e.keyboardNavigationLabelProvider + .getKeyboardNavigationLabel(t.element) + }), + sorter: void 0, + expandOnlyOnTwistieClick: void 0 === e.expandOnlyOnTwistieClick ? + void 0 : "function" != typeof e.expandOnlyOnTwistieClick ? e.expandOnlyOnTwistieClick : t => + e.expandOnlyOnTwistieClick(t.element), + additionalScrollHeight: e.additionalScrollHeight + }) + } + + function Ue(e, t) { + t(e), e.children.forEach((e => Ue(e, t))) + } + class je { + constructor(e, t, i, n, o, r = {}) { + this.user = e, this.dataSource = o, this.nodes = new Map, this.subTreeRefreshPromises = + new Map, this.refreshPromises = new Map, this._onDidRender = new s.Q5, + this._onDidChangeNodeSlowState = new s.Q5, this.nodeMapper = new O((e => + new Oe(e))), this.disposables = new a.SL, this.identityProvider = r.identityProvider, + this.autoExpandSingleChildren = void 0 !== r.autoExpandSingleChildren && + r.autoExpandSingleChildren, this.sorter = r.sorter, this.collapseByDefault = + r.collapseByDefault, this.tree = this.createTree(e, t, i, n, r), this + .root = Ae({ + element: void 0, + parent: null, + hasChildren: !0 + }), this.identityProvider && (this.root = Object.assign(Object.assign({}, + this.root), { + id: null + })), this.nodes.set(null, this.root), this.tree.onDidChangeCollapseState( + this._onDidChangeCollapseState, this, this.disposables) + } + get onDidChangeFocus() { + return s.ju.map(this.tree.onDidChangeFocus, Fe) + } + get onDidChangeSelection() { + return s.ju.map(this.tree.onDidChangeSelection, Fe) + } + get onMouseDblClick() { + return s.ju.map(this.tree.onMouseDblClick, Be) + } + get onPointer() { + return s.ju.map(this.tree.onPointer, Be) + } + get onDidFocus() { + return this.tree.onDidFocus + } + get onDidDispose() { + return this.tree.onDidDispose + } + createTree(e, t, i, n, o) { + const r = new se(i), + s = n.map((e => new Pe(e, this.nodeMapper, this._onDidChangeNodeSlowState + .event))), + a = He(o) || {}; + return new De(e, t, r, s, a) + } + updateOptions(e = {}) { + this.tree.updateOptions(e) + } + getHTMLElement() { + return this.tree.getHTMLElement() + } + get scrollTop() { + return this.tree.scrollTop + } + set scrollTop(e) { + this.tree.scrollTop = e + } + domFocus() { + this.tree.domFocus() + } + layout(e, t) { + this.tree.layout(e, t) + } + style(e) { + this.tree.style(e) + } + getInput() { + return this.root.element + } + setInput(e, t) { + return Me(this, void 0, void 0, (function*() { + this.refreshPromises.forEach((e => e.cancel())), this.refreshPromises + .clear(), this.root.element = e; + const i = t && { + viewState: t, + focus: [], + selection: [] + }; + yield this._updateChildren(e, !0, !1, i), i && (this.tree.setFocus( + i.focus), this.tree.setSelection(i.selection)), t && "number" == + typeof t.scrollTop && (this.scrollTop = t.scrollTop) + })) + } + _updateChildren(e = this.root.element, t = !0, i = !1, n, o) { + return Me(this, void 0, void 0, (function*() { + if (void 0 === this.root.element) throw new R(this.user, + "Tree input not set"); + this.root.refreshPromise && (yield this.root.refreshPromise, yield s + .ju.toPromise(this._onDidRender.event)); + const r = this.getDataNode(e); + if (yield this.refreshAndRenderNode(r, t, n, o), i) try { + this.tree.rerender(r) + } catch (e) {} + })) + } + rerender(e) { + if (void 0 === e || e === this.root.element) return void this.tree.rerender(); + const t = this.getDataNode(e); + this.tree.rerender(t) + } + collapse(e, t = !1) { + const i = this.getDataNode(e); + return this.tree.collapse(i === this.root ? null : i, t) + } + expand(e, t = !1) { + return Me(this, void 0, void 0, (function*() { + if (void 0 === this.root.element) throw new R(this.user, + "Tree input not set"); + this.root.refreshPromise && (yield this.root.refreshPromise, yield s + .ju.toPromise(this._onDidRender.event)); + const i = this.getDataNode(e); + if (this.tree.hasElement(i) && !this.tree.isCollapsible(i)) return + !1; + if (i.refreshPromise && (yield this.root.refreshPromise, yield s.ju + .toPromise(this._onDidRender.event)), i !== this.root && !i.refreshPromise && + !this.tree.isCollapsed(i)) return !1; + const n = this.tree.expand(i === this.root ? null : i, t); + return i.refreshPromise && (yield this.root.refreshPromise, yield s + .ju.toPromise(this._onDidRender.event)), n + })) + } + setSelection(e, t) { + const i = e.map((e => this.getDataNode(e))); + this.tree.setSelection(i, t) + } + getSelection() { + return this.tree.getSelection().map((e => e.element)) + } + setFocus(e, t) { + const i = e.map((e => this.getDataNode(e))); + this.tree.setFocus(i, t) + } + getFocus() { + return this.tree.getFocus().map((e => e.element)) + } + reveal(e, t) { + this.tree.reveal(this.getDataNode(e), t) + } + getDataNode(e) { + const t = this.nodes.get(e === this.root.element ? null : e); + if (!t) throw new R(this.user, `Data tree node not found: ${e}`); + return t + } + refreshAndRenderNode(e, t, i, n) { + return Me(this, void 0, void 0, (function*() { + yield this.refreshNode(e, t, i), this.render(e, i, n) + })) + } + refreshNode(e, t, i) { + return Me(this, void 0, void 0, (function*() { + let n; + return this.subTreeRefreshPromises.forEach(((o, r) => { + !n && function(e, t) { + return e === t || Re(e, t) || Re(t, e) + }(r, e) && (n = o.then((() => this.refreshNode(e, t, i)))) + })), n || this.doRefreshSubTree(e, t, i) + })) + } + doRefreshSubTree(e, t, i) { + return Me(this, void 0, void 0, (function*() { + let n; + e.refreshPromise = new Promise((e => n = e)), this.subTreeRefreshPromises + .set(e, e.refreshPromise), e.refreshPromise.finally((() => { + e.refreshPromise = void 0, this.subTreeRefreshPromises.delete( + e) + })); + try { + const o = yield this.doRefreshNode(e, t, i); + e.stale = !1, yield Z.jT.settled(o.map((e => this.doRefreshSubTree( + e, t, i)))) + } finally { + n() + } + })) + } + doRefreshNode(e, t, i) { + return Me(this, void 0, void 0, (function*() { + let n; + if (e.hasChildren = !!this.dataSource.hasChildren(e.element), e.hasChildren) { + const t = (0, Z.Vs)(800); + t.then((() => { + e.slow = !0, this._onDidChangeNodeSlowState.fire(e) + }), (e => null)), n = this.doGetChildren(e).finally((() => t.cancel())) + } else n = Promise.resolve(F.$.empty()); + try { + const o = yield n; + return this.setChildren(e, o, t, i) + } catch (t) { + if (e !== this.root && this.tree.hasElement(e) && this.tree.collapse( + e), (0, Te.VV)(t)) return []; + throw t + } finally { + e.slow && (e.slow = !1, this._onDidChangeNodeSlowState.fire(e)) + } + })) + } + doGetChildren(e) { + let t = this.refreshPromises.get(e); + return t || (t = (0, Z.PG)((() => Me(this, void 0, void 0, (function*() { + const t = yield this.dataSource.getChildren(e.element); + return this.processChildren(t) + })))), this.refreshPromises.set(e, t), t.finally((() => { + this.refreshPromises.delete(e) + }))) + } + _onDidChangeCollapseState({ + node: e, + deep: t + }) { + null !== e.element && !e.collapsed && e.element.stale && (t ? this.collapse( + e.element.element) : this.refreshAndRenderNode(e.element, !1).catch( + Te.dL)) + } + setChildren(e, t, i, n) { + const o = [...t]; + if (0 === e.children.length && 0 === o.length) return []; + const r = new Map, + s = new Map; + for (const t of e.children) + if (r.set(t.element, t), this.identityProvider) { + const e = this.tree.isCollapsed(t); + s.set(t.id, { + node: t, + collapsed: e + }) + } + const a = [], + l = o.map((t => { + const o = !!this.dataSource.hasChildren(t); + if (!this.identityProvider) { + const i = Ae({ + element: t, + parent: e, + hasChildren: o + }); + return o && this.collapseByDefault && !this.collapseByDefault(t) && + (i.collapsedByDefault = !1, a.push(i)), i + } + const l = this.identityProvider.getId(t).toString(), + d = s.get(l); + if (d) { + const e = d.node; + return r.delete(e.element), this.nodes.delete(e.element), this.nodes + .set(t, e), e.element = t, e.hasChildren = o, i ? d.collapsed ? + (e.children.forEach((e => Ue(e, (e => this.nodes.delete(e.element))))), + e.children.splice(0, e.children.length), e.stale = !0) : a.push( + e) : o && this.collapseByDefault && !this.collapseByDefault(t) && + (e.collapsedByDefault = !1, a.push(e)), e + } + const c = Ae({ + element: t, + parent: e, + id: l, + hasChildren: o + }); + return n && n.viewState.focus && n.viewState.focus.indexOf(l) > -1 && + n.focus.push(c), n && n.viewState.selection && n.viewState.selection + .indexOf(l) > -1 && n.selection.push(c), n && n.viewState.expanded && + n.viewState.expanded.indexOf(l) > -1 ? a.push(c) : o && this.collapseByDefault && + !this.collapseByDefault(t) && (c.collapsedByDefault = !1, a.push( + c)), c + })); + for (const e of r.values()) Ue(e, (e => this.nodes.delete(e.element))); + for (const e of l) this.nodes.set(e.element, e); + return e.children.splice(0, e.children.length, ...l), e !== this.root && + this.autoExpandSingleChildren && 1 === l.length && 0 === a.length && + (l[0].collapsedByDefault = !1, a.push(l[0])), a + } + render(e, t, i) { + const n = e.children.map((e => this.asTreeElement(e, t))), + o = i && Object.assign(Object.assign({}, i), { + diffIdentityProvider: i.diffIdentityProvider && { + getId: e => i.diffIdentityProvider.getId(e.element) + } + }); + this.tree.setChildren(e === this.root ? null : e, n, o), e !== this.root && + this.tree.setCollapsible(e, e.hasChildren), this._onDidRender.fire() + } + asTreeElement(e, t) { + if (e.stale) return { + element: e, + collapsible: e.hasChildren, + collapsed: !0 + }; + let i; + return i = !(t && t.viewState.expanded && e.id && t.viewState.expanded + .indexOf(e.id) > -1) && e.collapsedByDefault, e.collapsedByDefault = + void 0, { + element: e, + children: e.hasChildren ? F.$.map(e.children, (e => this.asTreeElement( + e, t))) : [], + collapsible: e.hasChildren, + collapsed: i + } + } + processChildren(e) { + return this.sorter && (e = [...e].sort(this.sorter.compare.bind(this.sorter))), + e + } + dispose() { + this.disposables.dispose() + } + } + class Ke { + constructor(e) { + this.node = e + } + get element() { + return { + elements: this.node.element.elements.map((e => e.element)), + incompressible: this.node.element.incompressible + } + } + get children() { + return this.node.children.map((e => new Ke(e))) + } + get depth() { + return this.node.depth + } + get visibleChildrenCount() { + return this.node.visibleChildrenCount + } + get visibleChildIndex() { + return this.node.visibleChildIndex + } + get collapsible() { + return this.node.collapsible + } + get collapsed() { + return this.node.collapsed + } + get visible() { + return this.node.visible + } + get filterData() { + return this.node.filterData + } + } + class $e { + constructor(e, t, i, n) { + this.renderer = e, this.nodeMapper = t, this.compressibleNodeMapperProvider = + i, this.onDidChangeTwistieState = n, this.renderedNodes = new Map, + this.disposables = [], this.templateId = e.templateId + } + renderTemplate(e) { + return { + templateData: this.renderer.renderTemplate(e) + } + } + renderElement(e, t, i, n) { + this.renderer.renderElement(this.nodeMapper.map(e), t, i.templateData, + n) + } + renderCompressedElements(e, t, i, n) { + this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider() + .map(e), t, i.templateData, n) + } + renderTwistie(e, t) { + return e.slow ? (t.classList.add(...q.classNamesArray), !0) : (t.classList + .remove(...q.classNamesArray), !1) + } + disposeElement(e, t, i, n) { + this.renderer.disposeElement && this.renderer.disposeElement(this.nodeMapper + .map(e), t, i.templateData, n) + } + disposeCompressedElements(e, t, i, n) { + this.renderer.disposeCompressedElements && this.renderer.disposeCompressedElements( + this.compressibleNodeMapperProvider().map(e), t, i.templateData, n) + } + disposeTemplate(e) { + this.renderer.disposeTemplate(e.templateData) + } + dispose() { + this.renderedNodes.clear(), this.disposables = (0, a.B9)(this.disposables) + } + } + class qe extends je { + constructor(e, t, i, n, o, r, s = {}) { + super(e, t, i, o, r, s), this.compressionDelegate = n, this.compressibleNodeMapper = + new O((e => new Ke(e))), this.filter = s.filter + } + createTree(e, t, i, n, o) { + const r = new se(i), + s = n.map((e => new $e(e, this.nodeMapper, (() => this.compressibleNodeMapper), + this._onDidChangeNodeSlowState.event))), + a = function(e) { + const t = e && He(e); + return t && Object.assign(Object.assign({}, t), { + keyboardNavigationLabelProvider: t.keyboardNavigationLabelProvider && + Object.assign(Object.assign({}, t.keyboardNavigationLabelProvider), { + getCompressedNodeKeyboardNavigationLabel: t => e.keyboardNavigationLabelProvider + .getCompressedNodeKeyboardNavigationLabel(t.map((e => e.element))) + }) + }) + }(o) || {}; + return new Ie(e, t, r, s, a) + } + asTreeElement(e, t) { + return Object.assign({ + incompressible: this.compressionDelegate.isIncompressible(e.element) + }, super.asTreeElement(e, t)) + } + updateOptions(e = {}) { + this.tree.updateOptions(e) + } + render(e, t) { + if (!this.identityProvider) return super.render(e, t); + const i = e => this.identityProvider.getId(e).toString(), + n = e => { + const t = new Set; + for (const n of e) { + const e = this.tree.getCompressedTreeNode(n === this.root ? null : + n); + if (e.element) + for (const n of e.element.elements) t.add(i(n.element)) + } + return t + }, + o = n(this.tree.getSelection()), + r = n(this.tree.getFocus()); + super.render(e, t); + const s = this.getSelection(); + let a = !1; + const l = this.getFocus(); + let d = !1; + const c = e => { + const t = e.element; + if (t) + for (let e = 0; e < t.elements.length; e++) { + const n = i(t.elements[e].element), + c = t.elements[t.elements.length - 1].element; + o.has(n) && -1 === s.indexOf(c) && (s.push(c), a = !0), r.has(n) && + -1 === l.indexOf(c) && (l.push(c), d = !0) + } + e.children.forEach(c) + }; + c(this.tree.getCompressedTreeNode(e === this.root ? null : e)), a && + this.setSelection(s), d && this.setFocus(l) + } + processChildren(e) { + return this.filter && (e = F.$.filter(e, (e => { + const t = "boolean" == typeof(i = this.filter.filter(e, 1)) ? i ? + 1 : 0 : B(i) ? W(i.visibility) : W(i); + var i; + if (2 === t) throw new Error( + "Recursive tree visibility not supported in async data compressed trees" + ); + return 1 === t + }))), super.processChildren(e) + } + } + class Ze extends fe { + constructor(e, t, i, n, o, r = {}) { + super(e, t, i, n, r), this.user = e, this.dataSource = o, this.identityProvider = + r.identityProvider + } + createModel(e, t, i) { + return new _e(e, t, i) + } + } + var Ge = i(1106), + Ye = i(3108), + Qe = i(3193), + Xe = i(8819), + Je = i(9282), + et = i(2065), + tt = i(1847), + it = i(9872), + nt = i(8810), + ot = i(7781), + rt = function(e, t, i, n) { + var o, r = arguments.length, + s = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : + n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) + s = Reflect.decorate(e, t, i, n); + else + for (var a = e.length - 1; a >= 0; a--)(o = e[a]) && (s = (r < 3 ? o(s) : + r > 3 ? o(t, i, s) : o(t, i)) || s); + return r > 3 && s && Object.defineProperty(t, i, s), s + }, + st = function(e, t) { + return function(i, n) { + t(i, n, e) + } + }; + const at = (0, et.yh)("listService"); + let lt = class { + constructor(e) { + this._themeService = e, this.disposables = new a.SL, this.lists = [], + this._lastFocusedWidget = void 0, this._hasCreatedStyleController = ! + 1 + } + get lastFocusedList() { + return this._lastFocusedWidget + } + register(e, t) { + if (!this._hasCreatedStyleController) { + this._hasCreatedStyleController = !0; + const e = new l.wD((0, n.dS)(), ""); + this.disposables.add((0, nt.Jl)(e, this._themeService)) + } + if (this.lists.some((t => t.widget === e))) throw new Error( + "Cannot register the same widget multiple times"); + const i = { + widget: e, + extraContextKeys: t + }; + return this.lists.push(i), e.getHTMLElement() === document.activeElement && + (this._lastFocusedWidget = e), (0, a.F8)(e.onDidFocus((() => this._lastFocusedWidget = + e)), (0, a.OF)((() => this.lists.splice(this.lists.indexOf(i), 1))), + e.onDidDispose((() => { + this.lists = this.lists.filter((e => e !== i)), this._lastFocusedWidget === + e && (this._lastFocusedWidget = void 0) + }))) + } + dispose() { + this.disposables.dispose() + } + }; + lt = rt([st(0, ot.XE)], lt); + const dt = new Xe.uy("listFocus", !0), + ct = new Xe.uy("listSupportsMultiselect", !0), + ht = Xe.Ao.and(dt, Xe.Ao.not(Je.d)), + ut = new Xe.uy("listHasSelectionOrFocus", !1), + gt = new Xe.uy("listDoubleSelection", !1), + pt = new Xe.uy("listMultiSelection", !1), + mt = new Xe.uy("listSelectionNavigation", !1), + ft = "listAutomaticKeyboardNavigation"; + + function _t(e, t) { + const i = e.createScoped(t.getHTMLElement()); + return dt.bindTo(i), i + } + const bt = "workbench.list.multiSelectModifier", + vt = "workbench.list.openMode", + wt = "workbench.list.horizontalScrolling", + Ct = "workbench.list.keyboardNavigation", + yt = "workbench.list.automaticKeyboardNavigation", + St = "workbench.tree.indent", + xt = "workbench.tree.renderIndentGuides", + kt = "workbench.list.smoothScrolling", + Lt = "workbench.list.mouseWheelScrollSensitivity", + Nt = "workbench.list.fastScrollSensitivity", + Dt = "workbench.tree.expandMode"; + + function Et(e) { + return "alt" === e.getValue(bt) + } + class It extends a.JT { + constructor(e) { + super(), this.configurationService = e, this.useAltAsMultipleSelectionModifier = + Et(e), this.registerListeners() + } + registerListeners() { + this._register(this.configurationService.onDidChangeConfiguration((e => { + e.affectsConfiguration(bt) && (this.useAltAsMultipleSelectionModifier = + Et(this.configurationService)) + }))) + } + isSelectionSingleChangeEvent(e) { + return this.useAltAsMultipleSelectionModifier ? e.browserEvent.altKey : + (0, l.Zo)(e) + } + isSelectionRangeChangeEvent(e) { + return (0, l.wn)(e) + } + } + + function Tt(e, t, i) { + var n; + const o = new a.SL; + return [Object.assign(Object.assign({}, e), { + keyboardNavigationDelegate: { + mightProducePrintableCharacter: e => i.mightProducePrintableCharacter( + e) + }, + smoothScrolling: Boolean(t.getValue(kt)), + mouseWheelScrollSensitivity: t.getValue(Lt), + fastScrollSensitivity: t.getValue(Nt), + multipleSelectionController: null !== (n = e.multipleSelectionController) && + void 0 !== n ? n : o.add(new It(t)) + }), o] + } + let Mt = class extends l.aV { + constructor(e, t, i, n, o, r, s, a, l, d) { + const c = void 0 !== o.horizontalScrolling ? o.horizontalScrolling : + Boolean(l.getValue(wt)), + [h, u] = Tt(o, l, d); + super(e, t, i, n, Object.assign(Object.assign(Object.assign({ + keyboardSupport: !1 + }, (0, nt.o)(a.getColorTheme(), nt.O2)), h), { + horizontalScrolling: c + })), this.disposables.add(u), this.contextKeyService = _t(r, this), + this.themeService = a, this.listSupportsMultiSelect = ct.bindTo(this + .contextKeyService), this.listSupportsMultiSelect.set(!1 !== o.multipleSelectionSupport), + mt.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)), + this.listHasSelectionOrFocus = ut.bindTo(this.contextKeyService), + this.listDoubleSelection = gt.bindTo(this.contextKeyService), this.listMultiSelection = + pt.bindTo(this.contextKeyService), this.horizontalScrolling = o.horizontalScrolling, + this._useAltAsMultipleSelectionModifier = Et(l), this.disposables.add( + this.contextKeyService), this.disposables.add(s.register(this)), o.overrideStyles && + this.updateStyles(o.overrideStyles), this.disposables.add(this.onDidChangeSelection( + (() => { + const e = this.getSelection(), + t = this.getFocus(); + this.contextKeyService.bufferChangeEvents((() => { + this.listHasSelectionOrFocus.set(e.length > 0 || t.length > + 0), this.listMultiSelection.set(e.length > 1), this.listDoubleSelection + .set(2 === e.length) + })) + }))), this.disposables.add(this.onDidChangeFocus((() => { + const e = this.getSelection(), + t = this.getFocus(); + this.listHasSelectionOrFocus.set(e.length > 0 || t.length > 0) + }))), this.disposables.add(l.onDidChangeConfiguration((e => { + e.affectsConfiguration(bt) && (this._useAltAsMultipleSelectionModifier = + Et(l)); + let t = {}; + if (e.affectsConfiguration(wt) && void 0 === this.horizontalScrolling) { + const e = Boolean(l.getValue(wt)); + t = Object.assign(Object.assign({}, t), { + horizontalScrolling: e + }) + } + if (e.affectsConfiguration(kt)) { + const e = Boolean(l.getValue(kt)); + t = Object.assign(Object.assign({}, t), { + smoothScrolling: e + }) + } + if (e.affectsConfiguration(Lt)) { + const e = l.getValue(Lt); + t = Object.assign(Object.assign({}, t), { + mouseWheelScrollSensitivity: e + }) + } + if (e.affectsConfiguration(Nt)) { + const e = l.getValue(Nt); + t = Object.assign(Object.assign({}, t), { + fastScrollSensitivity: e + }) + } + Object.keys(t).length > 0 && this.updateOptions(t) + }))), this.navigator = new Pt(this, Object.assign({ + configurationService: l + }, o)), this.disposables.add(this.navigator) + } + updateOptions(e) { + super.updateOptions(e), e.overrideStyles && this.updateStyles(e.overrideStyles), + void 0 !== e.multipleSelectionSupport && this.listSupportsMultiSelect + .set(!!e.multipleSelectionSupport) + } + updateStyles(e) { + var t; + null === (t = this._styler) || void 0 === t || t.dispose(), this._styler = + (0, nt.Jl)(this, this.themeService, e) + } + dispose() { + var e; + null === (e = this._styler) || void 0 === e || e.dispose(), super.dispose() + } + }; + Mt = rt([st(5, Xe.i6), st(6, at), st(7, ot.XE), st(8, Ye.Ui), st(9, tt.d)], + Mt); + let At = class extends class { + constructor(e, t, i, n, o = {}) { + const r = () => this.model, + s = n.map((e => new d(e, r))); + this.list = new l.aV(e, t, i, s, function(e, t) { + return Object.assign(Object.assign({}, t), { + accessibilityProvider: t.accessibilityProvider && new c(e, t.accessibilityProvider) + }) + }(r, o)) + } + updateOptions(e) { + this.list.updateOptions(e) + } + getHTMLElement() { + return this.list.getHTMLElement() + } + get onDidFocus() { + return this.list.onDidFocus + } + get onDidDispose() { + return this.list.onDidDispose + } + get onMouseDblClick() { + return s.ju.map(this.list.onMouseDblClick, (({ + element: e, + index: t, + browserEvent: i + }) => ({ + element: void 0 === e ? void 0 : this._model.get(e), + index: t, + browserEvent: i + }))) + } + get onPointer() { + return s.ju.map(this.list.onPointer, (({ + element: e, + index: t, + browserEvent: i + }) => ({ + element: void 0 === e ? void 0 : this._model.get(e), + index: t, + browserEvent: i + }))) + } + get onDidChangeSelection() { + return s.ju.map(this.list.onDidChangeSelection, (({ + elements: e, + indexes: t, + browserEvent: i + }) => ({ + elements: e.map((e => this._model.get(e))), + indexes: t, + browserEvent: i + }))) + } + get model() { + return this._model + } + set model(e) { + this._model = e, this.list.splice(0, this.list.length, (0, o.w6)(e.length)) + } + getFocus() { + return this.list.getFocus() + } + getSelection() { + return this.list.getSelection() + } + getSelectedElements() { + return this.getSelection().map((e => this.model.get(e))) + } + style(e) { + this.list.style(e) + } + dispose() { + this.list.dispose() + } + } { + constructor(e, t, i, n, o, r, s, l, d, c) { + const h = void 0 !== o.horizontalScrolling ? o.horizontalScrolling : + Boolean(d.getValue(wt)), + [u, g] = Tt(o, d, c); + super(e, t, i, n, Object.assign(Object.assign(Object.assign({ + keyboardSupport: !1 + }, (0, nt.o)(l.getColorTheme(), nt.O2)), u), { + horizontalScrolling: h + })), this.disposables = new a.SL, this.disposables.add(g), this.contextKeyService = + _t(r, this), this.themeService = l, this.horizontalScrolling = o.horizontalScrolling, + this.listSupportsMultiSelect = ct.bindTo(this.contextKeyService), + this.listSupportsMultiSelect.set(!1 !== o.multipleSelectionSupport), + mt.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)), + this._useAltAsMultipleSelectionModifier = Et(d), this.disposables.add( + this.contextKeyService), this.disposables.add(s.register(this)), o.overrideStyles && + this.updateStyles(o.overrideStyles), o.overrideStyles && this.disposables + .add((0, nt.Jl)(this, l, o.overrideStyles)), this.disposables.add(d.onDidChangeConfiguration( + (e => { + e.affectsConfiguration(bt) && (this._useAltAsMultipleSelectionModifier = + Et(d)); + let t = {}; + if (e.affectsConfiguration(wt) && void 0 === this.horizontalScrolling) { + const e = Boolean(d.getValue(wt)); + t = Object.assign(Object.assign({}, t), { + horizontalScrolling: e + }) + } + if (e.affectsConfiguration(kt)) { + const e = Boolean(d.getValue(kt)); + t = Object.assign(Object.assign({}, t), { + smoothScrolling: e + }) + } + if (e.affectsConfiguration(Lt)) { + const e = d.getValue(Lt); + t = Object.assign(Object.assign({}, t), { + mouseWheelScrollSensitivity: e + }) + } + if (e.affectsConfiguration(Nt)) { + const e = d.getValue(Nt); + t = Object.assign(Object.assign({}, t), { + fastScrollSensitivity: e + }) + } + Object.keys(t).length > 0 && this.updateOptions(t) + }))), this.navigator = new Pt(this, Object.assign({ + configurationService: d + }, o)), this.disposables.add(this.navigator) + } + updateOptions(e) { + super.updateOptions(e), e.overrideStyles && this.updateStyles(e.overrideStyles), + void 0 !== e.multipleSelectionSupport && this.listSupportsMultiSelect + .set(!!e.multipleSelectionSupport) + } + updateStyles(e) { + var t; + null === (t = this._styler) || void 0 === t || t.dispose(), this._styler = + (0, nt.Jl)(this, this.themeService, e) + } + dispose() { + var e; + null === (e = this._styler) || void 0 === e || e.dispose(), this.disposables + .dispose(), super.dispose() + } + }; + At = rt([st(5, Xe.i6), st(6, at), st(7, ot.XE), st(8, Ye.Ui), st(9, tt.d)], + At); + let Rt = class extends D { + constructor(e, t, i, n, o, r, s, l, d, c, h) { + const u = void 0 !== r.horizontalScrolling ? r.horizontalScrolling : + Boolean(c.getValue(wt)), + [g, p] = Tt(r, c, h); + super(e, t, i, n, o, Object.assign(Object.assign(Object.assign({ + keyboardSupport: !1 + }, (0, nt.o)(d.getColorTheme(), nt.O2)), g), { + horizontalScrolling: u + })), this.disposables = new a.SL, this.disposables.add(p), this.contextKeyService = + _t(s, this), this.themeService = d, this.listSupportsMultiSelect = + ct.bindTo(this.contextKeyService), this.listSupportsMultiSelect.set(! + 1 !== r.multipleSelectionSupport), mt.bindTo(this.contextKeyService) + .set(Boolean(r.selectionNavigation)), this.listHasSelectionOrFocus = + ut.bindTo(this.contextKeyService), this.listDoubleSelection = gt.bindTo( + this.contextKeyService), this.listMultiSelection = pt.bindTo(this.contextKeyService), + this.horizontalScrolling = r.horizontalScrolling, this._useAltAsMultipleSelectionModifier = + Et(c), this.disposables.add(this.contextKeyService), this.disposables + .add(l.register(this)), r.overrideStyles && this.updateStyles(r.overrideStyles), + this.disposables.add(this.onDidChangeSelection((() => { + const e = this.getSelection(), + t = this.getFocus(); + this.contextKeyService.bufferChangeEvents((() => { + this.listHasSelectionOrFocus.set(e.length > 0 || t.length > + 0), this.listMultiSelection.set(e.length > 1), this.listDoubleSelection + .set(2 === e.length) + })) + }))), this.disposables.add(this.onDidChangeFocus((() => { + const e = this.getSelection(), + t = this.getFocus(); + this.listHasSelectionOrFocus.set(e.length > 0 || t.length > 0) + }))), this.disposables.add(c.onDidChangeConfiguration((e => { + e.affectsConfiguration(bt) && (this._useAltAsMultipleSelectionModifier = + Et(c)); + let t = {}; + if (e.affectsConfiguration(wt) && void 0 === this.horizontalScrolling) { + const e = Boolean(c.getValue(wt)); + t = Object.assign(Object.assign({}, t), { + horizontalScrolling: e + }) + } + if (e.affectsConfiguration(kt)) { + const e = Boolean(c.getValue(kt)); + t = Object.assign(Object.assign({}, t), { + smoothScrolling: e + }) + } + if (e.affectsConfiguration(Lt)) { + const e = c.getValue(Lt); + t = Object.assign(Object.assign({}, t), { + mouseWheelScrollSensitivity: e + }) + } + if (e.affectsConfiguration(Nt)) { + const e = c.getValue(Nt); + t = Object.assign(Object.assign({}, t), { + fastScrollSensitivity: e + }) + } + Object.keys(t).length > 0 && this.updateOptions(t) + }))), this.navigator = new Ft(this, Object.assign({ + configurationService: c + }, r)), this.disposables.add(this.navigator) + } + updateOptions(e) { + super.updateOptions(e), e.overrideStyles && this.updateStyles(e.overrideStyles), + void 0 !== e.multipleSelectionSupport && this.listSupportsMultiSelect + .set(!!e.multipleSelectionSupport) + } + updateStyles(e) { + var t; + null === (t = this._styler) || void 0 === t || t.dispose(), this._styler = + (0, nt.Jl)(this, this.themeService, e) + } + dispose() { + var e; + null === (e = this._styler) || void 0 === e || e.dispose(), this.disposables + .dispose(), super.dispose() + } + }; + Rt = rt([st(6, Xe.i6), st(7, at), st(8, ot.XE), st(9, Ye.Ui), st(10, tt.d)], + Rt); + class Ot extends a.JT { + constructor(e, t) { + var i; + super(), this.widget = e, this._onDidOpen = this._register(new s.Q5), + this.onDidOpen = this._onDidOpen.event, this._register(s.ju.filter( + this.widget.onDidChangeSelection, (e => e.browserEvent instanceof KeyboardEvent) + )((e => this.onSelectionFromKeyboard(e)))), this._register(this.widget + .onPointer((e => this.onPointer(e.element, e.browserEvent)))), this + ._register(this.widget.onMouseDblClick((e => this.onMouseDblClick(e.element, + e.browserEvent)))), "boolean" != typeof(null == t ? void 0 : t.openOnSingleClick) && + (null == t ? void 0 : t.configurationService) ? (this.openOnSingleClick = + "doubleClick" !== (null == t ? void 0 : t.configurationService.getValue( + vt)), this._register(null == t ? void 0 : t.configurationService.onDidChangeConfiguration( + (() => { + this.openOnSingleClick = "doubleClick" !== (null == t ? void 0 : + t.configurationService.getValue(vt)) + })))) : this.openOnSingleClick = null === (i = null == t ? void 0 : + t.openOnSingleClick) || void 0 === i || i + } + onSelectionFromKeyboard(e) { + if (1 !== e.elements.length) return; + const t = e.browserEvent, + i = "boolean" != typeof t.preserveFocus || t.preserveFocus, + n = "boolean" == typeof t.pinned ? t.pinned : !i; + this._open(this.getSelectedElement(), i, n, !1, e.browserEvent) + } + onPointer(e, t) { + if (!this.openOnSingleClick) return; + if (2 === t.detail) return; + const i = 1 === t.button, + n = t.ctrlKey || t.metaKey || t.altKey; + this._open(e, !0, i, n, t) + } + onMouseDblClick(e, t) { + if (!t) return; + const i = t.target; + if (i.classList.contains("monaco-tl-twistie") || i.classList.contains( + "monaco-icon-label") && i.classList.contains("folder-icon") && t.offsetX < + 16) return; + const n = t.ctrlKey || t.metaKey || t.altKey; + this._open(e, !1, !0, n, t) + } + _open(e, t, i, n, o) { + e && this._onDidOpen.fire({ + editorOptions: { + preserveFocus: t, + pinned: i, + revealIfVisible: !0 + }, + sideBySide: n, + element: e, + browserEvent: o + }) + } + } + class Pt extends Ot { + constructor(e, t) { + super(e, t), this.widget = e + } + getSelectedElement() { + return this.widget.getSelectedElements()[0] + } + } + class Ft extends Ot { + constructor(e, t) { + super(e, t) + } + getSelectedElement() { + return this.widget.getSelectedElements()[0] + } + } + class Bt extends Ot { + constructor(e, t) { + super(e, t) + } + getSelectedElement() { + var e; + return null !== (e = this.widget.getSelection()[0]) && void 0 !== e ? + e : void 0 + } + } + + function Wt(e, t) { + let i = !1; + return n => { + if (i) return i = !1, !1; + const o = t.softDispatch(n, e); + return o && o.enterChord ? (i = !0, !1) : (i = !1, !0) + } + } + let zt = class extends De { + constructor(e, t, i, n, o, r, s, a, l, d, c) { + const { + options: h, + getAutomaticKeyboardNavigation: u, + disposable: g + } = Kt(t, o, r, l, d, c); + super(e, t, i, n, h), this.disposables.add(g), this.internals = new $t( + this, o, u, o.overrideStyles, r, s, a, l, c), this.disposables.add( + this.internals) + } + updateOptions(e) { + super.updateOptions(e), this.internals.updateOptions(e) + } + }; + zt = rt([st(5, Xe.i6), st(6, at), st(7, ot.XE), st(8, Ye.Ui), st(9, tt.d), + st(10, Ge.F) + ], zt); + let Vt = class extends Ie { + constructor(e, t, i, n, o, r, s, a, l, d, c) { + const { + options: h, + getAutomaticKeyboardNavigation: u, + disposable: g + } = Kt(t, o, r, l, d, c); + super(e, t, i, n, h), this.disposables.add(g), this.internals = new $t( + this, o, u, o.overrideStyles, r, s, a, l, c), this.disposables.add( + this.internals) + } + updateOptions(e = {}) { + super.updateOptions(e), e.overrideStyles && this.internals.updateStyleOverrides( + e.overrideStyles), this.internals.updateOptions(e) + } + }; + Vt = rt([st(5, Xe.i6), st(6, at), st(7, ot.XE), st(8, Ye.Ui), st(9, tt.d), + st(10, Ge.F) + ], Vt); + let Ht = class extends Ze { + constructor(e, t, i, n, o, r, s, a, l, d, c, h) { + const { + options: u, + getAutomaticKeyboardNavigation: g, + disposable: p + } = Kt(t, r, s, d, c, h); + super(e, t, i, n, o, u), this.disposables.add(p), this.internals = + new $t(this, r, g, r.overrideStyles, s, a, l, d, h), this.disposables + .add(this.internals) + } + updateOptions(e = {}) { + super.updateOptions(e), e.overrideStyles && this.internals.updateStyleOverrides( + e.overrideStyles), this.internals.updateOptions(e) + } + }; + Ht = rt([st(6, Xe.i6), st(7, at), st(8, ot.XE), st(9, Ye.Ui), st(10, tt.d), + st(11, Ge.F) + ], Ht); + let Ut = class extends je { + constructor(e, t, i, n, o, r, s, a, l, d, c, h) { + const { + options: u, + getAutomaticKeyboardNavigation: g, + disposable: p + } = Kt(t, r, s, d, c, h); + super(e, t, i, n, o, u), this.disposables.add(p), this.internals = + new $t(this, r, g, r.overrideStyles, s, a, l, d, h), this.disposables + .add(this.internals) + } + get onDidOpen() { + return this.internals.onDidOpen + } + updateOptions(e = {}) { + super.updateOptions(e), e.overrideStyles && this.internals.updateStyleOverrides( + e.overrideStyles), this.internals.updateOptions(e) + } + }; + Ut = rt([st(6, Xe.i6), st(7, at), st(8, ot.XE), st(9, Ye.Ui), st(10, tt.d), + st(11, Ge.F) + ], Ut); + let jt = class extends qe { + constructor(e, t, i, n, o, r, s, a, l, d, c, h, u) { + const { + options: g, + getAutomaticKeyboardNavigation: p, + disposable: m + } = Kt(t, s, a, c, h, u); + super(e, t, i, n, o, r, g), this.disposables.add(m), this.internals = + new $t(this, s, p, s.overrideStyles, a, l, d, c, u), this.disposables + .add(this.internals) + } + updateOptions(e) { + super.updateOptions(e), this.internals.updateOptions(e) + } + }; + + function Kt(e, t, i, n, o, r) { + var s; + const a = () => { + let e = Boolean(i.getContextKeyValue(ft)); + return e && (e = Boolean(n.getValue(yt))), e + }, + l = r.isScreenReaderOptimized(), + d = t.simpleKeyboardNavigation || l ? "simple" : n.getValue(Ct), + c = void 0 !== t.horizontalScrolling ? t.horizontalScrolling : Boolean( + n.getValue(wt)), + [h, u] = Tt(t, n, o), + g = t.additionalScrollHeight; + return { + getAutomaticKeyboardNavigation: a, + disposable: u, + options: Object.assign(Object.assign({ + keyboardSupport: !1 + }, h), { + indent: "number" == typeof n.getValue(St) ? n.getValue(St) : void 0, + renderIndentGuides: n.getValue(xt), + smoothScrolling: Boolean(n.getValue(kt)), + automaticKeyboardNavigation: a(), + simpleKeyboardNavigation: "simple" === d, + filterOnType: "filter" === d, + horizontalScrolling: c, + keyboardNavigationEventFilter: Wt(e, o), + additionalScrollHeight: g, + hideTwistiesOfChildlessElements: t.hideTwistiesOfChildlessElements, + expandOnlyOnTwistieClick: null !== (s = t.expandOnlyOnTwistieClick) && + void 0 !== s ? s : "doubleClick" === n.getValue(Dt) + }) + } + } + jt = rt([st(7, Xe.i6), st(8, at), st(9, ot.XE), st(10, Ye.Ui), st(11, tt.d), + st(12, Ge.F) + ], jt); + let $t = class { + constructor(e, t, i, n, o, r, s, a, l) { + this.tree = e, this.themeService = s, this.disposables = [], this.contextKeyService = + _t(o, e), this.listSupportsMultiSelect = ct.bindTo(this.contextKeyService), + this.listSupportsMultiSelect.set(!1 !== t.multipleSelectionSupport), + mt.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)), + this.hasSelectionOrFocus = ut.bindTo(this.contextKeyService), this.hasDoubleSelection = + gt.bindTo(this.contextKeyService), this.hasMultiSelection = pt.bindTo( + this.contextKeyService), this._useAltAsMultipleSelectionModifier = + Et(a); + const d = new Set; + d.add(ft); + const c = () => { + const t = l.isScreenReaderOptimized() ? "simple" : a.getValue(Ct); + e.updateOptions({ + simpleKeyboardNavigation: "simple" === t, + filterOnType: "filter" === t + }) + }; + this.updateStyleOverrides(n), this.disposables.push(this.contextKeyService, + r.register(e), e.onDidChangeSelection((() => { + const t = e.getSelection(), + i = e.getFocus(); + this.contextKeyService.bufferChangeEvents((() => { + this.hasSelectionOrFocus.set(t.length > 0 || i.length > 0), + this.hasMultiSelection.set(t.length > 1), this.hasDoubleSelection + .set(2 === t.length) + })) + })), e.onDidChangeFocus((() => { + const t = e.getSelection(), + i = e.getFocus(); + this.hasSelectionOrFocus.set(t.length > 0 || i.length > 0) + })), a.onDidChangeConfiguration((n => { + let o = {}; + if (n.affectsConfiguration(bt) && (this._useAltAsMultipleSelectionModifier = + Et(a)), n.affectsConfiguration(St)) { + const e = a.getValue(St); + o = Object.assign(Object.assign({}, o), { + indent: e + }) + } + if (n.affectsConfiguration(xt)) { + const e = a.getValue(xt); + o = Object.assign(Object.assign({}, o), { + renderIndentGuides: e + }) + } + if (n.affectsConfiguration(kt)) { + const e = Boolean(!!a.getValue(kt)); + o = Object.assign(Object.assign({}, o), { + smoothScrolling: e + }) + } + if (n.affectsConfiguration(Ct) && c(), n.affectsConfiguration(yt) && + (o = Object.assign(Object.assign({}, o), { + automaticKeyboardNavigation: i() + })), n.affectsConfiguration(wt) && void 0 === t.horizontalScrolling + ) { + const e = Boolean(!!a.getValue(wt)); + o = Object.assign(Object.assign({}, o), { + horizontalScrolling: e + }) + } + if (n.affectsConfiguration(Dt) && void 0 === t.expandOnlyOnTwistieClick && + (o = Object.assign(Object.assign({}, o), { + expandOnlyOnTwistieClick: "doubleClick" === a.getValue(Dt) + })), n.affectsConfiguration(Lt)) { + const e = a.getValue(Lt); + o = Object.assign(Object.assign({}, o), { + mouseWheelScrollSensitivity: e + }) + } + if (n.affectsConfiguration(Nt)) { + const e = a.getValue(Nt); + o = Object.assign(Object.assign({}, o), { + fastScrollSensitivity: e + }) + } + Object.keys(o).length > 0 && e.updateOptions(o) + })), this.contextKeyService.onDidChangeContext((t => { + t.affectsSome(d) && e.updateOptions({ + automaticKeyboardNavigation: i() + }) + })), l.onDidChangeScreenReaderOptimized((() => c()))), this.navigator = + new Bt(e, Object.assign({ + configurationService: a + }, t)), this.disposables.push(this.navigator) + } + get onDidOpen() { + return this.navigator.onDidOpen + } + updateOptions(e) { + void 0 !== e.multipleSelectionSupport && this.listSupportsMultiSelect + .set(!!e.multipleSelectionSupport) + } + updateStyleOverrides(e) { + (0, a.B9)(this.styler), this.styler = e ? (0, nt.Jl)(this.tree, this.themeService, + e) : a.JT.None + } + dispose() { + this.disposables = (0, a.B9)(this.disposables), (0, a.B9)(this.styler), + this.styler = void 0 + } + }; + $t = rt([st(4, Xe.i6), st(5, at), st(6, ot.XE), st(7, Ye.Ui), st(8, Ge.F)], + $t), it.B.as(Qe.IP.Configuration).registerConfiguration({ + id: "workbench", + order: 7, + title: (0, ie.N)("workbenchConfigurationTitle", "Workbench"), + type: "object", + properties: { + [bt]: { + type: "string", + enum: ["ctrlCmd", "alt"], + enumDescriptions: [(0, ie.N)("multiSelectModifier.ctrlCmd", + "Maps to `Control` on Windows and Linux and to `Command` on macOS." + ), (0, ie.N)("multiSelectModifier.alt", + "Maps to `Alt` on Windows and Linux and to `Option` on macOS.")], + default: "ctrlCmd", + description: (0, ie.N)({ + key: "multiSelectModifier", + comment: [ + "- `ctrlCmd` refers to a value the setting can take and should not be localized.", + "- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized." + ] + }, + "The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier." + ) + }, [vt]: { + type: "string", + enum: ["singleClick", "doubleClick"], + default: "singleClick", + description: (0, ie.N)({ + key: "openModeModifier", + comment: [ + "`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized." + ] + }, + "Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable." + ) + }, [wt]: { + type: "boolean", + default: !1, + description: (0, ie.N)("horizontalScrolling setting", + "Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication." + ) + }, [St]: { + type: "number", + default: 8, + minimum: 0, + maximum: 40, + description: (0, ie.N)("tree indent setting", + "Controls tree indentation in pixels.") + }, [xt]: { + type: "string", + enum: ["none", "onHover", "always"], + default: "onHover", + description: (0, ie.N)("render tree indent guides", + "Controls whether the tree should render indent guides.") + }, [kt]: { + type: "boolean", + default: !1, + description: (0, ie.N)("list smoothScrolling setting", + "Controls whether lists and trees have smooth scrolling.") + }, [Lt]: { + type: "number", + default: 1, + description: (0, ie.N)("Mouse Wheel Scroll Sensitivity", + "A multiplier to be used on the deltaX and deltaY of mouse wheel scroll events." + ) + }, [Nt]: { + type: "number", + default: 5, + description: (0, ie.N)("Fast Scroll Sensitivity", + "Scrolling speed multiplier when pressing Alt.") + }, [Ct]: { + type: "string", + enum: ["simple", "highlight", "filter"], + enumDescriptions: [(0, ie.N)("keyboardNavigationSettingKey.simple", + "Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes." + ), (0, ie.N)("keyboardNavigationSettingKey.highlight", + "Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements." + ), (0, ie.N)("keyboardNavigationSettingKey.filter", + "Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input." + )], + default: "highlight", + description: (0, ie.N)("keyboardNavigationSettingKey", + "Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter." + ) + }, [yt]: { + type: "boolean", + default: !0, + markdownDescription: (0, ie.N)( + "automatic keyboard navigation setting", + "Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut." + ) + }, [Dt]: { + type: "string", + enum: ["singleClick", "doubleClick"], + default: "singleClick", + description: (0, ie.N)("expand mode", + "Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable." + ) + } + } + }) + }, + 3557: (e, t, i) => { + "use strict"; + i.d(t, { + VZ: () => r, + in : () => s, + kw: () => d, + $V: () => c + }); + var n = i(4669), + o = i(5976); + const r = (0, i(2065).yh)("logService"); + var s; + ! function(e) { + e[e.Trace = 0] = "Trace", e[e.Debug = 1] = "Debug", e[e.Info = 2] = + "Info", e[e.Warning = 3] = "Warning", e[e.Error = 4] = "Error", e[e.Critical = + 5] = "Critical", e[e.Off = 6] = "Off" + }(s || (s = {})); + const a = s.Info; + class l extends o.JT { + constructor() { + super(...arguments), this.level = a, this._onDidChangeLogLevel = this + ._register(new n.Q5) + } + setLevel(e) { + this.level !== e && (this.level = e, this._onDidChangeLogLevel.fire( + this.level)) + } + getLevel() { + return this.level + } + } + class d extends l { + constructor(e = a) { + super(), this.setLevel(e) + } + trace(e, ...t) { + this.getLevel() <= s.Trace && console.log("%cTRACE", "color: #888", e, + ...t) + } + debug(e, ...t) { + this.getLevel() <= s.Debug && console.log("%cDEBUG", + "background: #eee; color: #888", e, ...t) + } + info(e, ...t) { + this.getLevel() <= s.Info && console.log("%c INFO", "color: #33f", e, + ...t) + } + error(e, ...t) { + this.getLevel() <= s.Error && console.log("%c ERR", "color: #f33", e, + ...t) + } + dispose() {} + } + class c extends o.JT { + constructor(e) { + super(), this.logger = e, this._register(e) + } + getLevel() { + return this.logger.getLevel() + } + trace(e, ...t) { + this.logger.trace(e, ...t) + } + debug(e, ...t) { + this.logger.debug(e, ...t) + } + info(e, ...t) { + this.logger.info(e, ...t) + } + error(e, ...t) { + this.logger.error(e, ...t) + } + } + }, + 8674: (e, t, i) => { + "use strict"; + i.d(t, { + ZL: () => n, + H0: () => o, + lT: () => l + }); + var n, o, r = i(4603), + s = i(3580), + a = i(2065); + ! function(e) { + e[e.Hint = 1] = "Hint", e[e.Info = 2] = "Info", e[e.Warning = 4] = + "Warning", e[e.Error = 8] = "Error" + }(n || (n = {})), + function(e) { + e.compare = function(e, t) { + return t - e + }; + const t = Object.create(null); + t[e.Error] = (0, s.N)("sev.error", "Error"), t[e.Warning] = (0, s.N)( + "sev.warning", "Warning"), t[e.Info] = (0, s.N)("sev.info", "Info"), e + .toString = function(e) { + return t[e] || "" + }, e.fromSeverity = function(t) { + switch (t) { + case r.Z.Error: + return e.Error; + case r.Z.Warning: + return e.Warning; + case r.Z.Info: + return e.Info; + case r.Z.Ignore: + return e.Hint + } + }, e.toSeverity = function(t) { + switch (t) { + case e.Error: + return r.Z.Error; + case e.Warning: + return r.Z.Warning; + case e.Info: + return r.Z.Info; + case e.Hint: + return r.Z.Ignore + } + } + }(n || (n = {})), + function(e) { + const t = ""; + + function i(e, i) { + let o = [t]; + return e.source ? o.push(e.source.replace("¦", "\\¦")) : o.push(t), e.code ? + "string" == typeof e.code ? o.push(e.code.replace("¦", "\\¦")) : o.push( + e.code.value.replace("¦", "\\¦")) : o.push(t), void 0 !== e.severity && + null !== e.severity ? o.push(n.toString(e.severity)) : o.push(t), e.message && + i ? o.push(e.message.replace("¦", "\\¦")) : o.push(t), void 0 !== e.startLineNumber && + null !== e.startLineNumber ? o.push(e.startLineNumber.toString()) : o.push( + t), void 0 !== e.startColumn && null !== e.startColumn ? o.push(e.startColumn + .toString()) : o.push(t), void 0 !== e.endLineNumber && null !== e.endLineNumber ? + o.push(e.endLineNumber.toString()) : o.push(t), void 0 !== e.endColumn && + null !== e.endColumn ? o.push(e.endColumn.toString()) : o.push(t), o.push( + t), o.join("¦") + } + e.makeKey = function(e) { + return i(e, !0) + }, e.makeKeyOptionalMessage = i + }(o || (o = {})); + const l = (0, a.yh)("markerService") + }, + 9422: (e, t, i) => { + "use strict"; + i.d(t, { + lT: () => n, + EO: () => o + }), i(4603); + const n = (0, i(2065).yh)("notificationService"); + class o {} + }, + 988: (e, t, i) => { + "use strict"; + i.d(t, { + v4: () => l, + SW: () => d, + xn: () => c + }); + var n = i(5976), + o = i(7295), + r = i(666), + s = i(2065), + a = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + const l = (0, s.yh)("openerService"), + d = Object.freeze({ + _serviceBrand: void 0, + registerOpener: () => n.JT.None, + registerValidator: () => n.JT.None, + registerExternalUriResolver: () => n.JT.None, + setDefaultExternalOpener() {}, + registerExternalOpener: () => n.JT.None, + open() { + return a(this, void 0, void 0, (function*() { + return !1 + })) + }, + resolveExternalUri(e) { + return a(this, void 0, void 0, (function*() { + return { + resolved: e, + dispose() {} + } + })) + } + }); + + function c(e, t) { + return r.o.isUri(e) ? (0, o.qq)(e.scheme, t) : (0, o.ok)(e, t + ":") + } + }, + 535: (e, t, i) => { + "use strict"; + i.d(t, { + E: () => o, + e: () => r + }); + var n = i(2065); + class o { + constructor(e) { + this.callback = e + } + report(e) { + this._value = e, this.callback(this._value) + } + } + o.None = Object.freeze({ + report() {} + }); + const r = (0, n.yh)("editorProgressService") + }, + 725: (e, t, i) => { + "use strict"; + i.d(t, { + Ry: () => n, + IP: () => a + }); + var n, o = i(9488), + r = i(5976), + s = i(9872); + ! function(e) { + e[e.PRESERVE = 0] = "PRESERVE", e[e.LAST = 1] = "LAST" + }(n || (n = {})); + const a = { + Quickaccess: "workbench.contributions.quickaccess" + }; + s.B.add(a.Quickaccess, new class { + constructor() { + this.providers = [], this.defaultProvider = void 0 + } + registerQuickAccessProvider(e) { + return 0 === e.prefix.length ? this.defaultProvider = e : this.providers + .push(e), this.providers.sort(((e, t) => t.prefix.length - e.prefix + .length)), (0, r.OF)((() => { + this.providers.splice(this.providers.indexOf(e), 1), this.defaultProvider === + e && (this.defaultProvider = void 0) + })) + } + getQuickAccessProviders() { + return (0, o.kX)([this.defaultProvider, ...this.providers]) + } + getQuickAccessProvider(e) { + return e && this.providers.find((t => e.startsWith(t.prefix))) || + this.defaultProvider + } + }) + }, + 1157: (e, t, i) => { + "use strict"; + i.d(t, { + jG: () => o.jG, + eJ: () => r + }); + var n = i(2065), + o = i(7746); + const r = (0, n.yh)("quickInputService") + }, + 9872: (e, t, i) => { + "use strict"; + i.d(t, { + B: () => r + }); + var n = i(5146), + o = i(8401); + const r = new class { + constructor() { + this.data = new Map + } + add(e, t) { + n.ok(o.HD(e)), n.ok(o.Kn(t)), n.ok(!this.data.has(e), + "There is already an extension with this id"), this.data.set(e, t) + } + as(e) { + return this.data.get(e) || null + } + } + }, + 6904: (e, t, i) => { + "use strict"; + i.d(t, { + Uy: () => g, + vm: () => f, + fk: () => p + }); + var n, o = i(4669), + r = i(5976), + s = i(8401), + a = i(5393), + l = function(e, t, i, n) { + return new(i || (i = Promise))((function(o, r) { + function s(e) { + try { + l(n.next(e)) + } catch (e) { + r(e) + } + } + + function a(e) { + try { + l(n.throw(e)) + } catch (e) { + r(e) + } + } + + function l(e) { + var t; + e.done ? o(e.value) : (t = e.value, t instanceof i ? t : new i(( + function(e) { + e(t) + }))).then(s, a) + } + l((n = n.apply(e, t || [])).next()) + })) + }; + ! function(e) { + e[e.None = 0] = "None", e[e.Initialized = 1] = "Initialized", e[e.Closed = + 2] = "Closed" + }(n || (n = {})); + class d extends r.JT { + constructor(e, t = Object.create(null)) { + super(), this.database = e, this.options = t, this._onDidChangeStorage = + this._register(new o.Q5), this.onDidChangeStorage = this._onDidChangeStorage + .event, this.state = n.None, this.cache = new Map, this.flushDelayer = + new a.rH(d.DEFAULT_FLUSH_DELAY), this.pendingDeletes = new Set, this + .pendingInserts = new Map, this.whenFlushedCallbacks = [], this.registerListeners() + } + registerListeners() { + this._register(this.database.onDidChangeItemsExternal((e => this.onDidChangeItemsExternal( + e)))) + } + onDidChangeItemsExternal(e) { + var t, i; + null === (t = e.changed) || void 0 === t || t.forEach(((e, t) => this + .accept(t, e))), null === (i = e.deleted) || void 0 === i || i.forEach( + (e => this.accept(e, void 0))) + } + accept(e, t) { + if (this.state === n.Closed) return; + let i = !1; + (0, s.Jp)(t) ? i = this.cache.delete(e): this.cache.get(e) !== t && ( + this.cache.set(e, t), i = !0), i && this._onDidChangeStorage.fire(e) + } + get(e, t) { + const i = this.cache.get(e); + return (0, s.Jp)(i) ? t : i + } + getBoolean(e, t) { + const i = this.get(e); + return (0, s.Jp)(i) ? t : "true" === i + } + getNumber(e, t) { + const i = this.get(e); + return (0, s.Jp)(i) ? t : parseInt(i, 10) + } + set(e, t) { + return l(this, void 0, void 0, (function*() { + if (this.state === n.Closed) return; + if ((0, s.Jp)(t)) return this.delete(e); + const i = String(t); + return this.cache.get(e) !== i ? (this.cache.set(e, i), this.pendingInserts + .set(e, i), this.pendingDeletes.delete(e), this._onDidChangeStorage + .fire(e), this.flushDelayer.trigger((() => this.flushPending())) + ) : void 0 + })) + } + delete(e) { + return l(this, void 0, void 0, (function*() { + if (this.state !== n.Closed) return this.cache.delete(e) ? (this.pendingDeletes + .has(e) || this.pendingDeletes.add(e), this.pendingInserts.delete( + e), this._onDidChangeStorage.fire(e), this.flushDelayer.trigger( + (() => this.flushPending()))) : void 0 + })) + } + get hasPending() { + return this.pendingInserts.size > 0 || this.pendingDeletes.size > 0 + } + flushPending() { + return l(this, void 0, void 0, (function*() { + if (!this.hasPending) return; + const e = { + insert: this.pendingInserts, + delete: this.pendingDeletes + }; + return this.pendingDeletes = new Set, this.pendingInserts = new Map, + this.database.updateItems(e).finally((() => { + var e; + if (!this.hasPending) + for (; this.whenFlushedCallbacks.length;) null === (e = this + .whenFlushedCallbacks.pop()) || void 0 === e || e() + })) + })) + } + dispose() { + this.flushDelayer.dispose(), super.dispose() + } + } + d.DEFAULT_FLUSH_DELAY = 100; + class c { + constructor() { + this.onDidChangeItemsExternal = o.ju.None, this.items = new Map + } + updateItems(e) { + return l(this, void 0, void 0, (function*() { + e.insert && e.insert.forEach(((e, t) => this.items.set(t, e))), e.delete && + e.delete.forEach((e => this.items.delete(e))) + })) + } + } + var h = i(2065); + const u = "__$__targetStorageMarker", + g = (0, h.yh)("storageService"); + var p; + ! function(e) { + e[e.NONE = 0] = "NONE", e[e.SHUTDOWN = 1] = "SHUTDOWN" + }(p || (p = {})); + class m extends r.JT { + constructor(e = { + flushInterval: m.DEFAULT_FLUSH_INTERVAL + }) { + super(), this.options = e, this._onDidChangeValue = this._register( + new o.K3), this._onDidChangeTarget = this._register(new o.K3), this + ._onWillSaveState = this._register(new o.Q5), this.onWillSaveState = + this._onWillSaveState.event, this._workspaceKeyTargets = void 0, + this._globalKeyTargets = void 0 + } + emitDidChangeValue(e, t) { + t === u ? (0 === e ? this._globalKeyTargets = void 0 : 1 === e && ( + this._workspaceKeyTargets = void 0), this._onDidChangeTarget.fire({ + scope: e + })) : this._onDidChangeValue.fire({ + scope: e, + key: t, + target: this.getKeyTargets(e)[t] + }) + } + get(e, t, i) { + var n; + return null === (n = this.getStorage(t)) || void 0 === n ? void 0 : n + .get(e, i) + } + getBoolean(e, t, i) { + var n; + return null === (n = this.getStorage(t)) || void 0 === n ? void 0 : n + .getBoolean(e, i) + } + getNumber(e, t, i) { + var n; + return null === (n = this.getStorage(t)) || void 0 === n ? void 0 : n + .getNumber(e, i) + } + store(e, t, i, n) { + (0, s.Jp)(t) ? this.remove(e, i): this.withPausedEmitters((() => { + var o; + this.updateKeyTarget(e, i, n), null === (o = this.getStorage(i)) || + void 0 === o || o.set(e, t) + })) + } + remove(e, t) { + this.withPausedEmitters((() => { + var i; + this.updateKeyTarget(e, t, void 0), null === (i = this.getStorage( + t)) || void 0 === i || i.delete(e) + })) + } + withPausedEmitters(e) { + this._onDidChangeValue.pause(), this._onDidChangeTarget.pause(); + try { + e() + } finally { + this._onDidChangeValue.resume(), this._onDidChangeTarget.resume() + } + } + updateKeyTarget(e, t, i) { + var n, o; + const r = this.getKeyTargets(t); + "number" == typeof i ? r[e] !== i && (r[e] = i, null === (n = this.getStorage( + t)) || void 0 === n || n.set(u, JSON.stringify(r))) : "number" == + typeof r[e] && (delete r[e], null === (o = this.getStorage(t)) || + void 0 === o || o.set(u, JSON.stringify(r))) + } + get workspaceKeyTargets() { + return this._workspaceKeyTargets || (this._workspaceKeyTargets = this + .loadKeyTargets(1)), this._workspaceKeyTargets + } + get globalKeyTargets() { + return this._globalKeyTargets || (this._globalKeyTargets = this.loadKeyTargets( + 0)), this._globalKeyTargets + } + getKeyTargets(e) { + return 0 === e ? this.globalKeyTargets : this.workspaceKeyTargets + } + loadKeyTargets(e) { + const t = this.get(u, e); + if (t) try { + return JSON.parse(t) + } catch (e) {} + return Object.create(null) + } + } + m.DEFAULT_FLUSH_INTERVAL = 6e4; + class f extends m { + constructor() { + super(), this.globalStorage = this._register(new d(new c)), this.workspaceStorage = + this._register(new d(new c)), this._register(this.workspaceStorage.onDidChangeStorage( + (e => this.emitDidChangeValue(1, e)))), this._register(this.globalStorage + .onDidChangeStorage((e => this.emitDidChangeValue(0, e)))) + } + getStorage(e) { + return 0 === e ? this.globalStorage : this.workspaceStorage + } + } + }, + 829: (e, t, i) => { + "use strict"; + i.d(t, { + b: () => n + }); + const n = (0, i(2065).yh)("telemetryService") + }, + 3910: (e, t, i) => { + "use strict"; + i.d(t, { + IP: () => c, + P6: () => u, + dR: () => g, + Id: () => p, + XZ: () => m, + R8: () => f, + lR: () => _, + xL: () => b, + ur: () => v, + sg: () => w, + Sw: () => C, + rh: () => y, + sE: () => S, + zJ: () => x, + dt: () => k, + PR: () => L, + XE: () => N, + Pv: () => D, + _l: () => E, + YI: () => I, + EP: () => T, + RV: () => M, + SU: () => A, + C3: () => R, + p: () => O, + _t: () => P, + OZ: () => F, + j5: () => z, + b7: () => V, + GO: () => H, + g8: () => U, + qe: () => j, + _w: () => K, + et: () => $, + AB: () => q, + yn: () => Z, + zR: () => G, + A2: () => Y, + lX: () => Q, + b6: () => X, + gp: () => J, + uo: () => ee, + pW: () => te, + fe: () => ie, + c6: () => ne, + T8: () => oe, + Du: () => re, + fE: () => se, + cv: () => ae, + NO: () => le, + D0: () => de, + Hf: () => ce, + D1: () => he, + Ng: () => ue, + zK: () => ge, + tZ: () => pe, + lo: () => me, + kJ: () => fe, + op: () => _e, + oQ: () => be, + lW: () => ve, + AW: () => we, + K1: () => Ce, + hE: () => ye, + yb: () => Se, + ES: () => xe, + Rz: () => ke, + g_: () => Le, + ny: () => Ne, + MU: () => De, + jU: () => Ee, + pn: () => Ie, + Ei: () => Te, + gk: () => Me, + pt: () => Ae, + yJ: () => Re, + Sb: () => Oe, + CN: () => Pe, + Lo: () => Fe, + _Y: () => Be, + VV: () => We, + Pp: () => ze, + Fu: () => Ve, + sK: () => He, + Cz: () => Ue, + ke: () => je, + yp: () => Ke, + P4: () => $e, + XL: () => qe, + mH: () => Ze, + LL: () => Ge, + L_: () => Ye, + _b: () => Qe, + _2: () => Xe, + Oo: () => Je, + dC: () => et, + M6: () => tt, + Tn: () => it, + rg: () => nt, + yt: () => ot, + kv: () => rt, + s$: () => st, + F3: () => at, + mV: () => lt, + $d: () => dt, + AS: () => ct, + Gw: () => ht, + PX: () => ut, + vG: () => mt, + oS: () => ft, + S: () => _t, + Un: () => bt, + ux: () => vt, + NP: () => Ct, + cb: () => yt, + Vq: () => St, + Cd: () => xt, + DE: () => kt, + Hz: () => Lt, + jb: () => Nt, + $D: () => Dt, + E3: () => Et, + ZG: () => It, + lU: () => Tt, + u2: () => Mt, + Pk: () => At, + I1: () => Rt, + U6: () => Ot, + Fm: () => Pt, + SP: () => Ft, + KT: () => Bt, + ov: () => Wt, + Gj: () => zt, + Iv: () => Vt, + kV: () => Ht, + CA: () => Ut, + Xy: () => jt, + br: () => Kt, + Jp: () => $t, + BO: () => qt, + OL: () => Zt, + Zn: () => Qt, + kw: () => Xt, + Sn: () => ei + }); + var n = i(5393), + o = i(1264), + r = i(4669), + s = i(8401), + a = i(3580), + l = i(1294), + d = i(9872); + const c = { + ColorContribution: "base.contributions.colors" + }, + h = new class { + constructor() { + this._onDidChangeSchema = new r.Q5, this.onDidChangeSchema = this._onDidChangeSchema + .event, this.colorSchema = { + type: "object", + properties: {} + }, this.colorReferenceSchema = { + type: "string", + enum: [], + enumDescriptions: [] + }, this.colorsById = {} + } + registerColor(e, t, i, n = !1, o) { + let r = { + id: e, + description: i, + defaults: t, + needsTransparency: n, + deprecationMessage: o + }; + this.colorsById[e] = r; + let s = { + type: "string", + description: i, + format: "color-hex", + defaultSnippets: [{ + body: "${1:#ff0000}" + }] + }; + return o && (s.deprecationMessage = o), this.colorSchema.properties[e] = + s, this.colorReferenceSchema.enum.push(e), this.colorReferenceSchema + .enumDescriptions.push(i), this._onDidChangeSchema.fire(), e + } + resolveDefaultColor(e, t) { + const i = this.colorsById[e]; + if (i && i.defaults) return ei(i.defaults[t.type], t) + } + getColorSchema() { + return this.colorSchema + } + toString() { + return Object.keys(this.colorsById).sort(((e, t) => { + let i = -1 === e.indexOf(".") ? 0 : 1, + n = -1 === t.indexOf(".") ? 0 : 1; + return i !== n ? i - n : e.localeCompare(t) + })).map((e => `- \`${e}\`: ${this.colorsById[e].description}`)).join( + "\n") + } + }; + + function u(e, t, i, n, o) { + return h.registerColor(e, t, i, n, o) + } + d.B.add(c.ColorContribution, h); + const g = u("foreground", { + dark: "#CCCCCC", + light: "#616161", + hc: "#FFFFFF" + }, a.N("foreground", + "Overall foreground color. This color is only used if not overridden by a component." + )), + p = u("errorForeground", { + dark: "#F48771", + light: "#A1260D", + hc: "#F48771" + }, a.N("errorForeground", + "Overall foreground color for error messages. This color is only used if not overridden by a component." + )), + m = u("icon.foreground", { + dark: "#C5C5C5", + light: "#424242", + hc: "#FFFFFF" + }, a.N("iconForeground", + "The default color for icons in the workbench.")), + f = u("focusBorder", { + dark: "#007FD4", + light: "#0090F1", + hc: "#F38518" + }, a.N("focusBorder", + "Overall border color for focused elements. This color is only used if not overridden by a component." + )), + _ = u("contrastBorder", { + light: null, + dark: null, + hc: "#6FC3DF" + }, a.N("contrastBorder", + "An extra border around elements to separate them from others for greater contrast." + )), + b = u("contrastActiveBorder", { + light: null, + dark: null, + hc: f + }, a.N("activeContrastBorder", + "An extra border around active elements to separate them from others for greater contrast." + )), + v = u("textLink.foreground", { + light: "#006AB1", + dark: "#3794FF", + hc: "#3794FF" + }, a.N("textLinkForeground", "Foreground color for links in text.")), + w = u("textLink.activeForeground", { + light: "#006AB1", + dark: "#3794FF", + hc: "#3794FF" + }, a.N("textLinkActiveForeground", + "Foreground color for links in text when clicked on and on mouse hover." + )), + C = u("textCodeBlock.background", { + light: "#dcdcdc66", + dark: "#0a0a0a66", + hc: o.Il.black + }, a.N("textCodeBlockBackground", + "Background color for code blocks in text.")), + y = u("widget.shadow", { + dark: Qt(o.Il.black, .36), + light: Qt(o.Il.black, .16), + hc: null + }, a.N("widgetShadow", + "Shadow color of widgets such as find/replace inside the editor.")), + S = u("input.background", { + dark: "#3C3C3C", + light: o.Il.white, + hc: o.Il.black + }, a.N("inputBoxBackground", "Input box background.")), + x = u("input.foreground", { + dark: g, + light: g, + hc: g + }, a.N("inputBoxForeground", "Input box foreground.")), + k = u("input.border", { + dark: null, + light: null, + hc: _ + }, a.N("inputBoxBorder", "Input box border.")), + L = u("inputOption.activeBorder", { + dark: "#007ACC00", + light: "#007ACC00", + hc: _ + }, a.N("inputBoxActiveOptionBorder", + "Border color of activated options in input fields.")), + N = u("inputOption.activeBackground", { + dark: Qt(f, .4), + light: Qt(f, .2), + hc: o.Il.transparent + }, a.N("inputOption.activeBackground", + "Background color of activated options in input fields.")), + D = u("inputOption.activeForeground", { + dark: o.Il.white, + light: o.Il.black, + hc: null + }, a.N("inputOption.activeForeground", + "Foreground color of activated options in input fields.")), + E = u("inputValidation.infoBackground", { + dark: "#063B49", + light: "#D6ECF2", + hc: o.Il.black + }, a.N("inputValidationInfoBackground", + "Input validation background color for information severity.")), + I = u("inputValidation.infoForeground", { + dark: null, + light: null, + hc: null + }, a.N("inputValidationInfoForeground", + "Input validation foreground color for information severity.")), + T = u("inputValidation.infoBorder", { + dark: "#007acc", + light: "#007acc", + hc: _ + }, a.N("inputValidationInfoBorder", + "Input validation border color for information severity.")), + M = u("inputValidation.warningBackground", { + dark: "#352A05", + light: "#F6F5D2", + hc: o.Il.black + }, a.N("inputValidationWarningBackground", + "Input validation background color for warning severity.")), + A = u("inputValidation.warningForeground", { + dark: null, + light: null, + hc: null + }, a.N("inputValidationWarningForeground", + "Input validation foreground color for warning severity.")), + R = u("inputValidation.warningBorder", { + dark: "#B89500", + light: "#B89500", + hc: _ + }, a.N("inputValidationWarningBorder", + "Input validation border color for warning severity.")), + O = u("inputValidation.errorBackground", { + dark: "#5A1D1D", + light: "#F2DEDE", + hc: o.Il.black + }, a.N("inputValidationErrorBackground", + "Input validation background color for error severity.")), + P = u("inputValidation.errorForeground", { + dark: null, + light: null, + hc: null + }, a.N("inputValidationErrorForeground", + "Input validation foreground color for error severity.")), + F = u("inputValidation.errorBorder", { + dark: "#BE1100", + light: "#BE1100", + hc: _ + }, a.N("inputValidationErrorBorder", + "Input validation border color for error severity.")), + B = u("dropdown.background", { + dark: "#3C3C3C", + light: o.Il.white, + hc: o.Il.black + }, a.N("dropdownBackground", "Dropdown background.")), + W = u("dropdown.foreground", { + dark: "#F0F0F0", + light: null, + hc: o.Il.white + }, a.N("dropdownForeground", "Dropdown foreground.")), + z = u("button.foreground", { + dark: o.Il.white, + light: o.Il.white, + hc: o.Il.white + }, a.N("buttonForeground", "Button foreground color.")), + V = u("button.background", { + dark: "#0E639C", + light: "#007ACC", + hc: null + }, a.N("buttonBackground", "Button background color.")), + H = u("button.hoverBackground", { + dark: Yt(V, .2), + light: Gt(V, .2), + hc: null + }, a.N("buttonHoverBackground", + "Button background color when hovering.")), + U = u("badge.background", { + dark: "#4D4D4D", + light: "#C4C4C4", + hc: o.Il.black + }, a.N("badgeBackground", + "Badge background color. Badges are small information labels, e.g. for search results count." + )), + j = u("badge.foreground", { + dark: o.Il.white, + light: "#333", + hc: o.Il.white + }, a.N("badgeForeground", + "Badge foreground color. Badges are small information labels, e.g. for search results count." + )), + K = u("scrollbar.shadow", { + dark: "#000000", + light: "#DDDDDD", + hc: null + }, a.N("scrollbarShadow", + "Scrollbar shadow to indicate that the view is scrolled.")), + $ = u("scrollbarSlider.background", { + dark: o.Il.fromHex("#797979").transparent(.4), + light: o.Il.fromHex("#646464").transparent(.4), + hc: Qt(_, .6) + }, a.N("scrollbarSliderBackground", + "Scrollbar slider background color.")), + q = u("scrollbarSlider.hoverBackground", { + dark: o.Il.fromHex("#646464").transparent(.7), + light: o.Il.fromHex("#646464").transparent(.7), + hc: Qt(_, .8) + }, a.N("scrollbarSliderHoverBackground", + "Scrollbar slider background color when hovering.")), + Z = u("scrollbarSlider.activeBackground", { + dark: o.Il.fromHex("#BFBFBF").transparent(.4), + light: o.Il.fromHex("#000000").transparent(.6), + hc: _ + }, a.N("scrollbarSliderActiveBackground", + "Scrollbar slider background color when clicked on.")), + G = u("progressBar.background", { + dark: o.Il.fromHex("#0E70C0"), + light: o.Il.fromHex("#0E70C0"), + hc: _ + }, a.N("progressBarBackground", + "Background color of the progress bar that can show for long running operations." + )), + Y = u("editorError.background", { + dark: null, + light: null, + hc: null + }, a.N("editorError.background", + "Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations." + ), !0), + Q = u("editorError.foreground", { + dark: "#F14C4C", + light: "#E51400", + hc: null + }, a.N("editorError.foreground", + "Foreground color of error squigglies in the editor.")), + X = u("editorError.border", { + dark: null, + light: null, + hc: o.Il.fromHex("#E47777").transparent(.8) + }, a.N("errorBorder", "Border color of error boxes in the editor.")), + J = u("editorWarning.background", { + dark: null, + light: null, + hc: null + }, a.N("editorWarning.background", + "Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations." + ), !0), + ee = u("editorWarning.foreground", { + dark: "#CCA700", + light: "#BF8803", + hc: null + }, a.N("editorWarning.foreground", + "Foreground color of warning squigglies in the editor.")), + te = u("editorWarning.border", { + dark: null, + light: null, + hc: o.Il.fromHex("#FFCC00").transparent(.8) + }, a.N("warningBorder", "Border color of warning boxes in the editor.")), + ie = u("editorInfo.background", { + dark: null, + light: null, + hc: null + }, a.N("editorInfo.background", + "Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations." + ), !0), + ne = u("editorInfo.foreground", { + dark: "#3794FF", + light: "#1a85ff", + hc: "#3794FF" + }, a.N("editorInfo.foreground", + "Foreground color of info squigglies in the editor.")), + oe = u("editorInfo.border", { + dark: null, + light: null, + hc: o.Il.fromHex("#3794FF").transparent(.8) + }, a.N("infoBorder", "Border color of info boxes in the editor.")), + re = u("editorHint.foreground", { + dark: o.Il.fromHex("#eeeeee").transparent(.7), + light: "#6c6c6c", + hc: null + }, a.N("editorHint.foreground", + "Foreground color of hint squigglies in the editor.")), + se = u("editorHint.border", { + dark: null, + light: null, + hc: o.Il.fromHex("#eeeeee").transparent(.8) + }, a.N("hintBorder", "Border color of hint boxes in the editor.")), + ae = u("editor.background", { + light: "#fffffe", + dark: "#1E1E1E", + hc: o.Il.black + }, a.N("editorBackground", "Editor background color.")), + le = u("editor.foreground", { + light: "#333333", + dark: "#BBBBBB", + hc: o.Il.white + }, a.N("editorForeground", "Editor default foreground color.")), + de = u("editorWidget.background", { + dark: "#252526", + light: "#F3F3F3", + hc: "#0C141F" + }, a.N("editorWidgetBackground", + "Background color of editor widgets, such as find/replace.")), + ce = u("editorWidget.foreground", { + dark: g, + light: g, + hc: g + }, a.N("editorWidgetForeground", + "Foreground color of editor widgets, such as find/replace.")), + he = u("editorWidget.border", { + dark: "#454545", + light: "#C8C8C8", + hc: _ + }, a.N("editorWidgetBorder", + "Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget." + )), + ue = u("editorWidget.resizeBorder", { + light: null, + dark: null, + hc: null + }, a.N("editorWidgetResizeBorder", + "Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget." + )), + ge = u("quickInput.background", { + dark: de, + light: de, + hc: de + }, a.N("pickerBackground", + "Quick picker background color. The quick picker widget is the container for pickers like the command palette." + )), + pe = u("quickInput.foreground", { + dark: ce, + light: ce, + hc: ce + }, a.N("pickerForeground", + "Quick picker foreground color. The quick picker widget is the container for pickers like the command palette." + )), + me = u("quickInputTitle.background", { + dark: new o.Il(new o.VS(255, 255, 255, .105)), + light: new o.Il(new o.VS(0, 0, 0, .06)), + hc: "#000000" + }, a.N("pickerTitleBackground", + "Quick picker title background color. The quick picker widget is the container for pickers like the command palette." + )), + fe = u("pickerGroup.foreground", { + dark: "#3794FF", + light: "#0066BF", + hc: o.Il.white + }, a.N("pickerGroupForeground", + "Quick picker color for grouping labels.")), + _e = u("pickerGroup.border", { + dark: "#3F3F46", + light: "#CCCEDB", + hc: o.Il.white + }, a.N("pickerGroupBorder", "Quick picker color for grouping borders.")), + be = u("keybindingLabel.background", { + dark: new o.Il(new o.VS(128, 128, 128, .17)), + light: new o.Il(new o.VS(221, 221, 221, .4)), + hc: o.Il.transparent + }, a.N("keybindingLabelBackground", + "Keybinding label background color. The keybinding label is used to represent a keyboard shortcut." + )), + ve = u("keybindingLabel.foreground", { + dark: o.Il.fromHex("#CCCCCC"), + light: o.Il.fromHex("#555555"), + hc: o.Il.white + }, a.N("keybindingLabelForeground", + "Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut." + )), + we = u("keybindingLabel.border", { + dark: new o.Il(new o.VS(51, 51, 51, .6)), + light: new o.Il(new o.VS(204, 204, 204, .4)), + hc: new o.Il(new o.VS(111, 195, 223)) + }, a.N("keybindingLabelBorder", + "Keybinding label border color. The keybinding label is used to represent a keyboard shortcut." + )), + Ce = u("keybindingLabel.bottomBorder", { + dark: new o.Il(new o.VS(68, 68, 68, .6)), + light: new o.Il(new o.VS(187, 187, 187, .4)), + hc: new o.Il(new o.VS(111, 195, 223)) + }, a.N("keybindingLabelBottomBorder", + "Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut." + )), + ye = u("editor.selectionBackground", { + light: "#ADD6FF", + dark: "#264F78", + hc: "#f3f518" + }, a.N("editorSelectionBackground", "Color of the editor selection.")), + Se = u("editor.selectionForeground", { + light: null, + dark: null, + hc: "#000000" + }, a.N("editorSelectionForeground", + "Color of the selected text for high contrast.")), + xe = u("editor.inactiveSelectionBackground", { + light: Qt(ye, .5), + dark: Qt(ye, .5), + hc: Qt(ye, .5) + }, a.N("editorInactiveSelection", + "Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations." + ), !0), + ke = u("editor.selectionHighlightBackground", { + light: Jt(ye, ae, .3, .6), + dark: Jt(ye, ae, .3, .6), + hc: null + }, a.N("editorSelectionHighlight", + "Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations." + ), !0), + Le = u("editor.selectionHighlightBorder", { + light: null, + dark: null, + hc: b + }, a.N("editorSelectionHighlightBorder", + "Border color for regions with the same content as the selection.")), + Ne = u("editor.findMatchBackground", { + light: "#A8AC94", + dark: "#515C6A", + hc: null + }, a.N("editorFindMatch", "Color of the current search match.")), + De = u("editor.findMatchHighlightBackground", { + light: "#EA5C0055", + dark: "#EA5C0055", + hc: null + }, a.N("findMatchHighlight", + "Color of the other search matches. The color must not be opaque so as not to hide underlying decorations." + ), !0), + Ee = u("editor.findRangeHighlightBackground", { + dark: "#3a3d4166", + light: "#b4b4b44d", + hc: null + }, a.N("findRangeHighlight", + "Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations." + ), !0), + Ie = u("editor.findMatchBorder", { + light: null, + dark: null, + hc: b + }, a.N("editorFindMatchBorder", + "Border color of the current search match.")), + Te = u("editor.findMatchHighlightBorder", { + light: null, + dark: null, + hc: b + }, a.N("findMatchHighlightBorder", + "Border color of the other search matches.")), + Me = u("editor.findRangeHighlightBorder", { + dark: null, + light: null, + hc: Qt(b, .4) + }, a.N("findRangeHighlightBorder", + "Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations." + ), !0), + Ae = u("editor.hoverHighlightBackground", { + light: "#ADD6FF26", + dark: "#264f7840", + hc: "#ADD6FF26" + }, a.N("hoverHighlight", + "Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations." + ), !0), + Re = u("editorHoverWidget.background", { + light: de, + dark: de, + hc: de + }, a.N("hoverBackground", "Background color of the editor hover.")), + Oe = u("editorHoverWidget.foreground", { + light: ce, + dark: ce, + hc: ce + }, a.N("hoverForeground", "Foreground color of the editor hover.")), + Pe = u("editorHoverWidget.border", { + light: he, + dark: he, + hc: he + }, a.N("hoverBorder", "Border color of the editor hover.")), + Fe = u("editorHoverWidget.statusBarBackground", { + dark: Yt(Re, .2), + light: Gt(Re, .05), + hc: de + }, a.N("statusBarBackground", + "Background color of the editor hover status bar.")), + Be = u("editorLink.activeForeground", { + dark: "#4E94CE", + light: o.Il.blue, + hc: o.Il.cyan + }, a.N("activeLinkForeground", "Color of active links.")), + We = u("editorInlayHint.foreground", { + dark: Qt(j, .8), + light: Qt(j, .8), + hc: j + }, a.N("editorInlayHintForeground", "Foreground color of inline hints")), + ze = u("editorInlayHint.background", { + dark: Qt(U, .6), + light: Qt(U, .3), + hc: U + }, a.N("editorInlayHintBackground", "Background color of inline hints")), + Ve = u("editorLightBulb.foreground", { + dark: "#FFCC00", + light: "#DDB100", + hc: "#FFCC00" + }, a.N("editorLightBulbForeground", + "The color used for the lightbulb actions icon.")), + He = u("editorLightBulbAutoFix.foreground", { + dark: "#75BEFF", + light: "#007ACC", + hc: "#75BEFF" + }, a.N("editorLightBulbAutoFixForeground", + "The color used for the lightbulb auto fix actions icon.")), + Ue = new o.Il(new o.VS(155, 185, 85, .2)), + je = new o.Il(new o.VS(255, 0, 0, .2)), + Ke = u("diffEditor.insertedTextBackground", { + dark: Ue, + light: Ue, + hc: null + }, a.N("diffEditorInserted", + "Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations." + ), !0), + $e = u("diffEditor.removedTextBackground", { + dark: je, + light: je, + hc: null + }, a.N("diffEditorRemoved", + "Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations." + ), !0), + qe = u("diffEditor.insertedTextBorder", { + dark: null, + light: null, + hc: "#33ff2eff" + }, a.N("diffEditorInsertedOutline", + "Outline color for the text that got inserted.")), + Ze = u("diffEditor.removedTextBorder", { + dark: null, + light: null, + hc: "#FF008F" + }, a.N("diffEditorRemovedOutline", + "Outline color for text that got removed.")), + Ge = u("diffEditor.border", { + dark: null, + light: null, + hc: _ + }, a.N("diffEditorBorder", "Border color between the two text editors.")), + Ye = u("diffEditor.diagonalFill", { + dark: "#cccccc33", + light: "#22222233", + hc: null + }, a.N("diffDiagonalFill", + "Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views." + )), + Qe = u("list.focusBackground", { + dark: null, + light: null, + hc: null + }, a.N("listFocusBackground", + "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not." + )), + Xe = u("list.focusForeground", { + dark: null, + light: null, + hc: null + }, a.N("listFocusForeground", + "List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not." + )), + Je = u("list.focusOutline", { + dark: f, + light: f, + hc: b + }, a.N("listFocusOutline", + "List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not." + )), + et = u("list.activeSelectionBackground", { + dark: "#094771", + light: "#0060C0", + hc: null + }, a.N("listActiveSelectionBackground", + "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not." + )), + tt = u("list.activeSelectionForeground", { + dark: o.Il.white, + light: o.Il.white, + hc: null + }, a.N("listActiveSelectionForeground", + "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not." + )), + it = u("list.activeSelectionIconForeground", { + dark: null, + light: null, + hc: null + }, a.N("listActiveSelectionIconForeground", + "List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not." + )), + nt = u("list.inactiveSelectionBackground", { + dark: "#37373D", + light: "#E4E6F1", + hc: null + }, a.N("listInactiveSelectionBackground", + "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not." + )), + ot = u("list.inactiveSelectionForeground", { + dark: null, + light: null, + hc: null + }, a.N("listInactiveSelectionForeground", + "List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not." + )), + rt = u("list.inactiveSelectionIconForeground", { + dark: null, + light: null, + hc: null + }, a.N("listInactiveSelectionIconForeground", + "List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not." + )), + st = u("list.inactiveFocusBackground", { + dark: null, + light: null, + hc: null + }, a.N("listInactiveFocusBackground", + "List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not." + )), + at = u("list.inactiveFocusOutline", { + dark: null, + light: null, + hc: null + }, a.N("listInactiveFocusOutline", + "List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not." + )), + lt = u("list.hoverBackground", { + dark: "#2A2D2E", + light: "#F0F0F0", + hc: null + }, a.N("listHoverBackground", + "List/Tree background when hovering over items using the mouse.")), + dt = u("list.hoverForeground", { + dark: null, + light: null, + hc: null + }, a.N("listHoverForeground", + "List/Tree foreground when hovering over items using the mouse.")), + ct = u("list.dropBackground", { + dark: "#062F4A", + light: "#D6EBFF", + hc: null + }, a.N("listDropBackground", + "List/Tree drag and drop background when moving items around using the mouse." + )), + ht = u("list.highlightForeground", { + dark: "#18A3FF", + light: "#0066BF", + hc: f + }, a.N("highlight", + "List/Tree foreground color of the match highlights when searching inside the list/tree." + )), + ut = u("list.focusHighlightForeground", { + dark: ht, + light: (gt = et, pt = ht, "#9DDDFF", { + op: 5, + if: gt, + then: pt, + else: "#9DDDFF" + }), + hc: ht + }, a.N("listFocusHighlightForeground", + "List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree." + )); + var gt, pt; + const mt = u("listFilterWidget.background", { + light: "#efc1ad", + dark: "#653723", + hc: o.Il.black + }, a.N("listFilterWidgetBackground", + "Background color of the type filter widget in lists and trees.")), + ft = u("listFilterWidget.outline", { + dark: o.Il.transparent, + light: o.Il.transparent, + hc: "#f38518" + }, a.N("listFilterWidgetOutline", + "Outline color of the type filter widget in lists and trees.")), + _t = u("listFilterWidget.noMatchesOutline", { + dark: "#BE1100", + light: "#BE1100", + hc: _ + }, a.N("listFilterWidgetNoMatchesOutline", + "Outline color of the type filter widget in lists and trees, when there are no matches." + )), + bt = u("tree.indentGuidesStroke", { + dark: "#585858", + light: "#a9a9a9", + hc: "#a9a9a9" + }, a.N("treeIndentGuidesStroke", + "Tree stroke color for the indentation guides.")), + vt = u("tree.tableColumnsBorder", { + dark: "#CCCCCC20", + light: "#61616120", + hc: null + }, a.N("treeIndentGuidesStroke", + "Tree stroke color for the indentation guides.")), + wt = u("quickInput.list.focusBackground", { + dark: null, + light: null, + hc: null + }, "", void 0, a.N("quickInput.list.focusBackground deprecation", + "Please use quickInputList.focusBackground instead")), + Ct = u("quickInputList.focusForeground", { + dark: tt, + light: tt, + hc: tt + }, a.N("quickInput.listFocusForeground", + "Quick picker foreground color for the focused item.")), + yt = u("quickInputList.focusIconForeground", { + dark: it, + light: it, + hc: it + }, a.N("quickInput.listFocusIconForeground", + "Quick picker icon foreground color for the focused item.")), + St = u("quickInputList.focusBackground", { + dark: Xt(wt, et), + light: Xt(wt, et), + hc: null + }, a.N("quickInput.listFocusBackground", + "Quick picker background color for the focused item.")), + xt = u("menu.border", { + dark: null, + light: null, + hc: _ + }, a.N("menuBorder", "Border color of menus.")), + kt = u("menu.foreground", { + dark: W, + light: g, + hc: W + }, a.N("menuForeground", "Foreground color of menu items.")), + Lt = u("menu.background", { + dark: B, + light: B, + hc: B + }, a.N("menuBackground", "Background color of menu items.")), + Nt = u("menu.selectionForeground", { + dark: tt, + light: tt, + hc: tt + }, a.N("menuSelectionForeground", + "Foreground color of the selected menu item in menus.")), + Dt = u("menu.selectionBackground", { + dark: et, + light: et, + hc: et + }, a.N("menuSelectionBackground", + "Background color of the selected menu item in menus.")), + Et = u("menu.selectionBorder", { + dark: null, + light: null, + hc: b + }, a.N("menuSelectionBorder", + "Border color of the selected menu item in menus.")), + It = u("menu.separatorBackground", { + dark: "#BBBBBB", + light: "#888888", + hc: _ + }, a.N("menuSeparatorBackground", + "Color of a separator menu item in menus.")), + Tt = u("toolbar.hoverBackground", { + dark: "#5a5d5e50", + light: "#b8b8b850", + hc: null + }, a.N("toolbarHoverBackground", + "Toolbar background when hovering over actions using the mouse")), + Mt = u("editor.snippetTabstopHighlightBackground", { + dark: new o.Il(new o.VS(124, 124, 124, .3)), + light: new o.Il(new o.VS(10, 50, 100, .2)), + hc: new o.Il(new o.VS(124, 124, 124, .3)) + }, a.N("snippetTabstopHighlightBackground", + "Highlight background color of a snippet tabstop.")), + At = u("editor.snippetTabstopHighlightBorder", { + dark: null, + light: null, + hc: null + }, a.N("snippetTabstopHighlightBorder", + "Highlight border color of a snippet tabstop.")), + Rt = u("editor.snippetFinalTabstopHighlightBackground", { + dark: null, + light: null, + hc: null + }, a.N("snippetFinalTabstopHighlightBackground", + "Highlight background color of the final tabstop of a snippet.")), + Ot = u("editor.snippetFinalTabstopHighlightBorder", { + dark: "#525252", + light: new o.Il(new o.VS(10, 50, 100, .5)), + hc: "#525252" + }, a.N("snippetFinalTabstopHighlightBorder", + "Highlight border color of the final tabstop of a snippet.")), + Pt = u("editorOverviewRuler.findMatchForeground", { + dark: "#d186167e", + light: "#d186167e", + hc: "#AB5A00" + }, a.N("overviewRulerFindMatchForeground", + "Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations." + ), !0), + Ft = u("editorOverviewRuler.selectionHighlightForeground", { + dark: "#A0A0A0CC", + light: "#A0A0A0CC", + hc: "#A0A0A0CC" + }, a.N("overviewRulerSelectionHighlightForeground", + "Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations." + ), !0), + Bt = u("minimap.findMatchHighlight", { + light: "#d18616", + dark: "#d18616", + hc: "#AB5A00" + }, a.N("minimapFindMatchHighlight", + "Minimap marker color for find matches."), !0), + Wt = u("minimap.selectionHighlight", { + light: "#ADD6FF", + dark: "#264F78", + hc: "#ffffff" + }, a.N("minimapSelectionHighlight", + "Minimap marker color for the editor selection."), !0), + zt = u("minimap.errorHighlight", { + dark: new o.Il(new o.VS(255, 18, 18, .7)), + light: new o.Il(new o.VS(255, 18, 18, .7)), + hc: new o.Il(new o.VS(255, 50, 50, 1)) + }, a.N("minimapError", "Minimap marker color for errors.")), + Vt = u("minimap.warningHighlight", { + dark: ee, + light: ee, + hc: te + }, a.N("overviewRuleWarning", "Minimap marker color for warnings.")), + Ht = u("minimap.background", { + dark: null, + light: null, + hc: null + }, a.N("minimapBackground", "Minimap background color.")), + Ut = u("minimapSlider.background", { + light: Qt($, .5), + dark: Qt($, .5), + hc: Qt($, .5) + }, a.N("minimapSliderBackground", "Minimap slider background color.")), + jt = u("minimapSlider.hoverBackground", { + light: Qt(q, .5), + dark: Qt(q, .5), + hc: Qt(q, .5) + }, a.N("minimapSliderHoverBackground", + "Minimap slider background color when hovering.")), + Kt = u("minimapSlider.activeBackground", { + light: Qt(Z, .5), + dark: Qt(Z, .5), + hc: Qt(Z, .5) + }, a.N("minimapSliderActiveBackground", + "Minimap slider background color when clicked on.")), + $t = u("problemsErrorIcon.foreground", { + dark: Q, + light: Q, + hc: Q + }, a.N("problemsErrorIconForeground", + "The color used for the problems error icon.")), + qt = u("problemsWarningIcon.foreground", { + dark: ee, + light: ee, + hc: ee + }, a.N("problemsWarningIconForeground", + "The color used for the problems warning icon.")), + Zt = u("problemsInfoIcon.foreground", { + dark: ne, + light: ne, + hc: ne + }, a.N("problemsInfoIconForeground", + "The color used for the problems info icon.")); + + function Gt(e, t) { + return { + op: 0, + value: e, + factor: t + } + } + + function Yt(e, t) { + return { + op: 1, + value: e, + factor: t + } + } + + function Qt(e, t) { + return { + op: 2, + value: e, + factor: t + } + } + + function Xt(...e) { + return { + op: 3, + values: e + } + } + + function Jt(e, t, i, n) { + return { + op: 4, + value: e, + background: t, + factor: i, + transparency: n + } + } + + function ei(e, t) { + if (null !== e) return "string" == typeof e ? "#" === e[0] ? o.Il.fromHex( + e) : t.getColor(e) : e instanceof o.Il ? e : "object" == typeof e ? + function(e, t) { + var i, n, r; + switch (e.op) { + case 0: + return null === (i = ei(e.value, t)) || void 0 === i ? void 0 : i.darken( + e.factor); + case 1: + return null === (n = ei(e.value, t)) || void 0 === n ? void 0 : n.lighten( + e.factor); + case 2: + return null === (r = ei(e.value, t)) || void 0 === r ? void 0 : r.transparent( + e.factor); + case 3: + for (const i of e.values) { + const e = ei(i, t); + if (e) return e + } + return; + case 5: + return ei(t.defines(e.if) ? e.then : e.else, t); + case 4: + const a = ei(e.value, t); + if (!a) return; + const l = ei(e.background, t); + return l ? a.isDarkerThan(l) ? o.Il.getLighterColor(a, l, e.factor) + .transparent(e.transparency) : o.Il.getDarkerColor(a, l, e.factor) + .transparent(e.transparency) : a.transparent(e.factor * e.transparency); + default: + throw (0, s.vE)(e) + } + }(e, t) : void 0 + } + const ti = "vscode://schemas/workbench-colors"; + let ii = d.B.as(l.I.JSONContribution); + ii.registerSchema(ti, h.getColorSchema()); + const ni = new n.pY((() => ii.notifySchemaChanged(ti)), 200); + h.onDidChangeSchema((() => { + ni.isScheduled() || ni.schedule() + })) + }, + 9554: (e, t, i) => { + "use strict"; + i.d(t, { + q5: () => h, + Ks: () => u, + s_: () => f + }); + var n = i(5393), + o = i(3046), + r = i(4669), + s = i(3580), + a = i(1294), + l = i(9872), + d = i(7781); + const c = new class { + constructor() { + this._onDidChange = new r.Q5, this.onDidChange = this._onDidChange.event, + this.iconSchema = { + definitions: { + icons: { + type: "object", + properties: { + fontId: { + type: "string", + description: (0, s.N)("iconDefintion.fontId", + "The id of the font to use. If not set, the font that is defined first is used." + ) + }, + fontCharacter: { + type: "string", + description: (0, s.N)("iconDefintion.fontCharacter", + "The font character associated with the icon definition.") + } + }, + additionalProperties: !1, + defaultSnippets: [{ + body: { + fontCharacter: "\\\\e030" + } + }] + } + }, + type: "object", + properties: {} + }, this.iconReferenceSchema = { + type: "string", + pattern: `^${o.dT.iconNameExpression}$`, + enum: [], + enumDescriptions: [] + }, this.iconsById = {}, this.iconFontsById = {} + } + registerIcon(e, t, i, n) { + const o = this.iconsById[e]; + if (o) { + if (i && !o.description) { + o.description = i, this.iconSchema.properties[e].markdownDescription = + `${i} $(${e})`; + const t = this.iconReferenceSchema.enum.indexOf(e); - 1 !== t && ( + this.iconReferenceSchema.enumDescriptions[t] = i), this._onDidChange + .fire() + } + return o + } + let r = { + id: e, + description: i, + defaults: t, + deprecationMessage: n + }; + this.iconsById[e] = r; + let s = { + $ref: "#/definitions/icons" + }; + return n && (s.deprecationMessage = n), i && (s.markdownDescription = + `${i}: $(${e})`), this.iconSchema.properties[e] = s, this.iconReferenceSchema + .enum.push(e), this.iconReferenceSchema.enumDescriptions.push(i || + ""), this._onDidChange.fire(), { + id: e + } + } + getIcons() { + return Object.keys(this.iconsById).map((e => this.iconsById[e])) + } + getIcon(e) { + return this.iconsById[e] + } + getIconSchema() { + return this.iconSchema + } + getIconFont(e) { + return this.iconFontsById[e] + } + toString() { + const e = (e, t) => e.id.localeCompare(t.id), + t = e => { + for (; d.kS.isThemeIcon(e.defaults);) e = this.iconsById[e.defaults + .id]; + return `codicon codicon-${e?e.id:""}` + }; + let i = []; + i.push( + "| preview | identifier | default codicon ID | description" + ), i.push( + "| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |" + ); + const n = Object.keys(this.iconsById).map((e => this.iconsById[e])); + for (const o of n.filter((e => !!e.description)).sort(e)) i.push( + `||${o.id}|${d.kS.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|` + ); + i.push("| preview | identifier "), i.push( + "| ----------- | --------------------------------- |"); + for (const o of n.filter((e => !d.kS.isThemeIcon(e.defaults))).sort(e)) + i.push(`||${o.id}|`); + return i.join("\n") + } + }; + + function h(e, t, i, n) { + return c.registerIcon(e, t, i, n) + } + + function u() { + return c + } + l.B.add("base.contributions.icons", c), + function() { + for (const e of o.fK.all) c.registerIcon(e.id, e.definition, e.description); + o.fK.onDidRegister((e => c.registerIcon(e.id, e.definition, e.description))) + }(); + const g = "vscode://schemas/icons"; + let p = l.B.as(a.I.JSONContribution); + p.registerSchema(g, c.getIconSchema()); + const m = new n.pY((() => p.notifySchemaChanged(g)), 200); + c.onDidChange((() => { + m.isScheduled() || m.schedule() + })); + const f = h("widget-close", o.lA.close, (0, s.N)("widgetClose", + "Icon for the close action in widgets.")) + }, + 8810: (e, t, i) => { + "use strict"; + i.d(t, { + o: () => o, + WZ: () => s, + Jl: () => a, + O2: () => l, + tj: () => c + }); + var n = i(3910); + + function o(e, t) { + const i = Object.create(null); + for (let o in t) { + const r = t[o]; + r && (i[o] = (0, n.Sn)(r, e)) + } + return i + } + + function r(e, t, i) { + function n() { + const n = o(e.getColorTheme(), t); + "function" == typeof i ? i(n) : i.style(n) + } + return n(), e.onDidColorThemeChange(n) + } + + function s(e, t, i) { + return r(t, { + badgeBackground: (null == i ? void 0 : i.badgeBackground) || n.g8, + badgeForeground: (null == i ? void 0 : i.badgeForeground) || n.qe, + badgeBorder: n.lR + }, e) + } + + function a(e, t, i) { + return r(t, Object.assign(Object.assign({}, l), i || {}), e) + } + const l = { + listFocusBackground: n._b, + listFocusForeground: n._2, + listFocusOutline: n.Oo, + listActiveSelectionBackground: n.dC, + listActiveSelectionForeground: n.M6, + listActiveSelectionIconForeground: n.Tn, + listFocusAndSelectionBackground: n.dC, + listFocusAndSelectionForeground: n.M6, + listInactiveSelectionBackground: n.rg, + listInactiveSelectionIconForeground: n.kv, + listInactiveSelectionForeground: n.yt, + listInactiveFocusBackground: n.s$, + listInactiveFocusOutline: n.F3, + listHoverBackground: n.mV, + listHoverForeground: n.$d, + listDropBackground: n.AS, + listSelectionOutline: n.xL, + listHoverOutline: n.xL, + listFilterWidgetBackground: n.vG, + listFilterWidgetOutline: n.oS, + listFilterWidgetNoMatchesOutline: n.S, + listMatchesShadow: n.rh, + treeIndentGuidesStroke: n.Un, + tableColumnsBorder: n.ux + }, + d = { + shadowColor: n.rh, + borderColor: n.Cd, + foregroundColor: n.DE, + backgroundColor: n.Hz, + selectionForegroundColor: n.jb, + selectionBackgroundColor: n.$D, + selectionBorderColor: n.E3, + separatorColor: n.ZG + }; + + function c(e, t, i) { + return r(t, Object.assign(Object.assign({}, d), i), e) + } + }, + 2321: (e, t, i) => { + "use strict"; + var n; + i.d(t, { + e: () => n + }), + function(e) { + e.DARK = "dark", e.LIGHT = "light", e.HIGH_CONTRAST = "hc" + }(n || (n = {})) + }, + 7781: (e, t, i) => { + "use strict"; + i.d(t, { + XE: () => d, + EN: () => u, + kS: () => h, + m6: () => g, + IP: () => p, + Ic: () => f, + bB: () => _ + }); + var n = i(3046), + o = i(4669), + r = i(5976), + s = i(2065), + a = i(9872), + l = i(2321); + const d = (0, s.yh)("themeService"); + var c, h; + + function u(e) { + return { + id: e + } + } + + function g(e) { + switch (e) { + case l.e.DARK: + return "vs-dark"; + case l.e.HIGH_CONTRAST: + return "hc-black"; + default: + return "vs" + } + }! function(e) { + e.isThemeColor = function(e) { + return e && "object" == typeof e && "string" == typeof e.id + } + }(c || (c = {})), + function(e) { + e.isThemeIcon = function(e) { + return e && "object" == typeof e && "string" == typeof e.id && (void 0 === + e.color || c.isThemeColor(e.color)) + }; + const t = new RegExp( + `^\\$\\((${n.dT.iconNameExpression}(?:${n.dT.iconModifierExpression})?)\\)$` + ); + e.fromString = function(e) { + const i = t.exec(e); + if (!i) return; + let [, n] = i; + return { + id: n + } + }, e.modify = function(e, t) { + let i = e.id; + const n = i.lastIndexOf("~"); + return -1 !== n && (i = i.substring(0, n)), t && (i = `${i}~${t}`), { + id: i + } + }, e.isEqual = function(e, t) { + var i, n; + return e.id === t.id && (null === (i = e.color) || void 0 === i ? void 0 : + i.id) === (null === (n = t.color) || void 0 === n ? void 0 : n.id) + }, e.asThemeIcon = function(e, t) { + return { + id: e.id, + color: t ? u(t) : void 0 + } + }, e.asClassNameArray = n.dT.asClassNameArray, e.asClassName = n.dT.asClassName, + e.asCSSSelector = n.dT.asCSSSelector + }(h || (h = {})); + const p = { + ThemingContribution: "base.contributions.theming" + }; + let m = new class { + constructor() { + this.themingParticipants = [], this.themingParticipants = [], this.onThemingParticipantAddedEmitter = + new o.Q5 + } + onColorThemeChange(e) { + return this.themingParticipants.push(e), this.onThemingParticipantAddedEmitter + .fire(e), (0, r.OF)((() => { + const t = this.themingParticipants.indexOf(e); + this.themingParticipants.splice(t, 1) + })) + } + getThemingParticipants() { + return this.themingParticipants + } + }; + + function f(e) { + return m.onColorThemeChange(e) + } + a.B.add(p.ThemingContribution, m); + class _ extends r.JT { + constructor(e) { + super(), this.themeService = e, this.theme = e.getColorTheme(), this._register( + this.themeService.onDidColorThemeChange((e => this.onThemeChange(e))) + ) + } + onThemeChange(e) { + this.theme = e, this.updateStyles() + } + updateStyles() {} + } + }, + 4862: (e, t, i) => { + "use strict"; + i.d(t, { + tJ: () => n, + YO: () => o, + Xt: () => r, + gJ: () => s + }); + const n = (0, i(2065).yh)("undoRedoService"); + class o { + constructor(e, t) { + this.resource = e, this.elements = t + } + } + class r { + constructor() { + this.id = r._ID++, this.order = 1 + } + nextOrder() { + return 0 === this.id ? 0 : this.order++ + } + } + r._ID = 0, r.None = new r; + class s { + constructor() { + this.id = s._ID++, this.order = 1 + } + nextOrder() { + return 0 === this.id ? 0 : this.order++ + } + } + s._ID = 0, s.None = new s + }, + 382: (e, t, i) => { + "use strict"; + i.d(t, { + ec: () => n, + md: () => o + }), i(3702); + const n = (0, i(2065).yh)("contextService"); + class o { + constructor(e, t) { + this.raw = t, this.uri = e.uri, this.index = e.index, this.name = e.name + } + toJSON() { + return { + uri: this.uri, + name: this.name, + index: this.index + } + } + } + }, + 7418: e => { + "use strict"; + var t = Object.getOwnPropertySymbols, + i = Object.prototype.hasOwnProperty, + n = Object.prototype.propertyIsEnumerable; + + function o(e) { + if (null == e) throw new TypeError( + "Object.assign cannot be called with null or undefined"); + return Object(e) + } + e.exports = function() { + try { + if (!Object.assign) return !1; + var e = new String("abc"); + if (e[5] = "de", "5" === Object.getOwnPropertyNames(e)[0]) return !1; + for (var t = {}, i = 0; i < 10; i++) t["_" + String.fromCharCode(i)] = + i; + if ("0123456789" !== Object.getOwnPropertyNames(t).map((function(e) { + return t[e] + })).join("")) return !1; + var n = {}; + return "abcdefghijklmnopqrst".split("").forEach((function(e) { + n[e] = e + })), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, n)).join( + "") + } catch (e) { + return !1 + } + }() ? Object.assign : function(e, r) { + for (var s, a, l = o(e), d = 1; d < arguments.length; d++) { + for (var c in s = Object(arguments[d])) i.call(s, c) && (l[c] = s[c]); + if (t) { + a = t(s); + for (var h = 0; h < a.length; h++) n.call(s, a[h]) && (l[a[h]] = s[a[ + h]]) + } + } + return l + } + }, + 2703: (e, t, i) => { + "use strict"; + var n = i(414); + + function o() {} + + function r() {} + r.resetWarningCache = o, e.exports = function() { + function e(e, t, i, o, r, s) { + if (s !== n) { + var a = new Error( + "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types" + ); + throw a.name = "Invariant Violation", a + } + } + + function t() { + return e + } + e.isRequired = e; + var i = { + array: e, + bool: e, + func: e, + number: e, + object: e, + string: e, + symbol: e, + any: e, + arrayOf: t, + element: e, + elementType: e, + instanceOf: t, + node: e, + objectOf: t, + oneOf: t, + oneOfType: t, + shape: t, + exact: t, + checkPropTypes: r, + resetWarningCache: o + }; + return i.PropTypes = i, i + } + }, + 5697: (e, t, i) => { + e.exports = i(2703)() + }, + 414: e => { + "use strict"; + e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED" + }, + 4448: (e, t, i) => { + "use strict"; + var n = i(7294), + o = i(7418), + r = i(3840); + + function s(e) { + for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + + e, i = 1; i < arguments.length; i++) t += "&args[]=" + + encodeURIComponent(arguments[i]); + return "Minified React error #" + e + "; visit " + t + + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." + } + if (!n) throw Error(s(227)); + var a = new Set, + l = {}; + + function d(e, t) { + c(e, t), c(e + "Capture", t) + } + + function c(e, t) { + for (l[e] = t, e = 0; e < t.length; e++) a.add(t[e]) + } + var h = !("undefined" == typeof window || void 0 === window.document || + void 0 === window.document.createElement), + u = + /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, + g = Object.prototype.hasOwnProperty, + p = {}, + m = {}; + + function f(e, t, i, n, o, r, s) { + this.acceptsBooleans = 2 === t || 3 === t || 4 === t, this.attributeName = + n, this.attributeNamespace = o, this.mustUseProperty = i, this.propertyName = + e, this.type = t, this.sanitizeURL = r, this.removeEmptyString = s + } + var _ = {}; + "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style" + .split(" ").forEach((function(e) { + _[e] = new f(e, 0, !1, e, null, !1, !1) + })), [ + ["acceptCharset", "accept-charset"], + ["className", "class"], + ["htmlFor", "for"], + ["httpEquiv", "http-equiv"] + ].forEach((function(e) { + var t = e[0]; + _[t] = new f(t, 1, !1, e[1], null, !1, !1) + })), ["contentEditable", "draggable", "spellCheck", "value"].forEach(( + function(e) { + _[e] = new f(e, 2, !1, e.toLowerCase(), null, !1, !1) + })), ["autoReverse", "externalResourcesRequired", "focusable", + "preserveAlpha" + ].forEach((function(e) { + _[e] = new f(e, 2, !1, e, null, !1, !1) + })), + "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope" + .split(" ").forEach((function(e) { + _[e] = new f(e, 3, !1, e.toLowerCase(), null, !1, !1) + })), ["checked", "multiple", "muted", "selected"].forEach((function(e) { + _[e] = new f(e, 3, !0, e, null, !1, !1) + })), ["capture", "download"].forEach((function(e) { + _[e] = new f(e, 4, !1, e, null, !1, !1) + })), ["cols", "rows", "size", "span"].forEach((function(e) { + _[e] = new f(e, 6, !1, e, null, !1, !1) + })), ["rowSpan", "start"].forEach((function(e) { + _[e] = new f(e, 5, !1, e.toLowerCase(), null, !1, !1) + })); + var b = /[\-:]([a-z])/g; + + function v(e) { + return e[1].toUpperCase() + } + + function w(e, t, i, n) { + var o = _.hasOwnProperty(t) ? _[t] : null; + (null !== o ? 0 === o.type : !n && 2 < t.length && ("o" === t[0] || "O" === + t[0]) && ("n" === t[1] || "N" === t[1])) || (function(e, t, i, n) { + if (null == t || function(e, t, i, n) { + if (null !== i && 0 === i.type) return !1; + switch (typeof t) { + case "function": + case "symbol": + return !0; + case "boolean": + return !n && (null !== i ? !i.acceptsBooleans : "data-" !== (e = e + .toLowerCase().slice(0, 5)) && "aria-" !== e); + default: + return !1 + } + }(e, t, i, n)) return !0; + if (n) return !1; + if (null !== i) switch (i.type) { + case 3: + return !t; + case 4: + return !1 === t; + case 5: + return isNaN(t); + case 6: + return isNaN(t) || 1 > t + } + return !1 + }(t, i, o, n) && (i = null), n || null === o ? function(e) { + return !!g.call(m, e) || !g.call(p, e) && (u.test(e) ? m[e] = !0 : (p[ + e] = !0, !1)) + }(t) && (null === i ? e.removeAttribute(t) : e.setAttribute(t, "" + i)) : + o.mustUseProperty ? e[o.propertyName] = null === i ? 3 !== o.type && "" : + i : (t = o.attributeName, n = o.attributeNamespace, null === i ? e.removeAttribute( + t) : (i = 3 === (o = o.type) || 4 === o && !0 === i ? "" : "" + i, n ? + e.setAttributeNS(n, t, i) : e.setAttribute(t, i)))) + } + "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height" + .split(" ").forEach((function(e) { + var t = e.replace(b, v); + _[t] = new f(t, 1, !1, e, null, !1, !1) + })), + "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type" + .split(" ").forEach((function(e) { + var t = e.replace(b, v); + _[t] = new f(t, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1) + })), ["xml:base", "xml:lang", "xml:space"].forEach((function(e) { + var t = e.replace(b, v); + _[t] = new f(t, 1, !1, e, "http://www.w3.org/XML/1998/namespace", !1, ! + 1) + })), ["tabIndex", "crossOrigin"].forEach((function(e) { + _[e] = new f(e, 1, !1, e.toLowerCase(), null, !1, !1) + })), _.xlinkHref = new f("xlinkHref", 1, !1, "xlink:href", + "http://www.w3.org/1999/xlink", !0, !1), ["src", "href", "action", + "formAction" + ].forEach((function(e) { + _[e] = new f(e, 1, !1, e.toLowerCase(), null, !0, !0) + })); + var C = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + y = 60103, + S = 60106, + x = 60107, + k = 60108, + L = 60114, + N = 60109, + D = 60110, + E = 60112, + I = 60113, + T = 60120, + M = 60115, + A = 60116, + R = 60121, + O = 60128, + P = 60129, + F = 60130, + B = 60131; + if ("function" == typeof Symbol && Symbol.for) { + var W = Symbol.for; + y = W("react.element"), S = W("react.portal"), x = W("react.fragment"), + k = W("react.strict_mode"), L = W("react.profiler"), N = W( + "react.provider"), D = W("react.context"), E = W("react.forward_ref"), + I = W("react.suspense"), T = W("react.suspense_list"), M = W( + "react.memo"), A = W("react.lazy"), R = W("react.block"), W( + "react.scope"), O = W("react.opaque.id"), P = W( + "react.debug_trace_mode"), F = W("react.offscreen"), B = W( + "react.legacy_hidden") + } + var z, V = "function" == typeof Symbol && Symbol.iterator; + + function H(e) { + return null === e || "object" != typeof e ? null : "function" == typeof( + e = V && e[V] || e["@@iterator"]) ? e : null + } + + function U(e) { + if (void 0 === z) try { + throw Error() + } catch (e) { + var t = e.stack.trim().match(/\n( *(at )?)/); + z = t && t[1] || "" + } + return "\n" + z + e + } + var j = !1; + + function K(e, t) { + if (!e || j) return ""; + j = !0; + var i = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + try { + if (t) + if (t = function() { + throw Error() + }, Object.defineProperty(t.prototype, "props", { + set: function() { + throw Error() + } + }), "object" == typeof Reflect && Reflect.construct) { + try { + Reflect.construct(t, []) + } catch (e) { + var n = e + } + Reflect.construct(e, [], t) + } else { + try { + t.call() + } catch (e) { + n = e + } + e.call(t.prototype) + } else { + try { + throw Error() + } catch (e) { + n = e + } + e() + } + } catch (e) { + if (e && n && "string" == typeof e.stack) { + for (var o = e.stack.split("\n"), r = n.stack.split("\n"), s = o.length - + 1, a = r.length - 1; 1 <= s && 0 <= a && o[s] !== r[a];) a--; + for (; 1 <= s && 0 <= a; s--, a--) + if (o[s] !== r[a]) { + if (1 !== s || 1 !== a) + do { + if (s--, 0 > --a || o[s] !== r[a]) return "\n" + o[s].replace( + " at new ", " at ") + } while (1 <= s && 0 <= a); + break + } + } + } finally { + j = !1, Error.prepareStackTrace = i + } + return (e = e ? e.displayName || e.name : "") ? U(e) : "" + } + + function $(e) { + switch (e.tag) { + case 5: + return U(e.type); + case 16: + return U("Lazy"); + case 13: + return U("Suspense"); + case 19: + return U("SuspenseList"); + case 0: + case 2: + case 15: + return K(e.type, !1); + case 11: + return K(e.type.render, !1); + case 22: + return K(e.type._render, !1); + case 1: + return K(e.type, !0); + default: + return "" + } + } + + function q(e) { + if (null == e) return null; + if ("function" == typeof e) return e.displayName || e.name || null; + if ("string" == typeof e) return e; + switch (e) { + case x: + return "Fragment"; + case S: + return "Portal"; + case L: + return "Profiler"; + case k: + return "StrictMode"; + case I: + return "Suspense"; + case T: + return "SuspenseList" + } + if ("object" == typeof e) switch (e.$$typeof) { + case D: + return (e.displayName || "Context") + ".Consumer"; + case N: + return (e._context.displayName || "Context") + ".Provider"; + case E: + var t = e.render; + return t = t.displayName || t.name || "", e.displayName || ("" !== t ? + "ForwardRef(" + t + ")" : "ForwardRef"); + case M: + return q(e.type); + case R: + return q(e._render); + case A: + t = e._payload, e = e._init; + try { + return q(e(t)) + } catch (e) {} + } + return null + } + + function Z(e) { + switch (typeof e) { + case "boolean": + case "number": + case "object": + case "string": + case "undefined": + return e; + default: + return "" + } + } + + function G(e) { + var t = e.type; + return (e = e.nodeName) && "input" === e.toLowerCase() && ("checkbox" === + t || "radio" === t) + } + + function Y(e) { + e._valueTracker || (e._valueTracker = function(e) { + var t = G(e) ? "checked" : "value", + i = Object.getOwnPropertyDescriptor(e.constructor.prototype, t), + n = "" + e[t]; + if (!e.hasOwnProperty(t) && void 0 !== i && "function" == typeof i.get && + "function" == typeof i.set) { + var o = i.get, + r = i.set; + return Object.defineProperty(e, t, { + configurable: !0, + get: function() { + return o.call(this) + }, + set: function(e) { + n = "" + e, r.call(this, e) + } + }), Object.defineProperty(e, t, { + enumerable: i.enumerable + }), { + getValue: function() { + return n + }, + setValue: function(e) { + n = "" + e + }, + stopTracking: function() { + e._valueTracker = null, delete e[t] + } + } + } + }(e)) + } + + function Q(e) { + if (!e) return !1; + var t = e._valueTracker; + if (!t) return !0; + var i = t.getValue(), + n = ""; + return e && (n = G(e) ? e.checked ? "true" : "false" : e.value), (e = n) !== + i && (t.setValue(e), !0) + } + + function X(e) { + if (void 0 === (e = e || ("undefined" != typeof document ? document : + void 0))) return null; + try { + return e.activeElement || e.body + } catch (t) { + return e.body + } + } + + function J(e, t) { + var i = t.checked; + return o({}, t, { + defaultChecked: void 0, + defaultValue: void 0, + value: void 0, + checked: null != i ? i : e._wrapperState.initialChecked + }) + } + + function ee(e, t) { + var i = null == t.defaultValue ? "" : t.defaultValue, + n = null != t.checked ? t.checked : t.defaultChecked; + i = Z(null != t.value ? t.value : i), e._wrapperState = { + initialChecked: n, + initialValue: i, + controlled: "checkbox" === t.type || "radio" === t.type ? null != t.checked : null != + t.value + } + } + + function te(e, t) { + null != (t = t.checked) && w(e, "checked", t, !1) + } + + function ie(e, t) { + te(e, t); + var i = Z(t.value), + n = t.type; + if (null != i) "number" === n ? (0 === i && "" === e.value || e.value != + i) && (e.value = "" + i) : e.value !== "" + i && (e.value = "" + i); + else if ("submit" === n || "reset" === n) return void e.removeAttribute( + "value"); + t.hasOwnProperty("value") ? oe(e, t.type, i) : t.hasOwnProperty( + "defaultValue") && oe(e, t.type, Z(t.defaultValue)), null == t.checked && + null != t.defaultChecked && (e.defaultChecked = !!t.defaultChecked) + } + + function ne(e, t, i) { + if (t.hasOwnProperty("value") || t.hasOwnProperty("defaultValue")) { + var n = t.type; + if (!("submit" !== n && "reset" !== n || void 0 !== t.value && null !== + t.value)) return; + t = "" + e._wrapperState.initialValue, i || t === e.value || (e.value = + t), e.defaultValue = t + } + "" !== (i = e.name) && (e.name = ""), e.defaultChecked = !!e._wrapperState + .initialChecked, "" !== i && (e.name = i) + } + + function oe(e, t, i) { + "number" === t && X(e.ownerDocument) === e || (null == i ? e.defaultValue = + "" + e._wrapperState.initialValue : e.defaultValue !== "" + i && (e.defaultValue = + "" + i)) + } + + function re(e, t) { + return e = o({ + children: void 0 + }, t), (t = function(e) { + var t = ""; + return n.Children.forEach(e, (function(e) { + null != e && (t += e) + })), t + }(t.children)) && (e.children = t), e + } + + function se(e, t, i, n) { + if (e = e.options, t) { + t = {}; + for (var o = 0; o < i.length; o++) t["$" + i[o]] = !0; + for (i = 0; i < e.length; i++) o = t.hasOwnProperty("$" + e[i].value), + e[i].selected !== o && (e[i].selected = o), o && n && (e[i].defaultSelected = ! + 0) + } else { + for (i = "" + Z(i), t = null, o = 0; o < e.length; o++) { + if (e[o].value === i) return e[o].selected = !0, void(n && (e[o].defaultSelected = ! + 0)); + null !== t || e[o].disabled || (t = e[o]) + } + null !== t && (t.selected = !0) + } + } + + function ae(e, t) { + if (null != t.dangerouslySetInnerHTML) throw Error(s(91)); + return o({}, t, { + value: void 0, + defaultValue: void 0, + children: "" + e._wrapperState.initialValue + }) + } + + function le(e, t) { + var i = t.value; + if (null == i) { + if (i = t.children, t = t.defaultValue, null != i) { + if (null != t) throw Error(s(92)); + if (Array.isArray(i)) { + if (!(1 >= i.length)) throw Error(s(93)); + i = i[0] + } + t = i + } + null == t && (t = ""), i = t + } + e._wrapperState = { + initialValue: Z(i) + } + } + + function de(e, t) { + var i = Z(t.value), + n = Z(t.defaultValue); + null != i && ((i = "" + i) !== e.value && (e.value = i), null == t.defaultValue && + e.defaultValue !== i && (e.defaultValue = i)), null != n && (e.defaultValue = + "" + n) + } + + function ce(e) { + var t = e.textContent; + t === e._wrapperState.initialValue && "" !== t && null !== t && (e.value = + t) + } + var he = "http://www.w3.org/1999/xhtml"; + + function ue(e) { + switch (e) { + case "svg": + return "http://www.w3.org/2000/svg"; + case "math": + return "http://www.w3.org/1998/Math/MathML"; + default: + return "http://www.w3.org/1999/xhtml" + } + } + + function ge(e, t) { + return null == e || "http://www.w3.org/1999/xhtml" === e ? ue(t) : + "http://www.w3.org/2000/svg" === e && "foreignObject" === t ? + "http://www.w3.org/1999/xhtml" : e + } + var pe, me, fe = (me = function(e, t) { + if ("http://www.w3.org/2000/svg" !== e.namespaceURI || "innerHTML" in + e) e.innerHTML = t; + else { + for ((pe = pe || document.createElement("div")).innerHTML = "" + + t.valueOf().toString() + "", t = pe.firstChild; e.firstChild;) + e.removeChild(e.firstChild); + for (; t.firstChild;) e.appendChild(t.firstChild) + } + }, "undefined" != typeof MSApp && MSApp.execUnsafeLocalFunction ? + function(e, t, i, n) { + MSApp.execUnsafeLocalFunction((function() { + return me(e, t) + })) + } : me); + + function _e(e, t) { + if (t) { + var i = e.firstChild; + if (i && i === e.lastChild && 3 === i.nodeType) return void(i.nodeValue = + t) + } + e.textContent = t + } + var be = { + animationIterationCount: !0, + borderImageOutset: !0, + borderImageSlice: !0, + borderImageWidth: !0, + boxFlex: !0, + boxFlexGroup: !0, + boxOrdinalGroup: !0, + columnCount: !0, + columns: !0, + flex: !0, + flexGrow: !0, + flexPositive: !0, + flexShrink: !0, + flexNegative: !0, + flexOrder: !0, + gridArea: !0, + gridRow: !0, + gridRowEnd: !0, + gridRowSpan: !0, + gridRowStart: !0, + gridColumn: !0, + gridColumnEnd: !0, + gridColumnSpan: !0, + gridColumnStart: !0, + fontWeight: !0, + lineClamp: !0, + lineHeight: !0, + opacity: !0, + order: !0, + orphans: !0, + tabSize: !0, + widows: !0, + zIndex: !0, + zoom: !0, + fillOpacity: !0, + floodOpacity: !0, + stopOpacity: !0, + strokeDasharray: !0, + strokeDashoffset: !0, + strokeMiterlimit: !0, + strokeOpacity: !0, + strokeWidth: !0 + }, + ve = ["Webkit", "ms", "Moz", "O"]; + + function we(e, t, i) { + return null == t || "boolean" == typeof t || "" === t ? "" : i || + "number" != typeof t || 0 === t || be.hasOwnProperty(e) && be[e] ? ("" + + t).trim() : t + "px" + } + + function Ce(e, t) { + for (var i in e = e.style, t) + if (t.hasOwnProperty(i)) { + var n = 0 === i.indexOf("--"), + o = we(i, t[i], n); + "float" === i && (i = "cssFloat"), n ? e.setProperty(i, o) : e[i] = o + } + } + Object.keys(be).forEach((function(e) { + ve.forEach((function(t) { + t = t + e.charAt(0).toUpperCase() + e.substring(1), be[t] = be[e] + })) + })); + var ye = o({ + menuitem: !0 + }, { + area: !0, + base: !0, + br: !0, + col: !0, + embed: !0, + hr: !0, + img: !0, + input: !0, + keygen: !0, + link: !0, + meta: !0, + param: !0, + source: !0, + track: !0, + wbr: !0 + }); + + function Se(e, t) { + if (t) { + if (ye[e] && (null != t.children || null != t.dangerouslySetInnerHTML)) + throw Error(s(137, e)); + if (null != t.dangerouslySetInnerHTML) { + if (null != t.children) throw Error(s(60)); + if ("object" != typeof t.dangerouslySetInnerHTML || !("__html" in t.dangerouslySetInnerHTML)) + throw Error(s(61)) + } + if (null != t.style && "object" != typeof t.style) throw Error(s(62)) + } + } + + function xe(e, t) { + if (-1 === e.indexOf("-")) return "string" == typeof t.is; + switch (e) { + case "annotation-xml": + case "color-profile": + case "font-face": + case "font-face-src": + case "font-face-uri": + case "font-face-format": + case "font-face-name": + case "missing-glyph": + return !1; + default: + return !0 + } + } + + function ke(e) { + return (e = e.target || e.srcElement || window).correspondingUseElement && + (e = e.correspondingUseElement), 3 === e.nodeType ? e.parentNode : e + } + var Le = null, + Ne = null, + De = null; + + function Ee(e) { + if (e = io(e)) { + if ("function" != typeof Le) throw Error(s(280)); + var t = e.stateNode; + t && (t = oo(t), Le(e.stateNode, e.type, t)) + } + } + + function Ie(e) { + Ne ? De ? De.push(e) : De = [e] : Ne = e + } + + function Te() { + if (Ne) { + var e = Ne, + t = De; + if (De = Ne = null, Ee(e), t) + for (e = 0; e < t.length; e++) Ee(t[e]) + } + } + + function Me(e, t) { + return e(t) + } + + function Ae(e, t, i, n, o) { + return e(t, i, n, o) + } + + function Re() {} + var Oe = Me, + Pe = !1, + Fe = !1; + + function Be() { + null === Ne && null === De || (Re(), Te()) + } + + function We(e, t) { + var i = e.stateNode; + if (null === i) return null; + var n = oo(i); + if (null === n) return null; + i = n[t]; + e: switch (t) { + case "onClick": + case "onClickCapture": + case "onDoubleClick": + case "onDoubleClickCapture": + case "onMouseDown": + case "onMouseDownCapture": + case "onMouseMove": + case "onMouseMoveCapture": + case "onMouseUp": + case "onMouseUpCapture": + case "onMouseEnter": + (n = !n.disabled) || (n = !("button" === (e = e.type) || "input" === + e || "select" === e || "textarea" === e)), e = !n; + break e; + default: + e = !1 + } + if (e) return null; + if (i && "function" != typeof i) throw Error(s(231, t, typeof i)); + return i + } + var ze = !1; + if (h) try { + var Ve = {}; + Object.defineProperty(Ve, "passive", { + get: function() { + ze = !0 + } + }), window.addEventListener("test", Ve, Ve), window.removeEventListener( + "test", Ve, Ve) + } catch (me) { + ze = !1 + } + + function He(e, t, i, n, o, r, s, a, l) { + var d = Array.prototype.slice.call(arguments, 3); + try { + t.apply(i, d) + } catch (e) { + this.onError(e) + } + } + var Ue = !1, + je = null, + Ke = !1, + $e = null, + qe = { + onError: function(e) { + Ue = !0, je = e + } + }; + + function Ze(e, t, i, n, o, r, s, a, l) { + Ue = !1, je = null, He.apply(qe, arguments) + } + + function Ge(e) { + var t = e, + i = e; + if (e.alternate) + for (; t.return;) t = t.return; + else { + e = t; + do { + 0 != (1026 & (t = e).flags) && (i = t.return), e = t.return + } while (e) + } + return 3 === t.tag ? i : null + } + + function Ye(e) { + if (13 === e.tag) { + var t = e.memoizedState; + if (null === t && null !== (e = e.alternate) && (t = e.memoizedState), + null !== t) return t.dehydrated + } + return null + } + + function Qe(e) { + if (Ge(e) !== e) throw Error(s(188)) + } + + function Xe(e) { + if (e = function(e) { + var t = e.alternate; + if (!t) { + if (null === (t = Ge(e))) throw Error(s(188)); + return t !== e ? null : e + } + for (var i = e, n = t;;) { + var o = i.return; + if (null === o) break; + var r = o.alternate; + if (null === r) { + if (null !== (n = o.return)) { + i = n; + continue + } + break + } + if (o.child === r.child) { + for (r = o.child; r;) { + if (r === i) return Qe(o), e; + if (r === n) return Qe(o), t; + r = r.sibling + } + throw Error(s(188)) + } + if (i.return !== n.return) i = o, n = r; + else { + for (var a = !1, l = o.child; l;) { + if (l === i) { + a = !0, i = o, n = r; + break + } + if (l === n) { + a = !0, n = o, i = r; + break + } + l = l.sibling + } + if (!a) { + for (l = r.child; l;) { + if (l === i) { + a = !0, i = r, n = o; + break + } + if (l === n) { + a = !0, n = r, i = o; + break + } + l = l.sibling + } + if (!a) throw Error(s(189)) + } + } + if (i.alternate !== n) throw Error(s(190)) + } + if (3 !== i.tag) throw Error(s(188)); + return i.stateNode.current === i ? e : t + }(e), !e) return null; + for (var t = e;;) { + if (5 === t.tag || 6 === t.tag) return t; + if (t.child) t.child.return = t, t = t.child; + else { + if (t === e) break; + for (; !t.sibling;) { + if (!t.return || t.return === e) return null; + t = t.return + } + t.sibling.return = t.return, t = t.sibling + } + } + return null + } + + function Je(e, t) { + for (var i = e.alternate; null !== t;) { + if (t === e || t === i) return !0; + t = t.return + } + return !1 + } + var et, tt, it, nt, ot = !1, + rt = [], + st = null, + at = null, + lt = null, + dt = new Map, + ct = new Map, + ht = [], + ut = + "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit" + .split(" "); + + function gt(e, t, i, n, o) { + return { + blockedOn: e, + domEventName: t, + eventSystemFlags: 16 | i, + nativeEvent: o, + targetContainers: [n] + } + } + + function pt(e, t) { + switch (e) { + case "focusin": + case "focusout": + st = null; + break; + case "dragenter": + case "dragleave": + at = null; + break; + case "mouseover": + case "mouseout": + lt = null; + break; + case "pointerover": + case "pointerout": + dt.delete(t.pointerId); + break; + case "gotpointercapture": + case "lostpointercapture": + ct.delete(t.pointerId) + } + } + + function mt(e, t, i, n, o, r) { + return null === e || e.nativeEvent !== r ? (e = gt(t, i, n, o, r), null !== + t && null !== (t = io(t)) && tt(t), e) : (e.eventSystemFlags |= n, t = + e.targetContainers, null !== o && -1 === t.indexOf(o) && t.push(o), e) + } + + function ft(e) { + var t = to(e.target); + if (null !== t) { + var i = Ge(t); + if (null !== i) + if (13 === (t = i.tag)) { + if (null !== (t = Ye(i))) return e.blockedOn = t, void nt(e.lanePriority, ( + function() { + r.unstable_runWithPriority(e.priority, (function() { + it(i) + })) + })) + } else if (3 === t && i.stateNode.hydrate) return void(e.blockedOn = 3 === + i.tag ? i.stateNode.containerInfo : null) + } + e.blockedOn = null + } + + function _t(e) { + if (null !== e.blockedOn) return !1; + for (var t = e.targetContainers; 0 < t.length;) { + var i = Xt(e.domEventName, e.eventSystemFlags, t[0], e.nativeEvent); + if (null !== i) return null !== (t = io(i)) && tt(t), e.blockedOn = i, ! + 1; + t.shift() + } + return !0 + } + + function bt(e, t, i) { + _t(e) && i.delete(t) + } + + function vt() { + for (ot = !1; 0 < rt.length;) { + var e = rt[0]; + if (null !== e.blockedOn) { + null !== (e = io(e.blockedOn)) && et(e); + break + } + for (var t = e.targetContainers; 0 < t.length;) { + var i = Xt(e.domEventName, e.eventSystemFlags, t[0], e.nativeEvent); + if (null !== i) { + e.blockedOn = i; + break + } + t.shift() + } + null === e.blockedOn && rt.shift() + } + null !== st && _t(st) && (st = null), null !== at && _t(at) && (at = + null), null !== lt && _t(lt) && (lt = null), dt.forEach(bt), ct.forEach( + bt) + } + + function wt(e, t) { + e.blockedOn === t && (e.blockedOn = null, ot || (ot = !0, r.unstable_scheduleCallback( + r.unstable_NormalPriority, vt))) + } + + function Ct(e) { + function t(t) { + return wt(t, e) + } + if (0 < rt.length) { + wt(rt[0], e); + for (var i = 1; i < rt.length; i++) { + var n = rt[i]; + n.blockedOn === e && (n.blockedOn = null) + } + } + for (null !== st && wt(st, e), null !== at && wt(at, e), null !== lt && + wt(lt, e), dt.forEach(t), ct.forEach(t), i = 0; i < ht.length; i++)(n = + ht[i]).blockedOn === e && (n.blockedOn = null); + for (; 0 < ht.length && null === (i = ht[0]).blockedOn;) ft(i), null === + i.blockedOn && ht.shift() + } + + function yt(e, t) { + var i = {}; + return i[e.toLowerCase()] = t.toLowerCase(), i["Webkit" + e] = "webkit" + + t, i["Moz" + e] = "moz" + t, i + } + var St = { + animationend: yt("Animation", "AnimationEnd"), + animationiteration: yt("Animation", "AnimationIteration"), + animationstart: yt("Animation", "AnimationStart"), + transitionend: yt("Transition", "TransitionEnd") + }, + xt = {}, + kt = {}; + + function Lt(e) { + if (xt[e]) return xt[e]; + if (!St[e]) return e; + var t, i = St[e]; + for (t in i) + if (i.hasOwnProperty(t) && t in kt) return xt[e] = i[t]; + return e + } + h && (kt = document.createElement("div").style, "AnimationEvent" in + window || (delete St.animationend.animation, delete St.animationiteration + .animation, delete St.animationstart.animation), "TransitionEvent" in + window || delete St.transitionend.transition); + var Nt = Lt("animationend"), + Dt = Lt("animationiteration"), + Et = Lt("animationstart"), + It = Lt("transitionend"), + Tt = new Map, + Mt = new Map, + At = ["abort", "abort", Nt, "animationEnd", Dt, "animationIteration", Et, + "animationStart", "canplay", "canPlay", "canplaythrough", + "canPlayThrough", "durationchange", "durationChange", "emptied", + "emptied", "encrypted", "encrypted", "ended", "ended", "error", "error", + "gotpointercapture", "gotPointerCapture", "load", "load", "loadeddata", + "loadedData", "loadedmetadata", "loadedMetadata", "loadstart", + "loadStart", "lostpointercapture", "lostPointerCapture", "playing", + "playing", "progress", "progress", "seeking", "seeking", "stalled", + "stalled", "suspend", "suspend", "timeupdate", "timeUpdate", It, + "transitionEnd", "waiting", "waiting" + ]; + + function Rt(e, t) { + for (var i = 0; i < e.length; i += 2) { + var n = e[i], + o = e[i + 1]; + o = "on" + (o[0].toUpperCase() + o.slice(1)), Mt.set(n, t), Tt.set(n, o), + d(o, [n]) + } + }(0, r.unstable_now)(); + var Ot = 8; + + function Pt(e) { + if (0 != (1 & e)) return Ot = 15, 1; + if (0 != (2 & e)) return Ot = 14, 2; + if (0 != (4 & e)) return Ot = 13, 4; + var t = 24 & e; + return 0 !== t ? (Ot = 12, t) : 0 != (32 & e) ? (Ot = 11, 32) : 0 != (t = + 192 & e) ? (Ot = 10, t) : 0 != (256 & e) ? (Ot = 9, 256) : 0 != (t = + 3584 & e) ? (Ot = 8, t) : 0 != (4096 & e) ? (Ot = 7, 4096) : 0 != (t = + 4186112 & e) ? (Ot = 6, t) : 0 != (t = 62914560 & e) ? (Ot = 5, t) : + 67108864 & e ? (Ot = 4, 67108864) : 0 != (134217728 & e) ? (Ot = 3, + 134217728) : 0 != (t = 805306368 & e) ? (Ot = 2, t) : 0 != (1073741824 & + e) ? (Ot = 1, 1073741824) : (Ot = 8, e) + } + + function Ft(e, t) { + var i = e.pendingLanes; + if (0 === i) return Ot = 0; + var n = 0, + o = 0, + r = e.expiredLanes, + s = e.suspendedLanes, + a = e.pingedLanes; + if (0 !== r) n = r, o = Ot = 15; + else if (0 != (r = 134217727 & i)) { + var l = r & ~s; + 0 !== l ? (n = Pt(l), o = Ot) : 0 != (a &= r) && (n = Pt(a), o = Ot) + } else 0 != (r = i & ~s) ? (n = Pt(r), o = Ot) : 0 !== a && (n = Pt(a), + o = Ot); + if (0 === n) return 0; + if (n = i & ((0 > (n = 31 - Ut(n)) ? 0 : 1 << n) << 1) - 1, 0 !== t && t !== + n && 0 == (t & s)) { + if (Pt(t), o <= Ot) return t; + Ot = o + } + if (0 !== (t = e.entangledLanes)) + for (e = e.entanglements, t &= n; 0 < t;) o = 1 << (i = 31 - Ut(t)), n |= + e[i], t &= ~o; + return n + } + + function Bt(e) { + return 0 != (e = -1073741825 & e.pendingLanes) ? e : 1073741824 & e ? + 1073741824 : 0 + } + + function Wt(e, t) { + switch (e) { + case 15: + return 1; + case 14: + return 2; + case 12: + return 0 === (e = zt(24 & ~t)) ? Wt(10, t) : e; + case 10: + return 0 === (e = zt(192 & ~t)) ? Wt(8, t) : e; + case 8: + return 0 === (e = zt(3584 & ~t)) && 0 === (e = zt(4186112 & ~t)) && (e = + 512), e; + case 2: + return 0 === (t = zt(805306368 & ~t)) && (t = 268435456), t + } + throw Error(s(358, e)) + } + + function zt(e) { + return e & -e + } + + function Vt(e) { + for (var t = [], i = 0; 31 > i; i++) t.push(e); + return t + } + + function Ht(e, t, i) { + e.pendingLanes |= t; + var n = t - 1; + e.suspendedLanes &= n, e.pingedLanes &= n, (e = e.eventTimes)[t = 31 - + Ut(t)] = i + } + var Ut = Math.clz32 ? Math.clz32 : function(e) { + return 0 === e ? 32 : 31 - (jt(e) / Kt | 0) | 0 + }, + jt = Math.log, + Kt = Math.LN2, + $t = r.unstable_UserBlockingPriority, + qt = r.unstable_runWithPriority, + Zt = !0; + + function Gt(e, t, i, n) { + Pe || Re(); + var o = Qt, + r = Pe; + Pe = !0; + try { + Ae(o, e, t, i, n) + } finally { + (Pe = r) || Be() + } + } + + function Yt(e, t, i, n) { + qt($t, Qt.bind(null, e, t, i, n)) + } + + function Qt(e, t, i, n) { + var o; + if (Zt) + if ((o = 0 == (4 & t)) && 0 < rt.length && -1 < ut.indexOf(e)) e = gt( + null, e, t, i, n), rt.push(e); + else { + var r = Xt(e, t, i, n); + if (null === r) o && pt(e, n); + else { + if (o) { + if (-1 < ut.indexOf(e)) return e = gt(r, e, t, i, n), void rt.push(e); + if (function(e, t, i, n, o) { + switch (t) { + case "focusin": + return st = mt(st, e, t, i, n, o), !0; + case "dragenter": + return at = mt(at, e, t, i, n, o), !0; + case "mouseover": + return lt = mt(lt, e, t, i, n, o), !0; + case "pointerover": + var r = o.pointerId; + return dt.set(r, mt(dt.get(r) || null, e, t, i, n, o)), !0; + case "gotpointercapture": + return r = o.pointerId, ct.set(r, mt(ct.get(r) || null, e, t, i, + n, o)), !0 + } + return !1 + }(r, e, t, i, n)) return; + pt(e, n) + } + Rn(e, t, n, null, i) + } + } + } + + function Xt(e, t, i, n) { + var o = ke(n); + if (null !== (o = to(o))) { + var r = Ge(o); + if (null === r) o = null; + else { + var s = r.tag; + if (13 === s) { + if (null !== (o = Ye(r))) return o; + o = null + } else if (3 === s) { + if (r.stateNode.hydrate) return 3 === r.tag ? r.stateNode.containerInfo : + null; + o = null + } else r !== o && (o = null) + } + } + return Rn(e, t, n, o, i), null + } + var Jt = null, + ei = null, + ti = null; + + function ii() { + if (ti) return ti; + var e, t, i = ei, + n = i.length, + o = "value" in Jt ? Jt.value : Jt.textContent, + r = o.length; + for (e = 0; e < n && i[e] === o[e]; e++); + var s = n - e; + for (t = 1; t <= s && i[n - t] === o[r - t]; t++); + return ti = o.slice(e, 1 < t ? 1 - t : void 0) + } + + function ni(e) { + var t = e.keyCode; + return "charCode" in e ? 0 === (e = e.charCode) && 13 === t && (e = 13) : + e = t, 10 === e && (e = 13), 32 <= e || 13 === e ? e : 0 + } + + function oi() { + return !0 + } + + function ri() { + return !1 + } + + function si(e) { + function t(t, i, n, o, r) { + for (var s in this._reactName = t, this._targetInst = n, this.type = i, + this.nativeEvent = o, this.target = r, this.currentTarget = null, e) e + .hasOwnProperty(s) && (t = e[s], this[s] = t ? t(o) : o[s]); + return this.isDefaultPrevented = (null != o.defaultPrevented ? o.defaultPrevented : + !1 === o.returnValue) ? oi : ri, this.isPropagationStopped = ri, this + } + return o(t.prototype, { + preventDefault: function() { + this.defaultPrevented = !0; + var e = this.nativeEvent; + e && (e.preventDefault ? e.preventDefault() : "unknown" != typeof e + .returnValue && (e.returnValue = !1), this.isDefaultPrevented = + oi) + }, + stopPropagation: function() { + var e = this.nativeEvent; + e && (e.stopPropagation ? e.stopPropagation() : "unknown" != typeof e + .cancelBubble && (e.cancelBubble = !0), this.isPropagationStopped = + oi) + }, + persist: function() {}, + isPersistent: oi + }), t + } + var ai, li, di, ci = { + eventPhase: 0, + bubbles: 0, + cancelable: 0, + timeStamp: function(e) { + return e.timeStamp || Date.now() + }, + defaultPrevented: 0, + isTrusted: 0 + }, + hi = si(ci), + ui = o({}, ci, { + view: 0, + detail: 0 + }), + gi = si(ui), + pi = o({}, ui, { + screenX: 0, + screenY: 0, + clientX: 0, + clientY: 0, + pageX: 0, + pageY: 0, + ctrlKey: 0, + shiftKey: 0, + altKey: 0, + metaKey: 0, + getModifierState: Li, + button: 0, + buttons: 0, + relatedTarget: function(e) { + return void 0 === e.relatedTarget ? e.fromElement === e.srcElement ? + e.toElement : e.fromElement : e.relatedTarget + }, + movementX: function(e) { + return "movementX" in e ? e.movementX : (e !== di && (di && + "mousemove" === e.type ? (ai = e.screenX - di.screenX, li = e.screenY - + di.screenY) : li = ai = 0, di = e), ai) + }, + movementY: function(e) { + return "movementY" in e ? e.movementY : li + } + }), + mi = si(pi), + fi = si(o({}, pi, { + dataTransfer: 0 + })), + _i = si(o({}, ui, { + relatedTarget: 0 + })), + bi = si(o({}, ci, { + animationName: 0, + elapsedTime: 0, + pseudoElement: 0 + })), + vi = o({}, ci, { + clipboardData: function(e) { + return "clipboardData" in e ? e.clipboardData : window.clipboardData + } + }), + wi = si(vi), + Ci = si(o({}, ci, { + data: 0 + })), + yi = { + Esc: "Escape", + Spacebar: " ", + Left: "ArrowLeft", + Up: "ArrowUp", + Right: "ArrowRight", + Down: "ArrowDown", + Del: "Delete", + Win: "OS", + Menu: "ContextMenu", + Apps: "ContextMenu", + Scroll: "ScrollLock", + MozPrintableKey: "Unidentified" + }, + Si = { + 8: "Backspace", + 9: "Tab", + 12: "Clear", + 13: "Enter", + 16: "Shift", + 17: "Control", + 18: "Alt", + 19: "Pause", + 20: "CapsLock", + 27: "Escape", + 32: " ", + 33: "PageUp", + 34: "PageDown", + 35: "End", + 36: "Home", + 37: "ArrowLeft", + 38: "ArrowUp", + 39: "ArrowRight", + 40: "ArrowDown", + 45: "Insert", + 46: "Delete", + 112: "F1", + 113: "F2", + 114: "F3", + 115: "F4", + 116: "F5", + 117: "F6", + 118: "F7", + 119: "F8", + 120: "F9", + 121: "F10", + 122: "F11", + 123: "F12", + 144: "NumLock", + 145: "ScrollLock", + 224: "Meta" + }, + xi = { + Alt: "altKey", + Control: "ctrlKey", + Meta: "metaKey", + Shift: "shiftKey" + }; + + function ki(e) { + var t = this.nativeEvent; + return t.getModifierState ? t.getModifierState(e) : !!(e = xi[e]) && !!t[ + e] + } + + function Li() { + return ki + } + var Ni = o({}, ui, { + key: function(e) { + if (e.key) { + var t = yi[e.key] || e.key; + if ("Unidentified" !== t) return t + } + return "keypress" === e.type ? 13 === (e = ni(e)) ? "Enter" : String + .fromCharCode(e) : "keydown" === e.type || "keyup" === e.type ? Si[ + e.keyCode] || "Unidentified" : "" + }, + code: 0, + location: 0, + ctrlKey: 0, + shiftKey: 0, + altKey: 0, + metaKey: 0, + repeat: 0, + locale: 0, + getModifierState: Li, + charCode: function(e) { + return "keypress" === e.type ? ni(e) : 0 + }, + keyCode: function(e) { + return "keydown" === e.type || "keyup" === e.type ? e.keyCode : 0 + }, + which: function(e) { + return "keypress" === e.type ? ni(e) : "keydown" === e.type || + "keyup" === e.type ? e.keyCode : 0 + } + }), + Di = si(Ni), + Ei = si(o({}, pi, { + pointerId: 0, + width: 0, + height: 0, + pressure: 0, + tangentialPressure: 0, + tiltX: 0, + tiltY: 0, + twist: 0, + pointerType: 0, + isPrimary: 0 + })), + Ii = si(o({}, ui, { + touches: 0, + targetTouches: 0, + changedTouches: 0, + altKey: 0, + metaKey: 0, + ctrlKey: 0, + shiftKey: 0, + getModifierState: Li + })), + Ti = si(o({}, ci, { + propertyName: 0, + elapsedTime: 0, + pseudoElement: 0 + })), + Mi = o({}, pi, { + deltaX: function(e) { + return "deltaX" in e ? e.deltaX : "wheelDeltaX" in e ? -e.wheelDeltaX : + 0 + }, + deltaY: function(e) { + return "deltaY" in e ? e.deltaY : "wheelDeltaY" in e ? -e.wheelDeltaY : + "wheelDelta" in e ? -e.wheelDelta : 0 + }, + deltaZ: 0, + deltaMode: 0 + }), + Ai = si(Mi), + Ri = [9, 13, 27, 32], + Oi = h && "CompositionEvent" in window, + Pi = null; + h && "documentMode" in document && (Pi = document.documentMode); + var Fi = h && "TextEvent" in window && !Pi, + Bi = h && (!Oi || Pi && 8 < Pi && 11 >= Pi), + Wi = String.fromCharCode(32), + zi = !1; + + function Vi(e, t) { + switch (e) { + case "keyup": + return -1 !== Ri.indexOf(t.keyCode); + case "keydown": + return 229 !== t.keyCode; + case "keypress": + case "mousedown": + case "focusout": + return !0; + default: + return !1 + } + } + + function Hi(e) { + return "object" == typeof(e = e.detail) && "data" in e ? e.data : null + } + var Ui = !1, + ji = { + color: !0, + date: !0, + datetime: !0, + "datetime-local": !0, + email: !0, + month: !0, + number: !0, + password: !0, + range: !0, + search: !0, + tel: !0, + text: !0, + time: !0, + url: !0, + week: !0 + }; + + function Ki(e) { + var t = e && e.nodeName && e.nodeName.toLowerCase(); + return "input" === t ? !!ji[e.type] : "textarea" === t + } + + function $i(e, t, i, n) { + Ie(n), 0 < (t = Pn(t, "onChange")).length && (i = new hi("onChange", + "change", null, i, n), e.push({ + event: i, + listeners: t + })) + } + var qi = null, + Zi = null; + + function Gi(e) { + Dn(e, 0) + } + + function Yi(e) { + if (Q(no(e))) return e + } + + function Qi(e, t) { + if ("change" === e) return t + } + var Xi = !1; + if (h) { + var Ji; + if (h) { + var en = "oninput" in document; + if (!en) { + var tn = document.createElement("div"); + tn.setAttribute("oninput", "return;"), en = "function" == typeof tn.oninput + } + Ji = en + } else Ji = !1; + Xi = Ji && (!document.documentMode || 9 < document.documentMode) + } + + function nn() { + qi && (qi.detachEvent("onpropertychange", on), Zi = qi = null) + } + + function on(e) { + if ("value" === e.propertyName && Yi(Zi)) { + var t = []; + if ($i(t, Zi, e, ke(e)), e = Gi, Pe) e(t); + else { + Pe = !0; + try { + Me(e, t) + } finally { + Pe = !1, Be() + } + } + } + } + + function rn(e, t, i) { + "focusin" === e ? (nn(), Zi = i, (qi = t).attachEvent("onpropertychange", + on)) : "focusout" === e && nn() + } + + function sn(e) { + if ("selectionchange" === e || "keyup" === e || "keydown" === e) return + Yi(Zi) + } + + function an(e, t) { + if ("click" === e) return Yi(t) + } + + function ln(e, t) { + if ("input" === e || "change" === e) return Yi(t) + } + var dn = "function" == typeof Object.is ? Object.is : function(e, t) { + return e === t && (0 !== e || 1 / e == 1 / t) || e != e && t != t + }, + cn = Object.prototype.hasOwnProperty; + + function hn(e, t) { + if (dn(e, t)) return !0; + if ("object" != typeof e || null === e || "object" != typeof t || null === + t) return !1; + var i = Object.keys(e), + n = Object.keys(t); + if (i.length !== n.length) return !1; + for (n = 0; n < i.length; n++) + if (!cn.call(t, i[n]) || !dn(e[i[n]], t[i[n]])) return !1; + return !0 + } + + function un(e) { + for (; e && e.firstChild;) e = e.firstChild; + return e + } + + function gn(e, t) { + var i, n = un(e); + for (e = 0; n;) { + if (3 === n.nodeType) { + if (i = e + n.textContent.length, e <= t && i >= t) return { + node: n, + offset: t - e + }; + e = i + } + e: { + for (; n;) { + if (n.nextSibling) { + n = n.nextSibling; + break e + } + n = n.parentNode + } + n = void 0 + } + n = un(n) + } + } + + function pn(e, t) { + return !(!e || !t) && (e === t || (!e || 3 !== e.nodeType) && (t && 3 === + t.nodeType ? pn(e, t.parentNode) : "contains" in e ? e.contains(t) : + !!e.compareDocumentPosition && !!(16 & e.compareDocumentPosition(t)))) + } + + function mn() { + for (var e = window, t = X(); t instanceof e.HTMLIFrameElement;) { + try { + var i = "string" == typeof t.contentWindow.location.href + } catch (e) { + i = !1 + } + if (!i) break; + t = X((e = t.contentWindow).document) + } + return t + } + + function fn(e) { + var t = e && e.nodeName && e.nodeName.toLowerCase(); + return t && ("input" === t && ("text" === e.type || "search" === e.type || + "tel" === e.type || "url" === e.type || "password" === e.type) || + "textarea" === t || "true" === e.contentEditable) + } + var _n = h && "documentMode" in document && 11 >= document.documentMode, + bn = null, + vn = null, + wn = null, + Cn = !1; + + function yn(e, t, i) { + var n = i.window === i ? i.document : 9 === i.nodeType ? i : i.ownerDocument; + Cn || null == bn || bn !== X(n) || (n = "selectionStart" in (n = bn) && + fn(n) ? { + start: n.selectionStart, + end: n.selectionEnd + } : { + anchorNode: (n = (n.ownerDocument && n.ownerDocument.defaultView || + window).getSelection()).anchorNode, + anchorOffset: n.anchorOffset, + focusNode: n.focusNode, + focusOffset: n.focusOffset + }, wn && hn(wn, n) || (wn = n, 0 < (n = Pn(vn, "onSelect")).length && + (t = new hi("onSelect", "select", null, t, i), e.push({ + event: t, + listeners: n + }), t.target = bn))) + } + Rt( + "cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange" + .split(" "), 0), Rt( + "drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel" + .split(" "), 1), Rt(At, 2); + for (var Sn = + "change selectionchange textInput compositionstart compositionend compositionupdate" + .split(" "), xn = 0; xn < Sn.length; xn++) Mt.set(Sn[xn], 0); + c("onMouseEnter", ["mouseout", "mouseover"]), c("onMouseLeave", [ + "mouseout", "mouseover" + ]), c("onPointerEnter", ["pointerout", "pointerover"]), c( + "onPointerLeave", ["pointerout", "pointerover"]), d("onChange", + "change click focusin focusout input keydown keyup selectionchange".split( + " ")), d("onSelect", + "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange" + .split(" ")), d("onBeforeInput", ["compositionend", "keypress", + "textInput", "paste" + ]), d("onCompositionEnd", + "compositionend focusout keydown keypress keyup mousedown".split(" ")), + d("onCompositionStart", + "compositionstart focusout keydown keypress keyup mousedown".split(" ") + ), d("onCompositionUpdate", + "compositionupdate focusout keydown keypress keyup mousedown".split(" ") + ); + var kn = + "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting" + .split(" "), + Ln = new Set("cancel close invalid load scroll toggle".split(" ").concat( + kn)); + + function Nn(e, t, i) { + var n = e.type || "unknown-event"; + e.currentTarget = i, + function(e, t, i, n, o, r, a, l, d) { + if (Ze.apply(this, arguments), Ue) { + if (!Ue) throw Error(s(198)); + var c = je; + Ue = !1, je = null, Ke || (Ke = !0, $e = c) + } + }(n, t, void 0, e), e.currentTarget = null + } + + function Dn(e, t) { + t = 0 != (4 & t); + for (var i = 0; i < e.length; i++) { + var n = e[i], + o = n.event; + n = n.listeners; + e: { + var r = void 0; + if (t) + for (var s = n.length - 1; 0 <= s; s--) { + var a = n[s], + l = a.instance, + d = a.currentTarget; + if (a = a.listener, l !== r && o.isPropagationStopped()) break e; + Nn(o, a, d), r = l + } else + for (s = 0; s < n.length; s++) { + if (l = (a = n[s]).instance, d = a.currentTarget, a = a.listener, + l !== r && o.isPropagationStopped()) break e; + Nn(o, a, d), r = l + } + } + } + if (Ke) throw e = $e, Ke = !1, $e = null, e + } + + function En(e, t) { + var i = ro(t), + n = e + "__bubble"; + i.has(n) || (An(t, e, 2, !1), i.add(n)) + } + var In = "_reactListening" + Math.random().toString(36).slice(2); + + function Tn(e) { + e[In] || (e[In] = !0, a.forEach((function(t) { + Ln.has(t) || Mn(t, !1, e, null), Mn(t, !0, e, null) + }))) + } + + function Mn(e, t, i, n) { + var o = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : + 0, + r = i; + if ("selectionchange" === e && 9 !== i.nodeType && (r = i.ownerDocument), + null !== n && !t && Ln.has(e)) { + if ("scroll" !== e) return; + o |= 2, r = n + } + var s = ro(r), + a = e + "__" + (t ? "capture" : "bubble"); + s.has(a) || (t && (o |= 4), An(r, e, o, t), s.add(a)) + } + + function An(e, t, i, n) { + var o = Mt.get(t); + switch (void 0 === o ? 2 : o) { + case 0: + o = Gt; + break; + case 1: + o = Yt; + break; + default: + o = Qt + } + i = o.bind(null, t, i, e), o = void 0, !ze || "touchstart" !== t && + "touchmove" !== t && "wheel" !== t || (o = !0), n ? void 0 !== o ? e.addEventListener( + t, i, { + capture: !0, + passive: o + }) : e.addEventListener(t, i, !0) : void 0 !== o ? e.addEventListener( + t, i, { + passive: o + }) : e.addEventListener(t, i, !1) + } + + function Rn(e, t, i, n, o) { + var r = n; + if (0 == (1 & t) && 0 == (2 & t) && null !== n) e: for (;;) { + if (null === n) return; + var s = n.tag; + if (3 === s || 4 === s) { + var a = n.stateNode.containerInfo; + if (a === o || 8 === a.nodeType && a.parentNode === o) break; + if (4 === s) + for (s = n.return; null !== s;) { + var l = s.tag; + if ((3 === l || 4 === l) && ((l = s.stateNode.containerInfo) === o || + 8 === l.nodeType && l.parentNode === o)) return; + s = s.return + } + for (; null !== a;) { + if (null === (s = to(a))) return; + if (5 === (l = s.tag) || 6 === l) { + n = r = s; + continue e + } + a = a.parentNode + } + } + n = n.return + }! function(e, t, i) { + if (Fe) return e(); + Fe = !0; + try { + Oe(e, t, i) + } finally { + Fe = !1, Be() + } + }((function() { + var n = r, + o = ke(i), + s = []; + e: { + var a = Tt.get(e); + if (void 0 !== a) { + var l = hi, + d = e; + switch (e) { + case "keypress": + if (0 === ni(i)) break e; + case "keydown": + case "keyup": + l = Di; + break; + case "focusin": + d = "focus", l = _i; + break; + case "focusout": + d = "blur", l = _i; + break; + case "beforeblur": + case "afterblur": + l = _i; + break; + case "click": + if (2 === i.button) break e; + case "auxclick": + case "dblclick": + case "mousedown": + case "mousemove": + case "mouseup": + case "mouseout": + case "mouseover": + case "contextmenu": + l = mi; + break; + case "drag": + case "dragend": + case "dragenter": + case "dragexit": + case "dragleave": + case "dragover": + case "dragstart": + case "drop": + l = fi; + break; + case "touchcancel": + case "touchend": + case "touchmove": + case "touchstart": + l = Ii; + break; + case Nt: + case Dt: + case Et: + l = bi; + break; + case It: + l = Ti; + break; + case "scroll": + l = gi; + break; + case "wheel": + l = Ai; + break; + case "copy": + case "cut": + case "paste": + l = wi; + break; + case "gotpointercapture": + case "lostpointercapture": + case "pointercancel": + case "pointerdown": + case "pointermove": + case "pointerout": + case "pointerover": + case "pointerup": + l = Ei + } + var c = 0 != (4 & t), + h = !c && "scroll" === e, + u = c ? null !== a ? a + "Capture" : null : a; + c = []; + for (var g, p = n; null !== p;) { + var m = (g = p).stateNode; + if (5 === g.tag && null !== m && (g = m, null !== u && null != ( + m = We(p, u)) && c.push(On(p, m, g))), h) break; + p = p.return + } + 0 < c.length && (a = new l(a, d, null, i, o), s.push({ + event: a, + listeners: c + })) + } + } + if (0 == (7 & t)) { + if (l = "mouseout" === e || "pointerout" === e, (!(a = "mouseover" === + e || "pointerover" === e) || 0 != (16 & t) || !(d = i.relatedTarget || + i.fromElement) || !to(d) && !d[Jn]) && (l || a) && (a = o.window === + o ? o : (a = o.ownerDocument) ? a.defaultView || a.parentWindow : + window, l ? (l = n, null !== (d = (d = i.relatedTarget || i.toElement) ? + to(d) : null) && (d !== (h = Ge(d)) || 5 !== d.tag && 6 !== d.tag) && + (d = null)) : (l = null, d = n), l !== d)) { + if (c = mi, m = "onMouseLeave", u = "onMouseEnter", p = "mouse", + "pointerout" !== e && "pointerover" !== e || (c = Ei, m = + "onPointerLeave", u = "onPointerEnter", p = "pointer"), h = null == + l ? a : no(l), g = null == d ? a : no(d), (a = new c(m, p + + "leave", l, i, o)).target = h, a.relatedTarget = g, m = null, to( + o) === n && ((c = new c(u, p + "enter", d, i, o)).target = g, c.relatedTarget = + h, m = c), h = m, l && d) e: { + for (u = d, p = 0, g = c = l; g; g = Fn(g)) p++; + for (g = 0, m = u; m; m = Fn(m)) g++; + for (; 0 < p - g;) c = Fn(c), p--; + for (; 0 < g - p;) u = Fn(u), g--; + for (; p--;) { + if (c === u || null !== u && c === u.alternate) break e; + c = Fn(c), u = Fn(u) + } + c = null + } else c = null; + null !== l && Bn(s, a, l, c, !1), null !== d && null !== h && Bn(s, + h, d, c, !0) + } + if ("select" === (l = (a = n ? no(n) : window).nodeName && a.nodeName + .toLowerCase()) || "input" === l && "file" === a.type) var f = Qi; + else if (Ki(a)) + if (Xi) f = ln; + else { + f = sn; + var _ = rn + } else(l = a.nodeName) && "input" === l.toLowerCase() && ( + "checkbox" === a.type || "radio" === a.type) && (f = an); + switch (f && (f = f(e, n)) ? $i(s, f, i, o) : (_ && _(e, a, n), + "focusout" === e && (_ = a._wrapperState) && _.controlled && + "number" === a.type && oe(a, "number", a.value)), _ = n ? no(n) : + window, e) { + case "focusin": + (Ki(_) || "true" === _.contentEditable) && (bn = _, vn = n, wn = + null); + break; + case "focusout": + wn = vn = bn = null; + break; + case "mousedown": + Cn = !0; + break; + case "contextmenu": + case "mouseup": + case "dragend": + Cn = !1, yn(s, i, o); + break; + case "selectionchange": + if (_n) break; + case "keydown": + case "keyup": + yn(s, i, o) + } + var b; + if (Oi) e: { + switch (e) { + case "compositionstart": + var v = "onCompositionStart"; + break e; + case "compositionend": + v = "onCompositionEnd"; + break e; + case "compositionupdate": + v = "onCompositionUpdate"; + break e + } + v = void 0 + } else Ui ? Vi(e, i) && (v = "onCompositionEnd") : "keydown" === e && + 229 === i.keyCode && (v = "onCompositionStart"); + v && (Bi && "ko" !== i.locale && (Ui || "onCompositionStart" !== v ? + "onCompositionEnd" === v && Ui && (b = ii()) : (ei = "value" in + (Jt = o) ? Jt.value : Jt.textContent, Ui = !0)), 0 < (_ = Pn(n, + v)).length && (v = new Ci(v, e, null, i, o), s.push({ + event: v, + listeners: _ + }), (b || null !== (b = Hi(i))) && (v.data = b))), (b = Fi ? + function(e, t) { + switch (e) { + case "compositionend": + return Hi(t); + case "keypress": + return 32 !== t.which ? null : (zi = !0, Wi); + case "textInput": + return (e = t.data) === Wi && zi ? null : e; + default: + return null + } + }(e, i) : function(e, t) { + if (Ui) return "compositionend" === e || !Oi && Vi(e, t) ? (e = + ii(), ti = ei = Jt = null, Ui = !1, e) : null; + switch (e) { + default: return null; + case "keypress": + if (!(t.ctrlKey || t.altKey || t.metaKey) || t.ctrlKey && t.altKey) { + if (t.char && 1 < t.char.length) return t.char; + if (t.which) return String.fromCharCode(t.which) + }return null; + case "compositionend": + return Bi && "ko" !== t.locale ? null : t.data + } + }(e, i)) && 0 < (n = Pn(n, "onBeforeInput")).length && (o = new Ci( + "onBeforeInput", "beforeinput", null, i, o), s.push({ + event: o, + listeners: n + }), o.data = b) + } + Dn(s, t) + })) + } + + function On(e, t, i) { + return { + instance: e, + listener: t, + currentTarget: i + } + } + + function Pn(e, t) { + for (var i = t + "Capture", n = []; null !== e;) { + var o = e, + r = o.stateNode; + 5 === o.tag && null !== r && (o = r, null != (r = We(e, i)) && n.unshift( + On(e, r, o)), null != (r = We(e, t)) && n.push(On(e, r, o))), e = e.return + } + return n + } + + function Fn(e) { + if (null === e) return null; + do { + e = e.return + } while (e && 5 !== e.tag); + return e || null + } + + function Bn(e, t, i, n, o) { + for (var r = t._reactName, s = []; null !== i && i !== n;) { + var a = i, + l = a.alternate, + d = a.stateNode; + if (null !== l && l === n) break; + 5 === a.tag && null !== d && (a = d, o ? null != (l = We(i, r)) && s.unshift( + On(i, l, a)) : o || null != (l = We(i, r)) && s.push(On(i, l, a))), i = + i.return + } + 0 !== s.length && e.push({ + event: t, + listeners: s + }) + } + + function Wn() {} + var zn = null, + Vn = null; + + function Hn(e, t) { + switch (e) { + case "button": + case "input": + case "select": + case "textarea": + return !!t.autoFocus + } + return !1 + } + + function Un(e, t) { + return "textarea" === e || "option" === e || "noscript" === e || + "string" == typeof t.children || "number" == typeof t.children || + "object" == typeof t.dangerouslySetInnerHTML && null !== t.dangerouslySetInnerHTML && + null != t.dangerouslySetInnerHTML.__html + } + var jn = "function" == typeof setTimeout ? setTimeout : void 0, + Kn = "function" == typeof clearTimeout ? clearTimeout : void 0; + + function $n(e) { + (1 === e.nodeType || 9 === e.nodeType && null != (e = e.body)) && (e.textContent = + "") + } + + function qn(e) { + for (; null != e; e = e.nextSibling) { + var t = e.nodeType; + if (1 === t || 3 === t) break + } + return e + } + + function Zn(e) { + e = e.previousSibling; + for (var t = 0; e;) { + if (8 === e.nodeType) { + var i = e.data; + if ("$" === i || "$!" === i || "$?" === i) { + if (0 === t) return e; + t-- + } else "/$" === i && t++ + } + e = e.previousSibling + } + return null + } + var Gn = 0, + Yn = Math.random().toString(36).slice(2), + Qn = "__reactFiber$" + Yn, + Xn = "__reactProps$" + Yn, + Jn = "__reactContainer$" + Yn, + eo = "__reactEvents$" + Yn; + + function to(e) { + var t = e[Qn]; + if (t) return t; + for (var i = e.parentNode; i;) { + if (t = i[Jn] || i[Qn]) { + if (i = t.alternate, null !== t.child || null !== i && null !== i.child) + for (e = Zn(e); null !== e;) { + if (i = e[Qn]) return i; + e = Zn(e) + } + return t + } + i = (e = i).parentNode + } + return null + } + + function io(e) { + return !(e = e[Qn] || e[Jn]) || 5 !== e.tag && 6 !== e.tag && 13 !== e.tag && + 3 !== e.tag ? null : e + } + + function no(e) { + if (5 === e.tag || 6 === e.tag) return e.stateNode; + throw Error(s(33)) + } + + function oo(e) { + return e[Xn] || null + } + + function ro(e) { + var t = e[eo]; + return void 0 === t && (t = e[eo] = new Set), t + } + var so = [], + ao = -1; + + function lo(e) { + return { + current: e + } + } + + function co(e) { + 0 > ao || (e.current = so[ao], so[ao] = null, ao--) + } + + function ho(e, t) { + ao++, so[ao] = e.current, e.current = t + } + var uo = {}, + go = lo(uo), + po = lo(!1), + mo = uo; + + function fo(e, t) { + var i = e.type.contextTypes; + if (!i) return uo; + var n = e.stateNode; + if (n && n.__reactInternalMemoizedUnmaskedChildContext === t) return n.__reactInternalMemoizedMaskedChildContext; + var o, r = {}; + for (o in i) r[o] = t[o]; + return n && ((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext = + t, e.__reactInternalMemoizedMaskedChildContext = r), r + } + + function _o(e) { + return null != e.childContextTypes + } + + function bo() { + co(po), co(go) + } + + function vo(e, t, i) { + if (go.current !== uo) throw Error(s(168)); + ho(go, t), ho(po, i) + } + + function wo(e, t, i) { + var n = e.stateNode; + if (e = t.childContextTypes, "function" != typeof n.getChildContext) + return i; + for (var r in n = n.getChildContext()) + if (!(r in e)) throw Error(s(108, q(t) || "Unknown", r)); + return o({}, i, n) + } + + function Co(e) { + return e = (e = e.stateNode) && e.__reactInternalMemoizedMergedChildContext || + uo, mo = go.current, ho(go, e), ho(po, po.current), !0 + } + + function yo(e, t, i) { + var n = e.stateNode; + if (!n) throw Error(s(169)); + i ? (e = wo(e, t, mo), n.__reactInternalMemoizedMergedChildContext = e, + co(po), co(go), ho(go, e)) : co(po), ho(po, i) + } + var So = null, + xo = null, + ko = r.unstable_runWithPriority, + Lo = r.unstable_scheduleCallback, + No = r.unstable_cancelCallback, + Do = r.unstable_shouldYield, + Eo = r.unstable_requestPaint, + Io = r.unstable_now, + To = r.unstable_getCurrentPriorityLevel, + Mo = r.unstable_ImmediatePriority, + Ao = r.unstable_UserBlockingPriority, + Ro = r.unstable_NormalPriority, + Oo = r.unstable_LowPriority, + Po = r.unstable_IdlePriority, + Fo = {}, + Bo = void 0 !== Eo ? Eo : function() {}, + Wo = null, + zo = null, + Vo = !1, + Ho = Io(), + Uo = 1e4 > Ho ? Io : function() { + return Io() - Ho + }; + + function jo() { + switch (To()) { + case Mo: + return 99; + case Ao: + return 98; + case Ro: + return 97; + case Oo: + return 96; + case Po: + return 95; + default: + throw Error(s(332)) + } + } + + function Ko(e) { + switch (e) { + case 99: + return Mo; + case 98: + return Ao; + case 97: + return Ro; + case 96: + return Oo; + case 95: + return Po; + default: + throw Error(s(332)) + } + } + + function $o(e, t) { + return e = Ko(e), ko(e, t) + } + + function qo(e, t, i) { + return e = Ko(e), Lo(e, t, i) + } + + function Zo() { + if (null !== zo) { + var e = zo; + zo = null, No(e) + } + Go() + } + + function Go() { + if (!Vo && null !== Wo) { + Vo = !0; + var e = 0; + try { + var t = Wo; + $o(99, (function() { + for (; e < t.length; e++) { + var i = t[e]; + do { + i = i(!0) + } while (null !== i) + } + })), Wo = null + } catch (t) { + throw null !== Wo && (Wo = Wo.slice(e + 1)), Lo(Mo, Zo), t + } finally { + Vo = !1 + } + } + } + var Yo = C.ReactCurrentBatchConfig; + + function Qo(e, t) { + if (e && e.defaultProps) { + for (var i in t = o({}, t), e = e.defaultProps) void 0 === t[i] && (t[i] = + e[i]); + return t + } + return t + } + var Xo = lo(null), + Jo = null, + er = null, + tr = null; + + function ir() { + tr = er = Jo = null + } + + function nr(e) { + var t = Xo.current; + co(Xo), e.type._context._currentValue = t + } + + function or(e, t) { + for (; null !== e;) { + var i = e.alternate; + if ((e.childLanes & t) === t) { + if (null === i || (i.childLanes & t) === t) break; + i.childLanes |= t + } else e.childLanes |= t, null !== i && (i.childLanes |= t); + e = e.return + } + } + + function rr(e, t) { + Jo = e, tr = er = null, null !== (e = e.dependencies) && null !== e.firstContext && + (0 != (e.lanes & t) && (Ps = !0), e.firstContext = null) + } + + function sr(e, t) { + if (tr !== e && !1 !== t && 0 !== t) + if ("number" == typeof t && 1073741823 !== t || (tr = e, t = 1073741823), + t = { + context: e, + observedBits: t, + next: null + }, null === er) { + if (null === Jo) throw Error(s(308)); + er = t, Jo.dependencies = { + lanes: 0, + firstContext: t, + responders: null + } + } else er = er.next = t; + return e._currentValue + } + var ar = !1; + + function lr(e) { + e.updateQueue = { + baseState: e.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { + pending: null + }, + effects: null + } + } + + function dr(e, t) { + e = e.updateQueue, t.updateQueue === e && (t.updateQueue = { + baseState: e.baseState, + firstBaseUpdate: e.firstBaseUpdate, + lastBaseUpdate: e.lastBaseUpdate, + shared: e.shared, + effects: e.effects + }) + } + + function cr(e, t) { + return { + eventTime: e, + lane: t, + tag: 0, + payload: null, + callback: null, + next: null + } + } + + function hr(e, t) { + if (null !== (e = e.updateQueue)) { + var i = (e = e.shared).pending; + null === i ? t.next = t : (t.next = i.next, i.next = t), e.pending = t + } + } + + function ur(e, t) { + var i = e.updateQueue, + n = e.alternate; + if (null !== n && i === (n = n.updateQueue)) { + var o = null, + r = null; + if (null !== (i = i.firstBaseUpdate)) { + do { + var s = { + eventTime: i.eventTime, + lane: i.lane, + tag: i.tag, + payload: i.payload, + callback: i.callback, + next: null + }; + null === r ? o = r = s : r = r.next = s, i = i.next + } while (null !== i); + null === r ? o = r = t : r = r.next = t + } else o = r = t; + return i = { + baseState: n.baseState, + firstBaseUpdate: o, + lastBaseUpdate: r, + shared: n.shared, + effects: n.effects + }, void(e.updateQueue = i) + } + null === (e = i.lastBaseUpdate) ? i.firstBaseUpdate = t : e.next = t, i.lastBaseUpdate = + t + } + + function gr(e, t, i, n) { + var r = e.updateQueue; + ar = !1; + var s = r.firstBaseUpdate, + a = r.lastBaseUpdate, + l = r.shared.pending; + if (null !== l) { + r.shared.pending = null; + var d = l, + c = d.next; + d.next = null, null === a ? s = c : a.next = c, a = d; + var h = e.alternate; + if (null !== h) { + var u = (h = h.updateQueue).lastBaseUpdate; + u !== a && (null === u ? h.firstBaseUpdate = c : u.next = c, h.lastBaseUpdate = + d) + } + } + if (null !== s) { + for (u = r.baseState, a = 0, h = c = d = null;;) { + l = s.lane; + var g = s.eventTime; + if ((n & l) === l) { + null !== h && (h = h.next = { + eventTime: g, + lane: 0, + tag: s.tag, + payload: s.payload, + callback: s.callback, + next: null + }); + e: { + var p = e, + m = s; + switch (l = t, g = i, m.tag) { + case 1: + if ("function" == typeof(p = m.payload)) { + u = p.call(g, u, l); + break e + } + u = p; + break e; + case 3: + p.flags = -4097 & p.flags | 64; + case 0: + if (null == (l = "function" == typeof(p = m.payload) ? p.call(g, + u, l) : p)) break e; + u = o({}, u, l); + break e; + case 2: + ar = !0 + } + } + null !== s.callback && (e.flags |= 32, null === (l = r.effects) ? r.effects = [ + s + ] : l.push(s)) + } else g = { + eventTime: g, + lane: l, + tag: s.tag, + payload: s.payload, + callback: s.callback, + next: null + }, null === h ? (c = h = g, d = u) : h = h.next = g, a |= l; + if (null === (s = s.next)) { + if (null === (l = r.shared.pending)) break; + s = l.next, l.next = null, r.lastBaseUpdate = l, r.shared.pending = + null + } + } + null === h && (d = u), r.baseState = d, r.firstBaseUpdate = c, r.lastBaseUpdate = + h, Ba |= a, e.lanes = a, e.memoizedState = u + } + } + + function pr(e, t, i) { + if (e = t.effects, t.effects = null, null !== e) + for (t = 0; t < e.length; t++) { + var n = e[t], + o = n.callback; + if (null !== o) { + if (n.callback = null, n = i, "function" != typeof o) throw Error(s( + 191, o)); + o.call(n) + } + } + } + var mr = (new n.Component).refs; + + function fr(e, t, i, n) { + i = null == (i = i(n, t = e.memoizedState)) ? t : o({}, t, i), e.memoizedState = + i, 0 === e.lanes && (e.updateQueue.baseState = i) + } + var _r = { + isMounted: function(e) { + return !!(e = e._reactInternals) && Ge(e) === e + }, + enqueueSetState: function(e, t, i) { + e = e._reactInternals; + var n = dl(), + o = cl(e), + r = cr(n, o); + r.payload = t, null != i && (r.callback = i), hr(e, r), hl(e, o, n) + }, + enqueueReplaceState: function(e, t, i) { + e = e._reactInternals; + var n = dl(), + o = cl(e), + r = cr(n, o); + r.tag = 1, r.payload = t, null != i && (r.callback = i), hr(e, r), hl( + e, o, n) + }, + enqueueForceUpdate: function(e, t) { + e = e._reactInternals; + var i = dl(), + n = cl(e), + o = cr(i, n); + o.tag = 2, null != t && (o.callback = t), hr(e, o), hl(e, n, i) + } + }; + + function br(e, t, i, n, o, r, s) { + return "function" == typeof(e = e.stateNode).shouldComponentUpdate ? e.shouldComponentUpdate( + n, r, s) : !(t.prototype && t.prototype.isPureReactComponent && hn(i, + n) && hn(o, r)) + } + + function vr(e, t, i) { + var n = !1, + o = uo, + r = t.contextType; + return "object" == typeof r && null !== r ? r = sr(r) : (o = _o(t) ? mo : + go.current, r = (n = null != (n = t.contextTypes)) ? fo(e, o) : uo), t = + new t(i, r), e.memoizedState = null !== t.state && void 0 !== t.state ? + t.state : null, t.updater = _r, e.stateNode = t, t._reactInternals = e, + n && ((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext = o, + e.__reactInternalMemoizedMaskedChildContext = r), t + } + + function wr(e, t, i, n) { + e = t.state, "function" == typeof t.componentWillReceiveProps && t.componentWillReceiveProps( + i, n), "function" == typeof t.UNSAFE_componentWillReceiveProps && t.UNSAFE_componentWillReceiveProps( + i, n), t.state !== e && _r.enqueueReplaceState(t, t.state, null) + } + + function Cr(e, t, i, n) { + var o = e.stateNode; + o.props = i, o.state = e.memoizedState, o.refs = mr, lr(e); + var r = t.contextType; + "object" == typeof r && null !== r ? o.context = sr(r) : (r = _o(t) ? mo : + go.current, o.context = fo(e, r)), gr(e, i, o, n), o.state = e.memoizedState, + "function" == typeof(r = t.getDerivedStateFromProps) && (fr(e, t, r, i), + o.state = e.memoizedState), "function" == typeof t.getDerivedStateFromProps || + "function" == typeof o.getSnapshotBeforeUpdate || "function" != typeof o + .UNSAFE_componentWillMount && "function" != typeof o.componentWillMount || + (t = o.state, "function" == typeof o.componentWillMount && o.componentWillMount(), + "function" == typeof o.UNSAFE_componentWillMount && o.UNSAFE_componentWillMount(), + t !== o.state && _r.enqueueReplaceState(o, o.state, null), gr(e, i, o, + n), o.state = e.memoizedState), "function" == typeof o.componentDidMount && + (e.flags |= 4) + } + var yr = Array.isArray; + + function Sr(e, t, i) { + if (null !== (e = i.ref) && "function" != typeof e && "object" != typeof e) { + if (i._owner) { + if (i = i._owner) { + if (1 !== i.tag) throw Error(s(309)); + var n = i.stateNode + } + if (!n) throw Error(s(147, e)); + var o = "" + e; + return null !== t && null !== t.ref && "function" == typeof t.ref && t + .ref._stringRef === o ? t.ref : (t = function(e) { + var t = n.refs; + t === mr && (t = n.refs = {}), null === e ? delete t[o] : t[o] = e + }, t._stringRef = o, t) + } + if ("string" != typeof e) throw Error(s(284)); + if (!i._owner) throw Error(s(290, e)) + } + return e + } + + function xr(e, t) { + if ("textarea" !== e.type) throw Error(s(31, "[object Object]" === + Object.prototype.toString.call(t) ? "object with keys {" + Object.keys( + t).join(", ") + "}" : t)) + } + + function kr(e) { + function t(t, i) { + if (e) { + var n = t.lastEffect; + null !== n ? (n.nextEffect = i, t.lastEffect = i) : t.firstEffect = t.lastEffect = + i, i.nextEffect = null, i.flags = 8 + } + } + + function i(i, n) { + if (!e) return null; + for (; null !== n;) t(i, n), n = n.sibling; + return null + } + + function n(e, t) { + for (e = new Map; null !== t;) null !== t.key ? e.set(t.key, t) : e.set( + t.index, t), t = t.sibling; + return e + } + + function o(e, t) { + return (e = Ul(e, t)).index = 0, e.sibling = null, e + } + + function r(t, i, n) { + return t.index = n, e ? null !== (n = t.alternate) ? (n = n.index) < i ? + (t.flags = 2, i) : n : (t.flags = 2, i) : i + } + + function a(t) { + return e && null === t.alternate && (t.flags = 2), t + } + + function l(e, t, i, n) { + return null === t || 6 !== t.tag ? ((t = ql(i, e.mode, n)).return = e, + t) : ((t = o(t, i)).return = e, t) + } + + function d(e, t, i, n) { + return null !== t && t.elementType === i.type ? ((n = o(t, i.props)).ref = + Sr(e, t, i), n.return = e, n) : ((n = jl(i.type, i.key, i.props, null, + e.mode, n)).ref = Sr(e, t, i), n.return = e, n) + } + + function c(e, t, i, n) { + return null === t || 4 !== t.tag || t.stateNode.containerInfo !== i.containerInfo || + t.stateNode.implementation !== i.implementation ? ((t = Zl(i, e.mode, + n)).return = e, t) : ((t = o(t, i.children || [])).return = e, t) + } + + function h(e, t, i, n, r) { + return null === t || 7 !== t.tag ? ((t = Kl(i, e.mode, n, r)).return = + e, t) : ((t = o(t, i)).return = e, t) + } + + function u(e, t, i) { + if ("string" == typeof t || "number" == typeof t) return (t = ql("" + t, + e.mode, i)).return = e, t; + if ("object" == typeof t && null !== t) { + switch (t.$$typeof) { + case y: + return (i = jl(t.type, t.key, t.props, null, e.mode, i)).ref = Sr(e, + null, t), i.return = e, i; + case S: + return (t = Zl(t, e.mode, i)).return = e, t + } + if (yr(t) || H(t)) return (t = Kl(t, e.mode, i, null)).return = e, t; + xr(e, t) + } + return null + } + + function g(e, t, i, n) { + var o = null !== t ? t.key : null; + if ("string" == typeof i || "number" == typeof i) return null !== o ? + null : l(e, t, "" + i, n); + if ("object" == typeof i && null !== i) { + switch (i.$$typeof) { + case y: + return i.key === o ? i.type === x ? h(e, t, i.props.children, n, o) : + d(e, t, i, n) : null; + case S: + return i.key === o ? c(e, t, i, n) : null + } + if (yr(i) || H(i)) return null !== o ? null : h(e, t, i, n, null); + xr(e, i) + } + return null + } + + function p(e, t, i, n, o) { + if ("string" == typeof n || "number" == typeof n) return l(t, e = e.get( + i) || null, "" + n, o); + if ("object" == typeof n && null !== n) { + switch (n.$$typeof) { + case y: + return e = e.get(null === n.key ? i : n.key) || null, n.type === x ? + h(t, e, n.props.children, o, n.key) : d(t, e, n, o); + case S: + return c(t, e = e.get(null === n.key ? i : n.key) || null, n, o) + } + if (yr(n) || H(n)) return h(t, e = e.get(i) || null, n, o, null); + xr(t, n) + } + return null + } + + function m(o, s, a, l) { + for (var d = null, c = null, h = s, m = s = 0, f = null; null !== h && + m < a.length; m++) { + h.index > m ? (f = h, h = null) : f = h.sibling; + var _ = g(o, h, a[m], l); + if (null === _) { + null === h && (h = f); + break + } + e && h && null === _.alternate && t(o, h), s = r(_, s, m), null === c ? + d = _ : c.sibling = _, c = _, h = f + } + if (m === a.length) return i(o, h), d; + if (null === h) { + for (; m < a.length; m++) null !== (h = u(o, a[m], l)) && (s = r(h, s, + m), null === c ? d = h : c.sibling = h, c = h); + return d + } + for (h = n(o, h); m < a.length; m++) null !== (f = p(h, o, m, a[m], l)) && + (e && null !== f.alternate && h.delete(null === f.key ? m : f.key), s = + r(f, s, m), null === c ? d = f : c.sibling = f, c = f); + return e && h.forEach((function(e) { + return t(o, e) + })), d + } + + function f(o, a, l, d) { + var c = H(l); + if ("function" != typeof c) throw Error(s(150)); + if (null == (l = c.call(l))) throw Error(s(151)); + for (var h = c = null, m = a, f = a = 0, _ = null, b = l.next(); null !== + m && !b.done; f++, b = l.next()) { + m.index > f ? (_ = m, m = null) : _ = m.sibling; + var v = g(o, m, b.value, d); + if (null === v) { + null === m && (m = _); + break + } + e && m && null === v.alternate && t(o, m), a = r(v, a, f), null === h ? + c = v : h.sibling = v, h = v, m = _ + } + if (b.done) return i(o, m), c; + if (null === m) { + for (; !b.done; f++, b = l.next()) null !== (b = u(o, b.value, d)) && + (a = r(b, a, f), null === h ? c = b : h.sibling = b, h = b); + return c + } + for (m = n(o, m); !b.done; f++, b = l.next()) null !== (b = p(m, o, f, + b.value, d)) && (e && null !== b.alternate && m.delete(null === b.key ? + f : b.key), a = r(b, a, f), null === h ? c = b : h.sibling = b, h = + b); + return e && m.forEach((function(e) { + return t(o, e) + })), c + } + return function(e, n, r, l) { + var d = "object" == typeof r && null !== r && r.type === x && null === + r.key; + d && (r = r.props.children); + var c = "object" == typeof r && null !== r; + if (c) switch (r.$$typeof) { + case y: + e: { + for (c = r.key, d = n; null !== d;) { + if (d.key === c) { + if (7 === d.tag) { + if (r.type === x) { + i(e, d.sibling), (n = o(d, r.props.children)).return = e, e = + n; + break e + } + } else if (d.elementType === r.type) { + i(e, d.sibling), (n = o(d, r.props)).ref = Sr(e, d, r), n.return = + e, e = n; + break e + } + i(e, d); + break + } + t(e, d), d = d.sibling + } + r.type === x ? ((n = Kl(r.props.children, e.mode, l, r.key)).return = + e, e = n) : ((l = jl(r.type, r.key, r.props, null, e.mode, l)).ref = + Sr(e, n, r), l.return = e, e = l) + } + return a(e); + case S: + e: { + for (d = r.key; null !== n;) { + if (n.key === d) { + if (4 === n.tag && n.stateNode.containerInfo === r.containerInfo && + n.stateNode.implementation === r.implementation) { + i(e, n.sibling), (n = o(n, r.children || [])).return = e, e = + n; + break e + } + i(e, n); + break + } + t(e, n), n = n.sibling + }(n = Zl(r, e.mode, l)).return = e, e = n + } + return a(e) + } + if ("string" == typeof r || "number" == typeof r) return r = "" + r, + null !== n && 6 === n.tag ? (i(e, n.sibling), (n = o(n, r)).return = + e, e = n) : (i(e, n), (n = ql(r, e.mode, l)).return = e, e = n), a( + e); + if (yr(r)) return m(e, n, r, l); + if (H(r)) return f(e, n, r, l); + if (c && xr(e, r), void 0 === r && !d) switch (e.tag) { + case 1: + case 22: + case 0: + case 11: + case 15: + throw Error(s(152, q(e.type) || "Component")) + } + return i(e, n) + } + } + var Lr = kr(!0), + Nr = kr(!1), + Dr = {}, + Er = lo(Dr), + Ir = lo(Dr), + Tr = lo(Dr); + + function Mr(e) { + if (e === Dr) throw Error(s(174)); + return e + } + + function Ar(e, t) { + switch (ho(Tr, t), ho(Ir, e), ho(Er, Dr), e = t.nodeType) { + case 9: + case 11: + t = (t = t.documentElement) ? t.namespaceURI : ge(null, ""); + break; + default: + t = ge(t = (e = 8 === e ? t.parentNode : t).namespaceURI || null, e = + e.tagName) + } + co(Er), ho(Er, t) + } + + function Rr() { + co(Er), co(Ir), co(Tr) + } + + function Or(e) { + Mr(Tr.current); + var t = Mr(Er.current), + i = ge(t, e.type); + t !== i && (ho(Ir, e), ho(Er, i)) + } + + function Pr(e) { + Ir.current === e && (co(Er), co(Ir)) + } + var Fr = lo(0); + + function Br(e) { + for (var t = e; null !== t;) { + if (13 === t.tag) { + var i = t.memoizedState; + if (null !== i && (null === (i = i.dehydrated) || "$?" === i.data || + "$!" === i.data)) return t + } else if (19 === t.tag && void 0 !== t.memoizedProps.revealOrder) { + if (0 != (64 & t.flags)) return t + } else if (null !== t.child) { + t.child.return = t, t = t.child; + continue + } + if (t === e) break; + for (; null === t.sibling;) { + if (null === t.return || t.return === e) return null; + t = t.return + } + t.sibling.return = t.return, t = t.sibling + } + return null + } + var Wr = null, + zr = null, + Vr = !1; + + function Hr(e, t) { + var i = Vl(5, null, null, 0); + i.elementType = "DELETED", i.type = "DELETED", i.stateNode = t, i.return = + e, i.flags = 8, null !== e.lastEffect ? (e.lastEffect.nextEffect = i, e + .lastEffect = i) : e.firstEffect = e.lastEffect = i + } + + function Ur(e, t) { + switch (e.tag) { + case 5: + var i = e.type; + return null !== (t = 1 !== t.nodeType || i.toLowerCase() !== t.nodeName + .toLowerCase() ? null : t) && (e.stateNode = t, !0); + case 6: + return null !== (t = "" === e.pendingProps || 3 !== t.nodeType ? null : + t) && (e.stateNode = t, !0); + default: + return !1 + } + } + + function jr(e) { + if (Vr) { + var t = zr; + if (t) { + var i = t; + if (!Ur(e, t)) { + if (!(t = qn(i.nextSibling)) || !Ur(e, t)) return e.flags = -1025 & e + .flags | 2, Vr = !1, void(Wr = e); + Hr(Wr, i) + } + Wr = e, zr = qn(t.firstChild) + } else e.flags = -1025 & e.flags | 2, Vr = !1, Wr = e + } + } + + function Kr(e) { + for (e = e.return; null !== e && 5 !== e.tag && 3 !== e.tag && 13 !== e.tag;) + e = e.return; + Wr = e + } + + function $r(e) { + if (e !== Wr) return !1; + if (!Vr) return Kr(e), Vr = !0, !1; + var t = e.type; + if (5 !== e.tag || "head" !== t && "body" !== t && !Un(t, e.memoizedProps)) + for (t = zr; t;) Hr(e, t), t = qn(t.nextSibling); + if (Kr(e), 13 === e.tag) { + if (!(e = null !== (e = e.memoizedState) ? e.dehydrated : null)) throw Error( + s(317)); + e: { + for (e = e.nextSibling, t = 0; e;) { + if (8 === e.nodeType) { + var i = e.data; + if ("/$" === i) { + if (0 === t) { + zr = qn(e.nextSibling); + break e + } + t-- + } else "$" !== i && "$!" !== i && "$?" !== i || t++ + } + e = e.nextSibling + } + zr = null + } + } else zr = Wr ? qn(e.stateNode.nextSibling) : null; + return !0 + } + + function qr() { + zr = Wr = null, Vr = !1 + } + var Zr = []; + + function Gr() { + for (var e = 0; e < Zr.length; e++) Zr[e]._workInProgressVersionPrimary = + null; + Zr.length = 0 + } + var Yr = C.ReactCurrentDispatcher, + Qr = C.ReactCurrentBatchConfig, + Xr = 0, + Jr = null, + es = null, + ts = null, + is = !1, + ns = !1; + + function os() { + throw Error(s(321)) + } + + function rs(e, t) { + if (null === t) return !1; + for (var i = 0; i < t.length && i < e.length; i++) + if (!dn(e[i], t[i])) return !1; + return !0 + } + + function ss(e, t, i, n, o, r) { + if (Xr = r, Jr = t, t.memoizedState = null, t.updateQueue = null, t.lanes = + 0, Yr.current = null === e || null === e.memoizedState ? Ms : As, e = i( + n, o), ns) { + r = 0; + do { + if (ns = !1, !(25 > r)) throw Error(s(301)); + r += 1, ts = es = null, t.updateQueue = null, Yr.current = Rs, e = i(n, + o) + } while (ns) + } + if (Yr.current = Ts, t = null !== es && null !== es.next, Xr = 0, ts = + es = Jr = null, is = !1, t) throw Error(s(300)); + return e + } + + function as() { + var e = { + memoizedState: null, + baseState: null, + baseQueue: null, + queue: null, + next: null + }; + return null === ts ? Jr.memoizedState = ts = e : ts = ts.next = e, ts + } + + function ls() { + if (null === es) { + var e = Jr.alternate; + e = null !== e ? e.memoizedState : null + } else e = es.next; + var t = null === ts ? Jr.memoizedState : ts.next; + if (null !== t) ts = t, es = e; + else { + if (null === e) throw Error(s(310)); + e = { + memoizedState: (es = e).memoizedState, + baseState: es.baseState, + baseQueue: es.baseQueue, + queue: es.queue, + next: null + }, null === ts ? Jr.memoizedState = ts = e : ts = ts.next = e + } + return ts + } + + function ds(e, t) { + return "function" == typeof t ? t(e) : t + } + + function cs(e) { + var t = ls(), + i = t.queue; + if (null === i) throw Error(s(311)); + i.lastRenderedReducer = e; + var n = es, + o = n.baseQueue, + r = i.pending; + if (null !== r) { + if (null !== o) { + var a = o.next; + o.next = r.next, r.next = a + } + n.baseQueue = o = r, i.pending = null + } + if (null !== o) { + o = o.next, n = n.baseState; + var l = a = r = null, + d = o; + do { + var c = d.lane; + if ((Xr & c) === c) null !== l && (l = l.next = { + lane: 0, + action: d.action, + eagerReducer: d.eagerReducer, + eagerState: d.eagerState, + next: null + }), n = d.eagerReducer === e ? d.eagerState : e(n, d.action); + else { + var h = { + lane: c, + action: d.action, + eagerReducer: d.eagerReducer, + eagerState: d.eagerState, + next: null + }; + null === l ? (a = l = h, r = n) : l = l.next = h, Jr.lanes |= c, Ba |= + c + } + d = d.next + } while (null !== d && d !== o); + null === l ? r = n : l.next = a, dn(n, t.memoizedState) || (Ps = !0), t + .memoizedState = n, t.baseState = r, t.baseQueue = l, i.lastRenderedState = + n + } + return [t.memoizedState, i.dispatch] + } + + function hs(e) { + var t = ls(), + i = t.queue; + if (null === i) throw Error(s(311)); + i.lastRenderedReducer = e; + var n = i.dispatch, + o = i.pending, + r = t.memoizedState; + if (null !== o) { + i.pending = null; + var a = o = o.next; + do { + r = e(r, a.action), a = a.next + } while (a !== o); + dn(r, t.memoizedState) || (Ps = !0), t.memoizedState = r, null === t.baseQueue && + (t.baseState = r), i.lastRenderedState = r + } + return [r, n] + } + + function us(e, t, i) { + var n = t._getVersion; + n = n(t._source); + var o = t._workInProgressVersionPrimary; + if (null !== o ? e = o === n : (e = e.mutableReadLanes, (e = (Xr & e) === + e) && (t._workInProgressVersionPrimary = n, Zr.push(t))), e) return i( + t._source); + throw Zr.push(t), Error(s(350)) + } + + function gs(e, t, i, n) { + var o = Ia; + if (null === o) throw Error(s(349)); + var r = t._getVersion, + a = r(t._source), + l = Yr.current, + d = l.useState((function() { + return us(o, t, i) + })), + c = d[1], + h = d[0]; + d = ts; + var u = e.memoizedState, + g = u.refs, + p = g.getSnapshot, + m = u.source; + u = u.subscribe; + var f = Jr; + return e.memoizedState = { + refs: g, + source: t, + subscribe: n + }, l.useEffect((function() { + g.getSnapshot = i, g.setSnapshot = c; + var e = r(t._source); + if (!dn(a, e)) { + e = i(t._source), dn(h, e) || (c(e), e = cl(f), o.mutableReadLanes |= + e & o.pendingLanes), e = o.mutableReadLanes, o.entangledLanes |= + e; + for (var n = o.entanglements, s = e; 0 < s;) { + var l = 31 - Ut(s), + d = 1 << l; + n[l] |= e, s &= ~d + } + } + }), [i, t, n]), l.useEffect((function() { + return n(t._source, (function() { + var e = g.getSnapshot, + i = g.setSnapshot; + try { + i(e(t._source)); + var n = cl(f); + o.mutableReadLanes |= n & o.pendingLanes + } catch (e) { + i((function() { + throw e + })) + } + })) + }), [t, n]), dn(p, i) && dn(m, t) && dn(u, n) || ((e = { + pending: null, + dispatch: null, + lastRenderedReducer: ds, + lastRenderedState: h + }).dispatch = c = Is.bind(null, Jr, e), d.queue = e, d.baseQueue = + null, h = us(o, t, i), d.memoizedState = d.baseState = h), h + } + + function ps(e, t, i) { + return gs(ls(), e, t, i) + } + + function ms(e) { + var t = as(); + return "function" == typeof e && (e = e()), t.memoizedState = t.baseState = + e, e = (e = t.queue = { + pending: null, + dispatch: null, + lastRenderedReducer: ds, + lastRenderedState: e + }).dispatch = Is.bind(null, Jr, e), [t.memoizedState, e] + } + + function fs(e, t, i, n) { + return e = { + tag: e, + create: t, + destroy: i, + deps: n, + next: null + }, null === (t = Jr.updateQueue) ? (t = { + lastEffect: null + }, Jr.updateQueue = t, t.lastEffect = e.next = e) : null === (i = t.lastEffect) ? + t.lastEffect = e.next = e : (n = i.next, i.next = e, e.next = n, t.lastEffect = + e), e + } + + function _s(e) { + return e = { + current: e + }, as().memoizedState = e + } + + function bs() { + return ls().memoizedState + } + + function vs(e, t, i, n) { + var o = as(); + Jr.flags |= e, o.memoizedState = fs(1 | t, i, void 0, void 0 === n ? + null : n) + } + + function ws(e, t, i, n) { + var o = ls(); + n = void 0 === n ? null : n; + var r = void 0; + if (null !== es) { + var s = es.memoizedState; + if (r = s.destroy, null !== n && rs(n, s.deps)) return void fs(t, i, r, + n) + } + Jr.flags |= e, o.memoizedState = fs(1 | t, i, r, n) + } + + function Cs(e, t) { + return vs(516, 4, e, t) + } + + function ys(e, t) { + return ws(516, 4, e, t) + } + + function Ss(e, t) { + return ws(4, 2, e, t) + } + + function xs(e, t) { + return "function" == typeof t ? (e = e(), t(e), function() { + t(null) + }) : null != t ? (e = e(), t.current = e, function() { + t.current = null + }) : void 0 + } + + function ks(e, t, i) { + return i = null != i ? i.concat([e]) : null, ws(4, 2, xs.bind(null, t, e), + i) + } + + function Ls() {} + + function Ns(e, t) { + var i = ls(); + t = void 0 === t ? null : t; + var n = i.memoizedState; + return null !== n && null !== t && rs(t, n[1]) ? n[0] : (i.memoizedState = [ + e, t + ], e) + } + + function Ds(e, t) { + var i = ls(); + t = void 0 === t ? null : t; + var n = i.memoizedState; + return null !== n && null !== t && rs(t, n[1]) ? n[0] : (e = e(), i.memoizedState = [ + e, t + ], e) + } + + function Es(e, t) { + var i = jo(); + $o(98 > i ? 98 : i, (function() { + e(!0) + })), $o(97 < i ? 97 : i, (function() { + var i = Qr.transition; + Qr.transition = 1; + try { + e(!1), t() + } finally { + Qr.transition = i + } + })) + } + + function Is(e, t, i) { + var n = dl(), + o = cl(e), + r = { + lane: o, + action: i, + eagerReducer: null, + eagerState: null, + next: null + }, + s = t.pending; + if (null === s ? r.next = r : (r.next = s.next, s.next = r), t.pending = + r, s = e.alternate, e === Jr || null !== s && s === Jr) ns = is = !0; + else { + if (0 === e.lanes && (null === s || 0 === s.lanes) && null !== (s = t.lastRenderedReducer)) + try { + var a = t.lastRenderedState, + l = s(a, i); + if (r.eagerReducer = s, r.eagerState = l, dn(l, a)) return + } catch (e) {} + hl(e, o, n) + } + } + var Ts = { + readContext: sr, + useCallback: os, + useContext: os, + useEffect: os, + useImperativeHandle: os, + useLayoutEffect: os, + useMemo: os, + useReducer: os, + useRef: os, + useState: os, + useDebugValue: os, + useDeferredValue: os, + useTransition: os, + useMutableSource: os, + useOpaqueIdentifier: os, + unstable_isNewReconciler: !1 + }, + Ms = { + readContext: sr, + useCallback: function(e, t) { + return as().memoizedState = [e, void 0 === t ? null : t], e + }, + useContext: sr, + useEffect: Cs, + useImperativeHandle: function(e, t, i) { + return i = null != i ? i.concat([e]) : null, vs(4, 2, xs.bind(null, t, + e), i) + }, + useLayoutEffect: function(e, t) { + return vs(4, 2, e, t) + }, + useMemo: function(e, t) { + var i = as(); + return t = void 0 === t ? null : t, e = e(), i.memoizedState = [e, t], + e + }, + useReducer: function(e, t, i) { + var n = as(); + return t = void 0 !== i ? i(t) : t, n.memoizedState = n.baseState = t, + e = (e = n.queue = { + pending: null, + dispatch: null, + lastRenderedReducer: e, + lastRenderedState: t + }).dispatch = Is.bind(null, Jr, e), [n.memoizedState, e] + }, + useRef: _s, + useState: ms, + useDebugValue: Ls, + useDeferredValue: function(e) { + var t = ms(e), + i = t[0], + n = t[1]; + return Cs((function() { + var t = Qr.transition; + Qr.transition = 1; + try { + n(e) + } finally { + Qr.transition = t + } + }), [e]), i + }, + useTransition: function() { + var e = ms(!1), + t = e[0]; + return _s(e = Es.bind(null, e[1])), [e, t] + }, + useMutableSource: function(e, t, i) { + var n = as(); + return n.memoizedState = { + refs: { + getSnapshot: t, + setSnapshot: null + }, + source: e, + subscribe: i + }, gs(n, e, t, i) + }, + useOpaqueIdentifier: function() { + if (Vr) { + var e = !1, + t = function(e) { + return { + $$typeof: O, + toString: e, + valueOf: e + } + }((function() { + throw e || (e = !0, i("r:" + (Gn++).toString(36))), Error(s(355)) + })), + i = ms(t)[1]; + return 0 == (2 & Jr.mode) && (Jr.flags |= 516, fs(5, (function() { + i("r:" + (Gn++).toString(36)) + }), void 0, null)), t + } + return ms(t = "r:" + (Gn++).toString(36)), t + }, + unstable_isNewReconciler: !1 + }, + As = { + readContext: sr, + useCallback: Ns, + useContext: sr, + useEffect: ys, + useImperativeHandle: ks, + useLayoutEffect: Ss, + useMemo: Ds, + useReducer: cs, + useRef: bs, + useState: function() { + return cs(ds) + }, + useDebugValue: Ls, + useDeferredValue: function(e) { + var t = cs(ds), + i = t[0], + n = t[1]; + return ys((function() { + var t = Qr.transition; + Qr.transition = 1; + try { + n(e) + } finally { + Qr.transition = t + } + }), [e]), i + }, + useTransition: function() { + var e = cs(ds)[0]; + return [bs().current, e] + }, + useMutableSource: ps, + useOpaqueIdentifier: function() { + return cs(ds)[0] + }, + unstable_isNewReconciler: !1 + }, + Rs = { + readContext: sr, + useCallback: Ns, + useContext: sr, + useEffect: ys, + useImperativeHandle: ks, + useLayoutEffect: Ss, + useMemo: Ds, + useReducer: hs, + useRef: bs, + useState: function() { + return hs(ds) + }, + useDebugValue: Ls, + useDeferredValue: function(e) { + var t = hs(ds), + i = t[0], + n = t[1]; + return ys((function() { + var t = Qr.transition; + Qr.transition = 1; + try { + n(e) + } finally { + Qr.transition = t + } + }), [e]), i + }, + useTransition: function() { + var e = hs(ds)[0]; + return [bs().current, e] + }, + useMutableSource: ps, + useOpaqueIdentifier: function() { + return hs(ds)[0] + }, + unstable_isNewReconciler: !1 + }, + Os = C.ReactCurrentOwner, + Ps = !1; + + function Fs(e, t, i, n) { + t.child = null === e ? Nr(t, null, i, n) : Lr(t, e.child, i, n) + } + + function Bs(e, t, i, n, o) { + i = i.render; + var r = t.ref; + return rr(t, o), n = ss(e, t, i, n, r, o), null === e || Ps ? (t.flags |= + 1, Fs(e, t, n, o), t.child) : (t.updateQueue = e.updateQueue, t.flags &= + -517, e.lanes &= ~o, ia(e, t, o)) + } + + function Ws(e, t, i, n, o, r) { + if (null === e) { + var s = i.type; + return "function" != typeof s || Hl(s) || void 0 !== s.defaultProps || + null !== i.compare || void 0 !== i.defaultProps ? ((e = jl(i.type, + null, n, t, t.mode, r)).ref = t.ref, e.return = t, t.child = e) : (t.tag = + 15, t.type = s, zs(e, t, s, n, o, r)) + } + return s = e.child, 0 == (o & r) && (o = s.memoizedProps, (i = null !== + (i = i.compare) ? i : hn)(o, n) && e.ref === t.ref) ? ia(e, t, r) : (t + .flags |= 1, (e = Ul(s, n)).ref = t.ref, e.return = t, t.child = e) + } + + function zs(e, t, i, n, o, r) { + if (null !== e && hn(e.memoizedProps, n) && e.ref === t.ref) { + if (Ps = !1, 0 == (r & o)) return t.lanes = e.lanes, ia(e, t, r); + 0 != (16384 & e.flags) && (Ps = !0) + } + return Us(e, t, i, n, r) + } + + function Vs(e, t, i) { + var n = t.pendingProps, + o = n.children, + r = null !== e ? e.memoizedState : null; + if ("hidden" === n.mode || "unstable-defer-without-hiding" === n.mode) + if (0 == (4 & t.mode)) t.memoizedState = { + baseLanes: 0 + }, vl(0, i); + else { + if (0 == (1073741824 & i)) return e = null !== r ? r.baseLanes | i : i, + t.lanes = t.childLanes = 1073741824, t.memoizedState = { + baseLanes: e + }, vl(0, e), null; + t.memoizedState = { + baseLanes: 0 + }, vl(0, null !== r ? r.baseLanes : i) + } else null !== r ? (n = r.baseLanes | i, t.memoizedState = null) : n = + i, vl(0, n); + return Fs(e, t, o, i), t.child + } + + function Hs(e, t) { + var i = t.ref; + (null === e && null !== i || null !== e && e.ref !== i) && (t.flags |= + 128) + } + + function Us(e, t, i, n, o) { + var r = _o(i) ? mo : go.current; + return r = fo(t, r), rr(t, o), i = ss(e, t, i, n, r, o), null === e || + Ps ? (t.flags |= 1, Fs(e, t, i, o), t.child) : (t.updateQueue = e.updateQueue, + t.flags &= -517, e.lanes &= ~o, ia(e, t, o)) + } + + function js(e, t, i, n, o) { + if (_o(i)) { + var r = !0; + Co(t) + } else r = !1; + if (rr(t, o), null === t.stateNode) null !== e && (e.alternate = null, t + .alternate = null, t.flags |= 2), vr(t, i, n), Cr(t, i, n, o), n = !0; + else if (null === e) { + var s = t.stateNode, + a = t.memoizedProps; + s.props = a; + var l = s.context, + d = i.contextType; + d = "object" == typeof d && null !== d ? sr(d) : fo(t, d = _o(i) ? mo : + go.current); + var c = i.getDerivedStateFromProps, + h = "function" == typeof c || "function" == typeof s.getSnapshotBeforeUpdate; + h || "function" != typeof s.UNSAFE_componentWillReceiveProps && + "function" != typeof s.componentWillReceiveProps || (a !== n || l !== + d) && wr(t, s, n, d), ar = !1; + var u = t.memoizedState; + s.state = u, gr(t, n, s, o), l = t.memoizedState, a !== n || u !== l || + po.current || ar ? ("function" == typeof c && (fr(t, i, c, n), l = t.memoizedState), ( + a = ar || br(t, i, a, n, u, l, d)) ? (h || "function" != typeof s.UNSAFE_componentWillMount && + "function" != typeof s.componentWillMount || ("function" == typeof s + .componentWillMount && s.componentWillMount(), "function" == typeof s + .UNSAFE_componentWillMount && s.UNSAFE_componentWillMount()), + "function" == typeof s.componentDidMount && (t.flags |= 4)) : ( + "function" == typeof s.componentDidMount && (t.flags |= 4), t.memoizedProps = + n, t.memoizedState = l), s.props = n, s.state = l, s.context = d, n = + a) : ("function" == typeof s.componentDidMount && (t.flags |= 4), n = ! + 1) + } else { + s = t.stateNode, dr(e, t), a = t.memoizedProps, d = t.type === t.elementType ? + a : Qo(t.type, a), s.props = d, h = t.pendingProps, u = s.context, l = + "object" == typeof(l = i.contextType) && null !== l ? sr(l) : fo(t, l = + _o(i) ? mo : go.current); + var g = i.getDerivedStateFromProps; + (c = "function" == typeof g || "function" == typeof s.getSnapshotBeforeUpdate) || + "function" != typeof s.UNSAFE_componentWillReceiveProps && "function" != + typeof s.componentWillReceiveProps || (a !== h || u !== l) && wr(t, s, + n, l), ar = !1, u = t.memoizedState, s.state = u, gr(t, n, s, o); + var p = t.memoizedState; + a !== h || u !== p || po.current || ar ? ("function" == typeof g && (fr( + t, i, g, n), p = t.memoizedState), (d = ar || br(t, i, d, n, u, p, l)) ? + (c || "function" != typeof s.UNSAFE_componentWillUpdate && "function" != + typeof s.componentWillUpdate || ("function" == typeof s.componentWillUpdate && + s.componentWillUpdate(n, p, l), "function" == typeof s.UNSAFE_componentWillUpdate && + s.UNSAFE_componentWillUpdate(n, p, l)), "function" == typeof s.componentDidUpdate && + (t.flags |= 4), "function" == typeof s.getSnapshotBeforeUpdate && (t + .flags |= 256)) : ("function" != typeof s.componentDidUpdate || a === + e.memoizedProps && u === e.memoizedState || (t.flags |= 4), + "function" != typeof s.getSnapshotBeforeUpdate || a === e.memoizedProps && + u === e.memoizedState || (t.flags |= 256), t.memoizedProps = n, t.memoizedState = + p), s.props = n, s.state = p, s.context = l, n = d) : ("function" != + typeof s.componentDidUpdate || a === e.memoizedProps && u === e.memoizedState || + (t.flags |= 4), "function" != typeof s.getSnapshotBeforeUpdate || a === + e.memoizedProps && u === e.memoizedState || (t.flags |= 256), n = !1) + } + return Ks(e, t, i, n, r, o) + } + + function Ks(e, t, i, n, o, r) { + Hs(e, t); + var s = 0 != (64 & t.flags); + if (!n && !s) return o && yo(t, i, !1), ia(e, t, r); + n = t.stateNode, Os.current = t; + var a = s && "function" != typeof i.getDerivedStateFromError ? null : n.render(); + return t.flags |= 1, null !== e && s ? (t.child = Lr(t, e.child, null, r), + t.child = Lr(t, null, a, r)) : Fs(e, t, a, r), t.memoizedState = n.state, + o && yo(t, i, !0), t.child + } + + function $s(e) { + var t = e.stateNode; + t.pendingContext ? vo(0, t.pendingContext, t.pendingContext !== t.context) : + t.context && vo(0, t.context, !1), Ar(e, t.containerInfo) + } + var qs, Zs, Gs, Ys = { + dehydrated: null, + retryLane: 0 + }; + + function Qs(e, t, i) { + var n, o = t.pendingProps, + r = Fr.current, + s = !1; + return (n = 0 != (64 & t.flags)) || (n = (null === e || null !== e.memoizedState) && + 0 != (2 & r)), n ? (s = !0, t.flags &= -65) : null !== e && null === e + .memoizedState || void 0 === o.fallback || !0 === o.unstable_avoidThisFallback || + (r |= 1), ho(Fr, 1 & r), null === e ? (void 0 !== o.fallback && jr(t), + e = o.children, r = o.fallback, s ? (e = Xs(t, e, r, i), t.child.memoizedState = { + baseLanes: i + }, t.memoizedState = Ys, e) : "number" == typeof o.unstable_expectedLoadTime ? + (e = Xs(t, e, r, i), t.child.memoizedState = { + baseLanes: i + }, t.memoizedState = Ys, t.lanes = 33554432, e) : ((i = $l({ + mode: "visible", + children: e + }, t.mode, i, null)).return = t, t.child = i)) : (e.memoizedState, s ? + (o = function(e, t, i, n, o) { + var r = t.mode, + s = e.child; + e = s.sibling; + var a = { + mode: "hidden", + children: i + }; + return 0 == (2 & r) && t.child !== s ? ((i = t.child).childLanes = 0, + i.pendingProps = a, null !== (s = i.lastEffect) ? (t.firstEffect = + i.firstEffect, t.lastEffect = s, s.nextEffect = null) : t.firstEffect = + t.lastEffect = null) : i = Ul(s, a), null !== e ? n = Ul(e, n) : ( + n = Kl(n, r, o, null)).flags |= 2, n.return = t, i.return = t, i.sibling = + n, t.child = i, n + }(e, t, o.children, o.fallback, i), s = t.child, r = e.child.memoizedState, + s.memoizedState = null === r ? { + baseLanes: i + } : { + baseLanes: r.baseLanes | i + }, s.childLanes = e.childLanes & ~i, t.memoizedState = Ys, o) : (i = + function(e, t, i, n) { + var o = e.child; + return e = o.sibling, i = Ul(o, { + mode: "visible", + children: i + }), 0 == (2 & t.mode) && (i.lanes = n), i.return = t, i.sibling = + null, null !== e && (e.nextEffect = null, e.flags = 8, t.firstEffect = + t.lastEffect = e), t.child = i + }(e, t, o.children, i), t.memoizedState = null, i)) + } + + function Xs(e, t, i, n) { + var o = e.mode, + r = e.child; + return t = { + mode: "hidden", + children: t + }, 0 == (2 & o) && null !== r ? (r.childLanes = 0, r.pendingProps = t) : + r = $l(t, o, 0, null), i = Kl(i, o, n, null), r.return = e, i.return = + e, r.sibling = i, e.child = r, i + } + + function Js(e, t) { + e.lanes |= t; + var i = e.alternate; + null !== i && (i.lanes |= t), or(e.return, t) + } + + function ea(e, t, i, n, o, r) { + var s = e.memoizedState; + null === s ? e.memoizedState = { + isBackwards: t, + rendering: null, + renderingStartTime: 0, + last: n, + tail: i, + tailMode: o, + lastEffect: r + } : (s.isBackwards = t, s.rendering = null, s.renderingStartTime = 0, s + .last = n, s.tail = i, s.tailMode = o, s.lastEffect = r) + } + + function ta(e, t, i) { + var n = t.pendingProps, + o = n.revealOrder, + r = n.tail; + if (Fs(e, t, n.children, i), 0 != (2 & (n = Fr.current))) n = 1 & n | 2, + t.flags |= 64; + else { + if (null !== e && 0 != (64 & e.flags)) e: for (e = t.child; null !== e;) { + if (13 === e.tag) null !== e.memoizedState && Js(e, i); + else if (19 === e.tag) Js(e, i); + else if (null !== e.child) { + e.child.return = e, e = e.child; + continue + } + if (e === t) break e; + for (; null === e.sibling;) { + if (null === e.return || e.return === t) break e; + e = e.return + } + e.sibling.return = e.return, e = e.sibling + } + n &= 1 + } + if (ho(Fr, n), 0 == (2 & t.mode)) t.memoizedState = null; + else switch (o) { + case "forwards": + for (i = t.child, o = null; null !== i;) null !== (e = i.alternate) && + null === Br(e) && (o = i), i = i.sibling; + null === (i = o) ? (o = t.child, t.child = null) : (o = i.sibling, i.sibling = + null), ea(t, !1, o, i, r, t.lastEffect); + break; + case "backwards": + for (i = null, o = t.child, t.child = null; null !== o;) { + if (null !== (e = o.alternate) && null === Br(e)) { + t.child = o; + break + } + e = o.sibling, o.sibling = i, i = o, o = e + } + ea(t, !0, i, null, r, t.lastEffect); + break; + case "together": + ea(t, !1, null, null, void 0, t.lastEffect); + break; + default: + t.memoizedState = null + } + return t.child + } + + function ia(e, t, i) { + if (null !== e && (t.dependencies = e.dependencies), Ba |= t.lanes, 0 != + (i & t.childLanes)) { + if (null !== e && t.child !== e.child) throw Error(s(153)); + if (null !== t.child) { + for (i = Ul(e = t.child, e.pendingProps), t.child = i, i.return = t; null !== + e.sibling;) e = e.sibling, (i = i.sibling = Ul(e, e.pendingProps)).return = + t; + i.sibling = null + } + return t.child + } + return null + } + + function na(e, t) { + if (!Vr) switch (e.tailMode) { + case "hidden": + t = e.tail; + for (var i = null; null !== t;) null !== t.alternate && (i = t), t = + t.sibling; + null === i ? e.tail = null : i.sibling = null; + break; + case "collapsed": + i = e.tail; + for (var n = null; null !== i;) null !== i.alternate && (n = i), i = + i.sibling; + null === n ? t || null === e.tail ? e.tail = null : e.tail.sibling = + null : n.sibling = null + } + } + + function oa(e, t, i) { + var n = t.pendingProps; + switch (t.tag) { + case 2: + case 16: + case 15: + case 0: + case 11: + case 7: + case 8: + case 12: + case 9: + case 14: + return null; + case 1: + case 17: + return _o(t.type) && bo(), null; + case 3: + return Rr(), co(po), co(go), Gr(), (n = t.stateNode).pendingContext && + (n.context = n.pendingContext, n.pendingContext = null), null !== e && + null !== e.child || ($r(t) ? t.flags |= 4 : n.hydrate || (t.flags |= + 256)), null; + case 5: + Pr(t); + var r = Mr(Tr.current); + if (i = t.type, null !== e && null != t.stateNode) Zs(e, t, i, n), e.ref !== + t.ref && (t.flags |= 128); + else { + if (!n) { + if (null === t.stateNode) throw Error(s(166)); + return null + } + if (e = Mr(Er.current), $r(t)) { + n = t.stateNode, i = t.type; + var a = t.memoizedProps; + switch (n[Qn] = t, n[Xn] = a, i) { + case "dialog": + En("cancel", n), En("close", n); + break; + case "iframe": + case "object": + case "embed": + En("load", n); + break; + case "video": + case "audio": + for (e = 0; e < kn.length; e++) En(kn[e], n); + break; + case "source": + En("error", n); + break; + case "img": + case "image": + case "link": + En("error", n), En("load", n); + break; + case "details": + En("toggle", n); + break; + case "input": + ee(n, a), En("invalid", n); + break; + case "select": + n._wrapperState = { + wasMultiple: !!a.multiple + }, En("invalid", n); + break; + case "textarea": + le(n, a), En("invalid", n) + } + for (var d in Se(i, a), e = null, a) a.hasOwnProperty(d) && (r = a[d], + "children" === d ? "string" == typeof r ? n.textContent !== r && ( + e = ["children", r]) : "number" == typeof r && n.textContent !== + "" + r && (e = ["children", "" + r]) : l.hasOwnProperty(d) && null != + r && "onScroll" === d && En("scroll", n)); + switch (i) { + case "input": + Y(n), ne(n, a, !0); + break; + case "textarea": + Y(n), ce(n); + break; + case "select": + case "option": + break; + default: + "function" == typeof a.onClick && (n.onclick = Wn) + } + n = e, t.updateQueue = n, null !== n && (t.flags |= 4) + } else { + switch (d = 9 === r.nodeType ? r : r.ownerDocument, e === he && (e = + ue(i)), e === he ? "script" === i ? ((e = d.createElement("div")).innerHTML = + "