@m3ui-vue/m3ui-vue 0.6.1 → 0.6.3
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/README.md +3 -0
- package/dist/MIcon-CaEooCmZ.js.map +1 -1
- package/dist/{MMenuItem-DbbrJhFE.js → MMenuItem-C7jKU-Qh.js} +13 -13
- package/dist/{MMenuItem-DbbrJhFE.js.map → MMenuItem-C7jKU-Qh.js.map} +1 -1
- package/dist/barcode.js.map +1 -1
- package/dist/chart.js +1 -1
- package/dist/chart.js.map +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/code-editor.js.map +1 -1
- package/dist/{common-VrOaLkjh.js → common-0dgrgaPL.js} +287 -213
- package/dist/common-0dgrgaPL.js.map +1 -0
- package/dist/components/MBar.vue.d.ts +58 -0
- package/dist/components/MPageProgress.vue.d.ts +15 -0
- package/dist/components/MSlider.vue.d.ts +6 -0
- package/dist/components/MWindow.vue.d.ts +30 -17
- package/dist/composables/usePageProgress.d.ts +19 -0
- package/dist/{dist-Dsrzt6J5.js → dist-CrjSW5DN.js} +248 -241
- package/dist/{dist-Dsrzt6J5.js.map → dist-CrjSW5DN.js.map} +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +2935 -2656
- package/dist/m3ui.js.map +1 -1
- package/dist/markdown.js +1 -1
- package/dist/markdown.js.map +1 -1
- package/dist/qrcode.js.map +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/terminal.js +9 -8
- package/dist/terminal.js.map +1 -1
- package/package.json +26 -26
- package/src/__tests__/usePageProgress.test.ts +52 -0
- package/src/components/MBar.vue +158 -0
- package/src/components/MPageProgress.vue +62 -0
- package/src/components/MSlider.vue +174 -52
- package/src/components/MTerminal.vue +12 -6
- package/src/components/MWindow.vue +10 -6
- package/src/composables/usePageProgress.ts +49 -0
- package/src/index.ts +3 -0
- package/dist/common-VrOaLkjh.js.map +0 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
//#region node_modules/.pnpm/@lezer+common@1.5.2/node_modules/@lezer/common/dist/index.js
|
|
2
|
-
var e =
|
|
3
|
-
constructor(
|
|
4
|
-
this.id =
|
|
2
|
+
var e = 0, t = class {
|
|
3
|
+
constructor(t = {}) {
|
|
4
|
+
this.id = e++, this.perNode = !!t.perNode, this.deserialize = t.deserialize || (() => {
|
|
5
5
|
throw Error("This node type doesn't define a deserialize function");
|
|
6
|
-
}), this.combine =
|
|
6
|
+
}), this.combine = t.combine || null;
|
|
7
7
|
}
|
|
8
8
|
add(e) {
|
|
9
9
|
if (this.perNode) throw RangeError("Can't add per-node props to node types");
|
|
10
|
-
return typeof e != "function" && (e =
|
|
10
|
+
return typeof e != "function" && (e = i.match(e)), (t) => {
|
|
11
11
|
let n = e(t);
|
|
12
12
|
return n === void 0 ? null : [this, n];
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
t.closedBy = new t({ deserialize: (e) => e.split(" ") }), t.openedBy = new t({ deserialize: (e) => e.split(" ") }), t.group = new t({ deserialize: (e) => e.split(" ") }), t.isolate = new t({ deserialize: (e) => {
|
|
17
17
|
if (e && e != "rtl" && e != "ltr" && e != "auto") throw RangeError("Invalid value for isolate: " + e);
|
|
18
18
|
return e || "auto";
|
|
19
|
-
} }),
|
|
20
|
-
var
|
|
19
|
+
} }), t.contextHash = new t({ perNode: !0 }), t.lookAhead = new t({ perNode: !0 }), t.mounted = new t({ perNode: !0 });
|
|
20
|
+
var n = class {
|
|
21
21
|
constructor(e, t, n, r = !1) {
|
|
22
22
|
this.tree = e, this.overlay = t, this.parser = n, this.bracketed = r;
|
|
23
23
|
}
|
|
24
24
|
static get(e) {
|
|
25
|
-
return e && e.props && e.props[
|
|
25
|
+
return e && e.props && e.props[t.mounted.id];
|
|
26
26
|
}
|
|
27
|
-
},
|
|
27
|
+
}, r = Object.create(null), i = class e {
|
|
28
28
|
constructor(e, t, n, r = 0) {
|
|
29
29
|
this.name = e, this.props = t, this.id = n, this.flags = r;
|
|
30
30
|
}
|
|
31
31
|
static define(t) {
|
|
32
|
-
let n = t.props && t.props.length ? Object.create(null) :
|
|
32
|
+
let n = t.props && t.props.length ? Object.create(null) : r, i = +!!t.top | (t.skipped ? 2 : 0) | (t.error ? 4 : 0) | (t.name == null ? 8 : 0), a = new e(t.name || "", n, t.id, i);
|
|
33
33
|
if (t.props) {
|
|
34
34
|
for (let e of t.props) if (Array.isArray(e) || (e = e(a)), e) {
|
|
35
35
|
if (e[0].perNode) throw RangeError("Can't store a per-node prop on a node type");
|
|
@@ -56,28 +56,28 @@ var r = class {
|
|
|
56
56
|
is(e) {
|
|
57
57
|
if (typeof e == "string") {
|
|
58
58
|
if (this.name == e) return !0;
|
|
59
|
-
let
|
|
60
|
-
return
|
|
59
|
+
let n = this.prop(t.group);
|
|
60
|
+
return n ? n.indexOf(e) > -1 : !1;
|
|
61
61
|
}
|
|
62
62
|
return this.id == e;
|
|
63
63
|
}
|
|
64
64
|
static match(e) {
|
|
65
|
-
let
|
|
66
|
-
for (let
|
|
65
|
+
let n = Object.create(null);
|
|
66
|
+
for (let t in e) for (let r of t.split(" ")) n[r] = e[t];
|
|
67
67
|
return (e) => {
|
|
68
|
-
for (let r = e.prop(
|
|
69
|
-
let
|
|
70
|
-
if (
|
|
68
|
+
for (let r = e.prop(t.group), i = -1; i < (r ? r.length : 0); i++) {
|
|
69
|
+
let t = n[i < 0 ? e.name : r[i]];
|
|
70
|
+
if (t) return t;
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
-
|
|
76
|
-
var
|
|
75
|
+
i.none = new i("", Object.create(null), 0, 8);
|
|
76
|
+
var a = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), s;
|
|
77
77
|
(function(e) {
|
|
78
78
|
e[e.ExcludeBuffers = 1] = "ExcludeBuffers", e[e.IncludeAnonymous = 2] = "IncludeAnonymous", e[e.IgnoreMounts = 4] = "IgnoreMounts", e[e.IgnoreOverlays = 8] = "IgnoreOverlays", e[e.EnterBracketed = 16] = "EnterBracketed";
|
|
79
|
-
})(
|
|
80
|
-
var
|
|
79
|
+
})(s ||= {});
|
|
80
|
+
var c = class e {
|
|
81
81
|
constructor(e, t, n, r, i) {
|
|
82
82
|
if (this.type = e, this.children = t, this.positions = n, this.length = r, this.props = null, i && i.length) {
|
|
83
83
|
this.props = Object.create(null);
|
|
@@ -85,7 +85,7 @@ var l = class e {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
toString() {
|
|
88
|
-
let e =
|
|
88
|
+
let e = n.get(this);
|
|
89
89
|
if (e && !e.overlay) return e.tree.toString();
|
|
90
90
|
let t = "";
|
|
91
91
|
for (let e of this.children) {
|
|
@@ -95,29 +95,29 @@ var l = class e {
|
|
|
95
95
|
return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (t.length ? "(" + t + ")" : "") : t;
|
|
96
96
|
}
|
|
97
97
|
cursor(e = 0) {
|
|
98
|
-
return new
|
|
98
|
+
return new S(this.topNode, e);
|
|
99
99
|
}
|
|
100
100
|
cursorAt(e, t = 0, n = 0) {
|
|
101
|
-
let r = new
|
|
102
|
-
return r.moveTo(e, t),
|
|
101
|
+
let r = new S(a.get(this) || this.topNode);
|
|
102
|
+
return r.moveTo(e, t), a.set(this, r._tree), r;
|
|
103
103
|
}
|
|
104
104
|
get topNode() {
|
|
105
|
-
return new
|
|
105
|
+
return new m(this, 0, 0, null);
|
|
106
106
|
}
|
|
107
107
|
resolve(e, t = 0) {
|
|
108
|
-
let n =
|
|
109
|
-
return
|
|
108
|
+
let n = f(a.get(this) || this.topNode, e, t, !1);
|
|
109
|
+
return a.set(this, n), n;
|
|
110
110
|
}
|
|
111
111
|
resolveInner(e, t = 0) {
|
|
112
|
-
let n =
|
|
113
|
-
return
|
|
112
|
+
let n = f(o.get(this) || this.topNode, e, t, !0);
|
|
113
|
+
return o.set(this, n), n;
|
|
114
114
|
}
|
|
115
115
|
resolveStack(e, t = 0) {
|
|
116
|
-
return
|
|
116
|
+
return x(this, e, t);
|
|
117
117
|
}
|
|
118
118
|
iterate(e) {
|
|
119
|
-
let { enter: t, leave: n, from: r = 0, to: i = this.length } = e, a = e.mode || 0, o = (a &
|
|
120
|
-
for (let e = this.cursor(a |
|
|
119
|
+
let { enter: t, leave: n, from: r = 0, to: i = this.length } = e, a = e.mode || 0, o = (a & s.IncludeAnonymous) > 0;
|
|
120
|
+
for (let e = this.cursor(a | s.IncludeAnonymous);;) {
|
|
121
121
|
let a = !1;
|
|
122
122
|
if (e.from <= i && e.to >= r && (!o && e.type.isAnonymous || t(e) !== !1)) {
|
|
123
123
|
if (e.firstChild()) continue;
|
|
@@ -138,14 +138,14 @@ var l = class e {
|
|
|
138
138
|
return e;
|
|
139
139
|
}
|
|
140
140
|
balance(t = {}) {
|
|
141
|
-
return this.children.length <= 8 ? this :
|
|
141
|
+
return this.children.length <= 8 ? this : D(i.none, this.children, this.positions, 0, this.children.length, 0, this.length, (t, n, r) => new e(this.type, t, n, r, this.propValues), t.makeTree || ((t, n, r) => new e(i.none, t, n, r)));
|
|
142
142
|
}
|
|
143
143
|
static build(e) {
|
|
144
|
-
return
|
|
144
|
+
return w(e);
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
|
-
|
|
148
|
-
var
|
|
147
|
+
c.empty = new c(i.none, [], [], 0);
|
|
148
|
+
var l = class e {
|
|
149
149
|
constructor(e, t) {
|
|
150
150
|
this.buffer = e, this.index = t;
|
|
151
151
|
}
|
|
@@ -170,12 +170,12 @@ var u = class e {
|
|
|
170
170
|
fork() {
|
|
171
171
|
return new e(this.buffer, this.index);
|
|
172
172
|
}
|
|
173
|
-
},
|
|
173
|
+
}, u = class e {
|
|
174
174
|
constructor(e, t, n) {
|
|
175
175
|
this.buffer = e, this.length = t, this.set = n;
|
|
176
176
|
}
|
|
177
177
|
get type() {
|
|
178
|
-
return
|
|
178
|
+
return i.none;
|
|
179
179
|
}
|
|
180
180
|
toString() {
|
|
181
181
|
let e = [];
|
|
@@ -191,7 +191,7 @@ var u = class e {
|
|
|
191
191
|
}
|
|
192
192
|
findChild(e, t, n, r, i) {
|
|
193
193
|
let { buffer: a } = this, o = -1;
|
|
194
|
-
for (let s = e; s != t && !(
|
|
194
|
+
for (let s = e; s != t && !(d(i, r, a[s + 1], a[s + 2]) && (o = s, n > 0)); s = a[s + 3]);
|
|
195
195
|
return o;
|
|
196
196
|
}
|
|
197
197
|
slice(t, n, r) {
|
|
@@ -204,7 +204,7 @@ var u = class e {
|
|
|
204
204
|
return new e(a, o, this.set);
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
|
-
function
|
|
207
|
+
function d(e, t, n, r) {
|
|
208
208
|
switch (e) {
|
|
209
209
|
case -2: return n < t;
|
|
210
210
|
case -1: return r >= t && n < t;
|
|
@@ -214,39 +214,39 @@ function f(e, t, n, r) {
|
|
|
214
214
|
case 4: return !0;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function f(e, t, n, r) {
|
|
218
218
|
for (; e.from == e.to || (n < 1 ? e.from >= t : e.from > t) || (n > -1 ? e.to <= t : e.to < t);) {
|
|
219
|
-
let t = !r && e instanceof
|
|
219
|
+
let t = !r && e instanceof m && e.index < 0 ? null : e.parent;
|
|
220
220
|
if (!t) return e;
|
|
221
221
|
e = t;
|
|
222
222
|
}
|
|
223
|
-
let i = r ? 0 :
|
|
224
|
-
if (r) for (let r = e, a = r.parent; a; r = a, a = r.parent) r instanceof
|
|
223
|
+
let i = r ? 0 : s.IgnoreOverlays;
|
|
224
|
+
if (r) for (let r = e, a = r.parent; a; r = a, a = r.parent) r instanceof m && r.index < 0 && a.enter(t, n, i)?.from != r.from && (e = a);
|
|
225
225
|
for (;;) {
|
|
226
226
|
let r = e.enter(t, n, i);
|
|
227
227
|
if (!r) return e;
|
|
228
228
|
e = r;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
var
|
|
231
|
+
var p = class {
|
|
232
232
|
cursor(e = 0) {
|
|
233
|
-
return new
|
|
233
|
+
return new S(this, e);
|
|
234
234
|
}
|
|
235
235
|
getChild(e, t = null, n = null) {
|
|
236
|
-
let r =
|
|
236
|
+
let r = h(this, e, t, n);
|
|
237
237
|
return r.length ? r[0] : null;
|
|
238
238
|
}
|
|
239
239
|
getChildren(e, t = null, n = null) {
|
|
240
|
-
return
|
|
240
|
+
return h(this, e, t, n);
|
|
241
241
|
}
|
|
242
242
|
resolve(e, t = 0) {
|
|
243
|
-
return
|
|
243
|
+
return f(this, e, t, !1);
|
|
244
244
|
}
|
|
245
245
|
resolveInner(e, t = 0) {
|
|
246
|
-
return
|
|
246
|
+
return f(this, e, t, !0);
|
|
247
247
|
}
|
|
248
248
|
matchContext(e) {
|
|
249
|
-
return
|
|
249
|
+
return g(this.parent, e);
|
|
250
250
|
}
|
|
251
251
|
enterUnfinishedNodesBefore(e) {
|
|
252
252
|
let t = this.childBefore(e), n = this;
|
|
@@ -263,7 +263,7 @@ var m = class {
|
|
|
263
263
|
get next() {
|
|
264
264
|
return this.parent;
|
|
265
265
|
}
|
|
266
|
-
},
|
|
266
|
+
}, m = class e extends p {
|
|
267
267
|
constructor(e, t, n, r) {
|
|
268
268
|
super(), this._tree = e, this.from = t, this.index = n, this._parent = r;
|
|
269
269
|
}
|
|
@@ -276,24 +276,24 @@ var m = class {
|
|
|
276
276
|
get to() {
|
|
277
277
|
return this.from + this._tree.length;
|
|
278
278
|
}
|
|
279
|
-
nextChild(t,
|
|
280
|
-
for (let
|
|
281
|
-
for (let { children:
|
|
282
|
-
let m =
|
|
283
|
-
if (
|
|
284
|
-
if (m instanceof
|
|
285
|
-
if (o &
|
|
286
|
-
let e = m.findChild(0, m.buffer.length,
|
|
287
|
-
if (e > -1) return new
|
|
288
|
-
} else if (o &
|
|
289
|
-
let
|
|
290
|
-
if (!(o &
|
|
291
|
-
let u = new e(m, h, t,
|
|
292
|
-
return o &
|
|
279
|
+
nextChild(t, r, i, a, o = 0) {
|
|
280
|
+
for (let l = this;;) {
|
|
281
|
+
for (let { children: f, positions: p } = l._tree, m = r > 0 ? f.length : -1; t != m; t += r) {
|
|
282
|
+
let m = f[t], h = p[t] + l.from, g;
|
|
283
|
+
if (o & s.EnterBracketed && m instanceof c && (g = n.get(m)) && !g.overlay && g.bracketed && i >= h && i <= h + m.length || d(a, i, h, h + m.length)) {
|
|
284
|
+
if (m instanceof u) {
|
|
285
|
+
if (o & s.ExcludeBuffers) continue;
|
|
286
|
+
let e = m.findChild(0, m.buffer.length, r, i - h, a);
|
|
287
|
+
if (e > -1) return new v(new _(l, m, t, h), null, e);
|
|
288
|
+
} else if (o & s.IncludeAnonymous || !m.type.isAnonymous || C(m)) {
|
|
289
|
+
let c;
|
|
290
|
+
if (!(o & s.IgnoreMounts) && (c = n.get(m)) && !c.overlay) return new e(c.tree, h, t, l);
|
|
291
|
+
let u = new e(m, h, t, l);
|
|
292
|
+
return o & s.IncludeAnonymous || !u.type.isAnonymous ? u : u.nextChild(r < 0 ? m.children.length - 1 : 0, r, i, a, o);
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
if (o &
|
|
296
|
+
if (o & s.IncludeAnonymous || !l.type.isAnonymous || (t = l.index >= 0 ? l.index + r : r < 0 ? -1 : l._parent._tree.children.length, l = l._parent, !l)) return null;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
get firstChild() {
|
|
@@ -311,13 +311,13 @@ var m = class {
|
|
|
311
311
|
prop(e) {
|
|
312
312
|
return this._tree.prop(e);
|
|
313
313
|
}
|
|
314
|
-
enter(t,
|
|
314
|
+
enter(t, r, i = 0) {
|
|
315
315
|
let a;
|
|
316
|
-
if (!(i &
|
|
317
|
-
let
|
|
318
|
-
for (let { from: t, to: i } of a.overlay) if ((
|
|
316
|
+
if (!(i & s.IgnoreOverlays) && (a = n.get(this._tree)) && a.overlay) {
|
|
317
|
+
let n = t - this.from, o = i & s.EnterBracketed && a.bracketed;
|
|
318
|
+
for (let { from: t, to: i } of a.overlay) if ((r > 0 || o ? t <= n : t < n) && (r < 0 || o ? i >= n : i > n)) return new e(a.tree, a.overlay[0].from + this.from, -1, this);
|
|
319
319
|
}
|
|
320
|
-
return this.nextChild(0, 1, t,
|
|
320
|
+
return this.nextChild(0, 1, t, r, i);
|
|
321
321
|
}
|
|
322
322
|
nextSignificantParent() {
|
|
323
323
|
let e = this;
|
|
@@ -343,7 +343,7 @@ var m = class {
|
|
|
343
343
|
return this._tree.toString();
|
|
344
344
|
}
|
|
345
345
|
};
|
|
346
|
-
function
|
|
346
|
+
function h(e, t, n, r) {
|
|
347
347
|
let i = e.cursor(), a = [];
|
|
348
348
|
if (!i.firstChild()) return a;
|
|
349
349
|
if (n != null) {
|
|
@@ -354,7 +354,7 @@ function g(e, t, n, r) {
|
|
|
354
354
|
if (i.type.is(t) && a.push(i.node), !i.nextSibling()) return r == null ? a : [];
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function g(e, t, n = t.length - 1) {
|
|
358
358
|
for (let r = e; n >= 0; r = r.parent) {
|
|
359
359
|
if (!r) return !1;
|
|
360
360
|
if (!r.type.isAnonymous) {
|
|
@@ -364,11 +364,11 @@ function _(e, t, n = t.length - 1) {
|
|
|
364
364
|
}
|
|
365
365
|
return !0;
|
|
366
366
|
}
|
|
367
|
-
var
|
|
367
|
+
var _ = class {
|
|
368
368
|
constructor(e, t, n, r) {
|
|
369
369
|
this.parent = e, this.buffer = t, this.index = n, this.start = r;
|
|
370
370
|
}
|
|
371
|
-
},
|
|
371
|
+
}, v = class e extends p {
|
|
372
372
|
get name() {
|
|
373
373
|
return this.type.name;
|
|
374
374
|
}
|
|
@@ -401,7 +401,7 @@ var v = class {
|
|
|
401
401
|
return this.type.prop(e);
|
|
402
402
|
}
|
|
403
403
|
enter(t, n, r = 0) {
|
|
404
|
-
if (r &
|
|
404
|
+
if (r & s.ExcludeBuffers) return null;
|
|
405
405
|
let { buffer: i } = this.context, a = i.findChild(this.index + 4, i.buffer[this.index + 3], n > 0 ? 1 : -1, t - this.context.start, n);
|
|
406
406
|
return a < 0 ? null : new e(this.context, this, a);
|
|
407
407
|
}
|
|
@@ -428,50 +428,50 @@ var v = class {
|
|
|
428
428
|
let a = n.buffer[this.index + 1];
|
|
429
429
|
e.push(n.slice(r, i, a)), t.push(0);
|
|
430
430
|
}
|
|
431
|
-
return new
|
|
431
|
+
return new c(this.type, e, t, this.to - this.from);
|
|
432
432
|
}
|
|
433
433
|
toString() {
|
|
434
434
|
return this.context.buffer.childString(this.index);
|
|
435
435
|
}
|
|
436
436
|
};
|
|
437
|
-
function
|
|
437
|
+
function y(e) {
|
|
438
438
|
if (!e.length) return null;
|
|
439
439
|
let t = 0, n = e[0];
|
|
440
440
|
for (let r = 1; r < e.length; r++) {
|
|
441
441
|
let i = e[r];
|
|
442
442
|
(i.from > n.from || i.to < n.to) && (n = i, t = r);
|
|
443
443
|
}
|
|
444
|
-
let r = n instanceof
|
|
445
|
-
return r ? i[t] = r : i.splice(t, 1), new
|
|
444
|
+
let r = n instanceof m && n.index < 0 ? null : n.parent, i = e.slice();
|
|
445
|
+
return r ? i[t] = r : i.splice(t, 1), new b(i, n);
|
|
446
446
|
}
|
|
447
|
-
var
|
|
447
|
+
var b = class {
|
|
448
448
|
constructor(e, t) {
|
|
449
449
|
this.heads = e, this.node = t;
|
|
450
450
|
}
|
|
451
451
|
get next() {
|
|
452
|
-
return
|
|
452
|
+
return y(this.heads);
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
|
-
function
|
|
456
|
-
let i = e.resolveInner(t,
|
|
457
|
-
for (let e = i instanceof
|
|
458
|
-
let
|
|
459
|
-
(a ||= [i]).push(
|
|
455
|
+
function x(e, t, r) {
|
|
456
|
+
let i = e.resolveInner(t, r), a = null;
|
|
457
|
+
for (let e = i instanceof m ? i : i.context.parent; e; e = e.parent) if (e.index < 0) {
|
|
458
|
+
let n = e.parent;
|
|
459
|
+
(a ||= [i]).push(n.resolve(t, r)), e = n;
|
|
460
460
|
} else {
|
|
461
|
-
let o =
|
|
461
|
+
let o = n.get(e.tree);
|
|
462
462
|
if (o && o.overlay && o.overlay[0].from <= t && o.overlay[o.overlay.length - 1].to >= t) {
|
|
463
|
-
let
|
|
464
|
-
(a ||= [i]).push(
|
|
463
|
+
let n = new m(o.tree, o.overlay[0].from + e.from, -1, e);
|
|
464
|
+
(a ||= [i]).push(f(n, t, r, !1));
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
return a ?
|
|
467
|
+
return a ? y(a) : i;
|
|
468
468
|
}
|
|
469
|
-
var
|
|
469
|
+
var S = class {
|
|
470
470
|
get name() {
|
|
471
471
|
return this.type.name;
|
|
472
472
|
}
|
|
473
473
|
constructor(e, t = 0) {
|
|
474
|
-
if (this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, this.mode = t & ~
|
|
474
|
+
if (this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, this.mode = t & ~s.EnterBracketed, e instanceof m) this.yieldNode(e);
|
|
475
475
|
else {
|
|
476
476
|
this._tree = e.context.parent, this.buffer = e.context;
|
|
477
477
|
for (let t = e._parent; t; t = t._parent) this.stack.unshift(t.index);
|
|
@@ -487,7 +487,7 @@ var C = class {
|
|
|
487
487
|
return this.type = t || r.set.types[r.buffer[e]], this.from = n + r.buffer[e + 1], this.to = n + r.buffer[e + 2], !0;
|
|
488
488
|
}
|
|
489
489
|
yield(e) {
|
|
490
|
-
return e ? e instanceof
|
|
490
|
+
return e ? e instanceof m ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1;
|
|
491
491
|
}
|
|
492
492
|
toString() {
|
|
493
493
|
return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString();
|
|
@@ -510,12 +510,12 @@ var C = class {
|
|
|
510
510
|
return this.enterChild(-1, e, -2);
|
|
511
511
|
}
|
|
512
512
|
enter(e, t, n = this.mode) {
|
|
513
|
-
return this.buffer ? n &
|
|
513
|
+
return this.buffer ? n & s.ExcludeBuffers ? !1 : this.enterChild(1, e, t) : this.yield(this._tree.enter(e, t, n));
|
|
514
514
|
}
|
|
515
515
|
parent() {
|
|
516
|
-
if (!this.buffer) return this.yieldNode(this.mode &
|
|
516
|
+
if (!this.buffer) return this.yieldNode(this.mode & s.IncludeAnonymous ? this._tree._parent : this._tree.parent);
|
|
517
517
|
if (this.stack.length) return this.yieldBuf(this.stack.pop());
|
|
518
|
-
let e = this.mode &
|
|
518
|
+
let e = this.mode & s.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent();
|
|
519
519
|
return this.buffer = null, this.yieldNode(e);
|
|
520
520
|
}
|
|
521
521
|
sibling(e) {
|
|
@@ -528,7 +528,7 @@ var C = class {
|
|
|
528
528
|
let e = t.buffer[this.index + 3];
|
|
529
529
|
if (e < (n < 0 ? t.buffer.length : t.buffer[this.stack[n] + 3])) return this.yieldBuf(e);
|
|
530
530
|
}
|
|
531
|
-
return n < 0
|
|
531
|
+
return n < 0 && this.yield(this.buffer.parent.nextChild(this.buffer.index + e, e, 0, 4, this.mode));
|
|
532
532
|
}
|
|
533
533
|
nextSibling() {
|
|
534
534
|
return this.sibling(1);
|
|
@@ -546,7 +546,7 @@ var C = class {
|
|
|
546
546
|
} else ({index: t, _parent: n} = this._tree);
|
|
547
547
|
for (; n; {index: t, _parent: n} = n) if (t > -1) for (let r = t + e, i = e < 0 ? -1 : n._tree.children.length; r != i; r += e) {
|
|
548
548
|
let e = n._tree.children[r];
|
|
549
|
-
if (this.mode &
|
|
549
|
+
if (this.mode & s.IncludeAnonymous || e instanceof u || !e.type.isAnonymous || C(e)) return !1;
|
|
550
550
|
}
|
|
551
551
|
return !0;
|
|
552
552
|
}
|
|
@@ -579,8 +579,8 @@ var C = class {
|
|
|
579
579
|
}
|
|
580
580
|
r = this.stack[--i];
|
|
581
581
|
}
|
|
582
|
-
for (let e = n; e < this.stack.length; e++) t = new
|
|
583
|
-
return this.bufferNode = new
|
|
582
|
+
for (let e = n; e < this.stack.length; e++) t = new v(this.buffer, t, this.stack[e]);
|
|
583
|
+
return this.bufferNode = new v(this.buffer, t, this.index);
|
|
584
584
|
}
|
|
585
585
|
get tree() {
|
|
586
586
|
return this.buffer ? null : this._tree._tree;
|
|
@@ -603,10 +603,10 @@ var C = class {
|
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
matchContext(e) {
|
|
606
|
-
if (!this.buffer) return
|
|
606
|
+
if (!this.buffer) return g(this.node.parent, e);
|
|
607
607
|
let { buffer: t } = this.buffer, { types: n } = t.set;
|
|
608
608
|
for (let r = e.length - 1, i = this.stack.length - 1; r >= 0; i--) {
|
|
609
|
-
if (i < 0) return
|
|
609
|
+
if (i < 0) return g(this._tree, e, r);
|
|
610
610
|
let a = n[t.buffer[this.stack[i]]];
|
|
611
611
|
if (!a.isAnonymous) {
|
|
612
612
|
if (e[r] && e[r] != a.name) return !1;
|
|
@@ -616,149 +616,155 @@ var C = class {
|
|
|
616
616
|
return !0;
|
|
617
617
|
}
|
|
618
618
|
};
|
|
619
|
-
function
|
|
620
|
-
return e.children.some((e) => e instanceof
|
|
619
|
+
function C(e) {
|
|
620
|
+
return e.children.some((e) => e instanceof u || !e.type.isAnonymous || C(e));
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
let { buffer:
|
|
624
|
-
function
|
|
625
|
-
let { id: S, start: C, end: w, size: T } =
|
|
626
|
-
if (T < 0)
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
622
|
+
function w(e) {
|
|
623
|
+
let { buffer: n, nodeSet: r, maxBufferLength: i = 1024, reused: a = [], minRepeatType: o = r.types.length } = e, s = Array.isArray(n) ? new l(n, n.length) : n, d = r.types, f = 0, p = 0;
|
|
624
|
+
function m(e, t, n, c, l, x) {
|
|
625
|
+
let { id: S, start: C, end: w, size: T } = s, E = p, O = f;
|
|
626
|
+
if (T < 0) {
|
|
627
|
+
if (s.next(), T == -1) {
|
|
628
|
+
let t = a[S];
|
|
629
|
+
n.push(t), c.push(C - e);
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
if (T == -3) {
|
|
633
|
+
f = S;
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
if (T == -4) {
|
|
637
|
+
p = S;
|
|
638
|
+
return;
|
|
639
|
+
}
|
|
640
|
+
throw RangeError(`Unrecognized record size: ${T}`);
|
|
641
|
+
}
|
|
642
|
+
let k = d[S], A, j, M = C - e;
|
|
643
|
+
if (w - C <= i && (j = y(s.pos - t, l))) {
|
|
644
|
+
let t = new Uint16Array(j.size - j.skip), n = s.pos - j.size, i = t.length;
|
|
645
|
+
for (; s.pos > n;) i = b(j.start, t, i);
|
|
646
|
+
A = new u(t, w - j.start, r), M = j.start - e;
|
|
642
647
|
} else {
|
|
643
|
-
let e =
|
|
644
|
-
|
|
645
|
-
let t = [], n = [], r = S >=
|
|
646
|
-
for (;
|
|
647
|
-
if (r >= 0 &&
|
|
648
|
-
let e =
|
|
649
|
-
A =
|
|
650
|
-
} else A =
|
|
648
|
+
let e = s.pos - T;
|
|
649
|
+
s.next();
|
|
650
|
+
let t = [], n = [], r = S >= o ? S : -1, a = 0, c = w;
|
|
651
|
+
for (; s.pos > e;) r >= 0 && s.id == r && s.size >= 0 ? (s.end <= c - i && (_(t, n, C, a, s.end, c, r, E, O), a = t.length, c = s.end), s.next()) : x > 2500 ? h(C, e, t, n) : m(C, e, t, n, r, x + 1);
|
|
652
|
+
if (r >= 0 && a > 0 && a < t.length && _(t, n, C, a, C, c, r, E, O), t.reverse(), n.reverse(), r > -1 && a > 0) {
|
|
653
|
+
let e = g(k, O);
|
|
654
|
+
A = D(k, t, n, 0, t.length, 0, w - C, e, e);
|
|
655
|
+
} else A = v(k, t, n, w - C, E - w, O);
|
|
651
656
|
}
|
|
652
|
-
n.push(A),
|
|
657
|
+
n.push(A), c.push(M);
|
|
653
658
|
}
|
|
654
|
-
function
|
|
655
|
-
let o = [],
|
|
656
|
-
for (;
|
|
657
|
-
let { id: e, start: t, end: n, size: r } =
|
|
658
|
-
if (r > 4)
|
|
659
|
+
function h(e, t, n, a) {
|
|
660
|
+
let o = [], c = 0, l = -1;
|
|
661
|
+
for (; s.pos > t;) {
|
|
662
|
+
let { id: e, start: t, end: n, size: r } = s;
|
|
663
|
+
if (r > 4) s.next();
|
|
659
664
|
else if (l > -1 && t < l) break;
|
|
660
|
-
else l < 0 && (l = n -
|
|
665
|
+
else l < 0 && (l = n - i), o.push(e, t, n), c++, s.next();
|
|
661
666
|
}
|
|
662
|
-
if (
|
|
663
|
-
let t = new Uint16Array(
|
|
664
|
-
for (let e = o.length - 3, n = 0; e >= 0; e -= 3) t[n++] = o[e], t[n++] = o[e + 1] -
|
|
665
|
-
n.push(new
|
|
667
|
+
if (c) {
|
|
668
|
+
let t = new Uint16Array(c * 4), i = o[o.length - 2];
|
|
669
|
+
for (let e = o.length - 3, n = 0; e >= 0; e -= 3) t[n++] = o[e], t[n++] = o[e + 1] - i, t[n++] = o[e + 2] - i, t[n++] = n;
|
|
670
|
+
n.push(new u(t, o[2] - i, r)), a.push(i - e);
|
|
666
671
|
}
|
|
667
672
|
}
|
|
668
|
-
function
|
|
673
|
+
function g(e, n) {
|
|
669
674
|
return (r, i, a) => {
|
|
670
|
-
let o = 0, s = r.length - 1,
|
|
671
|
-
if (s >= 0 && (
|
|
672
|
-
if (!s &&
|
|
673
|
-
(u =
|
|
675
|
+
let o = 0, s = r.length - 1, l, u;
|
|
676
|
+
if (s >= 0 && (l = r[s]) instanceof c) {
|
|
677
|
+
if (!s && l.type == e && l.length == a) return l;
|
|
678
|
+
(u = l.prop(t.lookAhead)) && (o = i[s] + l.length + u);
|
|
674
679
|
}
|
|
675
|
-
return
|
|
680
|
+
return v(e, r, i, a, o, n);
|
|
676
681
|
};
|
|
677
682
|
}
|
|
678
|
-
function
|
|
683
|
+
function _(e, t, n, i, a, o, s, c, l) {
|
|
679
684
|
let u = [], d = [];
|
|
680
|
-
for (; e.length >
|
|
681
|
-
e.push(
|
|
685
|
+
for (; e.length > i;) u.push(e.pop()), d.push(t.pop() + n - a);
|
|
686
|
+
e.push(v(r.types[s], u, d, o - a, c - o, l)), t.push(a - n);
|
|
682
687
|
}
|
|
683
|
-
function
|
|
688
|
+
function v(e, n, r, i, a, o, s) {
|
|
684
689
|
if (o) {
|
|
685
|
-
let e = [
|
|
690
|
+
let e = [t.contextHash, o];
|
|
686
691
|
s = s ? [e].concat(s) : [e];
|
|
687
692
|
}
|
|
688
693
|
if (a > 25) {
|
|
689
|
-
let e = [
|
|
694
|
+
let e = [t.lookAhead, a];
|
|
690
695
|
s = s ? [e].concat(s) : [e];
|
|
691
696
|
}
|
|
692
|
-
return new
|
|
697
|
+
return new c(e, n, r, i, s);
|
|
693
698
|
}
|
|
694
|
-
function
|
|
695
|
-
let n =
|
|
699
|
+
function y(e, t) {
|
|
700
|
+
let n = s.fork(), r = 0, a = 0, c = 0, l = n.end - i, u = {
|
|
696
701
|
size: 0,
|
|
697
702
|
start: 0,
|
|
698
703
|
skip: 0
|
|
699
704
|
};
|
|
700
|
-
scan: for (let
|
|
705
|
+
scan: for (let i = n.pos - e; n.pos > i;) {
|
|
701
706
|
let e = n.size;
|
|
702
707
|
if (n.id == t && e >= 0) {
|
|
703
|
-
u.size = r, u.start =
|
|
708
|
+
u.size = r, u.start = a, u.skip = c, c += 4, r += 4, n.next();
|
|
704
709
|
continue;
|
|
705
710
|
}
|
|
706
|
-
let
|
|
707
|
-
if (e < 0 ||
|
|
708
|
-
let d = n.id >=
|
|
709
|
-
for (n.next(); n.pos >
|
|
710
|
-
if (n.size < 0)
|
|
711
|
-
|
|
712
|
-
|
|
711
|
+
let s = n.pos - e;
|
|
712
|
+
if (e < 0 || s < i || n.start < l) break;
|
|
713
|
+
let d = n.id >= o ? 4 : 0, f = n.start;
|
|
714
|
+
for (n.next(); n.pos > s;) {
|
|
715
|
+
if (n.size < 0) {
|
|
716
|
+
if (n.size == -3 || n.size == -4) d += 4;
|
|
717
|
+
else break scan;
|
|
718
|
+
} else n.id >= o && (d += 4);
|
|
713
719
|
n.next();
|
|
714
720
|
}
|
|
715
|
-
|
|
721
|
+
a = f, r += e, c += d;
|
|
716
722
|
}
|
|
717
|
-
return (t < 0 || r == e) && (u.size = r, u.start =
|
|
718
|
-
}
|
|
719
|
-
function
|
|
720
|
-
let { id: r, start: i, end: a, size:
|
|
721
|
-
if (
|
|
722
|
-
let
|
|
723
|
-
if (
|
|
724
|
-
let r =
|
|
725
|
-
for (;
|
|
723
|
+
return (t < 0 || r == e) && (u.size = r, u.start = a, u.skip = c), u.size > 4 ? u : void 0;
|
|
724
|
+
}
|
|
725
|
+
function b(e, t, n) {
|
|
726
|
+
let { id: r, start: i, end: a, size: c } = s;
|
|
727
|
+
if (s.next(), c >= 0 && r < o) {
|
|
728
|
+
let o = n;
|
|
729
|
+
if (c > 4) {
|
|
730
|
+
let r = s.pos - (c - 4);
|
|
731
|
+
for (; s.pos > r;) n = b(e, t, n);
|
|
726
732
|
}
|
|
727
|
-
t[--n] =
|
|
728
|
-
} else
|
|
733
|
+
t[--n] = o, t[--n] = a - e, t[--n] = i - e, t[--n] = r;
|
|
734
|
+
} else c == -3 ? f = r : c == -4 && (p = r);
|
|
729
735
|
return n;
|
|
730
736
|
}
|
|
731
|
-
let
|
|
732
|
-
for (;
|
|
733
|
-
let
|
|
734
|
-
return new
|
|
737
|
+
let x = [], S = [];
|
|
738
|
+
for (; s.pos > 0;) m(e.start || 0, e.bufferStart || 0, x, S, -1, 0);
|
|
739
|
+
let C = e.length ?? (x.length ? S[0] + x[0].length : 0);
|
|
740
|
+
return new c(d[e.topID], x.reverse(), S.reverse(), C);
|
|
735
741
|
}
|
|
736
|
-
var
|
|
737
|
-
function
|
|
738
|
-
if (!e.isAnonymous || t instanceof
|
|
739
|
-
let n =
|
|
742
|
+
var T = /* @__PURE__ */ new WeakMap();
|
|
743
|
+
function E(e, t) {
|
|
744
|
+
if (!e.isAnonymous || t instanceof u || t.type != e) return 1;
|
|
745
|
+
let n = T.get(t);
|
|
740
746
|
if (n == null) {
|
|
741
747
|
n = 1;
|
|
742
748
|
for (let r of t.children) {
|
|
743
|
-
if (r.type != e || !(r instanceof
|
|
749
|
+
if (r.type != e || !(r instanceof c)) {
|
|
744
750
|
n = 1;
|
|
745
751
|
break;
|
|
746
752
|
}
|
|
747
|
-
n +=
|
|
753
|
+
n += E(e, r);
|
|
748
754
|
}
|
|
749
|
-
|
|
755
|
+
T.set(t, n);
|
|
750
756
|
}
|
|
751
757
|
return n;
|
|
752
758
|
}
|
|
753
|
-
function
|
|
759
|
+
function D(e, t, n, r, i, a, o, s, c) {
|
|
754
760
|
let l = 0;
|
|
755
|
-
for (let n = r; n < i; n++) l +=
|
|
761
|
+
for (let n = r; n < i; n++) l += E(e, t[n]);
|
|
756
762
|
let u = Math.ceil(l * 1.5 / 8), d = [], f = [];
|
|
757
763
|
function p(t, n, r, i, o) {
|
|
758
764
|
for (let s = r; s < i;) {
|
|
759
|
-
let r = s, l = n[s], m =
|
|
765
|
+
let r = s, l = n[s], m = E(e, t[s]);
|
|
760
766
|
for (s++; s < i; s++) {
|
|
761
|
-
let n =
|
|
767
|
+
let n = E(e, t[s]);
|
|
762
768
|
if (m + n >= u) break;
|
|
763
769
|
m += n;
|
|
764
770
|
}
|
|
@@ -771,19 +777,19 @@ function O(e, t, n, r, i, a, o, s, c) {
|
|
|
771
777
|
d.push(t[r]);
|
|
772
778
|
} else {
|
|
773
779
|
let i = n[s - 1] + t[s - 1].length - l;
|
|
774
|
-
d.push(
|
|
780
|
+
d.push(D(e, t, n, r, s, l, i, null, c));
|
|
775
781
|
}
|
|
776
782
|
f.push(l + o - a);
|
|
777
783
|
}
|
|
778
784
|
}
|
|
779
785
|
return p(t, n, r, i, 0), (s || c)(d, f, o);
|
|
780
786
|
}
|
|
781
|
-
new
|
|
787
|
+
new t({ perNode: !0 });
|
|
782
788
|
//#endregion
|
|
783
789
|
//#region node_modules/.pnpm/@lezer+highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js
|
|
784
|
-
var
|
|
790
|
+
var O = 0, k = class e {
|
|
785
791
|
constructor(e, t, n, r) {
|
|
786
|
-
this.name = e, this.set = t, this.base = n, this.modified = r, this.id =
|
|
792
|
+
this.name = e, this.set = t, this.base = n, this.modified = r, this.id = O++;
|
|
787
793
|
}
|
|
788
794
|
toString() {
|
|
789
795
|
let { name: e } = this;
|
|
@@ -798,33 +804,33 @@ var k = 0, A = class e {
|
|
|
798
804
|
return i;
|
|
799
805
|
}
|
|
800
806
|
static defineModifier(e) {
|
|
801
|
-
let t = new
|
|
802
|
-
return (e) => e.modified.indexOf(t) > -1 ? e :
|
|
807
|
+
let t = new j(e);
|
|
808
|
+
return (e) => e.modified.indexOf(t) > -1 ? e : j.get(e.base || e, e.modified.concat(t).sort((e, t) => e.id - t.id));
|
|
803
809
|
}
|
|
804
|
-
},
|
|
810
|
+
}, A = 0, j = class e {
|
|
805
811
|
constructor(e) {
|
|
806
|
-
this.name = e, this.instances = [], this.id =
|
|
812
|
+
this.name = e, this.instances = [], this.id = A++;
|
|
807
813
|
}
|
|
808
814
|
static get(t, n) {
|
|
809
815
|
if (!n.length) return t;
|
|
810
|
-
let r = n[0].instances.find((e) => e.base == t &&
|
|
816
|
+
let r = n[0].instances.find((e) => e.base == t && M(n, e.modified));
|
|
811
817
|
if (r) return r;
|
|
812
|
-
let i = [], a = new
|
|
818
|
+
let i = [], a = new k(t.name, i, t, n);
|
|
813
819
|
for (let e of n) e.instances.push(a);
|
|
814
|
-
let o =
|
|
820
|
+
let o = ee(n);
|
|
815
821
|
for (let n of t.set) if (!n.modified.length) for (let t of o) i.push(e.get(n, t));
|
|
816
822
|
return a;
|
|
817
823
|
}
|
|
818
824
|
};
|
|
819
|
-
function
|
|
825
|
+
function M(e, t) {
|
|
820
826
|
return e.length == t.length && e.every((e, n) => e == t[n]);
|
|
821
827
|
}
|
|
822
|
-
function
|
|
828
|
+
function ee(e) {
|
|
823
829
|
let t = [[]];
|
|
824
830
|
for (let n = 0; n < e.length; n++) for (let r = 0, i = t.length; r < i; r++) t.push(t[r].concat(e[n]));
|
|
825
831
|
return t.sort((e, t) => t.length - e.length);
|
|
826
832
|
}
|
|
827
|
-
function
|
|
833
|
+
function te(e) {
|
|
828
834
|
let t = Object.create(null);
|
|
829
835
|
for (let n in e) {
|
|
830
836
|
let r = e[n];
|
|
@@ -854,7 +860,7 @@ function ne(e) {
|
|
|
854
860
|
}
|
|
855
861
|
return N.add(t);
|
|
856
862
|
}
|
|
857
|
-
var N = new
|
|
863
|
+
var N = new t({ combine(e, t) {
|
|
858
864
|
let n, r, i;
|
|
859
865
|
for (; e || t;) {
|
|
860
866
|
if (!e || t && e.depth >= t.depth ? (i = t, t = t.next) : (i = e, e = e.next), n && n.mode == i.mode && !i.context && !n.context) continue;
|
|
@@ -900,7 +906,7 @@ function F(e, t) {
|
|
|
900
906
|
scope: r
|
|
901
907
|
};
|
|
902
908
|
}
|
|
903
|
-
function
|
|
909
|
+
function ne(e, t) {
|
|
904
910
|
let n = null;
|
|
905
911
|
for (let r of e) {
|
|
906
912
|
let e = r.style(t);
|
|
@@ -909,10 +915,10 @@ function re(e, t) {
|
|
|
909
915
|
return n;
|
|
910
916
|
}
|
|
911
917
|
function I(e, t, n, r = 0, i = e.length) {
|
|
912
|
-
let a = new
|
|
918
|
+
let a = new ie(r, Array.isArray(t) ? t : [t], n);
|
|
913
919
|
a.highlightRange(e.cursor(), r, i, "", a.highlighters), a.flush(i);
|
|
914
920
|
}
|
|
915
|
-
function
|
|
921
|
+
function re(e, t, n, r, i, a = 0, o = e.length) {
|
|
916
922
|
let s = a;
|
|
917
923
|
function c(t, n) {
|
|
918
924
|
if (!(t <= s)) {
|
|
@@ -928,7 +934,7 @@ function ie(e, t, n, r, i, a = 0, o = e.length) {
|
|
|
928
934
|
c(e, ""), c(t, n);
|
|
929
935
|
}, a, o), c(o, "");
|
|
930
936
|
}
|
|
931
|
-
var
|
|
937
|
+
var ie = class {
|
|
932
938
|
constructor(e, t, n) {
|
|
933
939
|
this.at = e, this.highlighters = t, this.span = n, this.class = "";
|
|
934
940
|
}
|
|
@@ -938,29 +944,30 @@ var ae = class {
|
|
|
938
944
|
flush(e) {
|
|
939
945
|
e > this.at && this.class && this.span(this.at, e, this.class);
|
|
940
946
|
}
|
|
941
|
-
highlightRange(e,
|
|
947
|
+
highlightRange(e, n, r, i, a) {
|
|
942
948
|
let { type: o, from: s, to: c } = e;
|
|
943
|
-
if (s >= r || c <=
|
|
949
|
+
if (s >= r || c <= n) return;
|
|
944
950
|
o.isTop && (a = this.highlighters.filter((e) => !e.scope || e.scope(o)));
|
|
945
|
-
let l = i, u = L(e) || P.empty, d =
|
|
946
|
-
if (d && (l && (l += " "), l += d, u.mode == 1 && (i += (i ? " " : "") + d)), this.startSpan(Math.max(
|
|
947
|
-
let f = e.tree && e.tree.prop(
|
|
951
|
+
let l = i, u = L(e) || P.empty, d = ne(a, u.tags);
|
|
952
|
+
if (d && (l && (l += " "), l += d, u.mode == 1 && (i += (i ? " " : "") + d)), this.startSpan(Math.max(n, s), l), u.opaque) return;
|
|
953
|
+
let f = e.tree && e.tree.prop(t.mounted);
|
|
948
954
|
if (f && f.overlay) {
|
|
949
|
-
let
|
|
955
|
+
let t = e.node.enter(f.overlay[0].from + s, 1), o = this.highlighters.filter((e) => !e.scope || e.scope(f.tree.type)), u = e.firstChild();
|
|
950
956
|
for (let d = 0, p = s;; d++) {
|
|
951
|
-
let m = d < f.overlay.length ? f.overlay[d] : null, h = m ? m.from + s : c, g = Math.max(
|
|
957
|
+
let m = d < f.overlay.length ? f.overlay[d] : null, h = m ? m.from + s : c, g = Math.max(n, p), _ = Math.min(r, h);
|
|
952
958
|
if (g < _ && u) for (; e.from < _ && (this.highlightRange(e, g, _, i, a), this.startSpan(Math.min(_, e.to), l), !(e.to >= h || !e.nextSibling())););
|
|
953
959
|
if (!m || h > r) break;
|
|
954
|
-
p = m.to + s, p >
|
|
960
|
+
p = m.to + s, p > n && (this.highlightRange(t.cursor(), Math.max(n, m.from + s), Math.min(r, p), "", o), this.startSpan(Math.min(r, p), l));
|
|
955
961
|
}
|
|
956
962
|
u && e.parent();
|
|
957
963
|
} else if (e.firstChild()) {
|
|
958
964
|
f && (i = "");
|
|
959
|
-
do
|
|
960
|
-
if (e.to <=
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
965
|
+
do
|
|
966
|
+
if (!(e.to <= n)) {
|
|
967
|
+
if (e.from >= r) break;
|
|
968
|
+
this.highlightRange(e, n, r, i, a), this.startSpan(Math.min(r, e.to), l);
|
|
969
|
+
}
|
|
970
|
+
while (e.nextSibling());
|
|
964
971
|
e.parent();
|
|
965
972
|
}
|
|
966
973
|
}
|
|
@@ -970,7 +977,7 @@ function L(e) {
|
|
|
970
977
|
for (; t && t.context && !e.matchContext(t.context);) t = t.next;
|
|
971
978
|
return t || null;
|
|
972
979
|
}
|
|
973
|
-
var R =
|
|
980
|
+
var R = k.define, z = R(), B = R(), V = R(B), H = R(B), U = R(), W = R(U), G = R(U), K = R(), q = R(K), J = R(), Y = R(), X = R(), Z = R(X), Q = R(), $ = {
|
|
974
981
|
comment: z,
|
|
975
982
|
lineComment: R(z),
|
|
976
983
|
blockComment: R(z),
|
|
@@ -1049,18 +1056,18 @@ var R = A.define, z = R(), B = R(), V = R(B), H = R(B), U = R(), W = R(U), G = R
|
|
|
1049
1056
|
documentMeta: R(Q),
|
|
1050
1057
|
annotation: R(Q),
|
|
1051
1058
|
processingInstruction: R(Q),
|
|
1052
|
-
definition:
|
|
1053
|
-
constant:
|
|
1054
|
-
function:
|
|
1055
|
-
standard:
|
|
1056
|
-
local:
|
|
1057
|
-
special:
|
|
1059
|
+
definition: k.defineModifier("definition"),
|
|
1060
|
+
constant: k.defineModifier("constant"),
|
|
1061
|
+
function: k.defineModifier("function"),
|
|
1062
|
+
standard: k.defineModifier("standard"),
|
|
1063
|
+
local: k.defineModifier("local"),
|
|
1064
|
+
special: k.defineModifier("special")
|
|
1058
1065
|
};
|
|
1059
1066
|
for (let e in $) {
|
|
1060
1067
|
let t = $[e];
|
|
1061
|
-
t instanceof
|
|
1068
|
+
t instanceof k && (t.name = e);
|
|
1062
1069
|
}
|
|
1063
|
-
var
|
|
1070
|
+
var ae = F([
|
|
1064
1071
|
{
|
|
1065
1072
|
tag: $.link,
|
|
1066
1073
|
class: "tok-link"
|
|
@@ -1187,6 +1194,6 @@ var oe = F([
|
|
|
1187
1194
|
}
|
|
1188
1195
|
]);
|
|
1189
1196
|
//#endregion
|
|
1190
|
-
export {
|
|
1197
|
+
export { k as Tag, ae as classHighlighter, L as getStyleTags, re as highlightCode, I as highlightTree, te as styleTags, F as tagHighlighter, $ as tags };
|
|
1191
1198
|
|
|
1192
|
-
//# sourceMappingURL=dist-
|
|
1199
|
+
//# sourceMappingURL=dist-CrjSW5DN.js.map
|