monaco-editor11 1.2.4 → 1.2.6
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/css.worker-wrapper.d.ts +2 -0
- package/dist/css.worker.mjs +34360 -0
- package/dist/editor.worker-wrapper.d.ts +2 -0
- package/dist/editor.worker.mjs +8 -0
- package/dist/index-CrPgw_Bc.mjs +1443 -0
- package/dist/initialize-CGhjAWpj.mjs +9105 -0
- package/dist/json.worker-wrapper.d.ts +2 -0
- package/dist/json.worker.mjs +4039 -0
- package/dist/ts.worker-wrapper.d.ts +2 -0
- package/dist/ts.worker.mjs +227506 -0
- package/dist/worker-wrapper.d.ts +2 -0
- package/package.json +3 -3
- package/dist/monaco-editor11.umd.js +0 -1
- /package/dist/{monaco-editor11.es.js → app.mjs} +0 -0
|
@@ -0,0 +1,1443 @@
|
|
|
1
|
+
var mt = Object.defineProperty;
|
|
2
|
+
var bt = (t, r, i) => r in t ? mt(t, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[r] = i;
|
|
3
|
+
var M = (t, r, i) => bt(t, typeof r != "symbol" ? r + "" : r, i);
|
|
4
|
+
var de;
|
|
5
|
+
(function(t) {
|
|
6
|
+
function r(i) {
|
|
7
|
+
return typeof i == "string";
|
|
8
|
+
}
|
|
9
|
+
t.is = r;
|
|
10
|
+
})(de || (de = {}));
|
|
11
|
+
var G;
|
|
12
|
+
(function(t) {
|
|
13
|
+
function r(i) {
|
|
14
|
+
return typeof i == "string";
|
|
15
|
+
}
|
|
16
|
+
t.is = r;
|
|
17
|
+
})(G || (G = {}));
|
|
18
|
+
var he;
|
|
19
|
+
(function(t) {
|
|
20
|
+
t.MIN_VALUE = -2147483648, t.MAX_VALUE = 2147483647;
|
|
21
|
+
function r(i) {
|
|
22
|
+
return typeof i == "number" && t.MIN_VALUE <= i && i <= t.MAX_VALUE;
|
|
23
|
+
}
|
|
24
|
+
t.is = r;
|
|
25
|
+
})(he || (he = {}));
|
|
26
|
+
var z;
|
|
27
|
+
(function(t) {
|
|
28
|
+
t.MIN_VALUE = 0, t.MAX_VALUE = 2147483647;
|
|
29
|
+
function r(i) {
|
|
30
|
+
return typeof i == "number" && t.MIN_VALUE <= i && i <= t.MAX_VALUE;
|
|
31
|
+
}
|
|
32
|
+
t.is = r;
|
|
33
|
+
})(z || (z = {}));
|
|
34
|
+
var P;
|
|
35
|
+
(function(t) {
|
|
36
|
+
function r(n, e) {
|
|
37
|
+
return n === Number.MAX_VALUE && (n = z.MAX_VALUE), e === Number.MAX_VALUE && (e = z.MAX_VALUE), { line: n, character: e };
|
|
38
|
+
}
|
|
39
|
+
t.create = r;
|
|
40
|
+
function i(n) {
|
|
41
|
+
let e = n;
|
|
42
|
+
return s.objectLiteral(e) && s.uinteger(e.line) && s.uinteger(e.character);
|
|
43
|
+
}
|
|
44
|
+
t.is = i;
|
|
45
|
+
})(P || (P = {}));
|
|
46
|
+
var I;
|
|
47
|
+
(function(t) {
|
|
48
|
+
function r(n, e, a, c) {
|
|
49
|
+
if (s.uinteger(n) && s.uinteger(e) && s.uinteger(a) && s.uinteger(c))
|
|
50
|
+
return { start: P.create(n, e), end: P.create(a, c) };
|
|
51
|
+
if (P.is(n) && P.is(e))
|
|
52
|
+
return { start: n, end: e };
|
|
53
|
+
throw new Error(`Range#create called with invalid arguments[${n}, ${e}, ${a}, ${c}]`);
|
|
54
|
+
}
|
|
55
|
+
t.create = r;
|
|
56
|
+
function i(n) {
|
|
57
|
+
let e = n;
|
|
58
|
+
return s.objectLiteral(e) && P.is(e.start) && P.is(e.end);
|
|
59
|
+
}
|
|
60
|
+
t.is = i;
|
|
61
|
+
})(I || (I = {}));
|
|
62
|
+
var B;
|
|
63
|
+
(function(t) {
|
|
64
|
+
function r(n, e) {
|
|
65
|
+
return { uri: n, range: e };
|
|
66
|
+
}
|
|
67
|
+
t.create = r;
|
|
68
|
+
function i(n) {
|
|
69
|
+
let e = n;
|
|
70
|
+
return s.objectLiteral(e) && I.is(e.range) && (s.string(e.uri) || s.undefined(e.uri));
|
|
71
|
+
}
|
|
72
|
+
t.is = i;
|
|
73
|
+
})(B || (B = {}));
|
|
74
|
+
var ge;
|
|
75
|
+
(function(t) {
|
|
76
|
+
function r(n, e, a, c) {
|
|
77
|
+
return { targetUri: n, targetRange: e, targetSelectionRange: a, originSelectionRange: c };
|
|
78
|
+
}
|
|
79
|
+
t.create = r;
|
|
80
|
+
function i(n) {
|
|
81
|
+
let e = n;
|
|
82
|
+
return s.objectLiteral(e) && I.is(e.targetRange) && s.string(e.targetUri) && I.is(e.targetSelectionRange) && (I.is(e.originSelectionRange) || s.undefined(e.originSelectionRange));
|
|
83
|
+
}
|
|
84
|
+
t.is = i;
|
|
85
|
+
})(ge || (ge = {}));
|
|
86
|
+
var Y;
|
|
87
|
+
(function(t) {
|
|
88
|
+
function r(n, e, a, c) {
|
|
89
|
+
return {
|
|
90
|
+
red: n,
|
|
91
|
+
green: e,
|
|
92
|
+
blue: a,
|
|
93
|
+
alpha: c
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
t.create = r;
|
|
97
|
+
function i(n) {
|
|
98
|
+
const e = n;
|
|
99
|
+
return s.objectLiteral(e) && s.numberRange(e.red, 0, 1) && s.numberRange(e.green, 0, 1) && s.numberRange(e.blue, 0, 1) && s.numberRange(e.alpha, 0, 1);
|
|
100
|
+
}
|
|
101
|
+
t.is = i;
|
|
102
|
+
})(Y || (Y = {}));
|
|
103
|
+
var pe;
|
|
104
|
+
(function(t) {
|
|
105
|
+
function r(n, e) {
|
|
106
|
+
return {
|
|
107
|
+
range: n,
|
|
108
|
+
color: e
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
t.create = r;
|
|
112
|
+
function i(n) {
|
|
113
|
+
const e = n;
|
|
114
|
+
return s.objectLiteral(e) && I.is(e.range) && Y.is(e.color);
|
|
115
|
+
}
|
|
116
|
+
t.is = i;
|
|
117
|
+
})(pe || (pe = {}));
|
|
118
|
+
var ve;
|
|
119
|
+
(function(t) {
|
|
120
|
+
function r(n, e, a) {
|
|
121
|
+
return {
|
|
122
|
+
label: n,
|
|
123
|
+
textEdit: e,
|
|
124
|
+
additionalTextEdits: a
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
t.create = r;
|
|
128
|
+
function i(n) {
|
|
129
|
+
const e = n;
|
|
130
|
+
return s.objectLiteral(e) && s.string(e.label) && (s.undefined(e.textEdit) || N.is(e)) && (s.undefined(e.additionalTextEdits) || s.typedArray(e.additionalTextEdits, N.is));
|
|
131
|
+
}
|
|
132
|
+
t.is = i;
|
|
133
|
+
})(ve || (ve = {}));
|
|
134
|
+
var me;
|
|
135
|
+
(function(t) {
|
|
136
|
+
t.Comment = "comment", t.Imports = "imports", t.Region = "region";
|
|
137
|
+
})(me || (me = {}));
|
|
138
|
+
var be;
|
|
139
|
+
(function(t) {
|
|
140
|
+
function r(n, e, a, c, p, u) {
|
|
141
|
+
const o = {
|
|
142
|
+
startLine: n,
|
|
143
|
+
endLine: e
|
|
144
|
+
};
|
|
145
|
+
return s.defined(a) && (o.startCharacter = a), s.defined(c) && (o.endCharacter = c), s.defined(p) && (o.kind = p), s.defined(u) && (o.collapsedText = u), o;
|
|
146
|
+
}
|
|
147
|
+
t.create = r;
|
|
148
|
+
function i(n) {
|
|
149
|
+
const e = n;
|
|
150
|
+
return s.objectLiteral(e) && s.uinteger(e.startLine) && s.uinteger(e.startLine) && (s.undefined(e.startCharacter) || s.uinteger(e.startCharacter)) && (s.undefined(e.endCharacter) || s.uinteger(e.endCharacter)) && (s.undefined(e.kind) || s.string(e.kind));
|
|
151
|
+
}
|
|
152
|
+
t.is = i;
|
|
153
|
+
})(be || (be = {}));
|
|
154
|
+
var S;
|
|
155
|
+
(function(t) {
|
|
156
|
+
function r(n, e) {
|
|
157
|
+
return {
|
|
158
|
+
location: n,
|
|
159
|
+
message: e
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
t.create = r;
|
|
163
|
+
function i(n) {
|
|
164
|
+
let e = n;
|
|
165
|
+
return s.defined(e) && B.is(e.location) && s.string(e.message);
|
|
166
|
+
}
|
|
167
|
+
t.is = i;
|
|
168
|
+
})(S || (S = {}));
|
|
169
|
+
var ye;
|
|
170
|
+
(function(t) {
|
|
171
|
+
t.Error = 1, t.Warning = 2, t.Information = 3, t.Hint = 4;
|
|
172
|
+
})(ye || (ye = {}));
|
|
173
|
+
var Ae;
|
|
174
|
+
(function(t) {
|
|
175
|
+
t.Unnecessary = 1, t.Deprecated = 2;
|
|
176
|
+
})(Ae || (Ae = {}));
|
|
177
|
+
var xe;
|
|
178
|
+
(function(t) {
|
|
179
|
+
function r(i) {
|
|
180
|
+
const n = i;
|
|
181
|
+
return s.objectLiteral(n) && s.string(n.href);
|
|
182
|
+
}
|
|
183
|
+
t.is = r;
|
|
184
|
+
})(xe || (xe = {}));
|
|
185
|
+
var J;
|
|
186
|
+
(function(t) {
|
|
187
|
+
function r(n, e, a, c, p, u) {
|
|
188
|
+
let o = { range: n, message: e };
|
|
189
|
+
return s.defined(a) && (o.severity = a), s.defined(c) && (o.code = c), s.defined(p) && (o.source = p), s.defined(u) && (o.relatedInformation = u), o;
|
|
190
|
+
}
|
|
191
|
+
t.create = r;
|
|
192
|
+
function i(n) {
|
|
193
|
+
var e;
|
|
194
|
+
let a = n;
|
|
195
|
+
return s.defined(a) && I.is(a.range) && s.string(a.message) && (s.number(a.severity) || s.undefined(a.severity)) && (s.integer(a.code) || s.string(a.code) || s.undefined(a.code)) && (s.undefined(a.codeDescription) || s.string((e = a.codeDescription) === null || e === void 0 ? void 0 : e.href)) && (s.string(a.source) || s.undefined(a.source)) && (s.undefined(a.relatedInformation) || s.typedArray(a.relatedInformation, S.is));
|
|
196
|
+
}
|
|
197
|
+
t.is = i;
|
|
198
|
+
})(J || (J = {}));
|
|
199
|
+
var $;
|
|
200
|
+
(function(t) {
|
|
201
|
+
function r(n, e, ...a) {
|
|
202
|
+
let c = { title: n, command: e };
|
|
203
|
+
return s.defined(a) && a.length > 0 && (c.arguments = a), c;
|
|
204
|
+
}
|
|
205
|
+
t.create = r;
|
|
206
|
+
function i(n) {
|
|
207
|
+
let e = n;
|
|
208
|
+
return s.defined(e) && s.string(e.title) && s.string(e.command);
|
|
209
|
+
}
|
|
210
|
+
t.is = i;
|
|
211
|
+
})($ || ($ = {}));
|
|
212
|
+
var N;
|
|
213
|
+
(function(t) {
|
|
214
|
+
function r(a, c) {
|
|
215
|
+
return { range: a, newText: c };
|
|
216
|
+
}
|
|
217
|
+
t.replace = r;
|
|
218
|
+
function i(a, c) {
|
|
219
|
+
return { range: { start: a, end: a }, newText: c };
|
|
220
|
+
}
|
|
221
|
+
t.insert = i;
|
|
222
|
+
function n(a) {
|
|
223
|
+
return { range: a, newText: "" };
|
|
224
|
+
}
|
|
225
|
+
t.del = n;
|
|
226
|
+
function e(a) {
|
|
227
|
+
const c = a;
|
|
228
|
+
return s.objectLiteral(c) && s.string(c.newText) && I.is(c.range);
|
|
229
|
+
}
|
|
230
|
+
t.is = e;
|
|
231
|
+
})(N || (N = {}));
|
|
232
|
+
var T;
|
|
233
|
+
(function(t) {
|
|
234
|
+
function r(n, e, a) {
|
|
235
|
+
const c = { label: n };
|
|
236
|
+
return e !== void 0 && (c.needsConfirmation = e), a !== void 0 && (c.description = a), c;
|
|
237
|
+
}
|
|
238
|
+
t.create = r;
|
|
239
|
+
function i(n) {
|
|
240
|
+
const e = n;
|
|
241
|
+
return s.objectLiteral(e) && s.string(e.label) && (s.boolean(e.needsConfirmation) || e.needsConfirmation === void 0) && (s.string(e.description) || e.description === void 0);
|
|
242
|
+
}
|
|
243
|
+
t.is = i;
|
|
244
|
+
})(T || (T = {}));
|
|
245
|
+
var V;
|
|
246
|
+
(function(t) {
|
|
247
|
+
function r(i) {
|
|
248
|
+
const n = i;
|
|
249
|
+
return s.string(n);
|
|
250
|
+
}
|
|
251
|
+
t.is = r;
|
|
252
|
+
})(V || (V = {}));
|
|
253
|
+
var we;
|
|
254
|
+
(function(t) {
|
|
255
|
+
function r(a, c, p) {
|
|
256
|
+
return { range: a, newText: c, annotationId: p };
|
|
257
|
+
}
|
|
258
|
+
t.replace = r;
|
|
259
|
+
function i(a, c, p) {
|
|
260
|
+
return { range: { start: a, end: a }, newText: c, annotationId: p };
|
|
261
|
+
}
|
|
262
|
+
t.insert = i;
|
|
263
|
+
function n(a, c) {
|
|
264
|
+
return { range: a, newText: "", annotationId: c };
|
|
265
|
+
}
|
|
266
|
+
t.del = n;
|
|
267
|
+
function e(a) {
|
|
268
|
+
const c = a;
|
|
269
|
+
return N.is(c) && (T.is(c.annotationId) || V.is(c.annotationId));
|
|
270
|
+
}
|
|
271
|
+
t.is = e;
|
|
272
|
+
})(we || (we = {}));
|
|
273
|
+
var K;
|
|
274
|
+
(function(t) {
|
|
275
|
+
function r(n, e) {
|
|
276
|
+
return { textDocument: n, edits: e };
|
|
277
|
+
}
|
|
278
|
+
t.create = r;
|
|
279
|
+
function i(n) {
|
|
280
|
+
let e = n;
|
|
281
|
+
return s.defined(e) && ie.is(e.textDocument) && Array.isArray(e.edits);
|
|
282
|
+
}
|
|
283
|
+
t.is = i;
|
|
284
|
+
})(K || (K = {}));
|
|
285
|
+
var ee;
|
|
286
|
+
(function(t) {
|
|
287
|
+
function r(n, e, a) {
|
|
288
|
+
let c = {
|
|
289
|
+
kind: "create",
|
|
290
|
+
uri: n
|
|
291
|
+
};
|
|
292
|
+
return e !== void 0 && (e.overwrite !== void 0 || e.ignoreIfExists !== void 0) && (c.options = e), a !== void 0 && (c.annotationId = a), c;
|
|
293
|
+
}
|
|
294
|
+
t.create = r;
|
|
295
|
+
function i(n) {
|
|
296
|
+
let e = n;
|
|
297
|
+
return e && e.kind === "create" && s.string(e.uri) && (e.options === void 0 || (e.options.overwrite === void 0 || s.boolean(e.options.overwrite)) && (e.options.ignoreIfExists === void 0 || s.boolean(e.options.ignoreIfExists))) && (e.annotationId === void 0 || V.is(e.annotationId));
|
|
298
|
+
}
|
|
299
|
+
t.is = i;
|
|
300
|
+
})(ee || (ee = {}));
|
|
301
|
+
var te;
|
|
302
|
+
(function(t) {
|
|
303
|
+
function r(n, e, a, c) {
|
|
304
|
+
let p = {
|
|
305
|
+
kind: "rename",
|
|
306
|
+
oldUri: n,
|
|
307
|
+
newUri: e
|
|
308
|
+
};
|
|
309
|
+
return a !== void 0 && (a.overwrite !== void 0 || a.ignoreIfExists !== void 0) && (p.options = a), c !== void 0 && (p.annotationId = c), p;
|
|
310
|
+
}
|
|
311
|
+
t.create = r;
|
|
312
|
+
function i(n) {
|
|
313
|
+
let e = n;
|
|
314
|
+
return e && e.kind === "rename" && s.string(e.oldUri) && s.string(e.newUri) && (e.options === void 0 || (e.options.overwrite === void 0 || s.boolean(e.options.overwrite)) && (e.options.ignoreIfExists === void 0 || s.boolean(e.options.ignoreIfExists))) && (e.annotationId === void 0 || V.is(e.annotationId));
|
|
315
|
+
}
|
|
316
|
+
t.is = i;
|
|
317
|
+
})(te || (te = {}));
|
|
318
|
+
var ne;
|
|
319
|
+
(function(t) {
|
|
320
|
+
function r(n, e, a) {
|
|
321
|
+
let c = {
|
|
322
|
+
kind: "delete",
|
|
323
|
+
uri: n
|
|
324
|
+
};
|
|
325
|
+
return e !== void 0 && (e.recursive !== void 0 || e.ignoreIfNotExists !== void 0) && (c.options = e), a !== void 0 && (c.annotationId = a), c;
|
|
326
|
+
}
|
|
327
|
+
t.create = r;
|
|
328
|
+
function i(n) {
|
|
329
|
+
let e = n;
|
|
330
|
+
return e && e.kind === "delete" && s.string(e.uri) && (e.options === void 0 || (e.options.recursive === void 0 || s.boolean(e.options.recursive)) && (e.options.ignoreIfNotExists === void 0 || s.boolean(e.options.ignoreIfNotExists))) && (e.annotationId === void 0 || V.is(e.annotationId));
|
|
331
|
+
}
|
|
332
|
+
t.is = i;
|
|
333
|
+
})(ne || (ne = {}));
|
|
334
|
+
var re;
|
|
335
|
+
(function(t) {
|
|
336
|
+
function r(i) {
|
|
337
|
+
let n = i;
|
|
338
|
+
return n && (n.changes !== void 0 || n.documentChanges !== void 0) && (n.documentChanges === void 0 || n.documentChanges.every((e) => s.string(e.kind) ? ee.is(e) || te.is(e) || ne.is(e) : K.is(e)));
|
|
339
|
+
}
|
|
340
|
+
t.is = r;
|
|
341
|
+
})(re || (re = {}));
|
|
342
|
+
var _e;
|
|
343
|
+
(function(t) {
|
|
344
|
+
function r(n) {
|
|
345
|
+
return { uri: n };
|
|
346
|
+
}
|
|
347
|
+
t.create = r;
|
|
348
|
+
function i(n) {
|
|
349
|
+
let e = n;
|
|
350
|
+
return s.defined(e) && s.string(e.uri);
|
|
351
|
+
}
|
|
352
|
+
t.is = i;
|
|
353
|
+
})(_e || (_e = {}));
|
|
354
|
+
var Le;
|
|
355
|
+
(function(t) {
|
|
356
|
+
function r(n, e) {
|
|
357
|
+
return { uri: n, version: e };
|
|
358
|
+
}
|
|
359
|
+
t.create = r;
|
|
360
|
+
function i(n) {
|
|
361
|
+
let e = n;
|
|
362
|
+
return s.defined(e) && s.string(e.uri) && s.integer(e.version);
|
|
363
|
+
}
|
|
364
|
+
t.is = i;
|
|
365
|
+
})(Le || (Le = {}));
|
|
366
|
+
var ie;
|
|
367
|
+
(function(t) {
|
|
368
|
+
function r(n, e) {
|
|
369
|
+
return { uri: n, version: e };
|
|
370
|
+
}
|
|
371
|
+
t.create = r;
|
|
372
|
+
function i(n) {
|
|
373
|
+
let e = n;
|
|
374
|
+
return s.defined(e) && s.string(e.uri) && (e.version === null || s.integer(e.version));
|
|
375
|
+
}
|
|
376
|
+
t.is = i;
|
|
377
|
+
})(ie || (ie = {}));
|
|
378
|
+
var Ie;
|
|
379
|
+
(function(t) {
|
|
380
|
+
function r(n, e, a, c) {
|
|
381
|
+
return { uri: n, languageId: e, version: a, text: c };
|
|
382
|
+
}
|
|
383
|
+
t.create = r;
|
|
384
|
+
function i(n) {
|
|
385
|
+
let e = n;
|
|
386
|
+
return s.defined(e) && s.string(e.uri) && s.string(e.languageId) && s.integer(e.version) && s.string(e.text);
|
|
387
|
+
}
|
|
388
|
+
t.is = i;
|
|
389
|
+
})(Ie || (Ie = {}));
|
|
390
|
+
var ae;
|
|
391
|
+
(function(t) {
|
|
392
|
+
t.PlainText = "plaintext", t.Markdown = "markdown";
|
|
393
|
+
function r(i) {
|
|
394
|
+
const n = i;
|
|
395
|
+
return n === t.PlainText || n === t.Markdown;
|
|
396
|
+
}
|
|
397
|
+
t.is = r;
|
|
398
|
+
})(ae || (ae = {}));
|
|
399
|
+
var F;
|
|
400
|
+
(function(t) {
|
|
401
|
+
function r(i) {
|
|
402
|
+
const n = i;
|
|
403
|
+
return s.objectLiteral(i) && ae.is(n.kind) && s.string(n.value);
|
|
404
|
+
}
|
|
405
|
+
t.is = r;
|
|
406
|
+
})(F || (F = {}));
|
|
407
|
+
var Oe;
|
|
408
|
+
(function(t) {
|
|
409
|
+
t.Text = 1, t.Method = 2, t.Function = 3, t.Constructor = 4, t.Field = 5, t.Variable = 6, t.Class = 7, t.Interface = 8, t.Module = 9, t.Property = 10, t.Unit = 11, t.Value = 12, t.Enum = 13, t.Keyword = 14, t.Snippet = 15, t.Color = 16, t.File = 17, t.Reference = 18, t.Folder = 19, t.EnumMember = 20, t.Constant = 21, t.Struct = 22, t.Event = 23, t.Operator = 24, t.TypeParameter = 25;
|
|
410
|
+
})(Oe || (Oe = {}));
|
|
411
|
+
var Ce;
|
|
412
|
+
(function(t) {
|
|
413
|
+
t.PlainText = 1, t.Snippet = 2;
|
|
414
|
+
})(Ce || (Ce = {}));
|
|
415
|
+
var je;
|
|
416
|
+
(function(t) {
|
|
417
|
+
t.Deprecated = 1;
|
|
418
|
+
})(je || (je = {}));
|
|
419
|
+
var Ee;
|
|
420
|
+
(function(t) {
|
|
421
|
+
function r(n, e, a) {
|
|
422
|
+
return { newText: n, insert: e, replace: a };
|
|
423
|
+
}
|
|
424
|
+
t.create = r;
|
|
425
|
+
function i(n) {
|
|
426
|
+
const e = n;
|
|
427
|
+
return e && s.string(e.newText) && I.is(e.insert) && I.is(e.replace);
|
|
428
|
+
}
|
|
429
|
+
t.is = i;
|
|
430
|
+
})(Ee || (Ee = {}));
|
|
431
|
+
var Pe;
|
|
432
|
+
(function(t) {
|
|
433
|
+
t.asIs = 1, t.adjustIndentation = 2;
|
|
434
|
+
})(Pe || (Pe = {}));
|
|
435
|
+
var Ue;
|
|
436
|
+
(function(t) {
|
|
437
|
+
function r(i) {
|
|
438
|
+
const n = i;
|
|
439
|
+
return n && (s.string(n.detail) || n.detail === void 0) && (s.string(n.description) || n.description === void 0);
|
|
440
|
+
}
|
|
441
|
+
t.is = r;
|
|
442
|
+
})(Ue || (Ue = {}));
|
|
443
|
+
var Re;
|
|
444
|
+
(function(t) {
|
|
445
|
+
function r(i) {
|
|
446
|
+
return { label: i };
|
|
447
|
+
}
|
|
448
|
+
t.create = r;
|
|
449
|
+
})(Re || (Re = {}));
|
|
450
|
+
var Me;
|
|
451
|
+
(function(t) {
|
|
452
|
+
function r(i, n) {
|
|
453
|
+
return { items: i || [], isIncomplete: !!n };
|
|
454
|
+
}
|
|
455
|
+
t.create = r;
|
|
456
|
+
})(Me || (Me = {}));
|
|
457
|
+
var Z;
|
|
458
|
+
(function(t) {
|
|
459
|
+
function r(n) {
|
|
460
|
+
return n.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&");
|
|
461
|
+
}
|
|
462
|
+
t.fromPlainText = r;
|
|
463
|
+
function i(n) {
|
|
464
|
+
const e = n;
|
|
465
|
+
return s.string(e) || s.objectLiteral(e) && s.string(e.language) && s.string(e.value);
|
|
466
|
+
}
|
|
467
|
+
t.is = i;
|
|
468
|
+
})(Z || (Z = {}));
|
|
469
|
+
var $e;
|
|
470
|
+
(function(t) {
|
|
471
|
+
function r(i) {
|
|
472
|
+
let n = i;
|
|
473
|
+
return !!n && s.objectLiteral(n) && (F.is(n.contents) || Z.is(n.contents) || s.typedArray(n.contents, Z.is)) && (i.range === void 0 || I.is(i.range));
|
|
474
|
+
}
|
|
475
|
+
t.is = r;
|
|
476
|
+
})($e || ($e = {}));
|
|
477
|
+
var Ne;
|
|
478
|
+
(function(t) {
|
|
479
|
+
function r(i, n) {
|
|
480
|
+
return n ? { label: i, documentation: n } : { label: i };
|
|
481
|
+
}
|
|
482
|
+
t.create = r;
|
|
483
|
+
})(Ne || (Ne = {}));
|
|
484
|
+
var Ve;
|
|
485
|
+
(function(t) {
|
|
486
|
+
function r(i, n, ...e) {
|
|
487
|
+
let a = { label: i };
|
|
488
|
+
return s.defined(n) && (a.documentation = n), s.defined(e) ? a.parameters = e : a.parameters = [], a;
|
|
489
|
+
}
|
|
490
|
+
t.create = r;
|
|
491
|
+
})(Ve || (Ve = {}));
|
|
492
|
+
var qe;
|
|
493
|
+
(function(t) {
|
|
494
|
+
t.Text = 1, t.Read = 2, t.Write = 3;
|
|
495
|
+
})(qe || (qe = {}));
|
|
496
|
+
var Fe;
|
|
497
|
+
(function(t) {
|
|
498
|
+
function r(i, n) {
|
|
499
|
+
let e = { range: i };
|
|
500
|
+
return s.number(n) && (e.kind = n), e;
|
|
501
|
+
}
|
|
502
|
+
t.create = r;
|
|
503
|
+
})(Fe || (Fe = {}));
|
|
504
|
+
var ke;
|
|
505
|
+
(function(t) {
|
|
506
|
+
t.File = 1, t.Module = 2, t.Namespace = 3, t.Package = 4, t.Class = 5, t.Method = 6, t.Property = 7, t.Field = 8, t.Constructor = 9, t.Enum = 10, t.Interface = 11, t.Function = 12, t.Variable = 13, t.Constant = 14, t.String = 15, t.Number = 16, t.Boolean = 17, t.Array = 18, t.Object = 19, t.Key = 20, t.Null = 21, t.EnumMember = 22, t.Struct = 23, t.Event = 24, t.Operator = 25, t.TypeParameter = 26;
|
|
507
|
+
})(ke || (ke = {}));
|
|
508
|
+
var De;
|
|
509
|
+
(function(t) {
|
|
510
|
+
t.Deprecated = 1;
|
|
511
|
+
})(De || (De = {}));
|
|
512
|
+
var We;
|
|
513
|
+
(function(t) {
|
|
514
|
+
function r(i, n, e, a, c) {
|
|
515
|
+
let p = {
|
|
516
|
+
name: i,
|
|
517
|
+
kind: n,
|
|
518
|
+
location: { uri: a, range: e }
|
|
519
|
+
};
|
|
520
|
+
return c && (p.containerName = c), p;
|
|
521
|
+
}
|
|
522
|
+
t.create = r;
|
|
523
|
+
})(We || (We = {}));
|
|
524
|
+
var Xe;
|
|
525
|
+
(function(t) {
|
|
526
|
+
function r(i, n, e, a) {
|
|
527
|
+
return a !== void 0 ? { name: i, kind: n, location: { uri: e, range: a } } : { name: i, kind: n, location: { uri: e } };
|
|
528
|
+
}
|
|
529
|
+
t.create = r;
|
|
530
|
+
})(Xe || (Xe = {}));
|
|
531
|
+
var ze;
|
|
532
|
+
(function(t) {
|
|
533
|
+
function r(n, e, a, c, p, u) {
|
|
534
|
+
let o = {
|
|
535
|
+
name: n,
|
|
536
|
+
detail: e,
|
|
537
|
+
kind: a,
|
|
538
|
+
range: c,
|
|
539
|
+
selectionRange: p
|
|
540
|
+
};
|
|
541
|
+
return u !== void 0 && (o.children = u), o;
|
|
542
|
+
}
|
|
543
|
+
t.create = r;
|
|
544
|
+
function i(n) {
|
|
545
|
+
let e = n;
|
|
546
|
+
return e && s.string(e.name) && s.number(e.kind) && I.is(e.range) && I.is(e.selectionRange) && (e.detail === void 0 || s.string(e.detail)) && (e.deprecated === void 0 || s.boolean(e.deprecated)) && (e.children === void 0 || Array.isArray(e.children)) && (e.tags === void 0 || Array.isArray(e.tags));
|
|
547
|
+
}
|
|
548
|
+
t.is = i;
|
|
549
|
+
})(ze || (ze = {}));
|
|
550
|
+
var Be;
|
|
551
|
+
(function(t) {
|
|
552
|
+
t.Empty = "", t.QuickFix = "quickfix", t.Refactor = "refactor", t.RefactorExtract = "refactor.extract", t.RefactorInline = "refactor.inline", t.RefactorRewrite = "refactor.rewrite", t.Source = "source", t.SourceOrganizeImports = "source.organizeImports", t.SourceFixAll = "source.fixAll";
|
|
553
|
+
})(Be || (Be = {}));
|
|
554
|
+
var H;
|
|
555
|
+
(function(t) {
|
|
556
|
+
t.Invoked = 1, t.Automatic = 2;
|
|
557
|
+
})(H || (H = {}));
|
|
558
|
+
var Je;
|
|
559
|
+
(function(t) {
|
|
560
|
+
function r(n, e, a) {
|
|
561
|
+
let c = { diagnostics: n };
|
|
562
|
+
return e != null && (c.only = e), a != null && (c.triggerKind = a), c;
|
|
563
|
+
}
|
|
564
|
+
t.create = r;
|
|
565
|
+
function i(n) {
|
|
566
|
+
let e = n;
|
|
567
|
+
return s.defined(e) && s.typedArray(e.diagnostics, J.is) && (e.only === void 0 || s.typedArray(e.only, s.string)) && (e.triggerKind === void 0 || e.triggerKind === H.Invoked || e.triggerKind === H.Automatic);
|
|
568
|
+
}
|
|
569
|
+
t.is = i;
|
|
570
|
+
})(Je || (Je = {}));
|
|
571
|
+
var Ze;
|
|
572
|
+
(function(t) {
|
|
573
|
+
function r(n, e, a) {
|
|
574
|
+
let c = { title: n }, p = !0;
|
|
575
|
+
return typeof e == "string" ? (p = !1, c.kind = e) : $.is(e) ? c.command = e : c.edit = e, p && a !== void 0 && (c.kind = a), c;
|
|
576
|
+
}
|
|
577
|
+
t.create = r;
|
|
578
|
+
function i(n) {
|
|
579
|
+
let e = n;
|
|
580
|
+
return e && s.string(e.title) && (e.diagnostics === void 0 || s.typedArray(e.diagnostics, J.is)) && (e.kind === void 0 || s.string(e.kind)) && (e.edit !== void 0 || e.command !== void 0) && (e.command === void 0 || $.is(e.command)) && (e.isPreferred === void 0 || s.boolean(e.isPreferred)) && (e.edit === void 0 || re.is(e.edit));
|
|
581
|
+
}
|
|
582
|
+
t.is = i;
|
|
583
|
+
})(Ze || (Ze = {}));
|
|
584
|
+
var He;
|
|
585
|
+
(function(t) {
|
|
586
|
+
function r(n, e) {
|
|
587
|
+
let a = { range: n };
|
|
588
|
+
return s.defined(e) && (a.data = e), a;
|
|
589
|
+
}
|
|
590
|
+
t.create = r;
|
|
591
|
+
function i(n) {
|
|
592
|
+
let e = n;
|
|
593
|
+
return s.defined(e) && I.is(e.range) && (s.undefined(e.command) || $.is(e.command));
|
|
594
|
+
}
|
|
595
|
+
t.is = i;
|
|
596
|
+
})(He || (He = {}));
|
|
597
|
+
var Qe;
|
|
598
|
+
(function(t) {
|
|
599
|
+
function r(n, e) {
|
|
600
|
+
return { tabSize: n, insertSpaces: e };
|
|
601
|
+
}
|
|
602
|
+
t.create = r;
|
|
603
|
+
function i(n) {
|
|
604
|
+
let e = n;
|
|
605
|
+
return s.defined(e) && s.uinteger(e.tabSize) && s.boolean(e.insertSpaces);
|
|
606
|
+
}
|
|
607
|
+
t.is = i;
|
|
608
|
+
})(Qe || (Qe = {}));
|
|
609
|
+
var Ge;
|
|
610
|
+
(function(t) {
|
|
611
|
+
function r(n, e, a) {
|
|
612
|
+
return { range: n, target: e, data: a };
|
|
613
|
+
}
|
|
614
|
+
t.create = r;
|
|
615
|
+
function i(n) {
|
|
616
|
+
let e = n;
|
|
617
|
+
return s.defined(e) && I.is(e.range) && (s.undefined(e.target) || s.string(e.target));
|
|
618
|
+
}
|
|
619
|
+
t.is = i;
|
|
620
|
+
})(Ge || (Ge = {}));
|
|
621
|
+
var Ye;
|
|
622
|
+
(function(t) {
|
|
623
|
+
function r(n, e) {
|
|
624
|
+
return { range: n, parent: e };
|
|
625
|
+
}
|
|
626
|
+
t.create = r;
|
|
627
|
+
function i(n) {
|
|
628
|
+
let e = n;
|
|
629
|
+
return s.objectLiteral(e) && I.is(e.range) && (e.parent === void 0 || t.is(e.parent));
|
|
630
|
+
}
|
|
631
|
+
t.is = i;
|
|
632
|
+
})(Ye || (Ye = {}));
|
|
633
|
+
var Se;
|
|
634
|
+
(function(t) {
|
|
635
|
+
t.namespace = "namespace", t.type = "type", t.class = "class", t.enum = "enum", t.interface = "interface", t.struct = "struct", t.typeParameter = "typeParameter", t.parameter = "parameter", t.variable = "variable", t.property = "property", t.enumMember = "enumMember", t.event = "event", t.function = "function", t.method = "method", t.macro = "macro", t.keyword = "keyword", t.modifier = "modifier", t.comment = "comment", t.string = "string", t.number = "number", t.regexp = "regexp", t.operator = "operator", t.decorator = "decorator";
|
|
636
|
+
})(Se || (Se = {}));
|
|
637
|
+
var Te;
|
|
638
|
+
(function(t) {
|
|
639
|
+
t.declaration = "declaration", t.definition = "definition", t.readonly = "readonly", t.static = "static", t.deprecated = "deprecated", t.abstract = "abstract", t.async = "async", t.modification = "modification", t.documentation = "documentation", t.defaultLibrary = "defaultLibrary";
|
|
640
|
+
})(Te || (Te = {}));
|
|
641
|
+
var Ke;
|
|
642
|
+
(function(t) {
|
|
643
|
+
function r(i) {
|
|
644
|
+
const n = i;
|
|
645
|
+
return s.objectLiteral(n) && (n.resultId === void 0 || typeof n.resultId == "string") && Array.isArray(n.data) && (n.data.length === 0 || typeof n.data[0] == "number");
|
|
646
|
+
}
|
|
647
|
+
t.is = r;
|
|
648
|
+
})(Ke || (Ke = {}));
|
|
649
|
+
var et;
|
|
650
|
+
(function(t) {
|
|
651
|
+
function r(n, e) {
|
|
652
|
+
return { range: n, text: e };
|
|
653
|
+
}
|
|
654
|
+
t.create = r;
|
|
655
|
+
function i(n) {
|
|
656
|
+
const e = n;
|
|
657
|
+
return e != null && I.is(e.range) && s.string(e.text);
|
|
658
|
+
}
|
|
659
|
+
t.is = i;
|
|
660
|
+
})(et || (et = {}));
|
|
661
|
+
var tt;
|
|
662
|
+
(function(t) {
|
|
663
|
+
function r(n, e, a) {
|
|
664
|
+
return { range: n, variableName: e, caseSensitiveLookup: a };
|
|
665
|
+
}
|
|
666
|
+
t.create = r;
|
|
667
|
+
function i(n) {
|
|
668
|
+
const e = n;
|
|
669
|
+
return e != null && I.is(e.range) && s.boolean(e.caseSensitiveLookup) && (s.string(e.variableName) || e.variableName === void 0);
|
|
670
|
+
}
|
|
671
|
+
t.is = i;
|
|
672
|
+
})(tt || (tt = {}));
|
|
673
|
+
var nt;
|
|
674
|
+
(function(t) {
|
|
675
|
+
function r(n, e) {
|
|
676
|
+
return { range: n, expression: e };
|
|
677
|
+
}
|
|
678
|
+
t.create = r;
|
|
679
|
+
function i(n) {
|
|
680
|
+
const e = n;
|
|
681
|
+
return e != null && I.is(e.range) && (s.string(e.expression) || e.expression === void 0);
|
|
682
|
+
}
|
|
683
|
+
t.is = i;
|
|
684
|
+
})(nt || (nt = {}));
|
|
685
|
+
var rt;
|
|
686
|
+
(function(t) {
|
|
687
|
+
function r(n, e) {
|
|
688
|
+
return { frameId: n, stoppedLocation: e };
|
|
689
|
+
}
|
|
690
|
+
t.create = r;
|
|
691
|
+
function i(n) {
|
|
692
|
+
const e = n;
|
|
693
|
+
return s.defined(e) && I.is(n.stoppedLocation);
|
|
694
|
+
}
|
|
695
|
+
t.is = i;
|
|
696
|
+
})(rt || (rt = {}));
|
|
697
|
+
var se;
|
|
698
|
+
(function(t) {
|
|
699
|
+
t.Type = 1, t.Parameter = 2;
|
|
700
|
+
function r(i) {
|
|
701
|
+
return i === 1 || i === 2;
|
|
702
|
+
}
|
|
703
|
+
t.is = r;
|
|
704
|
+
})(se || (se = {}));
|
|
705
|
+
var oe;
|
|
706
|
+
(function(t) {
|
|
707
|
+
function r(n) {
|
|
708
|
+
return { value: n };
|
|
709
|
+
}
|
|
710
|
+
t.create = r;
|
|
711
|
+
function i(n) {
|
|
712
|
+
const e = n;
|
|
713
|
+
return s.objectLiteral(e) && (e.tooltip === void 0 || s.string(e.tooltip) || F.is(e.tooltip)) && (e.location === void 0 || B.is(e.location)) && (e.command === void 0 || $.is(e.command));
|
|
714
|
+
}
|
|
715
|
+
t.is = i;
|
|
716
|
+
})(oe || (oe = {}));
|
|
717
|
+
var it;
|
|
718
|
+
(function(t) {
|
|
719
|
+
function r(n, e, a) {
|
|
720
|
+
const c = { position: n, label: e };
|
|
721
|
+
return a !== void 0 && (c.kind = a), c;
|
|
722
|
+
}
|
|
723
|
+
t.create = r;
|
|
724
|
+
function i(n) {
|
|
725
|
+
const e = n;
|
|
726
|
+
return s.objectLiteral(e) && P.is(e.position) && (s.string(e.label) || s.typedArray(e.label, oe.is)) && (e.kind === void 0 || se.is(e.kind)) && e.textEdits === void 0 || s.typedArray(e.textEdits, N.is) && (e.tooltip === void 0 || s.string(e.tooltip) || F.is(e.tooltip)) && (e.paddingLeft === void 0 || s.boolean(e.paddingLeft)) && (e.paddingRight === void 0 || s.boolean(e.paddingRight));
|
|
727
|
+
}
|
|
728
|
+
t.is = i;
|
|
729
|
+
})(it || (it = {}));
|
|
730
|
+
var at;
|
|
731
|
+
(function(t) {
|
|
732
|
+
function r(i) {
|
|
733
|
+
return { kind: "snippet", value: i };
|
|
734
|
+
}
|
|
735
|
+
t.createSnippet = r;
|
|
736
|
+
})(at || (at = {}));
|
|
737
|
+
var st;
|
|
738
|
+
(function(t) {
|
|
739
|
+
function r(i, n, e, a) {
|
|
740
|
+
return { insertText: i, filterText: n, range: e, command: a };
|
|
741
|
+
}
|
|
742
|
+
t.create = r;
|
|
743
|
+
})(st || (st = {}));
|
|
744
|
+
var ot;
|
|
745
|
+
(function(t) {
|
|
746
|
+
function r(i) {
|
|
747
|
+
return { items: i };
|
|
748
|
+
}
|
|
749
|
+
t.create = r;
|
|
750
|
+
})(ot || (ot = {}));
|
|
751
|
+
var ct;
|
|
752
|
+
(function(t) {
|
|
753
|
+
t.Invoked = 0, t.Automatic = 1;
|
|
754
|
+
})(ct || (ct = {}));
|
|
755
|
+
var ut;
|
|
756
|
+
(function(t) {
|
|
757
|
+
function r(i, n) {
|
|
758
|
+
return { range: i, text: n };
|
|
759
|
+
}
|
|
760
|
+
t.create = r;
|
|
761
|
+
})(ut || (ut = {}));
|
|
762
|
+
var ft;
|
|
763
|
+
(function(t) {
|
|
764
|
+
function r(i, n) {
|
|
765
|
+
return { triggerKind: i, selectedCompletionInfo: n };
|
|
766
|
+
}
|
|
767
|
+
t.create = r;
|
|
768
|
+
})(ft || (ft = {}));
|
|
769
|
+
var lt;
|
|
770
|
+
(function(t) {
|
|
771
|
+
function r(i) {
|
|
772
|
+
const n = i;
|
|
773
|
+
return s.objectLiteral(n) && G.is(n.uri) && s.string(n.name);
|
|
774
|
+
}
|
|
775
|
+
t.is = r;
|
|
776
|
+
})(lt || (lt = {}));
|
|
777
|
+
var dt;
|
|
778
|
+
(function(t) {
|
|
779
|
+
function r(a, c, p, u) {
|
|
780
|
+
return new yt(a, c, p, u);
|
|
781
|
+
}
|
|
782
|
+
t.create = r;
|
|
783
|
+
function i(a) {
|
|
784
|
+
let c = a;
|
|
785
|
+
return !!(s.defined(c) && s.string(c.uri) && (s.undefined(c.languageId) || s.string(c.languageId)) && s.uinteger(c.lineCount) && s.func(c.getText) && s.func(c.positionAt) && s.func(c.offsetAt));
|
|
786
|
+
}
|
|
787
|
+
t.is = i;
|
|
788
|
+
function n(a, c) {
|
|
789
|
+
let p = a.getText(), u = e(c, (f, h) => {
|
|
790
|
+
let g = f.range.start.line - h.range.start.line;
|
|
791
|
+
return g === 0 ? f.range.start.character - h.range.start.character : g;
|
|
792
|
+
}), o = p.length;
|
|
793
|
+
for (let f = u.length - 1; f >= 0; f--) {
|
|
794
|
+
let h = u[f], g = a.offsetAt(h.range.start), l = a.offsetAt(h.range.end);
|
|
795
|
+
if (l <= o)
|
|
796
|
+
p = p.substring(0, g) + h.newText + p.substring(l, p.length);
|
|
797
|
+
else
|
|
798
|
+
throw new Error("Overlapping edit");
|
|
799
|
+
o = g;
|
|
800
|
+
}
|
|
801
|
+
return p;
|
|
802
|
+
}
|
|
803
|
+
t.applyEdits = n;
|
|
804
|
+
function e(a, c) {
|
|
805
|
+
if (a.length <= 1)
|
|
806
|
+
return a;
|
|
807
|
+
const p = a.length / 2 | 0, u = a.slice(0, p), o = a.slice(p);
|
|
808
|
+
e(u, c), e(o, c);
|
|
809
|
+
let f = 0, h = 0, g = 0;
|
|
810
|
+
for (; f < u.length && h < o.length; )
|
|
811
|
+
c(u[f], o[h]) <= 0 ? a[g++] = u[f++] : a[g++] = o[h++];
|
|
812
|
+
for (; f < u.length; )
|
|
813
|
+
a[g++] = u[f++];
|
|
814
|
+
for (; h < o.length; )
|
|
815
|
+
a[g++] = o[h++];
|
|
816
|
+
return a;
|
|
817
|
+
}
|
|
818
|
+
})(dt || (dt = {}));
|
|
819
|
+
let yt = class {
|
|
820
|
+
constructor(r, i, n, e) {
|
|
821
|
+
this._uri = r, this._languageId = i, this._version = n, this._content = e, this._lineOffsets = void 0;
|
|
822
|
+
}
|
|
823
|
+
get uri() {
|
|
824
|
+
return this._uri;
|
|
825
|
+
}
|
|
826
|
+
get languageId() {
|
|
827
|
+
return this._languageId;
|
|
828
|
+
}
|
|
829
|
+
get version() {
|
|
830
|
+
return this._version;
|
|
831
|
+
}
|
|
832
|
+
getText(r) {
|
|
833
|
+
if (r) {
|
|
834
|
+
let i = this.offsetAt(r.start), n = this.offsetAt(r.end);
|
|
835
|
+
return this._content.substring(i, n);
|
|
836
|
+
}
|
|
837
|
+
return this._content;
|
|
838
|
+
}
|
|
839
|
+
update(r, i) {
|
|
840
|
+
this._content = r.text, this._version = i, this._lineOffsets = void 0;
|
|
841
|
+
}
|
|
842
|
+
getLineOffsets() {
|
|
843
|
+
if (this._lineOffsets === void 0) {
|
|
844
|
+
let r = [], i = this._content, n = !0;
|
|
845
|
+
for (let e = 0; e < i.length; e++) {
|
|
846
|
+
n && (r.push(e), n = !1);
|
|
847
|
+
let a = i.charAt(e);
|
|
848
|
+
n = a === "\r" || a === `
|
|
849
|
+
`, a === "\r" && e + 1 < i.length && i.charAt(e + 1) === `
|
|
850
|
+
` && e++;
|
|
851
|
+
}
|
|
852
|
+
n && i.length > 0 && r.push(i.length), this._lineOffsets = r;
|
|
853
|
+
}
|
|
854
|
+
return this._lineOffsets;
|
|
855
|
+
}
|
|
856
|
+
positionAt(r) {
|
|
857
|
+
r = Math.max(Math.min(r, this._content.length), 0);
|
|
858
|
+
let i = this.getLineOffsets(), n = 0, e = i.length;
|
|
859
|
+
if (e === 0)
|
|
860
|
+
return P.create(0, r);
|
|
861
|
+
for (; n < e; ) {
|
|
862
|
+
let c = Math.floor((n + e) / 2);
|
|
863
|
+
i[c] > r ? e = c : n = c + 1;
|
|
864
|
+
}
|
|
865
|
+
let a = n - 1;
|
|
866
|
+
return P.create(a, r - i[a]);
|
|
867
|
+
}
|
|
868
|
+
offsetAt(r) {
|
|
869
|
+
let i = this.getLineOffsets();
|
|
870
|
+
if (r.line >= i.length)
|
|
871
|
+
return this._content.length;
|
|
872
|
+
if (r.line < 0)
|
|
873
|
+
return 0;
|
|
874
|
+
let n = i[r.line], e = r.line + 1 < i.length ? i[r.line + 1] : this._content.length;
|
|
875
|
+
return Math.max(Math.min(n + r.character, e), n);
|
|
876
|
+
}
|
|
877
|
+
get lineCount() {
|
|
878
|
+
return this.getLineOffsets().length;
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
var s;
|
|
882
|
+
(function(t) {
|
|
883
|
+
const r = Object.prototype.toString;
|
|
884
|
+
function i(l) {
|
|
885
|
+
return typeof l < "u";
|
|
886
|
+
}
|
|
887
|
+
t.defined = i;
|
|
888
|
+
function n(l) {
|
|
889
|
+
return typeof l > "u";
|
|
890
|
+
}
|
|
891
|
+
t.undefined = n;
|
|
892
|
+
function e(l) {
|
|
893
|
+
return l === !0 || l === !1;
|
|
894
|
+
}
|
|
895
|
+
t.boolean = e;
|
|
896
|
+
function a(l) {
|
|
897
|
+
return r.call(l) === "[object String]";
|
|
898
|
+
}
|
|
899
|
+
t.string = a;
|
|
900
|
+
function c(l) {
|
|
901
|
+
return r.call(l) === "[object Number]";
|
|
902
|
+
}
|
|
903
|
+
t.number = c;
|
|
904
|
+
function p(l, y, A) {
|
|
905
|
+
return r.call(l) === "[object Number]" && y <= l && l <= A;
|
|
906
|
+
}
|
|
907
|
+
t.numberRange = p;
|
|
908
|
+
function u(l) {
|
|
909
|
+
return r.call(l) === "[object Number]" && -2147483648 <= l && l <= 2147483647;
|
|
910
|
+
}
|
|
911
|
+
t.integer = u;
|
|
912
|
+
function o(l) {
|
|
913
|
+
return r.call(l) === "[object Number]" && 0 <= l && l <= 2147483647;
|
|
914
|
+
}
|
|
915
|
+
t.uinteger = o;
|
|
916
|
+
function f(l) {
|
|
917
|
+
return r.call(l) === "[object Function]";
|
|
918
|
+
}
|
|
919
|
+
t.func = f;
|
|
920
|
+
function h(l) {
|
|
921
|
+
return l !== null && typeof l == "object";
|
|
922
|
+
}
|
|
923
|
+
t.objectLiteral = h;
|
|
924
|
+
function g(l, y) {
|
|
925
|
+
return Array.isArray(l) && l.every(y);
|
|
926
|
+
}
|
|
927
|
+
t.typedArray = g;
|
|
928
|
+
})(s || (s = {}));
|
|
929
|
+
class k {
|
|
930
|
+
constructor(r, i, n, e) {
|
|
931
|
+
this._uri = r, this._languageId = i, this._version = n, this._content = e, this._lineOffsets = void 0;
|
|
932
|
+
}
|
|
933
|
+
get uri() {
|
|
934
|
+
return this._uri;
|
|
935
|
+
}
|
|
936
|
+
get languageId() {
|
|
937
|
+
return this._languageId;
|
|
938
|
+
}
|
|
939
|
+
get version() {
|
|
940
|
+
return this._version;
|
|
941
|
+
}
|
|
942
|
+
getText(r) {
|
|
943
|
+
if (r) {
|
|
944
|
+
const i = this.offsetAt(r.start), n = this.offsetAt(r.end);
|
|
945
|
+
return this._content.substring(i, n);
|
|
946
|
+
}
|
|
947
|
+
return this._content;
|
|
948
|
+
}
|
|
949
|
+
update(r, i) {
|
|
950
|
+
for (let n of r)
|
|
951
|
+
if (k.isIncremental(n)) {
|
|
952
|
+
const e = pt(n.range), a = this.offsetAt(e.start), c = this.offsetAt(e.end);
|
|
953
|
+
this._content = this._content.substring(0, a) + n.text + this._content.substring(c, this._content.length);
|
|
954
|
+
const p = Math.max(e.start.line, 0), u = Math.max(e.end.line, 0);
|
|
955
|
+
let o = this._lineOffsets;
|
|
956
|
+
const f = gt(n.text, !1, a);
|
|
957
|
+
if (u - p === f.length)
|
|
958
|
+
for (let g = 0, l = f.length; g < l; g++)
|
|
959
|
+
o[g + p + 1] = f[g];
|
|
960
|
+
else
|
|
961
|
+
f.length < 1e4 ? o.splice(p + 1, u - p, ...f) : this._lineOffsets = o = o.slice(0, p + 1).concat(f, o.slice(u + 1));
|
|
962
|
+
const h = n.text.length - (c - a);
|
|
963
|
+
if (h !== 0)
|
|
964
|
+
for (let g = p + 1 + f.length, l = o.length; g < l; g++)
|
|
965
|
+
o[g] = o[g] + h;
|
|
966
|
+
} else if (k.isFull(n))
|
|
967
|
+
this._content = n.text, this._lineOffsets = void 0;
|
|
968
|
+
else
|
|
969
|
+
throw new Error("Unknown change event received");
|
|
970
|
+
this._version = i;
|
|
971
|
+
}
|
|
972
|
+
getLineOffsets() {
|
|
973
|
+
return this._lineOffsets === void 0 && (this._lineOffsets = gt(this._content, !0)), this._lineOffsets;
|
|
974
|
+
}
|
|
975
|
+
positionAt(r) {
|
|
976
|
+
r = Math.max(Math.min(r, this._content.length), 0);
|
|
977
|
+
let i = this.getLineOffsets(), n = 0, e = i.length;
|
|
978
|
+
if (e === 0)
|
|
979
|
+
return { line: 0, character: r };
|
|
980
|
+
for (; n < e; ) {
|
|
981
|
+
let c = Math.floor((n + e) / 2);
|
|
982
|
+
i[c] > r ? e = c : n = c + 1;
|
|
983
|
+
}
|
|
984
|
+
let a = n - 1;
|
|
985
|
+
return { line: a, character: r - i[a] };
|
|
986
|
+
}
|
|
987
|
+
offsetAt(r) {
|
|
988
|
+
let i = this.getLineOffsets();
|
|
989
|
+
if (r.line >= i.length)
|
|
990
|
+
return this._content.length;
|
|
991
|
+
if (r.line < 0)
|
|
992
|
+
return 0;
|
|
993
|
+
let n = i[r.line], e = r.line + 1 < i.length ? i[r.line + 1] : this._content.length;
|
|
994
|
+
return Math.max(Math.min(n + r.character, e), n);
|
|
995
|
+
}
|
|
996
|
+
get lineCount() {
|
|
997
|
+
return this.getLineOffsets().length;
|
|
998
|
+
}
|
|
999
|
+
static isIncremental(r) {
|
|
1000
|
+
let i = r;
|
|
1001
|
+
return i != null && typeof i.text == "string" && i.range !== void 0 && (i.rangeLength === void 0 || typeof i.rangeLength == "number");
|
|
1002
|
+
}
|
|
1003
|
+
static isFull(r) {
|
|
1004
|
+
let i = r;
|
|
1005
|
+
return i != null && typeof i.text == "string" && i.range === void 0 && i.rangeLength === void 0;
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
var ht;
|
|
1009
|
+
(function(t) {
|
|
1010
|
+
function r(e, a, c, p) {
|
|
1011
|
+
return new k(e, a, c, p);
|
|
1012
|
+
}
|
|
1013
|
+
t.create = r;
|
|
1014
|
+
function i(e, a, c) {
|
|
1015
|
+
if (e instanceof k)
|
|
1016
|
+
return e.update(a, c), e;
|
|
1017
|
+
throw new Error("TextDocument.update: document must be created by TextDocument.create");
|
|
1018
|
+
}
|
|
1019
|
+
t.update = i;
|
|
1020
|
+
function n(e, a) {
|
|
1021
|
+
let c = e.getText(), p = ce(a.map(At), (f, h) => {
|
|
1022
|
+
let g = f.range.start.line - h.range.start.line;
|
|
1023
|
+
return g === 0 ? f.range.start.character - h.range.start.character : g;
|
|
1024
|
+
}), u = 0;
|
|
1025
|
+
const o = [];
|
|
1026
|
+
for (const f of p) {
|
|
1027
|
+
let h = e.offsetAt(f.range.start);
|
|
1028
|
+
if (h < u)
|
|
1029
|
+
throw new Error("Overlapping edit");
|
|
1030
|
+
h > u && o.push(c.substring(u, h)), f.newText.length && o.push(f.newText), u = e.offsetAt(f.range.end);
|
|
1031
|
+
}
|
|
1032
|
+
return o.push(c.substr(u)), o.join("");
|
|
1033
|
+
}
|
|
1034
|
+
t.applyEdits = n;
|
|
1035
|
+
})(ht || (ht = {}));
|
|
1036
|
+
function ce(t, r) {
|
|
1037
|
+
if (t.length <= 1)
|
|
1038
|
+
return t;
|
|
1039
|
+
const i = t.length / 2 | 0, n = t.slice(0, i), e = t.slice(i);
|
|
1040
|
+
ce(n, r), ce(e, r);
|
|
1041
|
+
let a = 0, c = 0, p = 0;
|
|
1042
|
+
for (; a < n.length && c < e.length; )
|
|
1043
|
+
r(n[a], e[c]) <= 0 ? t[p++] = n[a++] : t[p++] = e[c++];
|
|
1044
|
+
for (; a < n.length; )
|
|
1045
|
+
t[p++] = n[a++];
|
|
1046
|
+
for (; c < e.length; )
|
|
1047
|
+
t[p++] = e[c++];
|
|
1048
|
+
return t;
|
|
1049
|
+
}
|
|
1050
|
+
function gt(t, r, i = 0) {
|
|
1051
|
+
const n = r ? [i] : [];
|
|
1052
|
+
for (let e = 0; e < t.length; e++) {
|
|
1053
|
+
let a = t.charCodeAt(e);
|
|
1054
|
+
(a === 13 || a === 10) && (a === 13 && e + 1 < t.length && t.charCodeAt(e + 1) === 10 && e++, n.push(i + e + 1));
|
|
1055
|
+
}
|
|
1056
|
+
return n;
|
|
1057
|
+
}
|
|
1058
|
+
function pt(t) {
|
|
1059
|
+
const r = t.start, i = t.end;
|
|
1060
|
+
return r.line > i.line || r.line === i.line && r.character > i.character ? { start: i, end: r } : t;
|
|
1061
|
+
}
|
|
1062
|
+
function At(t) {
|
|
1063
|
+
const r = pt(t.range);
|
|
1064
|
+
return r !== t.range ? { newText: t.newText, range: r } : t;
|
|
1065
|
+
}
|
|
1066
|
+
function xt(...t) {
|
|
1067
|
+
const r = t[0];
|
|
1068
|
+
let i, n, e;
|
|
1069
|
+
if (typeof r == "string")
|
|
1070
|
+
i = r, n = r, t.splice(0, 1), e = !t || typeof t[0] != "object" ? t : t[0];
|
|
1071
|
+
else if (r instanceof Array) {
|
|
1072
|
+
const a = t.slice(1);
|
|
1073
|
+
if (r.length !== a.length + 1)
|
|
1074
|
+
throw new Error("expected a string as the first argument to l10n.t");
|
|
1075
|
+
let c = r[0];
|
|
1076
|
+
for (let p = 1; p < r.length; p++)
|
|
1077
|
+
c += `{${p - 1}}` + r[p];
|
|
1078
|
+
return xt(c, ...a);
|
|
1079
|
+
} else
|
|
1080
|
+
n = r.message, i = n, r.comment && r.comment.length > 0 && (i += `/${Array.isArray(r.comment) ? r.comment.join("") : r.comment}`), e = r.args ?? {};
|
|
1081
|
+
return _t(n, e);
|
|
1082
|
+
}
|
|
1083
|
+
var wt = /{([^}]+)}/g;
|
|
1084
|
+
function _t(t, r) {
|
|
1085
|
+
return Object.keys(r).length === 0 ? t : t.replace(wt, (i, n) => r[n] ?? i);
|
|
1086
|
+
}
|
|
1087
|
+
var vt;
|
|
1088
|
+
(() => {
|
|
1089
|
+
var t = { 470: (e) => {
|
|
1090
|
+
function a(u) {
|
|
1091
|
+
if (typeof u != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(u));
|
|
1092
|
+
}
|
|
1093
|
+
function c(u, o) {
|
|
1094
|
+
for (var f, h = "", g = 0, l = -1, y = 0, A = 0; A <= u.length; ++A) {
|
|
1095
|
+
if (A < u.length) f = u.charCodeAt(A);
|
|
1096
|
+
else {
|
|
1097
|
+
if (f === 47) break;
|
|
1098
|
+
f = 47;
|
|
1099
|
+
}
|
|
1100
|
+
if (f === 47) {
|
|
1101
|
+
if (!(l === A - 1 || y === 1)) if (l !== A - 1 && y === 2) {
|
|
1102
|
+
if (h.length < 2 || g !== 2 || h.charCodeAt(h.length - 1) !== 46 || h.charCodeAt(h.length - 2) !== 46) {
|
|
1103
|
+
if (h.length > 2) {
|
|
1104
|
+
var O = h.lastIndexOf("/");
|
|
1105
|
+
if (O !== h.length - 1) {
|
|
1106
|
+
O === -1 ? (h = "", g = 0) : g = (h = h.slice(0, O)).length - 1 - h.lastIndexOf("/"), l = A, y = 0;
|
|
1107
|
+
continue;
|
|
1108
|
+
}
|
|
1109
|
+
} else if (h.length === 2 || h.length === 1) {
|
|
1110
|
+
h = "", g = 0, l = A, y = 0;
|
|
1111
|
+
continue;
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
o && (h.length > 0 ? h += "/.." : h = "..", g = 2);
|
|
1115
|
+
} else h.length > 0 ? h += "/" + u.slice(l + 1, A) : h = u.slice(l + 1, A), g = A - l - 1;
|
|
1116
|
+
l = A, y = 0;
|
|
1117
|
+
} else f === 46 && y !== -1 ? ++y : y = -1;
|
|
1118
|
+
}
|
|
1119
|
+
return h;
|
|
1120
|
+
}
|
|
1121
|
+
var p = { resolve: function() {
|
|
1122
|
+
for (var u, o = "", f = !1, h = arguments.length - 1; h >= -1 && !f; h--) {
|
|
1123
|
+
var g;
|
|
1124
|
+
h >= 0 ? g = arguments[h] : (u === void 0 && (u = process.cwd()), g = u), a(g), g.length !== 0 && (o = g + "/" + o, f = g.charCodeAt(0) === 47);
|
|
1125
|
+
}
|
|
1126
|
+
return o = c(o, !f), f ? o.length > 0 ? "/" + o : "/" : o.length > 0 ? o : ".";
|
|
1127
|
+
}, normalize: function(u) {
|
|
1128
|
+
if (a(u), u.length === 0) return ".";
|
|
1129
|
+
var o = u.charCodeAt(0) === 47, f = u.charCodeAt(u.length - 1) === 47;
|
|
1130
|
+
return (u = c(u, !o)).length !== 0 || o || (u = "."), u.length > 0 && f && (u += "/"), o ? "/" + u : u;
|
|
1131
|
+
}, isAbsolute: function(u) {
|
|
1132
|
+
return a(u), u.length > 0 && u.charCodeAt(0) === 47;
|
|
1133
|
+
}, join: function() {
|
|
1134
|
+
if (arguments.length === 0) return ".";
|
|
1135
|
+
for (var u, o = 0; o < arguments.length; ++o) {
|
|
1136
|
+
var f = arguments[o];
|
|
1137
|
+
a(f), f.length > 0 && (u === void 0 ? u = f : u += "/" + f);
|
|
1138
|
+
}
|
|
1139
|
+
return u === void 0 ? "." : p.normalize(u);
|
|
1140
|
+
}, relative: function(u, o) {
|
|
1141
|
+
if (a(u), a(o), u === o || (u = p.resolve(u)) === (o = p.resolve(o))) return "";
|
|
1142
|
+
for (var f = 1; f < u.length && u.charCodeAt(f) === 47; ++f) ;
|
|
1143
|
+
for (var h = u.length, g = h - f, l = 1; l < o.length && o.charCodeAt(l) === 47; ++l) ;
|
|
1144
|
+
for (var y = o.length - l, A = g < y ? g : y, O = -1, _ = 0; _ <= A; ++_) {
|
|
1145
|
+
if (_ === A) {
|
|
1146
|
+
if (y > A) {
|
|
1147
|
+
if (o.charCodeAt(l + _) === 47) return o.slice(l + _ + 1);
|
|
1148
|
+
if (_ === 0) return o.slice(l + _);
|
|
1149
|
+
} else g > A && (u.charCodeAt(f + _) === 47 ? O = _ : _ === 0 && (O = 0));
|
|
1150
|
+
break;
|
|
1151
|
+
}
|
|
1152
|
+
var E = u.charCodeAt(f + _);
|
|
1153
|
+
if (E !== o.charCodeAt(l + _)) break;
|
|
1154
|
+
E === 47 && (O = _);
|
|
1155
|
+
}
|
|
1156
|
+
var R = "";
|
|
1157
|
+
for (_ = f + O + 1; _ <= h; ++_) _ !== h && u.charCodeAt(_) !== 47 || (R.length === 0 ? R += ".." : R += "/..");
|
|
1158
|
+
return R.length > 0 ? R + o.slice(l + O) : (l += O, o.charCodeAt(l) === 47 && ++l, o.slice(l));
|
|
1159
|
+
}, _makeLong: function(u) {
|
|
1160
|
+
return u;
|
|
1161
|
+
}, dirname: function(u) {
|
|
1162
|
+
if (a(u), u.length === 0) return ".";
|
|
1163
|
+
for (var o = u.charCodeAt(0), f = o === 47, h = -1, g = !0, l = u.length - 1; l >= 1; --l) if ((o = u.charCodeAt(l)) === 47) {
|
|
1164
|
+
if (!g) {
|
|
1165
|
+
h = l;
|
|
1166
|
+
break;
|
|
1167
|
+
}
|
|
1168
|
+
} else g = !1;
|
|
1169
|
+
return h === -1 ? f ? "/" : "." : f && h === 1 ? "//" : u.slice(0, h);
|
|
1170
|
+
}, basename: function(u, o) {
|
|
1171
|
+
if (o !== void 0 && typeof o != "string") throw new TypeError('"ext" argument must be a string');
|
|
1172
|
+
a(u);
|
|
1173
|
+
var f, h = 0, g = -1, l = !0;
|
|
1174
|
+
if (o !== void 0 && o.length > 0 && o.length <= u.length) {
|
|
1175
|
+
if (o.length === u.length && o === u) return "";
|
|
1176
|
+
var y = o.length - 1, A = -1;
|
|
1177
|
+
for (f = u.length - 1; f >= 0; --f) {
|
|
1178
|
+
var O = u.charCodeAt(f);
|
|
1179
|
+
if (O === 47) {
|
|
1180
|
+
if (!l) {
|
|
1181
|
+
h = f + 1;
|
|
1182
|
+
break;
|
|
1183
|
+
}
|
|
1184
|
+
} else A === -1 && (l = !1, A = f + 1), y >= 0 && (O === o.charCodeAt(y) ? --y == -1 && (g = f) : (y = -1, g = A));
|
|
1185
|
+
}
|
|
1186
|
+
return h === g ? g = A : g === -1 && (g = u.length), u.slice(h, g);
|
|
1187
|
+
}
|
|
1188
|
+
for (f = u.length - 1; f >= 0; --f) if (u.charCodeAt(f) === 47) {
|
|
1189
|
+
if (!l) {
|
|
1190
|
+
h = f + 1;
|
|
1191
|
+
break;
|
|
1192
|
+
}
|
|
1193
|
+
} else g === -1 && (l = !1, g = f + 1);
|
|
1194
|
+
return g === -1 ? "" : u.slice(h, g);
|
|
1195
|
+
}, extname: function(u) {
|
|
1196
|
+
a(u);
|
|
1197
|
+
for (var o = -1, f = 0, h = -1, g = !0, l = 0, y = u.length - 1; y >= 0; --y) {
|
|
1198
|
+
var A = u.charCodeAt(y);
|
|
1199
|
+
if (A !== 47) h === -1 && (g = !1, h = y + 1), A === 46 ? o === -1 ? o = y : l !== 1 && (l = 1) : o !== -1 && (l = -1);
|
|
1200
|
+
else if (!g) {
|
|
1201
|
+
f = y + 1;
|
|
1202
|
+
break;
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
return o === -1 || h === -1 || l === 0 || l === 1 && o === h - 1 && o === f + 1 ? "" : u.slice(o, h);
|
|
1206
|
+
}, format: function(u) {
|
|
1207
|
+
if (u === null || typeof u != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof u);
|
|
1208
|
+
return (function(o, f) {
|
|
1209
|
+
var h = f.dir || f.root, g = f.base || (f.name || "") + (f.ext || "");
|
|
1210
|
+
return h ? h === f.root ? h + g : h + "/" + g : g;
|
|
1211
|
+
})(0, u);
|
|
1212
|
+
}, parse: function(u) {
|
|
1213
|
+
a(u);
|
|
1214
|
+
var o = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
1215
|
+
if (u.length === 0) return o;
|
|
1216
|
+
var f, h = u.charCodeAt(0), g = h === 47;
|
|
1217
|
+
g ? (o.root = "/", f = 1) : f = 0;
|
|
1218
|
+
for (var l = -1, y = 0, A = -1, O = !0, _ = u.length - 1, E = 0; _ >= f; --_) if ((h = u.charCodeAt(_)) !== 47) A === -1 && (O = !1, A = _ + 1), h === 46 ? l === -1 ? l = _ : E !== 1 && (E = 1) : l !== -1 && (E = -1);
|
|
1219
|
+
else if (!O) {
|
|
1220
|
+
y = _ + 1;
|
|
1221
|
+
break;
|
|
1222
|
+
}
|
|
1223
|
+
return l === -1 || A === -1 || E === 0 || E === 1 && l === A - 1 && l === y + 1 ? A !== -1 && (o.base = o.name = y === 0 && g ? u.slice(1, A) : u.slice(y, A)) : (y === 0 && g ? (o.name = u.slice(1, l), o.base = u.slice(1, A)) : (o.name = u.slice(y, l), o.base = u.slice(y, A)), o.ext = u.slice(l, A)), y > 0 ? o.dir = u.slice(0, y - 1) : g && (o.dir = "/"), o;
|
|
1224
|
+
}, sep: "/", delimiter: ":", win32: null, posix: null };
|
|
1225
|
+
p.posix = p, e.exports = p;
|
|
1226
|
+
} }, r = {};
|
|
1227
|
+
function i(e) {
|
|
1228
|
+
var a = r[e];
|
|
1229
|
+
if (a !== void 0) return a.exports;
|
|
1230
|
+
var c = r[e] = { exports: {} };
|
|
1231
|
+
return t[e](c, c.exports, i), c.exports;
|
|
1232
|
+
}
|
|
1233
|
+
i.d = (e, a) => {
|
|
1234
|
+
for (var c in a) i.o(a, c) && !i.o(e, c) && Object.defineProperty(e, c, { enumerable: !0, get: a[c] });
|
|
1235
|
+
}, i.o = (e, a) => Object.prototype.hasOwnProperty.call(e, a), i.r = (e) => {
|
|
1236
|
+
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 });
|
|
1237
|
+
};
|
|
1238
|
+
var n = {};
|
|
1239
|
+
(() => {
|
|
1240
|
+
let e;
|
|
1241
|
+
i.r(n), i.d(n, { URI: () => g, Utils: () => Q }), typeof process == "object" ? e = process.platform === "win32" : typeof navigator == "object" && (e = navigator.userAgent.indexOf("Windows") >= 0);
|
|
1242
|
+
const a = /^\w[\w\d+.-]*$/, c = /^\//, p = /^\/\//;
|
|
1243
|
+
function u(m, d) {
|
|
1244
|
+
if (!m.scheme && d) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${m.authority}", path: "${m.path}", query: "${m.query}", fragment: "${m.fragment}"}`);
|
|
1245
|
+
if (m.scheme && !a.test(m.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
|
|
1246
|
+
if (m.path) {
|
|
1247
|
+
if (m.authority) {
|
|
1248
|
+
if (!c.test(m.path)) throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
|
|
1249
|
+
} else if (p.test(m.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
const o = "", f = "/", h = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
|
|
1253
|
+
class g {
|
|
1254
|
+
constructor(d, v, b, L, w, x = !1) {
|
|
1255
|
+
M(this, "scheme");
|
|
1256
|
+
M(this, "authority");
|
|
1257
|
+
M(this, "path");
|
|
1258
|
+
M(this, "query");
|
|
1259
|
+
M(this, "fragment");
|
|
1260
|
+
typeof d == "object" ? (this.scheme = d.scheme || o, this.authority = d.authority || o, this.path = d.path || o, this.query = d.query || o, this.fragment = d.fragment || o) : (this.scheme = /* @__PURE__ */ (function(U, j) {
|
|
1261
|
+
return U || j ? U : "file";
|
|
1262
|
+
})(d, x), this.authority = v || o, this.path = (function(U, j) {
|
|
1263
|
+
switch (U) {
|
|
1264
|
+
case "https":
|
|
1265
|
+
case "http":
|
|
1266
|
+
case "file":
|
|
1267
|
+
j ? j[0] !== f && (j = f + j) : j = f;
|
|
1268
|
+
}
|
|
1269
|
+
return j;
|
|
1270
|
+
})(this.scheme, b || o), this.query = L || o, this.fragment = w || o, u(this, x));
|
|
1271
|
+
}
|
|
1272
|
+
static isUri(d) {
|
|
1273
|
+
return d instanceof g || !!d && typeof d.authority == "string" && typeof d.fragment == "string" && typeof d.path == "string" && typeof d.query == "string" && typeof d.scheme == "string" && typeof d.fsPath == "string" && typeof d.with == "function" && typeof d.toString == "function";
|
|
1274
|
+
}
|
|
1275
|
+
get fsPath() {
|
|
1276
|
+
return E(this);
|
|
1277
|
+
}
|
|
1278
|
+
with(d) {
|
|
1279
|
+
if (!d) return this;
|
|
1280
|
+
let { scheme: v, authority: b, path: L, query: w, fragment: x } = d;
|
|
1281
|
+
return v === void 0 ? v = this.scheme : v === null && (v = o), b === void 0 ? b = this.authority : b === null && (b = o), L === void 0 ? L = this.path : L === null && (L = o), w === void 0 ? w = this.query : w === null && (w = o), x === void 0 ? x = this.fragment : x === null && (x = o), v === this.scheme && b === this.authority && L === this.path && w === this.query && x === this.fragment ? this : new y(v, b, L, w, x);
|
|
1282
|
+
}
|
|
1283
|
+
static parse(d, v = !1) {
|
|
1284
|
+
const b = h.exec(d);
|
|
1285
|
+
return b ? new y(b[2] || o, D(b[4] || o), D(b[5] || o), D(b[7] || o), D(b[9] || o), v) : new y(o, o, o, o, o);
|
|
1286
|
+
}
|
|
1287
|
+
static file(d) {
|
|
1288
|
+
let v = o;
|
|
1289
|
+
if (e && (d = d.replace(/\\/g, f)), d[0] === f && d[1] === f) {
|
|
1290
|
+
const b = d.indexOf(f, 2);
|
|
1291
|
+
b === -1 ? (v = d.substring(2), d = f) : (v = d.substring(2, b), d = d.substring(b) || f);
|
|
1292
|
+
}
|
|
1293
|
+
return new y("file", v, d, o, o);
|
|
1294
|
+
}
|
|
1295
|
+
static from(d) {
|
|
1296
|
+
const v = new y(d.scheme, d.authority, d.path, d.query, d.fragment);
|
|
1297
|
+
return u(v, !0), v;
|
|
1298
|
+
}
|
|
1299
|
+
toString(d = !1) {
|
|
1300
|
+
return R(this, d);
|
|
1301
|
+
}
|
|
1302
|
+
toJSON() {
|
|
1303
|
+
return this;
|
|
1304
|
+
}
|
|
1305
|
+
static revive(d) {
|
|
1306
|
+
if (d) {
|
|
1307
|
+
if (d instanceof g) return d;
|
|
1308
|
+
{
|
|
1309
|
+
const v = new y(d);
|
|
1310
|
+
return v._formatted = d.external, v._fsPath = d._sep === l ? d.fsPath : null, v;
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
return d;
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
const l = e ? 1 : void 0;
|
|
1317
|
+
class y extends g {
|
|
1318
|
+
constructor() {
|
|
1319
|
+
super(...arguments);
|
|
1320
|
+
M(this, "_formatted", null);
|
|
1321
|
+
M(this, "_fsPath", null);
|
|
1322
|
+
}
|
|
1323
|
+
get fsPath() {
|
|
1324
|
+
return this._fsPath || (this._fsPath = E(this)), this._fsPath;
|
|
1325
|
+
}
|
|
1326
|
+
toString(v = !1) {
|
|
1327
|
+
return v ? R(this, !0) : (this._formatted || (this._formatted = R(this, !1)), this._formatted);
|
|
1328
|
+
}
|
|
1329
|
+
toJSON() {
|
|
1330
|
+
const v = { $mid: 1 };
|
|
1331
|
+
return this._fsPath && (v.fsPath = this._fsPath, v._sep = l), this._formatted && (v.external = this._formatted), this.path && (v.path = this.path), this.scheme && (v.scheme = this.scheme), this.authority && (v.authority = this.authority), this.query && (v.query = this.query), this.fragment && (v.fragment = this.fragment), v;
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
const A = { 58: "%3A", 47: "%2F", 63: "%3F", 35: "%23", 91: "%5B", 93: "%5D", 64: "%40", 33: "%21", 36: "%24", 38: "%26", 39: "%27", 40: "%28", 41: "%29", 42: "%2A", 43: "%2B", 44: "%2C", 59: "%3B", 61: "%3D", 32: "%20" };
|
|
1335
|
+
function O(m, d, v) {
|
|
1336
|
+
let b, L = -1;
|
|
1337
|
+
for (let w = 0; w < m.length; w++) {
|
|
1338
|
+
const x = m.charCodeAt(w);
|
|
1339
|
+
if (x >= 97 && x <= 122 || x >= 65 && x <= 90 || x >= 48 && x <= 57 || x === 45 || x === 46 || x === 95 || x === 126 || d && x === 47 || v && x === 91 || v && x === 93 || v && x === 58) L !== -1 && (b += encodeURIComponent(m.substring(L, w)), L = -1), b !== void 0 && (b += m.charAt(w));
|
|
1340
|
+
else {
|
|
1341
|
+
b === void 0 && (b = m.substr(0, w));
|
|
1342
|
+
const U = A[x];
|
|
1343
|
+
U !== void 0 ? (L !== -1 && (b += encodeURIComponent(m.substring(L, w)), L = -1), b += U) : L === -1 && (L = w);
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
return L !== -1 && (b += encodeURIComponent(m.substring(L))), b !== void 0 ? b : m;
|
|
1347
|
+
}
|
|
1348
|
+
function _(m) {
|
|
1349
|
+
let d;
|
|
1350
|
+
for (let v = 0; v < m.length; v++) {
|
|
1351
|
+
const b = m.charCodeAt(v);
|
|
1352
|
+
b === 35 || b === 63 ? (d === void 0 && (d = m.substr(0, v)), d += A[b]) : d !== void 0 && (d += m[v]);
|
|
1353
|
+
}
|
|
1354
|
+
return d !== void 0 ? d : m;
|
|
1355
|
+
}
|
|
1356
|
+
function E(m, d) {
|
|
1357
|
+
let v;
|
|
1358
|
+
return v = m.authority && m.path.length > 1 && m.scheme === "file" ? `//${m.authority}${m.path}` : m.path.charCodeAt(0) === 47 && (m.path.charCodeAt(1) >= 65 && m.path.charCodeAt(1) <= 90 || m.path.charCodeAt(1) >= 97 && m.path.charCodeAt(1) <= 122) && m.path.charCodeAt(2) === 58 ? m.path[1].toLowerCase() + m.path.substr(2) : m.path, e && (v = v.replace(/\//g, "\\")), v;
|
|
1359
|
+
}
|
|
1360
|
+
function R(m, d) {
|
|
1361
|
+
const v = d ? _ : O;
|
|
1362
|
+
let b = "", { scheme: L, authority: w, path: x, query: U, fragment: j } = m;
|
|
1363
|
+
if (L && (b += L, b += ":"), (w || L === "file") && (b += f, b += f), w) {
|
|
1364
|
+
let C = w.indexOf("@");
|
|
1365
|
+
if (C !== -1) {
|
|
1366
|
+
const X = w.substr(0, C);
|
|
1367
|
+
w = w.substr(C + 1), C = X.lastIndexOf(":"), C === -1 ? b += v(X, !1, !1) : (b += v(X.substr(0, C), !1, !1), b += ":", b += v(X.substr(C + 1), !1, !0)), b += "@";
|
|
1368
|
+
}
|
|
1369
|
+
w = w.toLowerCase(), C = w.lastIndexOf(":"), C === -1 ? b += v(w, !1, !0) : (b += v(w.substr(0, C), !1, !0), b += w.substr(C));
|
|
1370
|
+
}
|
|
1371
|
+
if (x) {
|
|
1372
|
+
if (x.length >= 3 && x.charCodeAt(0) === 47 && x.charCodeAt(2) === 58) {
|
|
1373
|
+
const C = x.charCodeAt(1);
|
|
1374
|
+
C >= 65 && C <= 90 && (x = `/${String.fromCharCode(C + 32)}:${x.substr(3)}`);
|
|
1375
|
+
} else if (x.length >= 2 && x.charCodeAt(1) === 58) {
|
|
1376
|
+
const C = x.charCodeAt(0);
|
|
1377
|
+
C >= 65 && C <= 90 && (x = `${String.fromCharCode(C + 32)}:${x.substr(2)}`);
|
|
1378
|
+
}
|
|
1379
|
+
b += v(x, !0, !1);
|
|
1380
|
+
}
|
|
1381
|
+
return U && (b += "?", b += v(U, !1, !1)), j && (b += "#", b += d ? j : O(j, !1, !1)), b;
|
|
1382
|
+
}
|
|
1383
|
+
function ue(m) {
|
|
1384
|
+
try {
|
|
1385
|
+
return decodeURIComponent(m);
|
|
1386
|
+
} catch {
|
|
1387
|
+
return m.length > 3 ? m.substr(0, 3) + ue(m.substr(3)) : m;
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
const fe = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
|
|
1391
|
+
function D(m) {
|
|
1392
|
+
return m.match(fe) ? m.replace(fe, ((d) => ue(d))) : m;
|
|
1393
|
+
}
|
|
1394
|
+
var le = i(470);
|
|
1395
|
+
const q = le.posix || le, W = "/";
|
|
1396
|
+
var Q;
|
|
1397
|
+
(function(m) {
|
|
1398
|
+
m.joinPath = function(d, ...v) {
|
|
1399
|
+
return d.with({ path: q.join(d.path, ...v) });
|
|
1400
|
+
}, m.resolvePath = function(d, ...v) {
|
|
1401
|
+
let b = d.path, L = !1;
|
|
1402
|
+
b[0] !== W && (b = W + b, L = !0);
|
|
1403
|
+
let w = q.resolve(b, ...v);
|
|
1404
|
+
return L && w[0] === W && !d.authority && (w = w.substring(1)), d.with({ path: w });
|
|
1405
|
+
}, m.dirname = function(d) {
|
|
1406
|
+
if (d.path.length === 0 || d.path === W) return d;
|
|
1407
|
+
let v = q.dirname(d.path);
|
|
1408
|
+
return v.length === 1 && v.charCodeAt(0) === 46 && (v = ""), d.with({ path: v });
|
|
1409
|
+
}, m.basename = function(d) {
|
|
1410
|
+
return q.basename(d.path);
|
|
1411
|
+
}, m.extname = function(d) {
|
|
1412
|
+
return q.extname(d.path);
|
|
1413
|
+
};
|
|
1414
|
+
})(Q || (Q = {}));
|
|
1415
|
+
})(), vt = n;
|
|
1416
|
+
})();
|
|
1417
|
+
const { URI: Ot, Utils: Ct } = vt;
|
|
1418
|
+
export {
|
|
1419
|
+
Re as C,
|
|
1420
|
+
ye as D,
|
|
1421
|
+
me as F,
|
|
1422
|
+
Ce as I,
|
|
1423
|
+
B as L,
|
|
1424
|
+
ae as M,
|
|
1425
|
+
P,
|
|
1426
|
+
I as R,
|
|
1427
|
+
ke as S,
|
|
1428
|
+
N as T,
|
|
1429
|
+
Ot as U,
|
|
1430
|
+
Le as V,
|
|
1431
|
+
J as a,
|
|
1432
|
+
Oe as b,
|
|
1433
|
+
Ye as c,
|
|
1434
|
+
ht as d,
|
|
1435
|
+
Ct as e,
|
|
1436
|
+
je as f,
|
|
1437
|
+
qe as g,
|
|
1438
|
+
$ as h,
|
|
1439
|
+
K as i,
|
|
1440
|
+
Ze as j,
|
|
1441
|
+
Be as k,
|
|
1442
|
+
xt as t
|
|
1443
|
+
};
|