@sourcegraph/amp 0.0.1748865683-g71e54e → 0.0.1748880131-g73e573
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/amp.js +3 -3
- package/dist/{client-BWw-YoAm.js → client-Byn34k3j.js} +2 -2
- package/dist/{client-BWw-YoAm.js.map → client-Byn34k3j.js.map} +1 -1
- package/dist/{console-CTjwGR94.js → console-DU9kM8bt.js} +7700 -7964
- package/dist/console-DU9kM8bt.js.map +1 -0
- package/dist/{create_file.node-vNn4fbhz.js → create_file.node-ClSLp2zA.js} +2 -2
- package/dist/{create_file.node-vNn4fbhz.js.map → create_file.node-ClSLp2zA.js.map} +1 -1
- package/dist/{edit_file.node-CT1vyl1i.js → edit_file.node-sQFRZtsD.js} +3 -3
- package/dist/{edit_file.node-CT1vyl1i.js.map → edit_file.node-sQFRZtsD.js.map} +1 -1
- package/dist/{executable-BrAdMU71.js → executable-2OB-i_QC.js} +2 -2
- package/dist/{executable-BrAdMU71.js.map → executable-2OB-i_QC.js.map} +1 -1
- package/dist/{files-BOfdJygp.js → files-BhysNTQv.js} +2 -2
- package/dist/{files-BOfdJygp.js.map → files-BhysNTQv.js.map} +1 -1
- package/dist/{glob.node-4tOopzOM.js → glob.node-cVUTfljn.js} +4 -4
- package/dist/{glob.node-4tOopzOM.js.map → glob.node-cVUTfljn.js.map} +1 -1
- package/dist/{index-NLHysr2h.js → index-Cb59cjjj.js} +2 -2
- package/dist/{index-NLHysr2h.js.map → index-Cb59cjjj.js.map} +1 -1
- package/dist/{list_directory.node-updCUrTG.js → list_directory.node-B8Oj3ncW.js} +2 -2
- package/dist/{list_directory.node-updCUrTG.js.map → list_directory.node-B8Oj3ncW.js.map} +1 -1
- package/dist/{load-profile-DZZRFAc9.js → load-profile-CV3b6-Nj.js} +2 -2
- package/dist/{load-profile-DZZRFAc9.js.map → load-profile-CV3b6-Nj.js.map} +1 -1
- package/dist/{main-BJVONhWT.js → main-CZ7RS9Yt.js} +8534 -8317
- package/dist/main-CZ7RS9Yt.js.map +1 -0
- package/dist/{node-BtSehPh_.js → node-B45lZe2M.js} +3 -3
- package/dist/{node-BtSehPh_.js.map → node-B45lZe2M.js.map} +1 -1
- package/dist/{node-DGpCXn3p.js → node-B4WUHHZd.js} +2 -2
- package/dist/{node-DGpCXn3p.js.map → node-B4WUHHZd.js.map} +1 -1
- package/dist/{node-S3C83o8k.js → node-BPXlKmtc.js} +2 -2
- package/dist/{node-S3C83o8k.js.map → node-BPXlKmtc.js.map} +1 -1
- package/dist/{node-DIQSaLGP.js → node-B_G-Clj6.js} +3 -3
- package/dist/{node-DIQSaLGP.js.map → node-B_G-Clj6.js.map} +1 -1
- package/dist/{node-BkgN80SA.js → node-DujrrqQo.js} +4 -4
- package/dist/{node-BkgN80SA.js.map → node-DujrrqQo.js.map} +1 -1
- package/dist/{node-iqSbLvK6.js → node-UKopbCpJ.js} +1094 -837
- package/dist/node-UKopbCpJ.js.map +1 -0
- package/dist/{read_file.node-B7tSIDli.js → read_file.node-gXffR6jB.js} +2 -2
- package/dist/{read_file.node-B7tSIDli.js.map → read_file.node-gXffR6jB.js.map} +1 -1
- package/dist/{stdio-nUAEiLxy.js → stdio-B7u3y1kB.js} +3 -3
- package/dist/{stdio-nUAEiLxy.js.map → stdio-B7u3y1kB.js.map} +1 -1
- package/dist/storybook.js +1 -1
- package/dist/{undo_edit.node-BYhKjjZF.js → undo_edit.node-BQSDe2Ll.js} +2 -2
- package/dist/{undo_edit.node-BYhKjjZF.js.map → undo_edit.node-BQSDe2Ll.js.map} +1 -1
- package/package.json +1 -1
- package/dist/console-CTjwGR94.js.map +0 -1
- package/dist/main-BJVONhWT.js.map +0 -1
- package/dist/node-iqSbLvK6.js.map +0 -1
@@ -1,14 +1,267 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
import * as
|
3
|
-
import { resolve as
|
4
|
-
import { aR as
|
5
|
-
import { loadProfileEnvironmentVariables as
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
import * as ce from "node:os";
|
3
|
+
import ee, { resolve as ue } from "node:path";
|
4
|
+
import { aR as fe, aS as _e, C as de, aT as ne, aU as pe, aV as ge, aG as ae, aO as ve, aF as me, aA as be, O as se } from "./console-DU9kM8bt.js";
|
5
|
+
import { loadProfileEnvironmentVariables as Se } from "./load-profile-CV3b6-Nj.js";
|
6
|
+
const Ce = [
|
7
|
+
"ls",
|
8
|
+
"dir",
|
9
|
+
"find",
|
10
|
+
"cat",
|
11
|
+
"head",
|
12
|
+
"tail",
|
13
|
+
"less",
|
14
|
+
"more",
|
15
|
+
"grep",
|
16
|
+
"egrep",
|
17
|
+
"fgrep",
|
18
|
+
"tree",
|
19
|
+
"file",
|
20
|
+
"wc",
|
21
|
+
"pwd",
|
22
|
+
"stat",
|
23
|
+
"du",
|
24
|
+
"df",
|
25
|
+
"ps",
|
26
|
+
"top",
|
27
|
+
"htop",
|
28
|
+
"uname",
|
29
|
+
"whoami",
|
30
|
+
"echo",
|
31
|
+
"printenv",
|
32
|
+
"id",
|
33
|
+
"which",
|
34
|
+
"whereis",
|
35
|
+
"date",
|
36
|
+
"cal",
|
37
|
+
"uptime",
|
38
|
+
"free",
|
39
|
+
"ping",
|
40
|
+
"dig",
|
41
|
+
"nslookup",
|
42
|
+
"host",
|
43
|
+
"netstat",
|
44
|
+
"ss",
|
45
|
+
"lsof",
|
46
|
+
"ifconfig",
|
47
|
+
"ip",
|
48
|
+
"man",
|
49
|
+
"info",
|
50
|
+
"mkdir",
|
51
|
+
"touch"
|
52
|
+
], ye = [
|
53
|
+
// Go commands
|
54
|
+
"go test",
|
55
|
+
"go run",
|
56
|
+
"go build",
|
57
|
+
"go vet",
|
58
|
+
"go fmt",
|
59
|
+
"go list",
|
60
|
+
"go version",
|
61
|
+
"go env",
|
62
|
+
// Cargo commands
|
63
|
+
"cargo test",
|
64
|
+
"cargo run",
|
65
|
+
"cargo build",
|
66
|
+
"cargo check",
|
67
|
+
"cargo fmt",
|
68
|
+
"cargo version",
|
69
|
+
"cargo tree",
|
70
|
+
// Rust
|
71
|
+
"rustc --version",
|
72
|
+
"rustc --explain",
|
73
|
+
// Java
|
74
|
+
"javac --version",
|
75
|
+
"javac -version",
|
76
|
+
"javac -help",
|
77
|
+
// Make (only dry runs)
|
78
|
+
"make -n",
|
79
|
+
"make --dry-run",
|
80
|
+
// Maven
|
81
|
+
"mvn test",
|
82
|
+
"mvn verify",
|
83
|
+
"mvn help",
|
84
|
+
"mvn dependency:tree",
|
85
|
+
// Gradle
|
86
|
+
"gradle tasks",
|
87
|
+
"gradle dependencies",
|
88
|
+
"gradle properties",
|
89
|
+
"gradle help",
|
90
|
+
// .NET
|
91
|
+
"dotnet test",
|
92
|
+
"dotnet list",
|
93
|
+
"dotnet --info",
|
94
|
+
"dotnet --version",
|
95
|
+
"dotnet --help",
|
96
|
+
// C/C++
|
97
|
+
"gcc --version",
|
98
|
+
"gcc -v",
|
99
|
+
"gcc -dumpversion",
|
100
|
+
"g++ --version",
|
101
|
+
"g++ -v",
|
102
|
+
"g++ -dumpversion",
|
103
|
+
// Python
|
104
|
+
"python -V",
|
105
|
+
"python --version",
|
106
|
+
"python -h",
|
107
|
+
"python --help",
|
108
|
+
"python -c",
|
109
|
+
// Ruby
|
110
|
+
"ruby -v",
|
111
|
+
"ruby --version",
|
112
|
+
"ruby -e",
|
113
|
+
"ruby -h",
|
114
|
+
"ruby --help",
|
115
|
+
// Node
|
116
|
+
"node -v",
|
117
|
+
"node --version",
|
118
|
+
"node -h",
|
119
|
+
"node --help",
|
120
|
+
"node -e",
|
121
|
+
// npm
|
122
|
+
"npm list",
|
123
|
+
"npm ls",
|
124
|
+
"npm outdated",
|
125
|
+
"npm test",
|
126
|
+
"npm run",
|
127
|
+
"npm view",
|
128
|
+
"npm info",
|
129
|
+
"npm --help",
|
130
|
+
// yarn
|
131
|
+
"yarn list",
|
132
|
+
"yarn ls",
|
133
|
+
"yarn info",
|
134
|
+
"yarn test",
|
135
|
+
"yarn run",
|
136
|
+
"yarn why",
|
137
|
+
"yarn --help",
|
138
|
+
// pnpm
|
139
|
+
"pnpm list",
|
140
|
+
"pnpm ls",
|
141
|
+
"pnpm outdated",
|
142
|
+
"pnpm test",
|
143
|
+
"pnpm run",
|
144
|
+
"pnpm --help",
|
145
|
+
"pnpm run build",
|
146
|
+
"pnpm run check",
|
147
|
+
"pnpm run check:fix",
|
148
|
+
"pnpm run test",
|
149
|
+
"pnpm -w build",
|
150
|
+
"pnpm -w check",
|
151
|
+
"pnpm -w check:fix",
|
152
|
+
"pnpm -w test",
|
153
|
+
"pnpm build",
|
154
|
+
"pnpm check",
|
155
|
+
"pnpm check:fix",
|
156
|
+
"pnpm test",
|
157
|
+
"pnpm -w run build",
|
158
|
+
"pnpm -w run check",
|
159
|
+
"pnpm -w run check:fix",
|
160
|
+
"pnpm -w run test",
|
161
|
+
"pnpm --version",
|
162
|
+
// Testing
|
163
|
+
"pytest --collect-only",
|
164
|
+
"pytest -h",
|
165
|
+
"pytest --help",
|
166
|
+
"pytest --version",
|
167
|
+
"jest --listTests",
|
168
|
+
"jest --showConfig",
|
169
|
+
"jest --help",
|
170
|
+
"jest --version",
|
171
|
+
"mocha --list",
|
172
|
+
"mocha --help",
|
173
|
+
"mocha --version",
|
174
|
+
// Git
|
175
|
+
"git status",
|
176
|
+
"git show",
|
177
|
+
"git diff",
|
178
|
+
"git grep",
|
179
|
+
"git branch",
|
180
|
+
"git tag",
|
181
|
+
"git remote -v",
|
182
|
+
"git rev-parse --is-inside-work-tree",
|
183
|
+
"git rev-parse --show-toplevel",
|
184
|
+
"git config --list",
|
185
|
+
"git log",
|
186
|
+
// Go specific commands
|
187
|
+
"go build .",
|
188
|
+
"go test"
|
189
|
+
], we = ["/dev/null", "/dev/zero", "/dev/stdout", "/dev/stderr", "/dev/stdin"];
|
190
|
+
function le(x, $) {
|
191
|
+
if (!x || we.includes(x) || (x.endsWith(ee.sep) && (x = x.slice(0, -1)), $.includes(x)))
|
192
|
+
return !1;
|
193
|
+
if (ee.isAbsolute(x))
|
194
|
+
return !$.some((W) => Be(W, x));
|
195
|
+
const I = x.split("/");
|
196
|
+
let R = 0;
|
197
|
+
for (const W of I)
|
198
|
+
if (W === "..") {
|
199
|
+
if (R--, R < 0)
|
200
|
+
return !0;
|
201
|
+
} else W !== "" && W !== "." && R++;
|
202
|
+
return !1;
|
203
|
+
}
|
204
|
+
function Be(x, $) {
|
205
|
+
const I = ee.relative(ee.normalize(x), ee.normalize($));
|
206
|
+
return !!I && !I.startsWith("..") && !I.startsWith("/");
|
207
|
+
}
|
208
|
+
function re(x, $) {
|
209
|
+
if (typeof x == "string")
|
210
|
+
return !1;
|
211
|
+
for (const I of x.arguments)
|
212
|
+
if (typeof I == "string" && !(I.startsWith("-") || I.includes("*") || I.startsWith('"') || I.startsWith("'")) && I.includes("/") && le(I, $))
|
213
|
+
return !0;
|
214
|
+
return !1;
|
215
|
+
}
|
216
|
+
function Ee(x, $, I) {
|
217
|
+
let R = [];
|
218
|
+
try {
|
219
|
+
const w = fe(x, I?.platform);
|
220
|
+
R = _e(w);
|
221
|
+
} catch (w) {
|
222
|
+
de.warn("Failed to parse command", { cmd: x }, w), R = [x];
|
223
|
+
}
|
224
|
+
const W = I?.config?.["commands.allowlist"] || [];
|
225
|
+
if (W.includes("*"))
|
226
|
+
return {
|
227
|
+
requiresConfirmation: !1,
|
228
|
+
parts: R.map((w) => ({ command: w, requiresConfirmation: !1 }))
|
229
|
+
};
|
230
|
+
const z = R.map((w) => {
|
231
|
+
if (typeof w == "string")
|
232
|
+
return { command: w, requiresConfirmation: !0 };
|
233
|
+
const r = w.arguments.some((d) => typeof d != "string");
|
234
|
+
function l(d) {
|
235
|
+
return d === ne ? "<dynamic>" : d;
|
236
|
+
}
|
237
|
+
const _ = `${String(w.program)} ${w.arguments.map(l).join(" ")}`;
|
238
|
+
if (!r) {
|
239
|
+
for (const d of W)
|
240
|
+
if (_ === d)
|
241
|
+
return { command: w, requiresConfirmation: !1 };
|
242
|
+
}
|
243
|
+
if (Ce.includes(String(w.program)))
|
244
|
+
return re(w, $) ? { command: w, requiresConfirmation: !0 } : { command: w, requiresConfirmation: !1 };
|
245
|
+
for (let d of [...ye, ...W]) {
|
246
|
+
d.endsWith(" *") && (d = d.slice(0, -2));
|
247
|
+
const n = " * ";
|
248
|
+
if (d.includes(n) && !d.startsWith(n)) {
|
249
|
+
const c = d.split(n).map((h) => h.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
250
|
+
if (new RegExp(`^${c.join(" .* ")}(\\s.*)?$`).test(_))
|
251
|
+
return re(w, $) ? { command: w, requiresConfirmation: !0 } : { command: w, requiresConfirmation: !1 };
|
252
|
+
} else if (_ === d || _.startsWith(d + " "))
|
253
|
+
return re(w, $) ? { command: w, requiresConfirmation: !0 } : { command: w, requiresConfirmation: !1 };
|
254
|
+
}
|
255
|
+
return { command: w, requiresConfirmation: !0 };
|
256
|
+
});
|
257
|
+
return { requiresConfirmation: z.some((w) => w.requiresConfirmation), parts: z };
|
258
|
+
}
|
259
|
+
var ie = {}, oe;
|
260
|
+
function Ae() {
|
261
|
+
return oe || (oe = 1, function(x) {
|
9
262
|
(() => {
|
10
|
-
var
|
11
|
-
Object.defineProperty(
|
263
|
+
var $ = { 349: (w, r, l) => {
|
264
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.CircularList = void 0;
|
12
265
|
const _ = l(460), d = l(844);
|
13
266
|
class n extends d.Disposable {
|
14
267
|
constructor(a) {
|
@@ -79,17 +332,17 @@ function ve() {
|
|
79
332
|
return (this._startIndex + a) % this._maxLength;
|
80
333
|
}
|
81
334
|
}
|
82
|
-
|
83
|
-
}, 439: (
|
84
|
-
Object.defineProperty(
|
335
|
+
r.CircularList = n;
|
336
|
+
}, 439: (w, r) => {
|
337
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.clone = void 0, r.clone = function l(_, d = 5) {
|
85
338
|
if (typeof _ != "object") return _;
|
86
339
|
const n = Array.isArray(_) ? [] : {};
|
87
340
|
for (const c in _) n[c] = d <= 1 ? _[c] : _[c] && l(_[c], d - 1);
|
88
341
|
return n;
|
89
342
|
};
|
90
|
-
}, 969: (
|
91
|
-
Object.defineProperty(
|
92
|
-
const _ = l(844), d = l(585), n = l(348), c = l(866), a = l(744), h = l(302), u = l(83), e = l(460), s = l(753),
|
343
|
+
}, 969: (w, r, l) => {
|
344
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.CoreTerminal = void 0;
|
345
|
+
const _ = l(844), d = l(585), n = l(348), c = l(866), a = l(744), h = l(302), u = l(83), e = l(460), s = l(753), i = l(480), t = l(994), f = l(282), p = l(435), S = l(981), y = l(660);
|
93
346
|
let C = !1;
|
94
347
|
class T extends _.Disposable {
|
95
348
|
get onScroll() {
|
@@ -110,32 +363,32 @@ function ve() {
|
|
110
363
|
return this.optionsService.options;
|
111
364
|
}
|
112
365
|
set options(E) {
|
113
|
-
for (const
|
366
|
+
for (const B in E) this.optionsService.options[B] = E[B];
|
114
367
|
}
|
115
368
|
constructor(E) {
|
116
|
-
super(), this._windowsWrappingHeuristics = this.register(new _.MutableDisposable()), this._onBinary = this.register(new e.EventEmitter()), this.onBinary = this._onBinary.event, this._onData = this.register(new e.EventEmitter()), this.onData = this._onData.event, this._onLineFeed = this.register(new e.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onResize = this.register(new e.EventEmitter()), this.onResize = this._onResize.event, this._onWriteParsed = this.register(new e.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event, this._onScroll = this.register(new e.EventEmitter()), this._instantiationService = new n.InstantiationService(), this.optionsService = this.register(new h.OptionsService(E)), this._instantiationService.setService(d.IOptionsService, this.optionsService), this._bufferService = this.register(this._instantiationService.createInstance(a.BufferService)), this._instantiationService.setService(d.IBufferService, this._bufferService), this._logService = this.register(this._instantiationService.createInstance(c.LogService)), this._instantiationService.setService(d.ILogService, this._logService), this.coreService = this.register(this._instantiationService.createInstance(u.CoreService)), this._instantiationService.setService(d.ICoreService, this.coreService), this.coreMouseService = this.register(this._instantiationService.createInstance(s.CoreMouseService)), this._instantiationService.setService(d.ICoreMouseService, this.coreMouseService), this.unicodeService = this.register(this._instantiationService.createInstance(
|
369
|
+
super(), this._windowsWrappingHeuristics = this.register(new _.MutableDisposable()), this._onBinary = this.register(new e.EventEmitter()), this.onBinary = this._onBinary.event, this._onData = this.register(new e.EventEmitter()), this.onData = this._onData.event, this._onLineFeed = this.register(new e.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onResize = this.register(new e.EventEmitter()), this.onResize = this._onResize.event, this._onWriteParsed = this.register(new e.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event, this._onScroll = this.register(new e.EventEmitter()), this._instantiationService = new n.InstantiationService(), this.optionsService = this.register(new h.OptionsService(E)), this._instantiationService.setService(d.IOptionsService, this.optionsService), this._bufferService = this.register(this._instantiationService.createInstance(a.BufferService)), this._instantiationService.setService(d.IBufferService, this._bufferService), this._logService = this.register(this._instantiationService.createInstance(c.LogService)), this._instantiationService.setService(d.ILogService, this._logService), this.coreService = this.register(this._instantiationService.createInstance(u.CoreService)), this._instantiationService.setService(d.ICoreService, this.coreService), this.coreMouseService = this.register(this._instantiationService.createInstance(s.CoreMouseService)), this._instantiationService.setService(d.ICoreMouseService, this.coreMouseService), this.unicodeService = this.register(this._instantiationService.createInstance(i.UnicodeService)), this._instantiationService.setService(d.IUnicodeService, this.unicodeService), this._charsetService = this._instantiationService.createInstance(t.CharsetService), this._instantiationService.setService(d.ICharsetService, this._charsetService), this._oscLinkService = this._instantiationService.createInstance(y.OscLinkService), this._instantiationService.setService(d.IOscLinkService, this._oscLinkService), this._inputHandler = this.register(new p.InputHandler(this._bufferService, this._charsetService, this.coreService, this._logService, this.optionsService, this._oscLinkService, this.coreMouseService, this.unicodeService)), this.register((0, e.forwardEvent)(this._inputHandler.onLineFeed, this._onLineFeed)), this.register(this._inputHandler), this.register((0, e.forwardEvent)(this._bufferService.onResize, this._onResize)), this.register((0, e.forwardEvent)(this.coreService.onData, this._onData)), this.register((0, e.forwardEvent)(this.coreService.onBinary, this._onBinary)), this.register(this.coreService.onRequestScrollToBottom(() => this.scrollToBottom())), this.register(this.coreService.onUserInput(() => this._writeBuffer.handleUserInput())), this.register(this.optionsService.onMultipleOptionChange(["windowsMode", "windowsPty"], () => this._handleWindowsPtyOptionChange())), this.register(this._bufferService.onScroll((B) => {
|
117
370
|
this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: 0 }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
|
118
|
-
})), this.register(this._inputHandler.onScroll((
|
371
|
+
})), this.register(this._inputHandler.onScroll((B) => {
|
119
372
|
this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: 0 }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
|
120
|
-
})), this._writeBuffer = this.register(new
|
373
|
+
})), this._writeBuffer = this.register(new S.WriteBuffer((B, k) => this._inputHandler.parse(B, k))), this.register((0, e.forwardEvent)(this._writeBuffer.onWriteParsed, this._onWriteParsed));
|
121
374
|
}
|
122
|
-
write(E,
|
123
|
-
this._writeBuffer.write(E,
|
375
|
+
write(E, B) {
|
376
|
+
this._writeBuffer.write(E, B);
|
124
377
|
}
|
125
|
-
writeSync(E,
|
126
|
-
this._logService.logLevel <= d.LogLevelEnum.WARN && !C && (this._logService.warn("writeSync is unreliable and will be removed soon."), C = !0), this._writeBuffer.writeSync(E,
|
378
|
+
writeSync(E, B) {
|
379
|
+
this._logService.logLevel <= d.LogLevelEnum.WARN && !C && (this._logService.warn("writeSync is unreliable and will be removed soon."), C = !0), this._writeBuffer.writeSync(E, B);
|
127
380
|
}
|
128
|
-
input(E,
|
129
|
-
this.coreService.triggerDataEvent(E,
|
381
|
+
input(E, B = !0) {
|
382
|
+
this.coreService.triggerDataEvent(E, B);
|
130
383
|
}
|
131
|
-
resize(E,
|
132
|
-
isNaN(E) || isNaN(
|
384
|
+
resize(E, B) {
|
385
|
+
isNaN(E) || isNaN(B) || (E = Math.max(E, a.MINIMUM_COLS), B = Math.max(B, a.MINIMUM_ROWS), this._bufferService.resize(E, B));
|
133
386
|
}
|
134
|
-
scroll(E,
|
135
|
-
this._bufferService.scroll(E,
|
387
|
+
scroll(E, B = !1) {
|
388
|
+
this._bufferService.scroll(E, B);
|
136
389
|
}
|
137
|
-
scrollLines(E,
|
138
|
-
this._bufferService.scrollLines(E,
|
390
|
+
scrollLines(E, B, k) {
|
391
|
+
this._bufferService.scrollLines(E, B, k);
|
139
392
|
}
|
140
393
|
scrollPages(E) {
|
141
394
|
this.scrollLines(E * (this.rows - 1));
|
@@ -147,20 +400,20 @@ function ve() {
|
|
147
400
|
this.scrollLines(this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
|
148
401
|
}
|
149
402
|
scrollToLine(E) {
|
150
|
-
const
|
151
|
-
|
403
|
+
const B = E - this._bufferService.buffer.ydisp;
|
404
|
+
B !== 0 && this.scrollLines(B);
|
152
405
|
}
|
153
|
-
registerEscHandler(E,
|
154
|
-
return this._inputHandler.registerEscHandler(E,
|
406
|
+
registerEscHandler(E, B) {
|
407
|
+
return this._inputHandler.registerEscHandler(E, B);
|
155
408
|
}
|
156
|
-
registerDcsHandler(E,
|
157
|
-
return this._inputHandler.registerDcsHandler(E,
|
409
|
+
registerDcsHandler(E, B) {
|
410
|
+
return this._inputHandler.registerDcsHandler(E, B);
|
158
411
|
}
|
159
|
-
registerCsiHandler(E,
|
160
|
-
return this._inputHandler.registerCsiHandler(E,
|
412
|
+
registerCsiHandler(E, B) {
|
413
|
+
return this._inputHandler.registerCsiHandler(E, B);
|
161
414
|
}
|
162
|
-
registerOscHandler(E,
|
163
|
-
return this._inputHandler.registerOscHandler(E,
|
415
|
+
registerOscHandler(E, B) {
|
416
|
+
return this._inputHandler.registerOscHandler(E, B);
|
164
417
|
}
|
165
418
|
_setup() {
|
166
419
|
this._handleWindowsPtyOptionChange();
|
@@ -170,21 +423,21 @@ function ve() {
|
|
170
423
|
}
|
171
424
|
_handleWindowsPtyOptionChange() {
|
172
425
|
let E = !1;
|
173
|
-
const
|
174
|
-
|
426
|
+
const B = this.optionsService.rawOptions.windowsPty;
|
427
|
+
B && B.buildNumber !== void 0 && B.buildNumber !== void 0 ? E = B.backend === "conpty" && B.buildNumber < 21376 : this.optionsService.rawOptions.windowsMode && (E = !0), E ? this._enableWindowsWrappingHeuristics() : this._windowsWrappingHeuristics.clear();
|
175
428
|
}
|
176
429
|
_enableWindowsWrappingHeuristics() {
|
177
430
|
if (!this._windowsWrappingHeuristics.value) {
|
178
431
|
const E = [];
|
179
432
|
E.push(this.onLineFeed(f.updateWindowsModeWrappedState.bind(null, this._bufferService))), E.push(this.registerCsiHandler({ final: "H" }, () => ((0, f.updateWindowsModeWrappedState)(this._bufferService), !1))), this._windowsWrappingHeuristics.value = (0, _.toDisposable)(() => {
|
180
|
-
for (const
|
433
|
+
for (const B of E) B.dispose();
|
181
434
|
});
|
182
435
|
}
|
183
436
|
}
|
184
437
|
}
|
185
|
-
|
186
|
-
}, 460: (
|
187
|
-
Object.defineProperty(
|
438
|
+
r.CoreTerminal = T;
|
439
|
+
}, 460: (w, r) => {
|
440
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.runAndSubscribe = r.forwardEvent = r.EventEmitter = void 0, r.EventEmitter = class {
|
188
441
|
constructor() {
|
189
442
|
this._listeners = [], this._disposed = !1;
|
190
443
|
}
|
@@ -206,27 +459,27 @@ function ve() {
|
|
206
459
|
clearListeners() {
|
207
460
|
this._listeners && (this._listeners.length = 0);
|
208
461
|
}
|
209
|
-
},
|
462
|
+
}, r.forwardEvent = function(l, _) {
|
210
463
|
return l((d) => _.fire(d));
|
211
|
-
},
|
464
|
+
}, r.runAndSubscribe = function(l, _) {
|
212
465
|
return _(void 0), l((d) => _(d));
|
213
466
|
};
|
214
|
-
}, 435: function(
|
215
|
-
var _ = this && this.__decorate || function(
|
216
|
-
var
|
217
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") D = Reflect.decorate(
|
218
|
-
else for (var
|
219
|
-
return A > 3 && D && Object.defineProperty(o,
|
220
|
-
}, d = this && this.__param || function(
|
221
|
-
return function(
|
222
|
-
o(
|
467
|
+
}, 435: function(w, r, l) {
|
468
|
+
var _ = this && this.__decorate || function(P, o, m, g) {
|
469
|
+
var b, A = arguments.length, D = A < 3 ? o : g === null ? g = Object.getOwnPropertyDescriptor(o, m) : g;
|
470
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") D = Reflect.decorate(P, o, m, g);
|
471
|
+
else for (var O = P.length - 1; O >= 0; O--) (b = P[O]) && (D = (A < 3 ? b(D) : A > 3 ? b(o, m, D) : b(o, m)) || D);
|
472
|
+
return A > 3 && D && Object.defineProperty(o, m, D), D;
|
473
|
+
}, d = this && this.__param || function(P, o) {
|
474
|
+
return function(m, g) {
|
475
|
+
o(m, g, P);
|
223
476
|
};
|
224
477
|
};
|
225
|
-
Object.defineProperty(
|
226
|
-
const n = l(584), c = l(116), a = l(15), h = l(844), u = l(482), e = l(437), s = l(460),
|
227
|
-
function
|
228
|
-
if (
|
229
|
-
switch (
|
478
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.InputHandler = r.WindowsOptionsReportType = void 0;
|
479
|
+
const n = l(584), c = l(116), a = l(15), h = l(844), u = l(482), e = l(437), s = l(460), i = l(643), t = l(511), f = l(734), p = l(585), S = l(480), y = l(242), C = l(351), T = l(941), j = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 }, E = 131072;
|
480
|
+
function B(P, o) {
|
481
|
+
if (P > 24) return o.setWinLines || !1;
|
482
|
+
switch (P) {
|
230
483
|
case 1:
|
231
484
|
return !!o.restoreWin;
|
232
485
|
case 2:
|
@@ -274,101 +527,101 @@ function ve() {
|
|
274
527
|
}
|
275
528
|
return !1;
|
276
529
|
}
|
277
|
-
var
|
278
|
-
(function(
|
279
|
-
|
280
|
-
})(
|
281
|
-
let
|
282
|
-
class
|
530
|
+
var k;
|
531
|
+
(function(P) {
|
532
|
+
P[P.GET_WIN_SIZE_PIXELS = 0] = "GET_WIN_SIZE_PIXELS", P[P.GET_CELL_SIZE_PIXELS = 1] = "GET_CELL_SIZE_PIXELS";
|
533
|
+
})(k || (r.WindowsOptionsReportType = k = {}));
|
534
|
+
let G = 0;
|
535
|
+
class V extends h.Disposable {
|
283
536
|
getAttrData() {
|
284
537
|
return this._curAttrData;
|
285
538
|
}
|
286
|
-
constructor(o,
|
287
|
-
super(), this._bufferService = o, this._charsetService =
|
288
|
-
this._logService.debug("Unknown CSI code: ", { identifier: this._parser.identToString(v), params:
|
539
|
+
constructor(o, m, g, b, A, D, O, U, X = new a.EscapeSequenceParser()) {
|
540
|
+
super(), this._bufferService = o, this._charsetService = m, this._coreService = g, this._logService = b, this._optionsService = A, this._oscLinkService = D, this._coreMouseService = O, this._unicodeService = U, this._parser = X, this._parseBuffer = new Uint32Array(4096), this._stringDecoder = new u.StringToUtf32(), this._utf8Decoder = new u.Utf8ToUtf32(), this._workCell = new t.CellData(), this._windowTitle = "", this._iconName = "", this._windowTitleStack = [], this._iconNameStack = [], this._curAttrData = e.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = e.DEFAULT_ATTR_DATA.clone(), this._onRequestBell = this.register(new s.EventEmitter()), this.onRequestBell = this._onRequestBell.event, this._onRequestRefreshRows = this.register(new s.EventEmitter()), this.onRequestRefreshRows = this._onRequestRefreshRows.event, this._onRequestReset = this.register(new s.EventEmitter()), this.onRequestReset = this._onRequestReset.event, this._onRequestSendFocus = this.register(new s.EventEmitter()), this.onRequestSendFocus = this._onRequestSendFocus.event, this._onRequestSyncScrollBar = this.register(new s.EventEmitter()), this.onRequestSyncScrollBar = this._onRequestSyncScrollBar.event, this._onRequestWindowsOptionsReport = this.register(new s.EventEmitter()), this.onRequestWindowsOptionsReport = this._onRequestWindowsOptionsReport.event, this._onA11yChar = this.register(new s.EventEmitter()), this.onA11yChar = this._onA11yChar.event, this._onA11yTab = this.register(new s.EventEmitter()), this.onA11yTab = this._onA11yTab.event, this._onCursorMove = this.register(new s.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onLineFeed = this.register(new s.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onScroll = this.register(new s.EventEmitter()), this.onScroll = this._onScroll.event, this._onTitleChange = this.register(new s.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onColor = this.register(new s.EventEmitter()), this.onColor = this._onColor.event, this._parseStack = { paused: !1, cursorStartX: 0, cursorStartY: 0, decodedLength: 0, position: 0 }, this._specialColors = [256, 257, 258], this.register(this._parser), this._dirtyRowTracker = new F(this._bufferService), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate((v) => this._activeBuffer = v.activeBuffer)), this._parser.setCsiHandlerFallback((v, M) => {
|
541
|
+
this._logService.debug("Unknown CSI code: ", { identifier: this._parser.identToString(v), params: M.toArray() });
|
289
542
|
}), this._parser.setEscHandlerFallback((v) => {
|
290
543
|
this._logService.debug("Unknown ESC code: ", { identifier: this._parser.identToString(v) });
|
291
544
|
}), this._parser.setExecuteHandlerFallback((v) => {
|
292
545
|
this._logService.debug("Unknown EXECUTE code: ", { code: v });
|
293
|
-
}), this._parser.setOscHandlerFallback((v,
|
294
|
-
this._logService.debug("Unknown OSC code: ", { identifier: v, action:
|
295
|
-
}), this._parser.setDcsHandlerFallback((v,
|
296
|
-
|
297
|
-
}), this._parser.setPrintHandler((v,
|
546
|
+
}), this._parser.setOscHandlerFallback((v, M, L) => {
|
547
|
+
this._logService.debug("Unknown OSC code: ", { identifier: v, action: M, data: L });
|
548
|
+
}), this._parser.setDcsHandlerFallback((v, M, L) => {
|
549
|
+
M === "HOOK" && (L = L.toArray()), this._logService.debug("Unknown DCS code: ", { identifier: this._parser.identToString(v), action: M, payload: L });
|
550
|
+
}), this._parser.setPrintHandler((v, M, L) => this.print(v, M, L)), this._parser.registerCsiHandler({ final: "@" }, (v) => this.insertChars(v)), this._parser.registerCsiHandler({ intermediates: " ", final: "@" }, (v) => this.scrollLeft(v)), this._parser.registerCsiHandler({ final: "A" }, (v) => this.cursorUp(v)), this._parser.registerCsiHandler({ intermediates: " ", final: "A" }, (v) => this.scrollRight(v)), this._parser.registerCsiHandler({ final: "B" }, (v) => this.cursorDown(v)), this._parser.registerCsiHandler({ final: "C" }, (v) => this.cursorForward(v)), this._parser.registerCsiHandler({ final: "D" }, (v) => this.cursorBackward(v)), this._parser.registerCsiHandler({ final: "E" }, (v) => this.cursorNextLine(v)), this._parser.registerCsiHandler({ final: "F" }, (v) => this.cursorPrecedingLine(v)), this._parser.registerCsiHandler({ final: "G" }, (v) => this.cursorCharAbsolute(v)), this._parser.registerCsiHandler({ final: "H" }, (v) => this.cursorPosition(v)), this._parser.registerCsiHandler({ final: "I" }, (v) => this.cursorForwardTab(v)), this._parser.registerCsiHandler({ final: "J" }, (v) => this.eraseInDisplay(v, !1)), this._parser.registerCsiHandler({ prefix: "?", final: "J" }, (v) => this.eraseInDisplay(v, !0)), this._parser.registerCsiHandler({ final: "K" }, (v) => this.eraseInLine(v, !1)), this._parser.registerCsiHandler({ prefix: "?", final: "K" }, (v) => this.eraseInLine(v, !0)), this._parser.registerCsiHandler({ final: "L" }, (v) => this.insertLines(v)), this._parser.registerCsiHandler({ final: "M" }, (v) => this.deleteLines(v)), this._parser.registerCsiHandler({ final: "P" }, (v) => this.deleteChars(v)), this._parser.registerCsiHandler({ final: "S" }, (v) => this.scrollUp(v)), this._parser.registerCsiHandler({ final: "T" }, (v) => this.scrollDown(v)), this._parser.registerCsiHandler({ final: "X" }, (v) => this.eraseChars(v)), this._parser.registerCsiHandler({ final: "Z" }, (v) => this.cursorBackwardTab(v)), this._parser.registerCsiHandler({ final: "`" }, (v) => this.charPosAbsolute(v)), this._parser.registerCsiHandler({ final: "a" }, (v) => this.hPositionRelative(v)), this._parser.registerCsiHandler({ final: "b" }, (v) => this.repeatPrecedingCharacter(v)), this._parser.registerCsiHandler({ final: "c" }, (v) => this.sendDeviceAttributesPrimary(v)), this._parser.registerCsiHandler({ prefix: ">", final: "c" }, (v) => this.sendDeviceAttributesSecondary(v)), this._parser.registerCsiHandler({ final: "d" }, (v) => this.linePosAbsolute(v)), this._parser.registerCsiHandler({ final: "e" }, (v) => this.vPositionRelative(v)), this._parser.registerCsiHandler({ final: "f" }, (v) => this.hVPosition(v)), this._parser.registerCsiHandler({ final: "g" }, (v) => this.tabClear(v)), this._parser.registerCsiHandler({ final: "h" }, (v) => this.setMode(v)), this._parser.registerCsiHandler({ prefix: "?", final: "h" }, (v) => this.setModePrivate(v)), this._parser.registerCsiHandler({ final: "l" }, (v) => this.resetMode(v)), this._parser.registerCsiHandler({ prefix: "?", final: "l" }, (v) => this.resetModePrivate(v)), this._parser.registerCsiHandler({ final: "m" }, (v) => this.charAttributes(v)), this._parser.registerCsiHandler({ final: "n" }, (v) => this.deviceStatus(v)), this._parser.registerCsiHandler({ prefix: "?", final: "n" }, (v) => this.deviceStatusPrivate(v)), this._parser.registerCsiHandler({ intermediates: "!", final: "p" }, (v) => this.softReset(v)), this._parser.registerCsiHandler({ intermediates: " ", final: "q" }, (v) => this.setCursorStyle(v)), this._parser.registerCsiHandler({ final: "r" }, (v) => this.setScrollRegion(v)), this._parser.registerCsiHandler({ final: "s" }, (v) => this.saveCursor(v)), this._parser.registerCsiHandler({ final: "t" }, (v) => this.windowOptions(v)), this._parser.registerCsiHandler({ final: "u" }, (v) => this.restoreCursor(v)), this._parser.registerCsiHandler({ intermediates: "'", final: "}" }, (v) => this.insertColumns(v)), this._parser.registerCsiHandler({ intermediates: "'", final: "~" }, (v) => this.deleteColumns(v)), this._parser.registerCsiHandler({ intermediates: '"', final: "q" }, (v) => this.selectProtected(v)), this._parser.registerCsiHandler({ intermediates: "$", final: "p" }, (v) => this.requestMode(v, !0)), this._parser.registerCsiHandler({ prefix: "?", intermediates: "$", final: "p" }, (v) => this.requestMode(v, !1)), this._parser.setExecuteHandler(n.C0.BEL, () => this.bell()), this._parser.setExecuteHandler(n.C0.LF, () => this.lineFeed()), this._parser.setExecuteHandler(n.C0.VT, () => this.lineFeed()), this._parser.setExecuteHandler(n.C0.FF, () => this.lineFeed()), this._parser.setExecuteHandler(n.C0.CR, () => this.carriageReturn()), this._parser.setExecuteHandler(n.C0.BS, () => this.backspace()), this._parser.setExecuteHandler(n.C0.HT, () => this.tab()), this._parser.setExecuteHandler(n.C0.SO, () => this.shiftOut()), this._parser.setExecuteHandler(n.C0.SI, () => this.shiftIn()), this._parser.setExecuteHandler(n.C1.IND, () => this.index()), this._parser.setExecuteHandler(n.C1.NEL, () => this.nextLine()), this._parser.setExecuteHandler(n.C1.HTS, () => this.tabSet()), this._parser.registerOscHandler(0, new y.OscHandler((v) => (this.setTitle(v), this.setIconName(v), !0))), this._parser.registerOscHandler(1, new y.OscHandler((v) => this.setIconName(v))), this._parser.registerOscHandler(2, new y.OscHandler((v) => this.setTitle(v))), this._parser.registerOscHandler(4, new y.OscHandler((v) => this.setOrReportIndexedColor(v))), this._parser.registerOscHandler(8, new y.OscHandler((v) => this.setHyperlink(v))), this._parser.registerOscHandler(10, new y.OscHandler((v) => this.setOrReportFgColor(v))), this._parser.registerOscHandler(11, new y.OscHandler((v) => this.setOrReportBgColor(v))), this._parser.registerOscHandler(12, new y.OscHandler((v) => this.setOrReportCursorColor(v))), this._parser.registerOscHandler(104, new y.OscHandler((v) => this.restoreIndexedColor(v))), this._parser.registerOscHandler(110, new y.OscHandler((v) => this.restoreFgColor(v))), this._parser.registerOscHandler(111, new y.OscHandler((v) => this.restoreBgColor(v))), this._parser.registerOscHandler(112, new y.OscHandler((v) => this.restoreCursorColor(v))), this._parser.registerEscHandler({ final: "7" }, () => this.saveCursor()), this._parser.registerEscHandler({ final: "8" }, () => this.restoreCursor()), this._parser.registerEscHandler({ final: "D" }, () => this.index()), this._parser.registerEscHandler({ final: "E" }, () => this.nextLine()), this._parser.registerEscHandler({ final: "H" }, () => this.tabSet()), this._parser.registerEscHandler({ final: "M" }, () => this.reverseIndex()), this._parser.registerEscHandler({ final: "=" }, () => this.keypadApplicationMode()), this._parser.registerEscHandler({ final: ">" }, () => this.keypadNumericMode()), this._parser.registerEscHandler({ final: "c" }, () => this.fullReset()), this._parser.registerEscHandler({ final: "n" }, () => this.setgLevel(2)), this._parser.registerEscHandler({ final: "o" }, () => this.setgLevel(3)), this._parser.registerEscHandler({ final: "|" }, () => this.setgLevel(3)), this._parser.registerEscHandler({ final: "}" }, () => this.setgLevel(2)), this._parser.registerEscHandler({ final: "~" }, () => this.setgLevel(1)), this._parser.registerEscHandler({ intermediates: "%", final: "@" }, () => this.selectDefaultCharset()), this._parser.registerEscHandler({ intermediates: "%", final: "G" }, () => this.selectDefaultCharset());
|
298
551
|
for (const v in c.CHARSETS) this._parser.registerEscHandler({ intermediates: "(", final: v }, () => this.selectCharset("(" + v)), this._parser.registerEscHandler({ intermediates: ")", final: v }, () => this.selectCharset(")" + v)), this._parser.registerEscHandler({ intermediates: "*", final: v }, () => this.selectCharset("*" + v)), this._parser.registerEscHandler({ intermediates: "+", final: v }, () => this.selectCharset("+" + v)), this._parser.registerEscHandler({ intermediates: "-", final: v }, () => this.selectCharset("-" + v)), this._parser.registerEscHandler({ intermediates: ".", final: v }, () => this.selectCharset("." + v)), this._parser.registerEscHandler({ intermediates: "/", final: v }, () => this.selectCharset("/" + v));
|
299
|
-
this._parser.registerEscHandler({ intermediates: "#", final: "8" }, () => this.screenAlignmentPattern()), this._parser.setErrorHandler((v) => (this._logService.error("Parsing error: ", v), v)), this._parser.registerDcsHandler({ intermediates: "$", final: "q" }, new C.DcsHandler((v,
|
552
|
+
this._parser.registerEscHandler({ intermediates: "#", final: "8" }, () => this.screenAlignmentPattern()), this._parser.setErrorHandler((v) => (this._logService.error("Parsing error: ", v), v)), this._parser.registerDcsHandler({ intermediates: "$", final: "q" }, new C.DcsHandler((v, M) => this.requestStatusString(v, M)));
|
300
553
|
}
|
301
|
-
_preserveStack(o,
|
302
|
-
this._parseStack.paused = !0, this._parseStack.cursorStartX = o, this._parseStack.cursorStartY =
|
554
|
+
_preserveStack(o, m, g, b) {
|
555
|
+
this._parseStack.paused = !0, this._parseStack.cursorStartX = o, this._parseStack.cursorStartY = m, this._parseStack.decodedLength = g, this._parseStack.position = b;
|
303
556
|
}
|
304
557
|
_logSlowResolvingAsync(o) {
|
305
|
-
this._logService.logLevel <= p.LogLevelEnum.WARN && Promise.race([o, new Promise((
|
306
|
-
if (
|
558
|
+
this._logService.logLevel <= p.LogLevelEnum.WARN && Promise.race([o, new Promise((m, g) => setTimeout(() => g("#SLOW_TIMEOUT"), 5e3))]).catch((m) => {
|
559
|
+
if (m !== "#SLOW_TIMEOUT") throw m;
|
307
560
|
console.warn("async parser handler taking longer than 5000 ms");
|
308
561
|
});
|
309
562
|
}
|
310
563
|
_getCurrentLinkId() {
|
311
564
|
return this._curAttrData.extended.urlId;
|
312
565
|
}
|
313
|
-
parse(o,
|
314
|
-
let g,
|
315
|
-
const
|
316
|
-
if (
|
317
|
-
if (g = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength,
|
318
|
-
|
566
|
+
parse(o, m) {
|
567
|
+
let g, b = this._activeBuffer.x, A = this._activeBuffer.y, D = 0;
|
568
|
+
const O = this._parseStack.paused;
|
569
|
+
if (O) {
|
570
|
+
if (g = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, m)) return this._logSlowResolvingAsync(g), g;
|
571
|
+
b = this._parseStack.cursorStartX, A = this._parseStack.cursorStartY, this._parseStack.paused = !1, o.length > E && (D = this._parseStack.position + E);
|
319
572
|
}
|
320
|
-
if (this._logService.logLevel <= p.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + (typeof o == "string" ? ` "${o}"` : ` "${Array.prototype.map.call(o, (v) => String.fromCharCode(v)).join("")}"`), typeof o == "string" ? o.split("").map((v) => v.charCodeAt(0)) : o), this._parseBuffer.length < o.length && this._parseBuffer.length < E && (this._parseBuffer = new Uint32Array(Math.min(o.length, E))),
|
321
|
-
const
|
322
|
-
if (g = this._parser.parse(this._parseBuffer,
|
573
|
+
if (this._logService.logLevel <= p.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + (typeof o == "string" ? ` "${o}"` : ` "${Array.prototype.map.call(o, (v) => String.fromCharCode(v)).join("")}"`), typeof o == "string" ? o.split("").map((v) => v.charCodeAt(0)) : o), this._parseBuffer.length < o.length && this._parseBuffer.length < E && (this._parseBuffer = new Uint32Array(Math.min(o.length, E))), O || this._dirtyRowTracker.clearRange(), o.length > E) for (let v = D; v < o.length; v += E) {
|
574
|
+
const M = v + E < o.length ? v + E : o.length, L = typeof o == "string" ? this._stringDecoder.decode(o.substring(v, M), this._parseBuffer) : this._utf8Decoder.decode(o.subarray(v, M), this._parseBuffer);
|
575
|
+
if (g = this._parser.parse(this._parseBuffer, L)) return this._preserveStack(b, A, L, v), this._logSlowResolvingAsync(g), g;
|
323
576
|
}
|
324
|
-
else if (!
|
577
|
+
else if (!O) {
|
325
578
|
const v = typeof o == "string" ? this._stringDecoder.decode(o, this._parseBuffer) : this._utf8Decoder.decode(o, this._parseBuffer);
|
326
|
-
if (g = this._parser.parse(this._parseBuffer, v)) return this._preserveStack(
|
327
|
-
}
|
328
|
-
this._activeBuffer.x ===
|
329
|
-
const
|
330
|
-
|
331
|
-
}
|
332
|
-
print(o,
|
333
|
-
let
|
334
|
-
const D = this._charsetService.charset,
|
335
|
-
let
|
336
|
-
this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && g -
|
337
|
-
let
|
338
|
-
for (let J =
|
339
|
-
if (
|
340
|
-
const Y = D[String.fromCharCode(
|
341
|
-
Y && (
|
579
|
+
if (g = this._parser.parse(this._parseBuffer, v)) return this._preserveStack(b, A, v, 0), this._logSlowResolvingAsync(g), g;
|
580
|
+
}
|
581
|
+
this._activeBuffer.x === b && this._activeBuffer.y === A || this._onCursorMove.fire();
|
582
|
+
const U = this._dirtyRowTracker.end + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp), X = this._dirtyRowTracker.start + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
|
583
|
+
X < this._bufferService.rows && this._onRequestRefreshRows.fire(Math.min(X, this._bufferService.rows - 1), Math.min(U, this._bufferService.rows - 1));
|
584
|
+
}
|
585
|
+
print(o, m, g) {
|
586
|
+
let b, A;
|
587
|
+
const D = this._charsetService.charset, O = this._optionsService.rawOptions.screenReaderMode, U = this._bufferService.cols, X = this._coreService.decPrivateModes.wraparound, v = this._coreService.modes.insertMode, M = this._curAttrData;
|
588
|
+
let L = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
589
|
+
this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && g - m > 0 && L.getWidth(this._activeBuffer.x - 1) === 2 && L.setCellFromCodepoint(this._activeBuffer.x - 1, 0, 1, M);
|
590
|
+
let H = this._parser.precedingJoinState;
|
591
|
+
for (let J = m; J < g; ++J) {
|
592
|
+
if (b = o[J], b < 127 && D) {
|
593
|
+
const Y = D[String.fromCharCode(b)];
|
594
|
+
Y && (b = Y.charCodeAt(0));
|
342
595
|
}
|
343
|
-
const Z = this._unicodeService.charProperties(
|
344
|
-
A =
|
345
|
-
const
|
346
|
-
if (
|
347
|
-
if (
|
348
|
-
const Y =
|
596
|
+
const Z = this._unicodeService.charProperties(b, H);
|
597
|
+
A = S.UnicodeService.extractWidth(Z);
|
598
|
+
const te = S.UnicodeService.extractShouldJoin(Z), K = te ? S.UnicodeService.extractWidth(H) : 0;
|
599
|
+
if (H = Z, O && this._onA11yChar.fire((0, u.stringFromCodePoint)(b)), this._getCurrentLinkId() && this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y), this._activeBuffer.x + A - K > U) {
|
600
|
+
if (X) {
|
601
|
+
const Y = L;
|
349
602
|
let Q = this._activeBuffer.x - K;
|
350
|
-
for (this._activeBuffer.x = K, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), !0)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !0),
|
351
|
-
} else if (this._activeBuffer.x =
|
603
|
+
for (this._activeBuffer.x = K, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), !0)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !0), L = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y), K > 0 && L instanceof e.BufferLine && L.copyCellsFrom(Y, Q, 0, K, !1); Q < U; ) Y.setCellFromCodepoint(Q++, 0, 1, M);
|
604
|
+
} else if (this._activeBuffer.x = U - 1, A === 2) continue;
|
352
605
|
}
|
353
|
-
if (
|
354
|
-
const Y =
|
355
|
-
|
356
|
-
for (let Q = A - K; --Q >= 0; )
|
357
|
-
} else if (v && (
|
606
|
+
if (te && this._activeBuffer.x) {
|
607
|
+
const Y = L.getWidth(this._activeBuffer.x - 1) ? 1 : 2;
|
608
|
+
L.addCodepointToCell(this._activeBuffer.x - Y, b, A);
|
609
|
+
for (let Q = A - K; --Q >= 0; ) L.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, M);
|
610
|
+
} else if (v && (L.insertCells(this._activeBuffer.x, A - K, this._activeBuffer.getNullCell(M)), L.getWidth(U - 1) === 2 && L.setCellFromCodepoint(U - 1, i.NULL_CELL_CODE, i.NULL_CELL_WIDTH, M)), L.setCellFromCodepoint(this._activeBuffer.x++, b, A, M), A > 0) for (; --A; ) L.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, M);
|
358
611
|
}
|
359
|
-
this._parser.precedingJoinState =
|
612
|
+
this._parser.precedingJoinState = H, this._activeBuffer.x < U && g - m > 0 && L.getWidth(this._activeBuffer.x) === 0 && !L.hasContent(this._activeBuffer.x) && L.setCellFromCodepoint(this._activeBuffer.x, 0, 1, M), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
|
360
613
|
}
|
361
|
-
registerCsiHandler(o,
|
362
|
-
return o.final !== "t" || o.prefix || o.intermediates ? this._parser.registerCsiHandler(o,
|
614
|
+
registerCsiHandler(o, m) {
|
615
|
+
return o.final !== "t" || o.prefix || o.intermediates ? this._parser.registerCsiHandler(o, m) : this._parser.registerCsiHandler(o, (g) => !B(g.params[0], this._optionsService.rawOptions.windowOptions) || m(g));
|
363
616
|
}
|
364
|
-
registerDcsHandler(o,
|
365
|
-
return this._parser.registerDcsHandler(o, new C.DcsHandler(
|
617
|
+
registerDcsHandler(o, m) {
|
618
|
+
return this._parser.registerDcsHandler(o, new C.DcsHandler(m));
|
366
619
|
}
|
367
|
-
registerEscHandler(o,
|
368
|
-
return this._parser.registerEscHandler(o,
|
620
|
+
registerEscHandler(o, m) {
|
621
|
+
return this._parser.registerEscHandler(o, m);
|
369
622
|
}
|
370
|
-
registerOscHandler(o,
|
371
|
-
return this._parser.registerOscHandler(o, new y.OscHandler(
|
623
|
+
registerOscHandler(o, m) {
|
624
|
+
return this._parser.registerOscHandler(o, new y.OscHandler(m));
|
372
625
|
}
|
373
626
|
bell() {
|
374
627
|
return this._onRequestBell.fire(), !0;
|
@@ -403,19 +656,19 @@ function ve() {
|
|
403
656
|
_restrictCursor(o = this._bufferService.cols - 1) {
|
404
657
|
this._activeBuffer.x = Math.min(o, Math.max(0, this._activeBuffer.x)), this._activeBuffer.y = this._coreService.decPrivateModes.origin ? Math.min(this._activeBuffer.scrollBottom, Math.max(this._activeBuffer.scrollTop, this._activeBuffer.y)) : Math.min(this._bufferService.rows - 1, Math.max(0, this._activeBuffer.y)), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
|
405
658
|
}
|
406
|
-
_setCursor(o,
|
407
|
-
this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._coreService.decPrivateModes.origin ? (this._activeBuffer.x = o, this._activeBuffer.y = this._activeBuffer.scrollTop +
|
659
|
+
_setCursor(o, m) {
|
660
|
+
this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._coreService.decPrivateModes.origin ? (this._activeBuffer.x = o, this._activeBuffer.y = this._activeBuffer.scrollTop + m) : (this._activeBuffer.x = o, this._activeBuffer.y = m), this._restrictCursor(), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
|
408
661
|
}
|
409
|
-
_moveCursor(o,
|
410
|
-
this._restrictCursor(), this._setCursor(this._activeBuffer.x + o, this._activeBuffer.y +
|
662
|
+
_moveCursor(o, m) {
|
663
|
+
this._restrictCursor(), this._setCursor(this._activeBuffer.x + o, this._activeBuffer.y + m);
|
411
664
|
}
|
412
665
|
cursorUp(o) {
|
413
|
-
const
|
414
|
-
return
|
666
|
+
const m = this._activeBuffer.y - this._activeBuffer.scrollTop;
|
667
|
+
return m >= 0 ? this._moveCursor(0, -Math.min(m, o.params[0] || 1)) : this._moveCursor(0, -(o.params[0] || 1)), !0;
|
415
668
|
}
|
416
669
|
cursorDown(o) {
|
417
|
-
const
|
418
|
-
return
|
670
|
+
const m = this._activeBuffer.scrollBottom - this._activeBuffer.y;
|
671
|
+
return m >= 0 ? this._moveCursor(0, Math.min(m, o.params[0] || 1)) : this._moveCursor(0, o.params[0] || 1), !0;
|
419
672
|
}
|
420
673
|
cursorForward(o) {
|
421
674
|
return this._moveCursor(o.params[0] || 1, 0), !0;
|
@@ -451,157 +704,157 @@ function ve() {
|
|
451
704
|
return this.cursorPosition(o), !0;
|
452
705
|
}
|
453
706
|
tabClear(o) {
|
454
|
-
const
|
455
|
-
return
|
707
|
+
const m = o.params[0];
|
708
|
+
return m === 0 ? delete this._activeBuffer.tabs[this._activeBuffer.x] : m === 3 && (this._activeBuffer.tabs = {}), !0;
|
456
709
|
}
|
457
710
|
cursorForwardTab(o) {
|
458
711
|
if (this._activeBuffer.x >= this._bufferService.cols) return !0;
|
459
|
-
let
|
460
|
-
for (;
|
712
|
+
let m = o.params[0] || 1;
|
713
|
+
for (; m--; ) this._activeBuffer.x = this._activeBuffer.nextStop();
|
461
714
|
return !0;
|
462
715
|
}
|
463
716
|
cursorBackwardTab(o) {
|
464
717
|
if (this._activeBuffer.x >= this._bufferService.cols) return !0;
|
465
|
-
let
|
466
|
-
for (;
|
718
|
+
let m = o.params[0] || 1;
|
719
|
+
for (; m--; ) this._activeBuffer.x = this._activeBuffer.prevStop();
|
467
720
|
return !0;
|
468
721
|
}
|
469
722
|
selectProtected(o) {
|
470
|
-
const
|
471
|
-
return
|
723
|
+
const m = o.params[0];
|
724
|
+
return m === 1 && (this._curAttrData.bg |= 536870912), m !== 2 && m !== 0 || (this._curAttrData.bg &= -536870913), !0;
|
472
725
|
}
|
473
|
-
_eraseInBufferLine(o,
|
726
|
+
_eraseInBufferLine(o, m, g, b = !1, A = !1) {
|
474
727
|
const D = this._activeBuffer.lines.get(this._activeBuffer.ybase + o);
|
475
|
-
D.replaceCells(
|
728
|
+
D.replaceCells(m, g, this._activeBuffer.getNullCell(this._eraseAttrData()), A), b && (D.isWrapped = !1);
|
476
729
|
}
|
477
|
-
_resetBufferLine(o,
|
730
|
+
_resetBufferLine(o, m = !1) {
|
478
731
|
const g = this._activeBuffer.lines.get(this._activeBuffer.ybase + o);
|
479
|
-
g && (g.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),
|
732
|
+
g && (g.fill(this._activeBuffer.getNullCell(this._eraseAttrData()), m), this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase + o), g.isWrapped = !1);
|
480
733
|
}
|
481
|
-
eraseInDisplay(o,
|
734
|
+
eraseInDisplay(o, m = !1) {
|
482
735
|
let g;
|
483
736
|
switch (this._restrictCursor(this._bufferService.cols), o.params[0]) {
|
484
737
|
case 0:
|
485
|
-
for (g = this._activeBuffer.y, this._dirtyRowTracker.markDirty(g), this._eraseInBufferLine(g++, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0,
|
738
|
+
for (g = this._activeBuffer.y, this._dirtyRowTracker.markDirty(g), this._eraseInBufferLine(g++, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0, m); g < this._bufferService.rows; g++) this._resetBufferLine(g, m);
|
486
739
|
this._dirtyRowTracker.markDirty(g);
|
487
740
|
break;
|
488
741
|
case 1:
|
489
|
-
for (g = this._activeBuffer.y, this._dirtyRowTracker.markDirty(g), this._eraseInBufferLine(g, 0, this._activeBuffer.x + 1, !0,
|
742
|
+
for (g = this._activeBuffer.y, this._dirtyRowTracker.markDirty(g), this._eraseInBufferLine(g, 0, this._activeBuffer.x + 1, !0, m), this._activeBuffer.x + 1 >= this._bufferService.cols && (this._activeBuffer.lines.get(g + 1).isWrapped = !1); g--; ) this._resetBufferLine(g, m);
|
490
743
|
this._dirtyRowTracker.markDirty(0);
|
491
744
|
break;
|
492
745
|
case 2:
|
493
|
-
for (g = this._bufferService.rows, this._dirtyRowTracker.markDirty(g - 1); g--; ) this._resetBufferLine(g,
|
746
|
+
for (g = this._bufferService.rows, this._dirtyRowTracker.markDirty(g - 1); g--; ) this._resetBufferLine(g, m);
|
494
747
|
this._dirtyRowTracker.markDirty(0);
|
495
748
|
break;
|
496
749
|
case 3:
|
497
|
-
const
|
498
|
-
|
750
|
+
const b = this._activeBuffer.lines.length - this._bufferService.rows;
|
751
|
+
b > 0 && (this._activeBuffer.lines.trimStart(b), this._activeBuffer.ybase = Math.max(this._activeBuffer.ybase - b, 0), this._activeBuffer.ydisp = Math.max(this._activeBuffer.ydisp - b, 0), this._onScroll.fire(0));
|
499
752
|
}
|
500
753
|
return !0;
|
501
754
|
}
|
502
|
-
eraseInLine(o,
|
755
|
+
eraseInLine(o, m = !1) {
|
503
756
|
switch (this._restrictCursor(this._bufferService.cols), o.params[0]) {
|
504
757
|
case 0:
|
505
|
-
this._eraseInBufferLine(this._activeBuffer.y, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0,
|
758
|
+
this._eraseInBufferLine(this._activeBuffer.y, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0, m);
|
506
759
|
break;
|
507
760
|
case 1:
|
508
|
-
this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, !1,
|
761
|
+
this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, !1, m);
|
509
762
|
break;
|
510
763
|
case 2:
|
511
|
-
this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, !0,
|
764
|
+
this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, !0, m);
|
512
765
|
}
|
513
766
|
return this._dirtyRowTracker.markDirty(this._activeBuffer.y), !0;
|
514
767
|
}
|
515
768
|
insertLines(o) {
|
516
769
|
this._restrictCursor();
|
517
|
-
let
|
770
|
+
let m = o.params[0] || 1;
|
518
771
|
if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
|
519
|
-
const g = this._activeBuffer.ybase + this._activeBuffer.y,
|
520
|
-
for (;
|
772
|
+
const g = this._activeBuffer.ybase + this._activeBuffer.y, b = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom, A = this._bufferService.rows - 1 + this._activeBuffer.ybase - b + 1;
|
773
|
+
for (; m--; ) this._activeBuffer.lines.splice(A - 1, 1), this._activeBuffer.lines.splice(g, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
|
521
774
|
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, !0;
|
522
775
|
}
|
523
776
|
deleteLines(o) {
|
524
777
|
this._restrictCursor();
|
525
|
-
let
|
778
|
+
let m = o.params[0] || 1;
|
526
779
|
if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
|
527
780
|
const g = this._activeBuffer.ybase + this._activeBuffer.y;
|
528
|
-
let
|
529
|
-
for (
|
781
|
+
let b;
|
782
|
+
for (b = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom, b = this._bufferService.rows - 1 + this._activeBuffer.ybase - b; m--; ) this._activeBuffer.lines.splice(g, 1), this._activeBuffer.lines.splice(b, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
|
530
783
|
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, !0;
|
531
784
|
}
|
532
785
|
insertChars(o) {
|
533
786
|
this._restrictCursor();
|
534
|
-
const
|
535
|
-
return
|
787
|
+
const m = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
788
|
+
return m && (m.insertCells(this._activeBuffer.x, o.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
|
536
789
|
}
|
537
790
|
deleteChars(o) {
|
538
791
|
this._restrictCursor();
|
539
|
-
const
|
540
|
-
return
|
792
|
+
const m = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
793
|
+
return m && (m.deleteCells(this._activeBuffer.x, o.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
|
541
794
|
}
|
542
795
|
scrollUp(o) {
|
543
|
-
let
|
544
|
-
for (;
|
796
|
+
let m = o.params[0] || 1;
|
797
|
+
for (; m--; ) this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 1), this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
|
545
798
|
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
|
546
799
|
}
|
547
800
|
scrollDown(o) {
|
548
|
-
let
|
549
|
-
for (;
|
801
|
+
let m = o.params[0] || 1;
|
802
|
+
for (; m--; ) this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 1), this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 0, this._activeBuffer.getBlankLine(e.DEFAULT_ATTR_DATA));
|
550
803
|
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
|
551
804
|
}
|
552
805
|
scrollLeft(o) {
|
553
806
|
if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
|
554
|
-
const
|
807
|
+
const m = o.params[0] || 1;
|
555
808
|
for (let g = this._activeBuffer.scrollTop; g <= this._activeBuffer.scrollBottom; ++g) {
|
556
|
-
const
|
557
|
-
|
809
|
+
const b = this._activeBuffer.lines.get(this._activeBuffer.ybase + g);
|
810
|
+
b.deleteCells(0, m, this._activeBuffer.getNullCell(this._eraseAttrData())), b.isWrapped = !1;
|
558
811
|
}
|
559
812
|
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
|
560
813
|
}
|
561
814
|
scrollRight(o) {
|
562
815
|
if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
|
563
|
-
const
|
816
|
+
const m = o.params[0] || 1;
|
564
817
|
for (let g = this._activeBuffer.scrollTop; g <= this._activeBuffer.scrollBottom; ++g) {
|
565
|
-
const
|
566
|
-
|
818
|
+
const b = this._activeBuffer.lines.get(this._activeBuffer.ybase + g);
|
819
|
+
b.insertCells(0, m, this._activeBuffer.getNullCell(this._eraseAttrData())), b.isWrapped = !1;
|
567
820
|
}
|
568
821
|
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
|
569
822
|
}
|
570
823
|
insertColumns(o) {
|
571
824
|
if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
|
572
|
-
const
|
825
|
+
const m = o.params[0] || 1;
|
573
826
|
for (let g = this._activeBuffer.scrollTop; g <= this._activeBuffer.scrollBottom; ++g) {
|
574
|
-
const
|
575
|
-
|
827
|
+
const b = this._activeBuffer.lines.get(this._activeBuffer.ybase + g);
|
828
|
+
b.insertCells(this._activeBuffer.x, m, this._activeBuffer.getNullCell(this._eraseAttrData())), b.isWrapped = !1;
|
576
829
|
}
|
577
830
|
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
|
578
831
|
}
|
579
832
|
deleteColumns(o) {
|
580
833
|
if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
|
581
|
-
const
|
834
|
+
const m = o.params[0] || 1;
|
582
835
|
for (let g = this._activeBuffer.scrollTop; g <= this._activeBuffer.scrollBottom; ++g) {
|
583
|
-
const
|
584
|
-
|
836
|
+
const b = this._activeBuffer.lines.get(this._activeBuffer.ybase + g);
|
837
|
+
b.deleteCells(this._activeBuffer.x, m, this._activeBuffer.getNullCell(this._eraseAttrData())), b.isWrapped = !1;
|
585
838
|
}
|
586
839
|
return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
|
587
840
|
}
|
588
841
|
eraseChars(o) {
|
589
842
|
this._restrictCursor();
|
590
|
-
const
|
591
|
-
return
|
843
|
+
const m = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
|
844
|
+
return m && (m.replaceCells(this._activeBuffer.x, this._activeBuffer.x + (o.params[0] || 1), this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
|
592
845
|
}
|
593
846
|
repeatPrecedingCharacter(o) {
|
594
|
-
const
|
595
|
-
if (!
|
596
|
-
const g = o.params[0] || 1,
|
597
|
-
let
|
847
|
+
const m = this._parser.precedingJoinState;
|
848
|
+
if (!m) return !0;
|
849
|
+
const g = o.params[0] || 1, b = S.UnicodeService.extractWidth(m), A = this._activeBuffer.x - b, D = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).getString(A), O = new Uint32Array(D.length * g);
|
850
|
+
let U = 0;
|
598
851
|
for (let v = 0; v < D.length; ) {
|
599
|
-
const
|
600
|
-
|
852
|
+
const M = D.codePointAt(v) || 0;
|
853
|
+
O[U++] = M, v += M > 65535 ? 2 : 1;
|
601
854
|
}
|
602
|
-
let
|
603
|
-
for (let v = 1; v < g; ++v)
|
604
|
-
return this.print(
|
855
|
+
let X = U;
|
856
|
+
for (let v = 1; v < g; ++v) O.copyWithin(X, 0, U), X += U;
|
857
|
+
return this.print(O, 0, X), !0;
|
605
858
|
}
|
606
859
|
sendDeviceAttributesPrimary(o) {
|
607
860
|
return o.params[0] > 0 || (this._is("xterm") || this._is("rxvt-unicode") || this._is("screen") ? this._coreService.triggerDataEvent(n.C0.ESC + "[?1;2c") : this._is("linux") && this._coreService.triggerDataEvent(n.C0.ESC + "[?6c")), !0;
|
@@ -613,7 +866,7 @@ function ve() {
|
|
613
866
|
return (this._optionsService.rawOptions.termName + "").indexOf(o) === 0;
|
614
867
|
}
|
615
868
|
setMode(o) {
|
616
|
-
for (let
|
869
|
+
for (let m = 0; m < o.length; m++) switch (o.params[m]) {
|
617
870
|
case 4:
|
618
871
|
this._coreService.modes.insertMode = !0;
|
619
872
|
break;
|
@@ -623,7 +876,7 @@ function ve() {
|
|
623
876
|
return !0;
|
624
877
|
}
|
625
878
|
setModePrivate(o) {
|
626
|
-
for (let
|
879
|
+
for (let m = 0; m < o.length; m++) switch (o.params[m]) {
|
627
880
|
case 1:
|
628
881
|
this._coreService.decPrivateModes.applicationCursorKeys = !0;
|
629
882
|
break;
|
@@ -693,7 +946,7 @@ function ve() {
|
|
693
946
|
return !0;
|
694
947
|
}
|
695
948
|
resetMode(o) {
|
696
|
-
for (let
|
949
|
+
for (let m = 0; m < o.length; m++) switch (o.params[m]) {
|
697
950
|
case 4:
|
698
951
|
this._coreService.modes.insertMode = !1;
|
699
952
|
break;
|
@@ -703,7 +956,7 @@ function ve() {
|
|
703
956
|
return !0;
|
704
957
|
}
|
705
958
|
resetModePrivate(o) {
|
706
|
-
for (let
|
959
|
+
for (let m = 0; m < o.length; m++) switch (o.params[m]) {
|
707
960
|
case 1:
|
708
961
|
this._coreService.decPrivateModes.applicationCursorKeys = !1;
|
709
962
|
break;
|
@@ -753,61 +1006,61 @@ function ve() {
|
|
753
1006
|
case 1049:
|
754
1007
|
case 47:
|
755
1008
|
case 1047:
|
756
|
-
this._bufferService.buffers.activateNormalBuffer(), o.params[
|
1009
|
+
this._bufferService.buffers.activateNormalBuffer(), o.params[m] === 1049 && this.restoreCursor(), this._coreService.isCursorInitialized = !0, this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1), this._onRequestSyncScrollBar.fire();
|
757
1010
|
break;
|
758
1011
|
case 2004:
|
759
1012
|
this._coreService.decPrivateModes.bracketedPasteMode = !1;
|
760
1013
|
}
|
761
1014
|
return !0;
|
762
1015
|
}
|
763
|
-
requestMode(o,
|
764
|
-
const g = this._coreService.decPrivateModes, { activeProtocol:
|
765
|
-
return J =
|
1016
|
+
requestMode(o, m) {
|
1017
|
+
const g = this._coreService.decPrivateModes, { activeProtocol: b, activeEncoding: A } = this._coreMouseService, D = this._coreService, { buffers: O, cols: U } = this._bufferService, { active: X, alt: v } = O, M = this._optionsService.rawOptions, L = (te) => te ? 1 : 2, H = o.params[0];
|
1018
|
+
return J = H, Z = m ? H === 2 ? 4 : H === 4 ? L(D.modes.insertMode) : H === 12 ? 3 : H === 20 ? L(M.convertEol) : 0 : H === 1 ? L(g.applicationCursorKeys) : H === 3 ? M.windowOptions.setWinLines ? U === 80 ? 2 : U === 132 ? 1 : 0 : 0 : H === 6 ? L(g.origin) : H === 7 ? L(g.wraparound) : H === 8 ? 3 : H === 9 ? L(b === "X10") : H === 12 ? L(M.cursorBlink) : H === 25 ? L(!D.isCursorHidden) : H === 45 ? L(g.reverseWraparound) : H === 66 ? L(g.applicationKeypad) : H === 67 ? 4 : H === 1e3 ? L(b === "VT200") : H === 1002 ? L(b === "DRAG") : H === 1003 ? L(b === "ANY") : H === 1004 ? L(g.sendFocus) : H === 1005 ? 4 : H === 1006 ? L(A === "SGR") : H === 1015 ? 4 : H === 1016 ? L(A === "SGR_PIXELS") : H === 1048 ? 1 : H === 47 || H === 1047 || H === 1049 ? L(X === v) : H === 2004 ? L(g.bracketedPasteMode) : 0, D.triggerDataEvent(`${n.C0.ESC}[${m ? "" : "?"}${J};${Z}$y`), !0;
|
766
1019
|
var J, Z;
|
767
1020
|
}
|
768
|
-
_updateAttrColor(o,
|
769
|
-
return
|
1021
|
+
_updateAttrColor(o, m, g, b, A) {
|
1022
|
+
return m === 2 ? (o |= 50331648, o &= -16777216, o |= f.AttributeData.fromColorRGB([g, b, A])) : m === 5 && (o &= -50331904, o |= 33554432 | 255 & g), o;
|
770
1023
|
}
|
771
|
-
_extractColor(o,
|
772
|
-
const
|
1024
|
+
_extractColor(o, m, g) {
|
1025
|
+
const b = [0, 0, -1, 0, 0, 0];
|
773
1026
|
let A = 0, D = 0;
|
774
1027
|
do {
|
775
|
-
if (
|
776
|
-
const
|
777
|
-
let
|
1028
|
+
if (b[D + A] = o.params[m + D], o.hasSubParams(m + D)) {
|
1029
|
+
const O = o.getSubParams(m + D);
|
1030
|
+
let U = 0;
|
778
1031
|
do
|
779
|
-
|
780
|
-
while (++
|
1032
|
+
b[1] === 5 && (A = 1), b[D + U + 1 + A] = O[U];
|
1033
|
+
while (++U < O.length && U + D + 1 + A < b.length);
|
781
1034
|
break;
|
782
1035
|
}
|
783
|
-
if (
|
784
|
-
|
785
|
-
} while (++D +
|
786
|
-
for (let
|
787
|
-
switch (
|
1036
|
+
if (b[1] === 5 && D + A >= 2 || b[1] === 2 && D + A >= 5) break;
|
1037
|
+
b[1] && (A = 1);
|
1038
|
+
} while (++D + m < o.length && D + A < b.length);
|
1039
|
+
for (let O = 2; O < b.length; ++O) b[O] === -1 && (b[O] = 0);
|
1040
|
+
switch (b[0]) {
|
788
1041
|
case 38:
|
789
|
-
g.fg = this._updateAttrColor(g.fg,
|
1042
|
+
g.fg = this._updateAttrColor(g.fg, b[1], b[3], b[4], b[5]);
|
790
1043
|
break;
|
791
1044
|
case 48:
|
792
|
-
g.bg = this._updateAttrColor(g.bg,
|
1045
|
+
g.bg = this._updateAttrColor(g.bg, b[1], b[3], b[4], b[5]);
|
793
1046
|
break;
|
794
1047
|
case 58:
|
795
|
-
g.extended = g.extended.clone(), g.extended.underlineColor = this._updateAttrColor(g.extended.underlineColor,
|
1048
|
+
g.extended = g.extended.clone(), g.extended.underlineColor = this._updateAttrColor(g.extended.underlineColor, b[1], b[3], b[4], b[5]);
|
796
1049
|
}
|
797
1050
|
return D;
|
798
1051
|
}
|
799
|
-
_processUnderline(o,
|
800
|
-
|
1052
|
+
_processUnderline(o, m) {
|
1053
|
+
m.extended = m.extended.clone(), (!~o || o > 5) && (o = 1), m.extended.underlineStyle = o, m.fg |= 268435456, o === 0 && (m.fg &= -268435457), m.updateExtended();
|
801
1054
|
}
|
802
1055
|
_processSGR0(o) {
|
803
1056
|
o.fg = e.DEFAULT_ATTR_DATA.fg, o.bg = e.DEFAULT_ATTR_DATA.bg, o.extended = o.extended.clone(), o.extended.underlineStyle = 0, o.extended.underlineColor &= -67108864, o.updateExtended();
|
804
1057
|
}
|
805
1058
|
charAttributes(o) {
|
806
1059
|
if (o.length === 1 && o.params[0] === 0) return this._processSGR0(this._curAttrData), !0;
|
807
|
-
const
|
1060
|
+
const m = o.length;
|
808
1061
|
let g;
|
809
|
-
const
|
810
|
-
for (let A = 0; A <
|
1062
|
+
const b = this._curAttrData;
|
1063
|
+
for (let A = 0; A < m; A++) g = o.params[A], g >= 30 && g <= 37 ? (b.fg &= -50331904, b.fg |= 16777216 | g - 30) : g >= 40 && g <= 47 ? (b.bg &= -50331904, b.bg |= 16777216 | g - 40) : g >= 90 && g <= 97 ? (b.fg &= -50331904, b.fg |= 16777224 | g - 90) : g >= 100 && g <= 107 ? (b.bg &= -50331904, b.bg |= 16777224 | g - 100) : g === 0 ? this._processSGR0(b) : g === 1 ? b.fg |= 134217728 : g === 3 ? b.bg |= 67108864 : g === 4 ? (b.fg |= 268435456, this._processUnderline(o.hasSubParams(A) ? o.getSubParams(A)[0] : 1, b)) : g === 5 ? b.fg |= 536870912 : g === 7 ? b.fg |= 67108864 : g === 8 ? b.fg |= 1073741824 : g === 9 ? b.fg |= 2147483648 : g === 2 ? b.bg |= 134217728 : g === 21 ? this._processUnderline(2, b) : g === 22 ? (b.fg &= -134217729, b.bg &= -134217729) : g === 23 ? b.bg &= -67108865 : g === 24 ? (b.fg &= -268435457, this._processUnderline(0, b)) : g === 25 ? b.fg &= -536870913 : g === 27 ? b.fg &= -67108865 : g === 28 ? b.fg &= -1073741825 : g === 29 ? b.fg &= 2147483647 : g === 39 ? (b.fg &= -67108864, b.fg |= 16777215 & e.DEFAULT_ATTR_DATA.fg) : g === 49 ? (b.bg &= -67108864, b.bg |= 16777215 & e.DEFAULT_ATTR_DATA.bg) : g === 38 || g === 48 || g === 58 ? A += this._extractColor(o, A, b) : g === 53 ? b.bg |= 1073741824 : g === 55 ? b.bg &= -1073741825 : g === 59 ? (b.extended = b.extended.clone(), b.extended.underlineColor = -1, b.updateExtended()) : g === 100 ? (b.fg &= -67108864, b.fg |= 16777215 & e.DEFAULT_ATTR_DATA.fg, b.bg &= -67108864, b.bg |= 16777215 & e.DEFAULT_ATTR_DATA.bg) : this._logService.debug("Unknown SGR attribute: %d.", g);
|
811
1064
|
return !0;
|
812
1065
|
}
|
813
1066
|
deviceStatus(o) {
|
@@ -816,15 +1069,15 @@ function ve() {
|
|
816
1069
|
this._coreService.triggerDataEvent(`${n.C0.ESC}[0n`);
|
817
1070
|
break;
|
818
1071
|
case 6:
|
819
|
-
const
|
820
|
-
this._coreService.triggerDataEvent(`${n.C0.ESC}[${
|
1072
|
+
const m = this._activeBuffer.y + 1, g = this._activeBuffer.x + 1;
|
1073
|
+
this._coreService.triggerDataEvent(`${n.C0.ESC}[${m};${g}R`);
|
821
1074
|
}
|
822
1075
|
return !0;
|
823
1076
|
}
|
824
1077
|
deviceStatusPrivate(o) {
|
825
1078
|
if (o.params[0] === 6) {
|
826
|
-
const
|
827
|
-
this._coreService.triggerDataEvent(`${n.C0.ESC}[?${
|
1079
|
+
const m = this._activeBuffer.y + 1, g = this._activeBuffer.x + 1;
|
1080
|
+
this._coreService.triggerDataEvent(`${n.C0.ESC}[?${m};${g}R`);
|
828
1081
|
}
|
829
1082
|
return !0;
|
830
1083
|
}
|
@@ -832,8 +1085,8 @@ function ve() {
|
|
832
1085
|
return this._coreService.isCursorHidden = !1, this._onRequestSyncScrollBar.fire(), this._activeBuffer.scrollTop = 0, this._activeBuffer.scrollBottom = this._bufferService.rows - 1, this._curAttrData = e.DEFAULT_ATTR_DATA.clone(), this._coreService.reset(), this._charsetService.reset(), this._activeBuffer.savedX = 0, this._activeBuffer.savedY = this._activeBuffer.ybase, this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg, this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg, this._activeBuffer.savedCharset = this._charsetService.charset, this._coreService.decPrivateModes.origin = !1, !0;
|
833
1086
|
}
|
834
1087
|
setCursorStyle(o) {
|
835
|
-
const
|
836
|
-
switch (
|
1088
|
+
const m = o.params[0] || 1;
|
1089
|
+
switch (m) {
|
837
1090
|
case 1:
|
838
1091
|
case 2:
|
839
1092
|
this._optionsService.options.cursorStyle = "block";
|
@@ -846,32 +1099,32 @@ function ve() {
|
|
846
1099
|
case 6:
|
847
1100
|
this._optionsService.options.cursorStyle = "bar";
|
848
1101
|
}
|
849
|
-
const g =
|
1102
|
+
const g = m % 2 == 1;
|
850
1103
|
return this._optionsService.options.cursorBlink = g, !0;
|
851
1104
|
}
|
852
1105
|
setScrollRegion(o) {
|
853
|
-
const
|
1106
|
+
const m = o.params[0] || 1;
|
854
1107
|
let g;
|
855
|
-
return (o.length < 2 || (g = o.params[1]) > this._bufferService.rows || g === 0) && (g = this._bufferService.rows), g >
|
1108
|
+
return (o.length < 2 || (g = o.params[1]) > this._bufferService.rows || g === 0) && (g = this._bufferService.rows), g > m && (this._activeBuffer.scrollTop = m - 1, this._activeBuffer.scrollBottom = g - 1, this._setCursor(0, 0)), !0;
|
856
1109
|
}
|
857
1110
|
windowOptions(o) {
|
858
|
-
if (!
|
859
|
-
const
|
1111
|
+
if (!B(o.params[0], this._optionsService.rawOptions.windowOptions)) return !0;
|
1112
|
+
const m = o.length > 1 ? o.params[1] : 0;
|
860
1113
|
switch (o.params[0]) {
|
861
1114
|
case 14:
|
862
|
-
|
1115
|
+
m !== 2 && this._onRequestWindowsOptionsReport.fire(k.GET_WIN_SIZE_PIXELS);
|
863
1116
|
break;
|
864
1117
|
case 16:
|
865
|
-
this._onRequestWindowsOptionsReport.fire(
|
1118
|
+
this._onRequestWindowsOptionsReport.fire(k.GET_CELL_SIZE_PIXELS);
|
866
1119
|
break;
|
867
1120
|
case 18:
|
868
1121
|
this._bufferService && this._coreService.triggerDataEvent(`${n.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);
|
869
1122
|
break;
|
870
1123
|
case 22:
|
871
|
-
|
1124
|
+
m !== 0 && m !== 2 || (this._windowTitleStack.push(this._windowTitle), this._windowTitleStack.length > 10 && this._windowTitleStack.shift()), m !== 0 && m !== 1 || (this._iconNameStack.push(this._iconName), this._iconNameStack.length > 10 && this._iconNameStack.shift());
|
872
1125
|
break;
|
873
1126
|
case 23:
|
874
|
-
|
1127
|
+
m !== 0 && m !== 2 || this._windowTitleStack.length && this.setTitle(this._windowTitleStack.pop()), m !== 0 && m !== 1 || this._iconNameStack.length && this.setIconName(this._iconNameStack.pop());
|
875
1128
|
}
|
876
1129
|
return !0;
|
877
1130
|
}
|
@@ -888,40 +1141,40 @@ function ve() {
|
|
888
1141
|
return this._iconName = o, !0;
|
889
1142
|
}
|
890
1143
|
setOrReportIndexedColor(o) {
|
891
|
-
const
|
1144
|
+
const m = [], g = o.split(";");
|
892
1145
|
for (; g.length > 1; ) {
|
893
|
-
const
|
894
|
-
if (/^\d+$/.exec(
|
895
|
-
const D = parseInt(
|
896
|
-
if (
|
1146
|
+
const b = g.shift(), A = g.shift();
|
1147
|
+
if (/^\d+$/.exec(b)) {
|
1148
|
+
const D = parseInt(b);
|
1149
|
+
if (q(D)) if (A === "?") m.push({ type: 0, index: D });
|
897
1150
|
else {
|
898
|
-
const
|
899
|
-
|
1151
|
+
const O = (0, T.parseColor)(A);
|
1152
|
+
O && m.push({ type: 1, index: D, color: O });
|
900
1153
|
}
|
901
1154
|
}
|
902
1155
|
}
|
903
|
-
return
|
1156
|
+
return m.length && this._onColor.fire(m), !0;
|
904
1157
|
}
|
905
1158
|
setHyperlink(o) {
|
906
|
-
const
|
907
|
-
return !(
|
1159
|
+
const m = o.split(";");
|
1160
|
+
return !(m.length < 2) && (m[1] ? this._createHyperlink(m[0], m[1]) : !m[0] && this._finishHyperlink());
|
908
1161
|
}
|
909
|
-
_createHyperlink(o,
|
1162
|
+
_createHyperlink(o, m) {
|
910
1163
|
this._getCurrentLinkId() && this._finishHyperlink();
|
911
1164
|
const g = o.split(":");
|
912
|
-
let
|
1165
|
+
let b;
|
913
1166
|
const A = g.findIndex((D) => D.startsWith("id="));
|
914
|
-
return A !== -1 && (
|
1167
|
+
return A !== -1 && (b = g[A].slice(3) || void 0), this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = this._oscLinkService.registerLink({ id: b, uri: m }), this._curAttrData.updateExtended(), !0;
|
915
1168
|
}
|
916
1169
|
_finishHyperlink() {
|
917
1170
|
return this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = 0, this._curAttrData.updateExtended(), !0;
|
918
1171
|
}
|
919
|
-
_setOrReportSpecialColor(o,
|
1172
|
+
_setOrReportSpecialColor(o, m) {
|
920
1173
|
const g = o.split(";");
|
921
|
-
for (let
|
1174
|
+
for (let b = 0; b < g.length && !(m >= this._specialColors.length); ++b, ++m) if (g[b] === "?") this._onColor.fire([{ type: 0, index: this._specialColors[m] }]);
|
922
1175
|
else {
|
923
|
-
const A = (0, T.parseColor)(g[
|
924
|
-
A && this._onColor.fire([{ type: 1, index: this._specialColors[
|
1176
|
+
const A = (0, T.parseColor)(g[b]);
|
1177
|
+
A && this._onColor.fire([{ type: 1, index: this._specialColors[m], color: A }]);
|
925
1178
|
}
|
926
1179
|
return !0;
|
927
1180
|
}
|
@@ -936,12 +1189,12 @@ function ve() {
|
|
936
1189
|
}
|
937
1190
|
restoreIndexedColor(o) {
|
938
1191
|
if (!o) return this._onColor.fire([{ type: 2 }]), !0;
|
939
|
-
const
|
940
|
-
for (let
|
941
|
-
const A = parseInt(g[
|
942
|
-
|
1192
|
+
const m = [], g = o.split(";");
|
1193
|
+
for (let b = 0; b < g.length; ++b) if (/^\d+$/.exec(g[b])) {
|
1194
|
+
const A = parseInt(g[b]);
|
1195
|
+
q(A) && m.push({ type: 2, index: A });
|
943
1196
|
}
|
944
|
-
return
|
1197
|
+
return m.length && this._onColor.fire(m), !0;
|
945
1198
|
}
|
946
1199
|
restoreFgColor(o) {
|
947
1200
|
return this._onColor.fire([{ type: 2, index: 256 }]), !0;
|
@@ -965,7 +1218,7 @@ function ve() {
|
|
965
1218
|
return this._charsetService.setgLevel(0), this._charsetService.setgCharset(0, c.DEFAULT_CHARSET), !0;
|
966
1219
|
}
|
967
1220
|
selectCharset(o) {
|
968
|
-
return o.length !== 2 ? (this.selectDefaultCharset(), !0) : (o[0] === "/" || this._charsetService.setgCharset(
|
1221
|
+
return o.length !== 2 ? (this.selectDefaultCharset(), !0) : (o[0] === "/" || this._charsetService.setgCharset(j[o[0]], c.CHARSETS[o[1]] || c.DEFAULT_CHARSET), !0);
|
969
1222
|
}
|
970
1223
|
index() {
|
971
1224
|
return this._restrictCursor(), this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData())) : this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._restrictCursor(), !0;
|
@@ -995,48 +1248,48 @@ function ve() {
|
|
995
1248
|
screenAlignmentPattern() {
|
996
1249
|
const o = new t.CellData();
|
997
1250
|
o.content = 4194373, o.fg = this._curAttrData.fg, o.bg = this._curAttrData.bg, this._setCursor(0, 0);
|
998
|
-
for (let
|
999
|
-
const g = this._activeBuffer.ybase + this._activeBuffer.y +
|
1000
|
-
|
1251
|
+
for (let m = 0; m < this._bufferService.rows; ++m) {
|
1252
|
+
const g = this._activeBuffer.ybase + this._activeBuffer.y + m, b = this._activeBuffer.lines.get(g);
|
1253
|
+
b && (b.fill(o), b.isWrapped = !1);
|
1001
1254
|
}
|
1002
1255
|
return this._dirtyRowTracker.markAllDirty(), this._setCursor(0, 0), !0;
|
1003
1256
|
}
|
1004
|
-
requestStatusString(o,
|
1005
|
-
const g = this._bufferService.buffer,
|
1006
|
-
return ((A) => (this._coreService.triggerDataEvent(`${n.C0.ESC}${A}${n.C0.ESC}\\`), !0))(o === '"q' ? `P1$r${this._curAttrData.isProtected() ? 1 : 0}"q` : o === '"p' ? 'P1$r61;1"p' : o === "r" ? `P1$r${g.scrollTop + 1};${g.scrollBottom + 1}r` : o === "m" ? "P1$r0m" : o === " q" ? `P1$r${{ block: 2, underline: 4, bar: 6 }[
|
1257
|
+
requestStatusString(o, m) {
|
1258
|
+
const g = this._bufferService.buffer, b = this._optionsService.rawOptions;
|
1259
|
+
return ((A) => (this._coreService.triggerDataEvent(`${n.C0.ESC}${A}${n.C0.ESC}\\`), !0))(o === '"q' ? `P1$r${this._curAttrData.isProtected() ? 1 : 0}"q` : o === '"p' ? 'P1$r61;1"p' : o === "r" ? `P1$r${g.scrollTop + 1};${g.scrollBottom + 1}r` : o === "m" ? "P1$r0m" : o === " q" ? `P1$r${{ block: 2, underline: 4, bar: 6 }[b.cursorStyle] - (b.cursorBlink ? 1 : 0)} q` : "P0$r");
|
1007
1260
|
}
|
1008
|
-
markRangeDirty(o,
|
1009
|
-
this._dirtyRowTracker.markRangeDirty(o,
|
1261
|
+
markRangeDirty(o, m) {
|
1262
|
+
this._dirtyRowTracker.markRangeDirty(o, m);
|
1010
1263
|
}
|
1011
1264
|
}
|
1012
|
-
|
1013
|
-
let
|
1014
|
-
constructor(
|
1015
|
-
this._bufferService =
|
1265
|
+
r.InputHandler = V;
|
1266
|
+
let F = class {
|
1267
|
+
constructor(P) {
|
1268
|
+
this._bufferService = P, this.clearRange();
|
1016
1269
|
}
|
1017
1270
|
clearRange() {
|
1018
1271
|
this.start = this._bufferService.buffer.y, this.end = this._bufferService.buffer.y;
|
1019
1272
|
}
|
1020
|
-
markDirty(
|
1021
|
-
|
1273
|
+
markDirty(P) {
|
1274
|
+
P < this.start ? this.start = P : P > this.end && (this.end = P);
|
1022
1275
|
}
|
1023
|
-
markRangeDirty(
|
1024
|
-
|
1276
|
+
markRangeDirty(P, o) {
|
1277
|
+
P > o && (G = P, P = o, o = G), P < this.start && (this.start = P), o > this.end && (this.end = o);
|
1025
1278
|
}
|
1026
1279
|
markAllDirty() {
|
1027
1280
|
this.markRangeDirty(0, this._bufferService.rows - 1);
|
1028
1281
|
}
|
1029
1282
|
};
|
1030
|
-
function
|
1031
|
-
return 0 <=
|
1283
|
+
function q(P) {
|
1284
|
+
return 0 <= P && P < 256;
|
1032
1285
|
}
|
1033
|
-
|
1034
|
-
}, 844: (
|
1286
|
+
F = _([d(0, p.IBufferService)], F);
|
1287
|
+
}, 844: (w, r) => {
|
1035
1288
|
function l(_) {
|
1036
1289
|
for (const d of _) d.dispose();
|
1037
1290
|
_.length = 0;
|
1038
1291
|
}
|
1039
|
-
Object.defineProperty(
|
1292
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.getDisposeArrayDisposable = r.disposeArray = r.toDisposable = r.MutableDisposable = r.Disposable = void 0, r.Disposable = class {
|
1040
1293
|
constructor() {
|
1041
1294
|
this._disposables = [], this._isDisposed = !1;
|
1042
1295
|
}
|
@@ -1052,7 +1305,7 @@ function ve() {
|
|
1052
1305
|
const d = this._disposables.indexOf(_);
|
1053
1306
|
d !== -1 && this._disposables.splice(d, 1);
|
1054
1307
|
}
|
1055
|
-
},
|
1308
|
+
}, r.MutableDisposable = class {
|
1056
1309
|
constructor() {
|
1057
1310
|
this._isDisposed = !1;
|
1058
1311
|
}
|
@@ -1068,21 +1321,21 @@ function ve() {
|
|
1068
1321
|
dispose() {
|
1069
1322
|
this._isDisposed = !0, this._value?.dispose(), this._value = void 0;
|
1070
1323
|
}
|
1071
|
-
},
|
1324
|
+
}, r.toDisposable = function(_) {
|
1072
1325
|
return { dispose: _ };
|
1073
|
-
},
|
1326
|
+
}, r.disposeArray = l, r.getDisposeArrayDisposable = function(_) {
|
1074
1327
|
return { dispose: () => l(_) };
|
1075
1328
|
};
|
1076
|
-
}, 114: (
|
1077
|
-
Object.defineProperty(
|
1078
|
-
const l =
|
1079
|
-
|
1080
|
-
if (!
|
1329
|
+
}, 114: (w, r) => {
|
1330
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.isChromeOS = r.isLinux = r.isWindows = r.isIphone = r.isIpad = r.isMac = r.getSafariVersion = r.isSafari = r.isLegacyEdge = r.isFirefox = r.isNode = void 0, r.isNode = typeof process < "u" && "title" in process;
|
1331
|
+
const l = r.isNode ? "node" : navigator.userAgent, _ = r.isNode ? "node" : navigator.platform;
|
1332
|
+
r.isFirefox = l.includes("Firefox"), r.isLegacyEdge = l.includes("Edge"), r.isSafari = /^((?!chrome|android).)*safari/i.test(l), r.getSafariVersion = function() {
|
1333
|
+
if (!r.isSafari) return 0;
|
1081
1334
|
const d = l.match(/Version\/(\d+)/);
|
1082
1335
|
return d === null || d.length < 2 ? 0 : parseInt(d[1]);
|
1083
|
-
},
|
1084
|
-
}, 226: (
|
1085
|
-
Object.defineProperty(
|
1336
|
+
}, r.isMac = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(_), r.isIpad = _ === "iPad", r.isIphone = _ === "iPhone", r.isWindows = ["Windows", "Win16", "Win32", "WinCE"].includes(_), r.isLinux = _.indexOf("Linux") >= 0, r.isChromeOS = /\bCrOS\b/.test(l);
|
1337
|
+
}, 226: (w, r, l) => {
|
1338
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.DebouncedIdleTask = r.IdleTaskQueue = r.PriorityTaskQueue = void 0;
|
1086
1339
|
const _ = l(114);
|
1087
1340
|
class d {
|
1088
1341
|
constructor() {
|
@@ -1123,16 +1376,16 @@ function ve() {
|
|
1123
1376
|
return { timeRemaining: () => Math.max(0, h - Date.now()) };
|
1124
1377
|
}
|
1125
1378
|
}
|
1126
|
-
|
1379
|
+
r.PriorityTaskQueue = n, r.IdleTaskQueue = !_.isNode && "requestIdleCallback" in window ? class extends d {
|
1127
1380
|
_requestCallback(c) {
|
1128
1381
|
return requestIdleCallback(c);
|
1129
1382
|
}
|
1130
1383
|
_cancelCallback(c) {
|
1131
1384
|
cancelIdleCallback(c);
|
1132
1385
|
}
|
1133
|
-
} : n,
|
1386
|
+
} : n, r.DebouncedIdleTask = class {
|
1134
1387
|
constructor() {
|
1135
|
-
this._queue = new
|
1388
|
+
this._queue = new r.IdleTaskQueue();
|
1136
1389
|
}
|
1137
1390
|
set(c) {
|
1138
1391
|
this._queue.clear(), this._queue.enqueue(c);
|
@@ -1141,15 +1394,15 @@ function ve() {
|
|
1141
1394
|
this._queue.flush();
|
1142
1395
|
}
|
1143
1396
|
};
|
1144
|
-
}, 282: (
|
1145
|
-
Object.defineProperty(
|
1397
|
+
}, 282: (w, r, l) => {
|
1398
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.updateWindowsModeWrappedState = void 0;
|
1146
1399
|
const _ = l(643);
|
1147
|
-
|
1400
|
+
r.updateWindowsModeWrappedState = function(d) {
|
1148
1401
|
const n = d.buffer.lines.get(d.buffer.ybase + d.buffer.y - 1), c = n?.get(d.cols - 1), a = d.buffer.lines.get(d.buffer.ybase + d.buffer.y);
|
1149
1402
|
a && c && (a.isWrapped = c[_.CHAR_DATA_CODE_INDEX] !== _.NULL_CELL_CODE && c[_.CHAR_DATA_CODE_INDEX] !== _.WHITESPACE_CELL_CODE);
|
1150
1403
|
};
|
1151
|
-
}, 734: (
|
1152
|
-
Object.defineProperty(
|
1404
|
+
}, 734: (w, r) => {
|
1405
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.ExtendedAttrs = r.AttributeData = void 0;
|
1153
1406
|
class l {
|
1154
1407
|
constructor() {
|
1155
1408
|
this.fg = 0, this.bg = 0, this.extended = new _();
|
@@ -1280,7 +1533,7 @@ function ve() {
|
|
1280
1533
|
return this.extended.underlineVariantOffset;
|
1281
1534
|
}
|
1282
1535
|
}
|
1283
|
-
|
1536
|
+
r.AttributeData = l;
|
1284
1537
|
class _ {
|
1285
1538
|
get ext() {
|
1286
1539
|
return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
|
@@ -1323,176 +1576,176 @@ function ve() {
|
|
1323
1576
|
return this.underlineStyle === 0 && this._urlId === 0;
|
1324
1577
|
}
|
1325
1578
|
}
|
1326
|
-
|
1327
|
-
}, 92: (
|
1328
|
-
Object.defineProperty(
|
1579
|
+
r.ExtendedAttrs = _;
|
1580
|
+
}, 92: (w, r, l) => {
|
1581
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.Buffer = r.MAX_BUFFER_SIZE = void 0;
|
1329
1582
|
const _ = l(349), d = l(226), n = l(734), c = l(437), a = l(634), h = l(511), u = l(643), e = l(863), s = l(116);
|
1330
|
-
|
1331
|
-
constructor(
|
1332
|
-
this._hasScrollback =
|
1583
|
+
r.MAX_BUFFER_SIZE = 4294967295, r.Buffer = class {
|
1584
|
+
constructor(i, t, f) {
|
1585
|
+
this._hasScrollback = i, this._optionsService = t, this._bufferService = f, this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.tabs = {}, this.savedY = 0, this.savedX = 0, this.savedCurAttrData = c.DEFAULT_ATTR_DATA.clone(), this.savedCharset = s.DEFAULT_CHARSET, this.markers = [], this._nullCell = h.CellData.fromCharData([0, u.NULL_CELL_CHAR, u.NULL_CELL_WIDTH, u.NULL_CELL_CODE]), this._whitespaceCell = h.CellData.fromCharData([0, u.WHITESPACE_CELL_CHAR, u.WHITESPACE_CELL_WIDTH, u.WHITESPACE_CELL_CODE]), this._isClearing = !1, this._memoryCleanupQueue = new d.IdleTaskQueue(), this._memoryCleanupPosition = 0, this._cols = this._bufferService.cols, this._rows = this._bufferService.rows, this.lines = new _.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
|
1333
1586
|
}
|
1334
|
-
getNullCell(
|
1335
|
-
return
|
1587
|
+
getNullCell(i) {
|
1588
|
+
return i ? (this._nullCell.fg = i.fg, this._nullCell.bg = i.bg, this._nullCell.extended = i.extended) : (this._nullCell.fg = 0, this._nullCell.bg = 0, this._nullCell.extended = new n.ExtendedAttrs()), this._nullCell;
|
1336
1589
|
}
|
1337
|
-
getWhitespaceCell(
|
1338
|
-
return
|
1590
|
+
getWhitespaceCell(i) {
|
1591
|
+
return i ? (this._whitespaceCell.fg = i.fg, this._whitespaceCell.bg = i.bg, this._whitespaceCell.extended = i.extended) : (this._whitespaceCell.fg = 0, this._whitespaceCell.bg = 0, this._whitespaceCell.extended = new n.ExtendedAttrs()), this._whitespaceCell;
|
1339
1592
|
}
|
1340
|
-
getBlankLine(
|
1341
|
-
return new c.BufferLine(this._bufferService.cols, this.getNullCell(
|
1593
|
+
getBlankLine(i, t) {
|
1594
|
+
return new c.BufferLine(this._bufferService.cols, this.getNullCell(i), t);
|
1342
1595
|
}
|
1343
1596
|
get hasScrollback() {
|
1344
1597
|
return this._hasScrollback && this.lines.maxLength > this._rows;
|
1345
1598
|
}
|
1346
1599
|
get isCursorInViewport() {
|
1347
|
-
const
|
1348
|
-
return
|
1600
|
+
const i = this.ybase + this.y - this.ydisp;
|
1601
|
+
return i >= 0 && i < this._rows;
|
1349
1602
|
}
|
1350
|
-
_getCorrectBufferLength(
|
1351
|
-
if (!this._hasScrollback) return
|
1352
|
-
const t =
|
1353
|
-
return t >
|
1603
|
+
_getCorrectBufferLength(i) {
|
1604
|
+
if (!this._hasScrollback) return i;
|
1605
|
+
const t = i + this._optionsService.rawOptions.scrollback;
|
1606
|
+
return t > r.MAX_BUFFER_SIZE ? r.MAX_BUFFER_SIZE : t;
|
1354
1607
|
}
|
1355
|
-
fillViewportRows(
|
1608
|
+
fillViewportRows(i) {
|
1356
1609
|
if (this.lines.length === 0) {
|
1357
|
-
|
1610
|
+
i === void 0 && (i = c.DEFAULT_ATTR_DATA);
|
1358
1611
|
let t = this._rows;
|
1359
|
-
for (; t--; ) this.lines.push(this.getBlankLine(
|
1612
|
+
for (; t--; ) this.lines.push(this.getBlankLine(i));
|
1360
1613
|
}
|
1361
1614
|
}
|
1362
1615
|
clear() {
|
1363
1616
|
this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.lines = new _.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
|
1364
1617
|
}
|
1365
|
-
resize(
|
1618
|
+
resize(i, t) {
|
1366
1619
|
const f = this.getNullCell(c.DEFAULT_ATTR_DATA);
|
1367
1620
|
let p = 0;
|
1368
|
-
const
|
1369
|
-
if (
|
1370
|
-
if (this._cols <
|
1621
|
+
const S = this._getCorrectBufferLength(t);
|
1622
|
+
if (S > this.lines.maxLength && (this.lines.maxLength = S), this.lines.length > 0) {
|
1623
|
+
if (this._cols < i) for (let C = 0; C < this.lines.length; C++) p += +this.lines.get(C).resize(i, f);
|
1371
1624
|
let y = 0;
|
1372
|
-
if (this._rows < t) for (let C = this._rows; C < t; C++) this.lines.length < t + this.ybase && (this._optionsService.rawOptions.windowsMode || this._optionsService.rawOptions.windowsPty.backend !== void 0 || this._optionsService.rawOptions.windowsPty.buildNumber !== void 0 ? this.lines.push(new c.BufferLine(
|
1625
|
+
if (this._rows < t) for (let C = this._rows; C < t; C++) this.lines.length < t + this.ybase && (this._optionsService.rawOptions.windowsMode || this._optionsService.rawOptions.windowsPty.backend !== void 0 || this._optionsService.rawOptions.windowsPty.buildNumber !== void 0 ? this.lines.push(new c.BufferLine(i, f)) : this.ybase > 0 && this.lines.length <= this.ybase + this.y + y + 1 ? (this.ybase--, y++, this.ydisp > 0 && this.ydisp--) : this.lines.push(new c.BufferLine(i, f)));
|
1373
1626
|
else for (let C = this._rows; C > t; C--) this.lines.length > t + this.ybase && (this.lines.length > this.ybase + this.y + 1 ? this.lines.pop() : (this.ybase++, this.ydisp++));
|
1374
|
-
if (
|
1375
|
-
const C = this.lines.length -
|
1376
|
-
C > 0 && (this.lines.trimStart(C), this.ybase = Math.max(this.ybase - C, 0), this.ydisp = Math.max(this.ydisp - C, 0), this.savedY = Math.max(this.savedY - C, 0)), this.lines.maxLength =
|
1627
|
+
if (S < this.lines.maxLength) {
|
1628
|
+
const C = this.lines.length - S;
|
1629
|
+
C > 0 && (this.lines.trimStart(C), this.ybase = Math.max(this.ybase - C, 0), this.ydisp = Math.max(this.ydisp - C, 0), this.savedY = Math.max(this.savedY - C, 0)), this.lines.maxLength = S;
|
1377
1630
|
}
|
1378
|
-
this.x = Math.min(this.x,
|
1631
|
+
this.x = Math.min(this.x, i - 1), this.y = Math.min(this.y, t - 1), y && (this.y += y), this.savedX = Math.min(this.savedX, i - 1), this.scrollTop = 0;
|
1379
1632
|
}
|
1380
|
-
if (this.scrollBottom = t - 1, this._isReflowEnabled && (this._reflow(
|
1381
|
-
this._cols =
|
1633
|
+
if (this.scrollBottom = t - 1, this._isReflowEnabled && (this._reflow(i, t), this._cols > i)) for (let y = 0; y < this.lines.length; y++) p += +this.lines.get(y).resize(i, f);
|
1634
|
+
this._cols = i, this._rows = t, this._memoryCleanupQueue.clear(), p > 0.1 * this.lines.length && (this._memoryCleanupPosition = 0, this._memoryCleanupQueue.enqueue(() => this._batchedMemoryCleanup()));
|
1382
1635
|
}
|
1383
1636
|
_batchedMemoryCleanup() {
|
1384
|
-
let
|
1385
|
-
this._memoryCleanupPosition >= this.lines.length && (this._memoryCleanupPosition = 0,
|
1637
|
+
let i = !0;
|
1638
|
+
this._memoryCleanupPosition >= this.lines.length && (this._memoryCleanupPosition = 0, i = !1);
|
1386
1639
|
let t = 0;
|
1387
1640
|
for (; this._memoryCleanupPosition < this.lines.length; ) if (t += this.lines.get(this._memoryCleanupPosition++).cleanupMemory(), t > 100) return !0;
|
1388
|
-
return
|
1641
|
+
return i;
|
1389
1642
|
}
|
1390
1643
|
get _isReflowEnabled() {
|
1391
|
-
const
|
1392
|
-
return
|
1644
|
+
const i = this._optionsService.rawOptions.windowsPty;
|
1645
|
+
return i && i.buildNumber ? this._hasScrollback && i.backend === "conpty" && i.buildNumber >= 21376 : this._hasScrollback && !this._optionsService.rawOptions.windowsMode;
|
1393
1646
|
}
|
1394
|
-
_reflow(
|
1395
|
-
this._cols !==
|
1647
|
+
_reflow(i, t) {
|
1648
|
+
this._cols !== i && (i > this._cols ? this._reflowLarger(i, t) : this._reflowSmaller(i, t));
|
1396
1649
|
}
|
1397
|
-
_reflowLarger(
|
1398
|
-
const f = (0, a.reflowLargerGetLinesToRemove)(this.lines, this._cols,
|
1650
|
+
_reflowLarger(i, t) {
|
1651
|
+
const f = (0, a.reflowLargerGetLinesToRemove)(this.lines, this._cols, i, this.ybase + this.y, this.getNullCell(c.DEFAULT_ATTR_DATA));
|
1399
1652
|
if (f.length > 0) {
|
1400
1653
|
const p = (0, a.reflowLargerCreateNewLayout)(this.lines, f);
|
1401
|
-
(0, a.reflowLargerApplyNewLayout)(this.lines, p.layout), this._reflowLargerAdjustViewport(
|
1654
|
+
(0, a.reflowLargerApplyNewLayout)(this.lines, p.layout), this._reflowLargerAdjustViewport(i, t, p.countRemoved);
|
1402
1655
|
}
|
1403
1656
|
}
|
1404
|
-
_reflowLargerAdjustViewport(
|
1657
|
+
_reflowLargerAdjustViewport(i, t, f) {
|
1405
1658
|
const p = this.getNullCell(c.DEFAULT_ATTR_DATA);
|
1406
|
-
let
|
1407
|
-
for (;
|
1659
|
+
let S = f;
|
1660
|
+
for (; S-- > 0; ) this.ybase === 0 ? (this.y > 0 && this.y--, this.lines.length < t && this.lines.push(new c.BufferLine(i, p))) : (this.ydisp === this.ybase && this.ydisp--, this.ybase--);
|
1408
1661
|
this.savedY = Math.max(this.savedY - f, 0);
|
1409
1662
|
}
|
1410
|
-
_reflowSmaller(
|
1663
|
+
_reflowSmaller(i, t) {
|
1411
1664
|
const f = this.getNullCell(c.DEFAULT_ATTR_DATA), p = [];
|
1412
|
-
let
|
1665
|
+
let S = 0;
|
1413
1666
|
for (let y = this.lines.length - 1; y >= 0; y--) {
|
1414
1667
|
let C = this.lines.get(y);
|
1415
|
-
if (!C || !C.isWrapped && C.getTrimmedLength() <=
|
1668
|
+
if (!C || !C.isWrapped && C.getTrimmedLength() <= i) continue;
|
1416
1669
|
const T = [C];
|
1417
1670
|
for (; C.isWrapped && y > 0; ) C = this.lines.get(--y), T.unshift(C);
|
1418
|
-
const
|
1419
|
-
if (
|
1420
|
-
const E = T[T.length - 1].getTrimmedLength(),
|
1421
|
-
let
|
1422
|
-
|
1423
|
-
const
|
1424
|
-
for (let g = 0; g <
|
1425
|
-
const
|
1426
|
-
|
1671
|
+
const j = this.ybase + this.y;
|
1672
|
+
if (j >= y && j < y + T.length) continue;
|
1673
|
+
const E = T[T.length - 1].getTrimmedLength(), B = (0, a.reflowSmallerGetNewLineLengths)(T, this._cols, i), k = B.length - T.length;
|
1674
|
+
let G;
|
1675
|
+
G = this.ybase === 0 && this.y !== this.lines.length - 1 ? Math.max(0, this.y - this.lines.maxLength + k) : Math.max(0, this.lines.length - this.lines.maxLength + k);
|
1676
|
+
const V = [];
|
1677
|
+
for (let g = 0; g < k; g++) {
|
1678
|
+
const b = this.getBlankLine(c.DEFAULT_ATTR_DATA, !0);
|
1679
|
+
V.push(b);
|
1427
1680
|
}
|
1428
|
-
|
1429
|
-
let
|
1430
|
-
|
1431
|
-
let
|
1432
|
-
for (;
|
1433
|
-
const g = Math.min(o,
|
1434
|
-
if (T[
|
1435
|
-
if (T[
|
1436
|
-
|
1437
|
-
const
|
1438
|
-
o = (0, a.getWrappedLineTrimmedLength)(T,
|
1681
|
+
V.length > 0 && (p.push({ start: y + T.length + S, newLines: V }), S += V.length), T.push(...V);
|
1682
|
+
let F = B.length - 1, q = B[F];
|
1683
|
+
q === 0 && (F--, q = B[F]);
|
1684
|
+
let P = T.length - k - 1, o = E;
|
1685
|
+
for (; P >= 0; ) {
|
1686
|
+
const g = Math.min(o, q);
|
1687
|
+
if (T[F] === void 0) break;
|
1688
|
+
if (T[F].copyCellsFrom(T[P], o - g, q - g, g, !0), q -= g, q === 0 && (F--, q = B[F]), o -= g, o === 0) {
|
1689
|
+
P--;
|
1690
|
+
const b = Math.max(P, 0);
|
1691
|
+
o = (0, a.getWrappedLineTrimmedLength)(T, b, this._cols);
|
1439
1692
|
}
|
1440
1693
|
}
|
1441
|
-
for (let g = 0; g < T.length; g++)
|
1442
|
-
let
|
1443
|
-
for (;
|
1444
|
-
this.savedY = Math.min(this.savedY +
|
1694
|
+
for (let g = 0; g < T.length; g++) B[g] < i && T[g].setCell(B[g], f);
|
1695
|
+
let m = k - G;
|
1696
|
+
for (; m-- > 0; ) this.ybase === 0 ? this.y < t - 1 ? (this.y++, this.lines.pop()) : (this.ybase++, this.ydisp++) : this.ybase < Math.min(this.lines.maxLength, this.lines.length + S) - t && (this.ybase === this.ydisp && this.ydisp++, this.ybase++);
|
1697
|
+
this.savedY = Math.min(this.savedY + k, this.ybase + t - 1);
|
1445
1698
|
}
|
1446
1699
|
if (p.length > 0) {
|
1447
1700
|
const y = [], C = [];
|
1448
|
-
for (let
|
1701
|
+
for (let F = 0; F < this.lines.length; F++) C.push(this.lines.get(F));
|
1449
1702
|
const T = this.lines.length;
|
1450
|
-
let
|
1451
|
-
this.lines.length = Math.min(this.lines.maxLength, this.lines.length +
|
1452
|
-
let
|
1453
|
-
for (let
|
1454
|
-
for (let
|
1455
|
-
|
1456
|
-
} else this.lines.set(
|
1457
|
-
let
|
1458
|
-
for (let
|
1459
|
-
const
|
1460
|
-
|
1461
|
-
}
|
1462
|
-
}
|
1463
|
-
translateBufferLineToString(
|
1464
|
-
const
|
1465
|
-
return
|
1466
|
-
}
|
1467
|
-
getWrappedRangeForLine(
|
1468
|
-
let t =
|
1703
|
+
let j = T - 1, E = 0, B = p[E];
|
1704
|
+
this.lines.length = Math.min(this.lines.maxLength, this.lines.length + S);
|
1705
|
+
let k = 0;
|
1706
|
+
for (let F = Math.min(this.lines.maxLength - 1, T + S - 1); F >= 0; F--) if (B && B.start > j + k) {
|
1707
|
+
for (let q = B.newLines.length - 1; q >= 0; q--) this.lines.set(F--, B.newLines[q]);
|
1708
|
+
F++, y.push({ index: j + 1, amount: B.newLines.length }), k += B.newLines.length, B = p[++E];
|
1709
|
+
} else this.lines.set(F, C[j--]);
|
1710
|
+
let G = 0;
|
1711
|
+
for (let F = y.length - 1; F >= 0; F--) y[F].index += G, this.lines.onInsertEmitter.fire(y[F]), G += y[F].amount;
|
1712
|
+
const V = Math.max(0, T + S - this.lines.maxLength);
|
1713
|
+
V > 0 && this.lines.onTrimEmitter.fire(V);
|
1714
|
+
}
|
1715
|
+
}
|
1716
|
+
translateBufferLineToString(i, t, f = 0, p) {
|
1717
|
+
const S = this.lines.get(i);
|
1718
|
+
return S ? S.translateToString(t, f, p) : "";
|
1719
|
+
}
|
1720
|
+
getWrappedRangeForLine(i) {
|
1721
|
+
let t = i, f = i;
|
1469
1722
|
for (; t > 0 && this.lines.get(t).isWrapped; ) t--;
|
1470
1723
|
for (; f + 1 < this.lines.length && this.lines.get(f + 1).isWrapped; ) f++;
|
1471
1724
|
return { first: t, last: f };
|
1472
1725
|
}
|
1473
|
-
setupTabStops(
|
1474
|
-
for (
|
1726
|
+
setupTabStops(i) {
|
1727
|
+
for (i != null ? this.tabs[i] || (i = this.prevStop(i)) : (this.tabs = {}, i = 0); i < this._cols; i += this._optionsService.rawOptions.tabStopWidth) this.tabs[i] = !0;
|
1475
1728
|
}
|
1476
|
-
prevStop(
|
1477
|
-
for (
|
1478
|
-
return
|
1729
|
+
prevStop(i) {
|
1730
|
+
for (i == null && (i = this.x); !this.tabs[--i] && i > 0; ) ;
|
1731
|
+
return i >= this._cols ? this._cols - 1 : i < 0 ? 0 : i;
|
1479
1732
|
}
|
1480
|
-
nextStop(
|
1481
|
-
for (
|
1482
|
-
return
|
1733
|
+
nextStop(i) {
|
1734
|
+
for (i == null && (i = this.x); !this.tabs[++i] && i < this._cols; ) ;
|
1735
|
+
return i >= this._cols ? this._cols - 1 : i < 0 ? 0 : i;
|
1483
1736
|
}
|
1484
|
-
clearMarkers(
|
1737
|
+
clearMarkers(i) {
|
1485
1738
|
this._isClearing = !0;
|
1486
|
-
for (let t = 0; t < this.markers.length; t++) this.markers[t].line ===
|
1739
|
+
for (let t = 0; t < this.markers.length; t++) this.markers[t].line === i && (this.markers[t].dispose(), this.markers.splice(t--, 1));
|
1487
1740
|
this._isClearing = !1;
|
1488
1741
|
}
|
1489
1742
|
clearAllMarkers() {
|
1490
1743
|
this._isClearing = !0;
|
1491
|
-
for (let
|
1744
|
+
for (let i = 0; i < this.markers.length; i++) this.markers[i].dispose(), this.markers.splice(i--, 1);
|
1492
1745
|
this._isClearing = !1;
|
1493
1746
|
}
|
1494
|
-
addMarker(
|
1495
|
-
const t = new e.Marker(
|
1747
|
+
addMarker(i) {
|
1748
|
+
const t = new e.Marker(i);
|
1496
1749
|
return this.markers.push(t), t.register(this.lines.onTrim((f) => {
|
1497
1750
|
t.line -= f, t.line < 0 && t.dispose();
|
1498
1751
|
})), t.register(this.lines.onInsert((f) => {
|
@@ -1501,25 +1754,25 @@ function ve() {
|
|
1501
1754
|
t.line >= f.index && t.line < f.index + f.amount && t.dispose(), t.line > f.index && (t.line -= f.amount);
|
1502
1755
|
})), t.register(t.onDispose(() => this._removeMarker(t))), t;
|
1503
1756
|
}
|
1504
|
-
_removeMarker(
|
1505
|
-
this._isClearing || this.markers.splice(this.markers.indexOf(
|
1757
|
+
_removeMarker(i) {
|
1758
|
+
this._isClearing || this.markers.splice(this.markers.indexOf(i), 1);
|
1506
1759
|
}
|
1507
1760
|
};
|
1508
|
-
}, 437: (
|
1509
|
-
Object.defineProperty(
|
1761
|
+
}, 437: (w, r, l) => {
|
1762
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferLine = r.DEFAULT_ATTR_DATA = void 0;
|
1510
1763
|
const _ = l(734), d = l(511), n = l(643), c = l(482);
|
1511
|
-
|
1764
|
+
r.DEFAULT_ATTR_DATA = Object.freeze(new _.AttributeData());
|
1512
1765
|
let a = 0;
|
1513
1766
|
class h {
|
1514
|
-
constructor(e, s,
|
1515
|
-
this.isWrapped =
|
1767
|
+
constructor(e, s, i = !1) {
|
1768
|
+
this.isWrapped = i, this._combined = {}, this._extendedAttrs = {}, this._data = new Uint32Array(3 * e);
|
1516
1769
|
const t = s || d.CellData.fromCharData([0, n.NULL_CELL_CHAR, n.NULL_CELL_WIDTH, n.NULL_CELL_CODE]);
|
1517
1770
|
for (let f = 0; f < e; ++f) this.setCell(f, t);
|
1518
1771
|
this.length = e;
|
1519
1772
|
}
|
1520
1773
|
get(e) {
|
1521
|
-
const s = this._data[3 * e + 0],
|
1522
|
-
return [this._data[3 * e + 1], 2097152 & s ? this._combined[e] :
|
1774
|
+
const s = this._data[3 * e + 0], i = 2097151 & s;
|
1775
|
+
return [this._data[3 * e + 1], 2097152 & s ? this._combined[e] : i ? (0, c.stringFromCodePoint)(i) : "", s >> 22, 2097152 & s ? this._combined[e].charCodeAt(this._combined[e].length - 1) : i];
|
1523
1776
|
}
|
1524
1777
|
set(e, s) {
|
1525
1778
|
this._data[3 * e + 1] = s[n.CHAR_DATA_ATTR_INDEX], s[n.CHAR_DATA_CHAR_INDEX].length > 1 ? (this._combined[e] = s[1], this._data[3 * e + 0] = 2097152 | e | s[n.CHAR_DATA_WIDTH_INDEX] << 22) : this._data[3 * e + 0] = s[n.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | s[n.CHAR_DATA_WIDTH_INDEX] << 22;
|
@@ -1559,57 +1812,57 @@ function ve() {
|
|
1559
1812
|
setCell(e, s) {
|
1560
1813
|
2097152 & s.content && (this._combined[e] = s.combinedData), 268435456 & s.bg && (this._extendedAttrs[e] = s.extended), this._data[3 * e + 0] = s.content, this._data[3 * e + 1] = s.fg, this._data[3 * e + 2] = s.bg;
|
1561
1814
|
}
|
1562
|
-
setCellFromCodepoint(e, s,
|
1563
|
-
268435456 & t.bg && (this._extendedAttrs[e] = t.extended), this._data[3 * e + 0] = s |
|
1815
|
+
setCellFromCodepoint(e, s, i, t) {
|
1816
|
+
268435456 & t.bg && (this._extendedAttrs[e] = t.extended), this._data[3 * e + 0] = s | i << 22, this._data[3 * e + 1] = t.fg, this._data[3 * e + 2] = t.bg;
|
1564
1817
|
}
|
1565
|
-
addCodepointToCell(e, s,
|
1818
|
+
addCodepointToCell(e, s, i) {
|
1566
1819
|
let t = this._data[3 * e + 0];
|
1567
|
-
2097152 & t ? this._combined[e] += (0, c.stringFromCodePoint)(s) : 2097151 & t ? (this._combined[e] = (0, c.stringFromCodePoint)(2097151 & t) + (0, c.stringFromCodePoint)(s), t &= -2097152, t |= 2097152) : t = s | 4194304,
|
1820
|
+
2097152 & t ? this._combined[e] += (0, c.stringFromCodePoint)(s) : 2097151 & t ? (this._combined[e] = (0, c.stringFromCodePoint)(2097151 & t) + (0, c.stringFromCodePoint)(s), t &= -2097152, t |= 2097152) : t = s | 4194304, i && (t &= -12582913, t |= i << 22), this._data[3 * e + 0] = t;
|
1568
1821
|
}
|
1569
|
-
insertCells(e, s,
|
1570
|
-
if ((e %= this.length) && this.getWidth(e - 1) === 2 && this.setCellFromCodepoint(e - 1, 0, 1,
|
1822
|
+
insertCells(e, s, i) {
|
1823
|
+
if ((e %= this.length) && this.getWidth(e - 1) === 2 && this.setCellFromCodepoint(e - 1, 0, 1, i), s < this.length - e) {
|
1571
1824
|
const t = new d.CellData();
|
1572
1825
|
for (let f = this.length - e - s - 1; f >= 0; --f) this.setCell(e + s + f, this.loadCell(e + f, t));
|
1573
|
-
for (let f = 0; f < s; ++f) this.setCell(e + f,
|
1574
|
-
} else for (let t = e; t < this.length; ++t) this.setCell(t,
|
1575
|
-
this.getWidth(this.length - 1) === 2 && this.setCellFromCodepoint(this.length - 1, 0, 1,
|
1826
|
+
for (let f = 0; f < s; ++f) this.setCell(e + f, i);
|
1827
|
+
} else for (let t = e; t < this.length; ++t) this.setCell(t, i);
|
1828
|
+
this.getWidth(this.length - 1) === 2 && this.setCellFromCodepoint(this.length - 1, 0, 1, i);
|
1576
1829
|
}
|
1577
|
-
deleteCells(e, s,
|
1830
|
+
deleteCells(e, s, i) {
|
1578
1831
|
if (e %= this.length, s < this.length - e) {
|
1579
1832
|
const t = new d.CellData();
|
1580
1833
|
for (let f = 0; f < this.length - e - s; ++f) this.setCell(e + f, this.loadCell(e + s + f, t));
|
1581
|
-
for (let f = this.length - s; f < this.length; ++f) this.setCell(f,
|
1582
|
-
} else for (let t = e; t < this.length; ++t) this.setCell(t,
|
1583
|
-
e && this.getWidth(e - 1) === 2 && this.setCellFromCodepoint(e - 1, 0, 1,
|
1834
|
+
for (let f = this.length - s; f < this.length; ++f) this.setCell(f, i);
|
1835
|
+
} else for (let t = e; t < this.length; ++t) this.setCell(t, i);
|
1836
|
+
e && this.getWidth(e - 1) === 2 && this.setCellFromCodepoint(e - 1, 0, 1, i), this.getWidth(e) !== 0 || this.hasContent(e) || this.setCellFromCodepoint(e, 0, 1, i);
|
1584
1837
|
}
|
1585
|
-
replaceCells(e, s,
|
1586
|
-
if (t) for (e && this.getWidth(e - 1) === 2 && !this.isProtected(e - 1) && this.setCellFromCodepoint(e - 1, 0, 1,
|
1587
|
-
else for (e && this.getWidth(e - 1) === 2 && this.setCellFromCodepoint(e - 1, 0, 1,
|
1838
|
+
replaceCells(e, s, i, t = !1) {
|
1839
|
+
if (t) for (e && this.getWidth(e - 1) === 2 && !this.isProtected(e - 1) && this.setCellFromCodepoint(e - 1, 0, 1, i), s < this.length && this.getWidth(s - 1) === 2 && !this.isProtected(s) && this.setCellFromCodepoint(s, 0, 1, i); e < s && e < this.length; ) this.isProtected(e) || this.setCell(e, i), e++;
|
1840
|
+
else for (e && this.getWidth(e - 1) === 2 && this.setCellFromCodepoint(e - 1, 0, 1, i), s < this.length && this.getWidth(s - 1) === 2 && this.setCellFromCodepoint(s, 0, 1, i); e < s && e < this.length; ) this.setCell(e++, i);
|
1588
1841
|
}
|
1589
1842
|
resize(e, s) {
|
1590
1843
|
if (e === this.length) return 4 * this._data.length * 2 < this._data.buffer.byteLength;
|
1591
|
-
const
|
1844
|
+
const i = 3 * e;
|
1592
1845
|
if (e > this.length) {
|
1593
|
-
if (this._data.buffer.byteLength >= 4 *
|
1846
|
+
if (this._data.buffer.byteLength >= 4 * i) this._data = new Uint32Array(this._data.buffer, 0, i);
|
1594
1847
|
else {
|
1595
|
-
const t = new Uint32Array(
|
1848
|
+
const t = new Uint32Array(i);
|
1596
1849
|
t.set(this._data), this._data = t;
|
1597
1850
|
}
|
1598
1851
|
for (let t = this.length; t < e; ++t) this.setCell(t, s);
|
1599
1852
|
} else {
|
1600
|
-
this._data = this._data.subarray(0,
|
1853
|
+
this._data = this._data.subarray(0, i);
|
1601
1854
|
const t = Object.keys(this._combined);
|
1602
1855
|
for (let p = 0; p < t.length; p++) {
|
1603
|
-
const
|
1604
|
-
|
1856
|
+
const S = parseInt(t[p], 10);
|
1857
|
+
S >= e && delete this._combined[S];
|
1605
1858
|
}
|
1606
1859
|
const f = Object.keys(this._extendedAttrs);
|
1607
1860
|
for (let p = 0; p < f.length; p++) {
|
1608
|
-
const
|
1609
|
-
|
1861
|
+
const S = parseInt(f[p], 10);
|
1862
|
+
S >= e && delete this._extendedAttrs[S];
|
1610
1863
|
}
|
1611
1864
|
}
|
1612
|
-
return this.length = e, 4 *
|
1865
|
+
return this.length = e, 4 * i * 2 < this._data.buffer.byteLength;
|
1613
1866
|
}
|
1614
1867
|
cleanupMemory() {
|
1615
1868
|
if (4 * this._data.length * 2 < this._data.buffer.byteLength) {
|
@@ -1619,10 +1872,10 @@ function ve() {
|
|
1619
1872
|
return 0;
|
1620
1873
|
}
|
1621
1874
|
fill(e, s = !1) {
|
1622
|
-
if (s) for (let
|
1875
|
+
if (s) for (let i = 0; i < this.length; ++i) this.isProtected(i) || this.setCell(i, e);
|
1623
1876
|
else {
|
1624
1877
|
this._combined = {}, this._extendedAttrs = {};
|
1625
|
-
for (let
|
1878
|
+
for (let i = 0; i < this.length; ++i) this.setCell(i, e);
|
1626
1879
|
}
|
1627
1880
|
}
|
1628
1881
|
copyFrom(e) {
|
@@ -1647,63 +1900,63 @@ function ve() {
|
|
1647
1900
|
for (let e = this.length - 1; e >= 0; --e) if (4194303 & this._data[3 * e + 0] || 50331648 & this._data[3 * e + 2]) return e + (this._data[3 * e + 0] >> 22);
|
1648
1901
|
return 0;
|
1649
1902
|
}
|
1650
|
-
copyCellsFrom(e, s,
|
1903
|
+
copyCellsFrom(e, s, i, t, f) {
|
1651
1904
|
const p = e._data;
|
1652
1905
|
if (f) for (let y = t - 1; y >= 0; y--) {
|
1653
|
-
for (let C = 0; C < 3; C++) this._data[3 * (
|
1654
|
-
268435456 & p[3 * (s + y) + 2] && (this._extendedAttrs[
|
1906
|
+
for (let C = 0; C < 3; C++) this._data[3 * (i + y) + C] = p[3 * (s + y) + C];
|
1907
|
+
268435456 & p[3 * (s + y) + 2] && (this._extendedAttrs[i + y] = e._extendedAttrs[s + y]);
|
1655
1908
|
}
|
1656
1909
|
else for (let y = 0; y < t; y++) {
|
1657
|
-
for (let C = 0; C < 3; C++) this._data[3 * (
|
1658
|
-
268435456 & p[3 * (s + y) + 2] && (this._extendedAttrs[
|
1910
|
+
for (let C = 0; C < 3; C++) this._data[3 * (i + y) + C] = p[3 * (s + y) + C];
|
1911
|
+
268435456 & p[3 * (s + y) + 2] && (this._extendedAttrs[i + y] = e._extendedAttrs[s + y]);
|
1659
1912
|
}
|
1660
|
-
const
|
1661
|
-
for (let y = 0; y <
|
1662
|
-
const C = parseInt(
|
1663
|
-
C >= s && (this._combined[C - s +
|
1913
|
+
const S = Object.keys(e._combined);
|
1914
|
+
for (let y = 0; y < S.length; y++) {
|
1915
|
+
const C = parseInt(S[y], 10);
|
1916
|
+
C >= s && (this._combined[C - s + i] = e._combined[C]);
|
1664
1917
|
}
|
1665
1918
|
}
|
1666
|
-
translateToString(e, s,
|
1667
|
-
s = s ?? 0,
|
1919
|
+
translateToString(e, s, i, t) {
|
1920
|
+
s = s ?? 0, i = i ?? this.length, e && (i = Math.min(i, this.getTrimmedLength())), t && (t.length = 0);
|
1668
1921
|
let f = "";
|
1669
|
-
for (; s <
|
1670
|
-
const p = this._data[3 * s + 0],
|
1922
|
+
for (; s < i; ) {
|
1923
|
+
const p = this._data[3 * s + 0], S = 2097151 & p, y = 2097152 & p ? this._combined[s] : S ? (0, c.stringFromCodePoint)(S) : n.WHITESPACE_CELL_CHAR;
|
1671
1924
|
if (f += y, t) for (let C = 0; C < y.length; ++C) t.push(s);
|
1672
1925
|
s += p >> 22 || 1;
|
1673
1926
|
}
|
1674
1927
|
return t && t.push(s), f;
|
1675
1928
|
}
|
1676
1929
|
}
|
1677
|
-
|
1678
|
-
}, 634: (
|
1930
|
+
r.BufferLine = h;
|
1931
|
+
}, 634: (w, r) => {
|
1679
1932
|
function l(_, d, n) {
|
1680
1933
|
if (d === _.length - 1) return _[d].getTrimmedLength();
|
1681
1934
|
const c = !_[d].hasContent(n - 1) && _[d].getWidth(n - 1) === 1, a = _[d + 1].getWidth(0) === 2;
|
1682
1935
|
return c && a ? n - 1 : n;
|
1683
1936
|
}
|
1684
|
-
Object.defineProperty(
|
1937
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.getWrappedLineTrimmedLength = r.reflowSmallerGetNewLineLengths = r.reflowLargerApplyNewLayout = r.reflowLargerCreateNewLayout = r.reflowLargerGetLinesToRemove = void 0, r.reflowLargerGetLinesToRemove = function(_, d, n, c, a) {
|
1685
1938
|
const h = [];
|
1686
1939
|
for (let u = 0; u < _.length - 1; u++) {
|
1687
1940
|
let e = u, s = _.get(++e);
|
1688
1941
|
if (!s.isWrapped) continue;
|
1689
|
-
const
|
1690
|
-
for (; e < _.length && s.isWrapped; )
|
1942
|
+
const i = [_.get(u)];
|
1943
|
+
for (; e < _.length && s.isWrapped; ) i.push(s), s = _.get(++e);
|
1691
1944
|
if (c >= u && c < e) {
|
1692
|
-
u +=
|
1945
|
+
u += i.length - 1;
|
1693
1946
|
continue;
|
1694
1947
|
}
|
1695
|
-
let t = 0, f = l(
|
1696
|
-
for (; p <
|
1697
|
-
const C = l(
|
1698
|
-
|
1948
|
+
let t = 0, f = l(i, t, d), p = 1, S = 0;
|
1949
|
+
for (; p < i.length; ) {
|
1950
|
+
const C = l(i, p, d), T = C - S, j = n - f, E = Math.min(T, j);
|
1951
|
+
i[t].copyCellsFrom(i[p], S, f, E, !1), f += E, f === n && (t++, f = 0), S += E, S === C && (p++, S = 0), f === 0 && t !== 0 && i[t - 1].getWidth(n - 1) === 2 && (i[t].copyCellsFrom(i[t - 1], n - 1, f++, 1, !1), i[t - 1].setCell(n - 1, a));
|
1699
1952
|
}
|
1700
|
-
|
1953
|
+
i[t].replaceCells(f, n, a);
|
1701
1954
|
let y = 0;
|
1702
|
-
for (let C =
|
1703
|
-
y > 0 && (h.push(u +
|
1955
|
+
for (let C = i.length - 1; C > 0 && (C > t || i[C].getTrimmedLength() === 0); C--) y++;
|
1956
|
+
y > 0 && (h.push(u + i.length - y), h.push(y)), u += i.length - 1;
|
1704
1957
|
}
|
1705
1958
|
return h;
|
1706
|
-
},
|
1959
|
+
}, r.reflowLargerCreateNewLayout = function(_, d) {
|
1707
1960
|
const n = [];
|
1708
1961
|
let c = 0, a = d[c], h = 0;
|
1709
1962
|
for (let u = 0; u < _.length; u++) if (a === u) {
|
@@ -1711,13 +1964,13 @@ function ve() {
|
|
1711
1964
|
_.onDeleteEmitter.fire({ index: u - h, amount: e }), u += e - 1, h += e, a = d[++c];
|
1712
1965
|
} else n.push(u);
|
1713
1966
|
return { layout: n, countRemoved: h };
|
1714
|
-
},
|
1967
|
+
}, r.reflowLargerApplyNewLayout = function(_, d) {
|
1715
1968
|
const n = [];
|
1716
1969
|
for (let c = 0; c < d.length; c++) n.push(_.get(d[c]));
|
1717
1970
|
for (let c = 0; c < n.length; c++) _.set(c, n[c]);
|
1718
1971
|
_.length = d.length;
|
1719
|
-
},
|
1720
|
-
const c = [], a = _.map((s,
|
1972
|
+
}, r.reflowSmallerGetNewLineLengths = function(_, d, n) {
|
1973
|
+
const c = [], a = _.map((s, i) => l(_, i, d)).reduce((s, i) => s + i);
|
1721
1974
|
let h = 0, u = 0, e = 0;
|
1722
1975
|
for (; e < a; ) {
|
1723
1976
|
if (a - e < n) {
|
@@ -1727,15 +1980,15 @@ function ve() {
|
|
1727
1980
|
h += n;
|
1728
1981
|
const s = l(_, u, d);
|
1729
1982
|
h > s && (h -= s, u++);
|
1730
|
-
const
|
1731
|
-
|
1732
|
-
const t =
|
1983
|
+
const i = _[u].getWidth(h - 1) === 2;
|
1984
|
+
i && h--;
|
1985
|
+
const t = i ? n - 1 : n;
|
1733
1986
|
c.push(t), e += t;
|
1734
1987
|
}
|
1735
1988
|
return c;
|
1736
|
-
},
|
1737
|
-
}, 295: (
|
1738
|
-
Object.defineProperty(
|
1989
|
+
}, r.getWrappedLineTrimmedLength = l;
|
1990
|
+
}, 295: (w, r, l) => {
|
1991
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferSet = void 0;
|
1739
1992
|
const _ = l(460), d = l(844), n = l(92);
|
1740
1993
|
class c extends d.Disposable {
|
1741
1994
|
constructor(h, u) {
|
@@ -1766,9 +2019,9 @@ function ve() {
|
|
1766
2019
|
this._normal.setupTabStops(h), this._alt.setupTabStops(h);
|
1767
2020
|
}
|
1768
2021
|
}
|
1769
|
-
|
1770
|
-
}, 511: (
|
1771
|
-
Object.defineProperty(
|
2022
|
+
r.BufferSet = c;
|
2023
|
+
}, 511: (w, r, l) => {
|
2024
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.CellData = void 0;
|
1772
2025
|
const _ = l(482), d = l(643), n = l(734);
|
1773
2026
|
class c extends n.AttributeData {
|
1774
2027
|
constructor() {
|
@@ -1807,11 +2060,11 @@ function ve() {
|
|
1807
2060
|
return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
|
1808
2061
|
}
|
1809
2062
|
}
|
1810
|
-
|
1811
|
-
}, 643: (
|
1812
|
-
Object.defineProperty(
|
1813
|
-
}, 863: (
|
1814
|
-
Object.defineProperty(
|
2063
|
+
r.CellData = c;
|
2064
|
+
}, 643: (w, r) => {
|
2065
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.WHITESPACE_CELL_CODE = r.WHITESPACE_CELL_WIDTH = r.WHITESPACE_CELL_CHAR = r.NULL_CELL_CODE = r.NULL_CELL_WIDTH = r.NULL_CELL_CHAR = r.CHAR_DATA_CODE_INDEX = r.CHAR_DATA_WIDTH_INDEX = r.CHAR_DATA_CHAR_INDEX = r.CHAR_DATA_ATTR_INDEX = r.DEFAULT_EXT = r.DEFAULT_ATTR = r.DEFAULT_COLOR = void 0, r.DEFAULT_COLOR = 0, r.DEFAULT_ATTR = 256 | r.DEFAULT_COLOR << 9, r.DEFAULT_EXT = 0, r.CHAR_DATA_ATTR_INDEX = 0, r.CHAR_DATA_CHAR_INDEX = 1, r.CHAR_DATA_WIDTH_INDEX = 2, r.CHAR_DATA_CODE_INDEX = 3, r.NULL_CELL_CHAR = "", r.NULL_CELL_WIDTH = 1, r.NULL_CELL_CODE = 0, r.WHITESPACE_CELL_CHAR = " ", r.WHITESPACE_CELL_WIDTH = 1, r.WHITESPACE_CELL_CODE = 32;
|
2066
|
+
}, 863: (w, r, l) => {
|
2067
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.Marker = void 0;
|
1815
2068
|
const _ = l(460), d = l(844);
|
1816
2069
|
class n {
|
1817
2070
|
get id() {
|
@@ -1827,30 +2080,30 @@ function ve() {
|
|
1827
2080
|
return this._disposables.push(a), a;
|
1828
2081
|
}
|
1829
2082
|
}
|
1830
|
-
|
1831
|
-
}, 116: (
|
1832
|
-
Object.defineProperty(
|
1833
|
-
}, 584: (
|
2083
|
+
r.Marker = n, n._nextId = 1;
|
2084
|
+
}, 116: (w, r) => {
|
2085
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.DEFAULT_CHARSET = r.CHARSETS = void 0, r.CHARSETS = {}, r.DEFAULT_CHARSET = r.CHARSETS.B, r.CHARSETS[0] = { "`": "◆", a: "▒", b: "␉", c: "␌", d: "␍", e: "␊", f: "°", g: "±", h: "", i: "␋", j: "┘", k: "┐", l: "┌", m: "└", n: "┼", o: "⎺", p: "⎻", q: "─", r: "⎼", s: "⎽", t: "├", u: "┤", v: "┴", w: "┬", x: "│", y: "≤", z: "≥", "{": "π", "|": "≠", "}": "£", "~": "·" }, r.CHARSETS.A = { "#": "£" }, r.CHARSETS.B = void 0, r.CHARSETS[4] = { "#": "£", "@": "¾", "[": "ij", "\\": "½", "]": "|", "{": "¨", "|": "f", "}": "¼", "~": "´" }, r.CHARSETS.C = r.CHARSETS[5] = { "[": "Ä", "\\": "Ö", "]": "Å", "^": "Ü", "`": "é", "{": "ä", "|": "ö", "}": "å", "~": "ü" }, r.CHARSETS.R = { "#": "£", "@": "à", "[": "°", "\\": "ç", "]": "§", "{": "é", "|": "ù", "}": "è", "~": "¨" }, r.CHARSETS.Q = { "@": "à", "[": "â", "\\": "ç", "]": "ê", "^": "î", "`": "ô", "{": "é", "|": "ù", "}": "è", "~": "û" }, r.CHARSETS.K = { "@": "§", "[": "Ä", "\\": "Ö", "]": "Ü", "{": "ä", "|": "ö", "}": "ü", "~": "ß" }, r.CHARSETS.Y = { "#": "£", "@": "§", "[": "°", "\\": "ç", "]": "é", "`": "ù", "{": "à", "|": "ò", "}": "è", "~": "ì" }, r.CHARSETS.E = r.CHARSETS[6] = { "@": "Ä", "[": "Æ", "\\": "Ø", "]": "Å", "^": "Ü", "`": "ä", "{": "æ", "|": "ø", "}": "å", "~": "ü" }, r.CHARSETS.Z = { "#": "£", "@": "§", "[": "¡", "\\": "Ñ", "]": "¿", "{": "°", "|": "ñ", "}": "ç" }, r.CHARSETS.H = r.CHARSETS[7] = { "@": "É", "[": "Ä", "\\": "Ö", "]": "Å", "^": "Ü", "`": "é", "{": "ä", "|": "ö", "}": "å", "~": "ü" }, r.CHARSETS["="] = { "#": "ù", "@": "à", "[": "é", "\\": "ç", "]": "ê", "^": "î", _: "è", "`": "ô", "{": "ä", "|": "ö", "}": "ü", "~": "û" };
|
2086
|
+
}, 584: (w, r) => {
|
1834
2087
|
var l, _, d;
|
1835
|
-
Object.defineProperty(
|
2088
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.C1_ESCAPED = r.C1 = r.C0 = void 0, function(n) {
|
1836
2089
|
n.NUL = "\0", n.SOH = "", n.STX = "", n.ETX = "", n.EOT = "", n.ENQ = "", n.ACK = "", n.BEL = "\x07", n.BS = "\b", n.HT = " ", n.LF = `
|
1837
2090
|
`, n.VT = "\v", n.FF = "\f", n.CR = "\r", n.SO = "", n.SI = "", n.DLE = "", n.DC1 = "", n.DC2 = "", n.DC3 = "", n.DC4 = "", n.NAK = "", n.SYN = "", n.ETB = "", n.CAN = "", n.EM = "", n.SUB = "", n.ESC = "\x1B", n.FS = "", n.GS = "", n.RS = "", n.US = "", n.SP = " ", n.DEL = "";
|
1838
|
-
}(l || (
|
2091
|
+
}(l || (r.C0 = l = {})), function(n) {
|
1839
2092
|
n.PAD = "", n.HOP = "", n.BPH = "", n.NBH = "", n.IND = "", n.NEL = "
", n.SSA = "", n.ESA = "", n.HTS = "", n.HTJ = "", n.VTS = "", n.PLD = "", n.PLU = "", n.RI = "", n.SS2 = "", n.SS3 = "", n.DCS = "", n.PU1 = "", n.PU2 = "", n.STS = "", n.CCH = "", n.MW = "", n.SPA = "", n.EPA = "", n.SOS = "", n.SGCI = "", n.SCI = "", n.CSI = "", n.ST = "", n.OSC = "", n.PM = "", n.APC = "";
|
1840
|
-
}(_ || (
|
2093
|
+
}(_ || (r.C1 = _ = {})), function(n) {
|
1841
2094
|
n.ST = `${l.ESC}\\`;
|
1842
|
-
}(d || (
|
1843
|
-
}, 482: (
|
1844
|
-
Object.defineProperty(
|
2095
|
+
}(d || (r.C1_ESCAPED = d = {}));
|
2096
|
+
}, 482: (w, r) => {
|
2097
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.Utf8ToUtf32 = r.StringToUtf32 = r.utf32ToString = r.stringFromCodePoint = void 0, r.stringFromCodePoint = function(l) {
|
1845
2098
|
return l > 65535 ? (l -= 65536, String.fromCharCode(55296 + (l >> 10)) + String.fromCharCode(l % 1024 + 56320)) : String.fromCharCode(l);
|
1846
|
-
},
|
2099
|
+
}, r.utf32ToString = function(l, _ = 0, d = l.length) {
|
1847
2100
|
let n = "";
|
1848
2101
|
for (let c = _; c < d; ++c) {
|
1849
2102
|
let a = l[c];
|
1850
2103
|
a > 65535 ? (a -= 65536, n += String.fromCharCode(55296 + (a >> 10)) + String.fromCharCode(a % 1024 + 56320)) : n += String.fromCharCode(a);
|
1851
2104
|
}
|
1852
2105
|
return n;
|
1853
|
-
},
|
2106
|
+
}, r.StringToUtf32 = class {
|
1854
2107
|
constructor() {
|
1855
2108
|
this._interim = 0;
|
1856
2109
|
}
|
@@ -1875,7 +2128,7 @@ function ve() {
|
|
1875
2128
|
}
|
1876
2129
|
return n;
|
1877
2130
|
}
|
1878
|
-
},
|
2131
|
+
}, r.Utf8ToUtf32 = class {
|
1879
2132
|
constructor() {
|
1880
2133
|
this.interim = new Uint8Array(3);
|
1881
2134
|
}
|
@@ -1889,23 +2142,23 @@ function ve() {
|
|
1889
2142
|
if (this.interim[0]) {
|
1890
2143
|
let f = !1, p = this.interim[0];
|
1891
2144
|
p &= (224 & p) == 192 ? 31 : (240 & p) == 224 ? 15 : 7;
|
1892
|
-
let
|
1893
|
-
for (; (
|
2145
|
+
let S, y = 0;
|
2146
|
+
for (; (S = 63 & this.interim[++y]) && y < 4; ) p <<= 6, p |= S;
|
1894
2147
|
const C = (224 & this.interim[0]) == 192 ? 2 : (240 & this.interim[0]) == 224 ? 3 : 4, T = C - y;
|
1895
2148
|
for (; s < T; ) {
|
1896
2149
|
if (s >= d) return 0;
|
1897
|
-
if (
|
2150
|
+
if (S = l[s++], (192 & S) != 128) {
|
1898
2151
|
s--, f = !0;
|
1899
2152
|
break;
|
1900
2153
|
}
|
1901
|
-
this.interim[y++] =
|
2154
|
+
this.interim[y++] = S, p <<= 6, p |= 63 & S;
|
1902
2155
|
}
|
1903
2156
|
f || (C === 2 ? p < 128 ? s-- : _[u++] = p : C === 3 ? p < 2048 || p >= 55296 && p <= 57343 || p === 65279 || (_[u++] = p) : p < 65536 || p > 1114111 || (_[u++] = p)), this.interim.fill(0);
|
1904
2157
|
}
|
1905
|
-
const
|
2158
|
+
const i = d - 4;
|
1906
2159
|
let t = s;
|
1907
2160
|
for (; t < d; ) {
|
1908
|
-
for (; !(!(t <
|
2161
|
+
for (; !(!(t < i) || 128 & (n = l[t]) || 128 & (c = l[t + 1]) || 128 & (a = l[t + 2]) || 128 & (h = l[t + 3])); ) _[u++] = n, _[u++] = c, _[u++] = a, _[u++] = h, t += 4;
|
1909
2162
|
if (n = l[t++], n < 128) _[u++] = n;
|
1910
2163
|
else if ((224 & n) == 192) {
|
1911
2164
|
if (t >= d) return this.interim[0] = n, u;
|
@@ -1954,11 +2207,11 @@ function ve() {
|
|
1954
2207
|
return u;
|
1955
2208
|
}
|
1956
2209
|
};
|
1957
|
-
}, 225: (
|
1958
|
-
Object.defineProperty(
|
2210
|
+
}, 225: (w, r, l) => {
|
2211
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.UnicodeV6 = void 0;
|
1959
2212
|
const _ = l(480), d = [[768, 879], [1155, 1158], [1160, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1539], [1552, 1557], [1611, 1630], [1648, 1648], [1750, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2305, 2306], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2388], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2672, 2673], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2883], [2893, 2893], [2902, 2902], [2946, 2946], [3008, 3008], [3021, 3021], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3393, 3395], [3405, 3405], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3984, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4146], [4150, 4151], [4153, 4153], [4184, 4185], [4448, 4607], [4959, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7616, 7626], [7678, 7679], [8203, 8207], [8234, 8238], [8288, 8291], [8298, 8303], [8400, 8431], [12330, 12335], [12441, 12442], [43014, 43014], [43019, 43019], [43045, 43046], [64286, 64286], [65024, 65039], [65056, 65059], [65279, 65279], [65529, 65531]], n = [[68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [917505, 917505], [917536, 917631], [917760, 917999]];
|
1960
2213
|
let c;
|
1961
|
-
|
2214
|
+
r.UnicodeV6 = class {
|
1962
2215
|
constructor() {
|
1963
2216
|
if (this.version = "6", !c) {
|
1964
2217
|
c = new Uint8Array(65536), c.fill(1), c[0] = 0, c.fill(0, 1, 32), c.fill(0, 127, 160), c.fill(2, 4352, 4448), c[9001] = 2, c[9002] = 2, c.fill(2, 11904, 42192), c[12351] = 1, c.fill(2, 44032, 55204), c.fill(2, 63744, 64256), c.fill(2, 65040, 65050), c.fill(2, 65072, 65136), c.fill(2, 65280, 65377), c.fill(2, 65504, 65511);
|
@@ -1967,12 +2220,12 @@ function ve() {
|
|
1967
2220
|
}
|
1968
2221
|
wcwidth(a) {
|
1969
2222
|
return a < 32 ? 0 : a < 127 ? 1 : a < 65536 ? c[a] : function(h, u) {
|
1970
|
-
let e, s = 0,
|
1971
|
-
if (h < u[0][0] || h > u[
|
1972
|
-
for (;
|
2223
|
+
let e, s = 0, i = u.length - 1;
|
2224
|
+
if (h < u[0][0] || h > u[i][1]) return !1;
|
2225
|
+
for (; i >= s; ) if (e = s + i >> 1, h > u[e][1]) s = e + 1;
|
1973
2226
|
else {
|
1974
2227
|
if (!(h < u[e][0])) return !0;
|
1975
|
-
|
2228
|
+
i = e - 1;
|
1976
2229
|
}
|
1977
2230
|
return !1;
|
1978
2231
|
}(a, n) ? 0 : a >= 131072 && a <= 196605 || a >= 196608 && a <= 262141 ? 2 : 1;
|
@@ -1986,8 +2239,8 @@ function ve() {
|
|
1986
2239
|
return _.UnicodeService.createPropertyValue(0, u, e);
|
1987
2240
|
}
|
1988
2241
|
};
|
1989
|
-
}, 981: (
|
1990
|
-
Object.defineProperty(
|
2242
|
+
}, 981: (w, r, l) => {
|
2243
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.WriteBuffer = void 0;
|
1991
2244
|
const _ = l(460), d = l(844);
|
1992
2245
|
class n extends d.Disposable {
|
1993
2246
|
constructor(a) {
|
@@ -2025,15 +2278,15 @@ function ve() {
|
|
2025
2278
|
throw f;
|
2026
2279
|
}), Promise.resolve(!1))).then(t);
|
2027
2280
|
}
|
2028
|
-
const
|
2029
|
-
if (
|
2281
|
+
const i = this._callbacks[this._bufferOffset];
|
2282
|
+
if (i && i(), this._bufferOffset++, this._pendingData -= e.length, Date.now() - u >= 12) break;
|
2030
2283
|
}
|
2031
2284
|
this._writeBuffer.length > this._bufferOffset ? (this._bufferOffset > 50 && (this._writeBuffer = this._writeBuffer.slice(this._bufferOffset), this._callbacks = this._callbacks.slice(this._bufferOffset), this._bufferOffset = 0), setTimeout(() => this._innerWrite())) : (this._writeBuffer.length = 0, this._callbacks.length = 0, this._pendingData = 0, this._bufferOffset = 0), this._onWriteParsed.fire();
|
2032
2285
|
}
|
2033
2286
|
}
|
2034
|
-
|
2035
|
-
}, 941: (
|
2036
|
-
Object.defineProperty(
|
2287
|
+
r.WriteBuffer = n;
|
2288
|
+
}, 941: (w, r) => {
|
2289
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.toRgbString = r.parseColor = void 0;
|
2037
2290
|
const l = /^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/, _ = /^[\da-f]+$/;
|
2038
2291
|
function d(n, c) {
|
2039
2292
|
const a = n.toString(16), h = a.length < 2 ? "0" + a : a;
|
@@ -2048,7 +2301,7 @@ function ve() {
|
|
2048
2301
|
return h + h;
|
2049
2302
|
}
|
2050
2303
|
}
|
2051
|
-
|
2304
|
+
r.parseColor = function(n) {
|
2052
2305
|
if (!n) return;
|
2053
2306
|
let c = n.toLowerCase();
|
2054
2307
|
if (c.indexOf("rgb:") === 0) {
|
@@ -2066,16 +2319,16 @@ function ve() {
|
|
2066
2319
|
}
|
2067
2320
|
return h;
|
2068
2321
|
}
|
2069
|
-
},
|
2322
|
+
}, r.toRgbString = function(n, c = 16) {
|
2070
2323
|
const [a, h, u] = n;
|
2071
2324
|
return `rgb:${d(a, c)}/${d(h, c)}/${d(u, c)}`;
|
2072
2325
|
};
|
2073
|
-
}, 770: (
|
2074
|
-
Object.defineProperty(
|
2075
|
-
}, 351: (
|
2076
|
-
Object.defineProperty(
|
2326
|
+
}, 770: (w, r) => {
|
2327
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.PAYLOAD_LIMIT = void 0, r.PAYLOAD_LIMIT = 1e7;
|
2328
|
+
}, 351: (w, r, l) => {
|
2329
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.DcsHandler = r.DcsParser = void 0;
|
2077
2330
|
const _ = l(482), d = l(742), n = l(770), c = [];
|
2078
|
-
|
2331
|
+
r.DcsParser = class {
|
2079
2332
|
constructor() {
|
2080
2333
|
this._handlers = /* @__PURE__ */ Object.create(null), this._active = c, this._ident = 0, this._handlerFb = () => {
|
2081
2334
|
}, this._stack = { paused: !1, loopPosition: 0, fallThrough: !1 };
|
@@ -2112,8 +2365,8 @@ function ve() {
|
|
2112
2365
|
}
|
2113
2366
|
unhook(h, u = !0) {
|
2114
2367
|
if (this._active.length) {
|
2115
|
-
let e = !1, s = this._active.length - 1,
|
2116
|
-
if (this._stack.paused && (s = this._stack.loopPosition - 1, e = u,
|
2368
|
+
let e = !1, s = this._active.length - 1, i = !1;
|
2369
|
+
if (this._stack.paused && (s = this._stack.loopPosition - 1, e = u, i = this._stack.fallThrough, this._stack.paused = !1), !i && e === !1) {
|
2117
2370
|
for (; s >= 0 && (e = this._active[s].unhook(h), e !== !0); s--) if (e instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = s, this._stack.fallThrough = !1, e;
|
2118
2371
|
s--;
|
2119
2372
|
}
|
@@ -2123,7 +2376,7 @@ function ve() {
|
|
2123
2376
|
}
|
2124
2377
|
};
|
2125
2378
|
const a = new d.Params();
|
2126
|
-
a.addParam(0),
|
2379
|
+
a.addParam(0), r.DcsHandler = class {
|
2127
2380
|
constructor(h) {
|
2128
2381
|
this._handler = h, this._data = "", this._params = a, this._hitLimit = !1;
|
2129
2382
|
}
|
@@ -2140,44 +2393,44 @@ function ve() {
|
|
2140
2393
|
return this._params = a, this._data = "", this._hitLimit = !1, u;
|
2141
2394
|
}
|
2142
2395
|
};
|
2143
|
-
}, 15: (
|
2144
|
-
Object.defineProperty(
|
2396
|
+
}, 15: (w, r, l) => {
|
2397
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.EscapeSequenceParser = r.VT500_TRANSITION_TABLE = r.TransitionTable = void 0;
|
2145
2398
|
const _ = l(844), d = l(742), n = l(242), c = l(351);
|
2146
2399
|
class a {
|
2147
2400
|
constructor(s) {
|
2148
2401
|
this.table = new Uint8Array(s);
|
2149
2402
|
}
|
2150
|
-
setDefault(s,
|
2151
|
-
this.table.fill(s << 4 |
|
2403
|
+
setDefault(s, i) {
|
2404
|
+
this.table.fill(s << 4 | i);
|
2152
2405
|
}
|
2153
|
-
add(s,
|
2154
|
-
this.table[
|
2406
|
+
add(s, i, t, f) {
|
2407
|
+
this.table[i << 8 | s] = t << 4 | f;
|
2155
2408
|
}
|
2156
|
-
addMany(s,
|
2157
|
-
for (let p = 0; p < s.length; p++) this.table[
|
2409
|
+
addMany(s, i, t, f) {
|
2410
|
+
for (let p = 0; p < s.length; p++) this.table[i << 8 | s[p]] = t << 4 | f;
|
2158
2411
|
}
|
2159
2412
|
}
|
2160
|
-
|
2413
|
+
r.TransitionTable = a;
|
2161
2414
|
const h = 160;
|
2162
|
-
|
2163
|
-
const e = new a(4095), s = Array.apply(null, Array(256)).map((y, C) => C),
|
2164
|
-
f.push(25), f.push.apply(f,
|
2165
|
-
const p =
|
2166
|
-
let
|
2167
|
-
for (
|
2168
|
-
return e.addMany(f, 0, 3, 0), e.addMany(f, 1, 3, 1), e.add(127, 1, 0, 1), e.addMany(f, 8, 0, 8), e.addMany(f, 3, 3, 3), e.add(127, 3, 0, 3), e.addMany(f, 4, 3, 4), e.add(127, 4, 0, 4), e.addMany(f, 6, 3, 6), e.addMany(f, 5, 3, 5), e.add(127, 5, 0, 5), e.addMany(f, 2, 3, 2), e.add(127, 2, 0, 2), e.add(93, 1, 4, 8), e.addMany(t, 8, 5, 8), e.add(127, 8, 5, 8), e.addMany([156, 27, 24, 26, 7], 8, 6, 0), e.addMany(
|
2415
|
+
r.VT500_TRANSITION_TABLE = function() {
|
2416
|
+
const e = new a(4095), s = Array.apply(null, Array(256)).map((y, C) => C), i = (y, C) => s.slice(y, C), t = i(32, 127), f = i(0, 24);
|
2417
|
+
f.push(25), f.push.apply(f, i(28, 32));
|
2418
|
+
const p = i(0, 14);
|
2419
|
+
let S;
|
2420
|
+
for (S in e.setDefault(1, 0), e.addMany(t, 0, 2, 0), p) e.addMany([24, 26, 153, 154], S, 3, 0), e.addMany(i(128, 144), S, 3, 0), e.addMany(i(144, 152), S, 3, 0), e.add(156, S, 0, 0), e.add(27, S, 11, 1), e.add(157, S, 4, 8), e.addMany([152, 158, 159], S, 0, 7), e.add(155, S, 11, 3), e.add(144, S, 11, 9);
|
2421
|
+
return e.addMany(f, 0, 3, 0), e.addMany(f, 1, 3, 1), e.add(127, 1, 0, 1), e.addMany(f, 8, 0, 8), e.addMany(f, 3, 3, 3), e.add(127, 3, 0, 3), e.addMany(f, 4, 3, 4), e.add(127, 4, 0, 4), e.addMany(f, 6, 3, 6), e.addMany(f, 5, 3, 5), e.add(127, 5, 0, 5), e.addMany(f, 2, 3, 2), e.add(127, 2, 0, 2), e.add(93, 1, 4, 8), e.addMany(t, 8, 5, 8), e.add(127, 8, 5, 8), e.addMany([156, 27, 24, 26, 7], 8, 6, 0), e.addMany(i(28, 32), 8, 0, 8), e.addMany([88, 94, 95], 1, 0, 7), e.addMany(t, 7, 0, 7), e.addMany(f, 7, 0, 7), e.add(156, 7, 0, 0), e.add(127, 7, 0, 7), e.add(91, 1, 11, 3), e.addMany(i(64, 127), 3, 7, 0), e.addMany(i(48, 60), 3, 8, 4), e.addMany([60, 61, 62, 63], 3, 9, 4), e.addMany(i(48, 60), 4, 8, 4), e.addMany(i(64, 127), 4, 7, 0), e.addMany([60, 61, 62, 63], 4, 0, 6), e.addMany(i(32, 64), 6, 0, 6), e.add(127, 6, 0, 6), e.addMany(i(64, 127), 6, 0, 0), e.addMany(i(32, 48), 3, 9, 5), e.addMany(i(32, 48), 5, 9, 5), e.addMany(i(48, 64), 5, 0, 6), e.addMany(i(64, 127), 5, 7, 0), e.addMany(i(32, 48), 4, 9, 5), e.addMany(i(32, 48), 1, 9, 2), e.addMany(i(32, 48), 2, 9, 2), e.addMany(i(48, 127), 2, 10, 0), e.addMany(i(48, 80), 1, 10, 0), e.addMany(i(81, 88), 1, 10, 0), e.addMany([89, 90, 92], 1, 10, 0), e.addMany(i(96, 127), 1, 10, 0), e.add(80, 1, 11, 9), e.addMany(f, 9, 0, 9), e.add(127, 9, 0, 9), e.addMany(i(28, 32), 9, 0, 9), e.addMany(i(32, 48), 9, 9, 12), e.addMany(i(48, 60), 9, 8, 10), e.addMany([60, 61, 62, 63], 9, 9, 10), e.addMany(f, 11, 0, 11), e.addMany(i(32, 128), 11, 0, 11), e.addMany(i(28, 32), 11, 0, 11), e.addMany(f, 10, 0, 10), e.add(127, 10, 0, 10), e.addMany(i(28, 32), 10, 0, 10), e.addMany(i(48, 60), 10, 8, 10), e.addMany([60, 61, 62, 63], 10, 0, 11), e.addMany(i(32, 48), 10, 9, 12), e.addMany(f, 12, 0, 12), e.add(127, 12, 0, 12), e.addMany(i(28, 32), 12, 0, 12), e.addMany(i(32, 48), 12, 9, 12), e.addMany(i(48, 64), 12, 0, 11), e.addMany(i(64, 127), 12, 12, 13), e.addMany(i(64, 127), 10, 12, 13), e.addMany(i(64, 127), 9, 12, 13), e.addMany(f, 13, 13, 13), e.addMany(t, 13, 13, 13), e.add(127, 13, 0, 13), e.addMany([27, 156, 24, 26], 13, 14, 0), e.add(h, 0, 2, 0), e.add(h, 8, 5, 8), e.add(h, 6, 0, 6), e.add(h, 11, 0, 11), e.add(h, 13, 13, 13), e;
|
2169
2422
|
}();
|
2170
2423
|
class u extends _.Disposable {
|
2171
|
-
constructor(s =
|
2172
|
-
super(), this._transitions = s, this._parseStack = { state: 0, handlers: [], handlerPos: 0, transition: 0, chunkPos: 0 }, this.initialState = 0, this.currentState = this.initialState, this._params = new d.Params(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0, this._printHandlerFb = (
|
2173
|
-
}, this._executeHandlerFb = (
|
2174
|
-
}, this._csiHandlerFb = (
|
2175
|
-
}, this._escHandlerFb = (
|
2176
|
-
}, this._errorHandlerFb = (
|
2424
|
+
constructor(s = r.VT500_TRANSITION_TABLE) {
|
2425
|
+
super(), this._transitions = s, this._parseStack = { state: 0, handlers: [], handlerPos: 0, transition: 0, chunkPos: 0 }, this.initialState = 0, this.currentState = this.initialState, this._params = new d.Params(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0, this._printHandlerFb = (i, t, f) => {
|
2426
|
+
}, this._executeHandlerFb = (i) => {
|
2427
|
+
}, this._csiHandlerFb = (i, t) => {
|
2428
|
+
}, this._escHandlerFb = (i) => {
|
2429
|
+
}, this._errorHandlerFb = (i) => i, this._printHandler = this._printHandlerFb, this._executeHandlers = /* @__PURE__ */ Object.create(null), this._csiHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null), this.register((0, _.toDisposable)(() => {
|
2177
2430
|
this._csiHandlers = /* @__PURE__ */ Object.create(null), this._executeHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null);
|
2178
2431
|
})), this._oscParser = this.register(new n.OscParser()), this._dcsParser = this.register(new c.DcsParser()), this._errorHandler = this._errorHandlerFb, this.registerEscHandler({ final: "\\" }, () => !0);
|
2179
2432
|
}
|
2180
|
-
_identifier(s,
|
2433
|
+
_identifier(s, i = [64, 126]) {
|
2181
2434
|
let t = 0;
|
2182
2435
|
if (s.prefix) {
|
2183
2436
|
if (s.prefix.length > 1) throw new Error("only one byte as prefix supported");
|
@@ -2186,20 +2439,20 @@ function ve() {
|
|
2186
2439
|
if (s.intermediates) {
|
2187
2440
|
if (s.intermediates.length > 2) throw new Error("only two bytes as intermediates are supported");
|
2188
2441
|
for (let p = 0; p < s.intermediates.length; ++p) {
|
2189
|
-
const
|
2190
|
-
if (32 >
|
2191
|
-
t <<= 8, t |=
|
2442
|
+
const S = s.intermediates.charCodeAt(p);
|
2443
|
+
if (32 > S || S > 47) throw new Error("intermediate must be in range 0x20 .. 0x2f");
|
2444
|
+
t <<= 8, t |= S;
|
2192
2445
|
}
|
2193
2446
|
}
|
2194
2447
|
if (s.final.length !== 1) throw new Error("final must be a single byte");
|
2195
2448
|
const f = s.final.charCodeAt(0);
|
2196
|
-
if (
|
2449
|
+
if (i[0] > f || f > i[1]) throw new Error(`final must be in range ${i[0]} .. ${i[1]}`);
|
2197
2450
|
return t <<= 8, t |= f, t;
|
2198
2451
|
}
|
2199
2452
|
identToString(s) {
|
2200
|
-
const
|
2201
|
-
for (; s; )
|
2202
|
-
return
|
2453
|
+
const i = [];
|
2454
|
+
for (; s; ) i.push(String.fromCharCode(255 & s)), s >>= 8;
|
2455
|
+
return i.reverse().join("");
|
2203
2456
|
}
|
2204
2457
|
setPrintHandler(s) {
|
2205
2458
|
this._printHandler = s;
|
@@ -2207,12 +2460,12 @@ function ve() {
|
|
2207
2460
|
clearPrintHandler() {
|
2208
2461
|
this._printHandler = this._printHandlerFb;
|
2209
2462
|
}
|
2210
|
-
registerEscHandler(s,
|
2463
|
+
registerEscHandler(s, i) {
|
2211
2464
|
const t = this._identifier(s, [48, 126]);
|
2212
2465
|
this._escHandlers[t] === void 0 && (this._escHandlers[t] = []);
|
2213
2466
|
const f = this._escHandlers[t];
|
2214
|
-
return f.push(
|
2215
|
-
const p = f.indexOf(
|
2467
|
+
return f.push(i), { dispose: () => {
|
2468
|
+
const p = f.indexOf(i);
|
2216
2469
|
p !== -1 && f.splice(p, 1);
|
2217
2470
|
} };
|
2218
2471
|
}
|
@@ -2222,8 +2475,8 @@ function ve() {
|
|
2222
2475
|
setEscHandlerFallback(s) {
|
2223
2476
|
this._escHandlerFb = s;
|
2224
2477
|
}
|
2225
|
-
setExecuteHandler(s,
|
2226
|
-
this._executeHandlers[s.charCodeAt(0)] =
|
2478
|
+
setExecuteHandler(s, i) {
|
2479
|
+
this._executeHandlers[s.charCodeAt(0)] = i;
|
2227
2480
|
}
|
2228
2481
|
clearExecuteHandler(s) {
|
2229
2482
|
this._executeHandlers[s.charCodeAt(0)] && delete this._executeHandlers[s.charCodeAt(0)];
|
@@ -2231,12 +2484,12 @@ function ve() {
|
|
2231
2484
|
setExecuteHandlerFallback(s) {
|
2232
2485
|
this._executeHandlerFb = s;
|
2233
2486
|
}
|
2234
|
-
registerCsiHandler(s,
|
2487
|
+
registerCsiHandler(s, i) {
|
2235
2488
|
const t = this._identifier(s);
|
2236
2489
|
this._csiHandlers[t] === void 0 && (this._csiHandlers[t] = []);
|
2237
2490
|
const f = this._csiHandlers[t];
|
2238
|
-
return f.push(
|
2239
|
-
const p = f.indexOf(
|
2491
|
+
return f.push(i), { dispose: () => {
|
2492
|
+
const p = f.indexOf(i);
|
2240
2493
|
p !== -1 && f.splice(p, 1);
|
2241
2494
|
} };
|
2242
2495
|
}
|
@@ -2246,8 +2499,8 @@ function ve() {
|
|
2246
2499
|
setCsiHandlerFallback(s) {
|
2247
2500
|
this._csiHandlerFb = s;
|
2248
2501
|
}
|
2249
|
-
registerDcsHandler(s,
|
2250
|
-
return this._dcsParser.registerHandler(this._identifier(s),
|
2502
|
+
registerDcsHandler(s, i) {
|
2503
|
+
return this._dcsParser.registerHandler(this._identifier(s), i);
|
2251
2504
|
}
|
2252
2505
|
clearDcsHandler(s) {
|
2253
2506
|
this._dcsParser.clearHandler(this._identifier(s));
|
@@ -2255,8 +2508,8 @@ function ve() {
|
|
2255
2508
|
setDcsHandlerFallback(s) {
|
2256
2509
|
this._dcsParser.setHandlerFallback(s);
|
2257
2510
|
}
|
2258
|
-
registerOscHandler(s,
|
2259
|
-
return this._oscParser.registerHandler(s,
|
2511
|
+
registerOscHandler(s, i) {
|
2512
|
+
return this._oscParser.registerHandler(s, i);
|
2260
2513
|
}
|
2261
2514
|
clearOscHandler(s) {
|
2262
2515
|
this._oscParser.clearHandler(s);
|
@@ -2273,11 +2526,11 @@ function ve() {
|
|
2273
2526
|
reset() {
|
2274
2527
|
this.currentState = this.initialState, this._oscParser.reset(), this._dcsParser.reset(), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0, this._parseStack.state !== 0 && (this._parseStack.state = 2, this._parseStack.handlers = []);
|
2275
2528
|
}
|
2276
|
-
_preserveStack(s,
|
2277
|
-
this._parseStack.state = s, this._parseStack.handlers =
|
2529
|
+
_preserveStack(s, i, t, f, p) {
|
2530
|
+
this._parseStack.state = s, this._parseStack.handlers = i, this._parseStack.handlerPos = t, this._parseStack.transition = f, this._parseStack.chunkPos = p;
|
2278
2531
|
}
|
2279
|
-
parse(s,
|
2280
|
-
let f, p = 0,
|
2532
|
+
parse(s, i, t) {
|
2533
|
+
let f, p = 0, S = 0, y = 0;
|
2281
2534
|
if (this._parseStack.state) if (this._parseStack.state === 2) this._parseStack.state = 0, y = this._parseStack.chunkPos + 1;
|
2282
2535
|
else {
|
2283
2536
|
if (t === void 0 || this._parseStack.state === 1) throw this._parseStack.state = 1, new Error("improper continuation due to previous async handler, giving up parsing");
|
@@ -2306,24 +2559,24 @@ function ve() {
|
|
2306
2559
|
}
|
2307
2560
|
this._parseStack.state = 0, y = this._parseStack.chunkPos + 1, this.precedingJoinState = 0, this.currentState = 15 & this._parseStack.transition;
|
2308
2561
|
}
|
2309
|
-
for (let C = y; C <
|
2310
|
-
switch (p = s[C],
|
2562
|
+
for (let C = y; C < i; ++C) {
|
2563
|
+
switch (p = s[C], S = this._transitions.table[this.currentState << 8 | (p < 160 ? p : h)], S >> 4) {
|
2311
2564
|
case 2:
|
2312
|
-
for (let
|
2313
|
-
if (
|
2314
|
-
this._printHandler(s, C,
|
2565
|
+
for (let k = C + 1; ; ++k) {
|
2566
|
+
if (k >= i || (p = s[k]) < 32 || p > 126 && p < h) {
|
2567
|
+
this._printHandler(s, C, k), C = k - 1;
|
2315
2568
|
break;
|
2316
2569
|
}
|
2317
|
-
if (++
|
2318
|
-
this._printHandler(s, C,
|
2570
|
+
if (++k >= i || (p = s[k]) < 32 || p > 126 && p < h) {
|
2571
|
+
this._printHandler(s, C, k), C = k - 1;
|
2319
2572
|
break;
|
2320
2573
|
}
|
2321
|
-
if (++
|
2322
|
-
this._printHandler(s, C,
|
2574
|
+
if (++k >= i || (p = s[k]) < 32 || p > 126 && p < h) {
|
2575
|
+
this._printHandler(s, C, k), C = k - 1;
|
2323
2576
|
break;
|
2324
2577
|
}
|
2325
|
-
if (++
|
2326
|
-
this._printHandler(s, C,
|
2578
|
+
if (++k >= i || (p = s[k]) < 32 || p > 126 && p < h) {
|
2579
|
+
this._printHandler(s, C, k), C = k - 1;
|
2327
2580
|
break;
|
2328
2581
|
}
|
2329
2582
|
}
|
@@ -2338,9 +2591,9 @@ function ve() {
|
|
2338
2591
|
break;
|
2339
2592
|
case 7:
|
2340
2593
|
const T = this._csiHandlers[this._collect << 8 | p];
|
2341
|
-
let
|
2342
|
-
for (;
|
2343
|
-
|
2594
|
+
let j = T ? T.length - 1 : -1;
|
2595
|
+
for (; j >= 0 && (f = T[j](this._params), f !== !0); j--) if (f instanceof Promise) return this._preserveStack(3, T, j, S, C), f;
|
2596
|
+
j < 0 && this._csiHandlerFb(this._collect << 8 | p, this._params), this.precedingJoinState = 0;
|
2344
2597
|
break;
|
2345
2598
|
case 8:
|
2346
2599
|
do
|
@@ -2354,7 +2607,7 @@ function ve() {
|
|
2354
2607
|
default:
|
2355
2608
|
this._params.addDigit(p - 48);
|
2356
2609
|
}
|
2357
|
-
while (++C <
|
2610
|
+
while (++C < i && (p = s[C]) > 47 && p < 60);
|
2358
2611
|
C--;
|
2359
2612
|
break;
|
2360
2613
|
case 9:
|
@@ -2362,9 +2615,9 @@ function ve() {
|
|
2362
2615
|
break;
|
2363
2616
|
case 10:
|
2364
2617
|
const E = this._escHandlers[this._collect << 8 | p];
|
2365
|
-
let
|
2366
|
-
for (;
|
2367
|
-
|
2618
|
+
let B = E ? E.length - 1 : -1;
|
2619
|
+
for (; B >= 0 && (f = E[B](), f !== !0); B--) if (f instanceof Promise) return this._preserveStack(4, E, B, S, C), f;
|
2620
|
+
B < 0 && this._escHandlerFb(this._collect << 8 | p), this.precedingJoinState = 0;
|
2368
2621
|
break;
|
2369
2622
|
case 11:
|
2370
2623
|
this._params.reset(), this._params.addParam(0), this._collect = 0;
|
@@ -2373,37 +2626,37 @@ function ve() {
|
|
2373
2626
|
this._dcsParser.hook(this._collect << 8 | p, this._params);
|
2374
2627
|
break;
|
2375
2628
|
case 13:
|
2376
|
-
for (let
|
2377
|
-
this._dcsParser.put(s, C,
|
2629
|
+
for (let k = C + 1; ; ++k) if (k >= i || (p = s[k]) === 24 || p === 26 || p === 27 || p > 127 && p < h) {
|
2630
|
+
this._dcsParser.put(s, C, k), C = k - 1;
|
2378
2631
|
break;
|
2379
2632
|
}
|
2380
2633
|
break;
|
2381
2634
|
case 14:
|
2382
|
-
if (f = this._dcsParser.unhook(p !== 24 && p !== 26), f) return this._preserveStack(6, [], 0,
|
2383
|
-
p === 27 && (
|
2635
|
+
if (f = this._dcsParser.unhook(p !== 24 && p !== 26), f) return this._preserveStack(6, [], 0, S, C), f;
|
2636
|
+
p === 27 && (S |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
|
2384
2637
|
break;
|
2385
2638
|
case 4:
|
2386
2639
|
this._oscParser.start();
|
2387
2640
|
break;
|
2388
2641
|
case 5:
|
2389
|
-
for (let
|
2390
|
-
this._oscParser.put(s, C,
|
2642
|
+
for (let k = C + 1; ; k++) if (k >= i || (p = s[k]) < 32 || p > 127 && p < h) {
|
2643
|
+
this._oscParser.put(s, C, k), C = k - 1;
|
2391
2644
|
break;
|
2392
2645
|
}
|
2393
2646
|
break;
|
2394
2647
|
case 6:
|
2395
|
-
if (f = this._oscParser.end(p !== 24 && p !== 26), f) return this._preserveStack(5, [], 0,
|
2396
|
-
p === 27 && (
|
2648
|
+
if (f = this._oscParser.end(p !== 24 && p !== 26), f) return this._preserveStack(5, [], 0, S, C), f;
|
2649
|
+
p === 27 && (S |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
|
2397
2650
|
}
|
2398
|
-
this.currentState = 15 &
|
2651
|
+
this.currentState = 15 & S;
|
2399
2652
|
}
|
2400
2653
|
}
|
2401
2654
|
}
|
2402
|
-
|
2403
|
-
}, 242: (
|
2404
|
-
Object.defineProperty(
|
2655
|
+
r.EscapeSequenceParser = u;
|
2656
|
+
}, 242: (w, r, l) => {
|
2657
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.OscHandler = r.OscParser = void 0;
|
2405
2658
|
const _ = l(770), d = l(482), n = [];
|
2406
|
-
|
2659
|
+
r.OscParser = class {
|
2407
2660
|
constructor() {
|
2408
2661
|
this._state = 0, this._active = n, this._id = -1, this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
|
2409
2662
|
}, this._stack = { paused: !1, loopPosition: 0, fallThrough: !1 };
|
@@ -2468,7 +2721,7 @@ function ve() {
|
|
2468
2721
|
this._active = n, this._id = -1, this._state = 0;
|
2469
2722
|
}
|
2470
2723
|
}
|
2471
|
-
},
|
2724
|
+
}, r.OscHandler = class {
|
2472
2725
|
constructor(c) {
|
2473
2726
|
this._handler = c, this._data = "", this._hitLimit = !1;
|
2474
2727
|
}
|
@@ -2485,8 +2738,8 @@ function ve() {
|
|
2485
2738
|
return this._data = "", this._hitLimit = !1, a;
|
2486
2739
|
}
|
2487
2740
|
};
|
2488
|
-
}, 742: (
|
2489
|
-
Object.defineProperty(
|
2741
|
+
}, 742: (w, r) => {
|
2742
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.Params = void 0;
|
2490
2743
|
const l = 2147483647;
|
2491
2744
|
class _ {
|
2492
2745
|
static fromArray(n) {
|
@@ -2555,9 +2808,9 @@ function ve() {
|
|
2555
2808
|
a[c - 1] = ~h ? Math.min(10 * h + n, l) : n;
|
2556
2809
|
}
|
2557
2810
|
}
|
2558
|
-
|
2559
|
-
}, 741: (
|
2560
|
-
Object.defineProperty(
|
2811
|
+
r.Params = _;
|
2812
|
+
}, 741: (w, r) => {
|
2813
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.AddonManager = void 0, r.AddonManager = class {
|
2561
2814
|
constructor() {
|
2562
2815
|
this._addons = [];
|
2563
2816
|
}
|
@@ -2579,10 +2832,10 @@ function ve() {
|
|
2579
2832
|
l.isDisposed = !0, l.dispose.apply(l.instance), this._addons.splice(_, 1);
|
2580
2833
|
}
|
2581
2834
|
};
|
2582
|
-
}, 771: (
|
2583
|
-
Object.defineProperty(
|
2835
|
+
}, 771: (w, r, l) => {
|
2836
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferApiView = void 0;
|
2584
2837
|
const _ = l(785), d = l(511);
|
2585
|
-
|
2838
|
+
r.BufferApiView = class {
|
2586
2839
|
constructor(n, c) {
|
2587
2840
|
this._buffer = n, this.type = c;
|
2588
2841
|
}
|
@@ -2612,10 +2865,10 @@ function ve() {
|
|
2612
2865
|
return new d.CellData();
|
2613
2866
|
}
|
2614
2867
|
};
|
2615
|
-
}, 785: (
|
2616
|
-
Object.defineProperty(
|
2868
|
+
}, 785: (w, r, l) => {
|
2869
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferLineApiView = void 0;
|
2617
2870
|
const _ = l(511);
|
2618
|
-
|
2871
|
+
r.BufferLineApiView = class {
|
2619
2872
|
constructor(d) {
|
2620
2873
|
this._line = d;
|
2621
2874
|
}
|
@@ -2632,8 +2885,8 @@ function ve() {
|
|
2632
2885
|
return this._line.translateToString(d, n, c);
|
2633
2886
|
}
|
2634
2887
|
};
|
2635
|
-
}, 285: (
|
2636
|
-
Object.defineProperty(
|
2888
|
+
}, 285: (w, r, l) => {
|
2889
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferNamespaceApi = void 0;
|
2637
2890
|
const _ = l(771), d = l(460), n = l(844);
|
2638
2891
|
class c extends n.Disposable {
|
2639
2892
|
constructor(h) {
|
@@ -2651,9 +2904,9 @@ function ve() {
|
|
2651
2904
|
return this._alternate.init(this._core.buffers.alt);
|
2652
2905
|
}
|
2653
2906
|
}
|
2654
|
-
|
2655
|
-
}, 975: (
|
2656
|
-
Object.defineProperty(
|
2907
|
+
r.BufferNamespaceApi = c;
|
2908
|
+
}, 975: (w, r) => {
|
2909
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.ParserApi = void 0, r.ParserApi = class {
|
2657
2910
|
constructor(l) {
|
2658
2911
|
this._core = l;
|
2659
2912
|
}
|
@@ -2682,8 +2935,8 @@ function ve() {
|
|
2682
2935
|
return this.registerOscHandler(l, _);
|
2683
2936
|
}
|
2684
2937
|
};
|
2685
|
-
}, 90: (
|
2686
|
-
Object.defineProperty(
|
2938
|
+
}, 90: (w, r) => {
|
2939
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.UnicodeApi = void 0, r.UnicodeApi = class {
|
2687
2940
|
constructor(l) {
|
2688
2941
|
this._core = l;
|
2689
2942
|
}
|
@@ -2700,26 +2953,26 @@ function ve() {
|
|
2700
2953
|
this._core.unicodeService.activeVersion = l;
|
2701
2954
|
}
|
2702
2955
|
};
|
2703
|
-
}, 744: function(
|
2704
|
-
var _ = this && this.__decorate || function(e, s,
|
2705
|
-
var f, p = arguments.length,
|
2706
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
2707
|
-
else for (var y = e.length - 1; y >= 0; y--) (f = e[y]) && (
|
2708
|
-
return p > 3 &&
|
2956
|
+
}, 744: function(w, r, l) {
|
2957
|
+
var _ = this && this.__decorate || function(e, s, i, t) {
|
2958
|
+
var f, p = arguments.length, S = p < 3 ? s : t === null ? t = Object.getOwnPropertyDescriptor(s, i) : t;
|
2959
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") S = Reflect.decorate(e, s, i, t);
|
2960
|
+
else for (var y = e.length - 1; y >= 0; y--) (f = e[y]) && (S = (p < 3 ? f(S) : p > 3 ? f(s, i, S) : f(s, i)) || S);
|
2961
|
+
return p > 3 && S && Object.defineProperty(s, i, S), S;
|
2709
2962
|
}, d = this && this.__param || function(e, s) {
|
2710
|
-
return function(
|
2711
|
-
s(
|
2963
|
+
return function(i, t) {
|
2964
|
+
s(i, t, e);
|
2712
2965
|
};
|
2713
2966
|
};
|
2714
|
-
Object.defineProperty(
|
2967
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferService = r.MINIMUM_ROWS = r.MINIMUM_COLS = void 0;
|
2715
2968
|
const n = l(460), c = l(844), a = l(295), h = l(585);
|
2716
|
-
|
2717
|
-
let u =
|
2969
|
+
r.MINIMUM_COLS = 2, r.MINIMUM_ROWS = 1;
|
2970
|
+
let u = r.BufferService = class extends c.Disposable {
|
2718
2971
|
get buffer() {
|
2719
2972
|
return this.buffers.active;
|
2720
2973
|
}
|
2721
2974
|
constructor(e) {
|
2722
|
-
super(), this.isUserScrolling = !1, this._onResize = this.register(new n.EventEmitter()), this.onResize = this._onResize.event, this._onScroll = this.register(new n.EventEmitter()), this.onScroll = this._onScroll.event, this.cols = Math.max(e.rawOptions.cols || 0,
|
2975
|
+
super(), this.isUserScrolling = !1, this._onResize = this.register(new n.EventEmitter()), this.onResize = this._onResize.event, this._onScroll = this.register(new n.EventEmitter()), this.onScroll = this._onScroll.event, this.cols = Math.max(e.rawOptions.cols || 0, r.MINIMUM_COLS), this.rows = Math.max(e.rawOptions.rows || 0, r.MINIMUM_ROWS), this.buffers = this.register(new a.BufferSet(e, this));
|
2723
2976
|
}
|
2724
2977
|
resize(e, s) {
|
2725
2978
|
this.cols = e, this.rows = s, this.buffers.resize(e, s), this._onResize.fire({ cols: e, rows: s });
|
@@ -2728,20 +2981,20 @@ function ve() {
|
|
2728
2981
|
this.buffers.reset(), this.isUserScrolling = !1;
|
2729
2982
|
}
|
2730
2983
|
scroll(e, s = !1) {
|
2731
|
-
const
|
2984
|
+
const i = this.buffer;
|
2732
2985
|
let t;
|
2733
|
-
t = this._cachedBlankLine, t && t.length === this.cols && t.getFg(0) === e.fg && t.getBg(0) === e.bg || (t =
|
2734
|
-
const f =
|
2735
|
-
if (
|
2736
|
-
const
|
2737
|
-
p ===
|
2986
|
+
t = this._cachedBlankLine, t && t.length === this.cols && t.getFg(0) === e.fg && t.getBg(0) === e.bg || (t = i.getBlankLine(e, s), this._cachedBlankLine = t), t.isWrapped = s;
|
2987
|
+
const f = i.ybase + i.scrollTop, p = i.ybase + i.scrollBottom;
|
2988
|
+
if (i.scrollTop === 0) {
|
2989
|
+
const S = i.lines.isFull;
|
2990
|
+
p === i.lines.length - 1 ? S ? i.lines.recycle().copyFrom(t) : i.lines.push(t.clone()) : i.lines.splice(p + 1, 0, t.clone()), S ? this.isUserScrolling && (i.ydisp = Math.max(i.ydisp - 1, 0)) : (i.ybase++, this.isUserScrolling || i.ydisp++);
|
2738
2991
|
} else {
|
2739
|
-
const
|
2740
|
-
|
2992
|
+
const S = p - f + 1;
|
2993
|
+
i.lines.shiftElements(f + 1, S - 1, -1), i.lines.set(p, t.clone());
|
2741
2994
|
}
|
2742
|
-
this.isUserScrolling || (
|
2995
|
+
this.isUserScrolling || (i.ydisp = i.ybase), this._onScroll.fire(i.ydisp);
|
2743
2996
|
}
|
2744
|
-
scrollLines(e, s,
|
2997
|
+
scrollLines(e, s, i) {
|
2745
2998
|
const t = this.buffer;
|
2746
2999
|
if (e < 0) {
|
2747
3000
|
if (t.ydisp === 0) return;
|
@@ -2751,9 +3004,9 @@ function ve() {
|
|
2751
3004
|
t.ydisp = Math.max(Math.min(t.ydisp + e, t.ybase), 0), f !== t.ydisp && (s || this._onScroll.fire(t.ydisp));
|
2752
3005
|
}
|
2753
3006
|
};
|
2754
|
-
|
2755
|
-
}, 994: (
|
2756
|
-
Object.defineProperty(
|
3007
|
+
r.BufferService = u = _([d(0, h.IOptionsService)], u);
|
3008
|
+
}, 994: (w, r) => {
|
3009
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.CharsetService = void 0, r.CharsetService = class {
|
2757
3010
|
constructor() {
|
2758
3011
|
this.glevel = 0, this._charsets = [];
|
2759
3012
|
}
|
@@ -2767,18 +3020,18 @@ function ve() {
|
|
2767
3020
|
this._charsets[l] = _, this.glevel === l && (this.charset = _);
|
2768
3021
|
}
|
2769
3022
|
};
|
2770
|
-
}, 753: function(
|
2771
|
-
var _ = this && this.__decorate || function(t, f, p,
|
2772
|
-
var y, C = arguments.length, T = C < 3 ? f :
|
2773
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") T = Reflect.decorate(t, f, p,
|
2774
|
-
else for (var
|
3023
|
+
}, 753: function(w, r, l) {
|
3024
|
+
var _ = this && this.__decorate || function(t, f, p, S) {
|
3025
|
+
var y, C = arguments.length, T = C < 3 ? f : S === null ? S = Object.getOwnPropertyDescriptor(f, p) : S;
|
3026
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") T = Reflect.decorate(t, f, p, S);
|
3027
|
+
else for (var j = t.length - 1; j >= 0; j--) (y = t[j]) && (T = (C < 3 ? y(T) : C > 3 ? y(f, p, T) : y(f, p)) || T);
|
2775
3028
|
return C > 3 && T && Object.defineProperty(f, p, T), T;
|
2776
3029
|
}, d = this && this.__param || function(t, f) {
|
2777
|
-
return function(p,
|
2778
|
-
f(p,
|
3030
|
+
return function(p, S) {
|
3031
|
+
f(p, S, t);
|
2779
3032
|
};
|
2780
3033
|
};
|
2781
|
-
Object.defineProperty(
|
3034
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.CoreMouseService = void 0;
|
2782
3035
|
const n = l(585), c = l(460), a = l(844), h = { NONE: { events: 0, restrict: () => !1 }, X10: { events: 1, restrict: (t) => t.button !== 4 && t.action === 1 && (t.ctrl = !1, t.alt = !1, t.shift = !1, !0) }, VT200: { events: 19, restrict: (t) => t.action !== 32 }, DRAG: { events: 23, restrict: (t) => t.action !== 32 || t.button !== 3 }, ANY: { events: 31, restrict: (t) => !0 } };
|
2783
3036
|
function u(t, f) {
|
2784
3037
|
let p = (t.ctrl ? 16 : 0) | (t.shift ? 4 : 0) | (t.alt ? 8 : 0);
|
@@ -2794,7 +3047,7 @@ function ve() {
|
|
2794
3047
|
const f = t.action === 0 && t.button !== 4 ? "m" : "M";
|
2795
3048
|
return `\x1B[<${u(t, !0)};${t.x};${t.y}${f}`;
|
2796
3049
|
} };
|
2797
|
-
let
|
3050
|
+
let i = r.CoreMouseService = class extends a.Disposable {
|
2798
3051
|
constructor(t, f) {
|
2799
3052
|
super(), this._bufferService = t, this._coreService = f, this._protocols = {}, this._encodings = {}, this._activeProtocol = "", this._activeEncoding = "", this._lastEvent = null, this._onProtocolChange = this.register(new c.EventEmitter()), this.onProtocolChange = this._onProtocolChange.event;
|
2800
3053
|
for (const p of Object.keys(h)) this.addProtocol(p, h[p]);
|
@@ -2842,39 +3095,39 @@ function ve() {
|
|
2842
3095
|
return t.button === f.button && t.action === f.action && t.ctrl === f.ctrl && t.alt === f.alt && t.shift === f.shift;
|
2843
3096
|
}
|
2844
3097
|
};
|
2845
|
-
|
2846
|
-
}, 83: function(
|
2847
|
-
var _ = this && this.__decorate || function(
|
2848
|
-
var
|
2849
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") C = Reflect.decorate(
|
2850
|
-
else for (var T =
|
3098
|
+
r.CoreMouseService = i = _([d(0, n.IBufferService), d(1, n.ICoreService)], i);
|
3099
|
+
}, 83: function(w, r, l) {
|
3100
|
+
var _ = this && this.__decorate || function(i, t, f, p) {
|
3101
|
+
var S, y = arguments.length, C = y < 3 ? t : p === null ? p = Object.getOwnPropertyDescriptor(t, f) : p;
|
3102
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") C = Reflect.decorate(i, t, f, p);
|
3103
|
+
else for (var T = i.length - 1; T >= 0; T--) (S = i[T]) && (C = (y < 3 ? S(C) : y > 3 ? S(t, f, C) : S(t, f)) || C);
|
2851
3104
|
return y > 3 && C && Object.defineProperty(t, f, C), C;
|
2852
|
-
}, d = this && this.__param || function(
|
3105
|
+
}, d = this && this.__param || function(i, t) {
|
2853
3106
|
return function(f, p) {
|
2854
|
-
t(f, p,
|
3107
|
+
t(f, p, i);
|
2855
3108
|
};
|
2856
3109
|
};
|
2857
|
-
Object.defineProperty(
|
3110
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.CoreService = void 0;
|
2858
3111
|
const n = l(439), c = l(460), a = l(844), h = l(585), u = Object.freeze({ insertMode: !1 }), e = Object.freeze({ applicationCursorKeys: !1, applicationKeypad: !1, bracketedPasteMode: !1, origin: !1, reverseWraparound: !1, sendFocus: !1, wraparound: !0 });
|
2859
|
-
let s =
|
2860
|
-
constructor(
|
2861
|
-
super(), this._bufferService =
|
3112
|
+
let s = r.CoreService = class extends a.Disposable {
|
3113
|
+
constructor(i, t, f) {
|
3114
|
+
super(), this._bufferService = i, this._logService = t, this._optionsService = f, this.isCursorInitialized = !1, this.isCursorHidden = !1, this._onData = this.register(new c.EventEmitter()), this.onData = this._onData.event, this._onUserInput = this.register(new c.EventEmitter()), this.onUserInput = this._onUserInput.event, this._onBinary = this.register(new c.EventEmitter()), this.onBinary = this._onBinary.event, this._onRequestScrollToBottom = this.register(new c.EventEmitter()), this.onRequestScrollToBottom = this._onRequestScrollToBottom.event, this.modes = (0, n.clone)(u), this.decPrivateModes = (0, n.clone)(e);
|
2862
3115
|
}
|
2863
3116
|
reset() {
|
2864
3117
|
this.modes = (0, n.clone)(u), this.decPrivateModes = (0, n.clone)(e);
|
2865
3118
|
}
|
2866
|
-
triggerDataEvent(
|
3119
|
+
triggerDataEvent(i, t = !1) {
|
2867
3120
|
if (this._optionsService.rawOptions.disableStdin) return;
|
2868
3121
|
const f = this._bufferService.buffer;
|
2869
|
-
t && this._optionsService.rawOptions.scrollOnUserInput && f.ybase !== f.ydisp && this._onRequestScrollToBottom.fire(), t && this._onUserInput.fire(), this._logService.debug(`sending data "${
|
3122
|
+
t && this._optionsService.rawOptions.scrollOnUserInput && f.ybase !== f.ydisp && this._onRequestScrollToBottom.fire(), t && this._onUserInput.fire(), this._logService.debug(`sending data "${i}"`, () => i.split("").map((p) => p.charCodeAt(0))), this._onData.fire(i);
|
2870
3123
|
}
|
2871
|
-
triggerBinaryEvent(
|
2872
|
-
this._optionsService.rawOptions.disableStdin || (this._logService.debug(`sending binary "${
|
3124
|
+
triggerBinaryEvent(i) {
|
3125
|
+
this._optionsService.rawOptions.disableStdin || (this._logService.debug(`sending binary "${i}"`, () => i.split("").map((t) => t.charCodeAt(0))), this._onBinary.fire(i));
|
2873
3126
|
}
|
2874
3127
|
};
|
2875
|
-
|
2876
|
-
}, 348: (
|
2877
|
-
Object.defineProperty(
|
3128
|
+
r.CoreService = s = _([d(0, h.IBufferService), d(1, h.ILogService), d(2, h.IOptionsService)], s);
|
3129
|
+
}, 348: (w, r, l) => {
|
3130
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.InstantiationService = r.ServiceCollection = void 0;
|
2878
3131
|
const _ = l(585), d = l(343);
|
2879
3132
|
class n {
|
2880
3133
|
constructor(...a) {
|
@@ -2895,7 +3148,7 @@ function ve() {
|
|
2895
3148
|
return this._entries.get(a);
|
2896
3149
|
}
|
2897
3150
|
}
|
2898
|
-
|
3151
|
+
r.ServiceCollection = n, r.InstantiationService = class {
|
2899
3152
|
constructor() {
|
2900
3153
|
this._services = new n(), this._services.set(_.IInstantiationService, this);
|
2901
3154
|
}
|
@@ -2906,31 +3159,31 @@ function ve() {
|
|
2906
3159
|
return this._services.get(c);
|
2907
3160
|
}
|
2908
3161
|
createInstance(c, ...a) {
|
2909
|
-
const h = (0, d.getServiceDependencies)(c).sort((s,
|
3162
|
+
const h = (0, d.getServiceDependencies)(c).sort((s, i) => s.index - i.index), u = [];
|
2910
3163
|
for (const s of h) {
|
2911
|
-
const
|
2912
|
-
if (!
|
2913
|
-
u.push(
|
3164
|
+
const i = this._services.get(s.id);
|
3165
|
+
if (!i) throw new Error(`[createInstance] ${c.name} depends on UNKNOWN service ${s.id}.`);
|
3166
|
+
u.push(i);
|
2914
3167
|
}
|
2915
3168
|
const e = h.length > 0 ? h[0].index : a.length;
|
2916
3169
|
if (a.length !== e) throw new Error(`[createInstance] First service dependency of ${c.name} at position ${e + 1} conflicts with ${a.length} static arguments`);
|
2917
3170
|
return new c(...a, ...u);
|
2918
3171
|
}
|
2919
3172
|
};
|
2920
|
-
}, 866: function(
|
2921
|
-
var _ = this && this.__decorate || function(e, s,
|
2922
|
-
var f, p = arguments.length,
|
2923
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
2924
|
-
else for (var y = e.length - 1; y >= 0; y--) (f = e[y]) && (
|
2925
|
-
return p > 3 &&
|
3173
|
+
}, 866: function(w, r, l) {
|
3174
|
+
var _ = this && this.__decorate || function(e, s, i, t) {
|
3175
|
+
var f, p = arguments.length, S = p < 3 ? s : t === null ? t = Object.getOwnPropertyDescriptor(s, i) : t;
|
3176
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") S = Reflect.decorate(e, s, i, t);
|
3177
|
+
else for (var y = e.length - 1; y >= 0; y--) (f = e[y]) && (S = (p < 3 ? f(S) : p > 3 ? f(s, i, S) : f(s, i)) || S);
|
3178
|
+
return p > 3 && S && Object.defineProperty(s, i, S), S;
|
2926
3179
|
}, d = this && this.__param || function(e, s) {
|
2927
|
-
return function(
|
2928
|
-
s(
|
3180
|
+
return function(i, t) {
|
3181
|
+
s(i, t, e);
|
2929
3182
|
};
|
2930
3183
|
};
|
2931
|
-
Object.defineProperty(
|
3184
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.traceCall = r.setTraceLogger = r.LogService = void 0;
|
2932
3185
|
const n = l(844), c = l(585), a = { trace: c.LogLevelEnum.TRACE, debug: c.LogLevelEnum.DEBUG, info: c.LogLevelEnum.INFO, warn: c.LogLevelEnum.WARN, error: c.LogLevelEnum.ERROR, off: c.LogLevelEnum.OFF };
|
2933
|
-
let h, u =
|
3186
|
+
let h, u = r.LogService = class extends n.Disposable {
|
2934
3187
|
get logLevel() {
|
2935
3188
|
return this._logLevel;
|
2936
3189
|
}
|
@@ -2943,8 +3196,8 @@ function ve() {
|
|
2943
3196
|
_evalLazyOptionalParams(e) {
|
2944
3197
|
for (let s = 0; s < e.length; s++) typeof e[s] == "function" && (e[s] = e[s]());
|
2945
3198
|
}
|
2946
|
-
_log(e, s,
|
2947
|
-
this._evalLazyOptionalParams(
|
3199
|
+
_log(e, s, i) {
|
3200
|
+
this._evalLazyOptionalParams(i), e.call(console, (this._optionsService.options.logger ? "" : "xterm.js: ") + s, ...i);
|
2948
3201
|
}
|
2949
3202
|
trace(e, ...s) {
|
2950
3203
|
this._logLevel <= c.LogLevelEnum.TRACE && this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger) ?? console.log, e, s);
|
@@ -2962,32 +3215,32 @@ function ve() {
|
|
2962
3215
|
this._logLevel <= c.LogLevelEnum.ERROR && this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger) ?? console.error, e, s);
|
2963
3216
|
}
|
2964
3217
|
};
|
2965
|
-
|
3218
|
+
r.LogService = u = _([d(0, c.IOptionsService)], u), r.setTraceLogger = function(e) {
|
2966
3219
|
h = e;
|
2967
|
-
},
|
2968
|
-
if (typeof
|
2969
|
-
const t =
|
2970
|
-
|
3220
|
+
}, r.traceCall = function(e, s, i) {
|
3221
|
+
if (typeof i.value != "function") throw new Error("not supported");
|
3222
|
+
const t = i.value;
|
3223
|
+
i.value = function(...f) {
|
2971
3224
|
if (h.logLevel !== c.LogLevelEnum.TRACE) return t.apply(this, f);
|
2972
|
-
h.trace(`GlyphRenderer#${t.name}(${f.map((
|
3225
|
+
h.trace(`GlyphRenderer#${t.name}(${f.map((S) => JSON.stringify(S)).join(", ")})`);
|
2973
3226
|
const p = t.apply(this, f);
|
2974
3227
|
return h.trace(`GlyphRenderer#${t.name} return`, p), p;
|
2975
3228
|
};
|
2976
3229
|
};
|
2977
|
-
}, 302: (
|
2978
|
-
Object.defineProperty(
|
3230
|
+
}, 302: (w, r, l) => {
|
3231
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.OptionsService = r.DEFAULT_OPTIONS = void 0;
|
2979
3232
|
const _ = l(460), d = l(844), n = l(114);
|
2980
|
-
|
3233
|
+
r.DEFAULT_OPTIONS = { cols: 80, rows: 24, cursorBlink: !1, cursorStyle: "block", cursorWidth: 1, cursorInactiveStyle: "outline", customGlyphs: !0, drawBoldTextInBrightColors: !0, documentOverride: null, fastScrollModifier: "alt", fastScrollSensitivity: 5, fontFamily: "courier-new, courier, monospace", fontSize: 15, fontWeight: "normal", fontWeightBold: "bold", ignoreBracketedPasteMode: !1, lineHeight: 1, letterSpacing: 0, linkHandler: null, logLevel: "info", logger: null, scrollback: 1e3, scrollOnUserInput: !0, scrollSensitivity: 1, screenReaderMode: !1, smoothScrollDuration: 0, macOptionIsMeta: !1, macOptionClickForcesSelection: !1, minimumContrastRatio: 1, disableStdin: !1, allowProposedApi: !1, allowTransparency: !1, tabStopWidth: 8, theme: {}, rescaleOverlappingGlyphs: !1, rightClickSelectsWord: n.isMac, windowOptions: {}, windowsMode: !1, windowsPty: {}, wordSeparator: " ()[]{}',\"`", altClickMovesCursor: !0, convertEol: !1, termName: "xterm", cancelEvents: !1, overviewRulerWidth: 0 };
|
2981
3234
|
const c = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
|
2982
3235
|
class a extends d.Disposable {
|
2983
3236
|
constructor(u) {
|
2984
3237
|
super(), this._onOptionChange = this.register(new _.EventEmitter()), this.onOptionChange = this._onOptionChange.event;
|
2985
|
-
const e = { ...
|
3238
|
+
const e = { ...r.DEFAULT_OPTIONS };
|
2986
3239
|
for (const s in u) if (s in e) try {
|
2987
|
-
const
|
2988
|
-
e[s] = this._sanitizeAndValidateOption(s,
|
2989
|
-
} catch (
|
2990
|
-
console.error(
|
3240
|
+
const i = u[s];
|
3241
|
+
e[s] = this._sanitizeAndValidateOption(s, i);
|
3242
|
+
} catch (i) {
|
3243
|
+
console.error(i);
|
2991
3244
|
}
|
2992
3245
|
this.rawOptions = e, this.options = { ...e }, this._setupOptions(), this.register((0, d.toDisposable)(() => {
|
2993
3246
|
this.rawOptions.linkHandler = null, this.rawOptions.documentOverride = null;
|
@@ -3005,31 +3258,31 @@ function ve() {
|
|
3005
3258
|
}
|
3006
3259
|
_setupOptions() {
|
3007
3260
|
const u = (s) => {
|
3008
|
-
if (!(s in
|
3261
|
+
if (!(s in r.DEFAULT_OPTIONS)) throw new Error(`No option with key "${s}"`);
|
3009
3262
|
return this.rawOptions[s];
|
3010
|
-
}, e = (s,
|
3011
|
-
if (!(s in
|
3012
|
-
|
3263
|
+
}, e = (s, i) => {
|
3264
|
+
if (!(s in r.DEFAULT_OPTIONS)) throw new Error(`No option with key "${s}"`);
|
3265
|
+
i = this._sanitizeAndValidateOption(s, i), this.rawOptions[s] !== i && (this.rawOptions[s] = i, this._onOptionChange.fire(s));
|
3013
3266
|
};
|
3014
3267
|
for (const s in this.rawOptions) {
|
3015
|
-
const
|
3016
|
-
Object.defineProperty(this.options, s,
|
3268
|
+
const i = { get: u.bind(this, s), set: e.bind(this, s) };
|
3269
|
+
Object.defineProperty(this.options, s, i);
|
3017
3270
|
}
|
3018
3271
|
}
|
3019
3272
|
_sanitizeAndValidateOption(u, e) {
|
3020
3273
|
switch (u) {
|
3021
3274
|
case "cursorStyle":
|
3022
|
-
if (e || (e =
|
3275
|
+
if (e || (e = r.DEFAULT_OPTIONS[u]), !/* @__PURE__ */ function(s) {
|
3023
3276
|
return s === "block" || s === "underline" || s === "bar";
|
3024
3277
|
}(e)) throw new Error(`"${e}" is not a valid value for ${u}`);
|
3025
3278
|
break;
|
3026
3279
|
case "wordSeparator":
|
3027
|
-
e || (e =
|
3280
|
+
e || (e = r.DEFAULT_OPTIONS[u]);
|
3028
3281
|
break;
|
3029
3282
|
case "fontWeight":
|
3030
3283
|
case "fontWeightBold":
|
3031
3284
|
if (typeof e == "number" && 1 <= e && e <= 1e3) break;
|
3032
|
-
e = c.includes(e) ? e :
|
3285
|
+
e = c.includes(e) ? e : r.DEFAULT_OPTIONS[u];
|
3033
3286
|
break;
|
3034
3287
|
case "cursorWidth":
|
3035
3288
|
e = Math.floor(e);
|
@@ -3057,21 +3310,21 @@ function ve() {
|
|
3057
3310
|
return e;
|
3058
3311
|
}
|
3059
3312
|
}
|
3060
|
-
|
3061
|
-
}, 660: function(
|
3313
|
+
r.OptionsService = a;
|
3314
|
+
}, 660: function(w, r, l) {
|
3062
3315
|
var _ = this && this.__decorate || function(a, h, u, e) {
|
3063
|
-
var s,
|
3316
|
+
var s, i = arguments.length, t = i < 3 ? h : e === null ? e = Object.getOwnPropertyDescriptor(h, u) : e;
|
3064
3317
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") t = Reflect.decorate(a, h, u, e);
|
3065
|
-
else for (var f = a.length - 1; f >= 0; f--) (s = a[f]) && (t = (
|
3066
|
-
return
|
3318
|
+
else for (var f = a.length - 1; f >= 0; f--) (s = a[f]) && (t = (i < 3 ? s(t) : i > 3 ? s(h, u, t) : s(h, u)) || t);
|
3319
|
+
return i > 3 && t && Object.defineProperty(h, u, t), t;
|
3067
3320
|
}, d = this && this.__param || function(a, h) {
|
3068
3321
|
return function(u, e) {
|
3069
3322
|
h(u, e, a);
|
3070
3323
|
};
|
3071
3324
|
};
|
3072
|
-
Object.defineProperty(
|
3325
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.OscLinkService = void 0;
|
3073
3326
|
const n = l(585);
|
3074
|
-
let c =
|
3327
|
+
let c = r.OscLinkService = class {
|
3075
3328
|
constructor(a) {
|
3076
3329
|
this._bufferService = a, this._nextId = 1, this._entriesWithId = /* @__PURE__ */ new Map(), this._dataByLinkId = /* @__PURE__ */ new Map();
|
3077
3330
|
}
|
@@ -3083,8 +3336,8 @@ function ve() {
|
|
3083
3336
|
}
|
3084
3337
|
const u = a, e = this._getEntryIdKey(u), s = this._entriesWithId.get(e);
|
3085
3338
|
if (s) return this.addLineToLink(s.id, h.ybase + h.y), s.id;
|
3086
|
-
const
|
3087
|
-
return
|
3339
|
+
const i = h.addMarker(h.ybase + h.y), t = { id: this._nextId++, key: this._getEntryIdKey(u), data: u, lines: [i] };
|
3340
|
+
return i.onDispose(() => this._removeMarkerFromLink(t, i)), this._entriesWithId.set(t.key, t), this._dataByLinkId.set(t.id, t), t.id;
|
3088
3341
|
}
|
3089
3342
|
addLineToLink(a, h) {
|
3090
3343
|
const u = this._dataByLinkId.get(a);
|
@@ -3104,31 +3357,31 @@ function ve() {
|
|
3104
3357
|
u !== -1 && (a.lines.splice(u, 1), a.lines.length === 0 && (a.data.id !== void 0 && this._entriesWithId.delete(a.key), this._dataByLinkId.delete(a.id)));
|
3105
3358
|
}
|
3106
3359
|
};
|
3107
|
-
|
3108
|
-
}, 343: (
|
3109
|
-
Object.defineProperty(
|
3360
|
+
r.OscLinkService = c = _([d(0, n.IBufferService)], c);
|
3361
|
+
}, 343: (w, r) => {
|
3362
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.createDecorator = r.getServiceDependencies = r.serviceRegistry = void 0;
|
3110
3363
|
const l = "di$target", _ = "di$dependencies";
|
3111
|
-
|
3364
|
+
r.serviceRegistry = /* @__PURE__ */ new Map(), r.getServiceDependencies = function(d) {
|
3112
3365
|
return d[_] || [];
|
3113
|
-
},
|
3114
|
-
if (
|
3366
|
+
}, r.createDecorator = function(d) {
|
3367
|
+
if (r.serviceRegistry.has(d)) return r.serviceRegistry.get(d);
|
3115
3368
|
const n = function(c, a, h) {
|
3116
3369
|
if (arguments.length !== 3) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
|
3117
3370
|
(function(u, e, s) {
|
3118
3371
|
e[l] === e ? e[_].push({ id: u, index: s }) : (e[_] = [{ id: u, index: s }], e[l] = e);
|
3119
3372
|
})(n, c, h);
|
3120
3373
|
};
|
3121
|
-
return n.toString = () => d,
|
3374
|
+
return n.toString = () => d, r.serviceRegistry.set(d, n), n;
|
3122
3375
|
};
|
3123
|
-
}, 585: (
|
3124
|
-
Object.defineProperty(
|
3376
|
+
}, 585: (w, r, l) => {
|
3377
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.IDecorationService = r.IUnicodeService = r.IOscLinkService = r.IOptionsService = r.ILogService = r.LogLevelEnum = r.IInstantiationService = r.ICharsetService = r.ICoreService = r.ICoreMouseService = r.IBufferService = void 0;
|
3125
3378
|
const _ = l(343);
|
3126
3379
|
var d;
|
3127
|
-
|
3380
|
+
r.IBufferService = (0, _.createDecorator)("BufferService"), r.ICoreMouseService = (0, _.createDecorator)("CoreMouseService"), r.ICoreService = (0, _.createDecorator)("CoreService"), r.ICharsetService = (0, _.createDecorator)("CharsetService"), r.IInstantiationService = (0, _.createDecorator)("InstantiationService"), function(n) {
|
3128
3381
|
n[n.TRACE = 0] = "TRACE", n[n.DEBUG = 1] = "DEBUG", n[n.INFO = 2] = "INFO", n[n.WARN = 3] = "WARN", n[n.ERROR = 4] = "ERROR", n[n.OFF = 5] = "OFF";
|
3129
|
-
}(d || (
|
3130
|
-
}, 480: (
|
3131
|
-
Object.defineProperty(
|
3382
|
+
}(d || (r.LogLevelEnum = d = {})), r.ILogService = (0, _.createDecorator)("LogService"), r.IOptionsService = (0, _.createDecorator)("OptionsService"), r.IOscLinkService = (0, _.createDecorator)("OscLinkService"), r.IUnicodeService = (0, _.createDecorator)("UnicodeService"), r.IDecorationService = (0, _.createDecorator)("DecorationService");
|
3383
|
+
}, 480: (w, r, l) => {
|
3384
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.UnicodeService = void 0;
|
3132
3385
|
const _ = l(460), d = l(225);
|
3133
3386
|
class n {
|
3134
3387
|
static extractShouldJoin(a) {
|
@@ -3171,13 +3424,13 @@ function ve() {
|
|
3171
3424
|
let h = 0, u = 0;
|
3172
3425
|
const e = a.length;
|
3173
3426
|
for (let s = 0; s < e; ++s) {
|
3174
|
-
let
|
3175
|
-
if (55296 <=
|
3176
|
-
if (++s >= e) return h + this.wcwidth(
|
3427
|
+
let i = a.charCodeAt(s);
|
3428
|
+
if (55296 <= i && i <= 56319) {
|
3429
|
+
if (++s >= e) return h + this.wcwidth(i);
|
3177
3430
|
const p = a.charCodeAt(s);
|
3178
|
-
56320 <= p && p <= 57343 ?
|
3431
|
+
56320 <= p && p <= 57343 ? i = 1024 * (i - 55296) + p - 56320 + 65536 : h += this.wcwidth(p);
|
3179
3432
|
}
|
3180
|
-
const t = this.charProperties(
|
3433
|
+
const t = this.charProperties(i, u);
|
3181
3434
|
let f = n.extractWidth(t);
|
3182
3435
|
n.extractShouldJoin(t) && (f -= n.extractWidth(u)), h += f, u = t;
|
3183
3436
|
}
|
@@ -3187,9 +3440,9 @@ function ve() {
|
|
3187
3440
|
return this._activeProvider.charProperties(a, h);
|
3188
3441
|
}
|
3189
3442
|
}
|
3190
|
-
|
3191
|
-
}, 781: (
|
3192
|
-
Object.defineProperty(
|
3443
|
+
r.UnicodeService = n;
|
3444
|
+
}, 781: (w, r, l) => {
|
3445
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.Terminal = void 0;
|
3193
3446
|
const _ = l(437), d = l(969), n = l(460);
|
3194
3447
|
class c extends d.CoreTerminal {
|
3195
3448
|
constructor(h = {}) {
|
@@ -3224,30 +3477,30 @@ function ve() {
|
|
3224
3477
|
this.options.rows = this.rows, this.options.cols = this.cols, this._setup(), super.reset();
|
3225
3478
|
}
|
3226
3479
|
}
|
3227
|
-
|
3228
|
-
} },
|
3229
|
-
function
|
3230
|
-
var
|
3231
|
-
if (
|
3232
|
-
var l =
|
3233
|
-
return
|
3480
|
+
r.Terminal = c;
|
3481
|
+
} }, I = {};
|
3482
|
+
function R(w) {
|
3483
|
+
var r = I[w];
|
3484
|
+
if (r !== void 0) return r.exports;
|
3485
|
+
var l = I[w] = { exports: {} };
|
3486
|
+
return $[w].call(l.exports, l, l.exports, R), l.exports;
|
3234
3487
|
}
|
3235
|
-
var
|
3488
|
+
var W = {};
|
3236
3489
|
(() => {
|
3237
|
-
var
|
3238
|
-
Object.defineProperty(
|
3239
|
-
const
|
3490
|
+
var w = W;
|
3491
|
+
Object.defineProperty(w, "__esModule", { value: !0 }), w.Terminal = void 0;
|
3492
|
+
const r = R(285), l = R(975), _ = R(90), d = R(781), n = R(741), c = R(844), a = ["cols", "rows"];
|
3240
3493
|
class h extends c.Disposable {
|
3241
3494
|
constructor(e) {
|
3242
3495
|
super(), this._core = this.register(new d.Terminal(e)), this._addonManager = this.register(new n.AddonManager()), this._publicOptions = { ...this._core.options };
|
3243
|
-
const s = (t) => this._core.options[t],
|
3496
|
+
const s = (t) => this._core.options[t], i = (t, f) => {
|
3244
3497
|
this._checkReadonlyOptions(t), this._core.options[t] = f;
|
3245
3498
|
};
|
3246
3499
|
for (const t in this._core.options) {
|
3247
3500
|
Object.defineProperty(this._publicOptions, t, { get: () => this._core.options[t], set: (p) => {
|
3248
3501
|
this._checkReadonlyOptions(t), this._core.options[t] = p;
|
3249
3502
|
} });
|
3250
|
-
const f = { get: s.bind(this, t), set:
|
3503
|
+
const f = { get: s.bind(this, t), set: i.bind(this, t) };
|
3251
3504
|
Object.defineProperty(this._publicOptions, t, f);
|
3252
3505
|
}
|
3253
3506
|
}
|
@@ -3294,7 +3547,7 @@ function ve() {
|
|
3294
3547
|
return this._core.cols;
|
3295
3548
|
}
|
3296
3549
|
get buffer() {
|
3297
|
-
return this._checkProposedApi(), this._buffer || (this._buffer = this.register(new
|
3550
|
+
return this._checkProposedApi(), this._buffer || (this._buffer = this.register(new r.BufferNamespaceApi(this._core))), this._buffer;
|
3298
3551
|
}
|
3299
3552
|
get markers() {
|
3300
3553
|
return this._checkProposedApi(), this._core.markers;
|
@@ -3373,17 +3626,17 @@ function ve() {
|
|
3373
3626
|
for (const s of e) if (s === 1 / 0 || isNaN(s) || s % 1 != 0) throw new Error("This API only accepts integers");
|
3374
3627
|
}
|
3375
3628
|
}
|
3376
|
-
|
3629
|
+
w.Terminal = h;
|
3377
3630
|
})();
|
3378
|
-
var
|
3379
|
-
for (var
|
3380
|
-
|
3631
|
+
var z = x;
|
3632
|
+
for (var N in W) z[N] = W[N];
|
3633
|
+
W.__esModule && Object.defineProperty(z, "__esModule", { value: !0 });
|
3381
3634
|
})();
|
3382
|
-
}(
|
3635
|
+
}(ie)), ie;
|
3383
3636
|
}
|
3384
|
-
var
|
3385
|
-
function
|
3386
|
-
return new
|
3637
|
+
var Te = Ae();
|
3638
|
+
function ke() {
|
3639
|
+
return new Te.Terminal({
|
3387
3640
|
cols: 1e3,
|
3388
3641
|
rows: 500,
|
3389
3642
|
allowProposedApi: !0,
|
@@ -3392,61 +3645,61 @@ function Se() {
|
|
3392
3645
|
cursorBlink: !1
|
3393
3646
|
});
|
3394
3647
|
}
|
3395
|
-
const
|
3396
|
-
maxCharacterLength:
|
3648
|
+
const Le = {
|
3649
|
+
maxCharacterLength: pe
|
3397
3650
|
};
|
3398
|
-
function
|
3399
|
-
const
|
3400
|
-
for (let
|
3401
|
-
const
|
3402
|
-
if (!
|
3651
|
+
function De(x, $ = Le) {
|
3652
|
+
const I = x.buffer.active, R = [], W = Math.max(0, $.maxCharacterLength);
|
3653
|
+
for (let N = 0; N < I.length; N++) {
|
3654
|
+
const w = I.getLine(N);
|
3655
|
+
if (!w)
|
3403
3656
|
continue;
|
3404
|
-
const
|
3405
|
-
|
3657
|
+
const r = w.translateToString(!1).trimEnd();
|
3658
|
+
r.trim().length === 0 && R.at(-1)?.trim().length === 0 || R.push(r);
|
3406
3659
|
}
|
3407
|
-
let
|
3408
|
-
for (let
|
3409
|
-
const
|
3410
|
-
if (
|
3411
|
-
const l =
|
3660
|
+
let z = 0;
|
3661
|
+
for (let N = R.length - 1; N > 0; N--) {
|
3662
|
+
const w = R[N];
|
3663
|
+
if (z += w.length, z > W) {
|
3664
|
+
const l = N, _ = `Truncated ${l} ${ge(l, "line")} above this point`, d = R.length - N - 1, n = d === 1 ? "Below is the last line of the output" : `Below are the last ${d} lines of the output`;
|
3412
3665
|
return {
|
3413
3666
|
output: [
|
3414
3667
|
`--- ${_}. ${n}. ---`,
|
3415
|
-
...
|
3668
|
+
...R.slice(N)
|
3416
3669
|
].join(`
|
3417
3670
|
`),
|
3418
|
-
hidden_truncatedOutput:
|
3671
|
+
hidden_truncatedOutput: R.slice(0, N).join(`
|
3419
3672
|
`)
|
3420
3673
|
};
|
3421
3674
|
}
|
3422
3675
|
}
|
3423
3676
|
return {
|
3424
|
-
output:
|
3677
|
+
output: R.join(`
|
3425
3678
|
`)
|
3426
3679
|
};
|
3427
3680
|
}
|
3428
|
-
function
|
3429
|
-
const
|
3430
|
-
return
|
3431
|
-
|
3432
|
-
|
3681
|
+
function xe(x, $, I) {
|
3682
|
+
const R = ke();
|
3683
|
+
return Se(
|
3684
|
+
x,
|
3685
|
+
$.settings["terminal.commands.nodeSpawn.loadProfile"]
|
3433
3686
|
).pipe(
|
3434
|
-
|
3435
|
-
(
|
3436
|
-
shell:
|
3437
|
-
cwd:
|
3687
|
+
ae(
|
3688
|
+
(W) => ve(I.cmd, [], {
|
3689
|
+
shell: ce.userInfo().shell || !0,
|
3690
|
+
cwd: x,
|
3438
3691
|
stdio: ["ignore", "pipe", "pipe"],
|
3439
|
-
env:
|
3692
|
+
env: W
|
3440
3693
|
})
|
3441
3694
|
),
|
3442
|
-
|
3443
|
-
new Promise((
|
3444
|
-
const
|
3445
|
-
|
3446
|
-
const { output: l } =
|
3447
|
-
|
3695
|
+
ae(({ lastData: W, exitCode: z, exited: N }) => me(
|
3696
|
+
new Promise((w) => {
|
3697
|
+
const r = W?.subarray() ?? new Uint8Array();
|
3698
|
+
R.write(r, () => {
|
3699
|
+
const { output: l } = De(R);
|
3700
|
+
w(N ? {
|
3448
3701
|
status: "done",
|
3449
|
-
result: { output: l, exitCode:
|
3702
|
+
result: { output: l, exitCode: z ?? -1 }
|
3450
3703
|
} : {
|
3451
3704
|
status: "in-progress",
|
3452
3705
|
progress: { output: l }
|
@@ -3456,46 +3709,50 @@ function ye(W, G, X) {
|
|
3456
3709
|
))
|
3457
3710
|
);
|
3458
3711
|
}
|
3459
|
-
const
|
3460
|
-
|
3461
|
-
const
|
3712
|
+
const Fe = ({ args: x, userInput: $ }, { dir: I, dirs: R, config: W, toolMessages: z }) => {
|
3713
|
+
be(I);
|
3714
|
+
const N = ue(I.fsPath, x.cwd ? Pe(x.cwd) : "."), w = (c) => ({
|
3462
3715
|
status: "done",
|
3463
3716
|
result: {
|
3464
|
-
output: `Error: ${
|
3717
|
+
output: `Error: ${c}`,
|
3465
3718
|
exitCode: 1
|
3466
3719
|
}
|
3467
|
-
}),
|
3468
|
-
if (
|
3469
|
-
return
|
3470
|
-
const
|
3471
|
-
if (
|
3472
|
-
return
|
3473
|
-
const
|
3474
|
-
|
3720
|
+
}), r = He(x.cmd);
|
3721
|
+
if (r)
|
3722
|
+
return se.of(w(r));
|
3723
|
+
const l = Re(N);
|
3724
|
+
if (l)
|
3725
|
+
return se.of(w(l));
|
3726
|
+
const _ = [N, ...R.map((c) => c.fsPath)], d = Ee(x.cmd, _, {
|
3727
|
+
config: W.settings
|
3728
|
+
}), n = d.parts.flatMap(
|
3729
|
+
(c) => (
|
3475
3730
|
// Only offer adding to allowlist when parsable, non-dynamic, and within cwd.
|
3476
|
-
|
3731
|
+
c.requiresConfirmation ? typeof c.command == "string" || c.command.program === ne || c.command.arguments.some(
|
3732
|
+
(a) => a === ne || le(a, _)
|
3733
|
+
) ? [] : [c.command.program] : []
|
3477
3734
|
)
|
3478
3735
|
);
|
3479
|
-
if (
|
3480
|
-
if (
|
3481
|
-
return
|
3482
|
-
if (
|
3483
|
-
return
|
3736
|
+
if (d.requiresConfirmation) {
|
3737
|
+
if ($ && !$.accepted)
|
3738
|
+
return se.of({ status: "rejected-by-user", toAllow: n });
|
3739
|
+
if (!$?.accepted)
|
3740
|
+
return se.of({ status: "blocked-on-user", toAllow: n });
|
3484
3741
|
}
|
3485
|
-
return
|
3486
|
-
},
|
3487
|
-
function
|
3488
|
-
return
|
3742
|
+
return W.settings["terminal.commands.environment"], xe(N, W, x);
|
3743
|
+
}, he = ce.homedir();
|
3744
|
+
function Pe(x) {
|
3745
|
+
return he ? x.replace(/^~(?=$|\/|\\)/, he) : x;
|
3489
3746
|
}
|
3490
|
-
function
|
3491
|
-
if (typeof
|
3747
|
+
function He(x) {
|
3748
|
+
if (typeof x != "string")
|
3492
3749
|
return "`cmd` must be a string representing a command.";
|
3493
3750
|
}
|
3494
|
-
function
|
3495
|
-
if (
|
3751
|
+
function Re(x) {
|
3752
|
+
if (x !== void 0 && typeof x != "string")
|
3496
3753
|
return "`cwd` must be a string representing a relative path within the workspace.";
|
3497
3754
|
}
|
3498
3755
|
export {
|
3499
|
-
|
3756
|
+
Fe as nodeBashTool
|
3500
3757
|
};
|
3501
|
-
//# sourceMappingURL=node-
|
3758
|
+
//# sourceMappingURL=node-UKopbCpJ.js.map
|