@nuraly/runtime 0.1.3 → 0.1.5
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/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/themes.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/utils.d.ts +60 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.d.ts +108 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.component.ts +1 -1
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.types.ts +1 -0
- package/dist/CodeEditor-BiNku87K.js +808 -0
- package/dist/{CodeEditor-Ch2tv9BE.js → CodeEditor-G6E8PUI7.js} +14593 -14607
- package/dist/{SmartAttributeHandler-hoSLpm1Y.js → SmartAttributeHandler-C9vS-cHW.js} +1 -1
- package/dist/SmartAttributeHandler-u-ZHGueR.js +193 -0
- package/dist/assets/editor.worker-C_S4Avdt.js +11 -0
- package/dist/assets/{html.worker-BSmGlhXp.js → html.worker-DfuQASUV.js} +18 -18
- package/dist/assets/json.worker-Cucz4wxY.js +42 -0
- package/dist/assets/{ts.worker-DyHHPhrh.js → ts.worker-Dme6S0YK.js} +78 -78
- package/dist/cssMode-B7NVlrDV.js +1443 -0
- package/dist/{freemarker2-DNc2IxPf.js → freemarker2-DS_7G9b8.js} +1 -1
- package/dist/{handlebars-CIbFckEw.js → handlebars-BDyyLkzw.js} +1 -1
- package/dist/{html-nRs_fneU.js → html-DphGFjig.js} +1 -1
- package/dist/{htmlMode-BjehA1YF.js → htmlMode-4zNnSWFo.js} +278 -281
- package/dist/index-B4yIOSMd.js +3847 -0
- package/dist/{javascript-Bn0HduZA.js → javascript-CC1jWyQy.js} +1 -1
- package/dist/{jsonMode-CfGfcJRX.js → jsonMode-Bfzb6wZf.js} +369 -372
- package/dist/{liquid-m4D_LCnC.js → liquid-lTBpqagR.js} +1 -1
- package/dist/{mdx-CakMRbCr.js → mdx-DX66Bp07.js} +1 -1
- package/dist/{micro-app-entry-CI1Rupdh.js → micro-app-entry-DDsAWUJh.js} +5138 -5322
- package/dist/micro-app.bundle.js +1 -1
- package/dist/micro-app.js +9775 -0
- package/dist/{python-oJwaiPUY.js → python-BGUhyO4G.js} +1 -1
- package/dist/{razor-u_dd4rqc.js → razor-DEVWQFSa.js} +1 -1
- package/dist/runtime.js +401 -0
- package/dist/style.css +1 -1
- package/dist/tsMode-CYFi80Jf.js +800 -0
- package/dist/{typescript-Bjs2N5Be.js → typescript-B1xIbH_T.js} +1 -1
- package/dist/{wgsl-Bv2xeo60.js → wgsl-C9yjop46.js} +1 -1
- package/dist/{xml-BCveATLl.js → xml-DmdvyqrE.js} +1 -1
- package/dist/{yaml-BfWQPJQi.js → yaml-LGNo48fy.js} +1 -1
- package/package.json +2 -2
- package/utils/register-components.ts +1 -1
- package/vite.config.ts +8 -8
- package/dist/.claude/settings.local.json +0 -9
- package/dist/assets/editor.worker-vBWydyGC.js +0 -11
- package/dist/assets/json.worker-Dqnoedz4.js +0 -42
- package/dist/cssMode-Bt2uK8XM.js +0 -1446
- package/dist/micro-app.bundle.umd.cjs +0 -5051
- package/dist/tsMode-DlZ38d3D.js +0 -813
|
@@ -0,0 +1,1443 @@
|
|
|
1
|
+
import { m as Se } from "./CodeEditor-G6E8PUI7.js";
|
|
2
|
+
/*!-----------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
5
|
+
* Released under the MIT license
|
|
6
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
7
|
+
*-----------------------------------------------------------------------------*/
|
|
8
|
+
var Fe = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, je = Object.getOwnPropertyNames, Ne = Object.prototype.hasOwnProperty, We = (t, n, i, r) => {
|
|
9
|
+
if (n && typeof n == "object" || typeof n == "function")
|
|
10
|
+
for (let e of je(n))
|
|
11
|
+
!Ne.call(t, e) && e !== i && Fe(t, e, { get: () => n[e], enumerable: !(r = Le(n, e)) || r.enumerable });
|
|
12
|
+
return t;
|
|
13
|
+
}, Ue = (t, n, i) => (We(t, n, "default"), i), c = {};
|
|
14
|
+
Ue(c, Se);
|
|
15
|
+
var Oe = 2 * 60 * 1e3, Ve = class {
|
|
16
|
+
_defaults;
|
|
17
|
+
_idleCheckInterval;
|
|
18
|
+
_lastUsedTime;
|
|
19
|
+
_configChangeListener;
|
|
20
|
+
_worker;
|
|
21
|
+
_client;
|
|
22
|
+
constructor(t) {
|
|
23
|
+
this._defaults = t, this._worker = null, this._client = null, this._idleCheckInterval = window.setInterval(() => this._checkIfIdle(), 30 * 1e3), this._lastUsedTime = 0, this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker());
|
|
24
|
+
}
|
|
25
|
+
_stopWorker() {
|
|
26
|
+
this._worker && (this._worker.dispose(), this._worker = null), this._client = null;
|
|
27
|
+
}
|
|
28
|
+
dispose() {
|
|
29
|
+
clearInterval(this._idleCheckInterval), this._configChangeListener.dispose(), this._stopWorker();
|
|
30
|
+
}
|
|
31
|
+
_checkIfIdle() {
|
|
32
|
+
if (!this._worker)
|
|
33
|
+
return;
|
|
34
|
+
Date.now() - this._lastUsedTime > Oe && this._stopWorker();
|
|
35
|
+
}
|
|
36
|
+
_getClient() {
|
|
37
|
+
return this._lastUsedTime = Date.now(), this._client || (this._worker = c.editor.createWebWorker({
|
|
38
|
+
moduleId: "vs/language/css/cssWorker",
|
|
39
|
+
label: this._defaults.languageId,
|
|
40
|
+
createData: {
|
|
41
|
+
options: this._defaults.options,
|
|
42
|
+
languageId: this._defaults.languageId
|
|
43
|
+
}
|
|
44
|
+
}), this._client = this._worker.getProxy()), this._client;
|
|
45
|
+
}
|
|
46
|
+
getLanguageServiceWorker(...t) {
|
|
47
|
+
let n;
|
|
48
|
+
return this._getClient().then((i) => {
|
|
49
|
+
n = i;
|
|
50
|
+
}).then((i) => {
|
|
51
|
+
if (this._worker)
|
|
52
|
+
return this._worker.withSyncedResources(t);
|
|
53
|
+
}).then((i) => n);
|
|
54
|
+
}
|
|
55
|
+
}, J;
|
|
56
|
+
(function(t) {
|
|
57
|
+
t.MIN_VALUE = -2147483648, t.MAX_VALUE = 2147483647;
|
|
58
|
+
})(J || (J = {}));
|
|
59
|
+
var W;
|
|
60
|
+
(function(t) {
|
|
61
|
+
t.MIN_VALUE = 0, t.MAX_VALUE = 2147483647;
|
|
62
|
+
})(W || (W = {}));
|
|
63
|
+
var k;
|
|
64
|
+
(function(t) {
|
|
65
|
+
function n(r, e) {
|
|
66
|
+
return r === Number.MAX_VALUE && (r = W.MAX_VALUE), e === Number.MAX_VALUE && (e = W.MAX_VALUE), { line: r, character: e };
|
|
67
|
+
}
|
|
68
|
+
t.create = n;
|
|
69
|
+
function i(r) {
|
|
70
|
+
var e = r;
|
|
71
|
+
return s.objectLiteral(e) && s.uinteger(e.line) && s.uinteger(e.character);
|
|
72
|
+
}
|
|
73
|
+
t.is = i;
|
|
74
|
+
})(k || (k = {}));
|
|
75
|
+
var p;
|
|
76
|
+
(function(t) {
|
|
77
|
+
function n(r, e, a, o) {
|
|
78
|
+
if (s.uinteger(r) && s.uinteger(e) && s.uinteger(a) && s.uinteger(o))
|
|
79
|
+
return { start: k.create(r, e), end: k.create(a, o) };
|
|
80
|
+
if (k.is(r) && k.is(e))
|
|
81
|
+
return { start: r, end: e };
|
|
82
|
+
throw new Error("Range#create called with invalid arguments[" + r + ", " + e + ", " + a + ", " + o + "]");
|
|
83
|
+
}
|
|
84
|
+
t.create = n;
|
|
85
|
+
function i(r) {
|
|
86
|
+
var e = r;
|
|
87
|
+
return s.objectLiteral(e) && k.is(e.start) && k.is(e.end);
|
|
88
|
+
}
|
|
89
|
+
t.is = i;
|
|
90
|
+
})(p || (p = {}));
|
|
91
|
+
var z;
|
|
92
|
+
(function(t) {
|
|
93
|
+
function n(r, e) {
|
|
94
|
+
return { uri: r, range: e };
|
|
95
|
+
}
|
|
96
|
+
t.create = n;
|
|
97
|
+
function i(r) {
|
|
98
|
+
var e = r;
|
|
99
|
+
return s.defined(e) && p.is(e.range) && (s.string(e.uri) || s.undefined(e.uri));
|
|
100
|
+
}
|
|
101
|
+
t.is = i;
|
|
102
|
+
})(z || (z = {}));
|
|
103
|
+
var Y;
|
|
104
|
+
(function(t) {
|
|
105
|
+
function n(r, e, a, o) {
|
|
106
|
+
return { targetUri: r, targetRange: e, targetSelectionRange: a, originSelectionRange: o };
|
|
107
|
+
}
|
|
108
|
+
t.create = n;
|
|
109
|
+
function i(r) {
|
|
110
|
+
var e = r;
|
|
111
|
+
return s.defined(e) && p.is(e.targetRange) && s.string(e.targetUri) && (p.is(e.targetSelectionRange) || s.undefined(e.targetSelectionRange)) && (p.is(e.originSelectionRange) || s.undefined(e.originSelectionRange));
|
|
112
|
+
}
|
|
113
|
+
t.is = i;
|
|
114
|
+
})(Y || (Y = {}));
|
|
115
|
+
var X;
|
|
116
|
+
(function(t) {
|
|
117
|
+
function n(r, e, a, o) {
|
|
118
|
+
return {
|
|
119
|
+
red: r,
|
|
120
|
+
green: e,
|
|
121
|
+
blue: a,
|
|
122
|
+
alpha: o
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
t.create = n;
|
|
126
|
+
function i(r) {
|
|
127
|
+
var e = r;
|
|
128
|
+
return s.numberRange(e.red, 0, 1) && s.numberRange(e.green, 0, 1) && s.numberRange(e.blue, 0, 1) && s.numberRange(e.alpha, 0, 1);
|
|
129
|
+
}
|
|
130
|
+
t.is = i;
|
|
131
|
+
})(X || (X = {}));
|
|
132
|
+
var Z;
|
|
133
|
+
(function(t) {
|
|
134
|
+
function n(r, e) {
|
|
135
|
+
return {
|
|
136
|
+
range: r,
|
|
137
|
+
color: e
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
t.create = n;
|
|
141
|
+
function i(r) {
|
|
142
|
+
var e = r;
|
|
143
|
+
return p.is(e.range) && X.is(e.color);
|
|
144
|
+
}
|
|
145
|
+
t.is = i;
|
|
146
|
+
})(Z || (Z = {}));
|
|
147
|
+
var K;
|
|
148
|
+
(function(t) {
|
|
149
|
+
function n(r, e, a) {
|
|
150
|
+
return {
|
|
151
|
+
label: r,
|
|
152
|
+
textEdit: e,
|
|
153
|
+
additionalTextEdits: a
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
t.create = n;
|
|
157
|
+
function i(r) {
|
|
158
|
+
var e = r;
|
|
159
|
+
return s.string(e.label) && (s.undefined(e.textEdit) || x.is(e)) && (s.undefined(e.additionalTextEdits) || s.typedArray(e.additionalTextEdits, x.is));
|
|
160
|
+
}
|
|
161
|
+
t.is = i;
|
|
162
|
+
})(K || (K = {}));
|
|
163
|
+
var R;
|
|
164
|
+
(function(t) {
|
|
165
|
+
t.Comment = "comment", t.Imports = "imports", t.Region = "region";
|
|
166
|
+
})(R || (R = {}));
|
|
167
|
+
var ee;
|
|
168
|
+
(function(t) {
|
|
169
|
+
function n(r, e, a, o, u) {
|
|
170
|
+
var g = {
|
|
171
|
+
startLine: r,
|
|
172
|
+
endLine: e
|
|
173
|
+
};
|
|
174
|
+
return s.defined(a) && (g.startCharacter = a), s.defined(o) && (g.endCharacter = o), s.defined(u) && (g.kind = u), g;
|
|
175
|
+
}
|
|
176
|
+
t.create = n;
|
|
177
|
+
function i(r) {
|
|
178
|
+
var e = r;
|
|
179
|
+
return 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));
|
|
180
|
+
}
|
|
181
|
+
t.is = i;
|
|
182
|
+
})(ee || (ee = {}));
|
|
183
|
+
var B;
|
|
184
|
+
(function(t) {
|
|
185
|
+
function n(r, e) {
|
|
186
|
+
return {
|
|
187
|
+
location: r,
|
|
188
|
+
message: e
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
t.create = n;
|
|
192
|
+
function i(r) {
|
|
193
|
+
var e = r;
|
|
194
|
+
return s.defined(e) && z.is(e.location) && s.string(e.message);
|
|
195
|
+
}
|
|
196
|
+
t.is = i;
|
|
197
|
+
})(B || (B = {}));
|
|
198
|
+
var y;
|
|
199
|
+
(function(t) {
|
|
200
|
+
t.Error = 1, t.Warning = 2, t.Information = 3, t.Hint = 4;
|
|
201
|
+
})(y || (y = {}));
|
|
202
|
+
var te;
|
|
203
|
+
(function(t) {
|
|
204
|
+
t.Unnecessary = 1, t.Deprecated = 2;
|
|
205
|
+
})(te || (te = {}));
|
|
206
|
+
var re;
|
|
207
|
+
(function(t) {
|
|
208
|
+
function n(i) {
|
|
209
|
+
var r = i;
|
|
210
|
+
return r != null && s.string(r.href);
|
|
211
|
+
}
|
|
212
|
+
t.is = n;
|
|
213
|
+
})(re || (re = {}));
|
|
214
|
+
var U;
|
|
215
|
+
(function(t) {
|
|
216
|
+
function n(r, e, a, o, u, g) {
|
|
217
|
+
var d = { range: r, message: e };
|
|
218
|
+
return s.defined(a) && (d.severity = a), s.defined(o) && (d.code = o), s.defined(u) && (d.source = u), s.defined(g) && (d.relatedInformation = g), d;
|
|
219
|
+
}
|
|
220
|
+
t.create = n;
|
|
221
|
+
function i(r) {
|
|
222
|
+
var e, a = r;
|
|
223
|
+
return s.defined(a) && p.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, B.is));
|
|
224
|
+
}
|
|
225
|
+
t.is = i;
|
|
226
|
+
})(U || (U = {}));
|
|
227
|
+
var D;
|
|
228
|
+
(function(t) {
|
|
229
|
+
function n(r, e) {
|
|
230
|
+
for (var a = [], o = 2; o < arguments.length; o++)
|
|
231
|
+
a[o - 2] = arguments[o];
|
|
232
|
+
var u = { title: r, command: e };
|
|
233
|
+
return s.defined(a) && a.length > 0 && (u.arguments = a), u;
|
|
234
|
+
}
|
|
235
|
+
t.create = n;
|
|
236
|
+
function i(r) {
|
|
237
|
+
var e = r;
|
|
238
|
+
return s.defined(e) && s.string(e.title) && s.string(e.command);
|
|
239
|
+
}
|
|
240
|
+
t.is = i;
|
|
241
|
+
})(D || (D = {}));
|
|
242
|
+
var x;
|
|
243
|
+
(function(t) {
|
|
244
|
+
function n(a, o) {
|
|
245
|
+
return { range: a, newText: o };
|
|
246
|
+
}
|
|
247
|
+
t.replace = n;
|
|
248
|
+
function i(a, o) {
|
|
249
|
+
return { range: { start: a, end: a }, newText: o };
|
|
250
|
+
}
|
|
251
|
+
t.insert = i;
|
|
252
|
+
function r(a) {
|
|
253
|
+
return { range: a, newText: "" };
|
|
254
|
+
}
|
|
255
|
+
t.del = r;
|
|
256
|
+
function e(a) {
|
|
257
|
+
var o = a;
|
|
258
|
+
return s.objectLiteral(o) && s.string(o.newText) && p.is(o.range);
|
|
259
|
+
}
|
|
260
|
+
t.is = e;
|
|
261
|
+
})(x || (x = {}));
|
|
262
|
+
var I;
|
|
263
|
+
(function(t) {
|
|
264
|
+
function n(r, e, a) {
|
|
265
|
+
var o = { label: r };
|
|
266
|
+
return e !== void 0 && (o.needsConfirmation = e), a !== void 0 && (o.description = a), o;
|
|
267
|
+
}
|
|
268
|
+
t.create = n;
|
|
269
|
+
function i(r) {
|
|
270
|
+
var e = r;
|
|
271
|
+
return e !== void 0 && s.objectLiteral(e) && s.string(e.label) && (s.boolean(e.needsConfirmation) || e.needsConfirmation === void 0) && (s.string(e.description) || e.description === void 0);
|
|
272
|
+
}
|
|
273
|
+
t.is = i;
|
|
274
|
+
})(I || (I = {}));
|
|
275
|
+
var m;
|
|
276
|
+
(function(t) {
|
|
277
|
+
function n(i) {
|
|
278
|
+
var r = i;
|
|
279
|
+
return typeof r == "string";
|
|
280
|
+
}
|
|
281
|
+
t.is = n;
|
|
282
|
+
})(m || (m = {}));
|
|
283
|
+
var E;
|
|
284
|
+
(function(t) {
|
|
285
|
+
function n(a, o, u) {
|
|
286
|
+
return { range: a, newText: o, annotationId: u };
|
|
287
|
+
}
|
|
288
|
+
t.replace = n;
|
|
289
|
+
function i(a, o, u) {
|
|
290
|
+
return { range: { start: a, end: a }, newText: o, annotationId: u };
|
|
291
|
+
}
|
|
292
|
+
t.insert = i;
|
|
293
|
+
function r(a, o) {
|
|
294
|
+
return { range: a, newText: "", annotationId: o };
|
|
295
|
+
}
|
|
296
|
+
t.del = r;
|
|
297
|
+
function e(a) {
|
|
298
|
+
var o = a;
|
|
299
|
+
return x.is(o) && (I.is(o.annotationId) || m.is(o.annotationId));
|
|
300
|
+
}
|
|
301
|
+
t.is = e;
|
|
302
|
+
})(E || (E = {}));
|
|
303
|
+
var O;
|
|
304
|
+
(function(t) {
|
|
305
|
+
function n(r, e) {
|
|
306
|
+
return { textDocument: r, edits: e };
|
|
307
|
+
}
|
|
308
|
+
t.create = n;
|
|
309
|
+
function i(r) {
|
|
310
|
+
var e = r;
|
|
311
|
+
return s.defined(e) && V.is(e.textDocument) && Array.isArray(e.edits);
|
|
312
|
+
}
|
|
313
|
+
t.is = i;
|
|
314
|
+
})(O || (O = {}));
|
|
315
|
+
var M;
|
|
316
|
+
(function(t) {
|
|
317
|
+
function n(r, e, a) {
|
|
318
|
+
var o = {
|
|
319
|
+
kind: "create",
|
|
320
|
+
uri: r
|
|
321
|
+
};
|
|
322
|
+
return e !== void 0 && (e.overwrite !== void 0 || e.ignoreIfExists !== void 0) && (o.options = e), a !== void 0 && (o.annotationId = a), o;
|
|
323
|
+
}
|
|
324
|
+
t.create = n;
|
|
325
|
+
function i(r) {
|
|
326
|
+
var e = r;
|
|
327
|
+
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 || m.is(e.annotationId));
|
|
328
|
+
}
|
|
329
|
+
t.is = i;
|
|
330
|
+
})(M || (M = {}));
|
|
331
|
+
var T;
|
|
332
|
+
(function(t) {
|
|
333
|
+
function n(r, e, a, o) {
|
|
334
|
+
var u = {
|
|
335
|
+
kind: "rename",
|
|
336
|
+
oldUri: r,
|
|
337
|
+
newUri: e
|
|
338
|
+
};
|
|
339
|
+
return a !== void 0 && (a.overwrite !== void 0 || a.ignoreIfExists !== void 0) && (u.options = a), o !== void 0 && (u.annotationId = o), u;
|
|
340
|
+
}
|
|
341
|
+
t.create = n;
|
|
342
|
+
function i(r) {
|
|
343
|
+
var e = r;
|
|
344
|
+
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 || m.is(e.annotationId));
|
|
345
|
+
}
|
|
346
|
+
t.is = i;
|
|
347
|
+
})(T || (T = {}));
|
|
348
|
+
var S;
|
|
349
|
+
(function(t) {
|
|
350
|
+
function n(r, e, a) {
|
|
351
|
+
var o = {
|
|
352
|
+
kind: "delete",
|
|
353
|
+
uri: r
|
|
354
|
+
};
|
|
355
|
+
return e !== void 0 && (e.recursive !== void 0 || e.ignoreIfNotExists !== void 0) && (o.options = e), a !== void 0 && (o.annotationId = a), o;
|
|
356
|
+
}
|
|
357
|
+
t.create = n;
|
|
358
|
+
function i(r) {
|
|
359
|
+
var e = r;
|
|
360
|
+
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 || m.is(e.annotationId));
|
|
361
|
+
}
|
|
362
|
+
t.is = i;
|
|
363
|
+
})(S || (S = {}));
|
|
364
|
+
var $;
|
|
365
|
+
(function(t) {
|
|
366
|
+
function n(i) {
|
|
367
|
+
var r = i;
|
|
368
|
+
return r && (r.changes !== void 0 || r.documentChanges !== void 0) && (r.documentChanges === void 0 || r.documentChanges.every(function(e) {
|
|
369
|
+
return s.string(e.kind) ? M.is(e) || T.is(e) || S.is(e) : O.is(e);
|
|
370
|
+
}));
|
|
371
|
+
}
|
|
372
|
+
t.is = n;
|
|
373
|
+
})($ || ($ = {}));
|
|
374
|
+
var N = function() {
|
|
375
|
+
function t(n, i) {
|
|
376
|
+
this.edits = n, this.changeAnnotations = i;
|
|
377
|
+
}
|
|
378
|
+
return t.prototype.insert = function(n, i, r) {
|
|
379
|
+
var e, a;
|
|
380
|
+
if (r === void 0 ? e = x.insert(n, i) : m.is(r) ? (a = r, e = E.insert(n, i, r)) : (this.assertChangeAnnotations(this.changeAnnotations), a = this.changeAnnotations.manage(r), e = E.insert(n, i, a)), this.edits.push(e), a !== void 0)
|
|
381
|
+
return a;
|
|
382
|
+
}, t.prototype.replace = function(n, i, r) {
|
|
383
|
+
var e, a;
|
|
384
|
+
if (r === void 0 ? e = x.replace(n, i) : m.is(r) ? (a = r, e = E.replace(n, i, r)) : (this.assertChangeAnnotations(this.changeAnnotations), a = this.changeAnnotations.manage(r), e = E.replace(n, i, a)), this.edits.push(e), a !== void 0)
|
|
385
|
+
return a;
|
|
386
|
+
}, t.prototype.delete = function(n, i) {
|
|
387
|
+
var r, e;
|
|
388
|
+
if (i === void 0 ? r = x.del(n) : m.is(i) ? (e = i, r = E.del(n, i)) : (this.assertChangeAnnotations(this.changeAnnotations), e = this.changeAnnotations.manage(i), r = E.del(n, e)), this.edits.push(r), e !== void 0)
|
|
389
|
+
return e;
|
|
390
|
+
}, t.prototype.add = function(n) {
|
|
391
|
+
this.edits.push(n);
|
|
392
|
+
}, t.prototype.all = function() {
|
|
393
|
+
return this.edits;
|
|
394
|
+
}, t.prototype.clear = function() {
|
|
395
|
+
this.edits.splice(0, this.edits.length);
|
|
396
|
+
}, t.prototype.assertChangeAnnotations = function(n) {
|
|
397
|
+
if (n === void 0)
|
|
398
|
+
throw new Error("Text edit change is not configured to manage change annotations.");
|
|
399
|
+
}, t;
|
|
400
|
+
}(), ne = function() {
|
|
401
|
+
function t(n) {
|
|
402
|
+
this._annotations = n === void 0 ? /* @__PURE__ */ Object.create(null) : n, this._counter = 0, this._size = 0;
|
|
403
|
+
}
|
|
404
|
+
return t.prototype.all = function() {
|
|
405
|
+
return this._annotations;
|
|
406
|
+
}, Object.defineProperty(t.prototype, "size", {
|
|
407
|
+
get: function() {
|
|
408
|
+
return this._size;
|
|
409
|
+
},
|
|
410
|
+
enumerable: !1,
|
|
411
|
+
configurable: !0
|
|
412
|
+
}), t.prototype.manage = function(n, i) {
|
|
413
|
+
var r;
|
|
414
|
+
if (m.is(n) ? r = n : (r = this.nextId(), i = n), this._annotations[r] !== void 0)
|
|
415
|
+
throw new Error("Id " + r + " is already in use.");
|
|
416
|
+
if (i === void 0)
|
|
417
|
+
throw new Error("No annotation provided for id " + r);
|
|
418
|
+
return this._annotations[r] = i, this._size++, r;
|
|
419
|
+
}, t.prototype.nextId = function() {
|
|
420
|
+
return this._counter++, this._counter.toString();
|
|
421
|
+
}, t;
|
|
422
|
+
}();
|
|
423
|
+
(function() {
|
|
424
|
+
function t(n) {
|
|
425
|
+
var i = this;
|
|
426
|
+
this._textEditChanges = /* @__PURE__ */ Object.create(null), n !== void 0 ? (this._workspaceEdit = n, n.documentChanges ? (this._changeAnnotations = new ne(n.changeAnnotations), n.changeAnnotations = this._changeAnnotations.all(), n.documentChanges.forEach(function(r) {
|
|
427
|
+
if (O.is(r)) {
|
|
428
|
+
var e = new N(r.edits, i._changeAnnotations);
|
|
429
|
+
i._textEditChanges[r.textDocument.uri] = e;
|
|
430
|
+
}
|
|
431
|
+
})) : n.changes && Object.keys(n.changes).forEach(function(r) {
|
|
432
|
+
var e = new N(n.changes[r]);
|
|
433
|
+
i._textEditChanges[r] = e;
|
|
434
|
+
})) : this._workspaceEdit = {};
|
|
435
|
+
}
|
|
436
|
+
return Object.defineProperty(t.prototype, "edit", {
|
|
437
|
+
get: function() {
|
|
438
|
+
return this.initDocumentChanges(), this._changeAnnotations !== void 0 && (this._changeAnnotations.size === 0 ? this._workspaceEdit.changeAnnotations = void 0 : this._workspaceEdit.changeAnnotations = this._changeAnnotations.all()), this._workspaceEdit;
|
|
439
|
+
},
|
|
440
|
+
enumerable: !1,
|
|
441
|
+
configurable: !0
|
|
442
|
+
}), t.prototype.getTextEditChange = function(n) {
|
|
443
|
+
if (V.is(n)) {
|
|
444
|
+
if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
|
|
445
|
+
throw new Error("Workspace edit is not configured for document changes.");
|
|
446
|
+
var i = { uri: n.uri, version: n.version }, r = this._textEditChanges[i.uri];
|
|
447
|
+
if (!r) {
|
|
448
|
+
var e = [], a = {
|
|
449
|
+
textDocument: i,
|
|
450
|
+
edits: e
|
|
451
|
+
};
|
|
452
|
+
this._workspaceEdit.documentChanges.push(a), r = new N(e, this._changeAnnotations), this._textEditChanges[i.uri] = r;
|
|
453
|
+
}
|
|
454
|
+
return r;
|
|
455
|
+
} else {
|
|
456
|
+
if (this.initChanges(), this._workspaceEdit.changes === void 0)
|
|
457
|
+
throw new Error("Workspace edit is not configured for normal text edit changes.");
|
|
458
|
+
var r = this._textEditChanges[n];
|
|
459
|
+
if (!r) {
|
|
460
|
+
var e = [];
|
|
461
|
+
this._workspaceEdit.changes[n] = e, r = new N(e), this._textEditChanges[n] = r;
|
|
462
|
+
}
|
|
463
|
+
return r;
|
|
464
|
+
}
|
|
465
|
+
}, t.prototype.initDocumentChanges = function() {
|
|
466
|
+
this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._changeAnnotations = new ne(), this._workspaceEdit.documentChanges = [], this._workspaceEdit.changeAnnotations = this._changeAnnotations.all());
|
|
467
|
+
}, t.prototype.initChanges = function() {
|
|
468
|
+
this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null));
|
|
469
|
+
}, t.prototype.createFile = function(n, i, r) {
|
|
470
|
+
if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
|
|
471
|
+
throw new Error("Workspace edit is not configured for document changes.");
|
|
472
|
+
var e;
|
|
473
|
+
I.is(i) || m.is(i) ? e = i : r = i;
|
|
474
|
+
var a, o;
|
|
475
|
+
if (e === void 0 ? a = M.create(n, r) : (o = m.is(e) ? e : this._changeAnnotations.manage(e), a = M.create(n, r, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0)
|
|
476
|
+
return o;
|
|
477
|
+
}, t.prototype.renameFile = function(n, i, r, e) {
|
|
478
|
+
if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
|
|
479
|
+
throw new Error("Workspace edit is not configured for document changes.");
|
|
480
|
+
var a;
|
|
481
|
+
I.is(r) || m.is(r) ? a = r : e = r;
|
|
482
|
+
var o, u;
|
|
483
|
+
if (a === void 0 ? o = T.create(n, i, e) : (u = m.is(a) ? a : this._changeAnnotations.manage(a), o = T.create(n, i, e, u)), this._workspaceEdit.documentChanges.push(o), u !== void 0)
|
|
484
|
+
return u;
|
|
485
|
+
}, t.prototype.deleteFile = function(n, i, r) {
|
|
486
|
+
if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
|
|
487
|
+
throw new Error("Workspace edit is not configured for document changes.");
|
|
488
|
+
var e;
|
|
489
|
+
I.is(i) || m.is(i) ? e = i : r = i;
|
|
490
|
+
var a, o;
|
|
491
|
+
if (e === void 0 ? a = S.create(n, r) : (o = m.is(e) ? e : this._changeAnnotations.manage(e), a = S.create(n, r, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0)
|
|
492
|
+
return o;
|
|
493
|
+
}, t;
|
|
494
|
+
})();
|
|
495
|
+
var ie;
|
|
496
|
+
(function(t) {
|
|
497
|
+
function n(r) {
|
|
498
|
+
return { uri: r };
|
|
499
|
+
}
|
|
500
|
+
t.create = n;
|
|
501
|
+
function i(r) {
|
|
502
|
+
var e = r;
|
|
503
|
+
return s.defined(e) && s.string(e.uri);
|
|
504
|
+
}
|
|
505
|
+
t.is = i;
|
|
506
|
+
})(ie || (ie = {}));
|
|
507
|
+
var ae;
|
|
508
|
+
(function(t) {
|
|
509
|
+
function n(r, e) {
|
|
510
|
+
return { uri: r, version: e };
|
|
511
|
+
}
|
|
512
|
+
t.create = n;
|
|
513
|
+
function i(r) {
|
|
514
|
+
var e = r;
|
|
515
|
+
return s.defined(e) && s.string(e.uri) && s.integer(e.version);
|
|
516
|
+
}
|
|
517
|
+
t.is = i;
|
|
518
|
+
})(ae || (ae = {}));
|
|
519
|
+
var V;
|
|
520
|
+
(function(t) {
|
|
521
|
+
function n(r, e) {
|
|
522
|
+
return { uri: r, version: e };
|
|
523
|
+
}
|
|
524
|
+
t.create = n;
|
|
525
|
+
function i(r) {
|
|
526
|
+
var e = r;
|
|
527
|
+
return s.defined(e) && s.string(e.uri) && (e.version === null || s.integer(e.version));
|
|
528
|
+
}
|
|
529
|
+
t.is = i;
|
|
530
|
+
})(V || (V = {}));
|
|
531
|
+
var oe;
|
|
532
|
+
(function(t) {
|
|
533
|
+
function n(r, e, a, o) {
|
|
534
|
+
return { uri: r, languageId: e, version: a, text: o };
|
|
535
|
+
}
|
|
536
|
+
t.create = n;
|
|
537
|
+
function i(r) {
|
|
538
|
+
var e = r;
|
|
539
|
+
return s.defined(e) && s.string(e.uri) && s.string(e.languageId) && s.integer(e.version) && s.string(e.text);
|
|
540
|
+
}
|
|
541
|
+
t.is = i;
|
|
542
|
+
})(oe || (oe = {}));
|
|
543
|
+
var F;
|
|
544
|
+
(function(t) {
|
|
545
|
+
t.PlainText = "plaintext", t.Markdown = "markdown";
|
|
546
|
+
})(F || (F = {}));
|
|
547
|
+
(function(t) {
|
|
548
|
+
function n(i) {
|
|
549
|
+
var r = i;
|
|
550
|
+
return r === t.PlainText || r === t.Markdown;
|
|
551
|
+
}
|
|
552
|
+
t.is = n;
|
|
553
|
+
})(F || (F = {}));
|
|
554
|
+
var q;
|
|
555
|
+
(function(t) {
|
|
556
|
+
function n(i) {
|
|
557
|
+
var r = i;
|
|
558
|
+
return s.objectLiteral(i) && F.is(r.kind) && s.string(r.value);
|
|
559
|
+
}
|
|
560
|
+
t.is = n;
|
|
561
|
+
})(q || (q = {}));
|
|
562
|
+
var l;
|
|
563
|
+
(function(t) {
|
|
564
|
+
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;
|
|
565
|
+
})(l || (l = {}));
|
|
566
|
+
var Q;
|
|
567
|
+
(function(t) {
|
|
568
|
+
t.PlainText = 1, t.Snippet = 2;
|
|
569
|
+
})(Q || (Q = {}));
|
|
570
|
+
var se;
|
|
571
|
+
(function(t) {
|
|
572
|
+
t.Deprecated = 1;
|
|
573
|
+
})(se || (se = {}));
|
|
574
|
+
var ue;
|
|
575
|
+
(function(t) {
|
|
576
|
+
function n(r, e, a) {
|
|
577
|
+
return { newText: r, insert: e, replace: a };
|
|
578
|
+
}
|
|
579
|
+
t.create = n;
|
|
580
|
+
function i(r) {
|
|
581
|
+
var e = r;
|
|
582
|
+
return e && s.string(e.newText) && p.is(e.insert) && p.is(e.replace);
|
|
583
|
+
}
|
|
584
|
+
t.is = i;
|
|
585
|
+
})(ue || (ue = {}));
|
|
586
|
+
var ce;
|
|
587
|
+
(function(t) {
|
|
588
|
+
t.asIs = 1, t.adjustIndentation = 2;
|
|
589
|
+
})(ce || (ce = {}));
|
|
590
|
+
var de;
|
|
591
|
+
(function(t) {
|
|
592
|
+
function n(i) {
|
|
593
|
+
return { label: i };
|
|
594
|
+
}
|
|
595
|
+
t.create = n;
|
|
596
|
+
})(de || (de = {}));
|
|
597
|
+
var fe;
|
|
598
|
+
(function(t) {
|
|
599
|
+
function n(i, r) {
|
|
600
|
+
return { items: i || [], isIncomplete: !!r };
|
|
601
|
+
}
|
|
602
|
+
t.create = n;
|
|
603
|
+
})(fe || (fe = {}));
|
|
604
|
+
var H;
|
|
605
|
+
(function(t) {
|
|
606
|
+
function n(r) {
|
|
607
|
+
return r.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&");
|
|
608
|
+
}
|
|
609
|
+
t.fromPlainText = n;
|
|
610
|
+
function i(r) {
|
|
611
|
+
var e = r;
|
|
612
|
+
return s.string(e) || s.objectLiteral(e) && s.string(e.language) && s.string(e.value);
|
|
613
|
+
}
|
|
614
|
+
t.is = i;
|
|
615
|
+
})(H || (H = {}));
|
|
616
|
+
var ge;
|
|
617
|
+
(function(t) {
|
|
618
|
+
function n(i) {
|
|
619
|
+
var r = i;
|
|
620
|
+
return !!r && s.objectLiteral(r) && (q.is(r.contents) || H.is(r.contents) || s.typedArray(r.contents, H.is)) && (i.range === void 0 || p.is(i.range));
|
|
621
|
+
}
|
|
622
|
+
t.is = n;
|
|
623
|
+
})(ge || (ge = {}));
|
|
624
|
+
var le;
|
|
625
|
+
(function(t) {
|
|
626
|
+
function n(i, r) {
|
|
627
|
+
return r ? { label: i, documentation: r } : { label: i };
|
|
628
|
+
}
|
|
629
|
+
t.create = n;
|
|
630
|
+
})(le || (le = {}));
|
|
631
|
+
var he;
|
|
632
|
+
(function(t) {
|
|
633
|
+
function n(i, r) {
|
|
634
|
+
for (var e = [], a = 2; a < arguments.length; a++)
|
|
635
|
+
e[a - 2] = arguments[a];
|
|
636
|
+
var o = { label: i };
|
|
637
|
+
return s.defined(r) && (o.documentation = r), s.defined(e) ? o.parameters = e : o.parameters = [], o;
|
|
638
|
+
}
|
|
639
|
+
t.create = n;
|
|
640
|
+
})(he || (he = {}));
|
|
641
|
+
var P;
|
|
642
|
+
(function(t) {
|
|
643
|
+
t.Text = 1, t.Read = 2, t.Write = 3;
|
|
644
|
+
})(P || (P = {}));
|
|
645
|
+
var ve;
|
|
646
|
+
(function(t) {
|
|
647
|
+
function n(i, r) {
|
|
648
|
+
var e = { range: i };
|
|
649
|
+
return s.number(r) && (e.kind = r), e;
|
|
650
|
+
}
|
|
651
|
+
t.create = n;
|
|
652
|
+
})(ve || (ve = {}));
|
|
653
|
+
var h;
|
|
654
|
+
(function(t) {
|
|
655
|
+
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;
|
|
656
|
+
})(h || (h = {}));
|
|
657
|
+
var pe;
|
|
658
|
+
(function(t) {
|
|
659
|
+
t.Deprecated = 1;
|
|
660
|
+
})(pe || (pe = {}));
|
|
661
|
+
var me;
|
|
662
|
+
(function(t) {
|
|
663
|
+
function n(i, r, e, a, o) {
|
|
664
|
+
var u = {
|
|
665
|
+
name: i,
|
|
666
|
+
kind: r,
|
|
667
|
+
location: { uri: a, range: e }
|
|
668
|
+
};
|
|
669
|
+
return o && (u.containerName = o), u;
|
|
670
|
+
}
|
|
671
|
+
t.create = n;
|
|
672
|
+
})(me || (me = {}));
|
|
673
|
+
var _e;
|
|
674
|
+
(function(t) {
|
|
675
|
+
function n(r, e, a, o, u, g) {
|
|
676
|
+
var d = {
|
|
677
|
+
name: r,
|
|
678
|
+
detail: e,
|
|
679
|
+
kind: a,
|
|
680
|
+
range: o,
|
|
681
|
+
selectionRange: u
|
|
682
|
+
};
|
|
683
|
+
return g !== void 0 && (d.children = g), d;
|
|
684
|
+
}
|
|
685
|
+
t.create = n;
|
|
686
|
+
function i(r) {
|
|
687
|
+
var e = r;
|
|
688
|
+
return e && s.string(e.name) && s.number(e.kind) && p.is(e.range) && p.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));
|
|
689
|
+
}
|
|
690
|
+
t.is = i;
|
|
691
|
+
})(_e || (_e = {}));
|
|
692
|
+
var we;
|
|
693
|
+
(function(t) {
|
|
694
|
+
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";
|
|
695
|
+
})(we || (we = {}));
|
|
696
|
+
var ke;
|
|
697
|
+
(function(t) {
|
|
698
|
+
function n(r, e) {
|
|
699
|
+
var a = { diagnostics: r };
|
|
700
|
+
return e != null && (a.only = e), a;
|
|
701
|
+
}
|
|
702
|
+
t.create = n;
|
|
703
|
+
function i(r) {
|
|
704
|
+
var e = r;
|
|
705
|
+
return s.defined(e) && s.typedArray(e.diagnostics, U.is) && (e.only === void 0 || s.typedArray(e.only, s.string));
|
|
706
|
+
}
|
|
707
|
+
t.is = i;
|
|
708
|
+
})(ke || (ke = {}));
|
|
709
|
+
var be;
|
|
710
|
+
(function(t) {
|
|
711
|
+
function n(r, e, a) {
|
|
712
|
+
var o = { title: r }, u = !0;
|
|
713
|
+
return typeof e == "string" ? (u = !1, o.kind = e) : D.is(e) ? o.command = e : o.edit = e, u && a !== void 0 && (o.kind = a), o;
|
|
714
|
+
}
|
|
715
|
+
t.create = n;
|
|
716
|
+
function i(r) {
|
|
717
|
+
var e = r;
|
|
718
|
+
return e && s.string(e.title) && (e.diagnostics === void 0 || s.typedArray(e.diagnostics, U.is)) && (e.kind === void 0 || s.string(e.kind)) && (e.edit !== void 0 || e.command !== void 0) && (e.command === void 0 || D.is(e.command)) && (e.isPreferred === void 0 || s.boolean(e.isPreferred)) && (e.edit === void 0 || $.is(e.edit));
|
|
719
|
+
}
|
|
720
|
+
t.is = i;
|
|
721
|
+
})(be || (be = {}));
|
|
722
|
+
var Ee;
|
|
723
|
+
(function(t) {
|
|
724
|
+
function n(r, e) {
|
|
725
|
+
var a = { range: r };
|
|
726
|
+
return s.defined(e) && (a.data = e), a;
|
|
727
|
+
}
|
|
728
|
+
t.create = n;
|
|
729
|
+
function i(r) {
|
|
730
|
+
var e = r;
|
|
731
|
+
return s.defined(e) && p.is(e.range) && (s.undefined(e.command) || D.is(e.command));
|
|
732
|
+
}
|
|
733
|
+
t.is = i;
|
|
734
|
+
})(Ee || (Ee = {}));
|
|
735
|
+
var xe;
|
|
736
|
+
(function(t) {
|
|
737
|
+
function n(r, e) {
|
|
738
|
+
return { tabSize: r, insertSpaces: e };
|
|
739
|
+
}
|
|
740
|
+
t.create = n;
|
|
741
|
+
function i(r) {
|
|
742
|
+
var e = r;
|
|
743
|
+
return s.defined(e) && s.uinteger(e.tabSize) && s.boolean(e.insertSpaces);
|
|
744
|
+
}
|
|
745
|
+
t.is = i;
|
|
746
|
+
})(xe || (xe = {}));
|
|
747
|
+
var Ce;
|
|
748
|
+
(function(t) {
|
|
749
|
+
function n(r, e, a) {
|
|
750
|
+
return { range: r, target: e, data: a };
|
|
751
|
+
}
|
|
752
|
+
t.create = n;
|
|
753
|
+
function i(r) {
|
|
754
|
+
var e = r;
|
|
755
|
+
return s.defined(e) && p.is(e.range) && (s.undefined(e.target) || s.string(e.target));
|
|
756
|
+
}
|
|
757
|
+
t.is = i;
|
|
758
|
+
})(Ce || (Ce = {}));
|
|
759
|
+
var Ae;
|
|
760
|
+
(function(t) {
|
|
761
|
+
function n(r, e) {
|
|
762
|
+
return { range: r, parent: e };
|
|
763
|
+
}
|
|
764
|
+
t.create = n;
|
|
765
|
+
function i(r) {
|
|
766
|
+
var e = r;
|
|
767
|
+
return e !== void 0 && p.is(e.range) && (e.parent === void 0 || t.is(e.parent));
|
|
768
|
+
}
|
|
769
|
+
t.is = i;
|
|
770
|
+
})(Ae || (Ae = {}));
|
|
771
|
+
var ye;
|
|
772
|
+
(function(t) {
|
|
773
|
+
function n(a, o, u, g) {
|
|
774
|
+
return new He(a, o, u, g);
|
|
775
|
+
}
|
|
776
|
+
t.create = n;
|
|
777
|
+
function i(a) {
|
|
778
|
+
var o = a;
|
|
779
|
+
return !!(s.defined(o) && s.string(o.uri) && (s.undefined(o.languageId) || s.string(o.languageId)) && s.uinteger(o.lineCount) && s.func(o.getText) && s.func(o.positionAt) && s.func(o.offsetAt));
|
|
780
|
+
}
|
|
781
|
+
t.is = i;
|
|
782
|
+
function r(a, o) {
|
|
783
|
+
for (var u = a.getText(), g = e(o, function(A, j) {
|
|
784
|
+
var G = A.range.start.line - j.range.start.line;
|
|
785
|
+
return G === 0 ? A.range.start.character - j.range.start.character : G;
|
|
786
|
+
}), d = u.length, v = g.length - 1; v >= 0; v--) {
|
|
787
|
+
var w = g[v], b = a.offsetAt(w.range.start), f = a.offsetAt(w.range.end);
|
|
788
|
+
if (f <= d)
|
|
789
|
+
u = u.substring(0, b) + w.newText + u.substring(f, u.length);
|
|
790
|
+
else
|
|
791
|
+
throw new Error("Overlapping edit");
|
|
792
|
+
d = b;
|
|
793
|
+
}
|
|
794
|
+
return u;
|
|
795
|
+
}
|
|
796
|
+
t.applyEdits = r;
|
|
797
|
+
function e(a, o) {
|
|
798
|
+
if (a.length <= 1)
|
|
799
|
+
return a;
|
|
800
|
+
var u = a.length / 2 | 0, g = a.slice(0, u), d = a.slice(u);
|
|
801
|
+
e(g, o), e(d, o);
|
|
802
|
+
for (var v = 0, w = 0, b = 0; v < g.length && w < d.length; ) {
|
|
803
|
+
var f = o(g[v], d[w]);
|
|
804
|
+
f <= 0 ? a[b++] = g[v++] : a[b++] = d[w++];
|
|
805
|
+
}
|
|
806
|
+
for (; v < g.length; )
|
|
807
|
+
a[b++] = g[v++];
|
|
808
|
+
for (; w < d.length; )
|
|
809
|
+
a[b++] = d[w++];
|
|
810
|
+
return a;
|
|
811
|
+
}
|
|
812
|
+
})(ye || (ye = {}));
|
|
813
|
+
var He = function() {
|
|
814
|
+
function t(n, i, r, e) {
|
|
815
|
+
this._uri = n, this._languageId = i, this._version = r, this._content = e, this._lineOffsets = void 0;
|
|
816
|
+
}
|
|
817
|
+
return Object.defineProperty(t.prototype, "uri", {
|
|
818
|
+
get: function() {
|
|
819
|
+
return this._uri;
|
|
820
|
+
},
|
|
821
|
+
enumerable: !1,
|
|
822
|
+
configurable: !0
|
|
823
|
+
}), Object.defineProperty(t.prototype, "languageId", {
|
|
824
|
+
get: function() {
|
|
825
|
+
return this._languageId;
|
|
826
|
+
},
|
|
827
|
+
enumerable: !1,
|
|
828
|
+
configurable: !0
|
|
829
|
+
}), Object.defineProperty(t.prototype, "version", {
|
|
830
|
+
get: function() {
|
|
831
|
+
return this._version;
|
|
832
|
+
},
|
|
833
|
+
enumerable: !1,
|
|
834
|
+
configurable: !0
|
|
835
|
+
}), t.prototype.getText = function(n) {
|
|
836
|
+
if (n) {
|
|
837
|
+
var i = this.offsetAt(n.start), r = this.offsetAt(n.end);
|
|
838
|
+
return this._content.substring(i, r);
|
|
839
|
+
}
|
|
840
|
+
return this._content;
|
|
841
|
+
}, t.prototype.update = function(n, i) {
|
|
842
|
+
this._content = n.text, this._version = i, this._lineOffsets = void 0;
|
|
843
|
+
}, t.prototype.getLineOffsets = function() {
|
|
844
|
+
if (this._lineOffsets === void 0) {
|
|
845
|
+
for (var n = [], i = this._content, r = !0, e = 0; e < i.length; e++) {
|
|
846
|
+
r && (n.push(e), r = !1);
|
|
847
|
+
var a = i.charAt(e);
|
|
848
|
+
r = a === "\r" || a === `
|
|
849
|
+
`, a === "\r" && e + 1 < i.length && i.charAt(e + 1) === `
|
|
850
|
+
` && e++;
|
|
851
|
+
}
|
|
852
|
+
r && i.length > 0 && n.push(i.length), this._lineOffsets = n;
|
|
853
|
+
}
|
|
854
|
+
return this._lineOffsets;
|
|
855
|
+
}, t.prototype.positionAt = function(n) {
|
|
856
|
+
n = Math.max(Math.min(n, this._content.length), 0);
|
|
857
|
+
var i = this.getLineOffsets(), r = 0, e = i.length;
|
|
858
|
+
if (e === 0)
|
|
859
|
+
return k.create(0, n);
|
|
860
|
+
for (; r < e; ) {
|
|
861
|
+
var a = Math.floor((r + e) / 2);
|
|
862
|
+
i[a] > n ? e = a : r = a + 1;
|
|
863
|
+
}
|
|
864
|
+
var o = r - 1;
|
|
865
|
+
return k.create(o, n - i[o]);
|
|
866
|
+
}, t.prototype.offsetAt = function(n) {
|
|
867
|
+
var i = this.getLineOffsets();
|
|
868
|
+
if (n.line >= i.length)
|
|
869
|
+
return this._content.length;
|
|
870
|
+
if (n.line < 0)
|
|
871
|
+
return 0;
|
|
872
|
+
var r = i[n.line], e = n.line + 1 < i.length ? i[n.line + 1] : this._content.length;
|
|
873
|
+
return Math.max(Math.min(r + n.character, e), r);
|
|
874
|
+
}, Object.defineProperty(t.prototype, "lineCount", {
|
|
875
|
+
get: function() {
|
|
876
|
+
return this.getLineOffsets().length;
|
|
877
|
+
},
|
|
878
|
+
enumerable: !1,
|
|
879
|
+
configurable: !0
|
|
880
|
+
}), t;
|
|
881
|
+
}(), s;
|
|
882
|
+
(function(t) {
|
|
883
|
+
var n = Object.prototype.toString;
|
|
884
|
+
function i(f) {
|
|
885
|
+
return typeof f < "u";
|
|
886
|
+
}
|
|
887
|
+
t.defined = i;
|
|
888
|
+
function r(f) {
|
|
889
|
+
return typeof f > "u";
|
|
890
|
+
}
|
|
891
|
+
t.undefined = r;
|
|
892
|
+
function e(f) {
|
|
893
|
+
return f === !0 || f === !1;
|
|
894
|
+
}
|
|
895
|
+
t.boolean = e;
|
|
896
|
+
function a(f) {
|
|
897
|
+
return n.call(f) === "[object String]";
|
|
898
|
+
}
|
|
899
|
+
t.string = a;
|
|
900
|
+
function o(f) {
|
|
901
|
+
return n.call(f) === "[object Number]";
|
|
902
|
+
}
|
|
903
|
+
t.number = o;
|
|
904
|
+
function u(f, A, j) {
|
|
905
|
+
return n.call(f) === "[object Number]" && A <= f && f <= j;
|
|
906
|
+
}
|
|
907
|
+
t.numberRange = u;
|
|
908
|
+
function g(f) {
|
|
909
|
+
return n.call(f) === "[object Number]" && -2147483648 <= f && f <= 2147483647;
|
|
910
|
+
}
|
|
911
|
+
t.integer = g;
|
|
912
|
+
function d(f) {
|
|
913
|
+
return n.call(f) === "[object Number]" && 0 <= f && f <= 2147483647;
|
|
914
|
+
}
|
|
915
|
+
t.uinteger = d;
|
|
916
|
+
function v(f) {
|
|
917
|
+
return n.call(f) === "[object Function]";
|
|
918
|
+
}
|
|
919
|
+
t.func = v;
|
|
920
|
+
function w(f) {
|
|
921
|
+
return f !== null && typeof f == "object";
|
|
922
|
+
}
|
|
923
|
+
t.objectLiteral = w;
|
|
924
|
+
function b(f, A) {
|
|
925
|
+
return Array.isArray(f) && f.every(A);
|
|
926
|
+
}
|
|
927
|
+
t.typedArray = b;
|
|
928
|
+
})(s || (s = {}));
|
|
929
|
+
var ze = class {
|
|
930
|
+
constructor(t, n, i) {
|
|
931
|
+
this._languageId = t, this._worker = n;
|
|
932
|
+
const r = (a) => {
|
|
933
|
+
let o = a.getLanguageId();
|
|
934
|
+
if (o !== this._languageId)
|
|
935
|
+
return;
|
|
936
|
+
let u;
|
|
937
|
+
this._listener[a.uri.toString()] = a.onDidChangeContent(() => {
|
|
938
|
+
window.clearTimeout(u), u = window.setTimeout(() => this._doValidate(a.uri, o), 500);
|
|
939
|
+
}), this._doValidate(a.uri, o);
|
|
940
|
+
}, e = (a) => {
|
|
941
|
+
c.editor.setModelMarkers(a, this._languageId, []);
|
|
942
|
+
let o = a.uri.toString(), u = this._listener[o];
|
|
943
|
+
u && (u.dispose(), delete this._listener[o]);
|
|
944
|
+
};
|
|
945
|
+
this._disposables.push(c.editor.onDidCreateModel(r)), this._disposables.push(c.editor.onWillDisposeModel(e)), this._disposables.push(c.editor.onDidChangeModelLanguage((a) => {
|
|
946
|
+
e(a.model), r(a.model);
|
|
947
|
+
})), this._disposables.push(i((a) => {
|
|
948
|
+
c.editor.getModels().forEach((o) => {
|
|
949
|
+
o.getLanguageId() === this._languageId && (e(o), r(o));
|
|
950
|
+
});
|
|
951
|
+
})), this._disposables.push({
|
|
952
|
+
dispose: () => {
|
|
953
|
+
c.editor.getModels().forEach(e);
|
|
954
|
+
for (let a in this._listener)
|
|
955
|
+
this._listener[a].dispose();
|
|
956
|
+
}
|
|
957
|
+
}), c.editor.getModels().forEach(r);
|
|
958
|
+
}
|
|
959
|
+
_disposables = [];
|
|
960
|
+
_listener = /* @__PURE__ */ Object.create(null);
|
|
961
|
+
dispose() {
|
|
962
|
+
this._disposables.forEach((t) => t && t.dispose()), this._disposables.length = 0;
|
|
963
|
+
}
|
|
964
|
+
_doValidate(t, n) {
|
|
965
|
+
this._worker(t).then((i) => i.doValidation(t.toString())).then((i) => {
|
|
966
|
+
const r = i.map((a) => Be(t, a));
|
|
967
|
+
let e = c.editor.getModel(t);
|
|
968
|
+
e && e.getLanguageId() === n && c.editor.setModelMarkers(e, n, r);
|
|
969
|
+
}).then(void 0, (i) => {
|
|
970
|
+
console.error(i);
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
};
|
|
974
|
+
function Xe(t) {
|
|
975
|
+
switch (t) {
|
|
976
|
+
case y.Error:
|
|
977
|
+
return c.MarkerSeverity.Error;
|
|
978
|
+
case y.Warning:
|
|
979
|
+
return c.MarkerSeverity.Warning;
|
|
980
|
+
case y.Information:
|
|
981
|
+
return c.MarkerSeverity.Info;
|
|
982
|
+
case y.Hint:
|
|
983
|
+
return c.MarkerSeverity.Hint;
|
|
984
|
+
default:
|
|
985
|
+
return c.MarkerSeverity.Info;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
function Be(t, n) {
|
|
989
|
+
let i = typeof n.code == "number" ? String(n.code) : n.code;
|
|
990
|
+
return {
|
|
991
|
+
severity: Xe(n.severity),
|
|
992
|
+
startLineNumber: n.range.start.line + 1,
|
|
993
|
+
startColumn: n.range.start.character + 1,
|
|
994
|
+
endLineNumber: n.range.end.line + 1,
|
|
995
|
+
endColumn: n.range.end.character + 1,
|
|
996
|
+
message: n.message,
|
|
997
|
+
code: i,
|
|
998
|
+
source: n.source
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
var $e = class {
|
|
1002
|
+
constructor(t, n) {
|
|
1003
|
+
this._worker = t, this._triggerCharacters = n;
|
|
1004
|
+
}
|
|
1005
|
+
get triggerCharacters() {
|
|
1006
|
+
return this._triggerCharacters;
|
|
1007
|
+
}
|
|
1008
|
+
provideCompletionItems(t, n, i, r) {
|
|
1009
|
+
const e = t.uri;
|
|
1010
|
+
return this._worker(e).then((a) => a.doComplete(e.toString(), C(n))).then((a) => {
|
|
1011
|
+
if (!a)
|
|
1012
|
+
return;
|
|
1013
|
+
const o = t.getWordUntilPosition(n), u = new c.Range(n.lineNumber, o.startColumn, n.lineNumber, o.endColumn), g = a.items.map((d) => {
|
|
1014
|
+
const v = {
|
|
1015
|
+
label: d.label,
|
|
1016
|
+
insertText: d.insertText || d.label,
|
|
1017
|
+
sortText: d.sortText,
|
|
1018
|
+
filterText: d.filterText,
|
|
1019
|
+
documentation: d.documentation,
|
|
1020
|
+
detail: d.detail,
|
|
1021
|
+
command: Ge(d.command),
|
|
1022
|
+
range: u,
|
|
1023
|
+
kind: Qe(d.kind)
|
|
1024
|
+
};
|
|
1025
|
+
return d.textEdit && (qe(d.textEdit) ? v.range = {
|
|
1026
|
+
insert: _(d.textEdit.insert),
|
|
1027
|
+
replace: _(d.textEdit.replace)
|
|
1028
|
+
} : v.range = _(d.textEdit.range), v.insertText = d.textEdit.newText), d.additionalTextEdits && (v.additionalTextEdits = d.additionalTextEdits.map(L)), d.insertTextFormat === Q.Snippet && (v.insertTextRules = c.languages.CompletionItemInsertTextRule.InsertAsSnippet), v;
|
|
1029
|
+
});
|
|
1030
|
+
return {
|
|
1031
|
+
isIncomplete: a.isIncomplete,
|
|
1032
|
+
suggestions: g
|
|
1033
|
+
};
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
};
|
|
1037
|
+
function C(t) {
|
|
1038
|
+
if (t)
|
|
1039
|
+
return { character: t.column - 1, line: t.lineNumber - 1 };
|
|
1040
|
+
}
|
|
1041
|
+
function Pe(t) {
|
|
1042
|
+
if (t)
|
|
1043
|
+
return {
|
|
1044
|
+
start: {
|
|
1045
|
+
line: t.startLineNumber - 1,
|
|
1046
|
+
character: t.startColumn - 1
|
|
1047
|
+
},
|
|
1048
|
+
end: { line: t.endLineNumber - 1, character: t.endColumn - 1 }
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
function _(t) {
|
|
1052
|
+
if (t)
|
|
1053
|
+
return new c.Range(t.start.line + 1, t.start.character + 1, t.end.line + 1, t.end.character + 1);
|
|
1054
|
+
}
|
|
1055
|
+
function qe(t) {
|
|
1056
|
+
return typeof t.insert < "u" && typeof t.replace < "u";
|
|
1057
|
+
}
|
|
1058
|
+
function Qe(t) {
|
|
1059
|
+
const n = c.languages.CompletionItemKind;
|
|
1060
|
+
switch (t) {
|
|
1061
|
+
case l.Text:
|
|
1062
|
+
return n.Text;
|
|
1063
|
+
case l.Method:
|
|
1064
|
+
return n.Method;
|
|
1065
|
+
case l.Function:
|
|
1066
|
+
return n.Function;
|
|
1067
|
+
case l.Constructor:
|
|
1068
|
+
return n.Constructor;
|
|
1069
|
+
case l.Field:
|
|
1070
|
+
return n.Field;
|
|
1071
|
+
case l.Variable:
|
|
1072
|
+
return n.Variable;
|
|
1073
|
+
case l.Class:
|
|
1074
|
+
return n.Class;
|
|
1075
|
+
case l.Interface:
|
|
1076
|
+
return n.Interface;
|
|
1077
|
+
case l.Module:
|
|
1078
|
+
return n.Module;
|
|
1079
|
+
case l.Property:
|
|
1080
|
+
return n.Property;
|
|
1081
|
+
case l.Unit:
|
|
1082
|
+
return n.Unit;
|
|
1083
|
+
case l.Value:
|
|
1084
|
+
return n.Value;
|
|
1085
|
+
case l.Enum:
|
|
1086
|
+
return n.Enum;
|
|
1087
|
+
case l.Keyword:
|
|
1088
|
+
return n.Keyword;
|
|
1089
|
+
case l.Snippet:
|
|
1090
|
+
return n.Snippet;
|
|
1091
|
+
case l.Color:
|
|
1092
|
+
return n.Color;
|
|
1093
|
+
case l.File:
|
|
1094
|
+
return n.File;
|
|
1095
|
+
case l.Reference:
|
|
1096
|
+
return n.Reference;
|
|
1097
|
+
}
|
|
1098
|
+
return n.Property;
|
|
1099
|
+
}
|
|
1100
|
+
function L(t) {
|
|
1101
|
+
if (t)
|
|
1102
|
+
return {
|
|
1103
|
+
range: _(t.range),
|
|
1104
|
+
text: t.newText
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
function Ge(t) {
|
|
1108
|
+
return t && t.command === "editor.action.triggerSuggest" ? { id: t.command, title: t.title, arguments: t.arguments } : void 0;
|
|
1109
|
+
}
|
|
1110
|
+
var Je = class {
|
|
1111
|
+
constructor(t) {
|
|
1112
|
+
this._worker = t;
|
|
1113
|
+
}
|
|
1114
|
+
provideHover(t, n, i) {
|
|
1115
|
+
let r = t.uri;
|
|
1116
|
+
return this._worker(r).then((e) => e.doHover(r.toString(), C(n))).then((e) => {
|
|
1117
|
+
if (e)
|
|
1118
|
+
return {
|
|
1119
|
+
range: _(e.range),
|
|
1120
|
+
contents: Ze(e.contents)
|
|
1121
|
+
};
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
function Ye(t) {
|
|
1126
|
+
return t && typeof t == "object" && typeof t.kind == "string";
|
|
1127
|
+
}
|
|
1128
|
+
function Ie(t) {
|
|
1129
|
+
return typeof t == "string" ? {
|
|
1130
|
+
value: t
|
|
1131
|
+
} : Ye(t) ? t.kind === "plaintext" ? {
|
|
1132
|
+
value: t.value.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&")
|
|
1133
|
+
} : {
|
|
1134
|
+
value: t.value
|
|
1135
|
+
} : { value: "```" + t.language + `
|
|
1136
|
+
` + t.value + "\n```\n" };
|
|
1137
|
+
}
|
|
1138
|
+
function Ze(t) {
|
|
1139
|
+
if (t)
|
|
1140
|
+
return Array.isArray(t) ? t.map(Ie) : [Ie(t)];
|
|
1141
|
+
}
|
|
1142
|
+
var Ke = class {
|
|
1143
|
+
constructor(t) {
|
|
1144
|
+
this._worker = t;
|
|
1145
|
+
}
|
|
1146
|
+
provideDocumentHighlights(t, n, i) {
|
|
1147
|
+
const r = t.uri;
|
|
1148
|
+
return this._worker(r).then((e) => e.findDocumentHighlights(r.toString(), C(n))).then((e) => {
|
|
1149
|
+
if (e)
|
|
1150
|
+
return e.map((a) => ({
|
|
1151
|
+
range: _(a.range),
|
|
1152
|
+
kind: et(a.kind)
|
|
1153
|
+
}));
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
};
|
|
1157
|
+
function et(t) {
|
|
1158
|
+
switch (t) {
|
|
1159
|
+
case P.Read:
|
|
1160
|
+
return c.languages.DocumentHighlightKind.Read;
|
|
1161
|
+
case P.Write:
|
|
1162
|
+
return c.languages.DocumentHighlightKind.Write;
|
|
1163
|
+
case P.Text:
|
|
1164
|
+
return c.languages.DocumentHighlightKind.Text;
|
|
1165
|
+
}
|
|
1166
|
+
return c.languages.DocumentHighlightKind.Text;
|
|
1167
|
+
}
|
|
1168
|
+
var tt = class {
|
|
1169
|
+
constructor(t) {
|
|
1170
|
+
this._worker = t;
|
|
1171
|
+
}
|
|
1172
|
+
provideDefinition(t, n, i) {
|
|
1173
|
+
const r = t.uri;
|
|
1174
|
+
return this._worker(r).then((e) => e.findDefinition(r.toString(), C(n))).then((e) => {
|
|
1175
|
+
if (e)
|
|
1176
|
+
return [De(e)];
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
};
|
|
1180
|
+
function De(t) {
|
|
1181
|
+
return {
|
|
1182
|
+
uri: c.Uri.parse(t.uri),
|
|
1183
|
+
range: _(t.range)
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
var rt = class {
|
|
1187
|
+
constructor(t) {
|
|
1188
|
+
this._worker = t;
|
|
1189
|
+
}
|
|
1190
|
+
provideReferences(t, n, i, r) {
|
|
1191
|
+
const e = t.uri;
|
|
1192
|
+
return this._worker(e).then((a) => a.findReferences(e.toString(), C(n))).then((a) => {
|
|
1193
|
+
if (a)
|
|
1194
|
+
return a.map(De);
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
}, nt = class {
|
|
1198
|
+
constructor(t) {
|
|
1199
|
+
this._worker = t;
|
|
1200
|
+
}
|
|
1201
|
+
provideRenameEdits(t, n, i, r) {
|
|
1202
|
+
const e = t.uri;
|
|
1203
|
+
return this._worker(e).then((a) => a.doRename(e.toString(), C(n), i)).then((a) => it(a));
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1206
|
+
function it(t) {
|
|
1207
|
+
if (!t || !t.changes)
|
|
1208
|
+
return;
|
|
1209
|
+
let n = [];
|
|
1210
|
+
for (let i in t.changes) {
|
|
1211
|
+
const r = c.Uri.parse(i);
|
|
1212
|
+
for (let e of t.changes[i])
|
|
1213
|
+
n.push({
|
|
1214
|
+
resource: r,
|
|
1215
|
+
versionId: void 0,
|
|
1216
|
+
textEdit: {
|
|
1217
|
+
range: _(e.range),
|
|
1218
|
+
text: e.newText
|
|
1219
|
+
}
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1222
|
+
return {
|
|
1223
|
+
edits: n
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
var at = class {
|
|
1227
|
+
constructor(t) {
|
|
1228
|
+
this._worker = t;
|
|
1229
|
+
}
|
|
1230
|
+
provideDocumentSymbols(t, n) {
|
|
1231
|
+
const i = t.uri;
|
|
1232
|
+
return this._worker(i).then((r) => r.findDocumentSymbols(i.toString())).then((r) => {
|
|
1233
|
+
if (r)
|
|
1234
|
+
return r.map((e) => ({
|
|
1235
|
+
name: e.name,
|
|
1236
|
+
detail: "",
|
|
1237
|
+
containerName: e.containerName,
|
|
1238
|
+
kind: ot(e.kind),
|
|
1239
|
+
range: _(e.location.range),
|
|
1240
|
+
selectionRange: _(e.location.range),
|
|
1241
|
+
tags: []
|
|
1242
|
+
}));
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
};
|
|
1246
|
+
function ot(t) {
|
|
1247
|
+
let n = c.languages.SymbolKind;
|
|
1248
|
+
switch (t) {
|
|
1249
|
+
case h.File:
|
|
1250
|
+
return n.Array;
|
|
1251
|
+
case h.Module:
|
|
1252
|
+
return n.Module;
|
|
1253
|
+
case h.Namespace:
|
|
1254
|
+
return n.Namespace;
|
|
1255
|
+
case h.Package:
|
|
1256
|
+
return n.Package;
|
|
1257
|
+
case h.Class:
|
|
1258
|
+
return n.Class;
|
|
1259
|
+
case h.Method:
|
|
1260
|
+
return n.Method;
|
|
1261
|
+
case h.Property:
|
|
1262
|
+
return n.Property;
|
|
1263
|
+
case h.Field:
|
|
1264
|
+
return n.Field;
|
|
1265
|
+
case h.Constructor:
|
|
1266
|
+
return n.Constructor;
|
|
1267
|
+
case h.Enum:
|
|
1268
|
+
return n.Enum;
|
|
1269
|
+
case h.Interface:
|
|
1270
|
+
return n.Interface;
|
|
1271
|
+
case h.Function:
|
|
1272
|
+
return n.Function;
|
|
1273
|
+
case h.Variable:
|
|
1274
|
+
return n.Variable;
|
|
1275
|
+
case h.Constant:
|
|
1276
|
+
return n.Constant;
|
|
1277
|
+
case h.String:
|
|
1278
|
+
return n.String;
|
|
1279
|
+
case h.Number:
|
|
1280
|
+
return n.Number;
|
|
1281
|
+
case h.Boolean:
|
|
1282
|
+
return n.Boolean;
|
|
1283
|
+
case h.Array:
|
|
1284
|
+
return n.Array;
|
|
1285
|
+
}
|
|
1286
|
+
return n.Function;
|
|
1287
|
+
}
|
|
1288
|
+
var ht = class {
|
|
1289
|
+
constructor(t) {
|
|
1290
|
+
this._worker = t;
|
|
1291
|
+
}
|
|
1292
|
+
provideLinks(t, n) {
|
|
1293
|
+
const i = t.uri;
|
|
1294
|
+
return this._worker(i).then((r) => r.findDocumentLinks(i.toString())).then((r) => {
|
|
1295
|
+
if (r)
|
|
1296
|
+
return {
|
|
1297
|
+
links: r.map((e) => ({
|
|
1298
|
+
range: _(e.range),
|
|
1299
|
+
url: e.target
|
|
1300
|
+
}))
|
|
1301
|
+
};
|
|
1302
|
+
});
|
|
1303
|
+
}
|
|
1304
|
+
}, st = class {
|
|
1305
|
+
constructor(t) {
|
|
1306
|
+
this._worker = t;
|
|
1307
|
+
}
|
|
1308
|
+
provideDocumentFormattingEdits(t, n, i) {
|
|
1309
|
+
const r = t.uri;
|
|
1310
|
+
return this._worker(r).then((e) => e.format(r.toString(), null, Me(n)).then((a) => {
|
|
1311
|
+
if (!(!a || a.length === 0))
|
|
1312
|
+
return a.map(L);
|
|
1313
|
+
}));
|
|
1314
|
+
}
|
|
1315
|
+
}, ut = class {
|
|
1316
|
+
constructor(t) {
|
|
1317
|
+
this._worker = t;
|
|
1318
|
+
}
|
|
1319
|
+
canFormatMultipleRanges = !1;
|
|
1320
|
+
provideDocumentRangeFormattingEdits(t, n, i, r) {
|
|
1321
|
+
const e = t.uri;
|
|
1322
|
+
return this._worker(e).then((a) => a.format(e.toString(), Pe(n), Me(i)).then((o) => {
|
|
1323
|
+
if (!(!o || o.length === 0))
|
|
1324
|
+
return o.map(L);
|
|
1325
|
+
}));
|
|
1326
|
+
}
|
|
1327
|
+
};
|
|
1328
|
+
function Me(t) {
|
|
1329
|
+
return {
|
|
1330
|
+
tabSize: t.tabSize,
|
|
1331
|
+
insertSpaces: t.insertSpaces
|
|
1332
|
+
};
|
|
1333
|
+
}
|
|
1334
|
+
var ct = class {
|
|
1335
|
+
constructor(t) {
|
|
1336
|
+
this._worker = t;
|
|
1337
|
+
}
|
|
1338
|
+
provideDocumentColors(t, n) {
|
|
1339
|
+
const i = t.uri;
|
|
1340
|
+
return this._worker(i).then((r) => r.findDocumentColors(i.toString())).then((r) => {
|
|
1341
|
+
if (r)
|
|
1342
|
+
return r.map((e) => ({
|
|
1343
|
+
color: e.color,
|
|
1344
|
+
range: _(e.range)
|
|
1345
|
+
}));
|
|
1346
|
+
});
|
|
1347
|
+
}
|
|
1348
|
+
provideColorPresentations(t, n, i) {
|
|
1349
|
+
const r = t.uri;
|
|
1350
|
+
return this._worker(r).then((e) => e.getColorPresentations(r.toString(), n.color, Pe(n.range))).then((e) => {
|
|
1351
|
+
if (e)
|
|
1352
|
+
return e.map((a) => {
|
|
1353
|
+
let o = {
|
|
1354
|
+
label: a.label
|
|
1355
|
+
};
|
|
1356
|
+
return a.textEdit && (o.textEdit = L(a.textEdit)), a.additionalTextEdits && (o.additionalTextEdits = a.additionalTextEdits.map(L)), o;
|
|
1357
|
+
});
|
|
1358
|
+
});
|
|
1359
|
+
}
|
|
1360
|
+
}, dt = class {
|
|
1361
|
+
constructor(t) {
|
|
1362
|
+
this._worker = t;
|
|
1363
|
+
}
|
|
1364
|
+
provideFoldingRanges(t, n, i) {
|
|
1365
|
+
const r = t.uri;
|
|
1366
|
+
return this._worker(r).then((e) => e.getFoldingRanges(r.toString(), n)).then((e) => {
|
|
1367
|
+
if (e)
|
|
1368
|
+
return e.map((a) => {
|
|
1369
|
+
const o = {
|
|
1370
|
+
start: a.startLine + 1,
|
|
1371
|
+
end: a.endLine + 1
|
|
1372
|
+
};
|
|
1373
|
+
return typeof a.kind < "u" && (o.kind = ft(a.kind)), o;
|
|
1374
|
+
});
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
};
|
|
1378
|
+
function ft(t) {
|
|
1379
|
+
switch (t) {
|
|
1380
|
+
case R.Comment:
|
|
1381
|
+
return c.languages.FoldingRangeKind.Comment;
|
|
1382
|
+
case R.Imports:
|
|
1383
|
+
return c.languages.FoldingRangeKind.Imports;
|
|
1384
|
+
case R.Region:
|
|
1385
|
+
return c.languages.FoldingRangeKind.Region;
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
var gt = class {
|
|
1389
|
+
constructor(t) {
|
|
1390
|
+
this._worker = t;
|
|
1391
|
+
}
|
|
1392
|
+
provideSelectionRanges(t, n, i) {
|
|
1393
|
+
const r = t.uri;
|
|
1394
|
+
return this._worker(r).then((e) => e.getSelectionRanges(r.toString(), n.map(C))).then((e) => {
|
|
1395
|
+
if (e)
|
|
1396
|
+
return e.map((a) => {
|
|
1397
|
+
const o = [];
|
|
1398
|
+
for (; a; )
|
|
1399
|
+
o.push({ range: _(a.range) }), a = a.parent;
|
|
1400
|
+
return o;
|
|
1401
|
+
});
|
|
1402
|
+
});
|
|
1403
|
+
}
|
|
1404
|
+
};
|
|
1405
|
+
function vt(t) {
|
|
1406
|
+
const n = [], i = [], r = new Ve(t);
|
|
1407
|
+
n.push(r);
|
|
1408
|
+
const e = (...o) => r.getLanguageServiceWorker(...o);
|
|
1409
|
+
function a() {
|
|
1410
|
+
const { languageId: o, modeConfiguration: u } = t;
|
|
1411
|
+
Te(i), u.completionItems && i.push(c.languages.registerCompletionItemProvider(o, new $e(e, ["/", "-", ":"]))), u.hovers && i.push(c.languages.registerHoverProvider(o, new Je(e))), u.documentHighlights && i.push(c.languages.registerDocumentHighlightProvider(o, new Ke(e))), u.definitions && i.push(c.languages.registerDefinitionProvider(o, new tt(e))), u.references && i.push(c.languages.registerReferenceProvider(o, new rt(e))), u.documentSymbols && i.push(c.languages.registerDocumentSymbolProvider(o, new at(e))), u.rename && i.push(c.languages.registerRenameProvider(o, new nt(e))), u.colors && i.push(c.languages.registerColorProvider(o, new ct(e))), u.foldingRanges && i.push(c.languages.registerFoldingRangeProvider(o, new dt(e))), u.diagnostics && i.push(new ze(o, e, t.onDidChange)), u.selectionRanges && i.push(c.languages.registerSelectionRangeProvider(o, new gt(e))), u.documentFormattingEdits && i.push(c.languages.registerDocumentFormattingEditProvider(o, new st(e))), u.documentRangeFormattingEdits && i.push(c.languages.registerDocumentRangeFormattingEditProvider(o, new ut(e)));
|
|
1412
|
+
}
|
|
1413
|
+
return a(), n.push(Re(i)), Re(n);
|
|
1414
|
+
}
|
|
1415
|
+
function Re(t) {
|
|
1416
|
+
return { dispose: () => Te(t) };
|
|
1417
|
+
}
|
|
1418
|
+
function Te(t) {
|
|
1419
|
+
for (; t.length; )
|
|
1420
|
+
t.pop().dispose();
|
|
1421
|
+
}
|
|
1422
|
+
export {
|
|
1423
|
+
$e as CompletionAdapter,
|
|
1424
|
+
tt as DefinitionAdapter,
|
|
1425
|
+
ze as DiagnosticsAdapter,
|
|
1426
|
+
ct as DocumentColorAdapter,
|
|
1427
|
+
st as DocumentFormattingEditProvider,
|
|
1428
|
+
Ke as DocumentHighlightAdapter,
|
|
1429
|
+
ht as DocumentLinkAdapter,
|
|
1430
|
+
ut as DocumentRangeFormattingEditProvider,
|
|
1431
|
+
at as DocumentSymbolAdapter,
|
|
1432
|
+
dt as FoldingRangeAdapter,
|
|
1433
|
+
Je as HoverAdapter,
|
|
1434
|
+
rt as ReferenceAdapter,
|
|
1435
|
+
nt as RenameAdapter,
|
|
1436
|
+
gt as SelectionRangeAdapter,
|
|
1437
|
+
Ve as WorkerManager,
|
|
1438
|
+
C as fromPosition,
|
|
1439
|
+
Pe as fromRange,
|
|
1440
|
+
vt as setupMode,
|
|
1441
|
+
_ as toRange,
|
|
1442
|
+
L as toTextEdit
|
|
1443
|
+
};
|