@arcgis/coding-components 5.1.18 → 5.1.20
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/cdn/{KML3INWB.js → 2XORJGOD.js} +1 -1
- package/dist/cdn/{L3JHKSAE.js → 4AV2ZMBM.js} +1 -1
- package/dist/cdn/{37SCK5HT.js → 4BLQZWRC.js} +1 -1
- package/dist/cdn/5YJTUXTU.js +2 -0
- package/dist/cdn/{VZEPLUIH.js → 645Q66AD.js} +1 -1
- package/dist/cdn/{7RWPAFPO.js → 734X5HWG.js} +1 -1
- package/dist/cdn/{ZW74JYD4.js → 74QZSQQ5.js} +1 -1
- package/dist/cdn/{JNPGZHWL.js → 7CYTLXOC.js} +1 -1
- package/dist/cdn/{ZQAOGUW4.js → 7YHWNJ4R.js} +1 -1
- package/dist/cdn/{NMBUZ7XV.js → BMRLATHT.js} +2 -2
- package/dist/cdn/{26VGQHSC.js → DTWXR32R.js} +1 -1
- package/dist/cdn/{3RGPC4YX.js → IML3SU4F.js} +1 -1
- package/dist/cdn/{DORKY6GL.js → JHNVFJ2C.js} +1 -1
- package/dist/cdn/{7GJK64V7.js → LG6BVHTQ.js} +1 -1
- package/dist/cdn/{DCEPI6ZB.js → LXNHXZKM.js} +1 -1
- package/dist/cdn/{HDPOECHP.js → MEKCJPMF.js} +1 -1
- package/dist/cdn/{LHZ4DVB6.js → N5JHN5AT.js} +1 -1
- package/dist/cdn/{NUQLRYKS.js → NA6FMFUF.js} +1 -1
- package/dist/cdn/{HTCZIQKS.js → ORJ3QRJP.js} +1 -1
- package/dist/cdn/{M5WT36NH.js → PWW7GCE7.js} +1 -1
- package/dist/cdn/{K6TOLGFP.js → RKGQRD5I.js} +1 -1
- package/dist/cdn/{QTRPBF53.js → SRJ3SCC7.js} +1 -1
- package/dist/cdn/{2DSZLLO2.js → TAFUUSPM.js} +1 -1
- package/dist/cdn/{X4GUNJK5.js → UU2ZB7CA.js} +1 -1
- package/dist/cdn/UVEI65VE.js +2 -0
- package/dist/cdn/{3VX2J7EL.js → UZNTMI2V.js} +1 -1
- package/dist/cdn/{W5HFTYB6.js → W3UP555H.js} +1 -1
- package/dist/cdn/{INUUMLXS.js → YPWUTNC4.js} +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +1 -1
- package/dist/cdn/assets/code-editor/sql-layer.worker.js +882 -843
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/language-defaults-base.js +37 -32
- package/dist/chunks/runtime.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +165 -142
- package/dist/components/arcgis-arcade-results/customElement.js +15 -15
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/dist/utils/arcade-executor.d.ts +14 -1
- package/package.json +5 -5
- package/dist/cdn/CMWXL65Y.js +0 -2
- package/dist/cdn/S36UVCDQ.js +0 -2
|
@@ -2,7 +2,7 @@ class li {
|
|
|
2
2
|
constructor() {
|
|
3
3
|
this.listeners = [], this.unexpectedErrorHandler = function(e) {
|
|
4
4
|
setTimeout(() => {
|
|
5
|
-
throw e.stack ?
|
|
5
|
+
throw e.stack ? Ze.isErrorNoTelemetry(e) ? new Ze(e.message + `
|
|
6
6
|
|
|
7
7
|
` + e.stack) : new Error(e.message + `
|
|
8
8
|
|
|
@@ -35,7 +35,7 @@ function en(t) {
|
|
|
35
35
|
name: e,
|
|
36
36
|
message: n,
|
|
37
37
|
stack: s,
|
|
38
|
-
noTelemetry:
|
|
38
|
+
noTelemetry: Ze.isErrorNoTelemetry(t),
|
|
39
39
|
cause: r ? en(r) : void 0,
|
|
40
40
|
code: t.code
|
|
41
41
|
};
|
|
@@ -44,30 +44,30 @@ function en(t) {
|
|
|
44
44
|
}
|
|
45
45
|
const tn = "Canceled";
|
|
46
46
|
function ci(t) {
|
|
47
|
-
return t instanceof
|
|
47
|
+
return t instanceof As ? !0 : t instanceof Error && t.name === tn && t.message === tn;
|
|
48
48
|
}
|
|
49
|
-
class
|
|
49
|
+
class As extends Error {
|
|
50
50
|
constructor() {
|
|
51
51
|
super(tn), this.name = this.message;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
class
|
|
54
|
+
class Ze extends Error {
|
|
55
55
|
constructor(e) {
|
|
56
56
|
super(e), this.name = "CodeExpectedError";
|
|
57
57
|
}
|
|
58
58
|
static fromError(e) {
|
|
59
|
-
if (e instanceof
|
|
59
|
+
if (e instanceof Ze)
|
|
60
60
|
return e;
|
|
61
|
-
const n = new
|
|
61
|
+
const n = new Ze();
|
|
62
62
|
return n.message = e.message, n.stack = e.stack, n;
|
|
63
63
|
}
|
|
64
64
|
static isErrorNoTelemetry(e) {
|
|
65
65
|
return e.name === "CodeExpectedError";
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
class
|
|
68
|
+
class ee extends Error {
|
|
69
69
|
constructor(e) {
|
|
70
|
-
super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this,
|
|
70
|
+
super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this, ee.prototype);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
function hi(t, e = "Unreachable") {
|
|
@@ -75,15 +75,15 @@ function hi(t, e = "Unreachable") {
|
|
|
75
75
|
}
|
|
76
76
|
function fi(t, e = "unexpected state") {
|
|
77
77
|
if (!t)
|
|
78
|
-
throw typeof e == "string" ? new
|
|
78
|
+
throw typeof e == "string" ? new ee(`Assertion Failed: ${e}`) : e;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function At(t) {
|
|
81
81
|
if (!t()) {
|
|
82
82
|
debugger;
|
|
83
|
-
t(), vt(new
|
|
83
|
+
t(), vt(new ee("Assertion Failed"));
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Rs(t, e) {
|
|
87
87
|
let n = 0;
|
|
88
88
|
for (; n < t.length - 1; ) {
|
|
89
89
|
const r = t[n], s = t[n + 1];
|
|
@@ -99,7 +99,7 @@ function mi(t) {
|
|
|
99
99
|
function di(t) {
|
|
100
100
|
return !!t && typeof t[Symbol.iterator] == "function";
|
|
101
101
|
}
|
|
102
|
-
var
|
|
102
|
+
var Rt;
|
|
103
103
|
(function(t) {
|
|
104
104
|
function e(x) {
|
|
105
105
|
return !!x && typeof x == "object" && typeof x[Symbol.iterator] == "function";
|
|
@@ -198,7 +198,7 @@ var Et;
|
|
|
198
198
|
yield x[L];
|
|
199
199
|
}
|
|
200
200
|
t.slice = N;
|
|
201
|
-
function
|
|
201
|
+
function A(x, L = Number.POSITIVE_INFINITY) {
|
|
202
202
|
const k = [];
|
|
203
203
|
if (L === 0)
|
|
204
204
|
return [k, x];
|
|
@@ -213,7 +213,7 @@ var Et;
|
|
|
213
213
|
return I;
|
|
214
214
|
} }];
|
|
215
215
|
}
|
|
216
|
-
t.consume =
|
|
216
|
+
t.consume = A;
|
|
217
217
|
async function F(x) {
|
|
218
218
|
const L = [];
|
|
219
219
|
for await (const k of x)
|
|
@@ -221,16 +221,16 @@ var Et;
|
|
|
221
221
|
return L;
|
|
222
222
|
}
|
|
223
223
|
t.asyncToArray = F;
|
|
224
|
-
async function
|
|
224
|
+
async function B(x) {
|
|
225
225
|
let L = [];
|
|
226
226
|
for await (const k of x)
|
|
227
227
|
L = L.concat(k);
|
|
228
228
|
return L;
|
|
229
229
|
}
|
|
230
|
-
t.asyncToArrayFlat =
|
|
231
|
-
})(
|
|
230
|
+
t.asyncToArrayFlat = B;
|
|
231
|
+
})(Rt || (Rt = {}));
|
|
232
232
|
function Ms(t) {
|
|
233
|
-
if (
|
|
233
|
+
if (Rt.is(t)) {
|
|
234
234
|
const e = [];
|
|
235
235
|
for (const n of t)
|
|
236
236
|
if (n)
|
|
@@ -301,7 +301,7 @@ class gt {
|
|
|
301
301
|
* Add a new {@link IDisposable disposable} to the collection.
|
|
302
302
|
*/
|
|
303
303
|
add(e) {
|
|
304
|
-
if (!e || e ===
|
|
304
|
+
if (!e || e === ht.None)
|
|
305
305
|
return e;
|
|
306
306
|
if (e === this)
|
|
307
307
|
throw new Error("Cannot register a disposable on itself!");
|
|
@@ -319,7 +319,7 @@ class gt {
|
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
class
|
|
322
|
+
class ht {
|
|
323
323
|
static {
|
|
324
324
|
this.None = Object.freeze({ dispose() {
|
|
325
325
|
} });
|
|
@@ -433,19 +433,19 @@ class Ut {
|
|
|
433
433
|
}
|
|
434
434
|
var nn;
|
|
435
435
|
(function(t) {
|
|
436
|
-
t.None = () =>
|
|
436
|
+
t.None = () => ht.None;
|
|
437
437
|
function e(_, S) {
|
|
438
438
|
return m(_, () => {
|
|
439
439
|
}, 0, void 0, !0, void 0, S);
|
|
440
440
|
}
|
|
441
441
|
t.defer = e;
|
|
442
442
|
function n(_) {
|
|
443
|
-
return (S,
|
|
443
|
+
return (S, R = null, E) => {
|
|
444
444
|
let P = !1, q;
|
|
445
|
-
return q = _((
|
|
445
|
+
return q = _((H) => {
|
|
446
446
|
if (!P)
|
|
447
|
-
return q ? q.dispose() : P = !0, S.call(
|
|
448
|
-
}, null,
|
|
447
|
+
return q ? q.dispose() : P = !0, S.call(R, H);
|
|
448
|
+
}, null, E), P && q.dispose(), q;
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
451
|
t.once = n;
|
|
@@ -453,18 +453,18 @@ var nn;
|
|
|
453
453
|
return t.once(t.filter(_, S));
|
|
454
454
|
}
|
|
455
455
|
t.onceIf = r;
|
|
456
|
-
function s(_, S,
|
|
457
|
-
return h((
|
|
456
|
+
function s(_, S, R) {
|
|
457
|
+
return h((E, P = null, q) => _((H) => E.call(P, S(H)), null, q), R);
|
|
458
458
|
}
|
|
459
459
|
t.map = s;
|
|
460
|
-
function i(_, S,
|
|
461
|
-
return h((
|
|
462
|
-
S(
|
|
463
|
-
}, null, q),
|
|
460
|
+
function i(_, S, R) {
|
|
461
|
+
return h((E, P = null, q) => _((H) => {
|
|
462
|
+
S(H), E.call(P, H);
|
|
463
|
+
}, null, q), R);
|
|
464
464
|
}
|
|
465
465
|
t.forEach = i;
|
|
466
|
-
function a(_, S,
|
|
467
|
-
return h((
|
|
466
|
+
function a(_, S, R) {
|
|
467
|
+
return h((E, P = null, q) => _((H) => S(H) && E.call(P, H), null, q), R);
|
|
468
468
|
}
|
|
469
469
|
t.filter = a;
|
|
470
470
|
function o(_) {
|
|
@@ -472,100 +472,100 @@ var nn;
|
|
|
472
472
|
}
|
|
473
473
|
t.signal = o;
|
|
474
474
|
function u(..._) {
|
|
475
|
-
return (S,
|
|
476
|
-
const P = gi(..._.map((q) => q((
|
|
477
|
-
return f(P,
|
|
475
|
+
return (S, R = null, E) => {
|
|
476
|
+
const P = gi(..._.map((q) => q((H) => S.call(R, H))));
|
|
477
|
+
return f(P, E);
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
480
|
t.any = u;
|
|
481
|
-
function c(_, S,
|
|
482
|
-
let P =
|
|
483
|
-
return s(_, (q) => (P = S(P, q), P),
|
|
481
|
+
function c(_, S, R, E) {
|
|
482
|
+
let P = R;
|
|
483
|
+
return s(_, (q) => (P = S(P, q), P), E);
|
|
484
484
|
}
|
|
485
485
|
t.reduce = c;
|
|
486
486
|
function h(_, S) {
|
|
487
|
-
let
|
|
488
|
-
const
|
|
487
|
+
let R;
|
|
488
|
+
const E = {
|
|
489
489
|
onWillAddFirstListener() {
|
|
490
|
-
|
|
490
|
+
R = _(P.fire, P);
|
|
491
491
|
},
|
|
492
492
|
onDidRemoveLastListener() {
|
|
493
|
-
|
|
493
|
+
R?.dispose();
|
|
494
494
|
}
|
|
495
|
-
}, P = new pe(
|
|
495
|
+
}, P = new pe(E);
|
|
496
496
|
return S?.add(P), P.event;
|
|
497
497
|
}
|
|
498
498
|
function f(_, S) {
|
|
499
499
|
return S instanceof Array ? S.push(_) : S && S.add(_), _;
|
|
500
500
|
}
|
|
501
|
-
function m(_, S,
|
|
502
|
-
let Z,
|
|
501
|
+
function m(_, S, R = 100, E = !1, P = !1, q, H) {
|
|
502
|
+
let Z, te, Te, bt = 0, tt;
|
|
503
503
|
const ii = {
|
|
504
504
|
leakWarningThreshold: q,
|
|
505
505
|
onWillAddFirstListener() {
|
|
506
506
|
Z = _((ai) => {
|
|
507
|
-
bt++,
|
|
508
|
-
const oi =
|
|
509
|
-
|
|
510
|
-
}, typeof
|
|
507
|
+
bt++, te = S(te, ai), E && !Te && (wt.fire(te), te = void 0), tt = () => {
|
|
508
|
+
const oi = te;
|
|
509
|
+
te = void 0, Te = void 0, (!E || bt > 1) && wt.fire(oi), bt = 0;
|
|
510
|
+
}, typeof R == "number" ? (Te && clearTimeout(Te), Te = setTimeout(tt, R)) : Te === void 0 && (Te = null, queueMicrotask(tt));
|
|
511
511
|
});
|
|
512
512
|
},
|
|
513
513
|
onWillRemoveListener() {
|
|
514
|
-
P && bt > 0 &&
|
|
514
|
+
P && bt > 0 && tt?.();
|
|
515
515
|
},
|
|
516
516
|
onDidRemoveLastListener() {
|
|
517
|
-
|
|
517
|
+
tt = void 0, Z.dispose();
|
|
518
518
|
}
|
|
519
519
|
}, wt = new pe(ii);
|
|
520
|
-
return
|
|
520
|
+
return H?.add(wt), wt.event;
|
|
521
521
|
}
|
|
522
522
|
t.debounce = m;
|
|
523
|
-
function p(_, S = 0,
|
|
524
|
-
return t.debounce(_, (
|
|
523
|
+
function p(_, S = 0, R) {
|
|
524
|
+
return t.debounce(_, (E, P) => E ? (E.push(P), E) : [P], S, void 0, !0, void 0, R);
|
|
525
525
|
}
|
|
526
526
|
t.accumulate = p;
|
|
527
|
-
function d(_, S = (
|
|
528
|
-
let
|
|
527
|
+
function d(_, S = (E, P) => E === P, R) {
|
|
528
|
+
let E = !0, P;
|
|
529
529
|
return a(_, (q) => {
|
|
530
|
-
const
|
|
531
|
-
return
|
|
532
|
-
},
|
|
530
|
+
const H = E || !S(q, P);
|
|
531
|
+
return E = !1, P = q, H;
|
|
532
|
+
}, R);
|
|
533
533
|
}
|
|
534
534
|
t.latch = d;
|
|
535
|
-
function g(_, S,
|
|
535
|
+
function g(_, S, R) {
|
|
536
536
|
return [
|
|
537
|
-
t.filter(_, S,
|
|
538
|
-
t.filter(_, (
|
|
537
|
+
t.filter(_, S, R),
|
|
538
|
+
t.filter(_, (E) => !S(E), R)
|
|
539
539
|
];
|
|
540
540
|
}
|
|
541
541
|
t.split = g;
|
|
542
|
-
function w(_, S = !1,
|
|
543
|
-
let P =
|
|
544
|
-
P ? P.push(
|
|
542
|
+
function w(_, S = !1, R = [], E) {
|
|
543
|
+
let P = R.slice(), q = _((te) => {
|
|
544
|
+
P ? P.push(te) : Z.fire(te);
|
|
545
545
|
});
|
|
546
|
-
|
|
547
|
-
const
|
|
548
|
-
P?.forEach((
|
|
546
|
+
E && E.add(q);
|
|
547
|
+
const H = () => {
|
|
548
|
+
P?.forEach((te) => Z.fire(te)), P = null;
|
|
549
549
|
}, Z = new pe({
|
|
550
550
|
onWillAddFirstListener() {
|
|
551
|
-
q || (q = _((
|
|
551
|
+
q || (q = _((te) => Z.fire(te)), E && E.add(q));
|
|
552
552
|
},
|
|
553
553
|
onDidAddFirstListener() {
|
|
554
|
-
P && (S ? setTimeout(
|
|
554
|
+
P && (S ? setTimeout(H) : H());
|
|
555
555
|
},
|
|
556
556
|
onDidRemoveLastListener() {
|
|
557
557
|
q && q.dispose(), q = null;
|
|
558
558
|
}
|
|
559
559
|
});
|
|
560
|
-
return
|
|
560
|
+
return E && E.add(Z), Z.event;
|
|
561
561
|
}
|
|
562
562
|
t.buffer = w;
|
|
563
563
|
function y(_, S) {
|
|
564
|
-
return (
|
|
565
|
-
const
|
|
564
|
+
return (E, P, q) => {
|
|
565
|
+
const H = S(new N());
|
|
566
566
|
return _(function(Z) {
|
|
567
|
-
const
|
|
568
|
-
|
|
567
|
+
const te = H.evaluate(Z);
|
|
568
|
+
te !== v && E.call(P, te);
|
|
569
569
|
}, void 0, q);
|
|
570
570
|
};
|
|
571
571
|
}
|
|
@@ -579,60 +579,60 @@ var nn;
|
|
|
579
579
|
return this.steps.push(S), this;
|
|
580
580
|
}
|
|
581
581
|
forEach(S) {
|
|
582
|
-
return this.steps.push((
|
|
582
|
+
return this.steps.push((R) => (S(R), R)), this;
|
|
583
583
|
}
|
|
584
584
|
filter(S) {
|
|
585
|
-
return this.steps.push((
|
|
585
|
+
return this.steps.push((R) => S(R) ? R : v), this;
|
|
586
586
|
}
|
|
587
|
-
reduce(S,
|
|
588
|
-
let
|
|
589
|
-
return this.steps.push((P) => (
|
|
587
|
+
reduce(S, R) {
|
|
588
|
+
let E = R;
|
|
589
|
+
return this.steps.push((P) => (E = S(E, P), E)), this;
|
|
590
590
|
}
|
|
591
|
-
latch(S = (
|
|
592
|
-
let
|
|
591
|
+
latch(S = (R, E) => R === E) {
|
|
592
|
+
let R = !0, E;
|
|
593
593
|
return this.steps.push((P) => {
|
|
594
|
-
const q =
|
|
595
|
-
return
|
|
594
|
+
const q = R || !S(P, E);
|
|
595
|
+
return R = !1, E = P, q ? P : v;
|
|
596
596
|
}), this;
|
|
597
597
|
}
|
|
598
598
|
evaluate(S) {
|
|
599
|
-
for (const
|
|
600
|
-
if (S =
|
|
599
|
+
for (const R of this.steps)
|
|
600
|
+
if (S = R(S), S === v)
|
|
601
601
|
break;
|
|
602
602
|
return S;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function
|
|
606
|
-
const
|
|
607
|
-
return
|
|
605
|
+
function A(_, S, R = (E) => E) {
|
|
606
|
+
const E = (...Z) => H.fire(R(...Z)), P = () => _.on(S, E), q = () => _.removeListener(S, E), H = new pe({ onWillAddFirstListener: P, onDidRemoveLastListener: q });
|
|
607
|
+
return H.event;
|
|
608
608
|
}
|
|
609
|
-
t.fromNodeEventEmitter =
|
|
610
|
-
function F(_, S,
|
|
611
|
-
const
|
|
612
|
-
return
|
|
609
|
+
t.fromNodeEventEmitter = A;
|
|
610
|
+
function F(_, S, R = (E) => E) {
|
|
611
|
+
const E = (...Z) => H.fire(R(...Z)), P = () => _.addEventListener(S, E), q = () => _.removeEventListener(S, E), H = new pe({ onWillAddFirstListener: P, onDidRemoveLastListener: q });
|
|
612
|
+
return H.event;
|
|
613
613
|
}
|
|
614
614
|
t.fromDOMEventEmitter = F;
|
|
615
|
-
function
|
|
616
|
-
let
|
|
617
|
-
const
|
|
618
|
-
const
|
|
619
|
-
|
|
615
|
+
function B(_, S) {
|
|
616
|
+
let R;
|
|
617
|
+
const E = new Promise((P, q) => {
|
|
618
|
+
const H = n(_)(P, null, S);
|
|
619
|
+
R = () => H.dispose();
|
|
620
620
|
});
|
|
621
|
-
return
|
|
621
|
+
return E.cancel = R, E;
|
|
622
622
|
}
|
|
623
|
-
t.toPromise =
|
|
623
|
+
t.toPromise = B;
|
|
624
624
|
function x(_, S) {
|
|
625
|
-
return _((
|
|
625
|
+
return _((R) => S.fire(R));
|
|
626
626
|
}
|
|
627
627
|
t.forward = x;
|
|
628
|
-
function L(_, S,
|
|
629
|
-
return S(
|
|
628
|
+
function L(_, S, R) {
|
|
629
|
+
return S(R), _((E) => S(E));
|
|
630
630
|
}
|
|
631
631
|
t.runAndSubscribe = L;
|
|
632
632
|
class k {
|
|
633
|
-
constructor(S,
|
|
633
|
+
constructor(S, R) {
|
|
634
634
|
this._observable = S, this._counter = 0, this._hasChanged = !1;
|
|
635
|
-
const
|
|
635
|
+
const E = {
|
|
636
636
|
onWillAddFirstListener: () => {
|
|
637
637
|
S.addObserver(this), this._observable.reportChanges();
|
|
638
638
|
},
|
|
@@ -640,14 +640,14 @@ var nn;
|
|
|
640
640
|
S.removeObserver(this);
|
|
641
641
|
}
|
|
642
642
|
};
|
|
643
|
-
this.emitter = new pe(
|
|
643
|
+
this.emitter = new pe(E), R && R.add(this.emitter);
|
|
644
644
|
}
|
|
645
645
|
beginUpdate(S) {
|
|
646
646
|
this._counter++;
|
|
647
647
|
}
|
|
648
648
|
handlePossibleChange(S) {
|
|
649
649
|
}
|
|
650
|
-
handleChange(S,
|
|
650
|
+
handleChange(S, R) {
|
|
651
651
|
this._hasChanged = !0;
|
|
652
652
|
}
|
|
653
653
|
endUpdate(S) {
|
|
@@ -659,14 +659,14 @@ var nn;
|
|
|
659
659
|
}
|
|
660
660
|
t.fromObservable = I;
|
|
661
661
|
function V(_) {
|
|
662
|
-
return (S,
|
|
662
|
+
return (S, R, E) => {
|
|
663
663
|
let P = 0, q = !1;
|
|
664
|
-
const
|
|
664
|
+
const H = {
|
|
665
665
|
beginUpdate() {
|
|
666
666
|
P++;
|
|
667
667
|
},
|
|
668
668
|
endUpdate() {
|
|
669
|
-
P--, P === 0 && (_.reportChanges(), q && (q = !1, S.call(
|
|
669
|
+
P--, P === 0 && (_.reportChanges(), q && (q = !1, S.call(R)));
|
|
670
670
|
},
|
|
671
671
|
handlePossibleChange() {
|
|
672
672
|
},
|
|
@@ -674,13 +674,13 @@ var nn;
|
|
|
674
674
|
q = !0;
|
|
675
675
|
}
|
|
676
676
|
};
|
|
677
|
-
_.addObserver(
|
|
677
|
+
_.addObserver(H), _.reportChanges();
|
|
678
678
|
const Z = {
|
|
679
679
|
dispose() {
|
|
680
|
-
_.removeObserver(
|
|
680
|
+
_.removeObserver(H);
|
|
681
681
|
}
|
|
682
682
|
};
|
|
683
|
-
return
|
|
683
|
+
return E instanceof gt ? E.add(Z) : Array.isArray(E) && E.push(Z), Z;
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
686
|
t.fromObservableLight = V;
|
|
@@ -743,10 +743,10 @@ class kn {
|
|
|
743
743
|
return e;
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
class
|
|
746
|
+
class En {
|
|
747
747
|
static create() {
|
|
748
748
|
const e = new Error();
|
|
749
|
-
return new
|
|
749
|
+
return new En(e.stack ?? "");
|
|
750
750
|
}
|
|
751
751
|
constructor(e) {
|
|
752
752
|
this.value = e;
|
|
@@ -767,7 +767,7 @@ class _i extends Error {
|
|
|
767
767
|
super(e), this.name = "ListenerRefusalError", this.stack = n;
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
|
-
class
|
|
770
|
+
class Ht {
|
|
771
771
|
constructor(e) {
|
|
772
772
|
this.value = e;
|
|
773
773
|
}
|
|
@@ -790,14 +790,14 @@ class pe {
|
|
|
790
790
|
const o = `[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;
|
|
791
791
|
console.warn(o);
|
|
792
792
|
const u = this._leakageMon.getMostFrequentStack() ?? ["UNKNOWN stack", -1], c = new _i(`${o}. HINT: Stack shows most frequent listener (${u[1]}-times)`, u[0]);
|
|
793
|
-
return (this._options?.onListenerError || vt)(c),
|
|
793
|
+
return (this._options?.onListenerError || vt)(c), ht.None;
|
|
794
794
|
}
|
|
795
795
|
if (this._disposed)
|
|
796
|
-
return
|
|
796
|
+
return ht.None;
|
|
797
797
|
n && (e = e.bind(n));
|
|
798
|
-
const s = new
|
|
798
|
+
const s = new Ht(e);
|
|
799
799
|
let i;
|
|
800
|
-
this._leakageMon && this._size >= Math.ceil(this._leakageMon.threshold * 0.2) && (s.stack =
|
|
800
|
+
this._leakageMon && this._size >= Math.ceil(this._leakageMon.threshold * 0.2) && (s.stack = En.create(), i = this._leakageMon.check(s.stack, this._size + 1)), this._listeners ? this._listeners instanceof Ht ? (this._deliveryQueue ??= new vi(), this._listeners = [this._listeners, s]) : this._listeners.push(s) : (this._options?.onWillAddFirstListener?.(this), this._listeners = s, this._options?.onDidAddFirstListener?.(this)), this._options?.onDidAddListener?.(this), this._size++;
|
|
801
801
|
const a = Mt(() => {
|
|
802
802
|
i?.(), this._removeListener(s);
|
|
803
803
|
});
|
|
@@ -849,7 +849,7 @@ class pe {
|
|
|
849
849
|
* subscribers
|
|
850
850
|
*/
|
|
851
851
|
fire(e) {
|
|
852
|
-
if (this._deliveryQueue?.current && (this._deliverQueue(this._deliveryQueue), this._perfMon?.stop()), this._perfMon?.start(this._size), this._listeners) if (this._listeners instanceof
|
|
852
|
+
if (this._deliveryQueue?.current && (this._deliverQueue(this._deliveryQueue), this._perfMon?.stop()), this._perfMon?.start(this._size), this._listeners) if (this._listeners instanceof Ht)
|
|
853
853
|
this._deliver(this._listeners, e);
|
|
854
854
|
else {
|
|
855
855
|
const n = this._deliveryQueue;
|
|
@@ -899,23 +899,23 @@ function ki(t, e) {
|
|
|
899
899
|
}
|
|
900
900
|
return n;
|
|
901
901
|
}
|
|
902
|
-
const
|
|
903
|
-
let rn = !1, sn = !1,
|
|
902
|
+
const je = "en";
|
|
903
|
+
let rn = !1, sn = !1, zt = !1, yt, jt = je, Dn = je, Ei, Le;
|
|
904
904
|
const Fe = globalThis;
|
|
905
|
-
let
|
|
906
|
-
typeof Fe.vscode < "u" && typeof Fe.vscode.process < "u" ?
|
|
907
|
-
const
|
|
908
|
-
if (typeof
|
|
909
|
-
rn =
|
|
910
|
-
const t =
|
|
905
|
+
let ie;
|
|
906
|
+
typeof Fe.vscode < "u" && typeof Fe.vscode.process < "u" ? ie = Fe.vscode.process : typeof process < "u" && typeof process?.versions?.node == "string" && (ie = process);
|
|
907
|
+
const Ci = typeof ie?.versions?.electron == "string", Ai = Ci && ie?.type === "renderer";
|
|
908
|
+
if (typeof ie == "object") {
|
|
909
|
+
rn = ie.platform === "win32", sn = ie.platform === "darwin", zt = ie.platform === "linux", zt && ie.env.SNAP && ie.env.SNAP_REVISION, ie.env.CI || ie.env.BUILD_ARTIFACTSTAGINGDIRECTORY || ie.env.GITHUB_WORKSPACE, yt = je, jt = je;
|
|
910
|
+
const t = ie.env.VSCODE_NLS_CONFIG;
|
|
911
911
|
if (t)
|
|
912
912
|
try {
|
|
913
913
|
const e = JSON.parse(t);
|
|
914
|
-
yt = e.userLocale, Dn = e.osLocale, jt = e.resolvedLanguage ||
|
|
914
|
+
yt = e.userLocale, Dn = e.osLocale, jt = e.resolvedLanguage || je, Ei = e.languagePack?.translationsConfigFile;
|
|
915
915
|
} catch {
|
|
916
916
|
}
|
|
917
|
-
} else typeof navigator == "object" && !
|
|
918
|
-
const
|
|
917
|
+
} else typeof navigator == "object" && !Ai ? (Le = navigator.userAgent, rn = Le.indexOf("Windows") >= 0, sn = Le.indexOf("Macintosh") >= 0, (Le.indexOf("Macintosh") >= 0 || Le.indexOf("iPad") >= 0 || Le.indexOf("iPhone") >= 0) && navigator.maxTouchPoints && navigator.maxTouchPoints > 0, zt = Le.indexOf("Linux") >= 0, Le?.indexOf("Mobi") >= 0, jt = Ts() || je, yt = navigator.language.toLowerCase(), Dn = yt) : console.error("Unable to resolve platform.");
|
|
918
|
+
const ft = rn, Ri = sn, ye = Le, Mi = typeof Fe.postMessage == "function" && !Fe.importScripts;
|
|
919
919
|
(() => {
|
|
920
920
|
if (Mi) {
|
|
921
921
|
const t = [];
|
|
@@ -940,11 +940,11 @@ const ht = rn, Ei = sn, we = _e, Mi = typeof Fe.postMessage == "function" && !Fe
|
|
|
940
940
|
}
|
|
941
941
|
return (t) => setTimeout(t);
|
|
942
942
|
})();
|
|
943
|
-
const Ti = !!(
|
|
944
|
-
|
|
945
|
-
!Ti &&
|
|
946
|
-
|
|
947
|
-
|
|
943
|
+
const Ti = !!(ye && ye.indexOf("Chrome") >= 0);
|
|
944
|
+
ye && ye.indexOf("Firefox") >= 0;
|
|
945
|
+
!Ti && ye && ye.indexOf("Safari") >= 0;
|
|
946
|
+
ye && ye.indexOf("Edg/") >= 0;
|
|
947
|
+
ye && ye.indexOf("Android") >= 0;
|
|
948
948
|
function Pi(t) {
|
|
949
949
|
return t;
|
|
950
950
|
}
|
|
@@ -1000,10 +1000,10 @@ function Ii(t) {
|
|
|
1000
1000
|
function Di(t) {
|
|
1001
1001
|
return t.source === "^" || t.source === "^$" || t.source === "$" || t.source === "^\\s*$" ? !1 : !!(t.exec("") && t.lastIndex === 0);
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1003
|
+
function $i(t) {
|
|
1004
1004
|
return t.split(/\r\n|\r|\n/);
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function Bi(t) {
|
|
1007
1007
|
for (let e = 0, n = t.length; e < n; e++) {
|
|
1008
1008
|
const r = t.charCodeAt(e);
|
|
1009
1009
|
if (r !== 32 && r !== 9)
|
|
@@ -1048,7 +1048,7 @@ function Wi(t) {
|
|
|
1048
1048
|
function Oi(t, e) {
|
|
1049
1049
|
return (t - 55296 << 10) + (e - 56320) + 65536;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function Hi(t, e, n) {
|
|
1052
1052
|
const r = t.charCodeAt(n);
|
|
1053
1053
|
if (on(r) && n + 1 < e) {
|
|
1054
1054
|
const s = t.charCodeAt(n + 1);
|
|
@@ -1057,11 +1057,11 @@ function zi(t, e, n) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
return r;
|
|
1059
1059
|
}
|
|
1060
|
-
const
|
|
1060
|
+
const zi = /^[\t\n\r\x20-\x7E]*$/;
|
|
1061
1061
|
function ji(t) {
|
|
1062
|
-
return
|
|
1062
|
+
return zi.test(t);
|
|
1063
1063
|
}
|
|
1064
|
-
class
|
|
1064
|
+
class Ae {
|
|
1065
1065
|
static {
|
|
1066
1066
|
this.ambiguousCharacterData = new an(() => JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}'));
|
|
1067
1067
|
}
|
|
@@ -1096,17 +1096,17 @@ class Re {
|
|
|
1096
1096
|
o = s(o, f);
|
|
1097
1097
|
}
|
|
1098
1098
|
const u = n(i._common), c = r(u, o);
|
|
1099
|
-
return new
|
|
1099
|
+
return new Ae(c);
|
|
1100
1100
|
});
|
|
1101
1101
|
}
|
|
1102
1102
|
static getInstance(e) {
|
|
1103
|
-
return
|
|
1103
|
+
return Ae.cache.get(Array.from(e));
|
|
1104
1104
|
}
|
|
1105
1105
|
static {
|
|
1106
|
-
this._locales = new an(() => Object.keys(
|
|
1106
|
+
this._locales = new an(() => Object.keys(Ae.ambiguousCharacterData.value).filter((e) => !e.startsWith("_")));
|
|
1107
1107
|
}
|
|
1108
1108
|
static getLocales() {
|
|
1109
|
-
return
|
|
1109
|
+
return Ae._locales.value;
|
|
1110
1110
|
}
|
|
1111
1111
|
constructor(e) {
|
|
1112
1112
|
this.confusableDictionary = e;
|
|
@@ -1143,17 +1143,17 @@ class Ie {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
1145
|
const Gt = "default", Gi = "$initialize";
|
|
1146
|
-
class
|
|
1146
|
+
class Qi {
|
|
1147
1147
|
constructor(e, n, r, s, i) {
|
|
1148
1148
|
this.vsWorker = e, this.req = n, this.channel = r, this.method = s, this.args = i, this.type = 0;
|
|
1149
1149
|
}
|
|
1150
1150
|
}
|
|
1151
|
-
class
|
|
1151
|
+
class $n {
|
|
1152
1152
|
constructor(e, n, r, s) {
|
|
1153
1153
|
this.vsWorker = e, this.seq = n, this.res = r, this.err = s, this.type = 1;
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
|
-
class
|
|
1156
|
+
class Xi {
|
|
1157
1157
|
constructor(e, n, r, s, i) {
|
|
1158
1158
|
this.vsWorker = e, this.req = n, this.channel = r, this.eventName = s, this.arg = i, this.type = 2;
|
|
1159
1159
|
}
|
|
@@ -1181,14 +1181,14 @@ class Yi {
|
|
|
1181
1181
|
this._pendingReplies[s] = {
|
|
1182
1182
|
resolve: i,
|
|
1183
1183
|
reject: a
|
|
1184
|
-
}, this._send(new
|
|
1184
|
+
}, this._send(new Qi(this._workerId, s, e, n, r));
|
|
1185
1185
|
});
|
|
1186
1186
|
}
|
|
1187
1187
|
listen(e, n, r) {
|
|
1188
1188
|
let s = null;
|
|
1189
1189
|
const i = new pe({
|
|
1190
1190
|
onWillAddFirstListener: () => {
|
|
1191
|
-
s = String(++this._lastSentReq), this._pendingEmitters.set(s, i), this._send(new
|
|
1191
|
+
s = String(++this._lastSentReq), this._pendingEmitters.set(s, i), this._send(new Xi(this._workerId, s, e, n, r));
|
|
1192
1192
|
},
|
|
1193
1193
|
onDidRemoveLastListener: () => {
|
|
1194
1194
|
this._pendingEmitters.delete(s), this._send(new Zi(this._workerId, s)), s = null;
|
|
@@ -1239,9 +1239,9 @@ class Yi {
|
|
|
1239
1239
|
_handleRequestMessage(e) {
|
|
1240
1240
|
const n = e.req;
|
|
1241
1241
|
this._handler.handleMessage(e.channel, e.method, e.args).then((s) => {
|
|
1242
|
-
this._send(new
|
|
1242
|
+
this._send(new $n(this._workerId, n, s, void 0));
|
|
1243
1243
|
}, (s) => {
|
|
1244
|
-
s.detail instanceof Error && (s.detail = en(s.detail)), this._send(new
|
|
1244
|
+
s.detail instanceof Error && (s.detail = en(s.detail)), this._send(new $n(this._workerId, n, void 0, en(s)));
|
|
1245
1245
|
});
|
|
1246
1246
|
}
|
|
1247
1247
|
_handleSubscribeEventMessage(e) {
|
|
@@ -1341,11 +1341,11 @@ class Ki {
|
|
|
1341
1341
|
this._protocol.setWorkerId(e);
|
|
1342
1342
|
}
|
|
1343
1343
|
}
|
|
1344
|
-
let
|
|
1344
|
+
let Bn = !1;
|
|
1345
1345
|
function ea(t) {
|
|
1346
|
-
if (
|
|
1346
|
+
if (Bn)
|
|
1347
1347
|
throw new Error("WebWorker already initialized!");
|
|
1348
|
-
|
|
1348
|
+
Bn = !0;
|
|
1349
1349
|
const e = new Ki((n) => globalThis.postMessage(n), (n) => t(n));
|
|
1350
1350
|
return globalThis.onmessage = (n) => {
|
|
1351
1351
|
e.onmessage(n.data);
|
|
@@ -1394,15 +1394,15 @@ class qn {
|
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
1396
|
function na(t, e, n) {
|
|
1397
|
-
return new
|
|
1397
|
+
return new Ce(new qn(t), new qn(e)).ComputeDiff(n).changes;
|
|
1398
1398
|
}
|
|
1399
|
-
class
|
|
1399
|
+
class Ve {
|
|
1400
1400
|
static Assert(e, n) {
|
|
1401
1401
|
if (!e)
|
|
1402
1402
|
throw new Error(n);
|
|
1403
1403
|
}
|
|
1404
1404
|
}
|
|
1405
|
-
class
|
|
1405
|
+
class qe {
|
|
1406
1406
|
/**
|
|
1407
1407
|
* Copies a range of elements from an Array starting at the specified source index and pastes
|
|
1408
1408
|
* them to another Array starting at the specified destination index. The length and the indexes
|
|
@@ -1473,13 +1473,13 @@ class Un {
|
|
|
1473
1473
|
return (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), this.m_changes.reverse(), this.m_changes;
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
|
-
class
|
|
1476
|
+
class Ce {
|
|
1477
1477
|
/**
|
|
1478
1478
|
* Constructs the DiffFinder
|
|
1479
1479
|
*/
|
|
1480
1480
|
constructor(e, n, r = null) {
|
|
1481
1481
|
this.ContinueProcessingPredicate = r, this._originalSequence = e, this._modifiedSequence = n;
|
|
1482
|
-
const [s, i, a] =
|
|
1482
|
+
const [s, i, a] = Ce._getElements(e), [o, u, c] = Ce._getElements(n);
|
|
1483
1483
|
this._hasStrings = a && c, this._originalStringElements = s, this._originalElementsOrHash = i, this._modifiedStringElements = o, this._modifiedElementsOrHash = u, this.m_forwardHistory = [], this.m_reverseHistory = [];
|
|
1484
1484
|
}
|
|
1485
1485
|
static _isStringArray(e) {
|
|
@@ -1487,7 +1487,7 @@ class Ae {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
static _getElements(e) {
|
|
1489
1489
|
const n = e.getElements();
|
|
1490
|
-
if (
|
|
1490
|
+
if (Ce._isStringArray(n)) {
|
|
1491
1491
|
const r = new Int32Array(n.length);
|
|
1492
1492
|
for (let s = 0, i = n.length; s < i; s++)
|
|
1493
1493
|
r[s] = ta(n[s], 0);
|
|
@@ -1501,7 +1501,7 @@ class Ae {
|
|
|
1501
1501
|
ElementsAreStrictEqual(e, n) {
|
|
1502
1502
|
if (!this.ElementsAreEqual(e, n))
|
|
1503
1503
|
return !1;
|
|
1504
|
-
const r =
|
|
1504
|
+
const r = Ce._getStrictElement(this._originalSequence, e), s = Ce._getStrictElement(this._modifiedSequence, n);
|
|
1505
1505
|
return r === s;
|
|
1506
1506
|
}
|
|
1507
1507
|
static _getStrictElement(e, n) {
|
|
@@ -1541,11 +1541,11 @@ class Ae {
|
|
|
1541
1541
|
n--, s--;
|
|
1542
1542
|
if (e > n || r > s) {
|
|
1543
1543
|
let f;
|
|
1544
|
-
return r <= s ? (
|
|
1544
|
+
return r <= s ? (Ve.Assert(e === n + 1, "originalStart should only be one more than originalEnd"), f = [
|
|
1545
1545
|
new Se(e, 0, r, s - r + 1)
|
|
1546
|
-
]) : e <= n ? (
|
|
1546
|
+
]) : e <= n ? (Ve.Assert(r === s + 1, "modifiedStart should only be one more than modifiedEnd"), f = [
|
|
1547
1547
|
new Se(e, n - e + 1, r, 0)
|
|
1548
|
-
]) : (
|
|
1548
|
+
]) : (Ve.Assert(e === n + 1, "originalStart should only be one more than originalEnd"), Ve.Assert(r === s + 1, "modifiedStart should only be one more than modifiedEnd"), f = []), f;
|
|
1549
1549
|
}
|
|
1550
1550
|
const a = [0], o = [0], u = this.ComputeRecursionPoint(e, n, r, s, a, o, i), c = a[0], h = o[0];
|
|
1551
1551
|
if (u !== null)
|
|
@@ -1562,10 +1562,10 @@ class Ae {
|
|
|
1562
1562
|
];
|
|
1563
1563
|
}
|
|
1564
1564
|
WALKTRACE(e, n, r, s, i, a, o, u, c, h, f, m, p, d, g, w, y, v) {
|
|
1565
|
-
let N = null,
|
|
1565
|
+
let N = null, A = null, F = new Un(), B = n, x = r, L = p[0] - w[0] - s, k = -1073741824, I = this.m_forwardHistory.length - 1;
|
|
1566
1566
|
do {
|
|
1567
1567
|
const V = L + e;
|
|
1568
|
-
V ===
|
|
1568
|
+
V === B || V < x && c[V - 1] < c[V + 1] ? (f = c[V + 1], d = f - L - s, f < k && F.MarkNextChange(), k = f, F.AddModifiedElement(f + 1, d), L = V + 1 - e) : (f = c[V - 1] + 1, d = f - L - s, f < k && F.MarkNextChange(), k = f - 1, F.AddOriginalElement(f, d + 1), L = V - 1 - e), I >= 0 && (c = this.m_forwardHistory[I], e = c[0], B = 1, x = c.length - 1);
|
|
1569
1569
|
} while (--I >= -1);
|
|
1570
1570
|
if (N = F.getReverseChanges(), v[0]) {
|
|
1571
1571
|
let V = p[0] + 1, _ = w[0] + 1;
|
|
@@ -1573,18 +1573,18 @@ class Ae {
|
|
|
1573
1573
|
const S = N[N.length - 1];
|
|
1574
1574
|
V = Math.max(V, S.getOriginalEnd()), _ = Math.max(_, S.getModifiedEnd());
|
|
1575
1575
|
}
|
|
1576
|
-
|
|
1576
|
+
A = [
|
|
1577
1577
|
new Se(V, m - V + 1, _, g - _ + 1)
|
|
1578
1578
|
];
|
|
1579
1579
|
} else {
|
|
1580
|
-
F = new Un(),
|
|
1580
|
+
F = new Un(), B = a, x = o, L = p[0] - w[0] - u, k = 1073741824, I = y ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2;
|
|
1581
1581
|
do {
|
|
1582
1582
|
const V = L + i;
|
|
1583
|
-
V ===
|
|
1583
|
+
V === B || V < x && h[V - 1] >= h[V + 1] ? (f = h[V + 1] - 1, d = f - L - u, f > k && F.MarkNextChange(), k = f + 1, F.AddOriginalElement(f + 1, d + 1), L = V + 1 - i) : (f = h[V - 1], d = f - L - u, f > k && F.MarkNextChange(), k = f, F.AddModifiedElement(f + 1, d + 1), L = V - 1 - i), I >= 0 && (h = this.m_reverseHistory[I], i = h[0], B = 1, x = h.length - 1);
|
|
1584
1584
|
} while (--I >= -1);
|
|
1585
|
-
|
|
1585
|
+
A = F.getChanges();
|
|
1586
1586
|
}
|
|
1587
|
-
return this.ConcatenateChanges(N,
|
|
1587
|
+
return this.ConcatenateChanges(N, A);
|
|
1588
1588
|
}
|
|
1589
1589
|
/**
|
|
1590
1590
|
* Given the range to compute the diff on, this method finds the point:
|
|
@@ -1605,22 +1605,22 @@ class Ae {
|
|
|
1605
1605
|
ComputeRecursionPoint(e, n, r, s, i, a, o) {
|
|
1606
1606
|
let u = 0, c = 0, h = 0, f = 0, m = 0, p = 0;
|
|
1607
1607
|
e--, r--, i[0] = 0, a[0] = 0, this.m_forwardHistory = [], this.m_reverseHistory = [];
|
|
1608
|
-
const d = n - e + (s - r), g = d + 1, w = new Int32Array(g), y = new Int32Array(g), v = s - r, N = n - e,
|
|
1608
|
+
const d = n - e + (s - r), g = d + 1, w = new Int32Array(g), y = new Int32Array(g), v = s - r, N = n - e, A = e - r, F = n - s, x = (N - v) % 2 === 0;
|
|
1609
1609
|
w[v] = e, y[N] = n, o[0] = !1;
|
|
1610
1610
|
for (let L = 1; L <= d / 2 + 1; L++) {
|
|
1611
1611
|
let k = 0, I = 0;
|
|
1612
1612
|
h = this.ClipDiagonalBound(v - L, L, v, g), f = this.ClipDiagonalBound(v + L, L, v, g);
|
|
1613
1613
|
for (let _ = h; _ <= f; _ += 2) {
|
|
1614
|
-
_ === h || _ < f && w[_ - 1] < w[_ + 1] ? u = w[_ + 1] : u = w[_ - 1] + 1, c = u - (_ - v) -
|
|
1614
|
+
_ === h || _ < f && w[_ - 1] < w[_ + 1] ? u = w[_ + 1] : u = w[_ - 1] + 1, c = u - (_ - v) - A;
|
|
1615
1615
|
const S = u;
|
|
1616
1616
|
for (; u < n && c < s && this.ElementsAreEqual(u + 1, c + 1); )
|
|
1617
1617
|
u++, c++;
|
|
1618
1618
|
if (w[_] = u, u + c > k + I && (k = u, I = c), !x && Math.abs(_ - N) <= L - 1 && u >= y[_])
|
|
1619
|
-
return i[0] = u, a[0] = c, S <= y[_] && L <= 1448 ? this.WALKTRACE(v, h, f,
|
|
1619
|
+
return i[0] = u, a[0] = c, S <= y[_] && L <= 1448 ? this.WALKTRACE(v, h, f, A, N, m, p, F, w, y, u, n, i, c, s, a, x, o) : null;
|
|
1620
1620
|
}
|
|
1621
1621
|
const V = (k - e + (I - r) - L) / 2;
|
|
1622
1622
|
if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(k, V))
|
|
1623
|
-
return o[0] = !0, i[0] = k, a[0] = I, V > 0 && L <= 1448 ? this.WALKTRACE(v, h, f,
|
|
1623
|
+
return o[0] = !0, i[0] = k, a[0] = I, V > 0 && L <= 1448 ? this.WALKTRACE(v, h, f, A, N, m, p, F, w, y, u, n, i, c, s, a, x, o) : (e++, r++, [
|
|
1624
1624
|
new Se(e, n - e + 1, r, s - r + 1)
|
|
1625
1625
|
]);
|
|
1626
1626
|
m = this.ClipDiagonalBound(N - L, L, N, g), p = this.ClipDiagonalBound(N + L, L, N, g);
|
|
@@ -1630,14 +1630,14 @@ class Ae {
|
|
|
1630
1630
|
for (; u > e && c > r && this.ElementsAreEqual(u, c); )
|
|
1631
1631
|
u--, c--;
|
|
1632
1632
|
if (y[_] = u, x && Math.abs(_ - v) <= L && u <= w[_])
|
|
1633
|
-
return i[0] = u, a[0] = c, S >= w[_] && L <= 1448 ? this.WALKTRACE(v, h, f,
|
|
1633
|
+
return i[0] = u, a[0] = c, S >= w[_] && L <= 1448 ? this.WALKTRACE(v, h, f, A, N, m, p, F, w, y, u, n, i, c, s, a, x, o) : null;
|
|
1634
1634
|
}
|
|
1635
1635
|
if (L <= 1447) {
|
|
1636
1636
|
let _ = new Int32Array(f - h + 2);
|
|
1637
|
-
_[0] = v - h + 1,
|
|
1637
|
+
_[0] = v - h + 1, qe.Copy2(w, h, _, 1, f - h + 1), this.m_forwardHistory.push(_), _ = new Int32Array(p - m + 2), _[0] = N - m + 1, qe.Copy2(y, m, _, 1, p - m + 1), this.m_reverseHistory.push(_);
|
|
1638
1638
|
}
|
|
1639
1639
|
}
|
|
1640
|
-
return this.WALKTRACE(v, h, f,
|
|
1640
|
+
return this.WALKTRACE(v, h, f, A, N, m, p, F, w, y, u, n, i, c, s, a, x, o);
|
|
1641
1641
|
}
|
|
1642
1642
|
/**
|
|
1643
1643
|
* Shifts the given changes to provide a more intuitive diff.
|
|
@@ -1762,10 +1762,10 @@ class Ae {
|
|
|
1762
1762
|
return n.length > 0 ? n : e;
|
|
1763
1763
|
if (this.ChangesOverlap(e[e.length - 1], n[0], r)) {
|
|
1764
1764
|
const s = new Array(e.length + n.length - 1);
|
|
1765
|
-
return
|
|
1765
|
+
return qe.Copy(e, 0, s, 0, e.length - 1), s[e.length - 1] = r[0], qe.Copy(n, 1, s, e.length, n.length - 1), s;
|
|
1766
1766
|
} else {
|
|
1767
1767
|
const s = new Array(e.length + n.length);
|
|
1768
|
-
return
|
|
1768
|
+
return qe.Copy(e, 0, s, 0, e.length), qe.Copy(n, 0, s, e.length, n.length), s;
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
1771
|
/**
|
|
@@ -1777,7 +1777,7 @@ class Ae {
|
|
|
1777
1777
|
* @returns True if the two changes overlap
|
|
1778
1778
|
*/
|
|
1779
1779
|
ChangesOverlap(e, n, r) {
|
|
1780
|
-
if (
|
|
1780
|
+
if (Ve.Assert(e.originalStart <= n.originalStart, "Left change is not less than or equal to right change"), Ve.Assert(e.modifiedStart <= n.modifiedStart, "Left change is not less than or equal to right change"), e.originalStart + e.originalLength >= n.originalStart || e.modifiedStart + e.modifiedLength >= n.modifiedStart) {
|
|
1781
1781
|
const s = e.originalStart;
|
|
1782
1782
|
let i = e.originalLength;
|
|
1783
1783
|
const a = e.modifiedStart;
|
|
@@ -1811,7 +1811,7 @@ class Ae {
|
|
|
1811
1811
|
}
|
|
1812
1812
|
}
|
|
1813
1813
|
}
|
|
1814
|
-
class
|
|
1814
|
+
class O {
|
|
1815
1815
|
constructor(e, n) {
|
|
1816
1816
|
this.lineNumber = e, this.column = n;
|
|
1817
1817
|
}
|
|
@@ -1822,7 +1822,7 @@ class W {
|
|
|
1822
1822
|
* @param newColumn new column
|
|
1823
1823
|
*/
|
|
1824
1824
|
with(e = this.lineNumber, n = this.column) {
|
|
1825
|
-
return e === this.lineNumber && n === this.column ? this : new
|
|
1825
|
+
return e === this.lineNumber && n === this.column ? this : new O(e, n);
|
|
1826
1826
|
}
|
|
1827
1827
|
/**
|
|
1828
1828
|
* Derive a new position from this position.
|
|
@@ -1837,7 +1837,7 @@ class W {
|
|
|
1837
1837
|
* Test if this position equals other position
|
|
1838
1838
|
*/
|
|
1839
1839
|
equals(e) {
|
|
1840
|
-
return
|
|
1840
|
+
return O.equals(this, e);
|
|
1841
1841
|
}
|
|
1842
1842
|
/**
|
|
1843
1843
|
* Test if position `a` equals position `b`
|
|
@@ -1850,7 +1850,7 @@ class W {
|
|
|
1850
1850
|
* If the two positions are equal, the result will be false.
|
|
1851
1851
|
*/
|
|
1852
1852
|
isBefore(e) {
|
|
1853
|
-
return
|
|
1853
|
+
return O.isBefore(this, e);
|
|
1854
1854
|
}
|
|
1855
1855
|
/**
|
|
1856
1856
|
* Test if position `a` is before position `b`.
|
|
@@ -1864,7 +1864,7 @@ class W {
|
|
|
1864
1864
|
* If the two positions are equal, the result will be true.
|
|
1865
1865
|
*/
|
|
1866
1866
|
isBeforeOrEqual(e) {
|
|
1867
|
-
return
|
|
1867
|
+
return O.isBeforeOrEqual(this, e);
|
|
1868
1868
|
}
|
|
1869
1869
|
/**
|
|
1870
1870
|
* Test if position `a` is before position `b`.
|
|
@@ -1888,7 +1888,7 @@ class W {
|
|
|
1888
1888
|
* Clone this position.
|
|
1889
1889
|
*/
|
|
1890
1890
|
clone() {
|
|
1891
|
-
return new
|
|
1891
|
+
return new O(this.lineNumber, this.column);
|
|
1892
1892
|
}
|
|
1893
1893
|
/**
|
|
1894
1894
|
* Convert to a human-readable representation.
|
|
@@ -1901,7 +1901,7 @@ class W {
|
|
|
1901
1901
|
* Create a `Position` from an `IPosition`.
|
|
1902
1902
|
*/
|
|
1903
1903
|
static lift(e) {
|
|
1904
|
-
return new
|
|
1904
|
+
return new O(e.lineNumber, e.column);
|
|
1905
1905
|
}
|
|
1906
1906
|
/**
|
|
1907
1907
|
* Test if `obj` is an `IPosition`.
|
|
@@ -1916,7 +1916,7 @@ class W {
|
|
|
1916
1916
|
};
|
|
1917
1917
|
}
|
|
1918
1918
|
}
|
|
1919
|
-
class
|
|
1919
|
+
class C {
|
|
1920
1920
|
constructor(e, n, r, s) {
|
|
1921
1921
|
e > r || e === r && n > s ? (this.startLineNumber = r, this.startColumn = s, this.endLineNumber = e, this.endColumn = n) : (this.startLineNumber = e, this.startColumn = n, this.endLineNumber = r, this.endColumn = s);
|
|
1922
1922
|
}
|
|
@@ -1924,7 +1924,7 @@ class A {
|
|
|
1924
1924
|
* Test if this range is empty.
|
|
1925
1925
|
*/
|
|
1926
1926
|
isEmpty() {
|
|
1927
|
-
return
|
|
1927
|
+
return C.isEmpty(this);
|
|
1928
1928
|
}
|
|
1929
1929
|
/**
|
|
1930
1930
|
* Test if `range` is empty.
|
|
@@ -1936,7 +1936,7 @@ class A {
|
|
|
1936
1936
|
* Test if position is in this range. If the position is at the edges, will return true.
|
|
1937
1937
|
*/
|
|
1938
1938
|
containsPosition(e) {
|
|
1939
|
-
return
|
|
1939
|
+
return C.containsPosition(this, e);
|
|
1940
1940
|
}
|
|
1941
1941
|
/**
|
|
1942
1942
|
* Test if `position` is in `range`. If the position is at the edges, will return true.
|
|
@@ -1955,7 +1955,7 @@ class A {
|
|
|
1955
1955
|
* Test if range is in this range. If the range is equal to this range, will return true.
|
|
1956
1956
|
*/
|
|
1957
1957
|
containsRange(e) {
|
|
1958
|
-
return
|
|
1958
|
+
return C.containsRange(this, e);
|
|
1959
1959
|
}
|
|
1960
1960
|
/**
|
|
1961
1961
|
* Test if `otherRange` is in `range`. If the ranges are equal, will return true.
|
|
@@ -1967,7 +1967,7 @@ class A {
|
|
|
1967
1967
|
* Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true.
|
|
1968
1968
|
*/
|
|
1969
1969
|
strictContainsRange(e) {
|
|
1970
|
-
return
|
|
1970
|
+
return C.strictContainsRange(this, e);
|
|
1971
1971
|
}
|
|
1972
1972
|
/**
|
|
1973
1973
|
* Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false.
|
|
@@ -1980,7 +1980,7 @@ class A {
|
|
|
1980
1980
|
* The smallest position will be used as the start point, and the largest one as the end point.
|
|
1981
1981
|
*/
|
|
1982
1982
|
plusRange(e) {
|
|
1983
|
-
return
|
|
1983
|
+
return C.plusRange(this, e);
|
|
1984
1984
|
}
|
|
1985
1985
|
/**
|
|
1986
1986
|
* A reunion of the two ranges.
|
|
@@ -1988,13 +1988,13 @@ class A {
|
|
|
1988
1988
|
*/
|
|
1989
1989
|
static plusRange(e, n) {
|
|
1990
1990
|
let r, s, i, a;
|
|
1991
|
-
return n.startLineNumber < e.startLineNumber ? (r = n.startLineNumber, s = n.startColumn) : n.startLineNumber === e.startLineNumber ? (r = n.startLineNumber, s = Math.min(n.startColumn, e.startColumn)) : (r = e.startLineNumber, s = e.startColumn), n.endLineNumber > e.endLineNumber ? (i = n.endLineNumber, a = n.endColumn) : n.endLineNumber === e.endLineNumber ? (i = n.endLineNumber, a = Math.max(n.endColumn, e.endColumn)) : (i = e.endLineNumber, a = e.endColumn), new
|
|
1991
|
+
return n.startLineNumber < e.startLineNumber ? (r = n.startLineNumber, s = n.startColumn) : n.startLineNumber === e.startLineNumber ? (r = n.startLineNumber, s = Math.min(n.startColumn, e.startColumn)) : (r = e.startLineNumber, s = e.startColumn), n.endLineNumber > e.endLineNumber ? (i = n.endLineNumber, a = n.endColumn) : n.endLineNumber === e.endLineNumber ? (i = n.endLineNumber, a = Math.max(n.endColumn, e.endColumn)) : (i = e.endLineNumber, a = e.endColumn), new C(r, s, i, a);
|
|
1992
1992
|
}
|
|
1993
1993
|
/**
|
|
1994
1994
|
* A intersection of the two ranges.
|
|
1995
1995
|
*/
|
|
1996
1996
|
intersectRanges(e) {
|
|
1997
|
-
return
|
|
1997
|
+
return C.intersectRanges(this, e);
|
|
1998
1998
|
}
|
|
1999
1999
|
/**
|
|
2000
2000
|
* A intersection of the two ranges.
|
|
@@ -2002,13 +2002,13 @@ class A {
|
|
|
2002
2002
|
static intersectRanges(e, n) {
|
|
2003
2003
|
let r = e.startLineNumber, s = e.startColumn, i = e.endLineNumber, a = e.endColumn;
|
|
2004
2004
|
const o = n.startLineNumber, u = n.startColumn, c = n.endLineNumber, h = n.endColumn;
|
|
2005
|
-
return r < o ? (r = o, s = u) : r === o && (s = Math.max(s, u)), i > c ? (i = c, a = h) : i === c && (a = Math.min(a, h)), r > i || r === i && s > a ? null : new
|
|
2005
|
+
return r < o ? (r = o, s = u) : r === o && (s = Math.max(s, u)), i > c ? (i = c, a = h) : i === c && (a = Math.min(a, h)), r > i || r === i && s > a ? null : new C(r, s, i, a);
|
|
2006
2006
|
}
|
|
2007
2007
|
/**
|
|
2008
2008
|
* Test if this range equals other.
|
|
2009
2009
|
*/
|
|
2010
2010
|
equalsRange(e) {
|
|
2011
|
-
return
|
|
2011
|
+
return C.equalsRange(this, e);
|
|
2012
2012
|
}
|
|
2013
2013
|
/**
|
|
2014
2014
|
* Test if range `a` equals `b`.
|
|
@@ -2020,25 +2020,25 @@ class A {
|
|
|
2020
2020
|
* Return the end position (which will be after or equal to the start position)
|
|
2021
2021
|
*/
|
|
2022
2022
|
getEndPosition() {
|
|
2023
|
-
return
|
|
2023
|
+
return C.getEndPosition(this);
|
|
2024
2024
|
}
|
|
2025
2025
|
/**
|
|
2026
2026
|
* Return the end position (which will be after or equal to the start position)
|
|
2027
2027
|
*/
|
|
2028
2028
|
static getEndPosition(e) {
|
|
2029
|
-
return new
|
|
2029
|
+
return new O(e.endLineNumber, e.endColumn);
|
|
2030
2030
|
}
|
|
2031
2031
|
/**
|
|
2032
2032
|
* Return the start position (which will be before or equal to the end position)
|
|
2033
2033
|
*/
|
|
2034
2034
|
getStartPosition() {
|
|
2035
|
-
return
|
|
2035
|
+
return C.getStartPosition(this);
|
|
2036
2036
|
}
|
|
2037
2037
|
/**
|
|
2038
2038
|
* Return the start position (which will be before or equal to the end position)
|
|
2039
2039
|
*/
|
|
2040
2040
|
static getStartPosition(e) {
|
|
2041
|
-
return new
|
|
2041
|
+
return new O(e.startLineNumber, e.startColumn);
|
|
2042
2042
|
}
|
|
2043
2043
|
/**
|
|
2044
2044
|
* Transform to a user presentable string representation.
|
|
@@ -2050,53 +2050,53 @@ class A {
|
|
|
2050
2050
|
* Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.
|
|
2051
2051
|
*/
|
|
2052
2052
|
setEndPosition(e, n) {
|
|
2053
|
-
return new
|
|
2053
|
+
return new C(this.startLineNumber, this.startColumn, e, n);
|
|
2054
2054
|
}
|
|
2055
2055
|
/**
|
|
2056
2056
|
* Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.
|
|
2057
2057
|
*/
|
|
2058
2058
|
setStartPosition(e, n) {
|
|
2059
|
-
return new
|
|
2059
|
+
return new C(e, n, this.endLineNumber, this.endColumn);
|
|
2060
2060
|
}
|
|
2061
2061
|
/**
|
|
2062
2062
|
* Create a new empty range using this range's start position.
|
|
2063
2063
|
*/
|
|
2064
2064
|
collapseToStart() {
|
|
2065
|
-
return
|
|
2065
|
+
return C.collapseToStart(this);
|
|
2066
2066
|
}
|
|
2067
2067
|
/**
|
|
2068
2068
|
* Create a new empty range using this range's start position.
|
|
2069
2069
|
*/
|
|
2070
2070
|
static collapseToStart(e) {
|
|
2071
|
-
return new
|
|
2071
|
+
return new C(e.startLineNumber, e.startColumn, e.startLineNumber, e.startColumn);
|
|
2072
2072
|
}
|
|
2073
2073
|
/**
|
|
2074
2074
|
* Create a new empty range using this range's end position.
|
|
2075
2075
|
*/
|
|
2076
2076
|
collapseToEnd() {
|
|
2077
|
-
return
|
|
2077
|
+
return C.collapseToEnd(this);
|
|
2078
2078
|
}
|
|
2079
2079
|
/**
|
|
2080
2080
|
* Create a new empty range using this range's end position.
|
|
2081
2081
|
*/
|
|
2082
2082
|
static collapseToEnd(e) {
|
|
2083
|
-
return new
|
|
2083
|
+
return new C(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn);
|
|
2084
2084
|
}
|
|
2085
2085
|
/**
|
|
2086
2086
|
* Moves the range by the given amount of lines.
|
|
2087
2087
|
*/
|
|
2088
2088
|
delta(e) {
|
|
2089
|
-
return new
|
|
2089
|
+
return new C(this.startLineNumber + e, this.startColumn, this.endLineNumber + e, this.endColumn);
|
|
2090
2090
|
}
|
|
2091
2091
|
isSingleLine() {
|
|
2092
2092
|
return this.startLineNumber === this.endLineNumber;
|
|
2093
2093
|
}
|
|
2094
2094
|
// ---
|
|
2095
2095
|
static fromPositions(e, n = e) {
|
|
2096
|
-
return new
|
|
2096
|
+
return new C(e.lineNumber, e.column, n.lineNumber, n.column);
|
|
2097
2097
|
}
|
|
2098
2098
|
static lift(e) {
|
|
2099
|
-
return e ? new
|
|
2099
|
+
return e ? new C(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn) : null;
|
|
2100
2100
|
}
|
|
2101
2101
|
/**
|
|
2102
2102
|
* Test if `obj` is an `IRange`.
|
|
@@ -2165,13 +2165,13 @@ class A {
|
|
|
2165
2165
|
function Wn(t) {
|
|
2166
2166
|
return t < 0 ? 0 : t > 255 ? 255 : t | 0;
|
|
2167
2167
|
}
|
|
2168
|
-
function
|
|
2168
|
+
function Ue(t) {
|
|
2169
2169
|
return t < 0 ? 0 : t > 4294967295 ? 4294967295 : t | 0;
|
|
2170
2170
|
}
|
|
2171
|
-
class
|
|
2171
|
+
class Cn {
|
|
2172
2172
|
constructor(e) {
|
|
2173
2173
|
const n = Wn(e);
|
|
2174
|
-
this._defaultValue = n, this._asciiMap =
|
|
2174
|
+
this._defaultValue = n, this._asciiMap = Cn._createAsciiMap(n), this._map = /* @__PURE__ */ new Map();
|
|
2175
2175
|
}
|
|
2176
2176
|
static _createAsciiMap(e) {
|
|
2177
2177
|
const n = new Uint8Array(256);
|
|
@@ -2226,9 +2226,9 @@ class sa {
|
|
|
2226
2226
|
return n < 0 || n >= this._maxCharCode ? 0 : this._states.get(e, n);
|
|
2227
2227
|
}
|
|
2228
2228
|
}
|
|
2229
|
-
let
|
|
2229
|
+
let Qt = null;
|
|
2230
2230
|
function ia() {
|
|
2231
|
-
return
|
|
2231
|
+
return Qt === null && (Qt = new sa([
|
|
2232
2232
|
[
|
|
2233
2233
|
1,
|
|
2234
2234
|
104,
|
|
@@ -2361,31 +2361,31 @@ function ia() {
|
|
|
2361
2361
|
12
|
|
2362
2362
|
/* State.End */
|
|
2363
2363
|
]
|
|
2364
|
-
])),
|
|
2364
|
+
])), Qt;
|
|
2365
2365
|
}
|
|
2366
|
-
let
|
|
2366
|
+
let nt = null;
|
|
2367
2367
|
function aa() {
|
|
2368
|
-
if (
|
|
2369
|
-
|
|
2368
|
+
if (nt === null) {
|
|
2369
|
+
nt = new Cn(
|
|
2370
2370
|
0
|
|
2371
2371
|
/* CharacterClass.None */
|
|
2372
2372
|
);
|
|
2373
2373
|
const t = ` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…|`;
|
|
2374
2374
|
for (let n = 0; n < t.length; n++)
|
|
2375
|
-
|
|
2375
|
+
nt.set(
|
|
2376
2376
|
t.charCodeAt(n),
|
|
2377
2377
|
1
|
|
2378
2378
|
/* CharacterClass.ForceTermination */
|
|
2379
2379
|
);
|
|
2380
2380
|
const e = ".,;:";
|
|
2381
2381
|
for (let n = 0; n < e.length; n++)
|
|
2382
|
-
|
|
2382
|
+
nt.set(
|
|
2383
2383
|
e.charCodeAt(n),
|
|
2384
2384
|
2
|
|
2385
2385
|
/* CharacterClass.CannotEndIn */
|
|
2386
2386
|
);
|
|
2387
2387
|
}
|
|
2388
|
-
return
|
|
2388
|
+
return nt;
|
|
2389
2389
|
}
|
|
2390
2390
|
class Pt {
|
|
2391
2391
|
static _createLink(e, n, r, s, i) {
|
|
@@ -2471,7 +2471,7 @@ class Pt {
|
|
|
2471
2471
|
function oa(t) {
|
|
2472
2472
|
return !t || typeof t.getLineCount != "function" || typeof t.getLineContent != "function" ? [] : Pt.computeLinks(t);
|
|
2473
2473
|
}
|
|
2474
|
-
class
|
|
2474
|
+
class An {
|
|
2475
2475
|
constructor() {
|
|
2476
2476
|
this._defaultValueSet = [
|
|
2477
2477
|
["true", "false"],
|
|
@@ -2481,7 +2481,7 @@ class Rn {
|
|
|
2481
2481
|
];
|
|
2482
2482
|
}
|
|
2483
2483
|
static {
|
|
2484
|
-
this.INSTANCE = new
|
|
2484
|
+
this.INSTANCE = new An();
|
|
2485
2485
|
}
|
|
2486
2486
|
navigateValueSet(e, n, r, s, i) {
|
|
2487
2487
|
if (e && n) {
|
|
@@ -2576,7 +2576,7 @@ class la {
|
|
|
2576
2576
|
e && this.cancel(), this._parentListener?.dispose(), this._token ? this._token instanceof Nt && this._token.dispose() : this._token = Ft.None;
|
|
2577
2577
|
}
|
|
2578
2578
|
}
|
|
2579
|
-
class
|
|
2579
|
+
class Rn {
|
|
2580
2580
|
constructor() {
|
|
2581
2581
|
this._keyCodeToStr = [], this._strToKeyCode = /* @__PURE__ */ Object.create(null);
|
|
2582
2582
|
}
|
|
@@ -2590,7 +2590,7 @@ class En {
|
|
|
2590
2590
|
return this._strToKeyCode[e.toLowerCase()] || 0;
|
|
2591
2591
|
}
|
|
2592
2592
|
}
|
|
2593
|
-
const St = new
|
|
2593
|
+
const St = new Rn(), ln = new Rn(), un = new Rn(), ua = new Array(230), ca = /* @__PURE__ */ Object.create(null), ha = /* @__PURE__ */ Object.create(null);
|
|
2594
2594
|
(function() {
|
|
2595
2595
|
const e = [
|
|
2596
2596
|
// immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel
|
|
@@ -2880,11 +2880,11 @@ function fa(t, e) {
|
|
|
2880
2880
|
const n = (e & 65535) << 16 >>> 0;
|
|
2881
2881
|
return (t | n) >>> 0;
|
|
2882
2882
|
}
|
|
2883
|
-
let
|
|
2884
|
-
const
|
|
2885
|
-
if (typeof
|
|
2886
|
-
const t =
|
|
2887
|
-
|
|
2883
|
+
let Qe;
|
|
2884
|
+
const Xt = globalThis.vscode;
|
|
2885
|
+
if (typeof Xt < "u" && typeof Xt.process < "u") {
|
|
2886
|
+
const t = Xt.process;
|
|
2887
|
+
Qe = {
|
|
2888
2888
|
get platform() {
|
|
2889
2889
|
return t.platform;
|
|
2890
2890
|
},
|
|
@@ -2898,7 +2898,7 @@ if (typeof Qt < "u" && typeof Qt.process < "u") {
|
|
|
2898
2898
|
return t.cwd();
|
|
2899
2899
|
}
|
|
2900
2900
|
};
|
|
2901
|
-
} else typeof process < "u" && typeof process?.versions?.node == "string" ?
|
|
2901
|
+
} else typeof process < "u" && typeof process?.versions?.node == "string" ? Qe = {
|
|
2902
2902
|
get platform() {
|
|
2903
2903
|
return process.platform;
|
|
2904
2904
|
},
|
|
@@ -2911,10 +2911,10 @@ if (typeof Qt < "u" && typeof Qt.process < "u") {
|
|
|
2911
2911
|
cwd() {
|
|
2912
2912
|
return process.env.VSCODE_CWD || process.cwd();
|
|
2913
2913
|
}
|
|
2914
|
-
} :
|
|
2914
|
+
} : Qe = {
|
|
2915
2915
|
// Supported
|
|
2916
2916
|
get platform() {
|
|
2917
|
-
return
|
|
2917
|
+
return ft ? "win32" : Ri ? "darwin" : "linux";
|
|
2918
2918
|
},
|
|
2919
2919
|
get arch() {
|
|
2920
2920
|
},
|
|
@@ -2926,8 +2926,8 @@ if (typeof Qt < "u" && typeof Qt.process < "u") {
|
|
|
2926
2926
|
return "/";
|
|
2927
2927
|
}
|
|
2928
2928
|
};
|
|
2929
|
-
const It =
|
|
2930
|
-
class
|
|
2929
|
+
const It = Qe.cwd, ma = Qe.env, da = Qe.platform, ga = 65, pa = 97, ba = 90, wa = 122, De = 46, Y = 47, se = 92, xe = 58, ya = 63;
|
|
2930
|
+
class $s extends Error {
|
|
2931
2931
|
constructor(e, n, r) {
|
|
2932
2932
|
let s;
|
|
2933
2933
|
typeof n == "string" && n.indexOf("not ") === 0 ? (s = "must not be", n = n.replace(/^not /, "")) : s = "must be";
|
|
@@ -2938,20 +2938,20 @@ class Bs extends Error {
|
|
|
2938
2938
|
}
|
|
2939
2939
|
function xa(t, e) {
|
|
2940
2940
|
if (t === null || typeof t != "object")
|
|
2941
|
-
throw new
|
|
2941
|
+
throw new $s(e, "Object", t);
|
|
2942
2942
|
}
|
|
2943
2943
|
function J(t, e) {
|
|
2944
2944
|
if (typeof t != "string")
|
|
2945
|
-
throw new
|
|
2945
|
+
throw new $s(e, "string", t);
|
|
2946
2946
|
}
|
|
2947
2947
|
const Me = da === "win32";
|
|
2948
|
-
function
|
|
2949
|
-
return t === Y || t ===
|
|
2948
|
+
function $(t) {
|
|
2949
|
+
return t === Y || t === se;
|
|
2950
2950
|
}
|
|
2951
2951
|
function cn(t) {
|
|
2952
2952
|
return t === Y;
|
|
2953
2953
|
}
|
|
2954
|
-
function
|
|
2954
|
+
function _e(t) {
|
|
2955
2955
|
return t >= ga && t <= ba || t >= pa && t <= wa;
|
|
2956
2956
|
}
|
|
2957
2957
|
function Dt(t, e, n, r) {
|
|
@@ -2987,12 +2987,12 @@ function Dt(t, e, n, r) {
|
|
|
2987
2987
|
function _a(t) {
|
|
2988
2988
|
return t ? `${t[0] === "." ? "" : "."}${t}` : "";
|
|
2989
2989
|
}
|
|
2990
|
-
function
|
|
2990
|
+
function Bs(t, e) {
|
|
2991
2991
|
xa(e, "pathObject");
|
|
2992
2992
|
const n = e.dir || e.root, r = e.base || `${e.name || ""}${_a(e.ext)}`;
|
|
2993
2993
|
return n ? n === e.root ? `${n}${r}` : `${n}${t}${r}` : r;
|
|
2994
2994
|
}
|
|
2995
|
-
const
|
|
2995
|
+
const ne = {
|
|
2996
2996
|
// path.resolve([from ...], to)
|
|
2997
2997
|
resolve(...t) {
|
|
2998
2998
|
let e = "", n = "", r = !1;
|
|
@@ -3001,30 +3001,30 @@ const te = {
|
|
|
3001
3001
|
if (s >= 0) {
|
|
3002
3002
|
if (i = t[s], J(i, `paths[${s}]`), i.length === 0)
|
|
3003
3003
|
continue;
|
|
3004
|
-
} else e.length === 0 ? i = It() : (i = ma[`=${e}`] || It(), (i === void 0 || i.slice(0, 2).toLowerCase() !== e.toLowerCase() && i.charCodeAt(2) ===
|
|
3004
|
+
} else e.length === 0 ? i = It() : (i = ma[`=${e}`] || It(), (i === void 0 || i.slice(0, 2).toLowerCase() !== e.toLowerCase() && i.charCodeAt(2) === se) && (i = `${e}\\`));
|
|
3005
3005
|
const a = i.length;
|
|
3006
3006
|
let o = 0, u = "", c = !1;
|
|
3007
3007
|
const h = i.charCodeAt(0);
|
|
3008
3008
|
if (a === 1)
|
|
3009
|
-
|
|
3010
|
-
else if (
|
|
3011
|
-
if (c = !0,
|
|
3009
|
+
$(h) && (o = 1, c = !0);
|
|
3010
|
+
else if ($(h))
|
|
3011
|
+
if (c = !0, $(i.charCodeAt(1))) {
|
|
3012
3012
|
let f = 2, m = f;
|
|
3013
|
-
for (; f < a &&
|
|
3013
|
+
for (; f < a && !$(i.charCodeAt(f)); )
|
|
3014
3014
|
f++;
|
|
3015
3015
|
if (f < a && f !== m) {
|
|
3016
3016
|
const p = i.slice(m, f);
|
|
3017
|
-
for (m = f; f < a &&
|
|
3017
|
+
for (m = f; f < a && $(i.charCodeAt(f)); )
|
|
3018
3018
|
f++;
|
|
3019
3019
|
if (f < a && f !== m) {
|
|
3020
|
-
for (m = f; f < a &&
|
|
3020
|
+
for (m = f; f < a && !$(i.charCodeAt(f)); )
|
|
3021
3021
|
f++;
|
|
3022
3022
|
(f === a || f !== m) && (u = `\\\\${p}\\${i.slice(m, f)}`, o = f);
|
|
3023
3023
|
}
|
|
3024
3024
|
}
|
|
3025
3025
|
} else
|
|
3026
3026
|
o = 1;
|
|
3027
|
-
else
|
|
3027
|
+
else _e(h) && i.charCodeAt(1) === xe && (u = i.slice(0, 2), o = 2, a > 2 && $(i.charCodeAt(2)) && (c = !0, o = 3));
|
|
3028
3028
|
if (u.length > 0)
|
|
3029
3029
|
if (e.length > 0) {
|
|
3030
3030
|
if (u.toLowerCase() !== e.toLowerCase())
|
|
@@ -3037,7 +3037,7 @@ const te = {
|
|
|
3037
3037
|
} else if (n = `${i.slice(o)}\\${n}`, r = c, c && e.length > 0)
|
|
3038
3038
|
break;
|
|
3039
3039
|
}
|
|
3040
|
-
return n = Dt(n, !r, "\\",
|
|
3040
|
+
return n = Dt(n, !r, "\\", $), r ? `${e}\\${n}` : `${e}${n}` || ".";
|
|
3041
3041
|
},
|
|
3042
3042
|
normalize(t) {
|
|
3043
3043
|
J(t, "path");
|
|
@@ -3048,17 +3048,17 @@ const te = {
|
|
|
3048
3048
|
const i = t.charCodeAt(0);
|
|
3049
3049
|
if (e === 1)
|
|
3050
3050
|
return cn(i) ? "\\" : t;
|
|
3051
|
-
if (
|
|
3052
|
-
if (s = !0,
|
|
3051
|
+
if ($(i))
|
|
3052
|
+
if (s = !0, $(t.charCodeAt(1))) {
|
|
3053
3053
|
let o = 2, u = o;
|
|
3054
|
-
for (; o < e &&
|
|
3054
|
+
for (; o < e && !$(t.charCodeAt(o)); )
|
|
3055
3055
|
o++;
|
|
3056
3056
|
if (o < e && o !== u) {
|
|
3057
3057
|
const c = t.slice(u, o);
|
|
3058
|
-
for (u = o; o < e &&
|
|
3058
|
+
for (u = o; o < e && $(t.charCodeAt(o)); )
|
|
3059
3059
|
o++;
|
|
3060
3060
|
if (o < e && o !== u) {
|
|
3061
|
-
for (u = o; o < e &&
|
|
3061
|
+
for (u = o; o < e && !$(t.charCodeAt(o)); )
|
|
3062
3062
|
o++;
|
|
3063
3063
|
if (o === e)
|
|
3064
3064
|
return `\\\\${c}\\${t.slice(u)}\\`;
|
|
@@ -3067,14 +3067,14 @@ const te = {
|
|
|
3067
3067
|
}
|
|
3068
3068
|
} else
|
|
3069
3069
|
n = 1;
|
|
3070
|
-
else
|
|
3071
|
-
let a = n < e ? Dt(t.slice(n), !s, "\\",
|
|
3072
|
-
if (a.length === 0 && !s && (a = "."), a.length > 0 &&
|
|
3073
|
-
if (a.length >= 2 &&
|
|
3070
|
+
else _e(i) && t.charCodeAt(1) === xe && (r = t.slice(0, 2), n = 2, e > 2 && $(t.charCodeAt(2)) && (s = !0, n = 3));
|
|
3071
|
+
let a = n < e ? Dt(t.slice(n), !s, "\\", $) : "";
|
|
3072
|
+
if (a.length === 0 && !s && (a = "."), a.length > 0 && $(t.charCodeAt(e - 1)) && (a += "\\"), !s && r === void 0 && t.includes(":")) {
|
|
3073
|
+
if (a.length >= 2 && _e(a.charCodeAt(0)) && a.charCodeAt(1) === xe)
|
|
3074
3074
|
return `.\\${a}`;
|
|
3075
3075
|
let o = t.indexOf(":");
|
|
3076
3076
|
do
|
|
3077
|
-
if (o === e - 1 ||
|
|
3077
|
+
if (o === e - 1 || $(t.charCodeAt(o + 1)))
|
|
3078
3078
|
return `.\\${a}`;
|
|
3079
3079
|
while ((o = t.indexOf(":", o + 1)) !== -1);
|
|
3080
3080
|
}
|
|
@@ -3086,8 +3086,8 @@ const te = {
|
|
|
3086
3086
|
if (e === 0)
|
|
3087
3087
|
return !1;
|
|
3088
3088
|
const n = t.charCodeAt(0);
|
|
3089
|
-
return
|
|
3090
|
-
e > 2 &&
|
|
3089
|
+
return $(n) || // Possible device root
|
|
3090
|
+
e > 2 && _e(n) && t.charCodeAt(1) === xe && $(t.charCodeAt(2));
|
|
3091
3091
|
},
|
|
3092
3092
|
join(...t) {
|
|
3093
3093
|
if (t.length === 0)
|
|
@@ -3100,17 +3100,17 @@ const te = {
|
|
|
3100
3100
|
if (e === void 0)
|
|
3101
3101
|
return ".";
|
|
3102
3102
|
let r = !0, s = 0;
|
|
3103
|
-
if (typeof n == "string" &&
|
|
3103
|
+
if (typeof n == "string" && $(n.charCodeAt(0))) {
|
|
3104
3104
|
++s;
|
|
3105
3105
|
const i = n.length;
|
|
3106
|
-
i > 1 &&
|
|
3106
|
+
i > 1 && $(n.charCodeAt(1)) && (++s, i > 2 && ($(n.charCodeAt(2)) ? ++s : r = !1));
|
|
3107
3107
|
}
|
|
3108
3108
|
if (r) {
|
|
3109
|
-
for (; s < e.length &&
|
|
3109
|
+
for (; s < e.length && $(e.charCodeAt(s)); )
|
|
3110
3110
|
s++;
|
|
3111
3111
|
s >= 2 && (e = `\\${e.slice(s)}`);
|
|
3112
3112
|
}
|
|
3113
|
-
return
|
|
3113
|
+
return ne.normalize(e);
|
|
3114
3114
|
},
|
|
3115
3115
|
// It will solve the relative path from `from` to `to`, for instance:
|
|
3116
3116
|
// from = 'C:\\orandea\\test\\aaa'
|
|
@@ -3119,7 +3119,7 @@ const te = {
|
|
|
3119
3119
|
relative(t, e) {
|
|
3120
3120
|
if (J(t, "from"), J(e, "to"), t === e)
|
|
3121
3121
|
return "";
|
|
3122
|
-
const n =
|
|
3122
|
+
const n = ne.resolve(t), r = ne.resolve(e);
|
|
3123
3123
|
if (n === r || (t = n.toLowerCase(), e = r.toLowerCase(), t === e))
|
|
3124
3124
|
return "";
|
|
3125
3125
|
if (n.length !== t.length || r.length !== e.length) {
|
|
@@ -3132,17 +3132,17 @@ const te = {
|
|
|
3132
3132
|
return N === 0 ? r : N === v ? y > v ? g.slice(N).join("\\") : w > v ? "..\\".repeat(w - 1 - N) + ".." : "" : "..\\".repeat(w - N) + g.slice(N).join("\\");
|
|
3133
3133
|
}
|
|
3134
3134
|
let s = 0;
|
|
3135
|
-
for (; s < t.length && t.charCodeAt(s) ===
|
|
3135
|
+
for (; s < t.length && t.charCodeAt(s) === se; )
|
|
3136
3136
|
s++;
|
|
3137
3137
|
let i = t.length;
|
|
3138
|
-
for (; i - 1 > s && t.charCodeAt(i - 1) ===
|
|
3138
|
+
for (; i - 1 > s && t.charCodeAt(i - 1) === se; )
|
|
3139
3139
|
i--;
|
|
3140
3140
|
const a = i - s;
|
|
3141
3141
|
let o = 0;
|
|
3142
|
-
for (; o < e.length && e.charCodeAt(o) ===
|
|
3142
|
+
for (; o < e.length && e.charCodeAt(o) === se; )
|
|
3143
3143
|
o++;
|
|
3144
3144
|
let u = e.length;
|
|
3145
|
-
for (; u - 1 > o && e.charCodeAt(u - 1) ===
|
|
3145
|
+
for (; u - 1 > o && e.charCodeAt(u - 1) === se; )
|
|
3146
3146
|
u--;
|
|
3147
3147
|
const c = u - o, h = a < c ? a : c;
|
|
3148
3148
|
let f = -1, m = 0;
|
|
@@ -3150,38 +3150,38 @@ const te = {
|
|
|
3150
3150
|
const d = t.charCodeAt(s + m);
|
|
3151
3151
|
if (d !== e.charCodeAt(o + m))
|
|
3152
3152
|
break;
|
|
3153
|
-
d ===
|
|
3153
|
+
d === se && (f = m);
|
|
3154
3154
|
}
|
|
3155
3155
|
if (m !== h) {
|
|
3156
3156
|
if (f === -1)
|
|
3157
3157
|
return r;
|
|
3158
3158
|
} else {
|
|
3159
3159
|
if (c > h) {
|
|
3160
|
-
if (e.charCodeAt(o + m) ===
|
|
3160
|
+
if (e.charCodeAt(o + m) === se)
|
|
3161
3161
|
return r.slice(o + m + 1);
|
|
3162
3162
|
if (m === 2)
|
|
3163
3163
|
return r.slice(o + m);
|
|
3164
3164
|
}
|
|
3165
|
-
a > h && (t.charCodeAt(s + m) ===
|
|
3165
|
+
a > h && (t.charCodeAt(s + m) === se ? f = m : m === 2 && (f = 3)), f === -1 && (f = 0);
|
|
3166
3166
|
}
|
|
3167
3167
|
let p = "";
|
|
3168
3168
|
for (m = s + f + 1; m <= i; ++m)
|
|
3169
|
-
(m === i || t.charCodeAt(m) ===
|
|
3170
|
-
return o += f, p.length > 0 ? `${p}${r.slice(o, u)}` : (r.charCodeAt(o) ===
|
|
3169
|
+
(m === i || t.charCodeAt(m) === se) && (p += p.length === 0 ? ".." : "\\..");
|
|
3170
|
+
return o += f, p.length > 0 ? `${p}${r.slice(o, u)}` : (r.charCodeAt(o) === se && ++o, r.slice(o, u));
|
|
3171
3171
|
},
|
|
3172
3172
|
toNamespacedPath(t) {
|
|
3173
3173
|
if (typeof t != "string" || t.length === 0)
|
|
3174
3174
|
return t;
|
|
3175
|
-
const e =
|
|
3175
|
+
const e = ne.resolve(t);
|
|
3176
3176
|
if (e.length <= 2)
|
|
3177
3177
|
return t;
|
|
3178
|
-
if (e.charCodeAt(0) ===
|
|
3179
|
-
if (e.charCodeAt(1) ===
|
|
3178
|
+
if (e.charCodeAt(0) === se) {
|
|
3179
|
+
if (e.charCodeAt(1) === se) {
|
|
3180
3180
|
const n = e.charCodeAt(2);
|
|
3181
3181
|
if (n !== ya && n !== De)
|
|
3182
3182
|
return `\\\\?\\UNC\\${e.slice(2)}`;
|
|
3183
3183
|
}
|
|
3184
|
-
} else if (
|
|
3184
|
+
} else if (_e(e.charCodeAt(0)) && e.charCodeAt(1) === xe && e.charCodeAt(2) === se)
|
|
3185
3185
|
return `\\\\?\\${e}`;
|
|
3186
3186
|
return e;
|
|
3187
3187
|
},
|
|
@@ -3193,17 +3193,17 @@ const te = {
|
|
|
3193
3193
|
let n = -1, r = 0;
|
|
3194
3194
|
const s = t.charCodeAt(0);
|
|
3195
3195
|
if (e === 1)
|
|
3196
|
-
return
|
|
3197
|
-
if (
|
|
3198
|
-
if (n = r = 1,
|
|
3196
|
+
return $(s) ? t : ".";
|
|
3197
|
+
if ($(s)) {
|
|
3198
|
+
if (n = r = 1, $(t.charCodeAt(1))) {
|
|
3199
3199
|
let o = 2, u = o;
|
|
3200
|
-
for (; o < e &&
|
|
3200
|
+
for (; o < e && !$(t.charCodeAt(o)); )
|
|
3201
3201
|
o++;
|
|
3202
3202
|
if (o < e && o !== u) {
|
|
3203
|
-
for (u = o; o < e &&
|
|
3203
|
+
for (u = o; o < e && $(t.charCodeAt(o)); )
|
|
3204
3204
|
o++;
|
|
3205
3205
|
if (o < e && o !== u) {
|
|
3206
|
-
for (u = o; o < e &&
|
|
3206
|
+
for (u = o; o < e && !$(t.charCodeAt(o)); )
|
|
3207
3207
|
o++;
|
|
3208
3208
|
if (o === e)
|
|
3209
3209
|
return t;
|
|
@@ -3211,10 +3211,10 @@ const te = {
|
|
|
3211
3211
|
}
|
|
3212
3212
|
}
|
|
3213
3213
|
}
|
|
3214
|
-
} else
|
|
3214
|
+
} else _e(s) && t.charCodeAt(1) === xe && (n = e > 2 && $(t.charCodeAt(2)) ? 3 : 2, r = n);
|
|
3215
3215
|
let i = -1, a = !0;
|
|
3216
3216
|
for (let o = e - 1; o >= r; --o)
|
|
3217
|
-
if (
|
|
3217
|
+
if ($(t.charCodeAt(o))) {
|
|
3218
3218
|
if (!a) {
|
|
3219
3219
|
i = o;
|
|
3220
3220
|
break;
|
|
@@ -3231,13 +3231,13 @@ const te = {
|
|
|
3231
3231
|
basename(t, e) {
|
|
3232
3232
|
e !== void 0 && J(e, "suffix"), J(t, "path");
|
|
3233
3233
|
let n = 0, r = -1, s = !0, i;
|
|
3234
|
-
if (t.length >= 2 &&
|
|
3234
|
+
if (t.length >= 2 && _e(t.charCodeAt(0)) && t.charCodeAt(1) === xe && (n = 2), e !== void 0 && e.length > 0 && e.length <= t.length) {
|
|
3235
3235
|
if (e === t)
|
|
3236
3236
|
return "";
|
|
3237
3237
|
let a = e.length - 1, o = -1;
|
|
3238
3238
|
for (i = t.length - 1; i >= n; --i) {
|
|
3239
3239
|
const u = t.charCodeAt(i);
|
|
3240
|
-
if (
|
|
3240
|
+
if ($(u)) {
|
|
3241
3241
|
if (!s) {
|
|
3242
3242
|
n = i + 1;
|
|
3243
3243
|
break;
|
|
@@ -3248,7 +3248,7 @@ const te = {
|
|
|
3248
3248
|
return n === r ? r = o : r === -1 && (r = t.length), t.slice(n, r);
|
|
3249
3249
|
}
|
|
3250
3250
|
for (i = t.length - 1; i >= n; --i)
|
|
3251
|
-
if (
|
|
3251
|
+
if ($(t.charCodeAt(i))) {
|
|
3252
3252
|
if (!s) {
|
|
3253
3253
|
n = i + 1;
|
|
3254
3254
|
break;
|
|
@@ -3259,10 +3259,10 @@ const te = {
|
|
|
3259
3259
|
extname(t) {
|
|
3260
3260
|
J(t, "path");
|
|
3261
3261
|
let e = 0, n = -1, r = 0, s = -1, i = !0, a = 0;
|
|
3262
|
-
t.length >= 2 && t.charCodeAt(1) ===
|
|
3262
|
+
t.length >= 2 && t.charCodeAt(1) === xe && _e(t.charCodeAt(0)) && (e = r = 2);
|
|
3263
3263
|
for (let o = t.length - 1; o >= e; --o) {
|
|
3264
3264
|
const u = t.charCodeAt(o);
|
|
3265
|
-
if (
|
|
3265
|
+
if ($(u)) {
|
|
3266
3266
|
if (!i) {
|
|
3267
3267
|
r = o + 1;
|
|
3268
3268
|
break;
|
|
@@ -3275,7 +3275,7 @@ const te = {
|
|
|
3275
3275
|
a === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
3276
3276
|
a === 1 && n === s - 1 && n === r + 1 ? "" : t.slice(n, s);
|
|
3277
3277
|
},
|
|
3278
|
-
format:
|
|
3278
|
+
format: Bs.bind(null, "\\"),
|
|
3279
3279
|
parse(t) {
|
|
3280
3280
|
J(t, "path");
|
|
3281
3281
|
const e = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
@@ -3284,26 +3284,26 @@ const te = {
|
|
|
3284
3284
|
const n = t.length;
|
|
3285
3285
|
let r = 0, s = t.charCodeAt(0);
|
|
3286
3286
|
if (n === 1)
|
|
3287
|
-
return
|
|
3288
|
-
if (
|
|
3289
|
-
if (r = 1,
|
|
3287
|
+
return $(s) ? (e.root = e.dir = t, e) : (e.base = e.name = t, e);
|
|
3288
|
+
if ($(s)) {
|
|
3289
|
+
if (r = 1, $(t.charCodeAt(1))) {
|
|
3290
3290
|
let f = 2, m = f;
|
|
3291
|
-
for (; f < n &&
|
|
3291
|
+
for (; f < n && !$(t.charCodeAt(f)); )
|
|
3292
3292
|
f++;
|
|
3293
3293
|
if (f < n && f !== m) {
|
|
3294
|
-
for (m = f; f < n &&
|
|
3294
|
+
for (m = f; f < n && $(t.charCodeAt(f)); )
|
|
3295
3295
|
f++;
|
|
3296
3296
|
if (f < n && f !== m) {
|
|
3297
|
-
for (m = f; f < n &&
|
|
3297
|
+
for (m = f; f < n && !$(t.charCodeAt(f)); )
|
|
3298
3298
|
f++;
|
|
3299
3299
|
f === n ? r = f : f !== m && (r = f + 1);
|
|
3300
3300
|
}
|
|
3301
3301
|
}
|
|
3302
3302
|
}
|
|
3303
|
-
} else if (
|
|
3303
|
+
} else if (_e(s) && t.charCodeAt(1) === xe) {
|
|
3304
3304
|
if (n <= 2)
|
|
3305
3305
|
return e.root = e.dir = t, e;
|
|
3306
|
-
if (r = 2,
|
|
3306
|
+
if (r = 2, $(t.charCodeAt(2))) {
|
|
3307
3307
|
if (n === 3)
|
|
3308
3308
|
return e.root = e.dir = t, e;
|
|
3309
3309
|
r = 3;
|
|
@@ -3312,7 +3312,7 @@ const te = {
|
|
|
3312
3312
|
r > 0 && (e.root = t.slice(0, r));
|
|
3313
3313
|
let i = -1, a = r, o = -1, u = !0, c = t.length - 1, h = 0;
|
|
3314
3314
|
for (; c >= r; --c) {
|
|
3315
|
-
if (s = t.charCodeAt(c),
|
|
3315
|
+
if (s = t.charCodeAt(c), $(s)) {
|
|
3316
3316
|
if (!u) {
|
|
3317
3317
|
a = c + 1;
|
|
3318
3318
|
break;
|
|
@@ -3338,7 +3338,7 @@ const te = {
|
|
|
3338
3338
|
};
|
|
3339
3339
|
}
|
|
3340
3340
|
return () => It();
|
|
3341
|
-
})(),
|
|
3341
|
+
})(), ae = {
|
|
3342
3342
|
// path.resolve([from ...], to)
|
|
3343
3343
|
resolve(...t) {
|
|
3344
3344
|
let e = "", n = !1;
|
|
@@ -3369,10 +3369,10 @@ const te = {
|
|
|
3369
3369
|
const r = t[n];
|
|
3370
3370
|
J(r, "path"), r.length > 0 && e.push(r);
|
|
3371
3371
|
}
|
|
3372
|
-
return e.length === 0 ? "." :
|
|
3372
|
+
return e.length === 0 ? "." : ae.normalize(e.join("/"));
|
|
3373
3373
|
},
|
|
3374
3374
|
relative(t, e) {
|
|
3375
|
-
if (J(t, "from"), J(e, "to"), t === e || (t =
|
|
3375
|
+
if (J(t, "from"), J(e, "to"), t === e || (t = ae.resolve(t), e = ae.resolve(e), t === e))
|
|
3376
3376
|
return "";
|
|
3377
3377
|
const n = 1, r = t.length, s = r - n, i = 1, a = e.length - i, o = s < a ? s : a;
|
|
3378
3378
|
let u = -1, c = 0;
|
|
@@ -3458,7 +3458,7 @@ const te = {
|
|
|
3458
3458
|
i === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
3459
3459
|
i === 1 && e === r - 1 && e === n + 1 ? "" : t.slice(e, r);
|
|
3460
3460
|
},
|
|
3461
|
-
format:
|
|
3461
|
+
format: Bs.bind(null, "/"),
|
|
3462
3462
|
parse(t) {
|
|
3463
3463
|
J(t, "path");
|
|
3464
3464
|
const e = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
@@ -3492,15 +3492,15 @@ const te = {
|
|
|
3492
3492
|
win32: null,
|
|
3493
3493
|
posix: null
|
|
3494
3494
|
};
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
Me ?
|
|
3498
|
-
Me ?
|
|
3499
|
-
Me ?
|
|
3500
|
-
Me ?
|
|
3501
|
-
Me ?
|
|
3502
|
-
Me ?
|
|
3503
|
-
Me ?
|
|
3495
|
+
ae.win32 = ne.win32 = ne;
|
|
3496
|
+
ae.posix = ne.posix = ae;
|
|
3497
|
+
Me ? ne.normalize : ae.normalize;
|
|
3498
|
+
Me ? ne.resolve : ae.resolve;
|
|
3499
|
+
Me ? ne.relative : ae.relative;
|
|
3500
|
+
Me ? ne.dirname : ae.dirname;
|
|
3501
|
+
Me ? ne.basename : ae.basename;
|
|
3502
|
+
Me ? ne.extname : ae.extname;
|
|
3503
|
+
Me ? ne.sep : ae.sep;
|
|
3504
3504
|
const va = /^\w[\w\d+.-]*$/, Na = /^\//, Sa = /^\/\//;
|
|
3505
3505
|
function ka(t, e) {
|
|
3506
3506
|
if (!t.scheme && e)
|
|
@@ -3515,10 +3515,10 @@ function ka(t, e) {
|
|
|
3515
3515
|
throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
|
|
3516
3516
|
}
|
|
3517
3517
|
}
|
|
3518
|
-
function
|
|
3518
|
+
function Ea(t, e) {
|
|
3519
3519
|
return !t && !e ? "file" : t;
|
|
3520
3520
|
}
|
|
3521
|
-
function
|
|
3521
|
+
function Ca(t, e) {
|
|
3522
3522
|
switch (t) {
|
|
3523
3523
|
case "https":
|
|
3524
3524
|
case "http":
|
|
@@ -3528,16 +3528,16 @@ function Aa(t, e) {
|
|
|
3528
3528
|
}
|
|
3529
3529
|
return e;
|
|
3530
3530
|
}
|
|
3531
|
-
const
|
|
3532
|
-
class
|
|
3531
|
+
const z = "", de = "/", Aa = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
|
|
3532
|
+
class $e {
|
|
3533
3533
|
static isUri(e) {
|
|
3534
|
-
return e instanceof
|
|
3534
|
+
return e instanceof $e ? !0 : !e || typeof e != "object" ? !1 : typeof e.authority == "string" && typeof e.fragment == "string" && typeof e.path == "string" && typeof e.query == "string" && typeof e.scheme == "string" && typeof e.fsPath == "string" && typeof e.with == "function" && typeof e.toString == "function";
|
|
3535
3535
|
}
|
|
3536
3536
|
/**
|
|
3537
3537
|
* @internal
|
|
3538
3538
|
*/
|
|
3539
3539
|
constructor(e, n, r, s, i, a = !1) {
|
|
3540
|
-
typeof e == "object" ? (this.scheme = e.scheme ||
|
|
3540
|
+
typeof e == "object" ? (this.scheme = e.scheme || z, this.authority = e.authority || z, this.path = e.path || z, this.query = e.query || z, this.fragment = e.fragment || z) : (this.scheme = Ea(e, a), this.authority = n || z, this.path = Ca(this.scheme, r || z), this.query = s || z, this.fragment = i || z, ka(this, a));
|
|
3541
3541
|
}
|
|
3542
3542
|
// ---- filesystem path -----------------------
|
|
3543
3543
|
/**
|
|
@@ -3572,7 +3572,7 @@ class Be {
|
|
|
3572
3572
|
if (!e)
|
|
3573
3573
|
return this;
|
|
3574
3574
|
let { scheme: n, authority: r, path: s, query: i, fragment: a } = e;
|
|
3575
|
-
return n === void 0 ? n = this.scheme : n === null && (n =
|
|
3575
|
+
return n === void 0 ? n = this.scheme : n === null && (n = z), r === void 0 ? r = this.authority : r === null && (r = z), s === void 0 ? s = this.path : s === null && (s = z), i === void 0 ? i = this.query : i === null && (i = z), a === void 0 ? a = this.fragment : a === null && (a = z), n === this.scheme && r === this.authority && s === this.path && i === this.query && a === this.fragment ? this : new We(n, r, s, i, a);
|
|
3576
3576
|
}
|
|
3577
3577
|
// ---- parse & validate ------------------------
|
|
3578
3578
|
/**
|
|
@@ -3582,8 +3582,8 @@ class Be {
|
|
|
3582
3582
|
* @param value A string which represents an URI (see `URI#toString`).
|
|
3583
3583
|
*/
|
|
3584
3584
|
static parse(e, n = !1) {
|
|
3585
|
-
const r =
|
|
3586
|
-
return r ? new
|
|
3585
|
+
const r = Aa.exec(e);
|
|
3586
|
+
return r ? new We(r[2] || z, xt(r[4] || z), xt(r[5] || z), xt(r[7] || z), xt(r[9] || z), n) : new We(z, z, z, z, z);
|
|
3587
3587
|
}
|
|
3588
3588
|
/**
|
|
3589
3589
|
* Creates a new URI from a file system path, e.g. `c:\my\files`,
|
|
@@ -3607,12 +3607,12 @@ class Be {
|
|
|
3607
3607
|
* @param path A file system path (see `URI#fsPath`)
|
|
3608
3608
|
*/
|
|
3609
3609
|
static file(e) {
|
|
3610
|
-
let n =
|
|
3611
|
-
if (
|
|
3610
|
+
let n = z;
|
|
3611
|
+
if (ft && (e = e.replace(/\\/g, de)), e[0] === de && e[1] === de) {
|
|
3612
3612
|
const r = e.indexOf(de, 2);
|
|
3613
3613
|
r === -1 ? (n = e.substring(2), e = de) : (n = e.substring(2, r), e = e.substring(r) || de);
|
|
3614
3614
|
}
|
|
3615
|
-
return new
|
|
3615
|
+
return new We("file", n, e, z, z);
|
|
3616
3616
|
}
|
|
3617
3617
|
/**
|
|
3618
3618
|
* Creates new URI from uri components.
|
|
@@ -3622,7 +3622,7 @@ class Be {
|
|
|
3622
3622
|
* user input, command arguments etc
|
|
3623
3623
|
*/
|
|
3624
3624
|
static from(e, n) {
|
|
3625
|
-
return new
|
|
3625
|
+
return new We(e.scheme, e.authority, e.path, e.query, e.fragment, n);
|
|
3626
3626
|
}
|
|
3627
3627
|
/**
|
|
3628
3628
|
* Join a URI path with path fragments and normalizes the resulting path.
|
|
@@ -3635,7 +3635,7 @@ class Be {
|
|
|
3635
3635
|
if (!e.path)
|
|
3636
3636
|
throw new Error("[UriError]: cannot call joinPath on URI without path");
|
|
3637
3637
|
let r;
|
|
3638
|
-
return
|
|
3638
|
+
return ft && e.scheme === "file" ? r = $e.file(ne.join(hn(e, !0), ...n)).path : r = ae.join(e.path, ...n), e.with({ path: r });
|
|
3639
3639
|
}
|
|
3640
3640
|
// ---- printing/externalize ---------------------------
|
|
3641
3641
|
/**
|
|
@@ -3657,17 +3657,17 @@ class Be {
|
|
|
3657
3657
|
}
|
|
3658
3658
|
static revive(e) {
|
|
3659
3659
|
if (e) {
|
|
3660
|
-
if (e instanceof
|
|
3660
|
+
if (e instanceof $e)
|
|
3661
3661
|
return e;
|
|
3662
3662
|
{
|
|
3663
|
-
const n = new
|
|
3663
|
+
const n = new We(e);
|
|
3664
3664
|
return n._formatted = e.external ?? null, n._fsPath = e._sep === Vs ? e.fsPath ?? null : null, n;
|
|
3665
3665
|
}
|
|
3666
3666
|
} else return e;
|
|
3667
3667
|
}
|
|
3668
3668
|
}
|
|
3669
|
-
const Vs =
|
|
3670
|
-
class
|
|
3669
|
+
const Vs = ft ? 1 : void 0;
|
|
3670
|
+
class We extends $e {
|
|
3671
3671
|
constructor() {
|
|
3672
3672
|
super(...arguments), this._formatted = null, this._fsPath = null;
|
|
3673
3673
|
}
|
|
@@ -3708,7 +3708,7 @@ const qs = {
|
|
|
3708
3708
|
61: "%3D",
|
|
3709
3709
|
32: "%20"
|
|
3710
3710
|
};
|
|
3711
|
-
function
|
|
3711
|
+
function Hn(t, e, n) {
|
|
3712
3712
|
let r, s = -1;
|
|
3713
3713
|
for (let i = 0; i < t.length; i++) {
|
|
3714
3714
|
const a = t.charCodeAt(i);
|
|
@@ -3722,7 +3722,7 @@ function zn(t, e, n) {
|
|
|
3722
3722
|
}
|
|
3723
3723
|
return s !== -1 && (r += encodeURIComponent(t.substring(s))), r !== void 0 ? r : t;
|
|
3724
3724
|
}
|
|
3725
|
-
function
|
|
3725
|
+
function Ra(t) {
|
|
3726
3726
|
let e;
|
|
3727
3727
|
for (let n = 0; n < t.length; n++) {
|
|
3728
3728
|
const r = t.charCodeAt(n);
|
|
@@ -3732,10 +3732,10 @@ function Ea(t) {
|
|
|
3732
3732
|
}
|
|
3733
3733
|
function hn(t, e) {
|
|
3734
3734
|
let n;
|
|
3735
|
-
return t.authority && t.path.length > 1 && t.scheme === "file" ? n = `//${t.authority}${t.path}` : t.path.charCodeAt(0) === 47 && (t.path.charCodeAt(1) >= 65 && t.path.charCodeAt(1) <= 90 || t.path.charCodeAt(1) >= 97 && t.path.charCodeAt(1) <= 122) && t.path.charCodeAt(2) === 58 ? e ? n = t.path.substr(1) : n = t.path[1].toLowerCase() + t.path.substr(2) : n = t.path,
|
|
3735
|
+
return t.authority && t.path.length > 1 && t.scheme === "file" ? n = `//${t.authority}${t.path}` : t.path.charCodeAt(0) === 47 && (t.path.charCodeAt(1) >= 65 && t.path.charCodeAt(1) <= 90 || t.path.charCodeAt(1) >= 97 && t.path.charCodeAt(1) <= 122) && t.path.charCodeAt(2) === 58 ? e ? n = t.path.substr(1) : n = t.path[1].toLowerCase() + t.path.substr(2) : n = t.path, ft && (n = n.replace(/\//g, "\\")), n;
|
|
3736
3736
|
}
|
|
3737
3737
|
function fn(t, e) {
|
|
3738
|
-
const n = e ?
|
|
3738
|
+
const n = e ? Ra : Hn;
|
|
3739
3739
|
let r = "", { scheme: s, authority: i, path: a, query: o, fragment: u } = t;
|
|
3740
3740
|
if (s && (r += s, r += ":"), (i || s === "file") && (r += de, r += de), i) {
|
|
3741
3741
|
let c = i.indexOf("@");
|
|
@@ -3755,7 +3755,7 @@ function fn(t, e) {
|
|
|
3755
3755
|
}
|
|
3756
3756
|
r += n(a, !0, !1);
|
|
3757
3757
|
}
|
|
3758
|
-
return o && (r += "?", r += n(o, !1, !1)), u && (r += "#", r += e ? u :
|
|
3758
|
+
return o && (r += "?", r += n(o, !1, !1)), u && (r += "#", r += e ? u : Hn(u, !1, !1)), r;
|
|
3759
3759
|
}
|
|
3760
3760
|
function Us(t) {
|
|
3761
3761
|
try {
|
|
@@ -3764,11 +3764,11 @@ function Us(t) {
|
|
|
3764
3764
|
return t.length > 3 ? t.substr(0, 3) + Us(t.substr(3)) : t;
|
|
3765
3765
|
}
|
|
3766
3766
|
}
|
|
3767
|
-
const
|
|
3767
|
+
const zn = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
|
|
3768
3768
|
function xt(t) {
|
|
3769
|
-
return t.match(
|
|
3769
|
+
return t.match(zn) ? t.replace(zn, (e) => Us(e)) : t;
|
|
3770
3770
|
}
|
|
3771
|
-
class
|
|
3771
|
+
class oe extends C {
|
|
3772
3772
|
constructor(e, n, r, s) {
|
|
3773
3773
|
super(e, n, r, s), this.selectionStartLineNumber = e, this.selectionStartColumn = n, this.positionLineNumber = r, this.positionColumn = s;
|
|
3774
3774
|
}
|
|
@@ -3782,7 +3782,7 @@ class ae extends A {
|
|
|
3782
3782
|
* Test if equals other selection.
|
|
3783
3783
|
*/
|
|
3784
3784
|
equalsSelection(e) {
|
|
3785
|
-
return
|
|
3785
|
+
return oe.selectionsEqual(this, e);
|
|
3786
3786
|
}
|
|
3787
3787
|
/**
|
|
3788
3788
|
* Test if the two selections are equal.
|
|
@@ -3800,44 +3800,44 @@ class ae extends A {
|
|
|
3800
3800
|
* Create a new selection with a different `positionLineNumber` and `positionColumn`.
|
|
3801
3801
|
*/
|
|
3802
3802
|
setEndPosition(e, n) {
|
|
3803
|
-
return this.getDirection() === 0 ? new
|
|
3803
|
+
return this.getDirection() === 0 ? new oe(this.startLineNumber, this.startColumn, e, n) : new oe(e, n, this.startLineNumber, this.startColumn);
|
|
3804
3804
|
}
|
|
3805
3805
|
/**
|
|
3806
3806
|
* Get the position at `positionLineNumber` and `positionColumn`.
|
|
3807
3807
|
*/
|
|
3808
3808
|
getPosition() {
|
|
3809
|
-
return new
|
|
3809
|
+
return new O(this.positionLineNumber, this.positionColumn);
|
|
3810
3810
|
}
|
|
3811
3811
|
/**
|
|
3812
3812
|
* Get the position at the start of the selection.
|
|
3813
3813
|
*/
|
|
3814
3814
|
getSelectionStart() {
|
|
3815
|
-
return new
|
|
3815
|
+
return new O(this.selectionStartLineNumber, this.selectionStartColumn);
|
|
3816
3816
|
}
|
|
3817
3817
|
/**
|
|
3818
3818
|
* Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.
|
|
3819
3819
|
*/
|
|
3820
3820
|
setStartPosition(e, n) {
|
|
3821
|
-
return this.getDirection() === 0 ? new
|
|
3821
|
+
return this.getDirection() === 0 ? new oe(e, n, this.endLineNumber, this.endColumn) : new oe(this.endLineNumber, this.endColumn, e, n);
|
|
3822
3822
|
}
|
|
3823
3823
|
// ----
|
|
3824
3824
|
/**
|
|
3825
3825
|
* Create a `Selection` from one or two positions
|
|
3826
3826
|
*/
|
|
3827
3827
|
static fromPositions(e, n = e) {
|
|
3828
|
-
return new
|
|
3828
|
+
return new oe(e.lineNumber, e.column, n.lineNumber, n.column);
|
|
3829
3829
|
}
|
|
3830
3830
|
/**
|
|
3831
3831
|
* Creates a `Selection` from a range, given a direction.
|
|
3832
3832
|
*/
|
|
3833
3833
|
static fromRange(e, n) {
|
|
3834
|
-
return n === 0 ? new
|
|
3834
|
+
return n === 0 ? new oe(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn) : new oe(e.endLineNumber, e.endColumn, e.startLineNumber, e.startColumn);
|
|
3835
3835
|
}
|
|
3836
3836
|
/**
|
|
3837
3837
|
* Create a `Selection` from an `ISelection`.
|
|
3838
3838
|
*/
|
|
3839
3839
|
static liftSelection(e) {
|
|
3840
|
-
return new
|
|
3840
|
+
return new oe(e.selectionStartLineNumber, e.selectionStartColumn, e.positionLineNumber, e.positionColumn);
|
|
3841
3841
|
}
|
|
3842
3842
|
/**
|
|
3843
3843
|
* `a` equals `b`.
|
|
@@ -3864,7 +3864,7 @@ class ae extends A {
|
|
|
3864
3864
|
* Create with a direction.
|
|
3865
3865
|
*/
|
|
3866
3866
|
static createWithDirection(e, n, r, s, i) {
|
|
3867
|
-
return i === 0 ? new
|
|
3867
|
+
return i === 0 ? new oe(e, n, r, s) : new oe(r, s, e, n);
|
|
3868
3868
|
}
|
|
3869
3869
|
}
|
|
3870
3870
|
const jn = /* @__PURE__ */ Object.create(null);
|
|
@@ -4596,7 +4596,7 @@ class Pa {
|
|
|
4596
4596
|
] : null;
|
|
4597
4597
|
}
|
|
4598
4598
|
}
|
|
4599
|
-
class Fa extends
|
|
4599
|
+
class Fa extends ht {
|
|
4600
4600
|
get isResolved() {
|
|
4601
4601
|
return this._isResolved;
|
|
4602
4602
|
}
|
|
@@ -4626,7 +4626,7 @@ var Gn;
|
|
|
4626
4626
|
(function(t) {
|
|
4627
4627
|
t[t.Increase = 0] = "Increase", t[t.Decrease = 1] = "Decrease";
|
|
4628
4628
|
})(Gn || (Gn = {}));
|
|
4629
|
-
var
|
|
4629
|
+
var Qn;
|
|
4630
4630
|
(function(t) {
|
|
4631
4631
|
const e = /* @__PURE__ */ new Map();
|
|
4632
4632
|
e.set(0, M.symbolMethod), e.set(1, M.symbolFunction), e.set(2, M.symbolConstructor), e.set(3, M.symbolField), e.set(4, M.symbolVariable), e.set(5, M.symbolClass), e.set(6, M.symbolStruct), e.set(7, M.symbolInterface), e.set(8, M.symbolModule), e.set(9, M.symbolProperty), e.set(10, M.symbolEvent), e.set(11, M.symbolOperator), e.set(12, M.symbolUnit), e.set(13, M.symbolValue), e.set(15, M.symbolEnum), e.set(14, M.symbolConstant), e.set(15, M.symbolEnum), e.set(16, M.symbolEnumMember), e.set(17, M.symbolKeyword), e.set(28, M.symbolSnippet), e.set(18, M.symbolText), e.set(19, M.symbolColor), e.set(20, M.symbolFile), e.set(21, M.symbolReference), e.set(22, M.symbolCustomColor), e.set(23, M.symbolFolder), e.set(24, M.symbolTypeParameter), e.set(25, M.account), e.set(26, M.issues), e.set(27, M.tools);
|
|
@@ -4831,11 +4831,11 @@ var Xn;
|
|
|
4831
4831
|
return typeof u > "u" && !o && (u = 9), u;
|
|
4832
4832
|
}
|
|
4833
4833
|
t.fromString = i;
|
|
4834
|
-
})(
|
|
4835
|
-
var
|
|
4834
|
+
})(Qn || (Qn = {}));
|
|
4835
|
+
var Xn;
|
|
4836
4836
|
(function(t) {
|
|
4837
4837
|
t[t.Automatic = 0] = "Automatic", t[t.Explicit = 1] = "Explicit";
|
|
4838
|
-
})(
|
|
4838
|
+
})(Xn || (Xn = {}));
|
|
4839
4839
|
var Jn;
|
|
4840
4840
|
(function(t) {
|
|
4841
4841
|
t[t.Code = 1] = "Code", t[t.Label = 2] = "Label";
|
|
@@ -5117,10 +5117,10 @@ var kr;
|
|
|
5117
5117
|
(function(t) {
|
|
5118
5118
|
t[t.Code = 1] = "Code", t[t.Label = 2] = "Label";
|
|
5119
5119
|
})(kr || (kr = {}));
|
|
5120
|
-
var
|
|
5120
|
+
var Er;
|
|
5121
5121
|
(function(t) {
|
|
5122
5122
|
t[t.Automatic = 0] = "Automatic", t[t.Explicit = 1] = "Explicit";
|
|
5123
|
-
})(
|
|
5123
|
+
})(Er || (Er = {}));
|
|
5124
5124
|
var mn;
|
|
5125
5125
|
(function(t) {
|
|
5126
5126
|
t[t.DependsOnKbLayout = -1] = "DependsOnKbLayout", t[t.Unknown = 0] = "Unknown", t[t.Backspace = 1] = "Backspace", t[t.Tab = 2] = "Tab", t[t.Enter = 3] = "Enter", t[t.Shift = 4] = "Shift", t[t.Ctrl = 5] = "Ctrl", t[t.Alt = 6] = "Alt", t[t.PauseBreak = 7] = "PauseBreak", t[t.CapsLock = 8] = "CapsLock", t[t.Escape = 9] = "Escape", t[t.Space = 10] = "Space", t[t.PageUp = 11] = "PageUp", t[t.PageDown = 12] = "PageDown", t[t.End = 13] = "End", t[t.Home = 14] = "Home", t[t.LeftArrow = 15] = "LeftArrow", t[t.UpArrow = 16] = "UpArrow", t[t.RightArrow = 17] = "RightArrow", t[t.DownArrow = 18] = "DownArrow", t[t.Insert = 19] = "Insert", t[t.Delete = 20] = "Delete", t[t.Digit0 = 21] = "Digit0", t[t.Digit1 = 22] = "Digit1", t[t.Digit2 = 23] = "Digit2", t[t.Digit3 = 24] = "Digit3", t[t.Digit4 = 25] = "Digit4", t[t.Digit5 = 26] = "Digit5", t[t.Digit6 = 27] = "Digit6", t[t.Digit7 = 28] = "Digit7", t[t.Digit8 = 29] = "Digit8", t[t.Digit9 = 30] = "Digit9", t[t.KeyA = 31] = "KeyA", t[t.KeyB = 32] = "KeyB", t[t.KeyC = 33] = "KeyC", t[t.KeyD = 34] = "KeyD", t[t.KeyE = 35] = "KeyE", t[t.KeyF = 36] = "KeyF", t[t.KeyG = 37] = "KeyG", t[t.KeyH = 38] = "KeyH", t[t.KeyI = 39] = "KeyI", t[t.KeyJ = 40] = "KeyJ", t[t.KeyK = 41] = "KeyK", t[t.KeyL = 42] = "KeyL", t[t.KeyM = 43] = "KeyM", t[t.KeyN = 44] = "KeyN", t[t.KeyO = 45] = "KeyO", t[t.KeyP = 46] = "KeyP", t[t.KeyQ = 47] = "KeyQ", t[t.KeyR = 48] = "KeyR", t[t.KeyS = 49] = "KeyS", t[t.KeyT = 50] = "KeyT", t[t.KeyU = 51] = "KeyU", t[t.KeyV = 52] = "KeyV", t[t.KeyW = 53] = "KeyW", t[t.KeyX = 54] = "KeyX", t[t.KeyY = 55] = "KeyY", t[t.KeyZ = 56] = "KeyZ", t[t.Meta = 57] = "Meta", t[t.ContextMenu = 58] = "ContextMenu", t[t.F1 = 59] = "F1", t[t.F2 = 60] = "F2", t[t.F3 = 61] = "F3", t[t.F4 = 62] = "F4", t[t.F5 = 63] = "F5", t[t.F6 = 64] = "F6", t[t.F7 = 65] = "F7", t[t.F8 = 66] = "F8", t[t.F9 = 67] = "F9", t[t.F10 = 68] = "F10", t[t.F11 = 69] = "F11", t[t.F12 = 70] = "F12", t[t.F13 = 71] = "F13", t[t.F14 = 72] = "F14", t[t.F15 = 73] = "F15", t[t.F16 = 74] = "F16", t[t.F17 = 75] = "F17", t[t.F18 = 76] = "F18", t[t.F19 = 77] = "F19", t[t.F20 = 78] = "F20", t[t.F21 = 79] = "F21", t[t.F22 = 80] = "F22", t[t.F23 = 81] = "F23", t[t.F24 = 82] = "F24", t[t.NumLock = 83] = "NumLock", t[t.ScrollLock = 84] = "ScrollLock", t[t.Semicolon = 85] = "Semicolon", t[t.Equal = 86] = "Equal", t[t.Comma = 87] = "Comma", t[t.Minus = 88] = "Minus", t[t.Period = 89] = "Period", t[t.Slash = 90] = "Slash", t[t.Backquote = 91] = "Backquote", t[t.BracketLeft = 92] = "BracketLeft", t[t.Backslash = 93] = "Backslash", t[t.BracketRight = 94] = "BracketRight", t[t.Quote = 95] = "Quote", t[t.OEM_8 = 96] = "OEM_8", t[t.IntlBackslash = 97] = "IntlBackslash", t[t.Numpad0 = 98] = "Numpad0", t[t.Numpad1 = 99] = "Numpad1", t[t.Numpad2 = 100] = "Numpad2", t[t.Numpad3 = 101] = "Numpad3", t[t.Numpad4 = 102] = "Numpad4", t[t.Numpad5 = 103] = "Numpad5", t[t.Numpad6 = 104] = "Numpad6", t[t.Numpad7 = 105] = "Numpad7", t[t.Numpad8 = 106] = "Numpad8", t[t.Numpad9 = 107] = "Numpad9", t[t.NumpadMultiply = 108] = "NumpadMultiply", t[t.NumpadAdd = 109] = "NumpadAdd", t[t.NUMPAD_SEPARATOR = 110] = "NUMPAD_SEPARATOR", t[t.NumpadSubtract = 111] = "NumpadSubtract", t[t.NumpadDecimal = 112] = "NumpadDecimal", t[t.NumpadDivide = 113] = "NumpadDivide", t[t.KEY_IN_COMPOSITION = 114] = "KEY_IN_COMPOSITION", t[t.ABNT_C1 = 115] = "ABNT_C1", t[t.ABNT_C2 = 116] = "ABNT_C2", t[t.AudioVolumeMute = 117] = "AudioVolumeMute", t[t.AudioVolumeUp = 118] = "AudioVolumeUp", t[t.AudioVolumeDown = 119] = "AudioVolumeDown", t[t.BrowserSearch = 120] = "BrowserSearch", t[t.BrowserHome = 121] = "BrowserHome", t[t.BrowserBack = 122] = "BrowserBack", t[t.BrowserForward = 123] = "BrowserForward", t[t.MediaTrackNext = 124] = "MediaTrackNext", t[t.MediaTrackPrevious = 125] = "MediaTrackPrevious", t[t.MediaStop = 126] = "MediaStop", t[t.MediaPlayPause = 127] = "MediaPlayPause", t[t.LaunchMediaPlayer = 128] = "LaunchMediaPlayer", t[t.LaunchMail = 129] = "LaunchMail", t[t.LaunchApp2 = 130] = "LaunchApp2", t[t.Clear = 131] = "Clear", t[t.MAX_VALUE = 132] = "MAX_VALUE";
|
|
@@ -5133,18 +5133,18 @@ var gn;
|
|
|
5133
5133
|
(function(t) {
|
|
5134
5134
|
t[t.Unnecessary = 1] = "Unnecessary", t[t.Deprecated = 2] = "Deprecated";
|
|
5135
5135
|
})(gn || (gn = {}));
|
|
5136
|
-
var
|
|
5136
|
+
var Cr;
|
|
5137
5137
|
(function(t) {
|
|
5138
5138
|
t[t.Inline = 1] = "Inline", t[t.Gutter = 2] = "Gutter";
|
|
5139
|
-
})(
|
|
5140
|
-
var
|
|
5139
|
+
})(Cr || (Cr = {}));
|
|
5140
|
+
var Ar;
|
|
5141
5141
|
(function(t) {
|
|
5142
5142
|
t[t.Normal = 1] = "Normal", t[t.Underlined = 2] = "Underlined";
|
|
5143
|
-
})(
|
|
5144
|
-
var
|
|
5143
|
+
})(Ar || (Ar = {}));
|
|
5144
|
+
var Rr;
|
|
5145
5145
|
(function(t) {
|
|
5146
5146
|
t[t.UNKNOWN = 0] = "UNKNOWN", t[t.TEXTAREA = 1] = "TEXTAREA", t[t.GUTTER_GLYPH_MARGIN = 2] = "GUTTER_GLYPH_MARGIN", t[t.GUTTER_LINE_NUMBERS = 3] = "GUTTER_LINE_NUMBERS", t[t.GUTTER_LINE_DECORATIONS = 4] = "GUTTER_LINE_DECORATIONS", t[t.GUTTER_VIEW_ZONE = 5] = "GUTTER_VIEW_ZONE", t[t.CONTENT_TEXT = 6] = "CONTENT_TEXT", t[t.CONTENT_EMPTY = 7] = "CONTENT_EMPTY", t[t.CONTENT_VIEW_ZONE = 8] = "CONTENT_VIEW_ZONE", t[t.CONTENT_WIDGET = 9] = "CONTENT_WIDGET", t[t.OVERVIEW_RULER = 10] = "OVERVIEW_RULER", t[t.SCROLLBAR = 11] = "SCROLLBAR", t[t.OVERLAY_WIDGET = 12] = "OVERLAY_WIDGET", t[t.OUTSIDE_EDITOR = 13] = "OUTSIDE_EDITOR";
|
|
5147
|
-
})(
|
|
5147
|
+
})(Rr || (Rr = {}));
|
|
5148
5148
|
var Mr;
|
|
5149
5149
|
(function(t) {
|
|
5150
5150
|
t[t.AIGenerated = 1] = "AIGenerated";
|
|
@@ -5169,14 +5169,14 @@ var Dr;
|
|
|
5169
5169
|
(function(t) {
|
|
5170
5170
|
t[t.Left = 0] = "Left", t[t.Right = 1] = "Right", t[t.None = 2] = "None", t[t.LeftOfInjectedText = 3] = "LeftOfInjectedText", t[t.RightOfInjectedText = 4] = "RightOfInjectedText";
|
|
5171
5171
|
})(Dr || (Dr = {}));
|
|
5172
|
-
var
|
|
5172
|
+
var $r;
|
|
5173
5173
|
(function(t) {
|
|
5174
5174
|
t[t.Off = 0] = "Off", t[t.On = 1] = "On", t[t.Relative = 2] = "Relative", t[t.Interval = 3] = "Interval", t[t.Custom = 4] = "Custom";
|
|
5175
|
-
})(
|
|
5176
|
-
var
|
|
5175
|
+
})($r || ($r = {}));
|
|
5176
|
+
var Br;
|
|
5177
5177
|
(function(t) {
|
|
5178
5178
|
t[t.None = 0] = "None", t[t.Text = 1] = "Text", t[t.Blocks = 2] = "Blocks";
|
|
5179
|
-
})(
|
|
5179
|
+
})(Br || (Br = {}));
|
|
5180
5180
|
var Vr;
|
|
5181
5181
|
(function(t) {
|
|
5182
5182
|
t[t.Smooth = 0] = "Smooth", t[t.Immediate = 1] = "Immediate";
|
|
@@ -5201,14 +5201,14 @@ var Or;
|
|
|
5201
5201
|
(function(t) {
|
|
5202
5202
|
t[t.File = 0] = "File", t[t.Module = 1] = "Module", t[t.Namespace = 2] = "Namespace", t[t.Package = 3] = "Package", t[t.Class = 4] = "Class", t[t.Method = 5] = "Method", t[t.Property = 6] = "Property", t[t.Field = 7] = "Field", t[t.Constructor = 8] = "Constructor", t[t.Enum = 9] = "Enum", t[t.Interface = 10] = "Interface", t[t.Function = 11] = "Function", t[t.Variable = 12] = "Variable", t[t.Constant = 13] = "Constant", t[t.String = 14] = "String", t[t.Number = 15] = "Number", t[t.Boolean = 16] = "Boolean", t[t.Array = 17] = "Array", t[t.Object = 18] = "Object", t[t.Key = 19] = "Key", t[t.Null = 20] = "Null", t[t.EnumMember = 21] = "EnumMember", t[t.Struct = 22] = "Struct", t[t.Event = 23] = "Event", t[t.Operator = 24] = "Operator", t[t.TypeParameter = 25] = "TypeParameter";
|
|
5203
5203
|
})(Or || (Or = {}));
|
|
5204
|
-
var
|
|
5204
|
+
var Hr;
|
|
5205
5205
|
(function(t) {
|
|
5206
5206
|
t[t.Deprecated = 1] = "Deprecated";
|
|
5207
|
-
})(
|
|
5208
|
-
var
|
|
5207
|
+
})(Hr || (Hr = {}));
|
|
5208
|
+
var zr;
|
|
5209
5209
|
(function(t) {
|
|
5210
5210
|
t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL";
|
|
5211
|
-
})(
|
|
5211
|
+
})(zr || (zr = {}));
|
|
5212
5212
|
var jr;
|
|
5213
5213
|
(function(t) {
|
|
5214
5214
|
t[t.Hidden = 0] = "Hidden", t[t.Blink = 1] = "Blink", t[t.Smooth = 2] = "Smooth", t[t.Phase = 3] = "Phase", t[t.Expand = 4] = "Expand", t[t.Solid = 5] = "Solid";
|
|
@@ -5217,14 +5217,14 @@ var Gr;
|
|
|
5217
5217
|
(function(t) {
|
|
5218
5218
|
t[t.Line = 1] = "Line", t[t.Block = 2] = "Block", t[t.Underline = 3] = "Underline", t[t.LineThin = 4] = "LineThin", t[t.BlockOutline = 5] = "BlockOutline", t[t.UnderlineThin = 6] = "UnderlineThin";
|
|
5219
5219
|
})(Gr || (Gr = {}));
|
|
5220
|
-
var
|
|
5220
|
+
var Qr;
|
|
5221
5221
|
(function(t) {
|
|
5222
5222
|
t[t.AlwaysGrowsWhenTypingAtEdges = 0] = "AlwaysGrowsWhenTypingAtEdges", t[t.NeverGrowsWhenTypingAtEdges = 1] = "NeverGrowsWhenTypingAtEdges", t[t.GrowsOnlyWhenTypingBefore = 2] = "GrowsOnlyWhenTypingBefore", t[t.GrowsOnlyWhenTypingAfter = 3] = "GrowsOnlyWhenTypingAfter";
|
|
5223
|
-
})(
|
|
5224
|
-
var
|
|
5223
|
+
})(Qr || (Qr = {}));
|
|
5224
|
+
var Xr;
|
|
5225
5225
|
(function(t) {
|
|
5226
5226
|
t[t.None = 0] = "None", t[t.Same = 1] = "Same", t[t.Indent = 2] = "Indent", t[t.DeepIndent = 3] = "DeepIndent";
|
|
5227
|
-
})(
|
|
5227
|
+
})(Xr || (Xr = {}));
|
|
5228
5228
|
class Da {
|
|
5229
5229
|
static {
|
|
5230
5230
|
this.CtrlCmd = 2048;
|
|
@@ -5242,7 +5242,7 @@ class Da {
|
|
|
5242
5242
|
return fa(e, n);
|
|
5243
5243
|
}
|
|
5244
5244
|
}
|
|
5245
|
-
function
|
|
5245
|
+
function $a() {
|
|
5246
5246
|
return {
|
|
5247
5247
|
editor: void 0,
|
|
5248
5248
|
// undefined override expected here
|
|
@@ -5252,18 +5252,18 @@ function Ba() {
|
|
|
5252
5252
|
Emitter: pe,
|
|
5253
5253
|
KeyCode: mn,
|
|
5254
5254
|
KeyMod: Da,
|
|
5255
|
-
Position:
|
|
5256
|
-
Range:
|
|
5257
|
-
Selection:
|
|
5255
|
+
Position: O,
|
|
5256
|
+
Range: C,
|
|
5257
|
+
Selection: oe,
|
|
5258
5258
|
SelectionDirection: pn,
|
|
5259
5259
|
MarkerSeverity: dn,
|
|
5260
5260
|
MarkerTag: gn,
|
|
5261
|
-
Uri:
|
|
5261
|
+
Uri: $e,
|
|
5262
5262
|
Token: Ia
|
|
5263
5263
|
};
|
|
5264
5264
|
}
|
|
5265
5265
|
var Jr;
|
|
5266
|
-
class
|
|
5266
|
+
class Ba {
|
|
5267
5267
|
constructor() {
|
|
5268
5268
|
this[Jr] = "LinkedMap", this._map = /* @__PURE__ */ new Map(), this._head = void 0, this._tail = void 0, this._size = 0, this._state = 0;
|
|
5269
5269
|
}
|
|
@@ -5488,7 +5488,7 @@ class $a {
|
|
|
5488
5488
|
this.set(n, r);
|
|
5489
5489
|
}
|
|
5490
5490
|
}
|
|
5491
|
-
class Va extends
|
|
5491
|
+
class Va extends Ba {
|
|
5492
5492
|
constructor(e, n = 1) {
|
|
5493
5493
|
super(), this._limit = e, this._ratio = Math.min(Math.max(0, n), 1);
|
|
5494
5494
|
}
|
|
@@ -5595,7 +5595,7 @@ function Oa(t, e, n, r, s) {
|
|
|
5595
5595
|
}
|
|
5596
5596
|
return !1;
|
|
5597
5597
|
}
|
|
5598
|
-
function
|
|
5598
|
+
function Ha(t, e, n, r, s) {
|
|
5599
5599
|
if (r + s === n)
|
|
5600
5600
|
return !0;
|
|
5601
5601
|
const i = e.charCodeAt(r + s);
|
|
@@ -5608,8 +5608,8 @@ function za(t, e, n, r, s) {
|
|
|
5608
5608
|
}
|
|
5609
5609
|
return !1;
|
|
5610
5610
|
}
|
|
5611
|
-
function
|
|
5612
|
-
return Oa(t, e, n, r, s) &&
|
|
5611
|
+
function za(t, e, n, r, s) {
|
|
5612
|
+
return Oa(t, e, n, r, s) && Ha(t, e, n, r, s);
|
|
5613
5613
|
}
|
|
5614
5614
|
class ja {
|
|
5615
5615
|
constructor(e, n) {
|
|
@@ -5627,25 +5627,25 @@ class ja {
|
|
|
5627
5627
|
const s = r.index, i = r[0].length;
|
|
5628
5628
|
if (s === this._prevMatchStartIndex && i === this._prevMatchLength) {
|
|
5629
5629
|
if (i === 0) {
|
|
5630
|
-
|
|
5630
|
+
Hi(e, n, this._searchRegex.lastIndex) > 65535 ? this._searchRegex.lastIndex += 2 : this._searchRegex.lastIndex += 1;
|
|
5631
5631
|
continue;
|
|
5632
5632
|
}
|
|
5633
5633
|
return null;
|
|
5634
5634
|
}
|
|
5635
|
-
if (this._prevMatchStartIndex = s, this._prevMatchLength = i, !this._wordSeparators ||
|
|
5635
|
+
if (this._prevMatchStartIndex = s, this._prevMatchLength = i, !this._wordSeparators || za(this._wordSeparators, e, n, s, i))
|
|
5636
5636
|
return r;
|
|
5637
5637
|
} while (r);
|
|
5638
5638
|
return null;
|
|
5639
5639
|
}
|
|
5640
5640
|
}
|
|
5641
5641
|
const Ga = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";
|
|
5642
|
-
function
|
|
5642
|
+
function Qa(t = "") {
|
|
5643
5643
|
let e = "(-?\\d*\\.\\d\\w*)|([^";
|
|
5644
5644
|
for (const n of Ga)
|
|
5645
5645
|
t.indexOf(n) >= 0 || (e += "\\" + n);
|
|
5646
5646
|
return e += "\\s]+)", new RegExp(e, "g");
|
|
5647
5647
|
}
|
|
5648
|
-
const Ws =
|
|
5648
|
+
const Ws = Qa();
|
|
5649
5649
|
function Os(t) {
|
|
5650
5650
|
let e = Ws;
|
|
5651
5651
|
if (t && t instanceof RegExp)
|
|
@@ -5657,14 +5657,14 @@ function Os(t) {
|
|
|
5657
5657
|
}
|
|
5658
5658
|
return e.lastIndex = 0, e;
|
|
5659
5659
|
}
|
|
5660
|
-
const
|
|
5661
|
-
|
|
5660
|
+
const Hs = new bi();
|
|
5661
|
+
Hs.unshift({
|
|
5662
5662
|
maxLen: 1e3,
|
|
5663
5663
|
windowSize: 15,
|
|
5664
5664
|
timeBudget: 150
|
|
5665
5665
|
});
|
|
5666
5666
|
function Mn(t, e, n, r, s) {
|
|
5667
|
-
if (e = Os(e), s || (s =
|
|
5667
|
+
if (e = Os(e), s || (s = Rt.first(Hs)), n.length > s.maxLen) {
|
|
5668
5668
|
let c = t - s.maxLen / 2;
|
|
5669
5669
|
return c < 0 ? c = 0 : r += c, n = n.substring(c, t + s.maxLen / 2), Mn(t, e, n, r, s);
|
|
5670
5670
|
}
|
|
@@ -5673,7 +5673,7 @@ function Mn(t, e, n, r, s) {
|
|
|
5673
5673
|
for (let c = 1; !(Date.now() - i >= s.timeBudget); c++) {
|
|
5674
5674
|
const h = a - s.windowSize * c;
|
|
5675
5675
|
e.lastIndex = Math.max(0, h);
|
|
5676
|
-
const f =
|
|
5676
|
+
const f = Xa(e, n, a, o);
|
|
5677
5677
|
if (!f && u || (u = f, h <= 0))
|
|
5678
5678
|
break;
|
|
5679
5679
|
o = h;
|
|
@@ -5688,7 +5688,7 @@ function Mn(t, e, n, r, s) {
|
|
|
5688
5688
|
}
|
|
5689
5689
|
return null;
|
|
5690
5690
|
}
|
|
5691
|
-
function
|
|
5691
|
+
function Xa(t, e, n, r) {
|
|
5692
5692
|
let s;
|
|
5693
5693
|
for (; s = t.exec(e); ) {
|
|
5694
5694
|
const i = s.index || 0;
|
|
@@ -5711,25 +5711,25 @@ class Ja {
|
|
|
5711
5711
|
c.reset(0);
|
|
5712
5712
|
do
|
|
5713
5713
|
if (m = c.next(v), m) {
|
|
5714
|
-
let
|
|
5715
|
-
if (
|
|
5716
|
-
const k = v.charCodeAt(
|
|
5717
|
-
on(k) &&
|
|
5714
|
+
let A = m.index, F = m.index + m[0].length;
|
|
5715
|
+
if (A > 0) {
|
|
5716
|
+
const k = v.charCodeAt(A - 1);
|
|
5717
|
+
on(k) && A--;
|
|
5718
5718
|
}
|
|
5719
5719
|
if (F + 1 < N) {
|
|
5720
5720
|
const k = v.charCodeAt(F - 1);
|
|
5721
5721
|
on(k) && F++;
|
|
5722
5722
|
}
|
|
5723
|
-
const
|
|
5724
|
-
let x = Mn(
|
|
5725
|
-
x && x.endColumn <=
|
|
5726
|
-
const L = a.shouldHighlightNonBasicASCII(
|
|
5723
|
+
const B = v.substring(A, F);
|
|
5724
|
+
let x = Mn(A + 1, Ws, v, 0);
|
|
5725
|
+
x && x.endColumn <= A + 1 && (x = null);
|
|
5726
|
+
const L = a.shouldHighlightNonBasicASCII(B, x ? x.word : null);
|
|
5727
5727
|
if (L !== 0) {
|
|
5728
5728
|
if (L === 3 ? p++ : L === 2 ? d++ : L === 1 ? g++ : hi(), h.length >= 1e3) {
|
|
5729
5729
|
f = !0;
|
|
5730
5730
|
break e;
|
|
5731
5731
|
}
|
|
5732
|
-
h.push(new
|
|
5732
|
+
h.push(new C(w, A + 1, w, F + 1));
|
|
5733
5733
|
}
|
|
5734
5734
|
}
|
|
5735
5735
|
while (m);
|
|
@@ -5753,7 +5753,7 @@ class Ja {
|
|
|
5753
5753
|
/* UnicodeHighlighterReasonKind.Invisible */
|
|
5754
5754
|
};
|
|
5755
5755
|
case 3: {
|
|
5756
|
-
const i = e.codePointAt(0), a = r.ambiguousCharacters.getPrimaryConfusable(i), o =
|
|
5756
|
+
const i = e.codePointAt(0), a = r.ambiguousCharacters.getPrimaryConfusable(i), o = Ae.getLocales().filter((u) => !Ae.getInstance(/* @__PURE__ */ new Set([...n.allowedLocales, u])).isAmbiguous(i));
|
|
5757
5757
|
return { kind: 0, confusableWith: String.fromCodePoint(a), notAmbiguousInLocales: o };
|
|
5758
5758
|
}
|
|
5759
5759
|
case 1:
|
|
@@ -5769,7 +5769,7 @@ function Za(t, e) {
|
|
|
5769
5769
|
}
|
|
5770
5770
|
class ts {
|
|
5771
5771
|
constructor(e) {
|
|
5772
|
-
this.options = e, this.allowedCodePoints = new Set(e.allowedCodePoints), this.ambiguousCharacters =
|
|
5772
|
+
this.options = e, this.allowedCodePoints = new Set(e.allowedCodePoints), this.ambiguousCharacters = Ae.getInstance(new Set(e.allowedLocales));
|
|
5773
5773
|
}
|
|
5774
5774
|
getCandidateCodePoints() {
|
|
5775
5775
|
if (this.options.nonBasicASCII)
|
|
@@ -5865,16 +5865,16 @@ var bn;
|
|
|
5865
5865
|
}
|
|
5866
5866
|
t.isNeitherLessOrGreaterThan = s, t.greaterThan = 1, t.lessThan = -1, t.neitherLessOrGreaterThan = 0;
|
|
5867
5867
|
})(bn || (bn = {}));
|
|
5868
|
-
function
|
|
5868
|
+
function it(t, e) {
|
|
5869
5869
|
return (n, r) => e(t(n), t(r));
|
|
5870
5870
|
}
|
|
5871
|
-
const
|
|
5871
|
+
const at = (t, e) => t - e;
|
|
5872
5872
|
function so(t) {
|
|
5873
5873
|
return (e, n) => -t(e, n);
|
|
5874
5874
|
}
|
|
5875
|
-
class
|
|
5875
|
+
class Et {
|
|
5876
5876
|
static {
|
|
5877
|
-
this.empty = new
|
|
5877
|
+
this.empty = new Et((e) => {
|
|
5878
5878
|
});
|
|
5879
5879
|
}
|
|
5880
5880
|
constructor(e) {
|
|
@@ -5885,10 +5885,10 @@ class Ct {
|
|
|
5885
5885
|
return this.iterate((n) => (e.push(n), !0)), e;
|
|
5886
5886
|
}
|
|
5887
5887
|
filter(e) {
|
|
5888
|
-
return new
|
|
5888
|
+
return new Et((n) => this.iterate((r) => e(r) ? n(r) : !0));
|
|
5889
5889
|
}
|
|
5890
5890
|
map(e) {
|
|
5891
|
-
return new
|
|
5891
|
+
return new Et((n) => this.iterate((r) => n(e(r))));
|
|
5892
5892
|
}
|
|
5893
5893
|
findLast(e) {
|
|
5894
5894
|
let n;
|
|
@@ -5932,7 +5932,7 @@ class U {
|
|
|
5932
5932
|
}
|
|
5933
5933
|
constructor(e, n) {
|
|
5934
5934
|
if (this.start = e, this.endExclusive = n, e > n)
|
|
5935
|
-
throw new
|
|
5935
|
+
throw new ee(`Invalid range: ${this.toString()}`);
|
|
5936
5936
|
}
|
|
5937
5937
|
get isEmpty() {
|
|
5938
5938
|
return this.start === this.endExclusive;
|
|
@@ -6006,7 +6006,7 @@ class U {
|
|
|
6006
6006
|
*/
|
|
6007
6007
|
clip(e) {
|
|
6008
6008
|
if (this.isEmpty)
|
|
6009
|
-
throw new
|
|
6009
|
+
throw new ee(`Invalid clipping range: ${this.toString()}`);
|
|
6010
6010
|
return Math.max(this.start, Math.min(this.endExclusive - 1, e));
|
|
6011
6011
|
}
|
|
6012
6012
|
/**
|
|
@@ -6017,7 +6017,7 @@ class U {
|
|
|
6017
6017
|
*/
|
|
6018
6018
|
clipCyclic(e) {
|
|
6019
6019
|
if (this.isEmpty)
|
|
6020
|
-
throw new
|
|
6020
|
+
throw new ee(`Invalid clipping range: ${this.toString()}`);
|
|
6021
6021
|
return e < this.start ? this.endExclusive - (this.start - e) % this.length : e >= this.endExclusive ? this.start + (e - this.start) % this.length : e;
|
|
6022
6022
|
}
|
|
6023
6023
|
forEach(e) {
|
|
@@ -6030,15 +6030,15 @@ class U {
|
|
|
6030
6030
|
*/
|
|
6031
6031
|
joinRightTouching(e) {
|
|
6032
6032
|
if (this.endExclusive !== e.start)
|
|
6033
|
-
throw new
|
|
6033
|
+
throw new ee(`Invalid join: ${this.toString()} and ${e.toString()}`);
|
|
6034
6034
|
return new U(this.start, e.endExclusive);
|
|
6035
6035
|
}
|
|
6036
6036
|
}
|
|
6037
|
-
function
|
|
6038
|
-
const n =
|
|
6037
|
+
function Ye(t, e) {
|
|
6038
|
+
const n = Ke(t, e);
|
|
6039
6039
|
return n === -1 ? void 0 : t[n];
|
|
6040
6040
|
}
|
|
6041
|
-
function
|
|
6041
|
+
function Ke(t, e, n = 0, r = t.length) {
|
|
6042
6042
|
let s = n, i = r;
|
|
6043
6043
|
for (; s < i; ) {
|
|
6044
6044
|
const a = Math.floor((s + i) / 2);
|
|
@@ -6078,7 +6078,7 @@ class Wt {
|
|
|
6078
6078
|
}
|
|
6079
6079
|
this._prevFindLastPredicate = e;
|
|
6080
6080
|
}
|
|
6081
|
-
const n =
|
|
6081
|
+
const n = Ke(this._array, e, this._findLastMonotonousLastIdx);
|
|
6082
6082
|
return this._findLastMonotonousLastIdx = n + 1, n === -1 ? void 0 : this._array[n];
|
|
6083
6083
|
}
|
|
6084
6084
|
}
|
|
@@ -6093,7 +6093,7 @@ class D {
|
|
|
6093
6093
|
return new D(e.startLineNumber, e.endLineNumber + 1);
|
|
6094
6094
|
}
|
|
6095
6095
|
static {
|
|
6096
|
-
this.compareByStart =
|
|
6096
|
+
this.compareByStart = it((e) => e.startLineNumber, at);
|
|
6097
6097
|
}
|
|
6098
6098
|
/**
|
|
6099
6099
|
* @param lineRanges An array of arrays of of sorted line ranges.
|
|
@@ -6108,7 +6108,7 @@ class D {
|
|
|
6108
6108
|
}
|
|
6109
6109
|
static join(e) {
|
|
6110
6110
|
if (e.length === 0)
|
|
6111
|
-
throw new
|
|
6111
|
+
throw new ee("lineRanges cannot be empty");
|
|
6112
6112
|
let n = e[0].startLineNumber, r = e[0].endLineNumberExclusive;
|
|
6113
6113
|
for (let s = 1; s < e.length; s++)
|
|
6114
6114
|
n = Math.min(n, e[s].startLineNumber), r = Math.max(r, e[s].endLineNumberExclusive);
|
|
@@ -6122,7 +6122,7 @@ class D {
|
|
|
6122
6122
|
}
|
|
6123
6123
|
constructor(e, n) {
|
|
6124
6124
|
if (e > n)
|
|
6125
|
-
throw new
|
|
6125
|
+
throw new ee(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`);
|
|
6126
6126
|
this.startLineNumber = e, this.endLineNumberExclusive = n;
|
|
6127
6127
|
}
|
|
6128
6128
|
/**
|
|
@@ -6180,13 +6180,13 @@ class D {
|
|
|
6180
6180
|
return this.startLineNumber === e.startLineNumber && this.endLineNumberExclusive === e.endLineNumberExclusive;
|
|
6181
6181
|
}
|
|
6182
6182
|
toInclusiveRange() {
|
|
6183
|
-
return this.isEmpty ? null : new
|
|
6183
|
+
return this.isEmpty ? null : new C(this.startLineNumber, 1, this.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER);
|
|
6184
6184
|
}
|
|
6185
6185
|
/**
|
|
6186
6186
|
* @deprecated Using this function is discouraged because it might lead to bugs: The end position is not guaranteed to be a valid position!
|
|
6187
6187
|
*/
|
|
6188
6188
|
toExclusiveRange() {
|
|
6189
|
-
return new
|
|
6189
|
+
return new C(this.startLineNumber, 1, this.endLineNumberExclusive, 1);
|
|
6190
6190
|
}
|
|
6191
6191
|
mapToLineArray(e) {
|
|
6192
6192
|
const n = [];
|
|
@@ -6225,7 +6225,7 @@ class be {
|
|
|
6225
6225
|
addRange(e) {
|
|
6226
6226
|
if (e.length === 0)
|
|
6227
6227
|
return;
|
|
6228
|
-
const n = wn(this._normalizedRanges, (s) => s.endLineNumberExclusive >= e.startLineNumber), r =
|
|
6228
|
+
const n = wn(this._normalizedRanges, (s) => s.endLineNumberExclusive >= e.startLineNumber), r = Ke(this._normalizedRanges, (s) => s.startLineNumber <= e.endLineNumberExclusive) + 1;
|
|
6229
6229
|
if (n === r)
|
|
6230
6230
|
this._normalizedRanges.splice(n, 0, e);
|
|
6231
6231
|
else if (n === r - 1) {
|
|
@@ -6237,11 +6237,11 @@ class be {
|
|
|
6237
6237
|
}
|
|
6238
6238
|
}
|
|
6239
6239
|
contains(e) {
|
|
6240
|
-
const n =
|
|
6240
|
+
const n = Ye(this._normalizedRanges, (r) => r.startLineNumber <= e);
|
|
6241
6241
|
return !!n && n.endLineNumberExclusive > e;
|
|
6242
6242
|
}
|
|
6243
6243
|
intersects(e) {
|
|
6244
|
-
const n =
|
|
6244
|
+
const n = Ye(this._normalizedRanges, (r) => r.startLineNumber < e.endLineNumberExclusive);
|
|
6245
6245
|
return !!n && n.endLineNumberExclusive > e.startLineNumber;
|
|
6246
6246
|
}
|
|
6247
6247
|
getUnion(e) {
|
|
@@ -6265,7 +6265,7 @@ class be {
|
|
|
6265
6265
|
* Subtracts all ranges in this set from `range` and returns the result.
|
|
6266
6266
|
*/
|
|
6267
6267
|
subtractFrom(e) {
|
|
6268
|
-
const n = wn(this._normalizedRanges, (a) => a.endLineNumberExclusive >= e.startLineNumber), r =
|
|
6268
|
+
const n = wn(this._normalizedRanges, (a) => a.endLineNumberExclusive >= e.startLineNumber), r = Ke(this._normalizedRanges, (a) => a.startLineNumber <= e.endLineNumberExclusive) + 1;
|
|
6269
6269
|
if (n === r)
|
|
6270
6270
|
return new be([e]);
|
|
6271
6271
|
const s = [];
|
|
@@ -6292,25 +6292,25 @@ class be {
|
|
|
6292
6292
|
return new be(this._normalizedRanges.map((n) => n.delta(e)));
|
|
6293
6293
|
}
|
|
6294
6294
|
}
|
|
6295
|
-
class
|
|
6295
|
+
class ce {
|
|
6296
6296
|
static {
|
|
6297
|
-
this.zero = new
|
|
6297
|
+
this.zero = new ce(0, 0);
|
|
6298
6298
|
}
|
|
6299
6299
|
static betweenPositions(e, n) {
|
|
6300
|
-
return e.lineNumber === n.lineNumber ? new
|
|
6300
|
+
return e.lineNumber === n.lineNumber ? new ce(0, n.column - e.column) : new ce(n.lineNumber - e.lineNumber, n.column - 1);
|
|
6301
6301
|
}
|
|
6302
6302
|
static fromPosition(e) {
|
|
6303
|
-
return new
|
|
6303
|
+
return new ce(e.lineNumber - 1, e.column - 1);
|
|
6304
6304
|
}
|
|
6305
6305
|
static ofRange(e) {
|
|
6306
|
-
return
|
|
6306
|
+
return ce.betweenPositions(e.getStartPosition(), e.getEndPosition());
|
|
6307
6307
|
}
|
|
6308
6308
|
static ofText(e) {
|
|
6309
6309
|
let n = 0, r = 0;
|
|
6310
6310
|
for (const s of e)
|
|
6311
6311
|
s === `
|
|
6312
6312
|
` ? (n++, r = 0) : r++;
|
|
6313
|
-
return new
|
|
6313
|
+
return new ce(n, r);
|
|
6314
6314
|
}
|
|
6315
6315
|
constructor(e, n) {
|
|
6316
6316
|
this.lineCount = e, this.columnCount = n;
|
|
@@ -6319,19 +6319,19 @@ class le {
|
|
|
6319
6319
|
return this.lineCount !== e.lineCount ? this.lineCount > e.lineCount : this.columnCount >= e.columnCount;
|
|
6320
6320
|
}
|
|
6321
6321
|
add(e) {
|
|
6322
|
-
return e.lineCount === 0 ? new
|
|
6322
|
+
return e.lineCount === 0 ? new ce(this.lineCount, this.columnCount + e.columnCount) : new ce(this.lineCount + e.lineCount, e.columnCount);
|
|
6323
6323
|
}
|
|
6324
6324
|
createRange(e) {
|
|
6325
|
-
return this.lineCount === 0 ? new
|
|
6325
|
+
return this.lineCount === 0 ? new C(e.lineNumber, e.column, e.lineNumber, e.column + this.columnCount) : new C(e.lineNumber, e.column, e.lineNumber + this.lineCount, this.columnCount + 1);
|
|
6326
6326
|
}
|
|
6327
6327
|
toRange() {
|
|
6328
|
-
return new
|
|
6328
|
+
return new C(1, 1, this.lineCount + 1, this.columnCount + 1);
|
|
6329
6329
|
}
|
|
6330
6330
|
toLineRange() {
|
|
6331
6331
|
return D.ofLength(1, this.lineCount + 1);
|
|
6332
6332
|
}
|
|
6333
6333
|
addToPosition(e) {
|
|
6334
|
-
return this.lineCount === 0 ? new
|
|
6334
|
+
return this.lineCount === 0 ? new O(e.lineNumber, e.column + this.columnCount) : new O(e.lineNumber + this.lineCount, this.columnCount + 1);
|
|
6335
6335
|
}
|
|
6336
6336
|
toString() {
|
|
6337
6337
|
return `${this.lineCount},${this.columnCount}`;
|
|
@@ -6342,20 +6342,20 @@ class ao {
|
|
|
6342
6342
|
return new U(this.getOffset(e.getStartPosition()), this.getOffset(e.getEndPosition()));
|
|
6343
6343
|
}
|
|
6344
6344
|
getRange(e) {
|
|
6345
|
-
return
|
|
6345
|
+
return C.fromPositions(this.getPosition(e.start), this.getPosition(e.endExclusive));
|
|
6346
6346
|
}
|
|
6347
6347
|
getStringReplacement(e) {
|
|
6348
|
-
return new
|
|
6348
|
+
return new Ct.deps.StringReplacement(this.getOffsetRange(e.range), e.text);
|
|
6349
6349
|
}
|
|
6350
6350
|
getTextReplacement(e) {
|
|
6351
|
-
return new
|
|
6351
|
+
return new Ct.deps.TextReplacement(this.getRange(e.replaceRange), e.newText);
|
|
6352
6352
|
}
|
|
6353
6353
|
getTextEdit(e) {
|
|
6354
6354
|
const n = e.replacements.map((r) => this.getTextReplacement(r));
|
|
6355
|
-
return new
|
|
6355
|
+
return new Ct.deps.TextEdit(n);
|
|
6356
6356
|
}
|
|
6357
6357
|
}
|
|
6358
|
-
class
|
|
6358
|
+
class Ct {
|
|
6359
6359
|
static {
|
|
6360
6360
|
this._deps = void 0;
|
|
6361
6361
|
}
|
|
@@ -6379,24 +6379,24 @@ class oo extends ao {
|
|
|
6379
6379
|
}
|
|
6380
6380
|
_validatePosition(e) {
|
|
6381
6381
|
if (e.lineNumber < 1)
|
|
6382
|
-
return new
|
|
6382
|
+
return new O(1, 1);
|
|
6383
6383
|
const n = this.textLength.lineCount + 1;
|
|
6384
6384
|
if (e.lineNumber > n) {
|
|
6385
6385
|
const s = this.getLineLength(n);
|
|
6386
|
-
return new
|
|
6386
|
+
return new O(n, s + 1);
|
|
6387
6387
|
}
|
|
6388
6388
|
if (e.column < 1)
|
|
6389
|
-
return new
|
|
6389
|
+
return new O(e.lineNumber, 1);
|
|
6390
6390
|
const r = this.getLineLength(e.lineNumber);
|
|
6391
|
-
return e.column - 1 > r ? new
|
|
6391
|
+
return e.column - 1 > r ? new O(e.lineNumber, r + 1) : e;
|
|
6392
6392
|
}
|
|
6393
6393
|
getPosition(e) {
|
|
6394
|
-
const n =
|
|
6395
|
-
return new
|
|
6394
|
+
const n = Ke(this.lineStartOffsetByLineIdx, (i) => i <= e), r = n + 1, s = e - this.lineStartOffsetByLineIdx[n] + 1;
|
|
6395
|
+
return new O(r, s);
|
|
6396
6396
|
}
|
|
6397
6397
|
get textLength() {
|
|
6398
6398
|
const e = this.lineStartOffsetByLineIdx.length - 1;
|
|
6399
|
-
return new
|
|
6399
|
+
return new Ct.deps.TextLength(e, this.text.length - this.lineStartOffsetByLineIdx[e]);
|
|
6400
6400
|
}
|
|
6401
6401
|
getLineLength(e) {
|
|
6402
6402
|
return this.lineEndOffsetByLineIdx[e - 1] - this.lineStartOffsetByLineIdx[e - 1];
|
|
@@ -6407,7 +6407,7 @@ class lo {
|
|
|
6407
6407
|
this._transformer = void 0;
|
|
6408
6408
|
}
|
|
6409
6409
|
get endPositionExclusive() {
|
|
6410
|
-
return this.length.addToPosition(new
|
|
6410
|
+
return this.length.addToPosition(new O(1, 1));
|
|
6411
6411
|
}
|
|
6412
6412
|
get lineRange() {
|
|
6413
6413
|
return this.length.toLineRange();
|
|
@@ -6419,13 +6419,13 @@ class lo {
|
|
|
6419
6419
|
return this.getValueOfRange(this.getTransformer().getRange(e));
|
|
6420
6420
|
}
|
|
6421
6421
|
getLineLength(e) {
|
|
6422
|
-
return this.getValueOfRange(new
|
|
6422
|
+
return this.getValueOfRange(new C(e, 1, e, Number.MAX_SAFE_INTEGER)).length;
|
|
6423
6423
|
}
|
|
6424
6424
|
getTransformer() {
|
|
6425
6425
|
return this._transformer || (this._transformer = new oo(this.getValue())), this._transformer;
|
|
6426
6426
|
}
|
|
6427
6427
|
getLineAt(e) {
|
|
6428
|
-
return this.getValueOfRange(new
|
|
6428
|
+
return this.getValueOfRange(new C(e, 1, e, Number.MAX_SAFE_INTEGER));
|
|
6429
6429
|
}
|
|
6430
6430
|
}
|
|
6431
6431
|
class uo extends lo {
|
|
@@ -6447,7 +6447,7 @@ class uo extends lo {
|
|
|
6447
6447
|
}
|
|
6448
6448
|
get length() {
|
|
6449
6449
|
const e = this._getLineContent(this._lineCount);
|
|
6450
|
-
return new
|
|
6450
|
+
return new ce(this._lineCount - 1, e.length);
|
|
6451
6451
|
}
|
|
6452
6452
|
}
|
|
6453
6453
|
class _t extends uo {
|
|
@@ -6455,10 +6455,10 @@ class _t extends uo {
|
|
|
6455
6455
|
super((n) => e[n - 1], e.length);
|
|
6456
6456
|
}
|
|
6457
6457
|
}
|
|
6458
|
-
class
|
|
6458
|
+
class Ee {
|
|
6459
6459
|
static joinReplacements(e, n) {
|
|
6460
6460
|
if (e.length === 0)
|
|
6461
|
-
throw new
|
|
6461
|
+
throw new ee();
|
|
6462
6462
|
if (e.length === 1)
|
|
6463
6463
|
return e[0];
|
|
6464
6464
|
const r = e[0].range.getStartPosition(), s = e[e.length - 1].range.getEndPosition();
|
|
@@ -6466,17 +6466,17 @@ class Ce {
|
|
|
6466
6466
|
for (let a = 0; a < e.length; a++) {
|
|
6467
6467
|
const o = e[a];
|
|
6468
6468
|
if (i += o.text, a < e.length - 1) {
|
|
6469
|
-
const u = e[a + 1], c =
|
|
6469
|
+
const u = e[a + 1], c = C.fromPositions(o.range.getEndPosition(), u.range.getStartPosition()), h = n.getValueOfRange(c);
|
|
6470
6470
|
i += h;
|
|
6471
6471
|
}
|
|
6472
6472
|
}
|
|
6473
|
-
return new
|
|
6473
|
+
return new Ee(C.fromPositions(r, s), i);
|
|
6474
6474
|
}
|
|
6475
6475
|
static fromStringReplacement(e, n) {
|
|
6476
|
-
return new
|
|
6476
|
+
return new Ee(n.getTransformer().getRange(e.replaceRange), e.newText);
|
|
6477
6477
|
}
|
|
6478
6478
|
static delete(e) {
|
|
6479
|
-
return new
|
|
6479
|
+
return new Ee(e, "");
|
|
6480
6480
|
}
|
|
6481
6481
|
constructor(e, n) {
|
|
6482
6482
|
this.range = e, this.text = n;
|
|
@@ -6488,7 +6488,7 @@ class Ce {
|
|
|
6488
6488
|
return e.range.equalsRange(n.range) && e.text === n.text;
|
|
6489
6489
|
}
|
|
6490
6490
|
equals(e) {
|
|
6491
|
-
return
|
|
6491
|
+
return Ee.equals(this, e);
|
|
6492
6492
|
}
|
|
6493
6493
|
removeCommonPrefixAndSuffix(e) {
|
|
6494
6494
|
return this.removeCommonPrefix(e).removeCommonSuffix(e);
|
|
@@ -6498,16 +6498,16 @@ class Ce {
|
|
|
6498
6498
|
`, `
|
|
6499
6499
|
`), r = this.text.replaceAll(`\r
|
|
6500
6500
|
`, `
|
|
6501
|
-
`), s = qi(n, r), i =
|
|
6502
|
-
return new
|
|
6501
|
+
`), s = qi(n, r), i = ce.ofText(n.substring(0, s)).addToPosition(this.range.getStartPosition()), a = r.substring(s), o = C.fromPositions(i, this.range.getEndPosition());
|
|
6502
|
+
return new Ee(o, a);
|
|
6503
6503
|
}
|
|
6504
6504
|
removeCommonSuffix(e) {
|
|
6505
6505
|
const n = e.getValueOfRange(this.range).replaceAll(`\r
|
|
6506
6506
|
`, `
|
|
6507
6507
|
`), r = this.text.replaceAll(`\r
|
|
6508
6508
|
`, `
|
|
6509
|
-
`), s = Ui(n, r), i =
|
|
6510
|
-
return new
|
|
6509
|
+
`), s = Ui(n, r), i = ce.ofText(n.substring(0, n.length - s)).addToPosition(this.range.getStartPosition()), a = r.substring(0, r.length - s), o = C.fromPositions(this.range.getStartPosition(), i);
|
|
6510
|
+
return new Ee(o, a);
|
|
6511
6511
|
}
|
|
6512
6512
|
toString() {
|
|
6513
6513
|
const e = this.range.getStartPosition(), n = this.range.getEndPosition();
|
|
@@ -6556,10 +6556,10 @@ class me {
|
|
|
6556
6556
|
return new he(e, n);
|
|
6557
6557
|
if (this.original.startLineNumber === 1 || this.modified.startLineNumber === 1) {
|
|
6558
6558
|
if (!(this.modified.startLineNumber === 1 && this.original.startLineNumber === 1))
|
|
6559
|
-
throw new
|
|
6560
|
-
return new he(new
|
|
6559
|
+
throw new ee("not a valid diff");
|
|
6560
|
+
return new he(new C(this.original.startLineNumber, 1, this.original.endLineNumberExclusive, 1), new C(this.modified.startLineNumber, 1, this.modified.endLineNumberExclusive, 1));
|
|
6561
6561
|
} else
|
|
6562
|
-
return new he(new
|
|
6562
|
+
return new he(new C(this.original.startLineNumber - 1, Number.MAX_SAFE_INTEGER, this.original.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), new C(this.modified.startLineNumber - 1, Number.MAX_SAFE_INTEGER, this.modified.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER));
|
|
6563
6563
|
}
|
|
6564
6564
|
/**
|
|
6565
6565
|
* This method assumes that the LineRangeMapping describes a valid diff!
|
|
@@ -6568,38 +6568,38 @@ class me {
|
|
|
6568
6568
|
*/
|
|
6569
6569
|
toRangeMapping2(e, n) {
|
|
6570
6570
|
if (rs(this.original.endLineNumberExclusive, e) && rs(this.modified.endLineNumberExclusive, n))
|
|
6571
|
-
return new he(new
|
|
6571
|
+
return new he(new C(this.original.startLineNumber, 1, this.original.endLineNumberExclusive, 1), new C(this.modified.startLineNumber, 1, this.modified.endLineNumberExclusive, 1));
|
|
6572
6572
|
if (!this.original.isEmpty && !this.modified.isEmpty)
|
|
6573
|
-
return new he(
|
|
6573
|
+
return new he(C.fromPositions(new O(this.original.startLineNumber, 1), Oe(new O(this.original.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), e)), C.fromPositions(new O(this.modified.startLineNumber, 1), Oe(new O(this.modified.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), n)));
|
|
6574
6574
|
if (this.original.startLineNumber > 1 && this.modified.startLineNumber > 1)
|
|
6575
|
-
return new he(
|
|
6576
|
-
throw new
|
|
6575
|
+
return new he(C.fromPositions(Oe(new O(this.original.startLineNumber - 1, Number.MAX_SAFE_INTEGER), e), Oe(new O(this.original.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), e)), C.fromPositions(Oe(new O(this.modified.startLineNumber - 1, Number.MAX_SAFE_INTEGER), n), Oe(new O(this.modified.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), n)));
|
|
6576
|
+
throw new ee();
|
|
6577
6577
|
}
|
|
6578
6578
|
}
|
|
6579
|
-
function
|
|
6579
|
+
function Oe(t, e) {
|
|
6580
6580
|
if (t.lineNumber < 1)
|
|
6581
|
-
return new
|
|
6581
|
+
return new O(1, 1);
|
|
6582
6582
|
if (t.lineNumber > e.length)
|
|
6583
|
-
return new
|
|
6583
|
+
return new O(e.length, e[e.length - 1].length + 1);
|
|
6584
6584
|
const n = e[t.lineNumber - 1];
|
|
6585
|
-
return t.column > n.length + 1 ? new
|
|
6585
|
+
return t.column > n.length + 1 ? new O(t.lineNumber, n.length + 1) : t;
|
|
6586
6586
|
}
|
|
6587
6587
|
function rs(t, e) {
|
|
6588
6588
|
return t >= 1 && t <= e.length;
|
|
6589
6589
|
}
|
|
6590
|
-
class
|
|
6590
|
+
class ve extends me {
|
|
6591
6591
|
static fromRangeMappings(e) {
|
|
6592
6592
|
const n = D.join(e.map((s) => D.fromRangeInclusive(s.originalRange))), r = D.join(e.map((s) => D.fromRangeInclusive(s.modifiedRange)));
|
|
6593
|
-
return new
|
|
6593
|
+
return new ve(n, r, e);
|
|
6594
6594
|
}
|
|
6595
6595
|
constructor(e, n, r) {
|
|
6596
6596
|
super(e, n), this.innerChanges = r;
|
|
6597
6597
|
}
|
|
6598
6598
|
flip() {
|
|
6599
|
-
return new
|
|
6599
|
+
return new ve(this.modified, this.original, this.innerChanges?.map((e) => e.flip()));
|
|
6600
6600
|
}
|
|
6601
6601
|
withInnerChangesFromLineRanges() {
|
|
6602
|
-
return new
|
|
6602
|
+
return new ve(this.original, this.modified, [this.toRangeMapping()]);
|
|
6603
6603
|
}
|
|
6604
6604
|
}
|
|
6605
6605
|
class he {
|
|
@@ -6611,7 +6611,7 @@ class he {
|
|
|
6611
6611
|
for (let n = 1; n < e.length; n++) {
|
|
6612
6612
|
const r = e[n - 1], s = e[n];
|
|
6613
6613
|
if (!(r.originalRange.getEndPosition().isBeforeOrEqual(s.originalRange.getStartPosition()) && r.modifiedRange.getEndPosition().isBeforeOrEqual(s.modifiedRange.getStartPosition())))
|
|
6614
|
-
throw new
|
|
6614
|
+
throw new ee("Range mappings must be sorted");
|
|
6615
6615
|
}
|
|
6616
6616
|
}
|
|
6617
6617
|
constructor(e, n) {
|
|
@@ -6628,23 +6628,23 @@ class he {
|
|
|
6628
6628
|
*/
|
|
6629
6629
|
toTextEdit(e) {
|
|
6630
6630
|
const n = e.getValueOfRange(this.modifiedRange);
|
|
6631
|
-
return new
|
|
6631
|
+
return new Ee(this.originalRange, n);
|
|
6632
6632
|
}
|
|
6633
6633
|
}
|
|
6634
6634
|
function ss(t, e, n, r = !1) {
|
|
6635
6635
|
const s = [];
|
|
6636
6636
|
for (const i of eo(t.map((a) => co(a, e, n)), (a, o) => a.original.intersectsOrTouches(o.original) || a.modified.intersectsOrTouches(o.modified))) {
|
|
6637
6637
|
const a = i[0], o = i[i.length - 1];
|
|
6638
|
-
s.push(new
|
|
6638
|
+
s.push(new ve(a.original.join(o.original), a.modified.join(o.modified), i.map((u) => u.innerChanges[0])));
|
|
6639
6639
|
}
|
|
6640
|
-
return
|
|
6640
|
+
return At(() => !r && s.length > 0 && (s[0].modified.startLineNumber !== s[0].original.startLineNumber || n.length.lineCount - s[s.length - 1].modified.endLineNumberExclusive !== e.length.lineCount - s[s.length - 1].original.endLineNumberExclusive) ? !1 : Rs(s, (i, a) => a.original.startLineNumber - i.original.endLineNumberExclusive === a.modified.startLineNumber - i.modified.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined)
|
|
6641
6641
|
i.original.endLineNumberExclusive < a.original.startLineNumber && i.modified.endLineNumberExclusive < a.modified.startLineNumber)), s;
|
|
6642
6642
|
}
|
|
6643
6643
|
function co(t, e, n) {
|
|
6644
6644
|
let r = 0, s = 0;
|
|
6645
6645
|
t.modifiedRange.endColumn === 1 && t.originalRange.endColumn === 1 && t.originalRange.startLineNumber + r <= t.originalRange.endLineNumber && t.modifiedRange.startLineNumber + r <= t.modifiedRange.endLineNumber && (s = -1), t.modifiedRange.startColumn - 1 >= n.getLineLength(t.modifiedRange.startLineNumber) && t.originalRange.startColumn - 1 >= e.getLineLength(t.originalRange.startLineNumber) && t.originalRange.startLineNumber <= t.originalRange.endLineNumber + s && t.modifiedRange.startLineNumber <= t.modifiedRange.endLineNumber + s && (r = 1);
|
|
6646
6646
|
const i = new D(t.originalRange.startLineNumber + r, t.originalRange.endLineNumber + 1 + s), a = new D(t.modifiedRange.startLineNumber + r, t.modifiedRange.endLineNumber + 1 + s);
|
|
6647
|
-
return new
|
|
6647
|
+
return new ve(i, a, [t]);
|
|
6648
6648
|
}
|
|
6649
6649
|
const ho = 3;
|
|
6650
6650
|
class fo {
|
|
@@ -6662,15 +6662,15 @@ class fo {
|
|
|
6662
6662
|
u.originalEndLineNumber === 0 ? c = new D(u.originalStartLineNumber + 1, u.originalStartLineNumber + 1) : c = new D(u.originalStartLineNumber, u.originalEndLineNumber + 1);
|
|
6663
6663
|
let h;
|
|
6664
6664
|
u.modifiedEndLineNumber === 0 ? h = new D(u.modifiedStartLineNumber + 1, u.modifiedStartLineNumber + 1) : h = new D(u.modifiedStartLineNumber, u.modifiedEndLineNumber + 1);
|
|
6665
|
-
let f = new
|
|
6666
|
-
o && (o.modified.endLineNumberExclusive === f.modified.startLineNumber || o.original.endLineNumberExclusive === f.original.startLineNumber) && (f = new
|
|
6665
|
+
let f = new ve(c, h, u.charChanges?.map((m) => new he(new C(m.originalStartLineNumber, m.originalStartColumn, m.originalEndLineNumber, m.originalEndColumn), new C(m.modifiedStartLineNumber, m.modifiedStartColumn, m.modifiedEndLineNumber, m.modifiedEndColumn))));
|
|
6666
|
+
o && (o.modified.endLineNumberExclusive === f.modified.startLineNumber || o.original.endLineNumberExclusive === f.original.startLineNumber) && (f = new ve(o.original.join(f.original), o.modified.join(f.modified), o.innerChanges && f.innerChanges ? o.innerChanges.concat(f.innerChanges) : void 0), a.pop()), a.push(f), o = f;
|
|
6667
6667
|
}
|
|
6668
|
-
return
|
|
6668
|
+
return At(() => Rs(a, (u, c) => c.original.startLineNumber - u.original.endLineNumberExclusive === c.modified.startLineNumber - u.modified.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined)
|
|
6669
6669
|
u.original.endLineNumberExclusive < c.original.startLineNumber && u.modified.endLineNumberExclusive < c.modified.startLineNumber)), new kt(a, [], i.quitEarly);
|
|
6670
6670
|
}
|
|
6671
6671
|
}
|
|
6672
|
-
function
|
|
6673
|
-
return new
|
|
6672
|
+
function zs(t, e, n, r) {
|
|
6673
|
+
return new Ce(t, e, n).ComputeDiff(r);
|
|
6674
6674
|
}
|
|
6675
6675
|
let is = class {
|
|
6676
6676
|
constructor(e) {
|
|
@@ -6753,7 +6753,7 @@ function go(t) {
|
|
|
6753
6753
|
}
|
|
6754
6754
|
return e;
|
|
6755
6755
|
}
|
|
6756
|
-
class
|
|
6756
|
+
class ot {
|
|
6757
6757
|
constructor(e, n, r, s, i) {
|
|
6758
6758
|
this.originalStartLineNumber = e, this.originalEndLineNumber = n, this.modifiedStartLineNumber = r, this.modifiedEndLineNumber = s, this.charChanges = i;
|
|
6759
6759
|
}
|
|
@@ -6762,13 +6762,13 @@ class at {
|
|
|
6762
6762
|
if (n.originalLength === 0 ? (u = r.getStartLineNumber(n.originalStart) - 1, c = 0) : (u = r.getStartLineNumber(n.originalStart), c = r.getEndLineNumber(n.originalStart + n.originalLength - 1)), n.modifiedLength === 0 ? (h = s.getStartLineNumber(n.modifiedStart) - 1, f = 0) : (h = s.getStartLineNumber(n.modifiedStart), f = s.getEndLineNumber(n.modifiedStart + n.modifiedLength - 1)), a && n.originalLength > 0 && n.originalLength < 20 && n.modifiedLength > 0 && n.modifiedLength < 20 && i()) {
|
|
6763
6763
|
const p = r.createCharSequence(e, n.originalStart, n.originalStart + n.originalLength - 1), d = s.createCharSequence(e, n.modifiedStart, n.modifiedStart + n.modifiedLength - 1);
|
|
6764
6764
|
if (p.getElements().length > 0 && d.getElements().length > 0) {
|
|
6765
|
-
let g =
|
|
6765
|
+
let g = zs(p, d, i, !0).changes;
|
|
6766
6766
|
o && (g = go(g)), m = [];
|
|
6767
6767
|
for (let w = 0, y = g.length; w < y; w++)
|
|
6768
6768
|
m.push(Xe.createFromDiffChange(g[w], p, d));
|
|
6769
6769
|
}
|
|
6770
6770
|
}
|
|
6771
|
-
return new
|
|
6771
|
+
return new ot(u, c, h, f, m);
|
|
6772
6772
|
}
|
|
6773
6773
|
}
|
|
6774
6774
|
class po {
|
|
@@ -6801,11 +6801,11 @@ class po {
|
|
|
6801
6801
|
charChanges: void 0
|
|
6802
6802
|
}]
|
|
6803
6803
|
};
|
|
6804
|
-
const e =
|
|
6804
|
+
const e = zs(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff), n = e.changes, r = e.quitEarly;
|
|
6805
6805
|
if (this.shouldIgnoreTrimWhitespace) {
|
|
6806
6806
|
const o = [];
|
|
6807
6807
|
for (let u = 0, c = n.length; u < c; u++)
|
|
6808
|
-
o.push(
|
|
6808
|
+
o.push(ot.createFromDiffResult(this.shouldIgnoreTrimWhitespace, n[u], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));
|
|
6809
6809
|
return {
|
|
6810
6810
|
quitEarly: r,
|
|
6811
6811
|
changes: o
|
|
@@ -6842,7 +6842,7 @@ class po {
|
|
|
6842
6842
|
}
|
|
6843
6843
|
i++, a++;
|
|
6844
6844
|
}
|
|
6845
|
-
c && (s.push(
|
|
6845
|
+
c && (s.push(ot.createFromDiffResult(this.shouldIgnoreTrimWhitespace, c, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)), i += c.originalLength, a += c.modifiedLength);
|
|
6846
6846
|
}
|
|
6847
6847
|
return {
|
|
6848
6848
|
quitEarly: r,
|
|
@@ -6853,7 +6853,7 @@ class po {
|
|
|
6853
6853
|
if (this._mergeTrimWhitespaceCharChange(e, n, r, s, i, a, o))
|
|
6854
6854
|
return;
|
|
6855
6855
|
let u;
|
|
6856
|
-
this.shouldComputeCharChanges && (u = [new Xe(n, r, n, s, i, a, i, o)]), e.push(new
|
|
6856
|
+
this.shouldComputeCharChanges && (u = [new Xe(n, r, n, s, i, a, i, o)]), e.push(new ot(n, n, i, i, u));
|
|
6857
6857
|
}
|
|
6858
6858
|
_mergeTrimWhitespaceCharChange(e, n, r, s, i, a, o) {
|
|
6859
6859
|
const u = e.length;
|
|
@@ -6864,7 +6864,7 @@ class po {
|
|
|
6864
6864
|
}
|
|
6865
6865
|
}
|
|
6866
6866
|
function yn(t, e) {
|
|
6867
|
-
const n =
|
|
6867
|
+
const n = Bi(t);
|
|
6868
6868
|
return n === -1 ? e : n + 1;
|
|
6869
6869
|
}
|
|
6870
6870
|
function xn(t, e) {
|
|
@@ -6877,32 +6877,32 @@ function as(t) {
|
|
|
6877
6877
|
const e = Date.now();
|
|
6878
6878
|
return () => Date.now() - e < t;
|
|
6879
6879
|
}
|
|
6880
|
-
class
|
|
6880
|
+
class Ne {
|
|
6881
6881
|
static trivial(e, n) {
|
|
6882
|
-
return new
|
|
6882
|
+
return new Ne([new X(U.ofLength(e.length), U.ofLength(n.length))], !1);
|
|
6883
6883
|
}
|
|
6884
6884
|
static trivialTimedOut(e, n) {
|
|
6885
|
-
return new
|
|
6885
|
+
return new Ne([new X(U.ofLength(e.length), U.ofLength(n.length))], !0);
|
|
6886
6886
|
}
|
|
6887
6887
|
constructor(e, n) {
|
|
6888
6888
|
this.diffs = e, this.hitTimeout = n;
|
|
6889
6889
|
}
|
|
6890
6890
|
}
|
|
6891
|
-
class
|
|
6891
|
+
class X {
|
|
6892
6892
|
static invert(e, n) {
|
|
6893
6893
|
const r = [];
|
|
6894
6894
|
return to(e, (s, i) => {
|
|
6895
|
-
r.push(
|
|
6895
|
+
r.push(X.fromOffsetPairs(s ? s.getEndExclusives() : ge.zero, i ? i.getStarts() : new ge(n, (s ? s.seq2Range.endExclusive - s.seq1Range.endExclusive : 0) + n)));
|
|
6896
6896
|
}), r;
|
|
6897
6897
|
}
|
|
6898
6898
|
static fromOffsetPairs(e, n) {
|
|
6899
|
-
return new
|
|
6899
|
+
return new X(new U(e.offset1, n.offset1), new U(e.offset2, n.offset2));
|
|
6900
6900
|
}
|
|
6901
6901
|
static assertSorted(e) {
|
|
6902
6902
|
let n;
|
|
6903
6903
|
for (const r of e) {
|
|
6904
6904
|
if (n && !(n.seq1Range.endExclusive <= r.seq1Range.start && n.seq2Range.endExclusive <= r.seq2Range.start))
|
|
6905
|
-
throw new
|
|
6905
|
+
throw new ee("Sequence diffs must be sorted");
|
|
6906
6906
|
n = r;
|
|
6907
6907
|
}
|
|
6908
6908
|
}
|
|
@@ -6910,27 +6910,27 @@ class Q {
|
|
|
6910
6910
|
this.seq1Range = e, this.seq2Range = n;
|
|
6911
6911
|
}
|
|
6912
6912
|
swap() {
|
|
6913
|
-
return new
|
|
6913
|
+
return new X(this.seq2Range, this.seq1Range);
|
|
6914
6914
|
}
|
|
6915
6915
|
toString() {
|
|
6916
6916
|
return `${this.seq1Range} <-> ${this.seq2Range}`;
|
|
6917
6917
|
}
|
|
6918
6918
|
join(e) {
|
|
6919
|
-
return new
|
|
6919
|
+
return new X(this.seq1Range.join(e.seq1Range), this.seq2Range.join(e.seq2Range));
|
|
6920
6920
|
}
|
|
6921
6921
|
delta(e) {
|
|
6922
|
-
return e === 0 ? this : new
|
|
6922
|
+
return e === 0 ? this : new X(this.seq1Range.delta(e), this.seq2Range.delta(e));
|
|
6923
6923
|
}
|
|
6924
6924
|
deltaStart(e) {
|
|
6925
|
-
return e === 0 ? this : new
|
|
6925
|
+
return e === 0 ? this : new X(this.seq1Range.deltaStart(e), this.seq2Range.deltaStart(e));
|
|
6926
6926
|
}
|
|
6927
6927
|
deltaEnd(e) {
|
|
6928
|
-
return e === 0 ? this : new
|
|
6928
|
+
return e === 0 ? this : new X(this.seq1Range.deltaEnd(e), this.seq2Range.deltaEnd(e));
|
|
6929
6929
|
}
|
|
6930
6930
|
intersect(e) {
|
|
6931
6931
|
const n = this.seq1Range.intersect(e.seq1Range), r = this.seq2Range.intersect(e.seq2Range);
|
|
6932
6932
|
if (!(!n || !r))
|
|
6933
|
-
return new
|
|
6933
|
+
return new X(n, r);
|
|
6934
6934
|
}
|
|
6935
6935
|
getStarts() {
|
|
6936
6936
|
return new ge(this.seq1Range.start, this.seq2Range.start);
|
|
@@ -6970,7 +6970,7 @@ class pt {
|
|
|
6970
6970
|
class bo {
|
|
6971
6971
|
constructor(e) {
|
|
6972
6972
|
if (this.timeout = e, this.startTime = Date.now(), this.valid = !0, e <= 0)
|
|
6973
|
-
throw new
|
|
6973
|
+
throw new ee("timeout must be positive");
|
|
6974
6974
|
}
|
|
6975
6975
|
// Recommendation: Set a log-point `{this.disable()}` in the body
|
|
6976
6976
|
isValid() {
|
|
@@ -6991,7 +6991,7 @@ class Jt {
|
|
|
6991
6991
|
function _n(t) {
|
|
6992
6992
|
return t === 32 || t === 9;
|
|
6993
6993
|
}
|
|
6994
|
-
class
|
|
6994
|
+
class mt {
|
|
6995
6995
|
static {
|
|
6996
6996
|
this.chrKeys = /* @__PURE__ */ new Map();
|
|
6997
6997
|
}
|
|
@@ -7006,11 +7006,11 @@ class ft {
|
|
|
7006
7006
|
const a = n[i];
|
|
7007
7007
|
for (let u = 0; u < a.length; u++) {
|
|
7008
7008
|
s++;
|
|
7009
|
-
const c = a[u], h =
|
|
7009
|
+
const c = a[u], h = mt.getKey(c);
|
|
7010
7010
|
this.histogram[h] = (this.histogram[h] || 0) + 1;
|
|
7011
7011
|
}
|
|
7012
7012
|
s++;
|
|
7013
|
-
const o =
|
|
7013
|
+
const o = mt.getKey(`
|
|
7014
7014
|
`);
|
|
7015
7015
|
this.histogram[o] = (this.histogram[o] || 0) + 1;
|
|
7016
7016
|
}
|
|
@@ -7027,37 +7027,37 @@ class ft {
|
|
|
7027
7027
|
class wo {
|
|
7028
7028
|
compute(e, n, r = pt.instance, s) {
|
|
7029
7029
|
if (e.length === 0 || n.length === 0)
|
|
7030
|
-
return
|
|
7030
|
+
return Ne.trivial(e, n);
|
|
7031
7031
|
const i = new Jt(e.length, n.length), a = new Jt(e.length, n.length), o = new Jt(e.length, n.length);
|
|
7032
7032
|
for (let d = 0; d < e.length; d++)
|
|
7033
7033
|
for (let g = 0; g < n.length; g++) {
|
|
7034
7034
|
if (!r.isValid())
|
|
7035
|
-
return
|
|
7035
|
+
return Ne.trivialTimedOut(e, n);
|
|
7036
7036
|
const w = d === 0 ? 0 : i.get(d - 1, g), y = g === 0 ? 0 : i.get(d, g - 1);
|
|
7037
7037
|
let v;
|
|
7038
7038
|
e.getElement(d) === n.getElement(g) ? (d === 0 || g === 0 ? v = 0 : v = i.get(d - 1, g - 1), d > 0 && g > 0 && a.get(d - 1, g - 1) === 3 && (v += o.get(d - 1, g - 1)), v += s ? s(d, g) : 1) : v = -1;
|
|
7039
7039
|
const N = Math.max(w, y, v);
|
|
7040
7040
|
if (N === v) {
|
|
7041
|
-
const
|
|
7042
|
-
o.set(d, g,
|
|
7041
|
+
const A = d > 0 && g > 0 ? o.get(d - 1, g - 1) : 0;
|
|
7042
|
+
o.set(d, g, A + 1), a.set(d, g, 3);
|
|
7043
7043
|
} else N === w ? (o.set(d, g, 0), a.set(d, g, 1)) : N === y && (o.set(d, g, 0), a.set(d, g, 2));
|
|
7044
7044
|
i.set(d, g, N);
|
|
7045
7045
|
}
|
|
7046
7046
|
const u = [];
|
|
7047
7047
|
let c = e.length, h = n.length;
|
|
7048
7048
|
function f(d, g) {
|
|
7049
|
-
(d + 1 !== c || g + 1 !== h) && u.push(new
|
|
7049
|
+
(d + 1 !== c || g + 1 !== h) && u.push(new X(new U(d + 1, c), new U(g + 1, h))), c = d, h = g;
|
|
7050
7050
|
}
|
|
7051
7051
|
let m = e.length - 1, p = n.length - 1;
|
|
7052
7052
|
for (; m >= 0 && p >= 0; )
|
|
7053
7053
|
a.get(m, p) === 3 ? (f(m, p), m--, p--) : a.get(m, p) === 1 ? m-- : p--;
|
|
7054
|
-
return f(-1, -1), u.reverse(), new
|
|
7054
|
+
return f(-1, -1), u.reverse(), new Ne(u, !1);
|
|
7055
7055
|
}
|
|
7056
7056
|
}
|
|
7057
7057
|
class js {
|
|
7058
7058
|
compute(e, n, r = pt.instance) {
|
|
7059
7059
|
if (e.length === 0 || n.length === 0)
|
|
7060
|
-
return
|
|
7060
|
+
return Ne.trivial(e, n);
|
|
7061
7061
|
const s = e, i = n;
|
|
7062
7062
|
function a(g, w) {
|
|
7063
7063
|
for (; g < s.length && w < i.length && s.getElement(g) === i.getElement(w); )
|
|
@@ -7072,16 +7072,16 @@ class js {
|
|
|
7072
7072
|
let h = 0;
|
|
7073
7073
|
e: for (; ; ) {
|
|
7074
7074
|
if (o++, !r.isValid())
|
|
7075
|
-
return
|
|
7075
|
+
return Ne.trivialTimedOut(s, i);
|
|
7076
7076
|
const g = -Math.min(o, i.length + o % 2), w = Math.min(o, s.length + o % 2);
|
|
7077
7077
|
for (h = g; h <= w; h += 2) {
|
|
7078
|
-
const y = h === w ? -1 : u.get(h + 1), v = h === g ? -1 : u.get(h - 1) + 1, N = Math.min(Math.max(y, v), s.length),
|
|
7079
|
-
if (N > s.length ||
|
|
7078
|
+
const y = h === w ? -1 : u.get(h + 1), v = h === g ? -1 : u.get(h - 1) + 1, N = Math.min(Math.max(y, v), s.length), A = N - h;
|
|
7079
|
+
if (N > s.length || A > i.length)
|
|
7080
7080
|
continue;
|
|
7081
|
-
const F = a(N,
|
|
7081
|
+
const F = a(N, A);
|
|
7082
7082
|
u.set(h, F);
|
|
7083
|
-
const
|
|
7084
|
-
if (c.set(h, F !== N ? new os(
|
|
7083
|
+
const B = N === y ? c.get(h + 1) : c.get(h - 1);
|
|
7084
|
+
if (c.set(h, F !== N ? new os(B, N, A, F - N) : B), u.get(h) === s.length && u.get(h) - h === i.length)
|
|
7085
7085
|
break e;
|
|
7086
7086
|
}
|
|
7087
7087
|
}
|
|
@@ -7090,11 +7090,11 @@ class js {
|
|
|
7090
7090
|
let p = s.length, d = i.length;
|
|
7091
7091
|
for (; ; ) {
|
|
7092
7092
|
const g = f ? f.x + f.length : 0, w = f ? f.y + f.length : 0;
|
|
7093
|
-
if ((g !== p || w !== d) && m.push(new
|
|
7093
|
+
if ((g !== p || w !== d) && m.push(new X(new U(g, p), new U(w, d))), !f)
|
|
7094
7094
|
break;
|
|
7095
7095
|
p = f.x, d = f.y, f = f.prev;
|
|
7096
7096
|
}
|
|
7097
|
-
return m.reverse(), new
|
|
7097
|
+
return m.reverse(), new Ne(m, !1);
|
|
7098
7098
|
}
|
|
7099
7099
|
}
|
|
7100
7100
|
class os {
|
|
@@ -7136,7 +7136,7 @@ class xo {
|
|
|
7136
7136
|
e < 0 ? (e = -e - 1, this.negativeArr[e] = n) : this.positiveArr[e] = n;
|
|
7137
7137
|
}
|
|
7138
7138
|
}
|
|
7139
|
-
class
|
|
7139
|
+
class $t {
|
|
7140
7140
|
constructor(e, n, r) {
|
|
7141
7141
|
this.lines = e, this.range = n, this.considerWhitespaceChanges = r, this.elements = [], this.firstElementOffsetByLineIdx = [], this.lineStartOffsets = [], this.trimmedWsLengthsByLineIdx = [], this.firstElementOffsetByLineIdx.push(0);
|
|
7142
7142
|
for (let s = this.range.startLineNumber; s <= this.range.endLineNumber; s++) {
|
|
@@ -7179,36 +7179,36 @@ class Bt {
|
|
|
7179
7179
|
return n !== r && (s += 10, n === 0 && r === 1 && (s += 1)), s += us(n), s += us(r), s;
|
|
7180
7180
|
}
|
|
7181
7181
|
translateOffset(e, n = "right") {
|
|
7182
|
-
const r =
|
|
7183
|
-
return new
|
|
7182
|
+
const r = Ke(this.firstElementOffsetByLineIdx, (i) => i <= e), s = e - this.firstElementOffsetByLineIdx[r];
|
|
7183
|
+
return new O(this.range.startLineNumber + r, 1 + this.lineStartOffsets[r] + s + (s === 0 && n === "left" ? 0 : this.trimmedWsLengthsByLineIdx[r]));
|
|
7184
7184
|
}
|
|
7185
7185
|
translateRange(e) {
|
|
7186
7186
|
const n = this.translateOffset(e.start, "right"), r = this.translateOffset(e.endExclusive, "left");
|
|
7187
|
-
return r.isBefore(n) ?
|
|
7187
|
+
return r.isBefore(n) ? C.fromPositions(r, r) : C.fromPositions(n, r);
|
|
7188
7188
|
}
|
|
7189
7189
|
/**
|
|
7190
7190
|
* Finds the word that contains the character at the given offset
|
|
7191
7191
|
*/
|
|
7192
7192
|
findWordContaining(e) {
|
|
7193
|
-
if (e < 0 || e >= this.elements.length || !
|
|
7193
|
+
if (e < 0 || e >= this.elements.length || !He(this.elements[e]))
|
|
7194
7194
|
return;
|
|
7195
7195
|
let n = e;
|
|
7196
|
-
for (; n > 0 &&
|
|
7196
|
+
for (; n > 0 && He(this.elements[n - 1]); )
|
|
7197
7197
|
n--;
|
|
7198
7198
|
let r = e;
|
|
7199
|
-
for (; r < this.elements.length &&
|
|
7199
|
+
for (; r < this.elements.length && He(this.elements[r]); )
|
|
7200
7200
|
r++;
|
|
7201
7201
|
return new U(n, r);
|
|
7202
7202
|
}
|
|
7203
7203
|
/** fooBar has the two sub-words foo and bar */
|
|
7204
7204
|
findSubWordContaining(e) {
|
|
7205
|
-
if (e < 0 || e >= this.elements.length || !
|
|
7205
|
+
if (e < 0 || e >= this.elements.length || !He(this.elements[e]))
|
|
7206
7206
|
return;
|
|
7207
7207
|
let n = e;
|
|
7208
|
-
for (; n > 0 &&
|
|
7208
|
+
for (; n > 0 && He(this.elements[n - 1]) && !ls(this.elements[n]); )
|
|
7209
7209
|
n--;
|
|
7210
7210
|
let r = e;
|
|
7211
|
-
for (; r < this.elements.length &&
|
|
7211
|
+
for (; r < this.elements.length && He(this.elements[r]) && !ls(this.elements[r]); )
|
|
7212
7212
|
r++;
|
|
7213
7213
|
return new U(n, r);
|
|
7214
7214
|
}
|
|
@@ -7219,11 +7219,11 @@ class Bt {
|
|
|
7219
7219
|
return this.elements[e] === this.elements[n];
|
|
7220
7220
|
}
|
|
7221
7221
|
extendToFullLines(e) {
|
|
7222
|
-
const n =
|
|
7222
|
+
const n = Ye(this.firstElementOffsetByLineIdx, (s) => s <= e.start) ?? 0, r = io(this.firstElementOffsetByLineIdx, (s) => e.endExclusive <= s) ?? this.elements.length;
|
|
7223
7223
|
return new U(n, r);
|
|
7224
7224
|
}
|
|
7225
7225
|
}
|
|
7226
|
-
function
|
|
7226
|
+
function He(t) {
|
|
7227
7227
|
return t >= 97 && t <= 122 || t >= 65 && t <= 90 || t >= 48 && t <= 57;
|
|
7228
7228
|
}
|
|
7229
7229
|
function ls(t) {
|
|
@@ -7255,7 +7255,7 @@ function Lo(t, e, n, r, s, i) {
|
|
|
7255
7255
|
const f = h.original.toOffsetRange().slice(e).map((p) => p.trim());
|
|
7256
7256
|
return f.join(`
|
|
7257
7257
|
`).length >= 15 && vo(f, (p) => p.length >= 2) >= 2;
|
|
7258
|
-
}), a =
|
|
7258
|
+
}), a = Eo(t, a), a;
|
|
7259
7259
|
}
|
|
7260
7260
|
function vo(t, e) {
|
|
7261
7261
|
let n = 0;
|
|
@@ -7264,7 +7264,7 @@ function vo(t, e) {
|
|
|
7264
7264
|
return n;
|
|
7265
7265
|
}
|
|
7266
7266
|
function No(t, e, n, r) {
|
|
7267
|
-
const s = [], i = t.filter((u) => u.modified.isEmpty && u.original.length >= 3).map((u) => new
|
|
7267
|
+
const s = [], i = t.filter((u) => u.modified.isEmpty && u.original.length >= 3).map((u) => new mt(u.original, e, u)), a = new Set(t.filter((u) => u.original.isEmpty && u.modified.length >= 3).map((u) => new mt(u.modified, n, u))), o = /* @__PURE__ */ new Set();
|
|
7268
7268
|
for (const u of i) {
|
|
7269
7269
|
let c = -1, h;
|
|
7270
7270
|
for (const f of a) {
|
|
@@ -7284,15 +7284,15 @@ function So(t, e, n, r, s, i) {
|
|
|
7284
7284
|
o.add(d, { range: new D(p, p + 3) });
|
|
7285
7285
|
}
|
|
7286
7286
|
const u = [];
|
|
7287
|
-
t.sort(
|
|
7287
|
+
t.sort(it((m) => m.modified.startLineNumber, at));
|
|
7288
7288
|
for (const m of t) {
|
|
7289
7289
|
let p = [];
|
|
7290
7290
|
for (let d = m.modified.startLineNumber; d < m.modified.endLineNumberExclusive - 2; d++) {
|
|
7291
7291
|
const g = `${n[d - 1]}:${n[d + 1 - 1]}:${n[d + 2 - 1]}`, w = new D(d, d + 3), y = [];
|
|
7292
7292
|
o.forEach(g, ({ range: v }) => {
|
|
7293
|
-
for (const
|
|
7294
|
-
if (
|
|
7295
|
-
|
|
7293
|
+
for (const A of p)
|
|
7294
|
+
if (A.originalLineRange.endLineNumberExclusive + 1 === v.endLineNumberExclusive && A.modifiedLineRange.endLineNumberExclusive + 1 === w.endLineNumberExclusive) {
|
|
7295
|
+
A.originalLineRange = new D(A.originalLineRange.startLineNumber, v.endLineNumberExclusive), A.modifiedLineRange = new D(A.modifiedLineRange.startLineNumber, w.endLineNumberExclusive), y.push(A);
|
|
7296
7296
|
return;
|
|
7297
7297
|
}
|
|
7298
7298
|
const N = {
|
|
@@ -7305,7 +7305,7 @@ function So(t, e, n, r, s, i) {
|
|
|
7305
7305
|
if (!i.isValid())
|
|
7306
7306
|
return [];
|
|
7307
7307
|
}
|
|
7308
|
-
u.sort(so(
|
|
7308
|
+
u.sort(so(it((m) => m.modifiedLineRange.length, at)));
|
|
7309
7309
|
const c = new be(), h = new be();
|
|
7310
7310
|
for (const m of u) {
|
|
7311
7311
|
const p = m.modifiedLineRange.startLineNumber - m.originalLineRange.startLineNumber, d = c.subtractFrom(m.modifiedLineRange), g = h.subtractFrom(m.originalLineRange).getWithDelta(p), w = d.getIntersection(g);
|
|
@@ -7316,24 +7316,24 @@ function So(t, e, n, r, s, i) {
|
|
|
7316
7316
|
a.push(new me(N, v)), c.addRange(v), h.addRange(N);
|
|
7317
7317
|
}
|
|
7318
7318
|
}
|
|
7319
|
-
a.sort(
|
|
7319
|
+
a.sort(it((m) => m.original.startLineNumber, at));
|
|
7320
7320
|
const f = new Wt(t);
|
|
7321
7321
|
for (let m = 0; m < a.length; m++) {
|
|
7322
|
-
const p = a[m], d = f.findLastMonotonous((
|
|
7323
|
-
let
|
|
7324
|
-
for (
|
|
7325
|
-
const
|
|
7326
|
-
if (
|
|
7322
|
+
const p = a[m], d = f.findLastMonotonous((B) => B.original.startLineNumber <= p.original.startLineNumber), g = Ye(t, (B) => B.modified.startLineNumber <= p.modified.startLineNumber), w = Math.max(p.original.startLineNumber - d.original.startLineNumber, p.modified.startLineNumber - g.modified.startLineNumber), y = f.findLastMonotonous((B) => B.original.startLineNumber < p.original.endLineNumberExclusive), v = Ye(t, (B) => B.modified.startLineNumber < p.modified.endLineNumberExclusive), N = Math.max(y.original.endLineNumberExclusive - p.original.endLineNumberExclusive, v.modified.endLineNumberExclusive - p.modified.endLineNumberExclusive);
|
|
7323
|
+
let A;
|
|
7324
|
+
for (A = 0; A < w; A++) {
|
|
7325
|
+
const B = p.original.startLineNumber - A - 1, x = p.modified.startLineNumber - A - 1;
|
|
7326
|
+
if (B > r.length || x > s.length || c.contains(x) || h.contains(B) || !hs(r[B - 1], s[x - 1], i))
|
|
7327
7327
|
break;
|
|
7328
7328
|
}
|
|
7329
|
-
|
|
7329
|
+
A > 0 && (h.addRange(new D(p.original.startLineNumber - A, p.original.startLineNumber)), c.addRange(new D(p.modified.startLineNumber - A, p.modified.startLineNumber)));
|
|
7330
7330
|
let F;
|
|
7331
7331
|
for (F = 0; F < N; F++) {
|
|
7332
|
-
const
|
|
7333
|
-
if (
|
|
7332
|
+
const B = p.original.endLineNumberExclusive + F, x = p.modified.endLineNumberExclusive + F;
|
|
7333
|
+
if (B > r.length || x > s.length || c.contains(x) || h.contains(B) || !hs(r[B - 1], s[x - 1], i))
|
|
7334
7334
|
break;
|
|
7335
7335
|
}
|
|
7336
|
-
F > 0 && (h.addRange(new D(p.original.endLineNumberExclusive, p.original.endLineNumberExclusive + F)), c.addRange(new D(p.modified.endLineNumberExclusive, p.modified.endLineNumberExclusive + F))), (
|
|
7336
|
+
F > 0 && (h.addRange(new D(p.original.endLineNumberExclusive, p.original.endLineNumberExclusive + F)), c.addRange(new D(p.modified.endLineNumberExclusive, p.modified.endLineNumberExclusive + F))), (A > 0 || F > 0) && (a[m] = new me(new D(p.original.startLineNumber - A, p.original.endLineNumberExclusive + F), new D(p.modified.startLineNumber - A, p.modified.endLineNumberExclusive + F)));
|
|
7337
7337
|
}
|
|
7338
7338
|
return a;
|
|
7339
7339
|
}
|
|
@@ -7342,9 +7342,9 @@ function hs(t, e, n) {
|
|
|
7342
7342
|
return !0;
|
|
7343
7343
|
if (t.length > 300 && e.length > 300)
|
|
7344
7344
|
return !1;
|
|
7345
|
-
const s = new js().compute(new
|
|
7345
|
+
const s = new js().compute(new $t([t], new C(1, 1, 1, t.length), !1), new $t([e], new C(1, 1, 1, e.length), !1), n);
|
|
7346
7346
|
let i = 0;
|
|
7347
|
-
const a =
|
|
7347
|
+
const a = X.invert(s.diffs, t.length);
|
|
7348
7348
|
for (const h of a)
|
|
7349
7349
|
h.seq1Range.forEach((f) => {
|
|
7350
7350
|
_n(t.charCodeAt(f)) || i++;
|
|
@@ -7361,7 +7361,7 @@ function hs(t, e, n) {
|
|
|
7361
7361
|
function ko(t) {
|
|
7362
7362
|
if (t.length === 0)
|
|
7363
7363
|
return t;
|
|
7364
|
-
t.sort(
|
|
7364
|
+
t.sort(it((n) => n.original.startLineNumber, at));
|
|
7365
7365
|
const e = [t[0]];
|
|
7366
7366
|
for (let n = 1; n < t.length; n++) {
|
|
7367
7367
|
const r = e[e.length - 1], s = t[n], i = s.original.startLineNumber - r.original.endLineNumberExclusive, a = s.modified.startLineNumber - r.modified.endLineNumberExclusive;
|
|
@@ -7373,16 +7373,16 @@ function ko(t) {
|
|
|
7373
7373
|
}
|
|
7374
7374
|
return e;
|
|
7375
7375
|
}
|
|
7376
|
-
function
|
|
7376
|
+
function Eo(t, e) {
|
|
7377
7377
|
const n = new Wt(t);
|
|
7378
7378
|
return e = e.filter((r) => {
|
|
7379
|
-
const s = n.findLastMonotonous((o) => o.original.startLineNumber < r.original.endLineNumberExclusive) || new me(new D(1, 1), new D(1, 1)), i =
|
|
7379
|
+
const s = n.findLastMonotonous((o) => o.original.startLineNumber < r.original.endLineNumberExclusive) || new me(new D(1, 1), new D(1, 1)), i = Ye(t, (o) => o.modified.startLineNumber < r.modified.endLineNumberExclusive);
|
|
7380
7380
|
return s !== i;
|
|
7381
7381
|
}), e;
|
|
7382
7382
|
}
|
|
7383
7383
|
function fs(t, e, n) {
|
|
7384
7384
|
let r = n;
|
|
7385
|
-
return r = ms(t, e, r), r = ms(t, e, r), r =
|
|
7385
|
+
return r = ms(t, e, r), r = ms(t, e, r), r = Co(t, e, r), r;
|
|
7386
7386
|
}
|
|
7387
7387
|
function ms(t, e, n) {
|
|
7388
7388
|
if (n.length === 0)
|
|
@@ -7398,7 +7398,7 @@ function ms(t, e, n) {
|
|
|
7398
7398
|
for (c = 1; c <= u && !(t.getElement(o.seq1Range.start - c) !== t.getElement(o.seq1Range.endExclusive - c) || e.getElement(o.seq2Range.start - c) !== e.getElement(o.seq2Range.endExclusive - c)); c++)
|
|
7399
7399
|
;
|
|
7400
7400
|
if (c--, c === u) {
|
|
7401
|
-
r[r.length - 1] = new
|
|
7401
|
+
r[r.length - 1] = new X(new U(a.seq1Range.start, o.seq1Range.endExclusive - u), new U(a.seq2Range.start, o.seq2Range.endExclusive - u));
|
|
7402
7402
|
continue;
|
|
7403
7403
|
}
|
|
7404
7404
|
o = o.delta(-c);
|
|
@@ -7415,7 +7415,7 @@ function ms(t, e, n) {
|
|
|
7415
7415
|
for (c = 0; c < u && !(!t.isStronglyEqual(o.seq1Range.start + c, o.seq1Range.endExclusive + c) || !e.isStronglyEqual(o.seq2Range.start + c, o.seq2Range.endExclusive + c)); c++)
|
|
7416
7416
|
;
|
|
7417
7417
|
if (c === u) {
|
|
7418
|
-
r[i + 1] = new
|
|
7418
|
+
r[i + 1] = new X(new U(o.seq1Range.start + u, a.seq1Range.endExclusive), new U(o.seq2Range.start + u, a.seq2Range.endExclusive));
|
|
7419
7419
|
continue;
|
|
7420
7420
|
}
|
|
7421
7421
|
c > 0 && (o = o.delta(c));
|
|
@@ -7424,7 +7424,7 @@ function ms(t, e, n) {
|
|
|
7424
7424
|
}
|
|
7425
7425
|
return r.length > 0 && s.push(r[r.length - 1]), s;
|
|
7426
7426
|
}
|
|
7427
|
-
function
|
|
7427
|
+
function Co(t, e, n) {
|
|
7428
7428
|
if (!t.getBoundaryScore || !e.getBoundaryScore)
|
|
7429
7429
|
return n;
|
|
7430
7430
|
for (let r = 0; r < n.length; r++) {
|
|
@@ -7450,7 +7450,7 @@ function ds(t, e, n, r, s) {
|
|
|
7450
7450
|
}
|
|
7451
7451
|
return t.delta(u);
|
|
7452
7452
|
}
|
|
7453
|
-
function
|
|
7453
|
+
function Ao(t, e, n) {
|
|
7454
7454
|
const r = [];
|
|
7455
7455
|
for (const s of n) {
|
|
7456
7456
|
const i = r[r.length - 1];
|
|
@@ -7458,12 +7458,12 @@ function Ro(t, e, n) {
|
|
|
7458
7458
|
r.push(s);
|
|
7459
7459
|
continue;
|
|
7460
7460
|
}
|
|
7461
|
-
s.seq1Range.start - i.seq1Range.endExclusive <= 2 || s.seq2Range.start - i.seq2Range.endExclusive <= 2 ? r[r.length - 1] = new
|
|
7461
|
+
s.seq1Range.start - i.seq1Range.endExclusive <= 2 || s.seq2Range.start - i.seq2Range.endExclusive <= 2 ? r[r.length - 1] = new X(i.seq1Range.join(s.seq1Range), i.seq2Range.join(s.seq2Range)) : r.push(s);
|
|
7462
7462
|
}
|
|
7463
7463
|
return r;
|
|
7464
7464
|
}
|
|
7465
7465
|
function gs(t, e, n, r, s = !1) {
|
|
7466
|
-
const i =
|
|
7466
|
+
const i = X.invert(n, t.length), a = [];
|
|
7467
7467
|
let o = new ge(0, 0);
|
|
7468
7468
|
function u(h, f) {
|
|
7469
7469
|
if (h.offset1 < o.offset1 || h.offset2 < o.offset2)
|
|
@@ -7471,15 +7471,15 @@ function gs(t, e, n, r, s = !1) {
|
|
|
7471
7471
|
const m = r(t, h.offset1), p = r(e, h.offset2);
|
|
7472
7472
|
if (!m || !p)
|
|
7473
7473
|
return;
|
|
7474
|
-
let d = new
|
|
7474
|
+
let d = new X(m, p);
|
|
7475
7475
|
const g = d.intersect(f);
|
|
7476
7476
|
let w = g.seq1Range.length, y = g.seq2Range.length;
|
|
7477
7477
|
for (; i.length > 0; ) {
|
|
7478
7478
|
const v = i[0];
|
|
7479
7479
|
if (!(v.seq1Range.intersects(d.seq1Range) || v.seq2Range.intersects(d.seq2Range)))
|
|
7480
7480
|
break;
|
|
7481
|
-
const
|
|
7482
|
-
if (w += x.seq1Range.length, y += x.seq2Range.length, d = d.join(
|
|
7481
|
+
const A = r(t, v.seq1Range.start), F = r(e, v.seq2Range.start), B = new X(A, F), x = B.intersect(v);
|
|
7482
|
+
if (w += x.seq1Range.length, y += x.seq2Range.length, d = d.join(B), d.seq1Range.endExclusive >= v.seq1Range.endExclusive)
|
|
7483
7483
|
i.shift();
|
|
7484
7484
|
else
|
|
7485
7485
|
break;
|
|
@@ -7490,9 +7490,9 @@ function gs(t, e, n, r, s = !1) {
|
|
|
7490
7490
|
const h = i.shift();
|
|
7491
7491
|
h.seq1Range.isEmpty || (u(h.getStarts(), h), u(h.getEndExclusives().delta(-1), h));
|
|
7492
7492
|
}
|
|
7493
|
-
return
|
|
7493
|
+
return Ro(n, a);
|
|
7494
7494
|
}
|
|
7495
|
-
function
|
|
7495
|
+
function Ro(t, e) {
|
|
7496
7496
|
const n = [];
|
|
7497
7497
|
for (; t.length > 0 || e.length > 0; ) {
|
|
7498
7498
|
const r = t[0], s = e[0];
|
|
@@ -7542,11 +7542,11 @@ function To(t, e, n) {
|
|
|
7542
7542
|
const v = t.getText(w).trim();
|
|
7543
7543
|
if (v.length > 20 || v.split(/\r\n|\r|\n/).length > 1)
|
|
7544
7544
|
return !1;
|
|
7545
|
-
const N = t.countLinesIn(d.seq1Range),
|
|
7545
|
+
const N = t.countLinesIn(d.seq1Range), A = d.seq1Range.length, F = e.countLinesIn(d.seq2Range), B = d.seq2Range.length, x = t.countLinesIn(g.seq1Range), L = g.seq1Range.length, k = e.countLinesIn(g.seq2Range), I = g.seq2Range.length, V = 130;
|
|
7546
7546
|
function _(S) {
|
|
7547
7547
|
return Math.min(S, V);
|
|
7548
7548
|
}
|
|
7549
|
-
return Math.pow(Math.pow(_(N * 40 +
|
|
7549
|
+
return Math.pow(Math.pow(_(N * 40 + A), 1.5) + Math.pow(_(F * 40 + B), 1.5), 1.5) + Math.pow(Math.pow(_(x * 40 + L), 1.5) + Math.pow(_(k * 40 + I), 1.5), 1.5) > (V ** 1.5) ** 1.5 * 1.3;
|
|
7550
7550
|
};
|
|
7551
7551
|
var o = m;
|
|
7552
7552
|
const h = r[c], f = u[u.length - 1];
|
|
@@ -7564,7 +7564,7 @@ function To(t, e, n) {
|
|
|
7564
7564
|
m(d) && (f = f.deltaStart(-d.length));
|
|
7565
7565
|
const g = t.getText(new U(c.seq1Range.endExclusive, p.endExclusive));
|
|
7566
7566
|
m(g) && (f = f.deltaEnd(g.length));
|
|
7567
|
-
const w =
|
|
7567
|
+
const w = X.fromOffsetPairs(u ? u.getEndExclusives() : ge.zero, h ? h.getStarts() : ge.max), y = f.intersect(w);
|
|
7568
7568
|
a.length > 0 && y.getStarts().equals(a[a.length - 1].getEndExclusives()) ? a[a.length - 1] = a[a.length - 1].join(y) : a.push(y);
|
|
7569
7569
|
}), a;
|
|
7570
7570
|
}
|
|
@@ -7605,8 +7605,8 @@ class Po {
|
|
|
7605
7605
|
return new kt([], [], !1);
|
|
7606
7606
|
if (e.length === 1 && e[0].length === 0 || n.length === 1 && n[0].length === 0)
|
|
7607
7607
|
return new kt([
|
|
7608
|
-
new
|
|
7609
|
-
new he(new
|
|
7608
|
+
new ve(new D(1, e.length + 1), new D(1, n.length + 1), [
|
|
7609
|
+
new he(new C(1, 1, e.length, e[e.length - 1].length + 1), new C(1, 1, n.length, n[n.length - 1].length + 1))
|
|
7610
7610
|
])
|
|
7611
7611
|
], [], !1);
|
|
7612
7612
|
const s = r.maxComputationTimeMs === 0 ? pt.instance : new bo(r.maxComputationTimeMs), i = !r.ignoreTrimWhitespace, a = /* @__PURE__ */ new Map();
|
|
@@ -7622,7 +7622,7 @@ class Po {
|
|
|
7622
7622
|
for (let L = 0; L < x; L++) {
|
|
7623
7623
|
const k = y + L, I = v + L;
|
|
7624
7624
|
if (e[k] !== n[I]) {
|
|
7625
|
-
const V = this.refineDiff(e, n, new
|
|
7625
|
+
const V = this.refineDiff(e, n, new X(new U(k, k + 1), new U(I, I + 1)), s, i, r);
|
|
7626
7626
|
for (const _ of V.mappings)
|
|
7627
7627
|
g.push(_);
|
|
7628
7628
|
V.hitTimeout && (d = !0);
|
|
@@ -7631,7 +7631,7 @@ class Po {
|
|
|
7631
7631
|
};
|
|
7632
7632
|
let y = 0, v = 0;
|
|
7633
7633
|
for (const x of p) {
|
|
7634
|
-
|
|
7634
|
+
At(() => x.seq1Range.start - y === x.seq2Range.start - v);
|
|
7635
7635
|
const L = x.seq1Range.start - y;
|
|
7636
7636
|
w(L), y = x.seq1Range.endExclusive, v = x.seq2Range.endExclusive;
|
|
7637
7637
|
const k = this.refineDiff(e, n, x, s, i, r);
|
|
@@ -7640,9 +7640,9 @@ class Po {
|
|
|
7640
7640
|
g.push(I);
|
|
7641
7641
|
}
|
|
7642
7642
|
w(e.length - y);
|
|
7643
|
-
const N = new _t(e),
|
|
7644
|
-
let
|
|
7645
|
-
return r.computeMoves && (
|
|
7643
|
+
const N = new _t(e), A = new _t(n), F = ss(g, N, A);
|
|
7644
|
+
let B = [];
|
|
7645
|
+
return r.computeMoves && (B = this.computeMoves(F, e, n, u, c, s, i, r)), At(() => {
|
|
7646
7646
|
function x(k, I) {
|
|
7647
7647
|
if (k.lineNumber < 1 || k.lineNumber > I.length)
|
|
7648
7648
|
return !1;
|
|
@@ -7662,18 +7662,18 @@ class Po {
|
|
|
7662
7662
|
return !1;
|
|
7663
7663
|
}
|
|
7664
7664
|
return !0;
|
|
7665
|
-
}), new kt(F,
|
|
7665
|
+
}), new kt(F, B, d);
|
|
7666
7666
|
}
|
|
7667
7667
|
computeMoves(e, n, r, s, i, a, o, u) {
|
|
7668
7668
|
return Lo(e, n, r, s, i, a).map((f) => {
|
|
7669
|
-
const m = this.refineDiff(n, r, new
|
|
7669
|
+
const m = this.refineDiff(n, r, new X(f.original.toOffsetRange(), f.modified.toOffsetRange()), a, o, u), p = ss(m.mappings, new _t(n), new _t(r), !0);
|
|
7670
7670
|
return new Ya(f, p);
|
|
7671
7671
|
});
|
|
7672
7672
|
}
|
|
7673
7673
|
refineDiff(e, n, r, s, i, a) {
|
|
7674
|
-
const u = Fo(r).toRangeMapping2(e, n), c = new
|
|
7674
|
+
const u = Fo(r).toRangeMapping2(e, n), c = new $t(e, u.originalRange, i), h = new $t(n, u.modifiedRange, i), f = c.length + h.length < 500 ? this.dynamicProgrammingDiffing.compute(c, h, s) : this.myersDiffingAlgorithm.compute(c, h, s);
|
|
7675
7675
|
let m = f.diffs;
|
|
7676
|
-
return m = fs(c, h, m), m = gs(c, h, m, (d, g) => d.findWordContaining(g)), a.extendToSubwords && (m = gs(c, h, m, (d, g) => d.findSubWordContaining(g), !0)), m =
|
|
7676
|
+
return m = fs(c, h, m), m = gs(c, h, m, (d, g) => d.findWordContaining(g)), a.extendToSubwords && (m = gs(c, h, m, (d, g) => d.findSubWordContaining(g), !0)), m = Ao(c, h, m), m = To(c, h, m), {
|
|
7677
7677
|
mappings: m.map((d) => new he(c.translateRange(d.seq1Range), h.translateRange(d.seq2Range))),
|
|
7678
7678
|
hitTimeout: f.hitTimeout
|
|
7679
7679
|
};
|
|
@@ -7686,13 +7686,13 @@ const ws = {
|
|
|
7686
7686
|
getLegacy: () => new fo(),
|
|
7687
7687
|
getDefault: () => new Po()
|
|
7688
7688
|
};
|
|
7689
|
-
function
|
|
7689
|
+
function Re(t, e) {
|
|
7690
7690
|
const n = Math.pow(10, e);
|
|
7691
7691
|
return Math.round(t * n) / n;
|
|
7692
7692
|
}
|
|
7693
7693
|
class b {
|
|
7694
7694
|
constructor(e, n, r, s = 1) {
|
|
7695
|
-
this._rgbaBrand = void 0, this.r = Math.min(255, Math.max(0, e)) | 0, this.g = Math.min(255, Math.max(0, n)) | 0, this.b = Math.min(255, Math.max(0, r)) | 0, this.a =
|
|
7695
|
+
this._rgbaBrand = void 0, this.r = Math.min(255, Math.max(0, e)) | 0, this.g = Math.min(255, Math.max(0, n)) | 0, this.b = Math.min(255, Math.max(0, r)) | 0, this.a = Re(Math.max(Math.min(1, s), 0), 3);
|
|
7696
7696
|
}
|
|
7697
7697
|
static equals(e, n) {
|
|
7698
7698
|
return e.r === n.r && e.g === n.g && e.b === n.b && e.a === n.a;
|
|
@@ -7700,7 +7700,7 @@ class b {
|
|
|
7700
7700
|
}
|
|
7701
7701
|
class fe {
|
|
7702
7702
|
constructor(e, n, r, s) {
|
|
7703
|
-
this._hslaBrand = void 0, this.h = Math.max(Math.min(360, e), 0) | 0, this.s =
|
|
7703
|
+
this._hslaBrand = void 0, this.h = Math.max(Math.min(360, e), 0) | 0, this.s = Re(Math.max(Math.min(1, n), 0), 3), this.l = Re(Math.max(Math.min(1, r), 0), 3), this.a = Re(Math.max(Math.min(1, s), 0), 3);
|
|
7704
7704
|
}
|
|
7705
7705
|
static equals(e, n) {
|
|
7706
7706
|
return e.h === n.h && e.s === n.s && e.l === n.l && e.a === n.a;
|
|
@@ -7752,9 +7752,9 @@ class fe {
|
|
|
7752
7752
|
return new b(Math.round(a * 255), Math.round(o * 255), Math.round(u * 255), i);
|
|
7753
7753
|
}
|
|
7754
7754
|
}
|
|
7755
|
-
class
|
|
7755
|
+
class Ge {
|
|
7756
7756
|
constructor(e, n, r, s) {
|
|
7757
|
-
this._hsvaBrand = void 0, this.h = Math.max(Math.min(360, e), 0) | 0, this.s =
|
|
7757
|
+
this._hsvaBrand = void 0, this.h = Math.max(Math.min(360, e), 0) | 0, this.s = Re(Math.max(Math.min(1, n), 0), 3), this.v = Re(Math.max(Math.min(1, r), 0), 3), this.a = Re(Math.max(Math.min(1, s), 0), 3);
|
|
7758
7758
|
}
|
|
7759
7759
|
static equals(e, n) {
|
|
7760
7760
|
return e.h === n.h && e.s === n.s && e.v === n.v && e.a === n.a;
|
|
@@ -7763,7 +7763,7 @@ class je {
|
|
|
7763
7763
|
static fromRGBA(e) {
|
|
7764
7764
|
const n = e.r / 255, r = e.g / 255, s = e.b / 255, i = Math.max(n, r, s), a = Math.min(n, r, s), o = i - a, u = i === 0 ? 0 : o / i;
|
|
7765
7765
|
let c;
|
|
7766
|
-
return o === 0 ? c = 0 : i === n ? c = ((r - s) / o % 6 + 6) % 6 : i === r ? c = (s - n) / o + 2 : c = (n - r) / o + 4, new
|
|
7766
|
+
return o === 0 ? c = 0 : i === n ? c = ((r - s) / o % 6 + 6) % 6 : i === r ? c = (s - n) / o + 2 : c = (n - r) / o + 4, new Ge(Math.round(c * 60), u, i, e.a);
|
|
7767
7767
|
}
|
|
7768
7768
|
// from http://www.rapidtables.com/convert/color/hsv-to-rgb.htm
|
|
7769
7769
|
static toRGBA(e) {
|
|
@@ -7783,7 +7783,7 @@ class G {
|
|
|
7783
7783
|
return this._hsla ? this._hsla : fe.fromRGBA(this.rgba);
|
|
7784
7784
|
}
|
|
7785
7785
|
get hsva() {
|
|
7786
|
-
return this._hsva ? this._hsva :
|
|
7786
|
+
return this._hsva ? this._hsva : Ge.fromRGBA(this.rgba);
|
|
7787
7787
|
}
|
|
7788
7788
|
constructor(e) {
|
|
7789
7789
|
if (e)
|
|
@@ -7791,14 +7791,14 @@ class G {
|
|
|
7791
7791
|
this.rgba = e;
|
|
7792
7792
|
else if (e instanceof fe)
|
|
7793
7793
|
this._hsla = e, this.rgba = fe.toRGBA(e);
|
|
7794
|
-
else if (e instanceof
|
|
7795
|
-
this._hsva = e, this.rgba =
|
|
7794
|
+
else if (e instanceof Ge)
|
|
7795
|
+
this._hsva = e, this.rgba = Ge.toRGBA(e);
|
|
7796
7796
|
else
|
|
7797
7797
|
throw new Error("Invalid color ctor argument");
|
|
7798
7798
|
else throw new Error("Color needs a value");
|
|
7799
7799
|
}
|
|
7800
7800
|
equals(e) {
|
|
7801
|
-
return !!e && b.equals(this.rgba, e.rgba) && fe.equals(this.hsla, e.hsla) &&
|
|
7801
|
+
return !!e && b.equals(this.rgba, e.rgba) && fe.equals(this.hsla, e.hsla) && Ge.equals(this.hsva, e.hsva);
|
|
7802
7802
|
}
|
|
7803
7803
|
/**
|
|
7804
7804
|
* http://www.w3.org/TR/WCAG20/#relativeluminancedef
|
|
@@ -7806,7 +7806,7 @@ class G {
|
|
|
7806
7806
|
*/
|
|
7807
7807
|
getRelativeLuminance() {
|
|
7808
7808
|
const e = G._relativeLuminanceForComponent(this.rgba.r), n = G._relativeLuminanceForComponent(this.rgba.g), r = G._relativeLuminanceForComponent(this.rgba.b), s = 0.2126 * e + 0.7152 * n + 0.0722 * r;
|
|
7809
|
-
return
|
|
7809
|
+
return Re(s, 4);
|
|
7810
7810
|
}
|
|
7811
7811
|
static _relativeLuminanceForComponent(e) {
|
|
7812
7812
|
const n = e / 255;
|
|
@@ -7951,8 +7951,8 @@ class G {
|
|
|
7951
7951
|
const w = g.match(/rgba\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+), *(?<a>(?:\+|-)?\d+(\.\d+)?)\)/);
|
|
7952
7952
|
if (!w)
|
|
7953
7953
|
throw new Error("Invalid color format " + g);
|
|
7954
|
-
const y = parseInt(w.groups?.r ?? "0"), v = parseInt(w.groups?.g ?? "0"), N = parseInt(w.groups?.b ?? "0"),
|
|
7955
|
-
return new t(new b(y, v, N,
|
|
7954
|
+
const y = parseInt(w.groups?.r ?? "0"), v = parseInt(w.groups?.g ?? "0"), N = parseInt(w.groups?.b ?? "0"), A = parseFloat(w.groups?.a ?? "0");
|
|
7955
|
+
return new t(new b(y, v, N, A));
|
|
7956
7956
|
}
|
|
7957
7957
|
if (g.startsWith("rgb(")) {
|
|
7958
7958
|
const w = g.match(/rgb\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+)\)/);
|
|
@@ -8275,16 +8275,16 @@ class G {
|
|
|
8275
8275
|
return new t(new b(y, v, N, 1));
|
|
8276
8276
|
}
|
|
8277
8277
|
if (w === 9) {
|
|
8278
|
-
const y = 16 * d(g.charCodeAt(1)) + d(g.charCodeAt(2)), v = 16 * d(g.charCodeAt(3)) + d(g.charCodeAt(4)), N = 16 * d(g.charCodeAt(5)) + d(g.charCodeAt(6)),
|
|
8279
|
-
return new t(new b(y, v, N,
|
|
8278
|
+
const y = 16 * d(g.charCodeAt(1)) + d(g.charCodeAt(2)), v = 16 * d(g.charCodeAt(3)) + d(g.charCodeAt(4)), N = 16 * d(g.charCodeAt(5)) + d(g.charCodeAt(6)), A = 16 * d(g.charCodeAt(7)) + d(g.charCodeAt(8));
|
|
8279
|
+
return new t(new b(y, v, N, A / 255));
|
|
8280
8280
|
}
|
|
8281
8281
|
if (w === 4) {
|
|
8282
8282
|
const y = d(g.charCodeAt(1)), v = d(g.charCodeAt(2)), N = d(g.charCodeAt(3));
|
|
8283
8283
|
return new t(new b(16 * y + y, 16 * v + v, 16 * N + N));
|
|
8284
8284
|
}
|
|
8285
8285
|
if (w === 5) {
|
|
8286
|
-
const y = d(g.charCodeAt(1)), v = d(g.charCodeAt(2)), N = d(g.charCodeAt(3)),
|
|
8287
|
-
return new t(new b(16 * y + y, 16 * v + v, 16 * N + N, (16 *
|
|
8286
|
+
const y = d(g.charCodeAt(1)), v = d(g.charCodeAt(2)), N = d(g.charCodeAt(3)), A = d(g.charCodeAt(4));
|
|
8287
|
+
return new t(new b(16 * y + y, 16 * v + v, 16 * N + N, (16 * A + A) / 255));
|
|
8288
8288
|
}
|
|
8289
8289
|
return null;
|
|
8290
8290
|
}
|
|
@@ -8357,7 +8357,7 @@ function Tn(t, e, n, r) {
|
|
|
8357
8357
|
alpha: r
|
|
8358
8358
|
};
|
|
8359
8359
|
}
|
|
8360
|
-
function
|
|
8360
|
+
function rt(t, e) {
|
|
8361
8361
|
const n = e.index, r = e[0].length;
|
|
8362
8362
|
if (n === void 0)
|
|
8363
8363
|
return;
|
|
@@ -8397,11 +8397,11 @@ function xs(t, e, n) {
|
|
|
8397
8397
|
color: Tn(a.rgba.r, a.rgba.g, a.rgba.b, a.rgba.a)
|
|
8398
8398
|
};
|
|
8399
8399
|
}
|
|
8400
|
-
function
|
|
8400
|
+
function st(t, e) {
|
|
8401
8401
|
return typeof t == "string" ? [...t.matchAll(e)] : t.findMatches(e);
|
|
8402
8402
|
}
|
|
8403
8403
|
function Do(t) {
|
|
8404
|
-
const e = [], r =
|
|
8404
|
+
const e = [], r = st(t, /\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|^(#)([A-Fa-f0-9]{3})\b|^(#)([A-Fa-f0-9]{4})\b|^(#)([A-Fa-f0-9]{6})\b|^(#)([A-Fa-f0-9]{8})\b|(?<=['"\s])(#)([A-Fa-f0-9]{3})\b|(?<=['"\s])(#)([A-Fa-f0-9]{4})\b|(?<=['"\s])(#)([A-Fa-f0-9]{6})\b|(?<=['"\s])(#)([A-Fa-f0-9]{8})\b/gm);
|
|
8405
8405
|
if (r.length > 0)
|
|
8406
8406
|
for (const s of r) {
|
|
8407
8407
|
const i = s.filter((c) => c !== void 0), a = i[1], o = i[2];
|
|
@@ -8410,25 +8410,25 @@ function Do(t) {
|
|
|
8410
8410
|
let u;
|
|
8411
8411
|
if (a === "rgb") {
|
|
8412
8412
|
const c = /^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;
|
|
8413
|
-
u = ys(
|
|
8413
|
+
u = ys(rt(t, s), st(o, c), !1);
|
|
8414
8414
|
} else if (a === "rgba") {
|
|
8415
8415
|
const c = /^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;
|
|
8416
|
-
u = ys(
|
|
8416
|
+
u = ys(rt(t, s), st(o, c), !0);
|
|
8417
8417
|
} else if (a === "hsl") {
|
|
8418
8418
|
const c = /^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;
|
|
8419
|
-
u = xs(
|
|
8419
|
+
u = xs(rt(t, s), st(o, c), !1);
|
|
8420
8420
|
} else if (a === "hsla") {
|
|
8421
8421
|
const c = /^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm;
|
|
8422
|
-
u = xs(
|
|
8423
|
-
} else a === "#" && (u = Io(
|
|
8422
|
+
u = xs(rt(t, s), st(o, c), !0);
|
|
8423
|
+
} else a === "#" && (u = Io(rt(t, s), a + o));
|
|
8424
8424
|
u && e.push(u);
|
|
8425
8425
|
}
|
|
8426
8426
|
return e;
|
|
8427
8427
|
}
|
|
8428
|
-
function
|
|
8428
|
+
function $o(t) {
|
|
8429
8429
|
return !t || typeof t.getValue != "function" || typeof t.positionAt != "function" ? [] : Do(t);
|
|
8430
8430
|
}
|
|
8431
|
-
const
|
|
8431
|
+
const Bo = /^-+|-+$/g, _s = 100, Vo = 5;
|
|
8432
8432
|
function qo(t, e) {
|
|
8433
8433
|
let n = [];
|
|
8434
8434
|
if (e.findRegionSectionHeaders && e.foldingRules?.markers) {
|
|
@@ -8477,14 +8477,14 @@ function Wo(t, e) {
|
|
|
8477
8477
|
for (; (h = i.exec(c)) !== null; ) {
|
|
8478
8478
|
const f = c.substring(0, h.index), m = (f.match(/\n/g) || []).length, p = a + m, d = h[0].split(`
|
|
8479
8479
|
`), g = d.length, w = p + g - 1, y = f.lastIndexOf(`
|
|
8480
|
-
`) + 1, v = h.index - y + 1, N = d[d.length - 1],
|
|
8480
|
+
`) + 1, v = h.index - y + 1, N = d[d.length - 1], A = g === 1 ? v + h[0].length : N.length + 1, F = {
|
|
8481
8481
|
startLineNumber: p,
|
|
8482
8482
|
startColumn: v,
|
|
8483
8483
|
endLineNumber: w,
|
|
8484
|
-
endColumn:
|
|
8485
|
-
},
|
|
8484
|
+
endColumn: A
|
|
8485
|
+
}, B = (h.groups ?? {}).label ?? "", x = ((h.groups ?? {}).separator ?? "") !== "", L = {
|
|
8486
8486
|
range: F,
|
|
8487
|
-
text:
|
|
8487
|
+
text: B,
|
|
8488
8488
|
hasSeparatorLine: x,
|
|
8489
8489
|
shouldBeInComments: !0
|
|
8490
8490
|
};
|
|
@@ -8496,9 +8496,9 @@ function Wo(t, e) {
|
|
|
8496
8496
|
function Oo(t) {
|
|
8497
8497
|
t = t.trim();
|
|
8498
8498
|
const e = t.startsWith("-");
|
|
8499
|
-
return t = t.replace(
|
|
8499
|
+
return t = t.replace(Bo, ""), { text: t, hasSeparatorLine: e };
|
|
8500
8500
|
}
|
|
8501
|
-
class
|
|
8501
|
+
class Ho {
|
|
8502
8502
|
get isRejected() {
|
|
8503
8503
|
return this.outcome?.outcome === 1;
|
|
8504
8504
|
}
|
|
@@ -8521,7 +8521,7 @@ class zo {
|
|
|
8521
8521
|
});
|
|
8522
8522
|
}
|
|
8523
8523
|
cancel() {
|
|
8524
|
-
return this.error(new
|
|
8524
|
+
return this.error(new As());
|
|
8525
8525
|
}
|
|
8526
8526
|
}
|
|
8527
8527
|
var Ls;
|
|
@@ -8547,7 +8547,7 @@ var Ls;
|
|
|
8547
8547
|
}
|
|
8548
8548
|
t.withAsyncBody = n;
|
|
8549
8549
|
})(Ls || (Ls = {}));
|
|
8550
|
-
class
|
|
8550
|
+
class zo {
|
|
8551
8551
|
constructor() {
|
|
8552
8552
|
this._unsatisfiedConsumers = [], this._unconsumedValues = [];
|
|
8553
8553
|
}
|
|
@@ -8569,7 +8569,7 @@ class Ho {
|
|
|
8569
8569
|
}
|
|
8570
8570
|
_ensureNoFinalValue() {
|
|
8571
8571
|
if (this._finalValue)
|
|
8572
|
-
throw new
|
|
8572
|
+
throw new ee("ProducerConsumer: cannot produce after final value has been set");
|
|
8573
8573
|
}
|
|
8574
8574
|
_resolveOrRejectDeferred(e, n) {
|
|
8575
8575
|
n.ok ? e.complete(n.value) : e.error(n.error);
|
|
@@ -8579,14 +8579,14 @@ class Ho {
|
|
|
8579
8579
|
const e = this._unconsumedValues.length > 0 ? this._unconsumedValues.shift() : this._finalValue;
|
|
8580
8580
|
return e.ok ? Promise.resolve(e.value) : Promise.reject(e.error);
|
|
8581
8581
|
} else {
|
|
8582
|
-
const e = new
|
|
8582
|
+
const e = new Ho();
|
|
8583
8583
|
return this._unsatisfiedConsumers.push(e), e.p;
|
|
8584
8584
|
}
|
|
8585
8585
|
}
|
|
8586
8586
|
}
|
|
8587
|
-
class
|
|
8587
|
+
class ue {
|
|
8588
8588
|
constructor(e, n) {
|
|
8589
|
-
this._onReturn = n, this._producerConsumer = new
|
|
8589
|
+
this._onReturn = n, this._producerConsumer = new zo(), this._iterator = {
|
|
8590
8590
|
next: () => this._producerConsumer.consume(),
|
|
8591
8591
|
return: () => (this._onReturn?.(), Promise.resolve({ done: !0, value: void 0 })),
|
|
8592
8592
|
throw: async (r) => (this._finishError(r), { done: !0, value: void 0 })
|
|
@@ -8608,22 +8608,22 @@ class oe {
|
|
|
8608
8608
|
});
|
|
8609
8609
|
}
|
|
8610
8610
|
static fromArray(e) {
|
|
8611
|
-
return new
|
|
8611
|
+
return new ue((n) => {
|
|
8612
8612
|
n.emitMany(e);
|
|
8613
8613
|
});
|
|
8614
8614
|
}
|
|
8615
8615
|
static fromPromise(e) {
|
|
8616
|
-
return new
|
|
8616
|
+
return new ue(async (n) => {
|
|
8617
8617
|
n.emitMany(await e);
|
|
8618
8618
|
});
|
|
8619
8619
|
}
|
|
8620
8620
|
static fromPromisesResolveOrder(e) {
|
|
8621
|
-
return new
|
|
8621
|
+
return new ue(async (n) => {
|
|
8622
8622
|
await Promise.all(e.map(async (r) => n.emitOne(await r)));
|
|
8623
8623
|
});
|
|
8624
8624
|
}
|
|
8625
8625
|
static merge(e) {
|
|
8626
|
-
return new
|
|
8626
|
+
return new ue(async (n) => {
|
|
8627
8627
|
await Promise.all(e.map(async (r) => {
|
|
8628
8628
|
for await (const s of r)
|
|
8629
8629
|
n.emitOne(s);
|
|
@@ -8631,31 +8631,31 @@ class oe {
|
|
|
8631
8631
|
});
|
|
8632
8632
|
}
|
|
8633
8633
|
static {
|
|
8634
|
-
this.EMPTY =
|
|
8634
|
+
this.EMPTY = ue.fromArray([]);
|
|
8635
8635
|
}
|
|
8636
8636
|
static map(e, n) {
|
|
8637
|
-
return new
|
|
8637
|
+
return new ue(async (r) => {
|
|
8638
8638
|
for await (const s of e)
|
|
8639
8639
|
r.emitOne(n(s));
|
|
8640
8640
|
});
|
|
8641
8641
|
}
|
|
8642
8642
|
map(e) {
|
|
8643
|
-
return
|
|
8643
|
+
return ue.map(this, e);
|
|
8644
8644
|
}
|
|
8645
8645
|
static coalesce(e) {
|
|
8646
|
-
return
|
|
8646
|
+
return ue.filter(e, (n) => !!n);
|
|
8647
8647
|
}
|
|
8648
8648
|
coalesce() {
|
|
8649
|
-
return
|
|
8649
|
+
return ue.coalesce(this);
|
|
8650
8650
|
}
|
|
8651
8651
|
static filter(e, n) {
|
|
8652
|
-
return new
|
|
8652
|
+
return new ue(async (r) => {
|
|
8653
8653
|
for await (const s of e)
|
|
8654
8654
|
n(s) && r.emitOne(s);
|
|
8655
8655
|
});
|
|
8656
8656
|
}
|
|
8657
8657
|
filter(e) {
|
|
8658
|
-
return
|
|
8658
|
+
return ue.filter(this, e);
|
|
8659
8659
|
}
|
|
8660
8660
|
_finishOk() {
|
|
8661
8661
|
this._producerConsumer.hasFinalValue || this._producerConsumer.produceFinal({ ok: !0, value: { done: !0, value: void 0 } });
|
|
@@ -8672,15 +8672,15 @@ class jo {
|
|
|
8672
8672
|
this.values = e, this.prefixSum = new Uint32Array(e.length), this.prefixSumValidIndex = new Int32Array(1), this.prefixSumValidIndex[0] = -1;
|
|
8673
8673
|
}
|
|
8674
8674
|
insertValues(e, n) {
|
|
8675
|
-
e =
|
|
8675
|
+
e = Ue(e);
|
|
8676
8676
|
const r = this.values, s = this.prefixSum, i = n.length;
|
|
8677
8677
|
return i === 0 ? !1 : (this.values = new Uint32Array(r.length + i), this.values.set(r.subarray(0, e), 0), this.values.set(r.subarray(e), e + i), this.values.set(n, e), e - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = e - 1), this.prefixSum = new Uint32Array(this.values.length), this.prefixSumValidIndex[0] >= 0 && this.prefixSum.set(s.subarray(0, this.prefixSumValidIndex[0] + 1)), !0);
|
|
8678
8678
|
}
|
|
8679
8679
|
setValue(e, n) {
|
|
8680
|
-
return e =
|
|
8680
|
+
return e = Ue(e), n = Ue(n), this.values[e] === n ? !1 : (this.values[e] = n, e - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = e - 1), !0);
|
|
8681
8681
|
}
|
|
8682
8682
|
removeValues(e, n) {
|
|
8683
|
-
e =
|
|
8683
|
+
e = Ue(e), n = Ue(n);
|
|
8684
8684
|
const r = this.values, s = this.prefixSum;
|
|
8685
8685
|
if (e >= r.length)
|
|
8686
8686
|
return !1;
|
|
@@ -8695,7 +8695,7 @@ class jo {
|
|
|
8695
8695
|
* @returns `SUM(0 <= j <= index, values[j])`.
|
|
8696
8696
|
*/
|
|
8697
8697
|
getPrefixSum(e) {
|
|
8698
|
-
return e < 0 ? 0 : (e =
|
|
8698
|
+
return e < 0 ? 0 : (e = Ue(e), this._getPrefixSum(e));
|
|
8699
8699
|
}
|
|
8700
8700
|
_getPrefixSum(e) {
|
|
8701
8701
|
if (e <= this.prefixSumValidIndex[0])
|
|
@@ -8724,7 +8724,7 @@ class Go {
|
|
|
8724
8724
|
this.index = e, this.remainder = n, this._prefixSumIndexOfResultBrand = void 0, this.index = e, this.remainder = n;
|
|
8725
8725
|
}
|
|
8726
8726
|
}
|
|
8727
|
-
class
|
|
8727
|
+
class Qo {
|
|
8728
8728
|
constructor(e, n, r, s) {
|
|
8729
8729
|
this._uri = e, this._lines = n, this._eol = r, this._versionId = s, this._lineStarts = null, this._cachedTextValue = null;
|
|
8730
8730
|
}
|
|
@@ -8741,7 +8741,7 @@ class Xo {
|
|
|
8741
8741
|
e.eol && e.eol !== this._eol && (this._eol = e.eol, this._lineStarts = null);
|
|
8742
8742
|
const n = e.changes;
|
|
8743
8743
|
for (const r of n)
|
|
8744
|
-
this._acceptDeleteRange(r.range), this._acceptInsertText(new
|
|
8744
|
+
this._acceptDeleteRange(r.range), this._acceptInsertText(new O(r.range.startLineNumber, r.range.startColumn), r.text);
|
|
8745
8745
|
this._versionId = e.versionId, this._cachedTextValue = null;
|
|
8746
8746
|
}
|
|
8747
8747
|
_ensureLineStarts() {
|
|
@@ -8770,7 +8770,7 @@ class Xo {
|
|
|
8770
8770
|
_acceptInsertText(e, n) {
|
|
8771
8771
|
if (n.length === 0)
|
|
8772
8772
|
return;
|
|
8773
|
-
const r =
|
|
8773
|
+
const r = $i(n);
|
|
8774
8774
|
if (r.length === 1) {
|
|
8775
8775
|
this._setLineText(e.lineNumber - 1, this._lines[e.lineNumber - 1].substring(0, e.column - 1) + r[0] + this._lines[e.lineNumber - 1].substring(e.column - 1));
|
|
8776
8776
|
return;
|
|
@@ -8782,7 +8782,7 @@ class Xo {
|
|
|
8782
8782
|
this._lineStarts && this._lineStarts.insertValues(e.lineNumber, s);
|
|
8783
8783
|
}
|
|
8784
8784
|
}
|
|
8785
|
-
class
|
|
8785
|
+
class Xo {
|
|
8786
8786
|
constructor() {
|
|
8787
8787
|
this._models = /* @__PURE__ */ Object.create(null);
|
|
8788
8788
|
}
|
|
@@ -8794,7 +8794,7 @@ class Qo {
|
|
|
8794
8794
|
return Object.keys(this._models).forEach((n) => e.push(this._models[n])), e;
|
|
8795
8795
|
}
|
|
8796
8796
|
$acceptNewModel(e) {
|
|
8797
|
-
this._models[e.url] = new Jo(
|
|
8797
|
+
this._models[e.url] = new Jo($e.parse(e.url), e.lines, e.EOL, e.versionId);
|
|
8798
8798
|
}
|
|
8799
8799
|
$acceptModelChanged(e, n) {
|
|
8800
8800
|
if (!this._models[e])
|
|
@@ -8805,7 +8805,7 @@ class Qo {
|
|
|
8805
8805
|
this._models[e] && delete this._models[e];
|
|
8806
8806
|
}
|
|
8807
8807
|
}
|
|
8808
|
-
class Jo extends
|
|
8808
|
+
class Jo extends Qo {
|
|
8809
8809
|
get uri() {
|
|
8810
8810
|
return this._uri;
|
|
8811
8811
|
}
|
|
@@ -8818,7 +8818,7 @@ class Jo extends Xo {
|
|
|
8818
8818
|
findMatches(e) {
|
|
8819
8819
|
const n = [];
|
|
8820
8820
|
for (let r = 0; r < this._lines.length; r++) {
|
|
8821
|
-
const s = this._lines[r], i = this.offsetAt(new
|
|
8821
|
+
const s = this._lines[r], i = this.offsetAt(new O(r + 1, 1)), a = s.matchAll(e);
|
|
8822
8822
|
for (const o of a)
|
|
8823
8823
|
(o.index || o.index === 0) && (o.index = o.index + i), n.push(o);
|
|
8824
8824
|
}
|
|
@@ -8835,7 +8835,7 @@ class Jo extends Xo {
|
|
|
8835
8835
|
}
|
|
8836
8836
|
getWordAtPosition(e, n) {
|
|
8837
8837
|
const r = Mn(e.column, Os(n), this._lines[e.lineNumber - 1], 0);
|
|
8838
|
-
return r ? new
|
|
8838
|
+
return r ? new C(e.lineNumber, r.startColumn, e.lineNumber, r.endColumn) : null;
|
|
8839
8839
|
}
|
|
8840
8840
|
words(e) {
|
|
8841
8841
|
const n = this._lines, r = this._wordenize.bind(this);
|
|
@@ -8900,7 +8900,7 @@ class Jo extends Xo {
|
|
|
8900
8900
|
} : e;
|
|
8901
8901
|
}
|
|
8902
8902
|
_validatePosition(e) {
|
|
8903
|
-
if (!
|
|
8903
|
+
if (!O.isIPosition(e))
|
|
8904
8904
|
throw new Error("bad position");
|
|
8905
8905
|
let { lineNumber: n, column: r } = e, s = !1;
|
|
8906
8906
|
if (n < 1)
|
|
@@ -8914,9 +8914,9 @@ class Jo extends Xo {
|
|
|
8914
8914
|
return s ? { lineNumber: n, column: r } : e;
|
|
8915
8915
|
}
|
|
8916
8916
|
}
|
|
8917
|
-
class
|
|
8917
|
+
class lt {
|
|
8918
8918
|
constructor(e = null) {
|
|
8919
|
-
this._foreignModule = e, this._requestHandlerBrand = void 0, this._workerTextModelSyncServer = new
|
|
8919
|
+
this._foreignModule = e, this._requestHandlerBrand = void 0, this._workerTextModelSyncServer = new Xo();
|
|
8920
8920
|
}
|
|
8921
8921
|
dispose() {
|
|
8922
8922
|
}
|
|
@@ -8949,7 +8949,7 @@ class ot {
|
|
|
8949
8949
|
// ---- BEGIN diff --------------------------------------------------------------------------
|
|
8950
8950
|
async $computeDiff(e, n, r, s) {
|
|
8951
8951
|
const i = this._getModel(e), a = this._getModel(n);
|
|
8952
|
-
return !i || !a ? null :
|
|
8952
|
+
return !i || !a ? null : lt.computeDiff(i, a, r, s);
|
|
8953
8953
|
}
|
|
8954
8954
|
static computeDiff(e, n, r, s) {
|
|
8955
8955
|
const i = s === "advanced" ? ws.getDefault() : ws.getLegacy(), a = e.getLinesContent(), o = n.getLinesContent(), u = i.computeDiff(a, o, r), c = u.changes.length > 0 ? !1 : this._modelsAreIdentical(e, n);
|
|
@@ -9000,25 +9000,25 @@ class ot {
|
|
|
9000
9000
|
let a;
|
|
9001
9001
|
n = n.slice(0).sort((u, c) => {
|
|
9002
9002
|
if (u.range && c.range)
|
|
9003
|
-
return
|
|
9003
|
+
return C.compareRangesUsingStarts(u.range, c.range);
|
|
9004
9004
|
const h = u.range ? 0 : 1, f = c.range ? 0 : 1;
|
|
9005
9005
|
return h - f;
|
|
9006
9006
|
});
|
|
9007
9007
|
let o = 0;
|
|
9008
9008
|
for (let u = 1; u < n.length; u++)
|
|
9009
|
-
|
|
9009
|
+
C.getEndPosition(n[o].range).equals(C.getStartPosition(n[u].range)) ? (n[o].range = C.fromPositions(C.getStartPosition(n[o].range), C.getEndPosition(n[u].range)), n[o].text += n[u].text) : (o++, n[o] = n[u]);
|
|
9010
9010
|
n.length = o + 1;
|
|
9011
9011
|
for (let { range: u, text: c, eol: h } of n) {
|
|
9012
|
-
if (typeof h == "number" && (a = h),
|
|
9012
|
+
if (typeof h == "number" && (a = h), C.isEmpty(u) && !c)
|
|
9013
9013
|
continue;
|
|
9014
9014
|
const f = s.getValueInRange(u);
|
|
9015
9015
|
if (c = c.replace(/\r\n|\n|\r/g, s.eol), f === c)
|
|
9016
9016
|
continue;
|
|
9017
|
-
if (Math.max(c.length, f.length) >
|
|
9017
|
+
if (Math.max(c.length, f.length) > lt._diffLimit) {
|
|
9018
9018
|
i.push({ range: u, text: c });
|
|
9019
9019
|
continue;
|
|
9020
9020
|
}
|
|
9021
|
-
const m = na(f, c, r), p = s.offsetAt(
|
|
9021
|
+
const m = na(f, c, r), p = s.offsetAt(C.lift(u).getStartPosition());
|
|
9022
9022
|
for (const d of m) {
|
|
9023
9023
|
const g = s.positionAt(p + d.originalStart), w = s.positionAt(p + d.originalStart + d.originalLength), y = {
|
|
9024
9024
|
text: c.substr(d.modifiedStart, d.modifiedLength),
|
|
@@ -9037,7 +9037,7 @@ class ot {
|
|
|
9037
9037
|
// --- BEGIN default document colors -----------------------------------------------------------
|
|
9038
9038
|
async $computeDefaultDocumentColors(e) {
|
|
9039
9039
|
const n = this._getModel(e);
|
|
9040
|
-
return n ?
|
|
9040
|
+
return n ? $o(n) : null;
|
|
9041
9041
|
}
|
|
9042
9042
|
static {
|
|
9043
9043
|
this._suggestionsLimit = 1e4;
|
|
@@ -9048,7 +9048,7 @@ class ot {
|
|
|
9048
9048
|
const c = this._getModel(u);
|
|
9049
9049
|
if (c) {
|
|
9050
9050
|
for (const h of c.words(a))
|
|
9051
|
-
if (!(h === n || !isNaN(Number(h))) && (o.add(h), o.size >
|
|
9051
|
+
if (!(h === n || !isNaN(Number(h))) && (o.add(h), o.size > lt._suggestionsLimit))
|
|
9052
9052
|
break e;
|
|
9053
9053
|
}
|
|
9054
9054
|
}
|
|
@@ -9093,7 +9093,7 @@ class ot {
|
|
|
9093
9093
|
if (!c)
|
|
9094
9094
|
return null;
|
|
9095
9095
|
const h = a.getValueInRange(c);
|
|
9096
|
-
return
|
|
9096
|
+
return An.INSTANCE.navigateValueSet(n, u, c, h, r);
|
|
9097
9097
|
}
|
|
9098
9098
|
// ---- BEGIN foreign module support --------------------------------------------------------------------------
|
|
9099
9099
|
// foreign method request
|
|
@@ -9107,22 +9107,22 @@ class ot {
|
|
|
9107
9107
|
}
|
|
9108
9108
|
}
|
|
9109
9109
|
}
|
|
9110
|
-
typeof importScripts == "function" && (globalThis.monaco =
|
|
9111
|
-
class
|
|
9110
|
+
typeof importScripts == "function" && (globalThis.monaco = $a());
|
|
9111
|
+
class Bt {
|
|
9112
9112
|
static {
|
|
9113
9113
|
this.CHANNEL_NAME = "editorWorkerHost";
|
|
9114
9114
|
}
|
|
9115
9115
|
static getChannel(e) {
|
|
9116
|
-
return e.getChannel(
|
|
9116
|
+
return e.getChannel(Bt.CHANNEL_NAME);
|
|
9117
9117
|
}
|
|
9118
9118
|
static setChannel(e, n) {
|
|
9119
|
-
e.setChannel(
|
|
9119
|
+
e.setChannel(Bt.CHANNEL_NAME, n);
|
|
9120
9120
|
}
|
|
9121
9121
|
}
|
|
9122
|
-
function
|
|
9122
|
+
function Qs(t) {
|
|
9123
9123
|
let e;
|
|
9124
9124
|
const n = ea((r) => {
|
|
9125
|
-
const s =
|
|
9125
|
+
const s = Bt.getChannel(r), a = {
|
|
9126
9126
|
host: new Proxy({}, {
|
|
9127
9127
|
get(o, u, c) {
|
|
9128
9128
|
if (u !== "then") {
|
|
@@ -9134,23 +9134,23 @@ function Xs(t) {
|
|
|
9134
9134
|
}),
|
|
9135
9135
|
getMirrorModels: () => n.requestHandler.getModels()
|
|
9136
9136
|
};
|
|
9137
|
-
return e = t(a), new
|
|
9137
|
+
return e = t(a), new lt(e);
|
|
9138
9138
|
});
|
|
9139
9139
|
return e;
|
|
9140
9140
|
}
|
|
9141
|
-
let
|
|
9141
|
+
let Xs = !1;
|
|
9142
9142
|
function Zo() {
|
|
9143
|
-
return
|
|
9143
|
+
return Xs;
|
|
9144
9144
|
}
|
|
9145
9145
|
function Yo(t) {
|
|
9146
|
-
|
|
9147
|
-
|
|
9146
|
+
Xs = !0, self.onmessage = (e) => {
|
|
9147
|
+
Qs((n) => t(n, e.data));
|
|
9148
9148
|
};
|
|
9149
9149
|
}
|
|
9150
9150
|
self.onmessage = () => {
|
|
9151
|
-
Zo() ||
|
|
9151
|
+
Zo() || Qs(() => ({}));
|
|
9152
9152
|
};
|
|
9153
|
-
class
|
|
9153
|
+
class dt {
|
|
9154
9154
|
constructor(e, n, r, s) {
|
|
9155
9155
|
this._uri = e, this._languageId = n, this._version = r, this._content = s, this._lineOffsets = void 0;
|
|
9156
9156
|
}
|
|
@@ -9172,7 +9172,7 @@ class mt {
|
|
|
9172
9172
|
}
|
|
9173
9173
|
update(e, n) {
|
|
9174
9174
|
for (const r of e)
|
|
9175
|
-
if (
|
|
9175
|
+
if (dt.isIncremental(r)) {
|
|
9176
9176
|
const s = Zs(r.range), i = this.offsetAt(s.start), a = this.offsetAt(s.end);
|
|
9177
9177
|
this._content = this._content.substring(0, i) + r.text + this._content.substring(a, this._content.length);
|
|
9178
9178
|
const o = Math.max(s.start.line, 0), u = Math.max(s.end.line, 0);
|
|
@@ -9187,7 +9187,7 @@ class mt {
|
|
|
9187
9187
|
if (f !== 0)
|
|
9188
9188
|
for (let m = o + 1 + h.length, p = c.length; m < p; m++)
|
|
9189
9189
|
c[m] = c[m] + f;
|
|
9190
|
-
} else if (
|
|
9190
|
+
} else if (dt.isFull(r))
|
|
9191
9191
|
this._content = r.text, this._lineOffsets = void 0;
|
|
9192
9192
|
else
|
|
9193
9193
|
throw new Error("Unknown change event received");
|
|
@@ -9241,11 +9241,11 @@ class mt {
|
|
|
9241
9241
|
var Ln;
|
|
9242
9242
|
(function(t) {
|
|
9243
9243
|
function e(s, i, a, o) {
|
|
9244
|
-
return new
|
|
9244
|
+
return new dt(s, i, a, o);
|
|
9245
9245
|
}
|
|
9246
9246
|
t.create = e;
|
|
9247
9247
|
function n(s, i, a) {
|
|
9248
|
-
if (s instanceof
|
|
9248
|
+
if (s instanceof dt)
|
|
9249
9249
|
return s.update(i, a), s;
|
|
9250
9250
|
throw new Error("TextDocument.update: document must be created by TextDocument.create");
|
|
9251
9251
|
}
|
|
@@ -9300,13 +9300,13 @@ function Ko(t) {
|
|
|
9300
9300
|
const e = Zs(t.range);
|
|
9301
9301
|
return e !== t.range ? { newText: t.newText, range: e } : t;
|
|
9302
9302
|
}
|
|
9303
|
-
class
|
|
9303
|
+
class le extends Error {
|
|
9304
9304
|
constructor(e, n, r, s = {}) {
|
|
9305
9305
|
super(e), this.name = "SqlParseError", this.start = n, this.end = r, this.expected = s.expected, this.found = s.found;
|
|
9306
9306
|
}
|
|
9307
9307
|
}
|
|
9308
9308
|
function Ys(t) {
|
|
9309
|
-
return t instanceof
|
|
9309
|
+
return t instanceof le;
|
|
9310
9310
|
}
|
|
9311
9311
|
const Ks = /* @__PURE__ */ Symbol("sqlNodeSpan"), el = (t) => {
|
|
9312
9312
|
const e = /* @__PURE__ */ new Set();
|
|
@@ -9431,7 +9431,7 @@ const Ks = /* @__PURE__ */ Symbol("sqlNodeSpan"), el = (t) => {
|
|
|
9431
9431
|
o += 1;
|
|
9432
9432
|
let y = d;
|
|
9433
9433
|
if (o >= u)
|
|
9434
|
-
throw new
|
|
9434
|
+
throw new le(`Unexpected character '${d}' at ${w}.`, w, Math.min(w + 1, u), {
|
|
9435
9435
|
found: { kind: "punctuation", value: d }
|
|
9436
9436
|
});
|
|
9437
9437
|
if (p(t[o]))
|
|
@@ -9441,7 +9441,7 @@ const Ks = /* @__PURE__ */ Symbol("sqlNodeSpan"), el = (t) => {
|
|
|
9441
9441
|
for (; o < u && m(t[o]); )
|
|
9442
9442
|
y += t[o], o += 1;
|
|
9443
9443
|
else
|
|
9444
|
-
throw new
|
|
9444
|
+
throw new le(`Unexpected character '${d}' at ${w}.`, w, Math.min(w + 1, u), {
|
|
9445
9445
|
found: { kind: "punctuation", value: d }
|
|
9446
9446
|
});
|
|
9447
9447
|
h("identifier", y, w, o);
|
|
@@ -9458,7 +9458,7 @@ const Ks = /* @__PURE__ */ Symbol("sqlNodeSpan"), el = (t) => {
|
|
|
9458
9458
|
o += 1, h("punctuation", d, w, o);
|
|
9459
9459
|
continue;
|
|
9460
9460
|
}
|
|
9461
|
-
throw new
|
|
9461
|
+
throw new le(`Unexpected character '${d}' at ${o}.`, o, Math.min(o + 1, u), {
|
|
9462
9462
|
found: { kind: "punctuation", value: d }
|
|
9463
9463
|
});
|
|
9464
9464
|
}
|
|
@@ -9475,7 +9475,7 @@ function Ns(t, e, n) {
|
|
|
9475
9475
|
configurable: !1
|
|
9476
9476
|
}), t;
|
|
9477
9477
|
}
|
|
9478
|
-
function
|
|
9478
|
+
function Q(t) {
|
|
9479
9479
|
return t[Ks] ?? null;
|
|
9480
9480
|
}
|
|
9481
9481
|
function ze(t, e, n) {
|
|
@@ -9530,11 +9530,17 @@ function il(t) {
|
|
|
9530
9530
|
case "binary":
|
|
9531
9531
|
n(a.left), n(a.right);
|
|
9532
9532
|
return;
|
|
9533
|
+
case "case":
|
|
9534
|
+
a.operand && n(a.operand);
|
|
9535
|
+
for (const o of a.when)
|
|
9536
|
+
i(o), n(o.when), n(o.then);
|
|
9537
|
+
a.else && n(a.else);
|
|
9538
|
+
return;
|
|
9533
9539
|
case "cast":
|
|
9534
9540
|
n(a.expression);
|
|
9535
9541
|
return;
|
|
9536
9542
|
case "functionCall":
|
|
9537
|
-
a.args.forEach(n);
|
|
9543
|
+
n(a.name), a.args.forEach(n);
|
|
9538
9544
|
return;
|
|
9539
9545
|
case "grouped":
|
|
9540
9546
|
n(a.expression);
|
|
@@ -9577,7 +9583,7 @@ function il(t) {
|
|
|
9577
9583
|
for (const o of a.orderBy ?? [])
|
|
9578
9584
|
i(o), n(o.expression);
|
|
9579
9585
|
}, i = (a) => {
|
|
9580
|
-
const o =
|
|
9586
|
+
const o = Q(a);
|
|
9581
9587
|
o && e.push({ node: a, span: o });
|
|
9582
9588
|
};
|
|
9583
9589
|
return t.forEach(s), e;
|
|
@@ -9665,7 +9671,7 @@ class hl {
|
|
|
9665
9671
|
if (this.matchWord("FETCH")) {
|
|
9666
9672
|
if (!this.matchWord("FIRST") && !this.matchWord("NEXT")) {
|
|
9667
9673
|
const p = this.peek(), d = this.getErrorRangeForToken(p);
|
|
9668
|
-
throw new
|
|
9674
|
+
throw new le(`Expected keyword FIRST at ${p.start}.`, d.start, d.end, {
|
|
9669
9675
|
expected: { kind: "keyword", value: "FIRST" },
|
|
9670
9676
|
found: { kind: p.kind, value: p.value }
|
|
9671
9677
|
});
|
|
@@ -9674,7 +9680,7 @@ class hl {
|
|
|
9674
9680
|
this.advance();
|
|
9675
9681
|
else {
|
|
9676
9682
|
const p = this.peek(), d = this.getErrorRangeForToken(p);
|
|
9677
|
-
throw new
|
|
9683
|
+
throw new le(`Expected keyword ROWS at ${p.start}.`, d.start, d.end, {
|
|
9678
9684
|
expected: { kind: "keyword", value: "ROWS" },
|
|
9679
9685
|
found: { kind: p.kind, value: p.value }
|
|
9680
9686
|
});
|
|
@@ -9752,7 +9758,7 @@ class hl {
|
|
|
9752
9758
|
if (this.matchPunctuation("(")) {
|
|
9753
9759
|
if (this.tokens[this.index - 1], !this.peekKeyword("SELECT")) {
|
|
9754
9760
|
const i = this.peek(), a = this.getErrorRangeForToken(i);
|
|
9755
|
-
throw new
|
|
9761
|
+
throw new le(`Expected keyword SELECT at ${i.start}.`, a.start, a.end, {
|
|
9756
9762
|
expected: { kind: "keyword", value: "SELECT" },
|
|
9757
9763
|
found: { kind: i.kind, value: i.value }
|
|
9758
9764
|
});
|
|
@@ -9792,7 +9798,7 @@ class hl {
|
|
|
9792
9798
|
parseOr() {
|
|
9793
9799
|
let e = this.parseAnd();
|
|
9794
9800
|
for (; this.matchKeyword("OR"); ) {
|
|
9795
|
-
const n = this.parseAnd(), r =
|
|
9801
|
+
const n = this.parseAnd(), r = Q(e), s = Q(n), i = r?.start ?? this.peek().start, a = s?.end ?? this.lastConsumedEnd(i);
|
|
9796
9802
|
e = this.markNode({ type: "binary", operator: "OR", left: e, right: n }, i, a);
|
|
9797
9803
|
}
|
|
9798
9804
|
return e;
|
|
@@ -9800,7 +9806,7 @@ class hl {
|
|
|
9800
9806
|
parseAnd() {
|
|
9801
9807
|
let e = this.parseComparison();
|
|
9802
9808
|
for (; this.matchKeyword("AND"); ) {
|
|
9803
|
-
const n = this.parseComparison(), r =
|
|
9809
|
+
const n = this.parseComparison(), r = Q(e), s = Q(n), i = r?.start ?? this.peek().start, a = s?.end ?? this.lastConsumedEnd(i);
|
|
9804
9810
|
e = this.markNode({ type: "binary", operator: "AND", left: e, right: n }, i, a);
|
|
9805
9811
|
}
|
|
9806
9812
|
return e;
|
|
@@ -9810,28 +9816,28 @@ class hl {
|
|
|
9810
9816
|
for (; ; ) {
|
|
9811
9817
|
const n = this.matchOperator(["=", "<>", "!=", "<", "<=", ">", ">="]);
|
|
9812
9818
|
if (n) {
|
|
9813
|
-
const r = this.parseConcat(), s =
|
|
9819
|
+
const r = this.parseConcat(), s = Q(e), i = Q(r), a = s?.start ?? this.peek().start, o = i?.end ?? this.lastConsumedEnd(a);
|
|
9814
9820
|
e = this.markNode({ type: "binary", operator: n, left: e, right: r }, a, o);
|
|
9815
9821
|
continue;
|
|
9816
9822
|
}
|
|
9817
9823
|
if (this.matchKeyword("LIKE")) {
|
|
9818
|
-
const r = this.parseConcat(), s = this.matchWord("ESCAPE") ? this.expect("string").value : void 0, i =
|
|
9824
|
+
const r = this.parseConcat(), s = this.matchWord("ESCAPE") ? this.expect("string").value : void 0, i = Q(e), a = Q(r), o = i?.start ?? this.peek().start, u = this.lastConsumedEnd(a?.end ?? o);
|
|
9819
9825
|
e = this.markNode({ type: "binary", operator: "LIKE", left: e, right: r, escape: s }, o, u);
|
|
9820
9826
|
continue;
|
|
9821
9827
|
}
|
|
9822
9828
|
if (this.peekKeyword("NOT") && this.peekKeyword("IN", 1)) {
|
|
9823
9829
|
this.advance(), this.advance();
|
|
9824
|
-
const r = this.parseInList(), s =
|
|
9830
|
+
const r = this.parseInList(), s = Q(e), i = Q(r), a = s?.start ?? this.peek().start, o = i?.end ?? this.lastConsumedEnd(a);
|
|
9825
9831
|
e = this.markNode({ type: "binary", operator: "NOT IN", left: e, right: r }, a, o);
|
|
9826
9832
|
continue;
|
|
9827
9833
|
}
|
|
9828
9834
|
if (this.matchKeyword("IN")) {
|
|
9829
|
-
const r = this.parseInList(), s =
|
|
9835
|
+
const r = this.parseInList(), s = Q(e), i = Q(r), a = s?.start ?? this.peek().start, o = i?.end ?? this.lastConsumedEnd(a);
|
|
9830
9836
|
e = this.markNode({ type: "binary", operator: "IN", left: e, right: r }, a, o);
|
|
9831
9837
|
continue;
|
|
9832
9838
|
}
|
|
9833
9839
|
if (this.matchKeyword("IS")) {
|
|
9834
|
-
const r = this.matchKeyword("NOT") ? "IS NOT" : "IS", s = this.parseConcat(), i =
|
|
9840
|
+
const r = this.matchKeyword("NOT") ? "IS NOT" : "IS", s = this.parseConcat(), i = Q(e), a = Q(s), o = i?.start ?? this.peek().start, u = a?.end ?? this.lastConsumedEnd(o);
|
|
9835
9841
|
e = this.markNode({ type: "binary", operator: r, left: e, right: s }, o, u);
|
|
9836
9842
|
continue;
|
|
9837
9843
|
}
|
|
@@ -9845,7 +9851,7 @@ class hl {
|
|
|
9845
9851
|
const n = this.matchOperator(["||"]);
|
|
9846
9852
|
if (!n)
|
|
9847
9853
|
break;
|
|
9848
|
-
const r = this.parseAddSub(), s =
|
|
9854
|
+
const r = this.parseAddSub(), s = Q(e), i = Q(r), a = s?.start ?? this.peek().start, o = i?.end ?? this.lastConsumedEnd(a);
|
|
9849
9855
|
e = this.markNode({ type: "binary", operator: n, left: e, right: r }, a, o);
|
|
9850
9856
|
}
|
|
9851
9857
|
return e;
|
|
@@ -9856,7 +9862,7 @@ class hl {
|
|
|
9856
9862
|
const n = this.matchOperator(["+", "-"]);
|
|
9857
9863
|
if (!n)
|
|
9858
9864
|
break;
|
|
9859
|
-
const r = this.parseMulDiv(), s =
|
|
9865
|
+
const r = this.parseMulDiv(), s = Q(e), i = Q(r), a = s?.start ?? this.peek().start, o = i?.end ?? this.lastConsumedEnd(a);
|
|
9860
9866
|
e = this.markNode({ type: "binary", operator: n, left: e, right: r }, a, o);
|
|
9861
9867
|
}
|
|
9862
9868
|
return e;
|
|
@@ -9867,7 +9873,7 @@ class hl {
|
|
|
9867
9873
|
const n = this.matchOperator(["*", "/", "%"]);
|
|
9868
9874
|
if (!n)
|
|
9869
9875
|
break;
|
|
9870
|
-
const r = this.parseUnary(), s =
|
|
9876
|
+
const r = this.parseUnary(), s = Q(e), i = Q(r), a = s?.start ?? this.peek().start, o = i?.end ?? this.lastConsumedEnd(a);
|
|
9871
9877
|
e = this.markNode({ type: "binary", operator: n, left: e, right: r }, a, o);
|
|
9872
9878
|
}
|
|
9873
9879
|
return e;
|
|
@@ -9875,12 +9881,12 @@ class hl {
|
|
|
9875
9881
|
parseUnary() {
|
|
9876
9882
|
const e = this.peek().start;
|
|
9877
9883
|
if (this.matchKeyword("NOT")) {
|
|
9878
|
-
const r = this.parseUnary(), s =
|
|
9884
|
+
const r = this.parseUnary(), s = Q(r)?.end ?? this.lastConsumedEnd(e);
|
|
9879
9885
|
return this.markNode({ type: "unary", operator: "NOT", operand: r }, e, s);
|
|
9880
9886
|
}
|
|
9881
9887
|
const n = this.matchOperator(["+", "-"]);
|
|
9882
9888
|
if (n) {
|
|
9883
|
-
const r = this.parseUnary(), s =
|
|
9889
|
+
const r = this.parseUnary(), s = Q(r)?.end ?? this.lastConsumedEnd(e);
|
|
9884
9890
|
return this.markNode({ type: "unary", operator: n, operand: r }, e, s);
|
|
9885
9891
|
}
|
|
9886
9892
|
return this.parsePrimary();
|
|
@@ -9901,70 +9907,95 @@ class hl {
|
|
|
9901
9907
|
e.end
|
|
9902
9908
|
);
|
|
9903
9909
|
if ((this.peekWord("DATE") || this.peekWord("TIMESTAMP")) && this.tokens[this.index + 1]?.kind === "string") {
|
|
9904
|
-
const
|
|
9910
|
+
const s = this.advance(), i = this.expect("string"), a = s.value.toUpperCase();
|
|
9905
9911
|
return this.markNode(
|
|
9906
|
-
{ type: "typedLiteral", dataType:
|
|
9907
|
-
|
|
9908
|
-
|
|
9912
|
+
{ type: "typedLiteral", dataType: a, value: i.value },
|
|
9913
|
+
s.start,
|
|
9914
|
+
i.end
|
|
9909
9915
|
);
|
|
9910
9916
|
}
|
|
9911
9917
|
if (e.kind === "identifier" && (e.value.startsWith(":") || e.value.startsWith("@")))
|
|
9912
9918
|
return this.advance(), this.markNode({ type: "bindParameter", token: e.value }, e.start, e.end);
|
|
9913
9919
|
if (this.matchOperator(["*"])) {
|
|
9914
|
-
const
|
|
9915
|
-
return this.markNode({ type: "wildcard" },
|
|
9920
|
+
const s = this.tokens[this.index - 1];
|
|
9921
|
+
return this.markNode({ type: "wildcard" }, s.start, s.end);
|
|
9916
9922
|
}
|
|
9923
|
+
if (this.matchKeyword("CASE"))
|
|
9924
|
+
return this.parseCaseExpression(e.start);
|
|
9917
9925
|
if (e.kind === "punctuation" && e.value === "(") {
|
|
9918
|
-
const
|
|
9926
|
+
const s = this.advance();
|
|
9919
9927
|
if (this.peekKeyword("SELECT")) {
|
|
9920
|
-
const
|
|
9921
|
-
return this.expectPunctuation(")"), this.markNode({ type: "subquery", query:
|
|
9928
|
+
const a = this.parseSelectStatement();
|
|
9929
|
+
return this.expectPunctuation(")"), this.markNode({ type: "subquery", query: a }, s.start, this.lastConsumedEnd(s.start));
|
|
9922
9930
|
}
|
|
9923
|
-
const
|
|
9924
|
-
return this.expectPunctuation(")"), this.markNode({ type: "grouped", expression:
|
|
9931
|
+
const i = this.parseExpression();
|
|
9932
|
+
return this.expectPunctuation(")"), this.markNode({ type: "grouped", expression: i }, s.start, this.lastConsumedEnd(s.start));
|
|
9925
9933
|
}
|
|
9926
|
-
const n = this.peek().start, r = this.
|
|
9934
|
+
const n = this.peek().start, r = this.parseQualifiedIdentifierExpression();
|
|
9935
|
+
if (r.type === "wildcard")
|
|
9936
|
+
return r;
|
|
9927
9937
|
if (this.matchPunctuation("(")) {
|
|
9928
|
-
if (r.toUpperCase() === "CAST") {
|
|
9929
|
-
const
|
|
9938
|
+
if ((r.type === "identifier" ? r.name.toUpperCase() : void 0) === "CAST") {
|
|
9939
|
+
const a = this.parseExpression();
|
|
9930
9940
|
this.expectKeyword("AS");
|
|
9931
|
-
const
|
|
9932
|
-
let
|
|
9941
|
+
const o = this.parseIdentifier();
|
|
9942
|
+
let u;
|
|
9933
9943
|
if (this.matchPunctuation("(")) {
|
|
9934
|
-
|
|
9944
|
+
u = [];
|
|
9935
9945
|
do {
|
|
9936
|
-
const
|
|
9937
|
-
|
|
9946
|
+
const c = this.expect("number");
|
|
9947
|
+
u.push(Number(c.value));
|
|
9938
9948
|
} while (this.matchPunctuation(","));
|
|
9939
9949
|
this.expectPunctuation(")");
|
|
9940
9950
|
}
|
|
9941
9951
|
return this.expectPunctuation(")"), this.markNode(
|
|
9942
|
-
{ type: "cast", expression:
|
|
9952
|
+
{ type: "cast", expression: a, dataType: o, dataTypeParams: u },
|
|
9943
9953
|
n,
|
|
9944
9954
|
this.lastConsumedEnd(n)
|
|
9945
9955
|
);
|
|
9946
9956
|
}
|
|
9947
|
-
const
|
|
9957
|
+
const i = [];
|
|
9948
9958
|
if (!this.matchPunctuation(")")) {
|
|
9949
9959
|
do
|
|
9950
9960
|
if (this.matchOperator(["*"])) {
|
|
9951
|
-
const
|
|
9952
|
-
|
|
9961
|
+
const a = this.tokens[this.index - 1];
|
|
9962
|
+
i.push(this.markNode({ type: "wildcard" }, a.start, a.end));
|
|
9953
9963
|
} else
|
|
9954
|
-
|
|
9964
|
+
i.push(this.parseExpression());
|
|
9955
9965
|
while (this.matchPunctuation(","));
|
|
9956
9966
|
this.expectPunctuation(")");
|
|
9957
9967
|
}
|
|
9958
|
-
return this.markNode({ type: "functionCall", name: r, args:
|
|
9968
|
+
return this.markNode({ type: "functionCall", name: r, args: i }, n, this.lastConsumedEnd(n));
|
|
9959
9969
|
}
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9970
|
+
return r;
|
|
9971
|
+
}
|
|
9972
|
+
parseQualifiedIdentifierExpression() {
|
|
9973
|
+
const e = this.peek().start, n = [this.parseIdentifier()];
|
|
9974
|
+
for (; this.matchPunctuation("."); ) {
|
|
9975
|
+
if (this.matchOperator(["*"]))
|
|
9976
|
+
return this.markNode({ type: "wildcard", qualifier: n }, e, this.lastConsumedEnd(e));
|
|
9977
|
+
n.push(this.parseIdentifier());
|
|
9978
|
+
}
|
|
9979
|
+
const r = this.lastConsumedEnd(e);
|
|
9980
|
+
return n.length === 1 ? this.markNode({ type: "identifier", name: n[0] }, e, r) : this.markNode({ type: "qualifiedIdentifier", parts: n }, e, r);
|
|
9981
|
+
}
|
|
9982
|
+
parseCaseExpression(e) {
|
|
9983
|
+
const n = this.peekKeyword("WHEN") ? void 0 : this.parseExpression(), r = [];
|
|
9984
|
+
for (; this.matchKeyword("WHEN"); ) {
|
|
9985
|
+
const i = this.tokens[this.index - 1].start, a = this.parseExpression();
|
|
9986
|
+
this.expectKeyword("THEN");
|
|
9987
|
+
const o = this.parseExpression();
|
|
9988
|
+
r.push(this.markNode({ when: a, then: o }, i, this.lastConsumedEnd(i)));
|
|
9989
|
+
}
|
|
9990
|
+
if (r.length === 0) {
|
|
9991
|
+
const i = this.peek(), a = this.getErrorRangeForToken(i);
|
|
9992
|
+
throw new le(`Expected keyword WHEN at ${i.start}.`, a.start, a.end, {
|
|
9993
|
+
expected: { kind: "keyword", value: "WHEN" },
|
|
9994
|
+
found: { kind: i.kind, value: i.value }
|
|
9995
|
+
});
|
|
9996
|
+
}
|
|
9997
|
+
const s = this.matchKeyword("ELSE") ? this.parseExpression() : void 0;
|
|
9998
|
+
return this.expectKeyword("END"), this.markNode({ type: "case", operand: n, when: r, else: s }, e, this.lastConsumedEnd(e));
|
|
9968
9999
|
}
|
|
9969
10000
|
parseInList() {
|
|
9970
10001
|
const e = this.peek().start;
|
|
@@ -9983,7 +10014,7 @@ class hl {
|
|
|
9983
10014
|
if (e.kind === "identifier" || e.kind === "keyword")
|
|
9984
10015
|
return this.advance(), e.value;
|
|
9985
10016
|
const n = this.getErrorRangeForToken(e);
|
|
9986
|
-
throw new
|
|
10017
|
+
throw new le(`Expected identifier at ${e.start}.`, n.start, n.end, {
|
|
9987
10018
|
expected: { kind: "identifier" },
|
|
9988
10019
|
found: { kind: e.kind, value: e.value }
|
|
9989
10020
|
});
|
|
@@ -10050,7 +10081,7 @@ class hl {
|
|
|
10050
10081
|
const n = this.peek();
|
|
10051
10082
|
if (n.kind !== e) {
|
|
10052
10083
|
const r = this.getErrorRangeForToken(n);
|
|
10053
|
-
throw new
|
|
10084
|
+
throw new le(`Expected ${e} at ${n.start}.`, r.start, r.end, {
|
|
10054
10085
|
expected: { kind: e },
|
|
10055
10086
|
found: { kind: n.kind, value: n.value }
|
|
10056
10087
|
});
|
|
@@ -10067,7 +10098,7 @@ class hl {
|
|
|
10067
10098
|
expectKeyword(e) {
|
|
10068
10099
|
if (!this.matchKeyword(e)) {
|
|
10069
10100
|
const n = this.peek(), r = this.getErrorRangeForToken(n);
|
|
10070
|
-
throw new
|
|
10101
|
+
throw new le(`Expected keyword ${e} at ${n.start}.`, r.start, r.end, {
|
|
10071
10102
|
expected: { kind: "keyword", value: e },
|
|
10072
10103
|
found: { kind: n.kind, value: n.value }
|
|
10073
10104
|
});
|
|
@@ -10076,7 +10107,7 @@ class hl {
|
|
|
10076
10107
|
expectWord(e) {
|
|
10077
10108
|
if (!this.matchWord(e)) {
|
|
10078
10109
|
const n = this.peek(), r = this.getErrorRangeForToken(n);
|
|
10079
|
-
throw new
|
|
10110
|
+
throw new le(`Expected keyword ${e} at ${n.start}.`, r.start, r.end, {
|
|
10080
10111
|
expected: { kind: "keyword", value: e },
|
|
10081
10112
|
found: { kind: n.kind, value: n.value }
|
|
10082
10113
|
});
|
|
@@ -10093,7 +10124,7 @@ class hl {
|
|
|
10093
10124
|
expectPunctuation(e) {
|
|
10094
10125
|
if (!this.matchPunctuation(e)) {
|
|
10095
10126
|
const n = this.peek(), r = this.getErrorRangeForToken(n);
|
|
10096
|
-
throw new
|
|
10127
|
+
throw new le(`Expected '${e}' at ${n.start}.`, r.start, r.end, {
|
|
10097
10128
|
expected: { kind: "punctuation", value: e },
|
|
10098
10129
|
found: { kind: n.kind, value: n.value }
|
|
10099
10130
|
});
|
|
@@ -10206,7 +10237,7 @@ const pl = (t, e) => {
|
|
|
10206
10237
|
}, ti = {
|
|
10207
10238
|
Error: 8
|
|
10208
10239
|
};
|
|
10209
|
-
function
|
|
10240
|
+
function Je(t) {
|
|
10210
10241
|
return t.trim().toLowerCase();
|
|
10211
10242
|
}
|
|
10212
10243
|
function Ss(t) {
|
|
@@ -10236,66 +10267,66 @@ const vl = /^[A-Za-z_][A-Za-z0-9_$]*$/u, Nl = {
|
|
|
10236
10267
|
}, Sl = {
|
|
10237
10268
|
indent: " ",
|
|
10238
10269
|
keywordCase: "upper"
|
|
10239
|
-
},
|
|
10270
|
+
}, re = `
|
|
10240
10271
|
`;
|
|
10241
10272
|
function kl(t, e, n = {}) {
|
|
10242
|
-
return
|
|
10273
|
+
return El(Pn(t, e), e, n);
|
|
10243
10274
|
}
|
|
10244
|
-
function
|
|
10275
|
+
function El(t, e, n = {}) {
|
|
10245
10276
|
const r = { ...Sl, ...n }, s = {
|
|
10246
10277
|
dialect: e,
|
|
10247
10278
|
keywordSet: new Set(e.keywords.map((i) => i.toUpperCase())),
|
|
10248
10279
|
options: r
|
|
10249
10280
|
};
|
|
10250
|
-
return t.body.map((i) => Ot(i, s)).join(`;${
|
|
10281
|
+
return t.body.map((i) => Ot(i, s)).join(`;${re}${re}`);
|
|
10251
10282
|
}
|
|
10252
10283
|
function Ot(t, e) {
|
|
10253
10284
|
const n = [];
|
|
10254
|
-
t.with && t.with.length > 0 && (n.push(
|
|
10285
|
+
t.with && t.with.length > 0 && (n.push(W("WITH", e)), n.push(
|
|
10255
10286
|
...Lt(
|
|
10256
|
-
t.with.map((s) =>
|
|
10287
|
+
t.with.map((s) => Cl(s, e)),
|
|
10257
10288
|
e
|
|
10258
10289
|
)
|
|
10259
10290
|
));
|
|
10260
|
-
const r =
|
|
10261
|
-
return n.push(t.distinct ? `${r} ${
|
|
10291
|
+
const r = W("SELECT", e);
|
|
10292
|
+
return n.push(t.distinct ? `${r} ${W("DISTINCT", e)}` : r), n.push(
|
|
10262
10293
|
...Lt(
|
|
10263
|
-
t.columns.map((s) =>
|
|
10294
|
+
t.columns.map((s) => Al(s, e)),
|
|
10264
10295
|
e
|
|
10265
10296
|
)
|
|
10266
|
-
), t.from && t.from.length > 0 && (n.push(
|
|
10297
|
+
), t.from && t.from.length > 0 && (n.push(W("FROM", e)), n.push(...Rl(t.from, e))), t.where && n.push(...Es("WHERE", t.where, e)), t.groupBy && t.groupBy.length > 0 && (n.push(`${W("GROUP", e)} ${W("BY", e)}`), n.push(
|
|
10267
10298
|
...Lt(
|
|
10268
|
-
t.groupBy.map((s) =>
|
|
10299
|
+
t.groupBy.map((s) => K(s, e)),
|
|
10269
10300
|
e
|
|
10270
10301
|
)
|
|
10271
|
-
)), t.having && n.push(...
|
|
10302
|
+
)), t.having && n.push(...Es("HAVING", t.having, e)), t.orderBy && t.orderBy.length > 0 && (n.push(`${W("ORDER", e)} ${W("BY", e)}`), n.push(
|
|
10272
10303
|
...Lt(
|
|
10273
10304
|
t.orderBy.map(
|
|
10274
|
-
(s) => `${
|
|
10305
|
+
(s) => `${K(s.expression, e)} ${W(s.direction, e)}`
|
|
10275
10306
|
),
|
|
10276
10307
|
e
|
|
10277
10308
|
)
|
|
10278
|
-
)), typeof t.offset == "number" && n.push(`${
|
|
10279
|
-
`${
|
|
10280
|
-
), typeof t.limit == "number" && n.push(`${
|
|
10281
|
-
}
|
|
10282
|
-
function
|
|
10283
|
-
const n = t.columns?.length ? `(${t.columns.map((s) =>
|
|
10284
|
-
return
|
|
10285
|
-
`${
|
|
10309
|
+
)), typeof t.offset == "number" && n.push(`${W("OFFSET", e)} ${String(t.offset)} ${W("ROWS", e)}`), typeof t.fetchFirst == "number" && n.push(
|
|
10310
|
+
`${W("FETCH", e)} ${W("FIRST", e)} ${String(t.fetchFirst)} ${W("ROWS", e)} ${W("ONLY", e)}`
|
|
10311
|
+
), typeof t.limit == "number" && n.push(`${W("LIMIT", e)} ${String(t.limit)}`), et(n.join(re), t, e);
|
|
10312
|
+
}
|
|
10313
|
+
function Cl(t, e) {
|
|
10314
|
+
const n = t.columns?.length ? `(${t.columns.map((s) => we(s, e)).join(", ")})` : "", r = qt(Ot(t.query, e), e, !0);
|
|
10315
|
+
return et(
|
|
10316
|
+
`${we(t.name, e)}${n} ${W("AS", e)} ${r}`,
|
|
10286
10317
|
t,
|
|
10287
10318
|
e
|
|
10288
10319
|
);
|
|
10289
10320
|
}
|
|
10290
|
-
function
|
|
10291
|
-
const n =
|
|
10292
|
-
return t.alias ?
|
|
10293
|
-
`${r} ${
|
|
10321
|
+
function Al(t, e) {
|
|
10322
|
+
const n = K(t.expression, e), r = Il(n), s = n.slice(r.length);
|
|
10323
|
+
return t.alias ? et(
|
|
10324
|
+
`${r} ${W("AS", e)} ${we(t.alias, e)}${s}`,
|
|
10294
10325
|
t,
|
|
10295
10326
|
e
|
|
10296
|
-
) :
|
|
10327
|
+
) : et(n, t, e);
|
|
10297
10328
|
}
|
|
10298
|
-
function
|
|
10329
|
+
function Rl(t, e) {
|
|
10299
10330
|
const n = [];
|
|
10300
10331
|
for (const [r, s] of t.entries()) {
|
|
10301
10332
|
if (r > 0 && n.length > 0) {
|
|
@@ -10308,18 +10339,18 @@ function El(t, e) {
|
|
|
10308
10339
|
}
|
|
10309
10340
|
function Ml(t, e) {
|
|
10310
10341
|
const n = [];
|
|
10311
|
-
n.push(
|
|
10342
|
+
n.push(Be(ni(t, e), e.options.indent));
|
|
10312
10343
|
for (const r of t.joins ?? [])
|
|
10313
|
-
n.push(
|
|
10314
|
-
return
|
|
10344
|
+
n.push(Be(Tl(r, e), e.options.indent));
|
|
10345
|
+
return et(n.join(re), t, e, e.options.indent).split(re);
|
|
10315
10346
|
}
|
|
10316
10347
|
function Tl(t, e) {
|
|
10317
|
-
const n =
|
|
10348
|
+
const n = W("JOIN", e), s = `${W(t.type, e)} ${n} `, i = ni(t.table, e), a = `${s}${i}`;
|
|
10318
10349
|
if (t.on)
|
|
10319
|
-
return `${a} ${
|
|
10350
|
+
return `${a} ${W("ON", e)} ${K(t.on, e)}`;
|
|
10320
10351
|
if (t.using && t.using.length > 0) {
|
|
10321
|
-
const o = t.using.map((u) =>
|
|
10322
|
-
return `${a} ${
|
|
10352
|
+
const o = t.using.map((u) => we(u, e)).join(", ");
|
|
10353
|
+
return `${a} ${W("USING", e)} (${o})`;
|
|
10323
10354
|
}
|
|
10324
10355
|
return a;
|
|
10325
10356
|
}
|
|
@@ -10330,44 +10361,51 @@ function ni(t, e) {
|
|
|
10330
10361
|
return `${Dl(t.name, e)}${ks(t.alias, e)}`;
|
|
10331
10362
|
throw new Error("Invalid table reference: expected table name or subquery");
|
|
10332
10363
|
}
|
|
10333
|
-
function
|
|
10364
|
+
function K(t, e, n = 0) {
|
|
10334
10365
|
const r = Pl(t, e), i = Sn(t) < n ? `(${r})` : r;
|
|
10335
|
-
return
|
|
10366
|
+
return et(i, t, e);
|
|
10336
10367
|
}
|
|
10337
10368
|
function Pl(t, e) {
|
|
10338
10369
|
switch (t.type) {
|
|
10339
10370
|
case "identifier":
|
|
10340
|
-
return
|
|
10371
|
+
return we(t.name, e);
|
|
10341
10372
|
case "qualifiedIdentifier":
|
|
10342
|
-
return t.parts.map((n) =>
|
|
10373
|
+
return t.parts.map((n) => we(n, e)).join(".");
|
|
10343
10374
|
case "literal":
|
|
10344
10375
|
return Zt(t.value, e);
|
|
10345
10376
|
case "typedLiteral":
|
|
10346
|
-
return `${
|
|
10377
|
+
return `${W(t.dataType, e)} ${Zt(t.value, e)}`;
|
|
10347
10378
|
case "bindParameter":
|
|
10348
10379
|
return t.token;
|
|
10349
10380
|
case "wildcard":
|
|
10350
|
-
return "*";
|
|
10381
|
+
return t.qualifier ? `${t.qualifier.map((n) => we(n, e)).join(".")}.*` : "*";
|
|
10382
|
+
case "case": {
|
|
10383
|
+
const n = W("CASE", e), r = W("WHEN", e), s = W("THEN", e), i = W("ELSE", e), a = W("END", e), o = t.operand ? `${n} ${K(t.operand, e)}` : n, u = t.when.map((h) => {
|
|
10384
|
+
const f = K(h.when, e), m = K(h.then, e);
|
|
10385
|
+
return Be(`${r} ${f} ${s} ${m}`, e.options.indent);
|
|
10386
|
+
}), c = t.else ? [Be(`${i} ${K(t.else, e)}`, e.options.indent)] : [];
|
|
10387
|
+
return [o, ...u, ...c, a].join(re);
|
|
10388
|
+
}
|
|
10351
10389
|
case "grouped":
|
|
10352
|
-
return qt(
|
|
10390
|
+
return qt(K(t.expression, e), e);
|
|
10353
10391
|
case "subquery":
|
|
10354
10392
|
return qt(Ot(t.query, e), e, !0);
|
|
10355
10393
|
case "functionCall": {
|
|
10356
|
-
const n = t.args.map((
|
|
10357
|
-
return `${
|
|
10394
|
+
const n = K(t.name, e), r = t.args.map((s) => K(s, e)).join(", ");
|
|
10395
|
+
return `${n}(${r})`;
|
|
10358
10396
|
}
|
|
10359
10397
|
case "cast": {
|
|
10360
10398
|
const n = t.dataTypeParams ? `(${t.dataTypeParams.map((r) => String(r)).join(", ")})` : "";
|
|
10361
|
-
return `${
|
|
10399
|
+
return `${W("CAST", e)}(${K(t.expression, e)} ${W("AS", e)} ${we(t.dataType, e)}${n})`;
|
|
10362
10400
|
}
|
|
10363
10401
|
case "inList":
|
|
10364
|
-
return `(${t.values.map((r) =>
|
|
10402
|
+
return `(${t.values.map((r) => K(r, e)).join(", ")})`;
|
|
10365
10403
|
case "unary": {
|
|
10366
|
-
const n =
|
|
10404
|
+
const n = K(t.operand, e, Sn(t)), r = Yt(t.operator) ? W(t.operator, e) : t.operator;
|
|
10367
10405
|
return Yt(t.operator) ? `${r} ${n}` : `${r}${n}`;
|
|
10368
10406
|
}
|
|
10369
10407
|
case "binary": {
|
|
10370
|
-
const n = Sn(t), r =
|
|
10408
|
+
const n = Sn(t), r = K(t.left, e, n), s = K(t.right, e, n + 1), i = Yt(t.operator) ? t.operator.split(" ").map((o) => W(o, e)).join(" ") : t.operator, a = t.operator === "LIKE" && t.escape ? ` ${W("ESCAPE", e)} ${Zt(t.escape, e)}` : "";
|
|
10371
10409
|
return `${r} ${i} ${s}${a}`;
|
|
10372
10410
|
}
|
|
10373
10411
|
default:
|
|
@@ -10375,28 +10413,28 @@ function Pl(t, e) {
|
|
|
10375
10413
|
}
|
|
10376
10414
|
}
|
|
10377
10415
|
function Zt(t, e) {
|
|
10378
|
-
return t === null ?
|
|
10416
|
+
return t === null ? W("NULL", e) : typeof t == "boolean" ? W(t ? "TRUE" : "FALSE", e) : typeof t == "number" ? String(t) : `'${t.replaceAll("'", "''")}'`;
|
|
10379
10417
|
}
|
|
10380
10418
|
function ks(t, e) {
|
|
10381
|
-
return t ? ` ${
|
|
10419
|
+
return t ? ` ${W("AS", e)} ${we(t, e)}` : "";
|
|
10382
10420
|
}
|
|
10383
10421
|
function Lt(t, e) {
|
|
10384
10422
|
return t.map((n, r) => {
|
|
10385
10423
|
const s = r < t.length - 1 ? "," : "";
|
|
10386
|
-
return `${
|
|
10424
|
+
return `${Be(n, e.options.indent)}${s}`;
|
|
10387
10425
|
});
|
|
10388
10426
|
}
|
|
10389
|
-
function
|
|
10390
|
-
const r =
|
|
10391
|
-
return [r,
|
|
10427
|
+
function Es(t, e, n) {
|
|
10428
|
+
const r = W(t, n), s = K(e, n);
|
|
10429
|
+
return [r, Be(s, n.options.indent)];
|
|
10392
10430
|
}
|
|
10393
|
-
function
|
|
10394
|
-
return t.split(
|
|
10431
|
+
function Be(t, e) {
|
|
10432
|
+
return t.split(re).map((n) => `${e}${n}`).join(re);
|
|
10395
10433
|
}
|
|
10396
10434
|
function qt(t, e, n = !1) {
|
|
10397
|
-
return !n && !t.includes(
|
|
10435
|
+
return !n && !t.includes(re) ? `(${t})` : ["(", Be(t, e.options.indent), ")"].join(re);
|
|
10398
10436
|
}
|
|
10399
|
-
function
|
|
10437
|
+
function et(t, e, n, r = "") {
|
|
10400
10438
|
if (!e)
|
|
10401
10439
|
return t;
|
|
10402
10440
|
const s = Nn(e.leadingTrivia, n, r), i = Nn(e.danglingTrivia, n, r), { contentWithInlineTrailing: a, trailingBlocks: o } = Fl(
|
|
@@ -10405,7 +10443,7 @@ function Ke(t, e, n, r = "") {
|
|
|
10405
10443
|
n,
|
|
10406
10444
|
r
|
|
10407
10445
|
);
|
|
10408
|
-
return [...s, a, ...o, ...i].join(
|
|
10446
|
+
return [...s, a, ...o, ...i].join(re);
|
|
10409
10447
|
}
|
|
10410
10448
|
function Fl(t, e, n, r) {
|
|
10411
10449
|
if (!e || e.length === 0)
|
|
@@ -10413,7 +10451,7 @@ function Fl(t, e, n, r) {
|
|
|
10413
10451
|
let s = t;
|
|
10414
10452
|
const i = [];
|
|
10415
10453
|
for (const a of e) {
|
|
10416
|
-
if (a.codeBefore.trim().length > 0 && (a.kind === "lineComment" || !a.text.includes(
|
|
10454
|
+
if (a.codeBefore.trim().length > 0 && (a.kind === "lineComment" || !a.text.includes(re))) {
|
|
10417
10455
|
s += ` ${a.text}`;
|
|
10418
10456
|
continue;
|
|
10419
10457
|
}
|
|
@@ -10422,10 +10460,10 @@ function Fl(t, e, n, r) {
|
|
|
10422
10460
|
return { contentWithInlineTrailing: s, trailingBlocks: i };
|
|
10423
10461
|
}
|
|
10424
10462
|
function Nn(t, e, n) {
|
|
10425
|
-
return !t || t.length === 0 ? [] : t.flatMap((r) => r.text.split(
|
|
10463
|
+
return !t || t.length === 0 ? [] : t.flatMap((r) => r.text.split(re).map((s) => `${n}${s}`));
|
|
10426
10464
|
}
|
|
10427
10465
|
function Il(t) {
|
|
10428
|
-
const e = t.split(
|
|
10466
|
+
const e = t.split(re);
|
|
10429
10467
|
for (let n = e.length - 1; n >= 0; n -= 1) {
|
|
10430
10468
|
const r = e[n], s = r.indexOf("--");
|
|
10431
10469
|
if (s === -1)
|
|
@@ -10440,22 +10478,22 @@ function Il(t) {
|
|
|
10440
10478
|
e[n] = i.trimEnd();
|
|
10441
10479
|
break;
|
|
10442
10480
|
}
|
|
10443
|
-
return e.join(
|
|
10481
|
+
return e.join(re);
|
|
10444
10482
|
}
|
|
10445
10483
|
function Dl(t, e) {
|
|
10446
|
-
return t.split(".").map((n) =>
|
|
10484
|
+
return t.split(".").map((n) => we(n, e)).join(".");
|
|
10447
10485
|
}
|
|
10448
|
-
function
|
|
10486
|
+
function we(t, e) {
|
|
10449
10487
|
const n = t.trim();
|
|
10450
|
-
if (!n ||
|
|
10488
|
+
if (!n || !$l(n, e))
|
|
10451
10489
|
return n;
|
|
10452
10490
|
const r = e.dialect.specialChars.identifierQuote, s = n.replaceAll(r.end, `${r.end}${r.end}`);
|
|
10453
10491
|
return `${r.start}${s}${r.end}`;
|
|
10454
10492
|
}
|
|
10455
|
-
function
|
|
10493
|
+
function $l(t, e) {
|
|
10456
10494
|
return vl.test(t) ? e.keywordSet.has(t.toUpperCase()) : !0;
|
|
10457
10495
|
}
|
|
10458
|
-
function
|
|
10496
|
+
function W(t, e) {
|
|
10459
10497
|
return e.options.keywordCase === "lower" ? t.toLowerCase() : t.toUpperCase();
|
|
10460
10498
|
}
|
|
10461
10499
|
function Yt(t) {
|
|
@@ -10469,6 +10507,7 @@ function Sn(t) {
|
|
|
10469
10507
|
return 6;
|
|
10470
10508
|
case "identifier":
|
|
10471
10509
|
case "bindParameter":
|
|
10510
|
+
case "case":
|
|
10472
10511
|
case "qualifiedIdentifier":
|
|
10473
10512
|
case "literal":
|
|
10474
10513
|
case "typedLiteral":
|
|
@@ -10486,8 +10525,8 @@ function Sn(t) {
|
|
|
10486
10525
|
function ri(t) {
|
|
10487
10526
|
throw new Error(`Unhandled expression type: ${JSON.stringify(t)}`);
|
|
10488
10527
|
}
|
|
10489
|
-
Yo((t) => new
|
|
10490
|
-
class
|
|
10528
|
+
Yo((t) => new Bl(t));
|
|
10529
|
+
class Bl {
|
|
10491
10530
|
constructor(e) {
|
|
10492
10531
|
this._ctx = e, this._languageId = e.host.getLanguageId();
|
|
10493
10532
|
}
|
|
@@ -10502,7 +10541,7 @@ class $l {
|
|
|
10502
10541
|
const i = this._getTextDocument(e);
|
|
10503
10542
|
if (!i)
|
|
10504
10543
|
return { suggestions: [] };
|
|
10505
|
-
const a = i.getText(), o = await this._getDialectSpec(), u =
|
|
10544
|
+
const a = i.getText(), o = await this._getDialectSpec(), u = Cs(a, r, s.sqlProfile, o), c = await this._hydrateProfileForCompletion(e, s.sqlProfile, u), h = c === s.sqlProfile ? u : Cs(a, r, c, o);
|
|
10506
10545
|
return {
|
|
10507
10546
|
suggestions: ql(n, o, c, h)
|
|
10508
10547
|
};
|
|
@@ -10565,11 +10604,11 @@ class $l {
|
|
|
10565
10604
|
}
|
|
10566
10605
|
const Vl = /((?:[A-Za-z_][A-Za-z0-9_$]*\.)*[A-Za-z_][A-Za-z0-9_$]*)\.[A-Za-z0-9_$]*$/u, ql = (t, e, n, r) => {
|
|
10567
10606
|
const s = Kt(e.keywords).map(
|
|
10568
|
-
(c) =>
|
|
10607
|
+
(c) => ut(c, ct.Keyword, t, { sortText: `3-${c}` })
|
|
10569
10608
|
), i = Kt(e.functions).map(
|
|
10570
|
-
(c) =>
|
|
10609
|
+
(c) => ut(c, ct.Function, t, { sortText: `4-${c}` })
|
|
10571
10610
|
), a = Kt(e.operators).map(
|
|
10572
|
-
(c) =>
|
|
10611
|
+
(c) => ut(c, ct.Operator, t, { sortText: `5-${c}` })
|
|
10573
10612
|
);
|
|
10574
10613
|
if (!n)
|
|
10575
10614
|
return [...s, ...i, ...a];
|
|
@@ -10589,13 +10628,13 @@ const Vl = /((?:[A-Za-z_][A-Za-z0-9_$]*\.)*[A-Za-z_][A-Za-z0-9_$]*)\.[A-Za-z0-9_
|
|
|
10589
10628
|
return [...s, ...i, ...a, ...o];
|
|
10590
10629
|
}
|
|
10591
10630
|
};
|
|
10592
|
-
function
|
|
10631
|
+
function Cs(t, e, n, r) {
|
|
10593
10632
|
if (!n)
|
|
10594
10633
|
return { clauseContext: "unknown", columnTargetScope: null };
|
|
10595
|
-
const s = jl(t, e), i = Gl(t, s), a =
|
|
10634
|
+
const s = jl(t, e), i = Gl(t, s), a = Ql(i.beforeCursor), o = Xl(i.statementText, n, r);
|
|
10596
10635
|
return {
|
|
10597
10636
|
clauseContext: a,
|
|
10598
|
-
columnTargetScope: o ?
|
|
10637
|
+
columnTargetScope: o ? Hl(i.beforeCursor, o) : null
|
|
10599
10638
|
};
|
|
10600
10639
|
}
|
|
10601
10640
|
function Ul(t) {
|
|
@@ -10611,7 +10650,7 @@ function Ul(t) {
|
|
|
10611
10650
|
return !1;
|
|
10612
10651
|
}
|
|
10613
10652
|
}
|
|
10614
|
-
const
|
|
10653
|
+
const ut = (t, e, n, r = {}) => ({
|
|
10615
10654
|
label: t,
|
|
10616
10655
|
kind: e,
|
|
10617
10656
|
insertText: t,
|
|
@@ -10621,7 +10660,7 @@ const lt = (t, e, n, r = {}) => ({
|
|
|
10621
10660
|
function Wl(t, e, n) {
|
|
10622
10661
|
const r = n === "from" || n === "join" ? "1" : "9";
|
|
10623
10662
|
return t.map(
|
|
10624
|
-
(s) =>
|
|
10663
|
+
(s) => ut(s.completionLabel, ct.Table, e, {
|
|
10625
10664
|
insertText: s.insertText,
|
|
10626
10665
|
detail: s.detail,
|
|
10627
10666
|
documentation: s.documentation,
|
|
@@ -10634,7 +10673,7 @@ function Ol(t, e, n) {
|
|
|
10634
10673
|
return t.tables.forEach((i) => {
|
|
10635
10674
|
i.columns.forEach((a) => {
|
|
10636
10675
|
s.push(
|
|
10637
|
-
|
|
10676
|
+
ut(a.completionLabel, ct.Field, e, {
|
|
10638
10677
|
insertText: a.insertText,
|
|
10639
10678
|
detail: [i.name, a.detail].filter(Boolean).join(" | "),
|
|
10640
10679
|
documentation: a.documentation,
|
|
@@ -10644,17 +10683,17 @@ function Ol(t, e, n) {
|
|
|
10644
10683
|
});
|
|
10645
10684
|
}), s;
|
|
10646
10685
|
}
|
|
10647
|
-
function
|
|
10648
|
-
const n =
|
|
10686
|
+
function Hl(t, e) {
|
|
10687
|
+
const n = zl(t);
|
|
10649
10688
|
if (!n)
|
|
10650
10689
|
return { tables: e.tables };
|
|
10651
|
-
const r =
|
|
10690
|
+
const r = Je(n), s = e.aliases.get(r);
|
|
10652
10691
|
if (s)
|
|
10653
10692
|
return { qualifier: n, tables: [s] };
|
|
10654
10693
|
const i = Fn(n, e.tables);
|
|
10655
10694
|
return i ? { qualifier: n, tables: [i] } : { qualifier: n, tables: [] };
|
|
10656
10695
|
}
|
|
10657
|
-
function
|
|
10696
|
+
function zl(t) {
|
|
10658
10697
|
return t.match(Vl)?.[1];
|
|
10659
10698
|
}
|
|
10660
10699
|
function jl(t, e) {
|
|
@@ -10668,7 +10707,7 @@ function Gl(t, e) {
|
|
|
10668
10707
|
const n = t.lastIndexOf(";", Math.max(e - 1, 0)), r = t.indexOf(";", e), s = n === -1 ? 0 : n + 1, i = r === -1 ? t.length : r, a = t.slice(s, i);
|
|
10669
10708
|
return { beforeCursor: t.slice(s, e), statementText: a };
|
|
10670
10709
|
}
|
|
10671
|
-
function
|
|
10710
|
+
function Ql(t) {
|
|
10672
10711
|
const e = t.toUpperCase(), r = [
|
|
10673
10712
|
{ clause: "orderBy", index: e.lastIndexOf("ORDER BY") },
|
|
10674
10713
|
{ clause: "groupBy", index: e.lastIndexOf("GROUP BY") },
|
|
@@ -10681,7 +10720,7 @@ function Xl(t) {
|
|
|
10681
10720
|
].filter((s) => s.index !== -1);
|
|
10682
10721
|
return r.length ? (r.sort((s, i) => i.index - s.index), r[0].clause) : "unknown";
|
|
10683
10722
|
}
|
|
10684
|
-
function
|
|
10723
|
+
function Xl(t, e, n) {
|
|
10685
10724
|
try {
|
|
10686
10725
|
const s = Pn(t, n).body.at(-1);
|
|
10687
10726
|
return s?.type !== "select" ? null : Jl(s, e);
|
|
@@ -10695,7 +10734,7 @@ function Jl(t, e) {
|
|
|
10695
10734
|
if (!i.name)
|
|
10696
10735
|
return;
|
|
10697
10736
|
const a = Fn(i.name, e.tables);
|
|
10698
|
-
a && (r.push(a), i.alias && s.set(
|
|
10737
|
+
a && (r.push(a), i.alias && s.set(Je(i.alias), a));
|
|
10699
10738
|
}), { tables: si(r), aliases: s };
|
|
10700
10739
|
}
|
|
10701
10740
|
function Zl(t, e) {
|
|
@@ -10705,7 +10744,7 @@ function Zl(t, e) {
|
|
|
10705
10744
|
const r = [], s = /* @__PURE__ */ new Map();
|
|
10706
10745
|
return n.forEach((i) => {
|
|
10707
10746
|
const a = Fn(i.name, e.tables);
|
|
10708
|
-
a && (r.push(a), i.alias && s.set(
|
|
10747
|
+
a && (r.push(a), i.alias && s.set(Je(i.alias), a));
|
|
10709
10748
|
}), r.length ? { tables: si(r), aliases: s } : null;
|
|
10710
10749
|
}
|
|
10711
10750
|
function Yl(t) {
|
|
@@ -10726,16 +10765,16 @@ function Kl(t) {
|
|
|
10726
10765
|
return e;
|
|
10727
10766
|
}
|
|
10728
10767
|
function Fn(t, e) {
|
|
10729
|
-
const n =
|
|
10768
|
+
const n = Je(t), r = Je(Ss(t));
|
|
10730
10769
|
return e.find(
|
|
10731
|
-
(s) => s.normalizedName === n ||
|
|
10770
|
+
(s) => s.normalizedName === n || Je(Ss(s.name)) === r
|
|
10732
10771
|
);
|
|
10733
10772
|
}
|
|
10734
10773
|
function si(t) {
|
|
10735
10774
|
const e = /* @__PURE__ */ new Set();
|
|
10736
10775
|
return t.filter((n) => e.has(n.id) ? !1 : (e.add(n.id), !0));
|
|
10737
10776
|
}
|
|
10738
|
-
const Kt = (t) => Array.from(new Set(t)),
|
|
10777
|
+
const Kt = (t) => Array.from(new Set(t)), ct = {
|
|
10739
10778
|
Field: 5,
|
|
10740
10779
|
Function: 3,
|
|
10741
10780
|
Keyword: 14,
|