@ws-ui/code-editor 1.10.3 → 1.11.1

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/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs as _, jsx as w } from "react/jsx-runtime";
2
- import G, { useEffect as M, createContext as ce, useState as z, useRef as re, useContext as ue, memo as Re } from "react";
3
- import { loader as we, useMonaco as xe, Editor as Fe } from "@monaco-editor/react";
2
+ import G, { useEffect as J, createContext as ge, useState as z, useRef as re, useContext as ue, memo as Re } from "react";
3
+ import { loader as xe, useMonaco as we, Editor as Fe } from "@monaco-editor/react";
4
4
  import { getNodeInfo as Le, DesignerRequestVerb as ke, lspSubject as We, LspActions as X, hasAttributesString as de, FileFolderType as oe, SourceCodeDescriptor as je, HTTP_HANDLERS_TAB_PATH as Ee } from "@ws-ui/shared";
5
5
  import { MonacoLanguageClient as Ze } from "monaco-languageclient";
6
6
  import { mergeServices as Xe, initServices as Ke } from "monaco-languageclient/vscode/services";
@@ -9,8 +9,8 @@ import Te from "@codingame/monaco-vscode-languages-service-override";
9
9
  import Oe from "@codingame/monaco-vscode-textmate-service-override";
10
10
  import "@codingame/monaco-vscode-theme-defaults-default-extension";
11
11
  import Ge from "@codingame/monaco-vscode-editor-service-override";
12
- import Je from "@codingame/monaco-vscode-theme-service-override";
13
- import { registerFileSystemOverlay as Me } from "@codingame/monaco-vscode-files-service-override";
12
+ import Me from "@codingame/monaco-vscode-theme-service-override";
13
+ import { registerFileSystemOverlay as Je } from "@codingame/monaco-vscode-files-service-override";
14
14
  import { FileSystemProviderCapabilities as se, FileType as Pe } from "vscode/vscode/vs/platform/files/common/files";
15
15
  import { Emitter as ae } from "vscode/vscode/vs/base/common/event";
16
16
  import { Logger as Ve } from "monaco-languageclient/tools";
@@ -18,7 +18,7 @@ import { CloseAction as Ye, ErrorAction as He } from "vscode-languageclient";
18
18
  import * as a from "monaco-editor";
19
19
  import { Selection as _e, KeyMod as T, KeyCode as O, editor as Ie, Range as ze, Uri as $e, CancellationTokenSource as Ue } from "monaco-editor";
20
20
  import { WebSocketMessageReader as qe, WebSocketMessageWriter as Qe, toSocket as et } from "vscode-ws-jsonrpc";
21
- import { TextDocumentSaveReason as tt, DocumentDiagnosticRequest as nt, WillSaveTextDocumentNotification as it, DidSaveTextDocumentNotification as ot, WillCreateFilesRequest as rt, WillRenameFilesRequest as st, WillDeleteFilesRequest as at, DidCreateFilesNotification as lt, DidRenameFilesNotification as gt, DidDeleteFilesNotification as ct, SemanticTokensRegistrationType as ut } from "vscode-languageserver-protocol";
21
+ import { TextDocumentSaveReason as tt, DocumentDiagnosticRequest as nt, WillSaveTextDocumentNotification as it, DidSaveTextDocumentNotification as ot, WillCreateFilesRequest as rt, WillRenameFilesRequest as st, WillDeleteFilesRequest as at, DidCreateFilesNotification as lt, DidRenameFilesNotification as ct, DidDeleteFilesNotification as gt, SemanticTokensRegistrationType as ut } from "vscode-languageserver-protocol";
22
22
  import { StandaloneServices as dt, ICodeEditorService as It } from "vscode/services";
23
23
  import { KeybindingsRegistry as ne } from "vscode/monaco";
24
24
  import "@codingame/monaco-vscode-standalone-languages";
@@ -34,9 +34,9 @@ import { registerExtension as Ct } from "vscode/extensions";
34
34
  const mt = () => Be(), ft = () => Ge(
35
35
  () => Promise.resolve(void 0)
36
36
  ), pt = () => {
37
- const n = Je(), e = n.themeService.ctor.prototype;
37
+ const t = Me(), e = t.themeService.ctor.prototype;
38
38
  return e.defineTheme = () => {
39
- }, n;
39
+ }, t;
40
40
  }, At = `{
41
41
  "workbench.colorTheme": "Default Dark+",
42
42
  "workbench.iconTheme": "vs-seti",
@@ -129,12 +129,12 @@ class bt {
129
129
  }
130
130
  // --- stat()
131
131
  async stat(e) {
132
- const t = this.files.get(e.fsPath), i = Date.now();
132
+ const n = this.files.get(e.fsPath), i = Date.now();
133
133
  return {
134
134
  type: Pe.File,
135
135
  ctime: 0,
136
136
  mtime: i,
137
- size: t ? t.byteLength : 0
137
+ size: n ? n.byteLength : 0
138
138
  };
139
139
  }
140
140
  // --- mkdir()
@@ -155,35 +155,35 @@ class bt {
155
155
  return this.files.set(e.fsPath, C), C;
156
156
  }
157
157
  // --- writeFile()
158
- async writeFile(e, t) {
158
+ async writeFile(e, n) {
159
159
  const i = e.toString();
160
- this.files.set(i, t), this._onDidChangeFile.fire([
160
+ this.files.set(i, n), this._onDidChangeFile.fire([
161
161
  { type: 1, resource: e }
162
162
  // FileChangeType.Updated
163
163
  ]);
164
164
  }
165
165
  // --- delete()
166
166
  async delete(e) {
167
- const t = e.toString();
168
- this.files.delete(t);
167
+ const n = e.toString();
168
+ this.files.delete(n);
169
169
  }
170
170
  // --- rename()
171
- async rename(e, t) {
172
- const i = e.toString(), o = t.toString(), r = this.files.get(i);
171
+ async rename(e, n) {
172
+ const i = e.toString(), o = n.toString(), r = this.files.get(i);
173
173
  r && (this.files.set(o, r), this.files.delete(i));
174
174
  }
175
175
  // --- watch()
176
- watch(e, t) {
176
+ watch(e, n) {
177
177
  return { dispose() {
178
178
  } };
179
179
  }
180
180
  }
181
- const ht = () => De(At), vt = async (n) => {
181
+ const ht = () => De(At), vt = async (t) => {
182
182
  var o;
183
- const e = n.serviceConfig ?? {};
184
- e.debugLogging = ((o = n.logger) == null ? void 0 : o.isEnabled()) === !0 && (e.debugLogging === !0 || n.logger.isDebugEnabled() === !0), await ht(), e.userServices = e.userServices ?? {};
185
- const t = e.userServices.configurationService ?? void 0, i = e.workspaceConfig ?? void 0;
186
- if (t === void 0) {
183
+ const e = t.serviceConfig ?? {};
184
+ e.debugLogging = ((o = t.logger) == null ? void 0 : o.isEnabled()) === !0 && (e.debugLogging === !0 || t.logger.isDebugEnabled() === !0), await ht(), e.userServices = e.userServices ?? {};
185
+ const n = e.userServices.configurationService ?? void 0, i = e.workspaceConfig ?? void 0;
186
+ if (n === void 0) {
187
187
  if (i)
188
188
  throw new Error(
189
189
  "You provided a workspaceConfig without using the configurationServiceOverride"
@@ -198,76 +198,79 @@ const ht = () => De(At), vt = async (n) => {
198
198
  };
199
199
  Xe(r, e.userServices);
200
200
  }
201
- return Me(1, new bt()), e;
201
+ return Je(1, new bt()), e;
202
202
  };
203
203
  class St extends qe {
204
- constructor(e, t) {
205
- super(e), this.onMessage = t;
204
+ constructor(e, n) {
205
+ super(e), this.onMessage = n;
206
206
  }
207
207
  readMessage(e) {
208
208
  this.onMessage && this.onMessage();
209
- const [, t] = e.split(`\r
209
+ const [, n] = e.split(`\r
210
210
  \r
211
211
  `);
212
212
  if (this.state === "initial")
213
- this.events.splice(0, 0, { message: t });
213
+ this.events.splice(0, 0, { message: n });
214
214
  else if (this.state === "listening") {
215
- const i = JSON.parse(t);
215
+ const i = JSON.parse(n);
216
216
  this.callback(i);
217
217
  }
218
218
  }
219
219
  }
220
220
  class yt extends Qe {
221
- constructor(e, t) {
222
- super(e), this.onSend = t;
221
+ constructor(e, n) {
222
+ super(e), this.onSend = n;
223
223
  }
224
224
  async write(e) {
225
225
  try {
226
- const t = JSON.stringify(e);
227
- this.socket.send(t), this.onSend && this.onSend();
228
- } catch (t) {
229
- this.errorCount++, this.fireError(t, e, this.errorCount);
226
+ const n = JSON.stringify(e);
227
+ this.socket.send(n), this.onSend && this.onSend();
228
+ } catch (n) {
229
+ this.errorCount++, this.fireError(n, e, this.errorCount);
230
230
  }
231
231
  }
232
232
  }
233
- function E(n, e = !0) {
234
- const t = `/PACKAGE/Project/Sources/${n}`;
235
- return e ? `file://${t}` : t;
233
+ function E(t, e = !0) {
234
+ const n = `/PACKAGE/Project/Sources/${t}`;
235
+ return e ? `file://${n}` : n;
236
236
  }
237
- function Ce(n, e = 0) {
238
- setTimeout(n, e);
237
+ function Ce(t, e = 0) {
238
+ setTimeout(t, e);
239
239
  }
240
- function Nt(n, e) {
241
- const t = new _e(
240
+ function Nt(t, e) {
241
+ const n = new _e(
242
242
  e.startLineNumber,
243
243
  e.startColumn,
244
244
  e.endLineNumber || e.startLineNumber,
245
245
  e.endColumn || e.startColumn
246
246
  );
247
247
  Ce(() => {
248
- n.setSelection(t), n.revealRangeInCenter(t), n.focus();
248
+ t.setSelection(n), t.revealRangeInCenter(n), t.focus();
249
249
  });
250
250
  }
251
- function Rt(n, e, t = 0) {
252
- t > 0 && (e = t + e), Ce(() => {
253
- n.setPosition({ lineNumber: e, column: 1 }), n.revealLineInCenter(e), n.focus();
251
+ function Rt(t, e, n = 0) {
252
+ n > 0 && (e = n + e), Ce(() => {
253
+ t.setPosition({ lineNumber: e, column: 1 }), t.revealLineInCenter(e), t.focus();
254
254
  });
255
255
  }
256
- function Tn(n, e, t) {
257
- const o = n.getModel();
256
+ function On(t, e, n) {
257
+ const o = t.getModel();
258
258
  if (o && e) {
259
259
  const r = o.getLineCount();
260
260
  for (let s = 1; s <= r; s++) {
261
261
  const I = o.getLineContent(s);
262
- if (new RegExp(`(?:Function|function) ${t}`).test(I))
262
+ if (new RegExp(`(?:Function|function) ${n}`).test(I))
263
263
  return s;
264
264
  }
265
265
  }
266
266
  return 0;
267
267
  }
268
- const wt = {
269
- provideCompletionItems: async (n, e) => {
270
- const t = n.getWordUntilPosition(e);
268
+ const xt = (t) => {
269
+ const e = t == null ? void 0 : t.getLanguageId();
270
+ return e && ["css", "scss", "less"].includes(e);
271
+ }, wt = {
272
+ provideCompletionItems: async (t, e) => {
273
+ const n = t.getWordUntilPosition(e);
271
274
  return {
272
275
  suggestions: [
273
276
  {
@@ -275,9 +278,9 @@ const wt = {
275
278
  kind: a.languages.CompletionItemKind.Snippet,
276
279
  range: new a.Range(
277
280
  e.lineNumber,
278
- t.startColumn,
281
+ n.startColumn,
279
282
  e.lineNumber,
280
- t.endColumn
283
+ n.endColumn
281
284
  ),
282
285
  insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
283
286
  `),
@@ -288,9 +291,9 @@ const wt = {
288
291
  kind: a.languages.CompletionItemKind.Snippet,
289
292
  range: new a.Range(
290
293
  e.lineNumber,
291
- t.startColumn,
294
+ n.startColumn,
292
295
  e.lineNumber,
293
- t.endColumn
296
+ n.endColumn
294
297
  ),
295
298
  insertText: [
296
299
  "While(${1:expression})",
@@ -305,9 +308,9 @@ const wt = {
305
308
  kind: a.languages.CompletionItemKind.Snippet,
306
309
  range: new a.Range(
307
310
  e.lineNumber,
308
- t.startColumn,
311
+ n.startColumn,
309
312
  e.lineNumber,
310
- t.endColumn
313
+ n.endColumn
311
314
  ),
312
315
  insertText: [
313
316
  "Case of",
@@ -323,9 +326,9 @@ const wt = {
323
326
  kind: a.languages.CompletionItemKind.Snippet,
324
327
  range: new a.Range(
325
328
  e.lineNumber,
326
- t.startColumn,
329
+ n.startColumn,
327
330
  e.lineNumber,
328
- t.endColumn
331
+ n.endColumn
329
332
  ),
330
333
  insertText: ["Else", " "].join(`
331
334
  `),
@@ -336,9 +339,9 @@ const wt = {
336
339
  kind: a.languages.CompletionItemKind.Snippet,
337
340
  range: new a.Range(
338
341
  e.lineNumber,
339
- t.startColumn,
342
+ n.startColumn,
340
343
  e.lineNumber,
341
- t.endColumn
344
+ n.endColumn
342
345
  ),
343
346
  insertText: ["If (${1:expression})", " ${5:body}", "End if"].join(
344
347
  `
@@ -351,9 +354,9 @@ const wt = {
351
354
  kind: a.languages.CompletionItemKind.Snippet,
352
355
  range: new a.Range(
353
356
  e.lineNumber,
354
- t.startColumn,
357
+ n.startColumn,
355
358
  e.lineNumber,
356
- t.endColumn
359
+ n.endColumn
357
360
  ),
358
361
  insertText: [
359
362
  "For(${1:counter};${2:start};${3:end}${4:;increment})",
@@ -368,9 +371,9 @@ const wt = {
368
371
  kind: a.languages.CompletionItemKind.Snippet,
369
372
  range: new a.Range(
370
373
  e.lineNumber,
371
- t.startColumn,
374
+ n.startColumn,
372
375
  e.lineNumber,
373
- t.endColumn
376
+ n.endColumn
374
377
  ),
375
378
  insertText: [
376
379
  "Function ${1:function_name}(${2:params}) -> ${3:var_name} : ${4:var_type}",
@@ -382,9 +385,9 @@ const wt = {
382
385
  ]
383
386
  };
384
387
  }
385
- }, xt = {
386
- provideCompletionItems: async (n, e) => {
387
- const t = n.getWordUntilPosition(e);
388
+ }, Ft = {
389
+ provideCompletionItems: async (t, e) => {
390
+ const n = t.getWordUntilPosition(e);
388
391
  return {
389
392
  suggestions: [
390
393
  {
@@ -392,9 +395,9 @@ const wt = {
392
395
  kind: a.languages.CompletionItemKind.Snippet,
393
396
  range: new a.Range(
394
397
  e.lineNumber,
395
- t.startColumn,
398
+ n.startColumn,
396
399
  e.lineNumber,
397
- t.endColumn
400
+ n.endColumn
398
401
  ),
399
402
  insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
400
403
  `),
@@ -405,9 +408,9 @@ const wt = {
405
408
  kind: a.languages.CompletionItemKind.Snippet,
406
409
  range: new a.Range(
407
410
  e.lineNumber,
408
- t.startColumn,
411
+ n.startColumn,
409
412
  e.lineNumber,
410
- t.endColumn
413
+ n.endColumn
411
414
  ),
412
415
  insertText: ["while(${1:expression})", " ${2:body}", "end"].join(
413
416
  `
@@ -420,9 +423,9 @@ const wt = {
420
423
  kind: a.languages.CompletionItemKind.Snippet,
421
424
  range: new a.Range(
422
425
  e.lineNumber,
423
- t.startColumn,
426
+ n.startColumn,
424
427
  e.lineNumber,
425
- t.endColumn
428
+ n.endColumn
426
429
  ),
427
430
  insertText: [
428
431
  "switch",
@@ -438,9 +441,9 @@ const wt = {
438
441
  kind: a.languages.CompletionItemKind.Snippet,
439
442
  range: new a.Range(
440
443
  e.lineNumber,
441
- t.startColumn,
444
+ n.startColumn,
442
445
  e.lineNumber,
443
- t.endColumn
446
+ n.endColumn
444
447
  ),
445
448
  insertText: ["else", " "].join(`
446
449
  `),
@@ -451,9 +454,9 @@ const wt = {
451
454
  kind: a.languages.CompletionItemKind.Snippet,
452
455
  range: new a.Range(
453
456
  e.lineNumber,
454
- t.startColumn,
457
+ n.startColumn,
455
458
  e.lineNumber,
456
- t.endColumn
459
+ n.endColumn
457
460
  ),
458
461
  insertText: ["if (${1:expression})", " ${5:body}", "end"].join(
459
462
  `
@@ -466,9 +469,9 @@ const wt = {
466
469
  kind: a.languages.CompletionItemKind.Snippet,
467
470
  range: new a.Range(
468
471
  e.lineNumber,
469
- t.startColumn,
472
+ n.startColumn,
470
473
  e.lineNumber,
471
- t.endColumn
474
+ n.endColumn
472
475
  ),
473
476
  insertText: [
474
477
  "for(${1:counter},${2:start},${3:end}${4:,increment})",
@@ -483,9 +486,9 @@ const wt = {
483
486
  kind: a.languages.CompletionItemKind.Snippet,
484
487
  range: new a.Range(
485
488
  e.lineNumber,
486
- t.startColumn,
489
+ n.startColumn,
487
490
  e.lineNumber,
488
- t.endColumn
491
+ n.endColumn
489
492
  ),
490
493
  insertText: [
491
494
  "function ${1:function_name}(${2:params}) -> ${3:var_name} : ${4:var_type}",
@@ -497,7 +500,7 @@ const wt = {
497
500
  ]
498
501
  };
499
502
  }
500
- }, Ft = [
503
+ }, Lt = [
501
504
  // zoom in
502
505
  {
503
506
  keybinding: T.CtrlCmd | O.NumpadAdd,
@@ -530,16 +533,16 @@ const wt = {
530
533
  keybinding: T.CtrlCmd | O.F12,
531
534
  command: "editor.action.revealDefinition"
532
535
  }
533
- ], Lt = ({ defaultZoom: n }) => (M(() => {
534
- n !== void 0 && Ie.EditorZoom.setZoomLevel(n);
536
+ ], kt = ({ defaultZoom: t }) => (J(() => {
537
+ t !== void 0 && Ie.EditorZoom.setZoomLevel(t);
535
538
  }, []), null);
536
- we.config({
539
+ xe.config({
537
540
  monaco: a
538
541
  // paths: {
539
542
  // vs: import.meta.env.VITE_MONACO_EDITOR_CDN,
540
543
  // },
541
544
  });
542
- var H = /* @__PURE__ */ ((n) => (n[n.NotSet = -1] = "NotSet", n[n.None = 0] = "None", n[n.Italic = 1] = "Italic", n[n.Bold = 2] = "Bold", n[n.Underline = 4] = "Underline", n[n.Strikethrough = 8] = "Strikethrough", n))(H || {}), me = /* @__PURE__ */ ((n) => (n[n.None = 0] = "None", n[n.DefaultForeground = 1] = "DefaultForeground", n[n.DefaultBackground = 2] = "DefaultBackground", n))(me || {}), fe = /* @__PURE__ */ ((n) => (n[n.Other = 0] = "Other", n[n.Comment = 1] = "Comment", n[n.String = 2] = "String", n[n.RegEx = 3] = "RegEx", n))(fe || {});
545
+ var H = /* @__PURE__ */ ((t) => (t[t.NotSet = -1] = "NotSet", t[t.None = 0] = "None", t[t.Italic = 1] = "Italic", t[t.Bold = 2] = "Bold", t[t.Underline = 4] = "Underline", t[t.Strikethrough = 8] = "Strikethrough", t))(H || {}), me = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.DefaultForeground = 1] = "DefaultForeground", t[t.DefaultBackground = 2] = "DefaultBackground", t))(me || {}), fe = /* @__PURE__ */ ((t) => (t[t.Other = 0] = "Other", t[t.Comment = 1] = "Comment", t[t.String = 2] = "String", t[t.RegEx = 3] = "RegEx", t))(fe || {});
543
546
  class V {
544
547
  static getLanguageId(e) {
545
548
  return (e & 255) >>> 0;
@@ -564,17 +567,17 @@ class V {
564
567
  const o = this.getFontStyle(e);
565
568
  return o & 1 && (i += " mtki"), o & 2 && (i += " mtkb"), o & 4 && (i += " mtku"), o & 8 && (i += " mtks"), i;
566
569
  }
567
- static getInlineStyleFromMetadata(e, t) {
570
+ static getInlineStyleFromMetadata(e, n) {
568
571
  const i = this.getForeground(e), o = this.getFontStyle(e);
569
- let r = `color: ${t[i]};`;
572
+ let r = `color: ${n[i]};`;
570
573
  o & 1 && (r += "font-style: italic;"), o & 2 && (r += "font-weight: bold;");
571
574
  let s = "";
572
575
  return o & 4 && (s += " underline"), o & 8 && (s += " line-through"), s && (r += `text-decoration:${s};`), r;
573
576
  }
574
577
  static getPresentationFromMetadata(e) {
575
- const t = this.getForeground(e), i = this.getFontStyle(e);
578
+ const n = this.getForeground(e), i = this.getFontStyle(e);
576
579
  return {
577
- foreground: t,
580
+ foreground: n,
578
581
  italic: !!(i & 1),
579
582
  bold: !!(i & 2),
580
583
  underline: !!(i & 4),
@@ -582,57 +585,57 @@ class V {
582
585
  };
583
586
  }
584
587
  }
585
- function kt(n, e, t, i) {
586
- const o = t.tokens.data, r = n.getLanguageId();
588
+ function Wt(t, e, n, i) {
589
+ const o = n.tokens.data, r = t.getLanguageId();
587
590
  let s = 0, I = 0;
588
- const C = i.lineNumber - 1, h = i.column - 1;
591
+ const C = i.lineNumber - 1, v = i.column - 1;
589
592
  for (let f = 0; f < o.length; f += 5) {
590
- const A = o[f], p = o[f + 1], x = o[f + 2], R = o[f + 3], S = o[f + 4], y = s + A, b = A === 0 ? I + p : p;
591
- if (C === y && b <= h && h < b + x) {
592
- const g = t.legend.tokenTypes[R] || "not in legend (ignored)", F = [];
593
+ const A = o[f], p = o[f + 1], F = o[f + 2], x = o[f + 3], S = o[f + 4], y = s + A, h = A === 0 ? I + p : p;
594
+ if (C === y && h <= v && v < h + F) {
595
+ const c = n.legend.tokenTypes[x] || "not in legend (ignored)", L = [];
593
596
  let l = S;
594
- for (let P = 0; l > 0 && P < t.legend.tokenModifiers.length; P++)
595
- l & 1 && F.push(t.legend.tokenModifiers[P]), l = l >> 1;
596
- l > 0 && F.push("not in legend (ignored)");
597
- const c = new ze(
597
+ for (let P = 0; l > 0 && P < n.legend.tokenModifiers.length; P++)
598
+ l & 1 && L.push(n.legend.tokenModifiers[P]), l = l >> 1;
599
+ l > 0 && L.push("not in legend (ignored)");
600
+ const g = new ze(
598
601
  y + 1,
599
- b + 1,
602
+ h + 1,
600
603
  y + 1,
601
- b + 1 + x
602
- ), L = {}, k = e.getColorTheme().tokenColorMap, v = e.getColorTheme().getTokenStyleMetadata(
603
- g,
604
- F,
604
+ h + 1 + F
605
+ ), N = {}, k = e.getColorTheme().tokenColorMap, b = e.getColorTheme().getTokenStyleMetadata(
606
+ c,
607
+ L,
605
608
  r,
606
609
  !0,
607
- L
610
+ N
608
611
  );
609
612
  let $;
610
- return v && ($ = {
613
+ return b && ($ = {
611
614
  languageId: void 0,
612
615
  tokenType: fe.Other,
613
- bold: v == null ? void 0 : v.bold,
614
- italic: v == null ? void 0 : v.italic,
615
- underline: v == null ? void 0 : v.underline,
616
- strikethrough: v == null ? void 0 : v.strikethrough,
617
- foreground: k[(v == null ? void 0 : v.foreground) || me.None],
616
+ bold: b == null ? void 0 : b.bold,
617
+ italic: b == null ? void 0 : b.italic,
618
+ underline: b == null ? void 0 : b.underline,
619
+ strikethrough: b == null ? void 0 : b.strikethrough,
620
+ foreground: k[(b == null ? void 0 : b.foreground) || me.None],
618
621
  background: void 0
619
- }), { type: g, modifiers: F, range: c, metadata: $, definitions: L };
622
+ }), { type: c, modifiers: L, range: g, metadata: $, definitions: N };
620
623
  }
621
- s = y, I = b;
624
+ s = y, I = h;
622
625
  }
623
626
  return null;
624
627
  }
625
- function Wt(n, e, t) {
628
+ function jt(t, e, n) {
626
629
  let i = null;
627
- for (let o = 1; o < t; o++)
630
+ for (let o = 1; o < n; o++)
628
631
  i = e.tokenizeLine(
629
- n.getLineContent(o),
632
+ t.getLineContent(o),
630
633
  i
631
634
  ).ruleStack;
632
635
  return i;
633
636
  }
634
- function jt(n, e, t) {
635
- const i = n.getColorTheme().tokenColorMap, o = V.getLanguageId(t), r = V.getTokenType(t), s = V.getFontStyle(t), I = V.getForeground(t), C = V.getBackground(t);
637
+ function Et(t, e, n) {
638
+ const i = t.getColorTheme().tokenColorMap, o = V.getLanguageId(n), r = V.getTokenType(n), s = V.getFontStyle(n), I = V.getForeground(n), C = V.getBackground(n);
636
639
  return {
637
640
  languageId: e.languageIdCodec.decodeLanguageId(o),
638
641
  tokenType: r,
@@ -644,51 +647,51 @@ function jt(n, e, t) {
644
647
  background: i[C]
645
648
  };
646
649
  }
647
- function Et(n, e, t) {
648
- const i = t.lineNumber, o = n, r = o._tokenizationTextModelPart.grammarTokens._tokenizer.tokenizationSupport._actual._grammar, s = Wt(n, r, i), I = r.tokenizeLine(
649
- n.getLineContent(i),
650
+ function Zt(t, e, n) {
651
+ const i = n.lineNumber, o = t, r = o._tokenizationTextModelPart.grammarTokens._tokenizer.tokenizationSupport._actual._grammar, s = jt(t, r, i), I = r.tokenizeLine(
652
+ t.getLineContent(i),
650
653
  s
651
654
  ), C = r.tokenizeLine2(
652
- n.getLineContent(i),
655
+ t.getLineContent(i),
653
656
  s
654
657
  );
655
- let h = 0;
658
+ let v = 0;
656
659
  for (let A = I.tokens.length - 1; A >= 0; A--) {
657
660
  const p = I.tokens[A];
658
- if (t.column - 1 >= p.startIndex) {
659
- h = A;
661
+ if (n.column - 1 >= p.startIndex) {
662
+ v = A;
660
663
  break;
661
664
  }
662
665
  }
663
666
  let f = 0;
664
667
  for (let A = C.tokens.length >>> 1; A >= 0; A--)
665
- if (t.column - 1 >= C.tokens[A << 1]) {
668
+ if (n.column - 1 >= C.tokens[A << 1]) {
666
669
  f = A;
667
670
  break;
668
671
  }
669
672
  return {
670
- token: I.tokens[h],
671
- metadata: jt(
673
+ token: I.tokens[v],
674
+ metadata: Et(
672
675
  e,
673
676
  o._languageService,
674
677
  C.tokens[(f << 1) + 1]
675
678
  )
676
679
  };
677
680
  }
678
- const pe = ce(void 0), On = ({
679
- children: n,
681
+ const pe = ge(void 0), Gn = ({
682
+ children: t,
680
683
  url: e,
681
- qodly: t,
684
+ qodly: n,
682
685
  defaultZoom: i,
683
686
  openHandler: o,
684
687
  language: r = "4d",
685
688
  defaultInited: s = !1
686
689
  }) => {
687
- const I = xe(), [C, h] = z(s), [f, A] = z(null), p = re(), x = re(0);
688
- M(() => {
689
- e && I && R();
690
+ const I = we(), [C, v] = z(s), [f, A] = z(null), p = re(), F = re(0);
691
+ J(() => {
692
+ e && I && x();
690
693
  }, [e, I]);
691
- const R = async () => {
694
+ const x = async () => {
692
695
  if (!I) return;
693
696
  const m = new Ve({
694
697
  enabled: process.env.NODE_ENV === "development",
@@ -702,7 +705,7 @@ const pe = ce(void 0), On = ({
702
705
  serviceConfig: u
703
706
  }), o && dt.get(It).registerCodeEditorOpenHandler(o), I.languages.registerCompletionItemProvider(
704
707
  r,
705
- t ? xt : wt
708
+ n ? Ft : wt
706
709
  );
707
710
  const d = ne.getDefaultKeybindings.bind(ne);
708
711
  ne.getDefaultKeybindings = () => d().filter(
@@ -710,24 +713,24 @@ const pe = ce(void 0), On = ({
710
713
  "workbench.action.files.saveAs",
711
714
  "workbench.action.files.save"
712
715
  ].includes(j.command)
713
- ), Ie.addKeybindingRules(Ft), I.languages.registerFoldingRangeProvider(r, {
714
- provideFoldingRanges: function(N) {
716
+ ), Ie.addKeybindingRules(Lt), I.languages.registerFoldingRangeProvider(r, {
717
+ provideFoldingRanges: function(R) {
715
718
  const j = [], Z = /\\\s*$/;
716
- for (let W = 1, J = N.getLineCount(); W <= J; W++) {
717
- const U = N.getLineContent(W);
719
+ for (let W = 1, M = R.getLineCount(); W <= M; W++) {
720
+ const U = R.getLineContent(W);
718
721
  if (Z.exec(U)) {
719
- let K = W + 1;
720
- for (; K <= J; ) {
721
- const te = N.getLineContent(K);
722
+ let B = W + 1;
723
+ for (; B <= M; ) {
724
+ const te = R.getLineContent(B);
722
725
  if (Z.exec(te) == null)
723
726
  break;
724
- K++;
727
+ B++;
725
728
  }
726
- K > W && (j.push({
729
+ B > W && (j.push({
727
730
  start: W,
728
- end: K,
731
+ end: B,
729
732
  kind: I.languages.FoldingRangeKind.Region
730
- }), W = K);
733
+ }), W = B);
731
734
  }
732
735
  }
733
736
  return j;
@@ -742,9 +745,9 @@ const pe = ce(void 0), On = ({
742
745
  A(new Event("INVALID_URL"));
743
746
  return;
744
747
  }
745
- m.onopen = y, m.onclose = b, m.onerror = g, x.current = 0;
748
+ m.onopen = y, m.onclose = h, m.onerror = c, F.current = 0;
746
749
  }, y = async function() {
747
- const m = et(this), u = new St(m), d = new yt(m), N = new Ze({
750
+ const m = et(this), u = new St(m), d = new yt(m), R = new Ze({
748
751
  name: "4D Language Client",
749
752
  clientOptions: {
750
753
  workspaceFolder: {
@@ -766,32 +769,32 @@ const pe = ce(void 0), On = ({
766
769
  })
767
770
  }
768
771
  });
769
- p.current = N;
770
- const j = N.sendRequest.bind(N);
771
- p.current.sendRequest = function(Z, W, J) {
772
+ p.current = R;
773
+ const j = R.sendRequest.bind(R);
774
+ p.current.sendRequest = function(Z, W, M) {
772
775
  return typeof Z == "object" && Z.method === "textDocument/diagnostic" && /file:\/\/\/PACKAGE\/Project\/Sources\/Methods\/__Debugger_.*/.test(
773
776
  W.textDocument.uri
774
- ) ? Promise.resolve() : j(Z, W, J);
777
+ ) ? Promise.resolve() : j(Z, W, M);
775
778
  }, u.onClose(() => {
776
- N.stop(), x.current < 3 ? setTimeout(() => {
777
- x.current++, S();
779
+ R.stop(), F.current < 3 ? setTimeout(() => {
780
+ F.current++, S();
778
781
  }, 1e3) : A(new Event("WEBSOCKET_CLOSED"));
779
- }), N.needsStart() && await N.start(), h(!0);
780
- }, b = () => {
781
- }, g = (m) => {
782
+ }), R.needsStart() && await R.start(), v(!0);
783
+ }, h = () => {
784
+ }, c = (m) => {
782
785
  A(m);
783
786
  };
784
- M(() => {
787
+ J(() => {
785
788
  const m = We.subscribe(({ action: u, payload: d }) => {
786
789
  switch (u) {
787
790
  case X.WILL_SAVE:
788
791
  k(d.filePath);
789
792
  break;
790
793
  case X.DID_SAVE:
791
- D(d.filePath, d.content);
794
+ K(d.filePath, d.content);
792
795
  break;
793
796
  case X.WILL_CREATE:
794
- v(d.filePath);
797
+ b(d.filePath);
795
798
  break;
796
799
  case X.DID_CREATE:
797
800
  Se(d.filePath);
@@ -809,38 +812,38 @@ const pe = ce(void 0), On = ({
809
812
  Ne(d.filePath);
810
813
  break;
811
814
  case X.DIAGNOSTIC_REFRESH:
812
- L(d.filePath);
815
+ N(d.filePath);
813
816
  break;
814
817
  }
815
818
  });
816
819
  return () => m.unsubscribe();
817
820
  }, []);
818
- const F = (m) => {
821
+ const L = (m) => {
819
822
  var u, d;
820
823
  return (d = (u = p.current) == null ? void 0 : u._features) == null ? void 0 : d.find(
821
- (N) => {
824
+ (R) => {
822
825
  var j;
823
- return ((j = N._registrationType) == null ? void 0 : j.method) === m;
826
+ return ((j = R._registrationType) == null ? void 0 : j.method) === m;
824
827
  }
825
828
  );
826
829
  }, l = (m) => {
827
- const u = [], d = F(m);
830
+ const u = [], d = L(m);
828
831
  if (d)
829
- for (const [, N] of d._registrations)
830
- N.provider && u.push(N.provider);
832
+ for (const [, R] of d._registrations)
833
+ R.provider && u.push(R.provider);
831
834
  return u;
832
- }, c = async (m, u, d) => {
835
+ }, g = async (m, u, d) => {
833
836
  var j, Z, W;
834
- const N = l(
837
+ const R = l(
835
838
  ut.method
836
839
  );
837
- if (N[0]) {
838
- const J = new Ue(), U = await Promise.resolve(
839
- N[0].full.provideDocumentSemanticTokens(
840
+ if (R[0]) {
841
+ const M = new Ue(), U = await Promise.resolve(
842
+ R[0].full.provideDocumentSemanticTokens(
840
843
  u,
841
- J.token
844
+ M.token
842
845
  )
843
- ), ee = m, K = U ? kt(
846
+ ), ee = m, B = U ? Wt(
844
847
  u,
845
848
  ee._themeService,
846
849
  {
@@ -848,18 +851,18 @@ const pe = ce(void 0), On = ({
848
851
  legend: (W = (Z = (j = p.current) == null ? void 0 : j._capabilities) == null ? void 0 : Z.semanticTokensProvider) == null ? void 0 : W.legend
849
852
  },
850
853
  d
851
- ) : null, te = Et(
854
+ ) : null, te = Zt(
852
855
  u,
853
856
  ee._themeService,
854
857
  d
855
858
  );
856
859
  return {
857
- semanticTokenInfo: K,
860
+ semanticTokenInfo: B,
858
861
  textmateTokenInfo: te
859
862
  };
860
863
  }
861
864
  return null;
862
- }, L = (m) => {
865
+ }, N = (m) => {
863
866
  if (p.current) {
864
867
  const u = l(
865
868
  nt.method
@@ -875,7 +878,7 @@ const pe = ce(void 0), On = ({
875
878
  },
876
879
  reason: u
877
880
  });
878
- }, D = (m, u) => {
881
+ }, K = (m, u) => {
879
882
  var d;
880
883
  (d = p.current) == null || d.sendNotification(ot.type, {
881
884
  textDocument: {
@@ -883,7 +886,7 @@ const pe = ce(void 0), On = ({
883
886
  },
884
887
  text: u
885
888
  });
886
- }, v = (m) => {
889
+ }, b = (m) => {
887
890
  var u;
888
891
  (u = p.current) == null || u.sendRequest(rt.type, {
889
892
  files: [
@@ -922,7 +925,7 @@ const pe = ce(void 0), On = ({
922
925
  });
923
926
  }, ye = (m, u) => {
924
927
  var d;
925
- (d = p.current) == null || d.sendNotification(gt.type, {
928
+ (d = p.current) == null || d.sendNotification(ct.type, {
926
929
  files: [
927
930
  {
928
931
  oldUri: E(m),
@@ -932,7 +935,7 @@ const pe = ce(void 0), On = ({
932
935
  });
933
936
  }, Ne = (m) => {
934
937
  var u;
935
- (u = p.current) == null || u.sendNotification(ct.type, {
938
+ (u = p.current) == null || u.sendNotification(gt.type, {
936
939
  files: [
937
940
  {
938
941
  uri: E(m)
@@ -948,50 +951,50 @@ const pe = ce(void 0), On = ({
948
951
  clientRef: p,
949
952
  lastError: f,
950
953
  reload: S,
951
- getTokenAtPosition: c
954
+ getTokenAtPosition: g
952
955
  },
953
956
  children: [
954
- n,
955
- /* @__PURE__ */ w(Lt, { defaultZoom: i })
957
+ t,
958
+ /* @__PURE__ */ w(kt, { defaultZoom: i })
956
959
  ]
957
960
  }
958
961
  );
959
962
  };
960
- function Gn() {
961
- const n = ue(pe);
962
- if (n === void 0)
963
+ function Mn() {
964
+ const t = ue(pe);
965
+ if (t === void 0)
963
966
  throw new Error("useLSP must be used within an LSPContext");
964
- return n;
967
+ return t;
965
968
  }
966
- const Ae = ce(
969
+ const Ae = ge(
967
970
  void 0
968
- ), Jn = Re(({ children: n }) => {
969
- const [e, t] = z(null);
971
+ ), Jn = Re(({ children: t }) => {
972
+ const [e, n] = z(null);
970
973
  return /* @__PURE__ */ w(
971
974
  Ae.Provider,
972
975
  {
973
976
  value: {
974
977
  editor: e,
975
- setEditor: t
978
+ setEditor: n
976
979
  },
977
- children: n
980
+ children: t
978
981
  }
979
982
  );
980
983
  });
981
- function Zt() {
982
- const n = ue(Ae), e = z(null);
983
- if (n === void 0) {
984
- const [t, i] = e;
984
+ function Xt() {
985
+ const t = ue(Ae), e = z(null);
986
+ if (t === void 0) {
987
+ const [n, i] = e;
985
988
  return {
986
- editor: t,
989
+ editor: n,
987
990
  setEditor: i
988
991
  };
989
992
  }
990
- return n;
993
+ return t;
991
994
  }
992
- const Xt = {
993
- provideCompletionItems: (n, e) => {
994
- const t = n.getWordUntilPosition(e);
995
+ const Kt = {
996
+ provideCompletionItems: (t, e) => {
997
+ const n = t.getWordUntilPosition(e);
995
998
  return {
996
999
  suggestions: [
997
1000
  {
@@ -1000,9 +1003,9 @@ const Xt = {
1000
1003
  documentation: "Media query for phone device",
1001
1004
  range: new a.Range(
1002
1005
  e.lineNumber,
1003
- t.startColumn,
1006
+ n.startColumn,
1004
1007
  e.lineNumber,
1005
- t.endColumn
1008
+ n.endColumn
1006
1009
  ),
1007
1010
  insertText: [
1008
1011
  "@media screen and (max-width: ${1:365px}) {",
@@ -1017,90 +1020,90 @@ const Xt = {
1017
1020
  ]
1018
1021
  };
1019
1022
  }
1020
- }, Kt = "#/definitions/Condition", Bt = { Base: { type: "object", properties: { id: { type: "string" }, name: { type: "string" } }, required: ["id"] }, Condition: { oneOf: [{ $ref: "#/definitions/Datasource" }, { $ref: "#/definitions/Privilege" }, { $ref: "#/definitions/Combination" }, { $ref: "#/definitions/CurrentState" }, { $ref: "#/definitions/ParentState" }, { $ref: "#/definitions/Reference" }] }, Datasource: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "datasource" }, path: { type: "string" }, value: { type: ["number", "string", "boolean", "object", "array", "null"] }, valueType: { enum: ["datasource", "hardCoded"] }, dataType: { enum: ["string", "number", "date", "boolean", "array", "object"] }, op: { enum: ["eq", "neq", "regex", "in", "nin", "gt", "gte", "lt", "lte"] } }, required: ["name", "type", "path", "value", "op"] }, Privilege: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "privilege" }, value: { type: "string" }, valueType: { enum: ["datasource", "hardCoded"] }, op: { enum: ["eq", "neq", "regex"] } }, required: ["name", "type", "value", "op"] }, Combination: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "combination" }, op: { enum: ["and", "or"] }, conditions: { type: "array", items: { $ref: "#/definitions/Condition" } } }, required: ["type", "conditions", "op"] }, CurrentState: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "currentState" }, value: { type: "string" }, valueType: { enum: ["datasource", "hardCoded"] }, dataType: { enum: ["string", "number", "date", "boolean", "array", "object"] }, op: { enum: ["eq", "neq", "regex"] } }, required: ["name", "type", "value", "op"] }, ParentState: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "parentState" }, value: { type: "string" }, valueType: { enum: ["datasource", "hardCoded"] }, dataType: { enum: ["string", "number", "date", "boolean", "array", "object"] }, op: { enum: ["eq", "neq", "regex"] } }, required: ["name", "type", "value", "op"] }, Reference: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "reference" }, ref: { type: "string" } }, required: ["type", "ref"] } }, Dt = {
1021
- $ref: Kt,
1022
- definitions: Bt
1023
- }, Tt = "array", Ot = { type: "object", properties: { class: { type: "string" }, method: { type: "string" }, regexPattern: { type: "string" }, verbs: { type: "string" } } }, Gt = {
1024
- type: Tt,
1025
- items: Ot
1023
+ }, Bt = "#/definitions/Condition", Dt = { Base: { type: "object", properties: { id: { type: "string" }, name: { type: "string" } }, required: ["id"] }, Condition: { oneOf: [{ $ref: "#/definitions/Datasource" }, { $ref: "#/definitions/Privilege" }, { $ref: "#/definitions/Combination" }, { $ref: "#/definitions/CurrentState" }, { $ref: "#/definitions/ParentState" }, { $ref: "#/definitions/Reference" }] }, Datasource: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "datasource" }, path: { type: "string" }, value: { type: ["number", "string", "boolean", "object", "array", "null"] }, valueType: { enum: ["datasource", "hardCoded"] }, dataType: { enum: ["string", "number", "date", "boolean", "array", "object"] }, op: { enum: ["eq", "neq", "regex", "in", "nin", "gt", "gte", "lt", "lte"] } }, required: ["name", "type", "path", "value", "op"] }, Privilege: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "privilege" }, value: { type: "string" }, valueType: { enum: ["datasource", "hardCoded"] }, op: { enum: ["eq", "neq", "regex"] } }, required: ["name", "type", "value", "op"] }, Combination: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "combination" }, op: { enum: ["and", "or"] }, conditions: { type: "array", items: { $ref: "#/definitions/Condition" } } }, required: ["type", "conditions", "op"] }, CurrentState: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "currentState" }, value: { type: "string" }, valueType: { enum: ["datasource", "hardCoded"] }, dataType: { enum: ["string", "number", "date", "boolean", "array", "object"] }, op: { enum: ["eq", "neq", "regex"] } }, required: ["name", "type", "value", "op"] }, ParentState: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "parentState" }, value: { type: "string" }, valueType: { enum: ["datasource", "hardCoded"] }, dataType: { enum: ["string", "number", "date", "boolean", "array", "object"] }, op: { enum: ["eq", "neq", "regex"] } }, required: ["name", "type", "value", "op"] }, Reference: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "reference" }, ref: { type: "string" } }, required: ["type", "ref"] } }, Tt = {
1024
+ $ref: Bt,
1025
+ definitions: Dt
1026
+ }, Ot = "array", Gt = { type: "object", properties: { class: { type: "string" }, method: { type: "string" }, regexPattern: { type: "string" }, verbs: { type: "string" } } }, Mt = {
1027
+ type: Ot,
1028
+ items: Gt
1026
1029
  };
1027
- function Jt(n, e) {
1028
- const t = document.createElement("style");
1029
- t.dataset.id = e, t.textContent = n, document.head.append(t);
1030
+ function Jt(t, e) {
1031
+ const n = document.createElement("style");
1032
+ n.dataset.id = e, n.textContent = t, document.head.append(n);
1030
1033
  }
1031
- function Mt(n) {
1034
+ function Pt(t) {
1032
1035
  return Array.from(document.styleSheets).find(
1033
- (e) => e.ownerNode.getAttribute("data-id") === n
1036
+ (e) => e.ownerNode.getAttribute("data-id") === t
1034
1037
  );
1035
1038
  }
1036
- function Pt(n, e) {
1037
- const t = [];
1039
+ function Vt(t, e) {
1040
+ const n = [];
1038
1041
  let i = [];
1039
- const o = [], r = (l, c, L, k) => {
1040
- t.push({
1042
+ const o = [], r = (l, g, N, k) => {
1043
+ n.push({
1041
1044
  startLineNumber: l,
1042
- endLineNumber: L,
1043
- startColumn: c,
1045
+ endLineNumber: N,
1046
+ startColumn: g,
1044
1047
  endColumn: k
1045
- }), h(), C();
1048
+ }), v(), C();
1046
1049
  }, s = (l) => {
1047
1050
  o.indexOf(l) < 0 && o.push(l);
1048
1051
  }, I = (l) => {
1049
- const c = o.indexOf(l);
1050
- c < 0 || o.splice(c, 1);
1052
+ const g = o.indexOf(l);
1053
+ g < 0 || o.splice(g, 1);
1051
1054
  }, C = () => {
1052
1055
  for (const l of o)
1053
1056
  try {
1054
1057
  l(i);
1055
- } catch (c) {
1056
- console.error(c);
1058
+ } catch (g) {
1059
+ console.error(g);
1057
1060
  }
1058
- }, h = () => {
1059
- const l = n.getModel();
1060
- l && (i = Yt(
1061
- t.map((c) => [
1061
+ }, v = () => {
1062
+ const l = t.getModel();
1063
+ l && (i = Ht(
1064
+ n.map((g) => [
1062
1065
  l.getOffsetAt({
1063
- lineNumber: c.startLineNumber,
1064
- column: c.startColumn
1066
+ lineNumber: g.startLineNumber,
1067
+ column: g.startColumn
1065
1068
  }),
1066
1069
  l.getOffsetAt({
1067
- lineNumber: c.endLineNumber,
1068
- column: c.endColumn
1070
+ lineNumber: g.endLineNumber,
1071
+ column: g.endColumn
1069
1072
  })
1070
1073
  ]),
1071
1074
  /*mergeJoins*/
1072
1075
  !0
1073
1076
  ), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >= l.getValueLength() && (i[i.length - 1][1] = Number.POSITIVE_INFINITY)));
1074
1077
  }, f = (l) => {
1075
- const c = {
1078
+ const g = {
1076
1079
  isDeletion: !1,
1077
1080
  isAddition: !1,
1078
1081
  isReplacement: !1
1079
1082
  };
1080
- return l.text === "" ? c.isDeletion = !0 : l.range.startLineNumber === l.range.endLineNumber && l.range.startColumn === l.range.endColumn ? c.isAddition = !0 : c.isReplacement = !0, c;
1081
- }, A = n.onDidChangeModel((l) => {
1082
- h(), g();
1083
- }), p = n.onDidChangeModelContent((l) => {
1083
+ return l.text === "" ? g.isDeletion = !0 : l.range.startLineNumber === l.range.endLineNumber && l.range.startColumn === l.range.endColumn ? g.isAddition = !0 : g.isReplacement = !0, g;
1084
+ }, A = t.onDidChangeModel((l) => {
1085
+ v(), c();
1086
+ }), p = t.onDidChangeModelContent((l) => {
1084
1087
  if (!l.isUndoing)
1085
- for (const c of l.changes) {
1086
- const L = f(c);
1087
- if (L.isReplacement || L.isDeletion || L.isAddition) {
1088
- const k = t.some(
1089
- (v) => c.range.startLineNumber >= v.startLineNumber && c.range.endLineNumber <= v.endLineNumber && c.range.startColumn >= v.startColumn && c.range.endColumn <= v.endColumn
1090
- ), D = !k && e && c.range.startLineNumber === 1 && c.range.startColumn === 1 && !de(c.text);
1091
- if (k || D) {
1092
- const v = n.getModel();
1093
- if (v) {
1094
- v.undo();
1088
+ for (const g of l.changes) {
1089
+ const N = f(g);
1090
+ if (N.isReplacement || N.isDeletion || N.isAddition) {
1091
+ const k = n.some(
1092
+ (b) => g.range.startLineNumber >= b.startLineNumber && g.range.endLineNumber <= b.endLineNumber && g.range.startColumn >= b.startColumn && g.range.endColumn <= b.endColumn
1093
+ ), K = !k && e && g.range.startLineNumber === 1 && g.range.startColumn === 1 && !de(g.text);
1094
+ if (k || K) {
1095
+ const b = t.getModel();
1096
+ if (b) {
1097
+ b.undo();
1095
1098
  return;
1096
1099
  }
1097
1100
  }
1098
1101
  }
1099
1102
  }
1100
- }), x = () => {
1103
+ }), F = () => {
1101
1104
  A.dispose(), p.dispose();
1102
1105
  };
1103
- let R = [], S = `
1106
+ let x = [], S = `
1104
1107
  .idoc-readonly-mark {
1105
1108
  cursor: not-allowed;
1106
1109
  z-index: 1;
@@ -1108,24 +1111,24 @@ function Pt(n, e) {
1108
1111
  `;
1109
1112
  if (S) {
1110
1113
  const l = "monaco-read-only";
1111
- Mt(l) || Jt(S, l), S = null;
1114
+ Pt(l) || Jt(S, l), S = null;
1112
1115
  }
1113
1116
  const y = () => {
1114
- s(g), g();
1115
- }, b = () => {
1116
- I(g), R = n.deltaDecorations(R, []);
1117
- }, g = () => {
1118
- const l = n.getModel();
1119
- l && (R = n.deltaDecorations(
1120
- R,
1121
- i.map(F(l))
1117
+ s(c), c();
1118
+ }, h = () => {
1119
+ I(c), x = t.deltaDecorations(x, []);
1120
+ }, c = () => {
1121
+ const l = t.getModel();
1122
+ l && (x = t.deltaDecorations(
1123
+ x,
1124
+ i.map(L(l))
1122
1125
  ));
1123
- }, F = (l) => (c) => {
1124
- const L = l.getPositionAt(c[0]), k = l.getPositionAt(c[1]);
1126
+ }, L = (l) => (g) => {
1127
+ const N = l.getPositionAt(g[0]), k = l.getPositionAt(g[1]);
1125
1128
  return {
1126
1129
  range: new a.Range(
1127
- L.lineNumber,
1128
- L.column,
1130
+ N.lineNumber,
1131
+ N.column,
1129
1132
  k.lineNumber,
1130
1133
  k.column
1131
1134
  ),
@@ -1141,52 +1144,52 @@ function Pt(n, e) {
1141
1144
  exclude: r,
1142
1145
  attach: s,
1143
1146
  detach: I,
1144
- dispose: x,
1147
+ dispose: F,
1145
1148
  show: y,
1146
- hide: b
1149
+ hide: h
1147
1150
  };
1148
1151
  }
1149
- function Vt(n, e, t) {
1152
+ function Yt(t, e, n) {
1150
1153
  let i = !1;
1151
- const o = (b) => b[1] < b[0] ? (i = !0, [[b[1], b[0]]]) : [[...b]], r = (b) => i ? b.map((g) => g[1] > g[0] ? I(g) : g).reverse() : b;
1154
+ const o = (h) => h[1] < h[0] ? (i = !0, [[h[1], h[0]]]) : [[...h]], r = (h) => i ? h.map((c) => c[1] > c[0] ? I(c) : c).reverse() : h;
1152
1155
  let s;
1153
- const I = (b) => (s = b[1], b[1] = b[0], b[0] = s, b), C = o(n);
1154
- let h, f, A, p, x, R, S, y;
1156
+ const I = (h) => (s = h[1], h[1] = h[0], h[0] = s, h), C = o(t);
1157
+ let v, f, A, p, F, x, S, y;
1155
1158
  A = C[0];
1156
1159
  for (f of e)
1157
1160
  for (S = f[0], y = f[1], p = 0; p < C.length; p++) {
1158
- if (A = C[p], x = A[0], R = A[1], x < S)
1159
- R < S ? h = [A] : R <= y ? h = [[x, S - 1]] : h = [
1160
- [x, S - 1],
1161
- [y + 1, R]
1161
+ if (A = C[p], F = A[0], x = A[1], F < S)
1162
+ x < S ? v = [A] : x <= y ? v = [[F, S - 1]] : v = [
1163
+ [F, S - 1],
1164
+ [y + 1, x]
1162
1165
  ];
1163
- else if (x <= y)
1166
+ else if (F <= y)
1164
1167
  if (S === Number.NEGATIVE_INFINITY) {
1165
- const b = y + 1;
1166
- h = t === 0 ? [] : [[b, R > b ? R : b]];
1167
- } else y === Number.POSITIVE_INFINITY ? h = t === 0 ? [] : [[S - 1, S - 1]] : R <= y ? h = t < 0 ? [[S - 1, S - 1]] : t > 0 ? [[y + 1, y + 1]] : [] : h = [[y + 1, R]];
1168
+ const h = y + 1;
1169
+ v = n === 0 ? [] : [[h, x > h ? x : h]];
1170
+ } else y === Number.POSITIVE_INFINITY ? v = n === 0 ? [] : [[S - 1, S - 1]] : x <= y ? v = n < 0 ? [[S - 1, S - 1]] : n > 0 ? [[y + 1, y + 1]] : [] : v = [[y + 1, x]];
1168
1171
  else
1169
- h = [A];
1170
- if (C.splice(p, 1, ...h), C.length === 1 && C[0][1] < S) return r(C);
1172
+ v = [A];
1173
+ if (C.splice(p, 1, ...v), C.length === 1 && C[0][1] < S) return r(C);
1171
1174
  }
1172
1175
  return r(C);
1173
1176
  }
1174
- function Yt(n, e) {
1175
- if (n.length < 2) return n;
1176
- const t = [];
1177
+ function Ht(t, e) {
1178
+ if (t.length < 2) return t;
1179
+ const n = [];
1177
1180
  let i = null, o, r;
1178
- n = n.map(
1181
+ t = t.map(
1179
1182
  (s) => (s[1] < s[0] && (o = s[1], s[1] = s[0], s[1] = o), s)
1180
- ).sort((s, I) => s[0] - I[0]), t.push(n[0]);
1181
- for (let s = 1; s < n.length; s++)
1182
- i = t[t.length - 1], r = n[s], i[1] === r[0] && !e || (i[1] === r[0] - 1 && e ? (i[1] = r[1], t.splice(t.length - 1, 1, i)) : i[1] < r[0] ? t.push(r) : i[1] < r[1] && (i[1] = r[1], t.splice(t.length - 1, 1, i)));
1183
- return t;
1183
+ ).sort((s, I) => s[0] - I[0]), n.push(t[0]);
1184
+ for (let s = 1; s < t.length; s++)
1185
+ i = n[n.length - 1], r = t[s], i[1] === r[0] && !e || (i[1] === r[0] - 1 && e ? (i[1] = r[1], n.splice(n.length - 1, 1, i)) : i[1] < r[0] ? n.push(r) : i[1] < r[1] && (i[1] = r[1], n.splice(n.length - 1, 1, i)));
1186
+ return n;
1184
1187
  }
1185
- function Y(n, e) {
1186
- return e.bind(n);
1188
+ function Y(t, e) {
1189
+ return e.bind(t);
1187
1190
  }
1188
- class Ht {
1189
- constructor(e, t) {
1191
+ class _t {
1192
+ constructor(e, n) {
1190
1193
  var i;
1191
1194
  this.disposables = [], this.prefer = 1, this.lastPrefer = 1, this.onCursor = Y(
1192
1195
  this,
@@ -1211,20 +1214,20 @@ class Ht {
1211
1214
  return;
1212
1215
  }
1213
1216
  const I = this.getSelections(), C = this.intervals.buffer;
1214
- let h;
1217
+ let v;
1215
1218
  if (r === s.Delete)
1216
- h = (f) => f[0] === f[1] && C.find((A) => f[1] + 1 === A[0]) != null;
1219
+ v = (f) => f[0] === f[1] && C.find((A) => f[1] + 1 === A[0]) != null;
1217
1220
  else if (r === s.Backspace)
1218
- h = (f) => f[0] === f[1] && C.find((A) => A[1] + 1 === f[0]) != null;
1221
+ v = (f) => f[0] === f[1] && C.find((A) => A[1] + 1 === f[0]) != null;
1219
1222
  else
1220
1223
  return;
1221
- I.findIndex(h) !== -1 && (o.stopPropagation(), o.preventDefault());
1224
+ I.findIndex(v) !== -1 && (o.stopPropagation(), o.preventDefault());
1222
1225
  }), this.getOffsetAt = Y(this, function(o) {
1223
1226
  let r;
1224
1227
  for (let s = 0; s < this.intervals.buffer.length; s++)
1225
1228
  if (r = this.intervals.buffer[s], o <= r[1])
1226
1229
  return r[0] - o < o - r[1] ? r[0] : r[1];
1227
- }), this.editor = e, this.intervals = Pt(e, t), (i = this.editor.getModel()) == null || i.setEOL(a.editor.EndOfLineSequence.LF);
1230
+ }), this.editor = e, this.intervals = Vt(e, n), (i = this.editor.getModel()) == null || i.setEOL(a.editor.EndOfLineSequence.LF);
1228
1231
  }
1229
1232
  enable() {
1230
1233
  this.disposables.push(
@@ -1237,13 +1240,13 @@ class Ht {
1237
1240
  for (const e of this.disposables) e.dispose();
1238
1241
  this.disposables.splice(0);
1239
1242
  }
1240
- exclude(e, t, i, o) {
1241
- arguments.length === 1 ? this.intervals.exclude(e, 0, e, Number.MAX_SAFE_INTEGER) : this.intervals.exclude(e, t, i, o);
1243
+ exclude(e, n, i, o) {
1244
+ arguments.length === 1 ? this.intervals.exclude(e, 0, e, Number.MAX_SAFE_INTEGER) : this.intervals.exclude(e, n, i, o);
1242
1245
  }
1243
1246
  getApprovedSelections() {
1244
1247
  const e = this.editor.getModel();
1245
1248
  return this.getSelections().map(
1246
- (i) => Vt(
1249
+ (i) => Yt(
1247
1250
  i,
1248
1251
  this.intervals.buffer,
1249
1252
  this.prefer
@@ -1260,26 +1263,26 @@ class Ht {
1260
1263
  }
1261
1264
  getSelections() {
1262
1265
  const e = this.editor.getModel();
1263
- return (this.editor.getSelections() || []).map((t) => [
1266
+ return (this.editor.getSelections() || []).map((n) => [
1264
1267
  e.getOffsetAt({
1265
- lineNumber: t.selectionStartLineNumber,
1266
- column: t.selectionStartColumn
1268
+ lineNumber: n.selectionStartLineNumber,
1269
+ column: n.selectionStartColumn
1267
1270
  }),
1268
1271
  e.getOffsetAt({
1269
- lineNumber: t.positionLineNumber,
1270
- column: t.positionColumn
1272
+ lineNumber: n.positionLineNumber,
1273
+ column: n.positionColumn
1271
1274
  })
1272
1275
  ]);
1273
1276
  }
1274
1277
  }
1275
- const _t = {
1276
- provideDocumentFormattingEdits(n, e) {
1277
- const t = n.getValue();
1278
+ const zt = {
1279
+ provideDocumentFormattingEdits(t, e) {
1280
+ const n = t.getValue();
1278
1281
  try {
1279
- const i = zt(t, e.tabSize, e.insertSpaces);
1282
+ const i = $t(n, e.tabSize, e.insertSpaces);
1280
1283
  return [
1281
1284
  {
1282
- range: n.getFullModelRange(),
1285
+ range: t.getFullModelRange(),
1283
1286
  text: i
1284
1287
  }
1285
1288
  ];
@@ -1288,9 +1291,9 @@ const _t = {
1288
1291
  }
1289
1292
  }
1290
1293
  };
1291
- function zt(n, e = 2, t = !0) {
1292
- const i = t ? " ".repeat(e) : " ";
1293
- let o = n.replace(/\s+/g, " ").trim();
1294
+ function $t(t, e = 2, n = !0) {
1295
+ const i = n ? " ".repeat(e) : " ";
1296
+ let o = t.replace(/\s+/g, " ").trim();
1294
1297
  return o = o.replace(/\{/g, ` {
1295
1298
  ` + i).replace(/\}/g, `
1296
1299
  }
@@ -1304,14 +1307,14 @@ function zt(n, e = 2, t = !0) {
1304
1307
  `).map((r) => r.trim() === "}" ? "}" : r.trimEnd()).filter((r, s, I) => !(r === "" && I[s + 1] === "")).join(`
1305
1308
  `).trim(), o;
1306
1309
  }
1307
- const $t = {
1308
- provideDocumentFormattingEdits(n, e) {
1309
- const t = n.getValue();
1310
+ const Ut = {
1311
+ provideDocumentFormattingEdits(t, e) {
1312
+ const n = t.getValue();
1310
1313
  try {
1311
- const i = Ut(t, e.tabSize);
1314
+ const i = qt(n, e.tabSize);
1312
1315
  return [
1313
1316
  {
1314
- range: n.getFullModelRange(),
1317
+ range: t.getFullModelRange(),
1315
1318
  text: i
1316
1319
  }
1317
1320
  ];
@@ -1320,25 +1323,25 @@ const $t = {
1320
1323
  }
1321
1324
  }
1322
1325
  };
1323
- function Ut(n, e = 2) {
1324
- const t = JSON.parse(n);
1325
- return JSON.stringify(t, null, e);
1326
+ function qt(t, e = 2) {
1327
+ const n = JSON.parse(t);
1328
+ return JSON.stringify(n, null, e);
1326
1329
  }
1327
- const qt = new RegExp("^[ s]+(exposed|Function)", "i"), Qt = ({
1328
- lineNumber: n,
1330
+ const Qt = new RegExp("^[ s]+(exposed|Function)", "i"), en = ({
1331
+ lineNumber: t,
1329
1332
  editor: e,
1330
- type: t,
1333
+ type: n,
1331
1334
  source: i
1332
1335
  }) => {
1333
- var h;
1334
- const o = t === oe.METHOD || t === oe.DEBUGGER && ((h = i == null ? void 0 : i.codeDescriptorInfo) == null ? void 0 : h.type) === je.METHOD;
1335
- if (n === 1)
1336
+ var v;
1337
+ const o = n === oe.METHOD || n === oe.DEBUGGER && ((v = i == null ? void 0 : i.codeDescriptorInfo) == null ? void 0 : v.type) === je.METHOD;
1338
+ if (t === 1)
1336
1339
  return o ? "" : "1";
1337
1340
  const r = e == null ? void 0 : e.getModel(), s = (r == null ? void 0 : r.getLinesContent()) || [], I = Array(s.length).fill("-");
1338
1341
  let C = o ? 0 : 1;
1339
1342
  for (let f = 1; f < s.length; f++)
1340
1343
  (f === 1 ? "" : s[f - 1]).endsWith("\\") || (C += 1, I[f] = C.toString());
1341
- return I[n - 1];
1344
+ return I[t - 1];
1342
1345
  }, le = () => /* @__PURE__ */ w("div", { className: "absolute inset-0 animate-pulse", children: /* @__PURE__ */ w("div", { className: "w-full space-y-4 px-4 py-1", children: /* @__PURE__ */ _("div", { className: "space-y-2", children: [
1343
1346
  /* @__PURE__ */ w("div", { className: "h-3 w-3/4 rounded bg-grey-200" }),
1344
1347
  /* @__PURE__ */ w("div", { className: "h-3 rounded bg-grey-200" }),
@@ -1348,91 +1351,105 @@ const qt = new RegExp("^[ s]+(exposed|Function)", "i"), Qt = ({
1348
1351
  ] }) }) }), ie = ["fd-dark"], q = {
1349
1352
  css: [],
1350
1353
  json: []
1351
- }, Mn = ({
1352
- path: n,
1354
+ }, Pn = ({
1355
+ path: t,
1353
1356
  initialValue: e,
1354
- type: t,
1357
+ type: n,
1355
1358
  language: i,
1356
1359
  onChange: o,
1357
1360
  options: r = {},
1358
1361
  extra: s = {},
1359
1362
  lspProps: I,
1360
1363
  theme: C = ie[0],
1361
- ...h
1364
+ ...v
1362
1365
  }) => {
1363
- const { initialLineInfo: f, initialSelectionInfo: A } = s, { editor: p, setEditor: x } = Zt(), { inited: R } = I;
1364
- function S(g) {
1365
- i === "css" && g.languages.css && (g.languages.registerCompletionItemProvider("css", Xt), g.languages.css.cssDefaults.setModeConfiguration({
1366
+ const { initialLineInfo: f, initialSelectionInfo: A } = s, { editor: p, setEditor: F } = Xt(), { inited: x } = I;
1367
+ function S(c) {
1368
+ i === "css" && c.languages.css && (c.languages.registerCompletionItemProvider("css", Kt), c.languages.css.cssDefaults.setModeConfiguration({
1366
1369
  documentFormattingEdits: !1,
1367
1370
  documentRangeFormattingEdits: !1
1368
- }), q.css.forEach((F) => F.dispose()), q.css.push(
1369
- g.languages.registerDocumentFormattingEditProvider(
1371
+ }), q.css.forEach((L) => L.dispose()), q.css.push(
1372
+ c.languages.registerDocumentFormattingEditProvider(
1370
1373
  "css",
1371
- _t
1374
+ zt
1372
1375
  )
1373
- )), i === "json" && g.languages.json && (g.languages.json.jsonDefaults.setDiagnosticsOptions({
1376
+ )), i === "json" && c.languages.json && (c.languages.json.jsonDefaults.setDiagnosticsOptions({
1374
1377
  validate: !0,
1375
1378
  schemas: [
1376
1379
  {
1377
1380
  uri: "condition-schema.json",
1378
1381
  fileMatch: ["*.condition.json"],
1379
- schema: Dt
1382
+ schema: Tt
1380
1383
  },
1381
1384
  {
1382
1385
  uri: "handlers-schema.json",
1383
1386
  fileMatch: [Ee],
1384
- schema: Gt
1387
+ schema: Mt
1385
1388
  }
1386
1389
  ]
1387
- }), g.languages.json.jsonDefaults.setModeConfiguration({
1390
+ }), c.languages.json.jsonDefaults.setModeConfiguration({
1388
1391
  documentFormattingEdits: !1,
1389
1392
  documentRangeFormattingEdits: !1
1390
- }), q.json.forEach((F) => F.dispose()), q.json.push(
1391
- g.languages.registerDocumentFormattingEditProvider(
1393
+ }), q.json.forEach((L) => L.dispose()), q.json.push(
1394
+ c.languages.registerDocumentFormattingEditProvider(
1392
1395
  "json",
1393
- $t
1396
+ Ut
1394
1397
  )
1395
1398
  ));
1396
1399
  }
1397
- function y(g, F) {
1398
- x(g);
1399
- const l = g.getModel();
1400
- if (l && (l.updateOptions({ insertSpaces: !1 }), g.onKeyUp(() => {
1401
- var L;
1402
- const c = (L = g.getPosition()) == null ? void 0 : L.lineNumber;
1403
- if (c) {
1404
- const k = l.getLineFirstNonWhitespaceColumn(c), D = l.getLineLength(c), v = l.getLineContent(c);
1405
- qt.test(v) && g.executeEdits("edit-handler", [
1400
+ function y(c, L) {
1401
+ F(c);
1402
+ const l = c.getModel();
1403
+ if (l && (l.updateOptions({ insertSpaces: !1 }), c.onKeyUp(() => {
1404
+ var N;
1405
+ const g = (N = c.getPosition()) == null ? void 0 : N.lineNumber;
1406
+ if (g) {
1407
+ const k = l.getLineFirstNonWhitespaceColumn(g), K = l.getLineLength(g), b = l.getLineContent(g);
1408
+ Qt.test(b) && c.executeEdits("edit-handler", [
1406
1409
  {
1407
- range: new F.Range(
1408
- c,
1410
+ range: new L.Range(
1411
+ g,
1409
1412
  0,
1410
- c,
1411
- D
1413
+ g,
1414
+ K
1412
1415
  ),
1413
- text: v.substr(
1416
+ text: b.substr(
1414
1417
  k - 1,
1415
- D - k
1418
+ K - k
1416
1419
  )
1417
1420
  }
1418
1421
  ]);
1419
1422
  }
1420
- })), t === oe.METHOD && de(e)) {
1421
- const c = new Ht(g, !0);
1422
- c.exclude(1, 1, 1, Number.POSITIVE_INFINITY), c.enable();
1423
+ })), xt(l)) {
1424
+ const g = [
1425
+ "editor.action.revealDefinition",
1426
+ "editor.action.goToReferences",
1427
+ "submenuitem.EditorContextPeek"
1428
+ ], N = c.getContribution(
1429
+ "editor.contrib.contextmenu"
1430
+ ), k = N._getMenuActions;
1431
+ N._getMenuActions = function() {
1432
+ return k.apply(N, arguments).filter(function(b) {
1433
+ return !g.includes(b.id);
1434
+ });
1435
+ };
1436
+ }
1437
+ if (n === oe.METHOD && de(e)) {
1438
+ const g = new _t(c, !0);
1439
+ g.exclude(1, 1, 1, Number.POSITIVE_INFINITY), g.enable();
1423
1440
  }
1424
1441
  }
1425
- M(() => {
1442
+ J(() => {
1426
1443
  if (!p) return;
1427
- const { line: g, offset: F } = f || {};
1428
- g && Rt(p, g, F);
1429
- }, [f, p]), M(() => {
1444
+ const { line: c, offset: L } = f || {};
1445
+ c && Rt(p, c, L);
1446
+ }, [f, p]), J(() => {
1430
1447
  if (!p) return;
1431
- const { selection: g } = A || {};
1432
- g && Nt(p, g);
1448
+ const { selection: c } = A || {};
1449
+ c && Nt(p, c);
1433
1450
  }, [A, p]);
1434
- const b = (g) => ie.includes(g) ? g : ie[0];
1435
- return R ? /* @__PURE__ */ w(
1451
+ const h = (c) => ie.includes(c) ? c : ie[0];
1452
+ return x ? /* @__PURE__ */ w(
1436
1453
  Fe,
1437
1454
  {
1438
1455
  options: {
@@ -1440,24 +1457,24 @@ const qt = new RegExp("^[ s]+(exposed|Function)", "i"), Qt = ({
1440
1457
  fontSize: 12,
1441
1458
  "semanticHighlighting.enabled": !0,
1442
1459
  padding: { top: 10 },
1443
- lineNumbers: i === "4d" ? (g) => Qt({
1444
- lineNumber: g,
1460
+ lineNumbers: i === "4d" ? (c) => en({
1461
+ lineNumber: c,
1445
1462
  editor: p,
1446
- type: t,
1463
+ type: n,
1447
1464
  source: s == null ? void 0 : s.source
1448
1465
  }) : void 0,
1449
1466
  scrollBeyondLastLine: !1,
1450
1467
  ...r
1451
1468
  },
1452
- path: E(n),
1469
+ path: E(t),
1453
1470
  value: e,
1454
- theme: b(C),
1455
- onChange: (g) => o && o(g || ""),
1471
+ theme: h(C),
1472
+ onChange: (c) => o && o(c || ""),
1456
1473
  language: i,
1457
1474
  beforeMount: S,
1458
1475
  onMount: y,
1459
1476
  loading: /* @__PURE__ */ w(le, {}),
1460
- ...h
1477
+ ...v
1461
1478
  }
1462
1479
  ) : /* @__PURE__ */ w("div", { className: "relative flex-1 w-full", children: /* @__PURE__ */ w(le, {}) });
1463
1480
  };
@@ -1467,75 +1484,75 @@ var be = {
1467
1484
  className: void 0,
1468
1485
  style: void 0,
1469
1486
  attr: void 0
1470
- }, ge = G.createContext && G.createContext(be), B = function() {
1471
- return B = Object.assign || function(n) {
1472
- for (var e, t = 1, i = arguments.length; t < i; t++) {
1473
- e = arguments[t];
1474
- for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (n[o] = e[o]);
1487
+ }, ce = G.createContext && G.createContext(be), D = function() {
1488
+ return D = Object.assign || function(t) {
1489
+ for (var e, n = 1, i = arguments.length; n < i; n++) {
1490
+ e = arguments[n];
1491
+ for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
1475
1492
  }
1476
- return n;
1477
- }, B.apply(this, arguments);
1478
- }, en = function(n, e) {
1479
- var t = {};
1480
- for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
1481
- if (n != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, i = Object.getOwnPropertySymbols(n); o < i.length; o++)
1482
- e.indexOf(i[o]) < 0 && Object.prototype.propertyIsEnumerable.call(n, i[o]) && (t[i[o]] = n[i[o]]);
1483
- return t;
1493
+ return t;
1494
+ }, D.apply(this, arguments);
1495
+ }, tn = function(t, e) {
1496
+ var n = {};
1497
+ for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
1498
+ if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, i = Object.getOwnPropertySymbols(t); o < i.length; o++)
1499
+ e.indexOf(i[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[o]) && (n[i[o]] = t[i[o]]);
1500
+ return n;
1484
1501
  };
1485
- function he(n) {
1486
- return n && n.map(function(e, t) {
1487
- return G.createElement(e.tag, B({
1488
- key: t
1502
+ function he(t) {
1503
+ return t && t.map(function(e, n) {
1504
+ return G.createElement(e.tag, D({
1505
+ key: n
1489
1506
  }, e.attr), he(e.child));
1490
1507
  });
1491
1508
  }
1492
- function ve(n) {
1509
+ function ve(t) {
1493
1510
  return function(e) {
1494
- return G.createElement(tn, B({
1495
- attr: B({}, n.attr)
1496
- }, e), he(n.child));
1511
+ return G.createElement(nn, D({
1512
+ attr: D({}, t.attr)
1513
+ }, e), he(t.child));
1497
1514
  };
1498
1515
  }
1499
- function tn(n) {
1500
- var e = function(t) {
1501
- var i = n.attr, o = n.size, r = n.title, s = en(n, ["attr", "size", "title"]), I = o || t.size || "1em", C;
1502
- return t.className && (C = t.className), n.className && (C = (C ? C + " " : "") + n.className), G.createElement("svg", B({
1516
+ function nn(t) {
1517
+ var e = function(n) {
1518
+ var i = t.attr, o = t.size, r = t.title, s = tn(t, ["attr", "size", "title"]), I = o || n.size || "1em", C;
1519
+ return n.className && (C = n.className), t.className && (C = (C ? C + " " : "") + t.className), G.createElement("svg", D({
1503
1520
  stroke: "currentColor",
1504
1521
  fill: "currentColor",
1505
1522
  strokeWidth: "0"
1506
- }, t.attr, i, s, {
1523
+ }, n.attr, i, s, {
1507
1524
  className: C,
1508
- style: B(B({
1509
- color: n.color || t.color
1510
- }, t.style), n.style),
1525
+ style: D(D({
1526
+ color: t.color || n.color
1527
+ }, n.style), t.style),
1511
1528
  height: I,
1512
1529
  width: I,
1513
1530
  xmlns: "http://www.w3.org/2000/svg"
1514
- }), r && G.createElement("title", null, r), n.children);
1531
+ }), r && G.createElement("title", null, r), t.children);
1515
1532
  };
1516
- return ge !== void 0 ? G.createElement(ge.Consumer, null, function(t) {
1517
- return e(t);
1533
+ return ce !== void 0 ? G.createElement(ce.Consumer, null, function(n) {
1534
+ return e(n);
1518
1535
  }) : e(be);
1519
1536
  }
1520
- function nn(n) {
1521
- return ve({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z" } }] })(n);
1537
+ function on(t) {
1538
+ return ve({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z" } }] })(t);
1522
1539
  }
1523
- function on(n) {
1524
- return ve({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z" } }] })(n);
1540
+ function rn(t) {
1541
+ return ve({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z" } }] })(t);
1525
1542
  }
1526
- const Pn = ({
1527
- lspProps: { lastError: n, reload: e }
1543
+ const Vn = ({
1544
+ lspProps: { lastError: t, reload: e }
1528
1545
  }) => {
1529
- const [t, i] = z(!1), o = () => {
1546
+ const [n, i] = z(!1), o = () => {
1530
1547
  e();
1531
1548
  }, r = () => {
1532
1549
  i(!1);
1533
1550
  };
1534
- return M(() => {
1535
- i(!!n);
1536
- }, [n]), t ? /* @__PURE__ */ _("div", { className: "flex items-center border-b border-fd-gray-darker bg-grey-800 px-2 py-1.5 text-xs text-grey-50", children: [
1551
+ return J(() => {
1552
+ i(!!t);
1553
+ }, [t]), n ? /* @__PURE__ */ _("div", { className: "flex items-center border-b border-fd-gray-darker bg-grey-800 px-2 py-1.5 text-xs text-grey-50", children: [
1537
1554
  /* @__PURE__ */ _("span", { className: "flex flex-1 justify-center gap-1", children: [
1538
- /* @__PURE__ */ w(on, { className: "h-4 w-4 text-yellow-600" }),
1555
+ /* @__PURE__ */ w(rn, { className: "h-4 w-4 text-yellow-600" }),
1539
1556
  /* @__PURE__ */ _("span", { children: [
1540
1557
  "LSP not loaded.",
1541
1558
  " ",
@@ -1550,14 +1567,14 @@ const Pn = ({
1550
1567
  ] })
1551
1568
  ] }),
1552
1569
  /* @__PURE__ */ w("button", { className: "focus:outline-none", children: /* @__PURE__ */ w(
1553
- nn,
1570
+ on,
1554
1571
  {
1555
1572
  className: "h-4 w-4 text-white",
1556
1573
  onClick: r
1557
1574
  }
1558
1575
  ) })
1559
1576
  ] }) : null;
1560
- }, rn = {
1577
+ }, sn = {
1561
1578
  name: "4d",
1562
1579
  displayName: "%displayName%",
1563
1580
  description: "%description%",
@@ -1582,7 +1599,7 @@ const Pn = ({
1582
1599
  }
1583
1600
  ]
1584
1601
  }
1585
- }, { registerFileUrl: Q, whenReady: Vn } = Ct(rn, void 0, {
1602
+ }, { registerFileUrl: Q, whenReady: Yn } = Ct(sn, void 0, {
1586
1603
  system: !0
1587
1604
  });
1588
1605
  Q(
@@ -1606,20 +1623,21 @@ Q(
1606
1623
  { mimeType: "application/json", size: 135 }
1607
1624
  );
1608
1625
  export {
1609
- Pn as Alerts,
1610
- Mn as CodeEditor,
1626
+ Vn as Alerts,
1627
+ Pn as CodeEditor,
1611
1628
  Jn as CodeEditorProvider,
1612
- Qt as FdLineNumbers,
1613
- On as LSPProvider,
1629
+ en as FdLineNumbers,
1630
+ Gn as LSPProvider,
1614
1631
  ie as SUPPORTED_THEMES,
1615
1632
  Ce as _await,
1616
1633
  vt as configureServices,
1617
1634
  E as getFileSystemPath,
1618
- Tn as getFunctionOffset,
1635
+ On as getFunctionOffset,
1619
1636
  ht as initMonacoUserConfiguration,
1637
+ xt as isCssModel,
1620
1638
  Rt as jumpToLine,
1621
1639
  Nt as jumpToSelection,
1622
- Zt as useCodeEditor,
1623
- Gn as useLSP
1640
+ Xt as useCodeEditor,
1641
+ Mn as useLSP
1624
1642
  };
1625
1643
  //# sourceMappingURL=index.es.js.map