@langsword/trace 0.1.23 → 0.1.24
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/trace.css +1 -1
- package/dist/trace.es.js +439 -427
- package/dist/trace.umd.js +30 -30
- package/package.json +1 -1
package/dist/trace.es.js
CHANGED
|
@@ -15,9 +15,9 @@ function Vt() {
|
|
|
15
15
|
(function(r, o) {
|
|
16
16
|
l.exports = o();
|
|
17
17
|
})(rc, function() {
|
|
18
|
-
var r = navigator.userAgent, o = navigator.platform, u = /gecko\/\d/i.test(r), f = /MSIE \d/.test(r), p = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(r), y = /Edge\/(\d+)/.exec(r), m = f || p || y, k = m && (f ? document.documentMode || 6 : +(y || p)[1]), S = !y && /WebKit\//.test(r),
|
|
18
|
+
var r = navigator.userAgent, o = navigator.platform, u = /gecko\/\d/i.test(r), f = /MSIE \d/.test(r), p = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(r), y = /Edge\/(\d+)/.exec(r), m = f || p || y, k = m && (f ? document.documentMode || 6 : +(y || p)[1]), S = !y && /WebKit\//.test(r), R = S && /Qt\/\d+\.\d+/.test(r), L = !y && /Chrome\/(\d+)/.exec(r), W = L && +L[1], z = /Opera\//.test(r), D = /Apple Computer/.test(navigator.vendor), $ = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(r), I = /PhantomJS/.test(r), N = D && (/Mobile\/\w+/.test(r) || navigator.maxTouchPoints > 2), H = /Android/.test(r), V = N || H || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(r), ne = N || /Mac/.test(o), ue = /\bCrOS\b/.test(r), se = /win/i.test(o), de = z && r.match(/Version\/(\d*\.\d*)/);
|
|
19
19
|
de && (de = Number(de[1])), de && de >= 15 && (z = !1, S = !0);
|
|
20
|
-
var De = ne && (
|
|
20
|
+
var De = ne && (R || z && (de == null || de < 12.11)), Fe = u || m && k >= 9;
|
|
21
21
|
function ie(e) {
|
|
22
22
|
return new RegExp("(^|\\s)" + e + "(?:$|\\s)\\s*");
|
|
23
23
|
}
|
|
@@ -202,9 +202,9 @@ function Vt() {
|
|
|
202
202
|
return !1;
|
|
203
203
|
return !0;
|
|
204
204
|
}
|
|
205
|
-
var
|
|
205
|
+
var Re = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
|
|
206
206
|
function Ie(e) {
|
|
207
|
-
return e.charCodeAt(0) >= 768 &&
|
|
207
|
+
return e.charCodeAt(0) >= 768 && Re.test(e);
|
|
208
208
|
}
|
|
209
209
|
function $t(e, t, a) {
|
|
210
210
|
for (; (a < 0 ? t > 0 : t < e.length) && Ie(e.charAt(t)); )
|
|
@@ -242,7 +242,7 @@ function Vt() {
|
|
|
242
242
|
}
|
|
243
243
|
return i ?? Gn;
|
|
244
244
|
}
|
|
245
|
-
var
|
|
245
|
+
var Ra = /* @__PURE__ */ function() {
|
|
246
246
|
var e = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN", t = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
|
|
247
247
|
function a(v) {
|
|
248
248
|
return v <= 247 ? e.charAt(v) : 1424 <= v && v <= 1524 ? "R" : 1536 <= v && v <= 1785 ? t.charAt(v - 1536) : 1774 <= v && v <= 2220 ? "r" : 8192 <= v && v <= 8203 ? "w" : v == 8204 ? "b" : "L";
|
|
@@ -255,55 +255,55 @@ function Vt() {
|
|
|
255
255
|
var _ = C == "ltr" ? "L" : "R";
|
|
256
256
|
if (v.length == 0 || C == "ltr" && !i.test(v))
|
|
257
257
|
return !1;
|
|
258
|
-
for (var
|
|
258
|
+
for (var F = v.length, O = [], B = 0; B < F; ++B)
|
|
259
259
|
O.push(a(v.charCodeAt(B)));
|
|
260
|
-
for (var q = 0, Y = _; q <
|
|
260
|
+
for (var q = 0, Y = _; q < F; ++q) {
|
|
261
261
|
var ee = O[q];
|
|
262
262
|
ee == "m" ? O[q] = Y : Y = ee;
|
|
263
263
|
}
|
|
264
|
-
for (var ae = 0, te = _; ae <
|
|
264
|
+
for (var ae = 0, te = _; ae < F; ++ae) {
|
|
265
265
|
var le = O[ae];
|
|
266
266
|
le == "1" && te == "r" ? O[ae] = "n" : c.test(le) && (te = le, le == "r" && (O[ae] = "R"));
|
|
267
267
|
}
|
|
268
|
-
for (var ve = 1, ge = O[0]; ve <
|
|
268
|
+
for (var ve = 1, ge = O[0]; ve < F - 1; ++ve) {
|
|
269
269
|
var Ae = O[ve];
|
|
270
270
|
Ae == "+" && ge == "1" && O[ve + 1] == "1" ? O[ve] = "1" : Ae == "," && ge == O[ve + 1] && (ge == "1" || ge == "n") && (O[ve] = ge), ge = Ae;
|
|
271
271
|
}
|
|
272
|
-
for (var We = 0; We <
|
|
272
|
+
for (var We = 0; We < F; ++We) {
|
|
273
273
|
var yt = O[We];
|
|
274
274
|
if (yt == ",")
|
|
275
275
|
O[We] = "N";
|
|
276
276
|
else if (yt == "%") {
|
|
277
277
|
var Je = void 0;
|
|
278
|
-
for (Je = We + 1; Je <
|
|
278
|
+
for (Je = We + 1; Je < F && O[Je] == "%"; ++Je)
|
|
279
279
|
;
|
|
280
|
-
for (var Bt = We && O[We - 1] == "!" || Je <
|
|
280
|
+
for (var Bt = We && O[We - 1] == "!" || Je < F && O[Je] == "1" ? "1" : "N", Nt = We; Nt < Je; ++Nt)
|
|
281
281
|
O[Nt] = Bt;
|
|
282
282
|
We = Je - 1;
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
for (var at = 0,
|
|
285
|
+
for (var at = 0, Ft = _; at < F; ++at) {
|
|
286
286
|
var wt = O[at];
|
|
287
|
-
|
|
287
|
+
Ft == "L" && wt == "1" ? O[at] = "L" : c.test(wt) && (Ft = wt);
|
|
288
288
|
}
|
|
289
|
-
for (var dt = 0; dt <
|
|
289
|
+
for (var dt = 0; dt < F; ++dt)
|
|
290
290
|
if (s.test(O[dt])) {
|
|
291
291
|
var st = void 0;
|
|
292
|
-
for (st = dt + 1; st <
|
|
292
|
+
for (st = dt + 1; st < F && s.test(O[st]); ++st)
|
|
293
293
|
;
|
|
294
|
-
for (var tt = (dt ? O[dt - 1] : _) == "L",
|
|
295
|
-
O[Un] =
|
|
294
|
+
for (var tt = (dt ? O[dt - 1] : _) == "L", Rt = (st < F ? O[st] : _) == "L", Rr = tt == Rt ? tt ? "L" : "R" : _, Un = dt; Un < st; ++Un)
|
|
295
|
+
O[Un] = Rr;
|
|
296
296
|
dt = st - 1;
|
|
297
297
|
}
|
|
298
|
-
for (var Tt = [], mn, bt = 0; bt <
|
|
298
|
+
for (var Tt = [], mn, bt = 0; bt < F; )
|
|
299
299
|
if (d.test(O[bt])) {
|
|
300
300
|
var Is = bt;
|
|
301
|
-
for (++bt; bt <
|
|
301
|
+
for (++bt; bt < F && d.test(O[bt]); ++bt)
|
|
302
302
|
;
|
|
303
303
|
Tt.push(new g(0, Is, bt));
|
|
304
304
|
} else {
|
|
305
305
|
var Ln = bt, nr = Tt.length, rr = C == "rtl" ? 1 : 0;
|
|
306
|
-
for (++bt; bt <
|
|
306
|
+
for (++bt; bt < F && O[bt] != "L"; ++bt)
|
|
307
307
|
;
|
|
308
308
|
for (var Et = Ln; Et < bt; )
|
|
309
309
|
if (h.test(O[Et])) {
|
|
@@ -316,12 +316,12 @@ function Vt() {
|
|
|
316
316
|
++Et;
|
|
317
317
|
Ln < bt && Tt.splice(nr, 0, new g(1, Ln, bt));
|
|
318
318
|
}
|
|
319
|
-
return C == "ltr" && (Tt[0].level == 1 && (mn = v.match(/^\s+/)) && (Tt[0].from = mn[0].length, Tt.unshift(new g(0, 0, mn[0].length))), be(Tt).level == 1 && (mn = v.match(/\s+$/)) && (be(Tt).to -= mn[0].length, Tt.push(new g(0,
|
|
319
|
+
return C == "ltr" && (Tt[0].level == 1 && (mn = v.match(/^\s+/)) && (Tt[0].from = mn[0].length, Tt.unshift(new g(0, 0, mn[0].length))), be(Tt).level == 1 && (mn = v.match(/\s+$/)) && (be(Tt).to -= mn[0].length, Tt.push(new g(0, F - mn[0].length, F)))), C == "rtl" ? Tt.reverse() : Tt;
|
|
320
320
|
};
|
|
321
321
|
}();
|
|
322
322
|
function Me(e, t) {
|
|
323
323
|
var a = e.order;
|
|
324
|
-
return a == null && (a = e.order =
|
|
324
|
+
return a == null && (a = e.order = Ra(e.text, t)), a;
|
|
325
325
|
}
|
|
326
326
|
var Mi = [], me = function(e, t, a) {
|
|
327
327
|
if (e.addEventListener)
|
|
@@ -429,7 +429,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
429
429
|
return a;
|
|
430
430
|
} : function(e) {
|
|
431
431
|
return e.split(/\r\n?|\n/);
|
|
432
|
-
},
|
|
432
|
+
}, Fn = window.getSelection ? function(e) {
|
|
433
433
|
try {
|
|
434
434
|
return e.selectionStart != e.selectionEnd;
|
|
435
435
|
} catch {
|
|
@@ -479,8 +479,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
479
479
|
if (!a)
|
|
480
480
|
return pr(e, "text/plain");
|
|
481
481
|
var i = a(e, t);
|
|
482
|
-
if (
|
|
483
|
-
var s =
|
|
482
|
+
if (Rn.hasOwnProperty(t.name)) {
|
|
483
|
+
var s = Rn[t.name];
|
|
484
484
|
for (var c in s)
|
|
485
485
|
s.hasOwnProperty(c) && (i.hasOwnProperty(c) && (i["_" + c] = i[c]), i[c] = s[c]);
|
|
486
486
|
}
|
|
@@ -489,9 +489,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
489
489
|
i[d] = t.modeProps[d];
|
|
490
490
|
return i;
|
|
491
491
|
}
|
|
492
|
-
var
|
|
492
|
+
var Rn = {};
|
|
493
493
|
function gr(e, t) {
|
|
494
|
-
var a =
|
|
494
|
+
var a = Rn.hasOwnProperty(e) ? Rn[e] : Rn[e] = {};
|
|
495
495
|
ke(t, a);
|
|
496
496
|
}
|
|
497
497
|
function dn(e, t) {
|
|
@@ -724,11 +724,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
724
724
|
);
|
|
725
725
|
for (var d = a.state, h = function(v) {
|
|
726
726
|
a.baseTokens = s;
|
|
727
|
-
var C = e.state.overlays[v], _ = 1,
|
|
727
|
+
var C = e.state.overlays[v], _ = 1, F = 0;
|
|
728
728
|
a.state = !0, go(e, t.text, C.mode, a, function(O, B) {
|
|
729
|
-
for (var q = _;
|
|
729
|
+
for (var q = _; F < O; ) {
|
|
730
730
|
var Y = s[_];
|
|
731
|
-
Y > O && s.splice(_, 1, O, s[_ + 1], Y), _ += 2,
|
|
731
|
+
Y > O && s.splice(_, 1, O, s[_ + 1], Y), _ += 2, F = Math.min(O, Y);
|
|
732
732
|
}
|
|
733
733
|
if (B)
|
|
734
734
|
if (C.opaque)
|
|
@@ -809,10 +809,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
809
809
|
function go(e, t, a, i, s, c, d) {
|
|
810
810
|
var h = a.flattenSpans;
|
|
811
811
|
h == null && (h = e.options.flattenSpans);
|
|
812
|
-
var g = 0, v = null, C = new et(t, e.options.tabSize, i), _,
|
|
812
|
+
var g = 0, v = null, C = new et(t, e.options.tabSize, i), _, F = e.options.addModeClass && [null];
|
|
813
813
|
for (t == "" && po(co(a, i.state), c); !C.eol(); ) {
|
|
814
|
-
if (C.pos > e.options.maxHighlightLength ? (h = !1, d && Pa(e, t, i, C.pos), C.pos = t.length, _ = null) : _ = po(za(a, C, i.state,
|
|
815
|
-
var O =
|
|
814
|
+
if (C.pos > e.options.maxHighlightLength ? (h = !1, d && Pa(e, t, i, C.pos), C.pos = t.length, _ = null) : _ = po(za(a, C, i.state, F), c), F) {
|
|
815
|
+
var O = F[0].name;
|
|
816
816
|
O && (_ = "m-" + (_ ? O + " " + _ : O));
|
|
817
817
|
}
|
|
818
818
|
if (!h || v != _) {
|
|
@@ -915,10 +915,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
915
915
|
var s = t.from.ch, c = t.to.ch, d = re(t.from, t.to) == 0, h = Qc(a, s, d), g = Zc(i, c, d), v = t.text.length == 1, C = be(t.text).length + (v ? s : 0);
|
|
916
916
|
if (h)
|
|
917
917
|
for (var _ = 0; _ < h.length; ++_) {
|
|
918
|
-
var
|
|
919
|
-
if (
|
|
920
|
-
var O = Jr(g,
|
|
921
|
-
O ? v && (
|
|
918
|
+
var F = h[_];
|
|
919
|
+
if (F.to == null) {
|
|
920
|
+
var O = Jr(g, F.marker);
|
|
921
|
+
O ? v && (F.to = O.to == null ? null : O.to + C) : F.to = s;
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
924
|
if (g)
|
|
@@ -964,8 +964,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
964
964
|
for (var d = i[c], h = d.find(0), g = 0; g < s.length; ++g) {
|
|
965
965
|
var v = s[g];
|
|
966
966
|
if (!(re(v.to, h.from) < 0 || re(v.from, h.to) > 0)) {
|
|
967
|
-
var C = [g, 1], _ = re(v.from, h.from),
|
|
968
|
-
(_ < 0 || !d.inclusiveLeft && !_) && C.push({ from: v.from, to: h.from }), (
|
|
967
|
+
var C = [g, 1], _ = re(v.from, h.from), F = re(v.to, h.to);
|
|
968
|
+
(_ < 0 || !d.inclusiveLeft && !_) && C.push({ from: v.from, to: h.from }), (F > 0 || !d.inclusiveRight && !F) && C.push({ from: h.to, to: v.to }), s.splice.apply(s, C), g += C.length - 3;
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
971
|
return s;
|
|
@@ -1181,20 +1181,20 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1181
1181
|
C = document.createDocumentFragment();
|
|
1182
1182
|
for (var _ = 0; ; ) {
|
|
1183
1183
|
g.lastIndex = _;
|
|
1184
|
-
var
|
|
1184
|
+
var F = g.exec(t), O = F ? F.index - _ : t.length - _;
|
|
1185
1185
|
if (O) {
|
|
1186
1186
|
var B = document.createTextNode(h.slice(_, _ + O));
|
|
1187
1187
|
m && k < 9 ? C.appendChild(w("span", [B])) : C.appendChild(B), e.map.push(e.pos, e.pos + O, B), e.col += O, e.pos += O;
|
|
1188
1188
|
}
|
|
1189
|
-
if (!
|
|
1189
|
+
if (!F)
|
|
1190
1190
|
break;
|
|
1191
1191
|
_ += O + 1;
|
|
1192
1192
|
var q = void 0;
|
|
1193
|
-
if (
|
|
1193
|
+
if (F[0] == " ") {
|
|
1194
1194
|
var Y = e.cm.options.tabSize, ee = Y - e.col % Y;
|
|
1195
1195
|
q = C.appendChild(w("span", Ht(ee), "cm-tab")), q.setAttribute("role", "presentation"), q.setAttribute("cm-text", " "), e.col += ee;
|
|
1196
|
-
} else
|
|
1197
|
-
` ? (q = C.appendChild(w("span",
|
|
1196
|
+
} else F[0] == "\r" || F[0] == `
|
|
1197
|
+
` ? (q = C.appendChild(w("span", F[0] == "\r" ? "␍" : "", "cm-invalidchar")), q.setAttribute("cm-text", F[0]), e.col += 1) : (q = e.cm.options.specialCharPlaceholder(F[0]), q.setAttribute("cm-text", F[0]), m && k < 9 ? C.appendChild(w("span", [q])) : C.appendChild(q), e.col += 1);
|
|
1198
1198
|
e.map.push(e.pos, e.pos + 1, q), e.pos++;
|
|
1199
1199
|
}
|
|
1200
1200
|
}
|
|
@@ -1223,7 +1223,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1223
1223
|
return function(a, i, s, c, d, h, g) {
|
|
1224
1224
|
s = s ? s + " cm-force-border" : "cm-force-border";
|
|
1225
1225
|
for (var v = a.pos, C = v + i.length; ; ) {
|
|
1226
|
-
for (var _ = void 0,
|
|
1226
|
+
for (var _ = void 0, F = 0; F < t.length && (_ = t[F], !(_.to > v && _.from <= v)); F++)
|
|
1227
1227
|
;
|
|
1228
1228
|
if (_.to >= C)
|
|
1229
1229
|
return e(a, i, s, c, d, h, g);
|
|
@@ -1242,15 +1242,15 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1242
1242
|
t.addToken(t, s.slice(c, c = a[d]), Co(a[d + 1], t.cm.options));
|
|
1243
1243
|
return;
|
|
1244
1244
|
}
|
|
1245
|
-
for (var h = s.length, g = 0, v = 1, C = "", _,
|
|
1245
|
+
for (var h = s.length, g = 0, v = 1, C = "", _, F, O = 0, B, q, Y, ee, ae; ; ) {
|
|
1246
1246
|
if (O == g) {
|
|
1247
|
-
B = q = Y =
|
|
1247
|
+
B = q = Y = F = "", ae = null, ee = null, O = 1 / 0;
|
|
1248
1248
|
for (var te = [], le = void 0, ve = 0; ve < i.length; ++ve) {
|
|
1249
1249
|
var ge = i[ve], Ae = ge.marker;
|
|
1250
1250
|
if (Ae.type == "bookmark" && ge.from == g && Ae.widgetNode)
|
|
1251
1251
|
te.push(Ae);
|
|
1252
1252
|
else if (ge.from <= g && (ge.to == null || ge.to > g || Ae.collapsed && ge.to == g && ge.from == g)) {
|
|
1253
|
-
if (ge.to != null && ge.to != g && O > ge.to && (O = ge.to, q = ""), Ae.className && (B += " " + Ae.className), Ae.css && (
|
|
1253
|
+
if (ge.to != null && ge.to != g && O > ge.to && (O = ge.to, q = ""), Ae.className && (B += " " + Ae.className), Ae.css && (F = (F ? F + ";" : "") + Ae.css), Ae.startStyle && ge.from == g && (Y += " " + Ae.startStyle), Ae.endStyle && ge.to == O && (le || (le = [])).push(Ae.endStyle, ge.to), Ae.title && ((ae || (ae = {})).title = Ae.title), Ae.attributes)
|
|
1254
1254
|
for (var We in Ae.attributes)
|
|
1255
1255
|
(ae || (ae = {}))[We] = Ae.attributes[We];
|
|
1256
1256
|
Ae.collapsed && (!ee || Ha(ee.marker, Ae) < 0) && (ee = ge);
|
|
@@ -1286,7 +1286,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1286
1286
|
_ ? _ + B : B,
|
|
1287
1287
|
Y,
|
|
1288
1288
|
g + at.length == O ? q : "",
|
|
1289
|
-
|
|
1289
|
+
F,
|
|
1290
1290
|
ae
|
|
1291
1291
|
);
|
|
1292
1292
|
}
|
|
@@ -1505,7 +1505,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1505
1505
|
c.push(a.bottom - a.top);
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1508
|
+
function Fo(e, t, a) {
|
|
1509
1509
|
if (e.line == t)
|
|
1510
1510
|
return { map: e.measure.map, cache: e.measure.cache };
|
|
1511
1511
|
if (e.rest) {
|
|
@@ -1524,7 +1524,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1524
1524
|
var s = i.built = To(e, i);
|
|
1525
1525
|
return i.text = s.pre, Q(e.display.lineMeasure, s.pre), i;
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function Ro(e, t, a, i) {
|
|
1528
1528
|
return gn(e, xr(e, t), a, i);
|
|
1529
1529
|
}
|
|
1530
1530
|
function Va(e, t) {
|
|
@@ -1537,7 +1537,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1537
1537
|
function xr(e, t) {
|
|
1538
1538
|
var a = b(t), i = Va(e, a);
|
|
1539
1539
|
i && !i.text ? i = null : i && i.changes && (Eo(e, i, a, Za(e)), e.curOp.forceUpdate = !0), i || (i = Cf(e, t));
|
|
1540
|
-
var s =
|
|
1540
|
+
var s = Fo(i, t, a);
|
|
1541
1541
|
return {
|
|
1542
1542
|
line: t,
|
|
1543
1543
|
view: i,
|
|
@@ -1601,8 +1601,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1601
1601
|
e.options.lineWrapping && (_ = c.getClientRects()).length > 1 ? v = _[i == "right" ? _.length - 1 : 0] : v = c.getBoundingClientRect();
|
|
1602
1602
|
}
|
|
1603
1603
|
if (m && k < 9 && !d && (!v || !v.left && !v.right)) {
|
|
1604
|
-
var
|
|
1605
|
-
|
|
1604
|
+
var F = c.parentNode.getClientRects()[0];
|
|
1605
|
+
F ? v = { left: F.left, right: F.left + kr(e.display), top: F.top, bottom: F.bottom } : v = Mo;
|
|
1606
1606
|
}
|
|
1607
1607
|
for (var O = v.top - t.rect.top, B = v.bottom - t.rect.top, q = (O + B) / 2, Y = t.view.measure.heights, ee = 0; ee < Y.length - 1 && !(q < Y[ee]); ee++)
|
|
1608
1608
|
;
|
|
@@ -1682,7 +1682,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1682
1682
|
return { left: i - d.left, top: s - d.top };
|
|
1683
1683
|
}
|
|
1684
1684
|
function Vi(e, t, a, i, s) {
|
|
1685
|
-
return i || (i = ce(e.doc, t.line)), Ki(e, i,
|
|
1685
|
+
return i || (i = ce(e.doc, t.line)), Ki(e, i, Ro(e, i, t.ch, s), a);
|
|
1686
1686
|
}
|
|
1687
1687
|
function on(e, t, a, i, s, c) {
|
|
1688
1688
|
i = i || ce(e.doc, t.line), s || (s = xr(e, i));
|
|
@@ -1697,8 +1697,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1697
1697
|
var ee = h[q], ae = ee.level == 1;
|
|
1698
1698
|
return d(Y ? B - 1 : B, ae != Y);
|
|
1699
1699
|
}
|
|
1700
|
-
var _ = Dn(h, g, v),
|
|
1701
|
-
return
|
|
1700
|
+
var _ = Dn(h, g, v), F = Gn, O = C(g, _, v == "before");
|
|
1701
|
+
return F != null && (O.other = C(g, F, v != "before")), O;
|
|
1702
1702
|
}
|
|
1703
1703
|
function jo(e, t) {
|
|
1704
1704
|
var a = 0;
|
|
@@ -1752,13 +1752,13 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1752
1752
|
var _ = (e.options.lineWrapping ? Af : If)(e, t, a, c, C, i, s);
|
|
1753
1753
|
v = _.level != 1, h = v ? _.from : _.to - 1, g = v ? _.to : _.from - 1;
|
|
1754
1754
|
}
|
|
1755
|
-
var
|
|
1755
|
+
var F = null, O = null, B = Xt(function(ve) {
|
|
1756
1756
|
var ge = gn(e, c, ve);
|
|
1757
|
-
return ge.top += d, ge.bottom += d, Qa(ge, i, s, !1) ? (ge.top <= s && ge.left <= i && (
|
|
1757
|
+
return ge.top += d, ge.bottom += d, Qa(ge, i, s, !1) ? (ge.top <= s && ge.left <= i && (F = ve, O = ge), !0) : !1;
|
|
1758
1758
|
}, h, g), q, Y, ee = !1;
|
|
1759
1759
|
if (O) {
|
|
1760
1760
|
var ae = i - O.left < O.right - i, te = ae == v;
|
|
1761
|
-
B =
|
|
1761
|
+
B = F + (te ? 0 : 1), Y = te ? "after" : "before", q = ae ? O.left : O.right;
|
|
1762
1762
|
} else {
|
|
1763
1763
|
!v && (B == g || B == h) && B++, Y = B == 0 ? "after" : B == t.text.length ? "before" : gn(e, c, B - (v ? 1 : 0)).bottom + d <= s == v ? "after" : "before";
|
|
1764
1764
|
var le = on(e, P(a, B, Y), "line", t, c);
|
|
@@ -1768,10 +1768,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1768
1768
|
}
|
|
1769
1769
|
function If(e, t, a, i, s, c, d) {
|
|
1770
1770
|
var h = Xt(function(_) {
|
|
1771
|
-
var
|
|
1771
|
+
var F = s[_], O = F.level != 1;
|
|
1772
1772
|
return Qa(on(
|
|
1773
1773
|
e,
|
|
1774
|
-
P(a, O ?
|
|
1774
|
+
P(a, O ? F.to : F.from, O ? "before" : "after"),
|
|
1775
1775
|
"line",
|
|
1776
1776
|
t,
|
|
1777
1777
|
i
|
|
@@ -1792,8 +1792,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1792
1792
|
function Af(e, t, a, i, s, c, d) {
|
|
1793
1793
|
var h = Uo(e, t, i, d), g = h.begin, v = h.end;
|
|
1794
1794
|
/\s/.test(t.text.charAt(v - 1)) && v--;
|
|
1795
|
-
for (var C = null, _ = null,
|
|
1796
|
-
var O = s[
|
|
1795
|
+
for (var C = null, _ = null, F = 0; F < s.length; F++) {
|
|
1796
|
+
var O = s[F];
|
|
1797
1797
|
if (!(O.from >= v || O.to <= g)) {
|
|
1798
1798
|
var B = O.level != 1, q = gn(e, i, B ? Math.min(v, O.to) - 1 : Math.max(g, O.from)).right, Y = q < c ? c - q + 1e9 : q - c;
|
|
1799
1799
|
(!C || _ > Y) && (C = O, _ = Y);
|
|
@@ -1995,31 +1995,31 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
1995
1995
|
}
|
|
1996
1996
|
function _(te, le, ve) {
|
|
1997
1997
|
var ge = ce(s, te), Ae = ge.text.length, We, yt;
|
|
1998
|
-
function Je(at,
|
|
1999
|
-
return Vi(e, P(te, at), "div", ge,
|
|
1998
|
+
function Je(at, Ft) {
|
|
1999
|
+
return Vi(e, P(te, at), "div", ge, Ft);
|
|
2000
2000
|
}
|
|
2001
|
-
function Bt(at,
|
|
2002
|
-
var dt = qo(e, ge, null, at), st =
|
|
2001
|
+
function Bt(at, Ft, wt) {
|
|
2002
|
+
var dt = qo(e, ge, null, at), st = Ft == "ltr" == (wt == "after") ? "left" : "right", tt = wt == "after" ? dt.begin : dt.end - (/\s/.test(ge.text.charAt(dt.end - 1)) ? 2 : 1);
|
|
2003
2003
|
return Je(tt, st)[st];
|
|
2004
2004
|
}
|
|
2005
2005
|
var Nt = Me(ge, s.direction);
|
|
2006
|
-
return An(Nt, le || 0, ve ?? Ae, function(at,
|
|
2007
|
-
var st = wt == "ltr", tt = Je(at, st ? "left" : "right"),
|
|
2008
|
-
if (
|
|
2009
|
-
var bt = (v ?
|
|
2006
|
+
return An(Nt, le || 0, ve ?? Ae, function(at, Ft, wt, dt) {
|
|
2007
|
+
var st = wt == "ltr", tt = Je(at, st ? "left" : "right"), Rt = Je(Ft - 1, st ? "right" : "left"), Rr = le == null && at == 0, Un = ve == null && Ft == Ae, Tt = dt == 0, mn = !Nt || dt == Nt.length - 1;
|
|
2008
|
+
if (Rt.top - tt.top <= 3) {
|
|
2009
|
+
var bt = (v ? Rr : Un) && Tt, Is = (v ? Un : Rr) && mn, Ln = bt ? h : (st ? tt : Rt).left, nr = Is ? g : (st ? Rt : tt).right;
|
|
2010
2010
|
C(Ln, tt.top, nr - Ln, tt.bottom);
|
|
2011
2011
|
} else {
|
|
2012
2012
|
var rr, Et, Mr, As;
|
|
2013
|
-
st ? (rr = v &&
|
|
2013
|
+
st ? (rr = v && Rr && Tt ? h : tt.left, Et = v ? g : Bt(at, wt, "before"), Mr = v ? h : Bt(Ft, wt, "after"), As = v && Un && mn ? g : Rt.right) : (rr = v ? Bt(at, wt, "before") : h, Et = !v && Rr && Tt ? g : tt.right, Mr = !v && Un && mn ? h : Rt.left, As = v ? Bt(Ft, wt, "after") : g), C(rr, tt.top, Et - rr, tt.bottom), tt.bottom < Rt.top && C(h, tt.bottom, null, Rt.top), C(Mr, Rt.top, As - Mr, Rt.bottom);
|
|
2014
2014
|
}
|
|
2015
|
-
(!We || Yi(tt, We) < 0) && (We = tt), Yi(
|
|
2015
|
+
(!We || Yi(tt, We) < 0) && (We = tt), Yi(Rt, We) < 0 && (We = Rt), (!yt || Yi(tt, yt) < 0) && (yt = tt), Yi(Rt, yt) < 0 && (yt = Rt);
|
|
2016
2016
|
}), { start: We, end: yt };
|
|
2017
2017
|
}
|
|
2018
|
-
var
|
|
2019
|
-
if (
|
|
2020
|
-
_(
|
|
2018
|
+
var F = t.from(), O = t.to();
|
|
2019
|
+
if (F.line == O.line)
|
|
2020
|
+
_(F.line, F.ch, O.ch);
|
|
2021
2021
|
else {
|
|
2022
|
-
var B = ce(s,
|
|
2022
|
+
var B = ce(s, F.line), q = ce(s, O.line), Y = sn(B) == sn(q), ee = _(F.line, F.ch, Y ? B.text.length + 1 : null).end, ae = _(O.line, Y ? 0 : null, O.ch).start;
|
|
2023
2023
|
Y && (ee.top < ae.top - 2 ? (C(ee.right, ee.top, null, ee.bottom), C(h, ae.top, ae.left, ae.bottom)) : C(ee.right, ee.top, ae.left - ee.right, ee.bottom)), ee.bottom < ae.top && C(h, ee.bottom, null, ae.top);
|
|
2024
2024
|
}
|
|
2025
2025
|
a.appendChild(c);
|
|
@@ -2060,8 +2060,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2060
2060
|
var _ = h.node.offsetTop + h.node.offsetHeight;
|
|
2061
2061
|
v = _ - a, a = _;
|
|
2062
2062
|
} else {
|
|
2063
|
-
var
|
|
2064
|
-
v =
|
|
2063
|
+
var F = h.node.getBoundingClientRect();
|
|
2064
|
+
v = F.bottom - F.top, !g && h.text.firstChild && (C = h.text.firstChild.getBoundingClientRect().right - F.left - 1);
|
|
2065
2065
|
}
|
|
2066
2066
|
var O = h.line.height - v;
|
|
2067
2067
|
if ((O > 5e-3 || O < -5e-3) && (s < i && (c -= O), jt(h.line, v), Yo(h.line), h.rest))
|
|
@@ -2104,7 +2104,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
2107
|
-
function
|
|
2107
|
+
function Ff(e, t, a, i) {
|
|
2108
2108
|
i == null && (i = 0);
|
|
2109
2109
|
var s;
|
|
2110
2110
|
!e.options.lineWrapping && t == a && (a = t.sticky == "before" ? P(t.line, t.ch + 1, "before") : t, t = t.ch ? P(t.line, t.sticky == "before" ? t.ch - 1 : t.ch, "after") : t);
|
|
@@ -2122,7 +2122,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2122
2122
|
}
|
|
2123
2123
|
return s;
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2125
|
+
function Rf(e, t) {
|
|
2126
2126
|
var a = ss(e, t);
|
|
2127
2127
|
a.scrollTop != null && ii(e, a.scrollTop), a.scrollLeft != null && Qn(e, a.scrollLeft);
|
|
2128
2128
|
}
|
|
@@ -2138,8 +2138,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2138
2138
|
var C = Math.min(t.top, (v ? h : t.bottom) - c);
|
|
2139
2139
|
C != s && (d.scrollTop = C);
|
|
2140
2140
|
}
|
|
2141
|
-
var _ = e.options.fixedGutter ? 0 : a.gutters.offsetWidth,
|
|
2142
|
-
return B && (t.right = t.left + O), t.left < 10 ? d.scrollLeft = 0 : t.left <
|
|
2141
|
+
var _ = e.options.fixedGutter ? 0 : a.gutters.offsetWidth, F = e.curOp && e.curOp.scrollLeft != null ? e.curOp.scrollLeft : a.scroller.scrollLeft - _, O = Vn(e) - a.gutters.offsetWidth, B = t.right - t.left > O;
|
|
2142
|
+
return B && (t.right = t.left + O), t.left < 10 ? d.scrollLeft = 0 : t.left < F ? d.scrollLeft = Math.max(0, t.left + _ - (B ? 0 : 10)) : t.right > O + F - 3 && (d.scrollLeft = t.right + (B ? 0 : 10) - O), d;
|
|
2143
2143
|
}
|
|
2144
2144
|
function os(e, t) {
|
|
2145
2145
|
t != null && (Zi(e), e.curOp.scrollTop = (e.curOp.scrollTop == null ? e.doc.scrollTop : e.curOp.scrollTop) + t);
|
|
@@ -2334,7 +2334,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2334
2334
|
}
|
|
2335
2335
|
function Hf(e) {
|
|
2336
2336
|
var t = e.cm, a = t.display;
|
|
2337
|
-
e.updatedDisplay && Ji(t), e.barMeasure = ai(t), a.maxLineChanged && !t.options.lineWrapping && (e.adjustWidthTo =
|
|
2337
|
+
e.updatedDisplay && Ji(t), e.barMeasure = ai(t), a.maxLineChanged && !t.options.lineWrapping && (e.adjustWidthTo = Ro(t, a.maxLine, a.maxLine.text.length).left + 3, t.display.sizerWidth = e.adjustWidthTo, e.barMeasure.scrollWidth = Math.max(a.scroller.clientWidth, a.sizer.offsetLeft + e.adjustWidthTo + pn(t) + t.display.barWidth), e.maxScrollLeft = Math.max(0, a.sizer.offsetLeft + e.adjustWidthTo - Vn(t))), (e.updatedDisplay || e.selectionChanged) && (e.preparedSelection = a.input.prepareSelection());
|
|
2338
2338
|
}
|
|
2339
2339
|
function Wf(e) {
|
|
2340
2340
|
var t = e.cm;
|
|
@@ -2345,7 +2345,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2345
2345
|
function jf(e) {
|
|
2346
2346
|
var t = e.cm, a = t.display, i = t.doc;
|
|
2347
2347
|
if (e.updatedDisplay && nl(t, e.update), a.wheelStartX != null && (e.scrollTop != null || e.scrollLeft != null || e.scrollToPos) && (a.wheelStartX = a.wheelStartY = null), e.scrollTop != null && Qo(t, e.scrollTop, e.forceScroll), e.scrollLeft != null && Qn(t, e.scrollLeft, !0, !0), e.scrollToPos) {
|
|
2348
|
-
var s =
|
|
2348
|
+
var s = Ff(
|
|
2349
2349
|
t,
|
|
2350
2350
|
Ce(i, e.scrollToPos.from),
|
|
2351
2351
|
Ce(i, e.scrollToPos.to),
|
|
@@ -2422,8 +2422,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2422
2422
|
h && (i.state = h), c.styles = g.styles;
|
|
2423
2423
|
var v = c.styleClasses, C = g.classes;
|
|
2424
2424
|
C ? c.styleClasses = C : v && (c.styleClasses = null);
|
|
2425
|
-
for (var _ = !d || d.length != c.styles.length || v != C && (!v || !C || v.bgClass != C.bgClass || v.textClass != C.textClass),
|
|
2426
|
-
_ = d[
|
|
2425
|
+
for (var _ = !d || d.length != c.styles.length || v != C && (!v || !C || v.bgClass != C.bgClass || v.textClass != C.textClass), F = 0; !_ && F < d.length; ++F)
|
|
2426
|
+
_ = d[F] != c.styles[F];
|
|
2427
2427
|
_ && s.push(i.line), c.stateAfter = i.save(), i.nextLine();
|
|
2428
2428
|
} else
|
|
2429
2429
|
c.text.length <= e.options.maxHighlightLength && Pa(e, c.text, i), c.stateAfter = i.line % 5 == 0 ? i.save() : null, i.nextLine();
|
|
@@ -2516,8 +2516,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2516
2516
|
for (var g = i.view, v = i.viewFrom, C = 0; C < g.length; C++) {
|
|
2517
2517
|
var _ = g[C];
|
|
2518
2518
|
if (!_.hidden) if (!_.node || _.node.parentNode != c) {
|
|
2519
|
-
var
|
|
2520
|
-
c.insertBefore(
|
|
2519
|
+
var F = wf(e, _, v, a);
|
|
2520
|
+
c.insertBefore(F, d);
|
|
2521
2521
|
} else {
|
|
2522
2522
|
for (; d != _.node; )
|
|
2523
2523
|
d = h(d);
|
|
@@ -2619,8 +2619,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2619
2619
|
if (i && g || s && v) {
|
|
2620
2620
|
if (s && ne && S) {
|
|
2621
2621
|
e: for (var C = t.target, _ = d.view; C != h; C = C.parentNode)
|
|
2622
|
-
for (var
|
|
2623
|
-
if (_[
|
|
2622
|
+
for (var F = 0; F < _.length; F++)
|
|
2623
|
+
if (_[F].node == C) {
|
|
2624
2624
|
e.display.currentWheelTarget = C;
|
|
2625
2625
|
break e;
|
|
2626
2626
|
}
|
|
@@ -2687,8 +2687,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2687
2687
|
};
|
|
2688
2688
|
function ln(e, t, a) {
|
|
2689
2689
|
var i = e && e.options.selectionsMayTouch, s = t[a];
|
|
2690
|
-
t.sort(function(
|
|
2691
|
-
return re(
|
|
2690
|
+
t.sort(function(F, O) {
|
|
2691
|
+
return re(F.from(), O.from());
|
|
2692
2692
|
}), a = we(t, s);
|
|
2693
2693
|
for (var c = 1; c < t.length; c++) {
|
|
2694
2694
|
var d = t[c], h = t[c - 1], g = re(h.to(), d.from());
|
|
@@ -2763,7 +2763,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2763
2763
|
le.push(new yr(v[ve], s(ve), i));
|
|
2764
2764
|
return le;
|
|
2765
2765
|
}
|
|
2766
|
-
var h = t.from, g = t.to, v = t.text, C = ce(e, h.line), _ = ce(e, g.line),
|
|
2766
|
+
var h = t.from, g = t.to, v = t.text, C = ce(e, h.line), _ = ce(e, g.line), F = be(v), O = s(v.length - 1), B = g.line - h.line;
|
|
2767
2767
|
if (t.full)
|
|
2768
2768
|
e.insert(0, d(0, v.length)), e.remove(v.length, e.size - v.length);
|
|
2769
2769
|
else if (cl(e, t)) {
|
|
@@ -2771,15 +2771,15 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
2771
2771
|
c(_, _.text, O), B && e.remove(h.line, B), q.length && e.insert(h.line, q);
|
|
2772
2772
|
} else if (C == _)
|
|
2773
2773
|
if (v.length == 1)
|
|
2774
|
-
c(C, C.text.slice(0, h.ch) +
|
|
2774
|
+
c(C, C.text.slice(0, h.ch) + F + C.text.slice(g.ch), O);
|
|
2775
2775
|
else {
|
|
2776
2776
|
var Y = d(1, v.length - 1);
|
|
2777
|
-
Y.push(new yr(
|
|
2777
|
+
Y.push(new yr(F + C.text.slice(g.ch), O, i)), c(C, C.text.slice(0, h.ch) + v[0], s(0)), e.insert(h.line + 1, Y);
|
|
2778
2778
|
}
|
|
2779
2779
|
else if (v.length == 1)
|
|
2780
2780
|
c(C, C.text.slice(0, h.ch) + v[0] + _.text.slice(g.ch), s(0)), e.remove(h.line + 1, B);
|
|
2781
2781
|
else {
|
|
2782
|
-
c(C, C.text.slice(0, h.ch) + v[0], s(0)), c(_,
|
|
2782
|
+
c(C, C.text.slice(0, h.ch) + v[0], s(0)), c(_, F + _.text.slice(g.ch), O);
|
|
2783
2783
|
var ee = d(1, v.length - 1);
|
|
2784
2784
|
B > 1 && e.remove(h.line + 1, B - 1), e.insert(h.line + 1, ee);
|
|
2785
2785
|
}
|
|
@@ -3005,8 +3005,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3005
3005
|
if (!g.atomic)
|
|
3006
3006
|
continue;
|
|
3007
3007
|
if (a) {
|
|
3008
|
-
var _ = g.find(i < 0 ? 1 : -1),
|
|
3009
|
-
if ((i < 0 ? C : v) && (_ = Sl(e, _, -i, _ && _.line == t.line ? c : null)), _ && _.line == t.line && (
|
|
3008
|
+
var _ = g.find(i < 0 ? 1 : -1), F = void 0;
|
|
3009
|
+
if ((i < 0 ? C : v) && (_ = Sl(e, _, -i, _ && _.line == t.line ? c : null)), _ && _.line == t.line && (F = re(_, a)) && (i < 0 ? F < 0 : F > 0))
|
|
3010
3010
|
return Lr(e, _, t, i, s);
|
|
3011
3011
|
}
|
|
3012
3012
|
var O = g.find(i < 0 ? -1 : 1);
|
|
@@ -3086,7 +3086,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3086
3086
|
break;
|
|
3087
3087
|
var C = [];
|
|
3088
3088
|
ra(d, g), g.push({ changes: C, generation: s.generation }), s.generation = c.generation || ++s.maxGeneration;
|
|
3089
|
-
for (var _ = Pt(e, "beforeChange") || e.cm && Pt(e.cm, "beforeChange"),
|
|
3089
|
+
for (var _ = Pt(e, "beforeChange") || e.cm && Pt(e.cm, "beforeChange"), F = function(q) {
|
|
3090
3090
|
var Y = c.changes[q];
|
|
3091
3091
|
if (Y.origin = t, _ && !Tl(e, Y, !1))
|
|
3092
3092
|
return h.length = 0, {};
|
|
@@ -3098,7 +3098,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3098
3098
|
!le && we(ae, te.history) == -1 && (Al(te.history, Y), ae.push(te.history)), ci(te, Y, null, ml(te, Y));
|
|
3099
3099
|
});
|
|
3100
3100
|
}, O = c.changes.length - 1; O >= 0; --O) {
|
|
3101
|
-
var B =
|
|
3101
|
+
var B = F(O);
|
|
3102
3102
|
if (B) return B.v;
|
|
3103
3103
|
}
|
|
3104
3104
|
}
|
|
@@ -3155,14 +3155,14 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3155
3155
|
t.full ? Dt(e) : c.line == d.line && t.text.length == 1 && !cl(e.doc, t) ? $n(e, c.line, "text") : Dt(e, c.line, d.line + 1, v);
|
|
3156
3156
|
var C = Pt(e, "changes"), _ = Pt(e, "change");
|
|
3157
3157
|
if (_ || C) {
|
|
3158
|
-
var
|
|
3158
|
+
var F = {
|
|
3159
3159
|
from: c,
|
|
3160
3160
|
to: d,
|
|
3161
3161
|
text: t.text,
|
|
3162
3162
|
removed: t.removed,
|
|
3163
3163
|
origin: t.origin
|
|
3164
3164
|
};
|
|
3165
|
-
_ && gt(e, "change", e,
|
|
3165
|
+
_ && gt(e, "change", e, F), C && (e.curOp.changeObjs || (e.curOp.changeObjs = [])).push(F);
|
|
3166
3166
|
}
|
|
3167
3167
|
e.display.selForContextMenu = null;
|
|
3168
3168
|
}
|
|
@@ -3882,11 +3882,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3882
3882
|
}), this.cm && Qf(this.cm));
|
|
3883
3883
|
})
|
|
3884
3884
|
}), Ot.prototype.eachLine = Ot.prototype.iter;
|
|
3885
|
-
var
|
|
3885
|
+
var Fl = 0;
|
|
3886
3886
|
function fd(e) {
|
|
3887
3887
|
var t = this;
|
|
3888
|
-
if (
|
|
3889
|
-
St(e), m && (
|
|
3888
|
+
if (Rl(t), !(Ze(t, e) || Cn(t.display, e))) {
|
|
3889
|
+
St(e), m && (Fl = +/* @__PURE__ */ new Date());
|
|
3890
3890
|
var a = Yn(t, e, !0), i = e.dataTransfer.files;
|
|
3891
3891
|
if (!(!a || t.isReadOnly()))
|
|
3892
3892
|
if (i && i.length && window.FileReader && window.File)
|
|
@@ -3935,8 +3935,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3935
3935
|
if (C) {
|
|
3936
3936
|
var _;
|
|
3937
3937
|
if (t.state.draggingText && !t.state.draggingText.copy && (_ = t.listSelections()), aa(t.doc, zn(a, a)), _)
|
|
3938
|
-
for (var
|
|
3939
|
-
Ir(t.doc, "", _[
|
|
3938
|
+
for (var F = 0; F < _.length; ++F)
|
|
3939
|
+
Ir(t.doc, "", _[F].anchor, _[F].head, "drag");
|
|
3940
3940
|
t.replaceSelection(C, "around", "paste"), t.display.input.focus();
|
|
3941
3941
|
}
|
|
3942
3942
|
} catch {
|
|
@@ -3945,7 +3945,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3945
3945
|
}
|
|
3946
3946
|
}
|
|
3947
3947
|
function dd(e, t) {
|
|
3948
|
-
if (m && (!e.state.draggingText || +/* @__PURE__ */ new Date() -
|
|
3948
|
+
if (m && (!e.state.draggingText || +/* @__PURE__ */ new Date() - Fl < 100)) {
|
|
3949
3949
|
On(t);
|
|
3950
3950
|
return;
|
|
3951
3951
|
}
|
|
@@ -3961,7 +3961,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
3961
3961
|
ns(e, a, i), e.display.dragCursor || (e.display.dragCursor = w("div", null, "CodeMirror-cursors CodeMirror-dragcursors"), e.display.lineSpace.insertBefore(e.display.dragCursor, e.display.cursorDiv)), Q(e.display.dragCursor, i);
|
|
3962
3962
|
}
|
|
3963
3963
|
}
|
|
3964
|
-
function
|
|
3964
|
+
function Rl(e) {
|
|
3965
3965
|
e.display.dragCursor && (e.display.lineSpace.removeChild(e.display.dragCursor), e.display.dragCursor = null);
|
|
3966
3966
|
}
|
|
3967
3967
|
function Ml(e) {
|
|
@@ -4266,8 +4266,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4266
4266
|
var C = xr(t, a);
|
|
4267
4267
|
v = s < 0 ? a.text.length - 1 : 0;
|
|
4268
4268
|
var _ = gn(t, C, v).top;
|
|
4269
|
-
v = Xt(function(
|
|
4270
|
-
return gn(t, C,
|
|
4269
|
+
v = Xt(function(F) {
|
|
4270
|
+
return gn(t, C, F).top == _;
|
|
4271
4271
|
}, s < 0 == (d.level == 1) ? d.from : d.to - 1, v), g == "before" && (v = bs(a, v, 1));
|
|
4272
4272
|
} else
|
|
4273
4273
|
v = s < 0 ? d.to : d.from;
|
|
@@ -4290,10 +4290,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4290
4290
|
return e.options.lineWrapping ? (g = g || xr(e, t), qo(e, t, g, ee)) : { begin: 0, end: t.text.length };
|
|
4291
4291
|
}, C = v(a.sticky == "before" ? h(a, -1) : a.ch);
|
|
4292
4292
|
if (e.doc.direction == "rtl" || d.level == 1) {
|
|
4293
|
-
var _ = d.level == 1 == i < 0,
|
|
4294
|
-
if (
|
|
4293
|
+
var _ = d.level == 1 == i < 0, F = h(a, _ ? 1 : -1);
|
|
4294
|
+
if (F != null && (_ ? F <= d.to && F <= C.end : F >= d.from && F >= C.begin)) {
|
|
4295
4295
|
var O = _ ? "before" : "after";
|
|
4296
|
-
return new P(a.line,
|
|
4296
|
+
return new P(a.line, F, O);
|
|
4297
4297
|
}
|
|
4298
4298
|
}
|
|
4299
4299
|
var B = function(ee, ae, te) {
|
|
@@ -4670,7 +4670,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4670
4670
|
var i = Yn(t, e), s = tn(e), c = i ? _d(i, s) : "single";
|
|
4671
4671
|
Z(t).focus(), s == 1 && t.state.selectingText && t.state.selectingText(e), !(i && Ld(t, s, i, c, e)) && (s == 1 ? i ? Id(t, i, c, e) : Gr(e) == a.scroller && St(e) : s == 2 ? (i && ia(t.doc, i), setTimeout(function() {
|
|
4672
4672
|
return a.input.focus();
|
|
4673
|
-
}, 20)) : s == 3 && (
|
|
4673
|
+
}, 20)) : s == 3 && (Fe ? t.display.input.onContextMenu(e) : is(t)));
|
|
4674
4674
|
}
|
|
4675
4675
|
}
|
|
4676
4676
|
}
|
|
@@ -4746,7 +4746,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4746
4746
|
{ scroll: !1, origin: "*mouse" }
|
|
4747
4747
|
), g = c.sel) : ys(c, h, d, Mt) : (h = 0, Ct(c, new Ut([d], 0), Mt), g = c.sel);
|
|
4748
4748
|
var _ = a;
|
|
4749
|
-
function
|
|
4749
|
+
function F(te) {
|
|
4750
4750
|
if (re(_, te) != 0)
|
|
4751
4751
|
if (_ = te, i.unit == "rectangle") {
|
|
4752
4752
|
for (var le = [], ve = e.options.tabSize, ge = _e(ce(c, a.line).text, a.ch, ve), Ae = _e(ce(c, te.line).text, te.ch, ve), We = Math.min(ge, Ae), yt = Math.max(ge, Ae), Je = Math.min(a.line, te.line), Bt = Math.min(e.lastLine(), Math.max(a.line, te.line)); Je <= Bt; Je++) {
|
|
@@ -4759,8 +4759,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4759
4759
|
{ origin: "*mouse", scroll: !1 }
|
|
4760
4760
|
), e.scrollIntoView(te);
|
|
4761
4761
|
} else {
|
|
4762
|
-
var
|
|
4763
|
-
re(wt.anchor, dt) > 0 ? (st = wt.head, dt = vr(
|
|
4762
|
+
var Ft = d, wt = Xl(e, te, i.unit), dt = Ft.anchor, st;
|
|
4763
|
+
re(wt.anchor, dt) > 0 ? (st = wt.head, dt = vr(Ft.from(), wt.anchor)) : (st = wt.anchor, dt = At(Ft.to(), wt.head));
|
|
4764
4764
|
var tt = g.ranges.slice(0);
|
|
4765
4765
|
tt[h] = Od(e, new ze(Ce(c, dt), st)), Ct(c, ln(e, tt, h), Mt);
|
|
4766
4766
|
}
|
|
@@ -4770,7 +4770,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4770
4770
|
var le = ++B, ve = Yn(e, te, !0, i.unit == "rectangle");
|
|
4771
4771
|
if (ve)
|
|
4772
4772
|
if (re(ve, _) != 0) {
|
|
4773
|
-
e.curOp.focus = M(oe(e)),
|
|
4773
|
+
e.curOp.focus = M(oe(e)), F(ve);
|
|
4774
4774
|
var ge = Qi(s, c);
|
|
4775
4775
|
(ve.line >= ge.to || ve.line < ge.from) && setTimeout(mt(e, function() {
|
|
4776
4776
|
B == le && q(te);
|
|
@@ -4810,7 +4810,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4810
4810
|
var C = Dn(c, i.ch, i.sticky), _ = C - d || (i.ch - a.ch) * (h.level == 1 ? -1 : 1);
|
|
4811
4811
|
C == g - 1 || C == g ? v = _ < 0 : v = _ > 0;
|
|
4812
4812
|
}
|
|
4813
|
-
var
|
|
4813
|
+
var F = c[g + (v ? -1 : 0)], O = v == (F.level == 1), B = O ? F.from : F.to, q = O ? "after" : "before";
|
|
4814
4814
|
return a.ch == B && a.sticky == q ? t : new ze(new P(a.line, B, q), i);
|
|
4815
4815
|
}
|
|
4816
4816
|
function Yl(e, t, a, i) {
|
|
@@ -4842,7 +4842,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4842
4842
|
return Yl(e, t, "gutterClick", !0);
|
|
4843
4843
|
}
|
|
4844
4844
|
function Jl(e, t) {
|
|
4845
|
-
Cn(e.display, t) || Nd(e, t) || Ze(e, t, "contextmenu") ||
|
|
4845
|
+
Cn(e.display, t) || Nd(e, t) || Ze(e, t, "contextmenu") || Fe || e.display.input.onContextMenu(t);
|
|
4846
4846
|
}
|
|
4847
4847
|
function Nd(e, t) {
|
|
4848
4848
|
return Pt(e, "gutterContextMenu") ? Yl(e, t, "gutterContextMenu", !1) : !1;
|
|
@@ -4853,7 +4853,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4853
4853
|
var Nr = { toString: function() {
|
|
4854
4854
|
return "CodeMirror.Init";
|
|
4855
4855
|
} }, Zl = {}, fa = {};
|
|
4856
|
-
function
|
|
4856
|
+
function Fd(e) {
|
|
4857
4857
|
var t = e.optionHandlers;
|
|
4858
4858
|
function a(i, s, c, d) {
|
|
4859
4859
|
e.defaults[i] = s, c && (t[i] = d ? function(h, g, v) {
|
|
@@ -4916,7 +4916,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4916
4916
|
s = s === "" ? null : s, i.display.input.screenReaderLabelChanged(s);
|
|
4917
4917
|
}), a("disableInput", !1, function(i, s) {
|
|
4918
4918
|
s || i.display.input.reset();
|
|
4919
|
-
}, !0), a("dragDrop", !0,
|
|
4919
|
+
}, !0), a("dragDrop", !0, Rd), a("allowDropFileTypes", null), a("cursorBlinkRate", 530), a("cursorScrollMargin", 0), a("cursorHeight", 1, ni, !0), a("singleCursorHeightPerLine", !0, ni, !0), a("workTime", 100), a("workDelay", 100), a("flattenSpans", !0, ui, !0), a("addModeClass", !1, ui, !0), a("pollInterval", 100), a("undoDepth", 200, function(i, s) {
|
|
4920
4920
|
return i.doc.history.undoDepth = s;
|
|
4921
4921
|
}), a("historyEventDelay", 1250), a("viewportMargin", 10, function(i) {
|
|
4922
4922
|
return i.refresh();
|
|
@@ -4928,7 +4928,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
4928
4928
|
return i.doc.setDirection(s);
|
|
4929
4929
|
}, !0), a("phrases", null);
|
|
4930
4930
|
}
|
|
4931
|
-
function
|
|
4931
|
+
function Rd(e, t, a) {
|
|
4932
4932
|
var i = a && a != Nr;
|
|
4933
4933
|
if (!t != !i) {
|
|
4934
4934
|
var s = e.display.dragFunctions, c = t ? me : kt;
|
|
@@ -5058,7 +5058,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5058
5058
|
},
|
|
5059
5059
|
drop: mt(e, fd),
|
|
5060
5060
|
leave: function(g) {
|
|
5061
|
-
Ze(e, g) ||
|
|
5061
|
+
Ze(e, g) || Rl(e);
|
|
5062
5062
|
}
|
|
5063
5063
|
};
|
|
5064
5064
|
var h = t.input.getField();
|
|
@@ -5088,11 +5088,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5088
5088
|
a = "prev";
|
|
5089
5089
|
}
|
|
5090
5090
|
a == "prev" ? t > s.first ? C = _e(ce(s, t - 1).text, null, d) : C = 0 : a == "add" ? C = g + e.options.indentUnit : a == "subtract" ? C = g - e.options.indentUnit : typeof a == "number" && (C = g + a), C = Math.max(0, C);
|
|
5091
|
-
var _ = "",
|
|
5091
|
+
var _ = "", F = 0;
|
|
5092
5092
|
if (e.options.indentWithTabs)
|
|
5093
5093
|
for (var O = Math.floor(C / d); O; --O)
|
|
5094
|
-
|
|
5095
|
-
if (
|
|
5094
|
+
F += d, _ += " ";
|
|
5095
|
+
if (F < C && (_ += Ht(C - F)), _ != v)
|
|
5096
5096
|
return Ir(s, _, P(t, 0), P(t, v.length), "+input"), h.stateAfter = null, !0;
|
|
5097
5097
|
for (var B = 0; B < s.sel.ranges.length; B++) {
|
|
5098
5098
|
var q = s.sel.ranges[B];
|
|
@@ -5122,15 +5122,15 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5122
5122
|
} else g.length == i.ranges.length && e.options.pasteLinesPerSelection && (v = xt(g, function(ee) {
|
|
5123
5123
|
return [ee];
|
|
5124
5124
|
}));
|
|
5125
|
-
for (var _ = e.curOp.updateInput,
|
|
5126
|
-
var O = i.ranges[
|
|
5125
|
+
for (var _ = e.curOp.updateInput, F = i.ranges.length - 1; F >= 0; F--) {
|
|
5126
|
+
var O = i.ranges[F], B = O.from(), q = O.to();
|
|
5127
5127
|
O.empty() && (a && a > 0 ? B = P(B.line, B.ch - a) : e.state.overwrite && !h ? q = P(q.line, Math.min(ce(c, q.line).text.length, q.ch + be(g).length)) : h && un && un.lineWise && un.text.join(`
|
|
5128
5128
|
`) == g.join(`
|
|
5129
5129
|
`) && (B = q = P(B.line, 0)));
|
|
5130
5130
|
var Y = {
|
|
5131
5131
|
from: B,
|
|
5132
5132
|
to: q,
|
|
5133
|
-
text: v ? v[
|
|
5133
|
+
text: v ? v[F % v.length] : g,
|
|
5134
5134
|
origin: s || (h ? "paste" : e.state.cutIncoming > d ? "cut" : "+input")
|
|
5135
5135
|
};
|
|
5136
5136
|
Er(e.doc, Y), gt(e, "inputRead", e, Y);
|
|
@@ -5239,8 +5239,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5239
5239
|
c = Math.min(this.lastLine(), v.line - (v.ch ? 0 : 1)) + 1;
|
|
5240
5240
|
for (var _ = C; _ < c; ++_)
|
|
5241
5241
|
ki(this, _, i);
|
|
5242
|
-
var
|
|
5243
|
-
g.ch == 0 && s.length ==
|
|
5242
|
+
var F = this.doc.sel.ranges;
|
|
5243
|
+
g.ch == 0 && s.length == F.length && F[d].from().ch > 0 && ys(this.doc, d, new ze(g, F[d].to()), ut);
|
|
5244
5244
|
}
|
|
5245
5245
|
}
|
|
5246
5246
|
}),
|
|
@@ -5340,10 +5340,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5340
5340
|
if (s.style.position = "absolute", s.setAttribute("cm-ignore-events", "true"), this.display.input.setUneditable(s), g.sizer.appendChild(s), d == "over")
|
|
5341
5341
|
v = i.top;
|
|
5342
5342
|
else if (d == "above" || d == "near") {
|
|
5343
|
-
var _ = Math.max(g.wrapper.clientHeight, this.doc.height),
|
|
5344
|
-
(d == "above" || i.bottom + s.offsetHeight > _) && i.top > s.offsetHeight ? v = i.top - s.offsetHeight : i.bottom + s.offsetHeight <= _ && (v = i.bottom), C + s.offsetWidth >
|
|
5343
|
+
var _ = Math.max(g.wrapper.clientHeight, this.doc.height), F = Math.max(g.sizer.clientWidth, g.lineSpace.clientWidth);
|
|
5344
|
+
(d == "above" || i.bottom + s.offsetHeight > _) && i.top > s.offsetHeight ? v = i.top - s.offsetHeight : i.bottom + s.offsetHeight <= _ && (v = i.bottom), C + s.offsetWidth > F && (C = F - s.offsetWidth);
|
|
5345
5345
|
}
|
|
5346
|
-
s.style.top = v + "px", s.style.left = s.style.right = "", h == "right" ? (C = g.sizer.clientWidth - s.offsetWidth, s.style.right = "0px") : (h == "left" ? C = 0 : h == "middle" && (C = (g.sizer.clientWidth - s.offsetWidth) / 2), s.style.left = C + "px"), c &&
|
|
5346
|
+
s.style.top = v + "px", s.style.left = s.style.right = "", h == "right" ? (C = g.sizer.clientWidth - s.offsetWidth, s.style.right = "0px") : (h == "left" ? C = 0 : h == "middle" && (C = (g.sizer.clientWidth - s.offsetWidth) / 2), s.style.left = C + "px"), c && Rf(this, { left: C, top: v, right: C + s.offsetWidth, bottom: v + s.offsetHeight });
|
|
5347
5347
|
},
|
|
5348
5348
|
triggerOnKeyDown: Lt(ql),
|
|
5349
5349
|
triggerOnKeyPress: Lt(Kl),
|
|
@@ -5393,8 +5393,8 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5393
5393
|
return i < 0 ? C.from() : C.to();
|
|
5394
5394
|
var _ = on(c, C.head, "div");
|
|
5395
5395
|
C.goalColumn != null && (_.left = C.goalColumn), h.push(_.left);
|
|
5396
|
-
var
|
|
5397
|
-
return s == "page" && C == d.sel.primary() && os(c, Vi(c,
|
|
5396
|
+
var F = iu(c, _, i, s);
|
|
5397
|
+
return s == "page" && C == d.sel.primary() && os(c, Vi(c, F, "div").top - _.top), F;
|
|
5398
5398
|
}, ct), h.length)
|
|
5399
5399
|
for (var v = 0; v < d.sel.ranges.length; v++)
|
|
5400
5400
|
d.sel.ranges[v].goalColumn = h[v];
|
|
@@ -5531,11 +5531,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5531
5531
|
else if (i == "column")
|
|
5532
5532
|
C(!0);
|
|
5533
5533
|
else if (i == "word" || i == "group")
|
|
5534
|
-
for (var _ = null,
|
|
5534
|
+
for (var _ = null, F = i == "group", O = e.cm && e.cm.getHelper(t, "wordChars"), B = !0; !(a < 0 && !C(!B)); B = !1) {
|
|
5535
5535
|
var q = h.text.charAt(t.ch) || `
|
|
5536
|
-
`, Y = xe(q, O) ? "w" :
|
|
5537
|
-
` ? "n" : !
|
|
5538
|
-
if (
|
|
5536
|
+
`, Y = xe(q, O) ? "w" : F && q == `
|
|
5537
|
+
` ? "n" : !F || /\s/.test(q) ? null : "p";
|
|
5538
|
+
if (F && !B && !Y && (Y = "s"), _ && _ != Y) {
|
|
5539
5539
|
a < 0 && (a = 1, C(), t.sticky = "after");
|
|
5540
5540
|
break;
|
|
5541
5541
|
}
|
|
@@ -5613,9 +5613,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5613
5613
|
var C = ru(), _ = C.firstChild;
|
|
5614
5614
|
Ls(_), i.display.lineSpace.insertBefore(C, i.display.lineSpace.firstChild), _.value = un.text.join(`
|
|
5615
5615
|
`);
|
|
5616
|
-
var
|
|
5616
|
+
var F = M(Te(s));
|
|
5617
5617
|
E(_), setTimeout(function() {
|
|
5618
|
-
i.display.lineSpace.removeChild(C),
|
|
5618
|
+
i.display.lineSpace.removeChild(C), F.focus(), F == s && a.showPrimarySelection();
|
|
5619
5619
|
}, 50);
|
|
5620
5620
|
}
|
|
5621
5621
|
}
|
|
@@ -5646,12 +5646,12 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5646
5646
|
e.removeAllRanges();
|
|
5647
5647
|
return;
|
|
5648
5648
|
}
|
|
5649
|
-
var
|
|
5649
|
+
var F = e.rangeCount && e.getRangeAt(0), O;
|
|
5650
5650
|
try {
|
|
5651
5651
|
O = G(g.node, g.offset, v.offset, v.node);
|
|
5652
5652
|
} catch {
|
|
5653
5653
|
}
|
|
5654
|
-
O && (!u && t.state.focused ? (e.collapse(g.node, g.offset), O.collapsed || (e.removeAllRanges(), e.addRange(O))) : (e.removeAllRanges(), e.addRange(O)),
|
|
5654
|
+
O && (!u && t.state.focused ? (e.collapse(g.node, g.offset), O.collapsed || (e.removeAllRanges(), e.addRange(O))) : (e.removeAllRanges(), e.addRange(O)), F && e.anchorNode == null ? e.addRange(F) : u && this.startGracePeriod()), this.rememberSelection();
|
|
5655
5655
|
}
|
|
5656
5656
|
}, He.prototype.startGracePeriod = function() {
|
|
5657
5657
|
var e = this;
|
|
@@ -5718,25 +5718,25 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5718
5718
|
var g = Jn(e, s.line), v, C;
|
|
5719
5719
|
if (g == t.view.length - 1 ? (v = t.viewTo - 1, C = t.lineDiv.lastChild) : (v = b(t.view[g + 1].line) - 1, C = t.view[g + 1].node.previousSibling), !h)
|
|
5720
5720
|
return !1;
|
|
5721
|
-
for (var _ = e.doc.splitLines(Bd(e, h, C, d, v)),
|
|
5722
|
-
if (be(_) == be(
|
|
5723
|
-
_.pop(),
|
|
5724
|
-
else if (_[0] ==
|
|
5725
|
-
_.shift(),
|
|
5721
|
+
for (var _ = e.doc.splitLines(Bd(e, h, C, d, v)), F = wn(e.doc, P(d, 0), P(v, ce(e.doc, v).text.length)); _.length > 1 && F.length > 1; )
|
|
5722
|
+
if (be(_) == be(F))
|
|
5723
|
+
_.pop(), F.pop(), v--;
|
|
5724
|
+
else if (_[0] == F[0])
|
|
5725
|
+
_.shift(), F.shift(), d++;
|
|
5726
5726
|
else
|
|
5727
5727
|
break;
|
|
5728
|
-
for (var O = 0, B = 0, q = _[0], Y =
|
|
5728
|
+
for (var O = 0, B = 0, q = _[0], Y = F[0], ee = Math.min(q.length, Y.length); O < ee && q.charCodeAt(O) == Y.charCodeAt(O); )
|
|
5729
5729
|
++O;
|
|
5730
|
-
for (var ae = be(_), te = be(
|
|
5730
|
+
for (var ae = be(_), te = be(F), le = Math.min(
|
|
5731
5731
|
ae.length - (_.length == 1 ? O : 0),
|
|
5732
|
-
te.length - (
|
|
5732
|
+
te.length - (F.length == 1 ? O : 0)
|
|
5733
5733
|
); B < le && ae.charCodeAt(ae.length - B - 1) == te.charCodeAt(te.length - B - 1); )
|
|
5734
5734
|
++B;
|
|
5735
|
-
if (_.length == 1 &&
|
|
5735
|
+
if (_.length == 1 && F.length == 1 && d == i.line)
|
|
5736
5736
|
for (; O && O > i.ch && ae.charCodeAt(ae.length - B - 1) == te.charCodeAt(te.length - B - 1); )
|
|
5737
5737
|
O--, B++;
|
|
5738
5738
|
_[_.length - 1] = ae.slice(0, ae.length - B).replace(/^\u200b+/, ""), _[0] = _[0].slice(O).replace(/\u200b+$/, "");
|
|
5739
|
-
var ve = P(d, O), ge = P(v,
|
|
5739
|
+
var ve = P(d, O), ge = P(v, F.length ? be(F).length - B : 0);
|
|
5740
5740
|
if (_.length > 1 || _[0] || re(ve, ge))
|
|
5741
5741
|
return Ir(e.doc, _, ve, ge, "+input"), !0;
|
|
5742
5742
|
}, He.prototype.ensurePolled = function() {
|
|
@@ -5773,7 +5773,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5773
5773
|
var a = Va(e, t.line);
|
|
5774
5774
|
if (!a || a.hidden)
|
|
5775
5775
|
return null;
|
|
5776
|
-
var i = ce(e.doc, t.line), s =
|
|
5776
|
+
var i = ce(e.doc, t.line), s = Fo(a, i, t.line), c = Me(i, e.doc.direction), d = "left";
|
|
5777
5777
|
if (c) {
|
|
5778
5778
|
var h = Dn(c, t.ch);
|
|
5779
5779
|
d = h % 2 ? "right" : "left";
|
|
@@ -5787,7 +5787,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5787
5787
|
return !0;
|
|
5788
5788
|
return !1;
|
|
5789
5789
|
}
|
|
5790
|
-
function
|
|
5790
|
+
function Fr(e, t) {
|
|
5791
5791
|
return t && (e.bad = !0), e;
|
|
5792
5792
|
}
|
|
5793
5793
|
function Bd(e, t, a, i, s) {
|
|
@@ -5803,7 +5803,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5803
5803
|
function _(O) {
|
|
5804
5804
|
O && (C(), c += O);
|
|
5805
5805
|
}
|
|
5806
|
-
function
|
|
5806
|
+
function F(O) {
|
|
5807
5807
|
if (O.nodeType == 1) {
|
|
5808
5808
|
var B = O.getAttribute("cm-text");
|
|
5809
5809
|
if (B) {
|
|
@@ -5823,11 +5823,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5823
5823
|
return;
|
|
5824
5824
|
ae && C();
|
|
5825
5825
|
for (var te = 0; te < O.childNodes.length; te++)
|
|
5826
|
-
|
|
5826
|
+
F(O.childNodes[te]);
|
|
5827
5827
|
/^(pre|p)$/i.test(O.nodeName) && (g = !0), ae && (d = !0);
|
|
5828
5828
|
} else O.nodeType == 3 && _(O.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
|
|
5829
5829
|
}
|
|
5830
|
-
for (;
|
|
5830
|
+
for (; F(t), t != a; )
|
|
5831
5831
|
t = t.nextSibling, g = !1;
|
|
5832
5832
|
return c;
|
|
5833
5833
|
}
|
|
@@ -5835,7 +5835,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5835
5835
|
var i;
|
|
5836
5836
|
if (t == e.display.lineDiv) {
|
|
5837
5837
|
if (i = e.display.lineDiv.childNodes[a], !i)
|
|
5838
|
-
return
|
|
5838
|
+
return Fr(e.clipPos(P(e.display.viewTo - 1)), !0);
|
|
5839
5839
|
t = null, a = 0;
|
|
5840
5840
|
} else
|
|
5841
5841
|
for (i = t; ; i = i.parentNode) {
|
|
@@ -5853,10 +5853,10 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5853
5853
|
function Hd(e, t, a) {
|
|
5854
5854
|
var i = e.text.firstChild, s = !1;
|
|
5855
5855
|
if (!t || !A(i, t))
|
|
5856
|
-
return
|
|
5856
|
+
return Fr(P(b(e.line), 0), !0);
|
|
5857
5857
|
if (t == i && (s = !0, t = i.childNodes[a], a = 0, !t)) {
|
|
5858
5858
|
var c = e.rest ? be(e.rest) : e.line;
|
|
5859
|
-
return
|
|
5859
|
+
return Fr(P(b(c), c.text.length), s);
|
|
5860
5860
|
}
|
|
5861
5861
|
var d = t.nodeType == 3 ? t : null, h = t;
|
|
5862
5862
|
for (!d && t.childNodes.length == 1 && t.firstChild.nodeType == 3 && (d = t.firstChild, a && (a = d.nodeValue.length)); h.parentNode != i; )
|
|
@@ -5874,15 +5874,15 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5874
5874
|
}
|
|
5875
5875
|
var _ = C(d, h, a);
|
|
5876
5876
|
if (_)
|
|
5877
|
-
return
|
|
5878
|
-
for (var
|
|
5879
|
-
if (_ = C(
|
|
5880
|
-
return
|
|
5881
|
-
O +=
|
|
5877
|
+
return Fr(_, s);
|
|
5878
|
+
for (var F = h.nextSibling, O = d ? d.nodeValue.length - a : 0; F; F = F.nextSibling) {
|
|
5879
|
+
if (_ = C(F, F.firstChild, 0), _)
|
|
5880
|
+
return Fr(P(_.line, _.ch - O), s);
|
|
5881
|
+
O += F.textContent.length;
|
|
5882
5882
|
}
|
|
5883
5883
|
for (var B = h.previousSibling, q = a; B; B = B.previousSibling) {
|
|
5884
5884
|
if (_ = C(B, B.firstChild, -1), _)
|
|
5885
|
-
return
|
|
5885
|
+
return Fr(P(_.line, _.ch + q), s);
|
|
5886
5886
|
q += B.textContent.length;
|
|
5887
5887
|
}
|
|
5888
5888
|
}
|
|
@@ -5994,7 +5994,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
5994
5994
|
t.polling.set(20, a);
|
|
5995
5995
|
}, rt.prototype.poll = function() {
|
|
5996
5996
|
var e = this, t = this.cm, a = this.textarea, i = this.prevInput;
|
|
5997
|
-
if (this.contextMenuPending || this.resetting || !t.state.focused ||
|
|
5997
|
+
if (this.contextMenuPending || this.resetting || !t.state.focused || Fn(a) && !i && !this.composing || t.isReadOnly() || t.options.disableInput || t.state.keySeq)
|
|
5998
5998
|
return !1;
|
|
5999
5999
|
var s = a.value;
|
|
6000
6000
|
if (s == i && !t.somethingSelected())
|
|
@@ -6041,7 +6041,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6041
6041
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;
|
|
6042
6042
|
var _;
|
|
6043
6043
|
S && (_ = s.ownerDocument.defaultView.scrollY), i.input.focus(), S && s.ownerDocument.defaultView.scrollTo(null, _), i.input.reset(), a.somethingSelected() || (s.value = t.prevInput = " "), t.contextMenuPending = O, i.selForContextMenu = a.doc.sel, clearTimeout(i.detectingSelectAll);
|
|
6044
|
-
function
|
|
6044
|
+
function F() {
|
|
6045
6045
|
if (s.selectionStart != null) {
|
|
6046
6046
|
var q = a.somethingSelected(), Y = "" + (q ? s.value : "");
|
|
6047
6047
|
s.value = "⇚", s.value = Y, t.prevInput = q ? "" : "", s.selectionStart = 1, s.selectionEnd = Y.length, i.selForContextMenu = a.doc.sel;
|
|
@@ -6049,14 +6049,14 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6049
6049
|
}
|
|
6050
6050
|
function O() {
|
|
6051
6051
|
if (t.contextMenuPending == O && (t.contextMenuPending = !1, t.wrapper.style.cssText = v, s.style.cssText = g, m && k < 9 && i.scrollbars.setScrollTop(i.scroller.scrollTop = d), s.selectionStart != null)) {
|
|
6052
|
-
(!m || m && k < 9) &&
|
|
6052
|
+
(!m || m && k < 9) && F();
|
|
6053
6053
|
var q = 0, Y = function() {
|
|
6054
6054
|
i.selForContextMenu == a.doc.sel && s.selectionStart == 0 && s.selectionEnd > 0 && t.prevInput == "" ? mt(a, Cl)(a) : q++ < 10 ? i.detectingSelectAll = setTimeout(Y, 500) : (i.selForContextMenu = null, i.input.reset());
|
|
6055
6055
|
};
|
|
6056
6056
|
i.detectingSelectAll = setTimeout(Y, 200);
|
|
6057
6057
|
}
|
|
6058
6058
|
}
|
|
6059
|
-
if (m && k >= 9 &&
|
|
6059
|
+
if (m && k >= 9 && F(), Fe) {
|
|
6060
6060
|
On(e);
|
|
6061
6061
|
var B = function() {
|
|
6062
6062
|
kt(window, "mouseup", B), setTimeout(O, 20);
|
|
@@ -6103,9 +6103,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6103
6103
|
return h;
|
|
6104
6104
|
}
|
|
6105
6105
|
function jd(e) {
|
|
6106
|
-
e.off = kt, e.on = me, e.wheelEventPixels = Yf, e.Doc = Ot, e.splitLines = Jt, e.countColumn = _e, e.findColumn = ft, e.isWordChar = ye, e.Pass = Ue, e.signal = Qe, e.Line = yr, e.changeEnd = Bn, e.scrollbarModel = el, e.Pos = P, e.cmpPos = re, e.modes = dr, e.mimeModes = rn, e.resolveMode = hr, e.getMode = pr, e.modeExtensions =
|
|
6106
|
+
e.off = kt, e.on = me, e.wheelEventPixels = Yf, e.Doc = Ot, e.splitLines = Jt, e.countColumn = _e, e.findColumn = ft, e.isWordChar = ye, e.Pass = Ue, e.signal = Qe, e.Line = yr, e.changeEnd = Bn, e.scrollbarModel = el, e.Pos = P, e.cmpPos = re, e.modes = dr, e.mimeModes = rn, e.resolveMode = hr, e.getMode = pr, e.modeExtensions = Rn, e.extendMode = gr, e.copyState = dn, e.startState = mr, e.innerMode = Vr, e.commands = yi, e.keyMap = _n, e.keyName = Bl, e.isModifierKey = Pl, e.lookupKey = Dr, e.normalizeKeyMap = yd, e.StringStream = et, e.SharedTextMarker = gi, e.TextMarker = Wn, e.LineWidget = pi, e.e_preventDefault = St, e.e_stopPropagation = cr, e.e_stop = On, e.addClass = K, e.contains = A, e.rmClass = $e, e.keyNames = jn;
|
|
6107
6107
|
}
|
|
6108
|
-
|
|
6108
|
+
Fd(Ve), Pd(Ve);
|
|
6109
6109
|
var Ud = "iter insert remove copy getEditor constructor".split(" ");
|
|
6110
6110
|
for (var pa in Ot.prototype)
|
|
6111
6111
|
Ot.prototype.hasOwnProperty(pa) && we(Ud, pa) < 0 && (Ve.prototype[pa] = /* @__PURE__ */ function(e) {
|
|
@@ -6132,7 +6132,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6132
6132
|
r(Vt());
|
|
6133
6133
|
})(function(r) {
|
|
6134
6134
|
r.defineMode("javascript", function(o, u) {
|
|
6135
|
-
var f = o.indentUnit, p = u.statementIndent, y = u.jsonld, m = u.json || y, k = u.trackScope !== !1, S = u.typescript,
|
|
6135
|
+
var f = o.indentUnit, p = u.statementIndent, y = u.jsonld, m = u.json || y, k = u.trackScope !== !1, S = u.typescript, R = u.wordCharacters || /[\w$\xa1-\uffff]/, L = function() {
|
|
6136
6136
|
function b(pt) {
|
|
6137
6137
|
return { type: pt, style: "keyword" };
|
|
6138
6138
|
}
|
|
@@ -6216,14 +6216,14 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6216
6216
|
return T.tokenize = ue, ue(b, T);
|
|
6217
6217
|
if (U == "#" && b.peek() == "!")
|
|
6218
6218
|
return b.skipToEnd(), N("meta", "meta");
|
|
6219
|
-
if (U == "#" && b.eatWhile(
|
|
6219
|
+
if (U == "#" && b.eatWhile(R))
|
|
6220
6220
|
return N("variable", "property");
|
|
6221
6221
|
if (U == "<" && b.match("!--") || U == "-" && b.match("->") && !/\S/.test(b.string.slice(0, b.start)))
|
|
6222
6222
|
return b.skipToEnd(), N("comment", "comment");
|
|
6223
6223
|
if (W.test(U))
|
|
6224
6224
|
return (U != ">" || !T.lexical || T.lexical.type != ">") && (b.eat("=") ? (U == "!" || U == "=") && b.eat("=") : /[<>*+\-|&?]/.test(U) && (b.eat(U), U == ">" && b.eat(U))), U == "?" && b.eat(".") ? N(".") : N("operator", "operator", b.current());
|
|
6225
|
-
if (
|
|
6226
|
-
b.eatWhile(
|
|
6225
|
+
if (R.test(U)) {
|
|
6226
|
+
b.eatWhile(R);
|
|
6227
6227
|
var X = b.current();
|
|
6228
6228
|
if (T.lastType != ".") {
|
|
6229
6229
|
if (L.propertyIsEnumerable(X)) {
|
|
@@ -6288,7 +6288,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6288
6288
|
}
|
|
6289
6289
|
} else if (At >= 3 && At < 6)
|
|
6290
6290
|
++P;
|
|
6291
|
-
else if (
|
|
6291
|
+
else if (R.test(pt))
|
|
6292
6292
|
re = !0;
|
|
6293
6293
|
else if (/["'\/`]/.test(pt))
|
|
6294
6294
|
for (; ; --Pe) {
|
|
@@ -6317,7 +6317,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6317
6317
|
import: !0,
|
|
6318
6318
|
"jsonld-keyword": !0
|
|
6319
6319
|
};
|
|
6320
|
-
function
|
|
6320
|
+
function Fe(b, T, U, X, P, re) {
|
|
6321
6321
|
this.indented = b, this.column = T, this.type = U, this.prev = P, this.info = re, X != null && (this.align = X);
|
|
6322
6322
|
}
|
|
6323
6323
|
function ie(b, T) {
|
|
@@ -6403,7 +6403,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6403
6403
|
if (X.lexical.type == "stat") P = X.lexical.indented;
|
|
6404
6404
|
else for (var re = X.lexical; re && re.type == ")" && re.align; re = re.prev)
|
|
6405
6405
|
P = re.indented;
|
|
6406
|
-
X.lexical = new
|
|
6406
|
+
X.lexical = new Fe(P, j.stream.column(), b, null, X.lexical, T);
|
|
6407
6407
|
};
|
|
6408
6408
|
return U.lex = !0, U;
|
|
6409
6409
|
}
|
|
@@ -6429,7 +6429,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6429
6429
|
fe,
|
|
6430
6430
|
fe,
|
|
6431
6431
|
Te
|
|
6432
|
-
) : b == "case" ? w(we, ke(":")) : b == "default" ? w(ke(":")) : b == "catch" ? w(Z("form"), x, lt, _e, fe, Te) : b == "export" ? w(Z("stat"), hr, fe) : b == "import" ? w(Z("stat"),
|
|
6432
|
+
) : b == "case" ? w(we, ke(":")) : b == "default" ? w(ke(":")) : b == "catch" ? w(Z("form"), x, lt, _e, fe, Te) : b == "export" ? w(Z("stat"), hr, fe) : b == "import" ? w(Z("stat"), Rn, fe) : b == "async" ? w(_e) : T == "@" ? w(we, _e) : Q(Z("stat"), we, ke(";"), fe);
|
|
6433
6433
|
}
|
|
6434
6434
|
function lt(b) {
|
|
6435
6435
|
if (b == "(") return w(nn, ke(")"));
|
|
@@ -6514,28 +6514,28 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6514
6514
|
if (b == "variable" || j.style == "keyword") {
|
|
6515
6515
|
if (j.marked = "property", T == "get" || T == "set") return w(pe);
|
|
6516
6516
|
var U;
|
|
6517
|
-
return S && j.state.fatArrowAt == j.stream.start && (U = j.stream.match(/^\s*:\s*/, !1)) && (j.state.fatArrowAt = j.stream.pos + U[0].length), w(
|
|
6517
|
+
return S && j.state.fatArrowAt == j.stream.start && (U = j.stream.match(/^\s*:\s*/, !1)) && (j.state.fatArrowAt = j.stream.pos + U[0].length), w(Re);
|
|
6518
6518
|
} else {
|
|
6519
6519
|
if (b == "number" || b == "string")
|
|
6520
|
-
return j.marked = y ? "property" : j.style + " property", w(
|
|
6520
|
+
return j.marked = y ? "property" : j.style + " property", w(Re);
|
|
6521
6521
|
if (b == "jsonld-keyword")
|
|
6522
|
-
return w(
|
|
6522
|
+
return w(Re);
|
|
6523
6523
|
if (S && M(T))
|
|
6524
6524
|
return j.marked = "keyword", w(xe);
|
|
6525
6525
|
if (b == "[")
|
|
6526
|
-
return w(we, An, ke("]"),
|
|
6526
|
+
return w(we, An, ke("]"), Re);
|
|
6527
6527
|
if (b == "spread")
|
|
6528
|
-
return w(Oe,
|
|
6528
|
+
return w(Oe, Re);
|
|
6529
6529
|
if (T == "*")
|
|
6530
6530
|
return j.marked = "keyword", w(xe);
|
|
6531
6531
|
if (b == ":")
|
|
6532
|
-
return Q(
|
|
6532
|
+
return Q(Re);
|
|
6533
6533
|
}
|
|
6534
6534
|
}
|
|
6535
6535
|
function pe(b) {
|
|
6536
|
-
return b != "variable" ? Q(
|
|
6536
|
+
return b != "variable" ? Q(Re) : (j.marked = "property", w(Jt));
|
|
6537
6537
|
}
|
|
6538
|
-
function
|
|
6538
|
+
function Re(b) {
|
|
6539
6539
|
if (b == ":") return w(Oe);
|
|
6540
6540
|
if (b == "(") return Q(Jt);
|
|
6541
6541
|
}
|
|
@@ -6572,9 +6572,9 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6572
6572
|
}
|
|
6573
6573
|
function Dn(b) {
|
|
6574
6574
|
if (S && b == ":")
|
|
6575
|
-
return j.stream.match(/^\s*\w+\s+is\b/, !1) ? w(we,
|
|
6575
|
+
return j.stream.match(/^\s*\w+\s+is\b/, !1) ? w(we, Ra, Me) : w(Me);
|
|
6576
6576
|
}
|
|
6577
|
-
function
|
|
6577
|
+
function Ra(b, T) {
|
|
6578
6578
|
if (T == "is")
|
|
6579
6579
|
return j.marked = "keyword", w();
|
|
6580
6580
|
}
|
|
@@ -6608,7 +6608,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6608
6608
|
if (b == "[")
|
|
6609
6609
|
return w(ke("variable"), Gn, ke("]"), xn);
|
|
6610
6610
|
if (b == "(")
|
|
6611
|
-
return Q(
|
|
6611
|
+
return Q(Fn, xn);
|
|
6612
6612
|
if (!b.match(/[;\}\)\],]/))
|
|
6613
6613
|
return w();
|
|
6614
6614
|
}
|
|
@@ -6684,13 +6684,13 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6684
6684
|
if (b == "(") return w(x, Z(")"), Ie(nn, ")"), fe, Dn, _e, Te);
|
|
6685
6685
|
if (S && T == "<") return w(Z(">"), Ie(en, ">"), fe, Jt);
|
|
6686
6686
|
}
|
|
6687
|
-
function
|
|
6687
|
+
function Fn(b, T) {
|
|
6688
6688
|
if (T == "*")
|
|
6689
|
-
return j.marked = "keyword", w(
|
|
6689
|
+
return j.marked = "keyword", w(Fn);
|
|
6690
6690
|
if (b == "variable")
|
|
6691
|
-
return G(T), w(
|
|
6691
|
+
return G(T), w(Fn);
|
|
6692
6692
|
if (b == "(") return w(x, Z(")"), Ie(nn, ")"), fe, Dn, Te);
|
|
6693
|
-
if (S && T == "<") return w(Z(">"), Ie(en, ">"), fe,
|
|
6693
|
+
if (S && T == "<") return w(Z(">"), Ie(en, ">"), fe, Fn);
|
|
6694
6694
|
}
|
|
6695
6695
|
function Pi(b, T) {
|
|
6696
6696
|
if (b == "keyword" || b == "variable")
|
|
@@ -6724,7 +6724,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6724
6724
|
return w(we, An, ke("]"), Kn, an);
|
|
6725
6725
|
if (T == "*")
|
|
6726
6726
|
return j.marked = "keyword", w(an);
|
|
6727
|
-
if (S && b == "(") return Q(
|
|
6727
|
+
if (S && b == "(") return Q(Fn, an);
|
|
6728
6728
|
if (b == ";" || b == ",") return w(an);
|
|
6729
6729
|
if (b == "}") return w();
|
|
6730
6730
|
if (T == "@") return w(we, an);
|
|
@@ -6734,7 +6734,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6734
6734
|
if (b == ":") return w(Me, tn);
|
|
6735
6735
|
if (T == "=") return w(Oe);
|
|
6736
6736
|
var U = j.state.lexical.prev, X = U && U.info == "interface";
|
|
6737
|
-
return Q(X ?
|
|
6737
|
+
return Q(X ? Fn : Jt);
|
|
6738
6738
|
}
|
|
6739
6739
|
function hr(b, T) {
|
|
6740
6740
|
return T == "*" ? (j.marked = "keyword", w(mr, ke(";"))) : T == "default" ? (j.marked = "keyword", w(we, ke(";"))) : b == "{" ? w(Ie(pr, "}"), mr, ke(";")) : Q(_e);
|
|
@@ -6744,7 +6744,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6744
6744
|
return j.marked = "keyword", w(ke("variable"));
|
|
6745
6745
|
if (b == "variable") return Q(Oe, pr);
|
|
6746
6746
|
}
|
|
6747
|
-
function
|
|
6747
|
+
function Rn(b) {
|
|
6748
6748
|
return b == "string" ? w() : b == "(" ? Q(we) : b == "." ? Q(ct) : Q(gr, dn, mr);
|
|
6749
6749
|
}
|
|
6750
6750
|
function gr(b, T) {
|
|
@@ -6782,7 +6782,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6782
6782
|
tokenize: H,
|
|
6783
6783
|
lastType: "sof",
|
|
6784
6784
|
cc: [],
|
|
6785
|
-
lexical: new
|
|
6785
|
+
lexical: new Fe((b || 0) - f, 0, "block", !1),
|
|
6786
6786
|
localVars: u.localVars,
|
|
6787
6787
|
context: u.localVars && new K(null, null, !1),
|
|
6788
6788
|
indented: b || 0
|
|
@@ -6843,7 +6843,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6843
6843
|
function f(I, N) {
|
|
6844
6844
|
return N == "pairs" && typeof I == "string" ? I : typeof I == "object" && I[N] != null ? I[N] : o[N];
|
|
6845
6845
|
}
|
|
6846
|
-
var p = { Backspace: S, Enter:
|
|
6846
|
+
var p = { Backspace: S, Enter: R };
|
|
6847
6847
|
function y(I) {
|
|
6848
6848
|
for (var N = 0; N < I.length; N++) {
|
|
6849
6849
|
var H = I.charAt(N), V = "'" + H + "'";
|
|
@@ -6875,7 +6875,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6875
6875
|
I.replaceRange("", u(se.line, se.ch - 1), u(se.line, se.ch + 1), "+delete");
|
|
6876
6876
|
}
|
|
6877
6877
|
}
|
|
6878
|
-
function
|
|
6878
|
+
function R(I) {
|
|
6879
6879
|
var N = k(I), H = N && f(N, "explode");
|
|
6880
6880
|
if (!H || I.getOption("disableInput")) return r.Pass;
|
|
6881
6881
|
for (var V = I.listSelections(), ne = 0; ne < V.length; ne++) {
|
|
@@ -6914,11 +6914,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6914
6914
|
if (!H || I.getOption("disableInput")) return r.Pass;
|
|
6915
6915
|
var V = f(H, "pairs"), ne = V.indexOf(N);
|
|
6916
6916
|
if (ne == -1) return r.Pass;
|
|
6917
|
-
for (var ue = f(H, "closeBefore"), se = f(H, "triples"), de = V.charAt(ne + 1) == N, De = I.listSelections(),
|
|
6917
|
+
for (var ue = f(H, "closeBefore"), se = f(H, "triples"), de = V.charAt(ne + 1) == N, De = I.listSelections(), Fe = ne % 2 == 0, ie, $e = 0; $e < De.length; $e++) {
|
|
6918
6918
|
var j = De[$e], Q = j.head, w, J = I.getRange(Q, u(Q.line, Q.ch + 1));
|
|
6919
|
-
if (
|
|
6919
|
+
if (Fe && !j.empty())
|
|
6920
6920
|
w = "surround";
|
|
6921
|
-
else if ((de || !
|
|
6921
|
+
else if ((de || !Fe) && J == N)
|
|
6922
6922
|
de && $(I, Q) ? w = "both" : se.indexOf(N) >= 0 && I.getRange(Q, u(Q.line, Q.ch + 3)) == N + N + N ? w = "skipThree" : w = "skip";
|
|
6923
6923
|
else if (de && Q.ch > 1 && se.indexOf(N) >= 0 && I.getRange(u(Q.line, Q.ch - 2), Q) == N + N) {
|
|
6924
6924
|
if (Q.ch > 2 && /\bstring/.test(I.getTokenTypeAt(u(Q.line, Q.ch - 2)))) return r.Pass;
|
|
@@ -6927,7 +6927,7 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6927
6927
|
var G = Q.ch == 0 ? " " : I.getRange(u(Q.line, Q.ch - 1), Q);
|
|
6928
6928
|
if (!r.isWordChar(J) && G != N && !r.isWordChar(G)) w = "both";
|
|
6929
6929
|
else return r.Pass;
|
|
6930
|
-
} else if (
|
|
6930
|
+
} else if (Fe && (J.length === 0 || /\s/.test(J) || ue.indexOf(J) > -1))
|
|
6931
6931
|
w = "both";
|
|
6932
6932
|
else
|
|
6933
6933
|
return r.Pass;
|
|
@@ -6993,12 +6993,12 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
6993
6993
|
var de = z > 0 ? 0 : se.length - 1, De = z > 0 ? se.length : -1;
|
|
6994
6994
|
if (!(se.length > I))
|
|
6995
6995
|
for (ue == W.line && (de = W.ch - (z < 0 ? 1 : 0)); de != De; de += z) {
|
|
6996
|
-
var
|
|
6997
|
-
if (V.test(
|
|
6998
|
-
var ie = f[
|
|
6999
|
-
if (ie && ie.charAt(1) == ">" == z > 0) H.push(
|
|
6996
|
+
var Fe = se.charAt(de);
|
|
6997
|
+
if (V.test(Fe) && (D === void 0 || (L.getTokenTypeAt(u(ue, de + 1)) || "") == (D || ""))) {
|
|
6998
|
+
var ie = f[Fe];
|
|
6999
|
+
if (ie && ie.charAt(1) == ">" == z > 0) H.push(Fe);
|
|
7000
7000
|
else if (H.length) H.pop();
|
|
7001
|
-
else return { pos: u(ue, de), ch:
|
|
7001
|
+
else return { pos: u(ue, de), ch: Fe };
|
|
7002
7002
|
}
|
|
7003
7003
|
}
|
|
7004
7004
|
}
|
|
@@ -7029,11 +7029,11 @@ b`.split(/\n/).length != 3 ? function(e) {
|
|
|
7029
7029
|
L.state.matchBrackets.currentlyHighlighted && (L.state.matchBrackets.currentlyHighlighted(), L.state.matchBrackets.currentlyHighlighted = null), L.state.matchBrackets.currentlyHighlighted = k(L, !1, L.state.matchBrackets);
|
|
7030
7030
|
});
|
|
7031
7031
|
}
|
|
7032
|
-
function
|
|
7032
|
+
function R(L) {
|
|
7033
7033
|
L.state.matchBrackets && L.state.matchBrackets.currentlyHighlighted && (L.state.matchBrackets.currentlyHighlighted(), L.state.matchBrackets.currentlyHighlighted = null);
|
|
7034
7034
|
}
|
|
7035
7035
|
r.defineOption("matchBrackets", !1, function(L, W, z) {
|
|
7036
|
-
z && z != r.Init && (L.off("cursorActivity", S), L.off("focus", S), L.off("blur",
|
|
7036
|
+
z && z != r.Init && (L.off("cursorActivity", S), L.off("focus", S), L.off("blur", R), R(L)), W && (L.state.matchBrackets = typeof W == "object" ? W : {}, L.on("cursorActivity", S), L.on("focus", S), L.on("blur", R));
|
|
7037
7037
|
}), r.defineExtension("matchBrackets", function() {
|
|
7038
7038
|
k(this, !0);
|
|
7039
7039
|
}), r.defineExtension("findMatchingBracket", function(L, W, z) {
|
|
@@ -7050,14 +7050,14 @@ var Jd = { exports: {} };
|
|
|
7050
7050
|
})(function(r) {
|
|
7051
7051
|
function o(y, m, k, S) {
|
|
7052
7052
|
if (k && k.call) {
|
|
7053
|
-
var
|
|
7053
|
+
var R = k;
|
|
7054
7054
|
k = null;
|
|
7055
7055
|
} else
|
|
7056
|
-
var
|
|
7056
|
+
var R = p(y, k, "rangeFinder");
|
|
7057
7057
|
typeof m == "number" && (m = r.Pos(m, 0));
|
|
7058
7058
|
var L = p(y, k, "minFoldSize");
|
|
7059
7059
|
function W(I) {
|
|
7060
|
-
var N =
|
|
7060
|
+
var N = R(y, m);
|
|
7061
7061
|
if (!N || N.to.line - N.from.line < L) return null;
|
|
7062
7062
|
if (S === "fold") return N;
|
|
7063
7063
|
for (var H = y.findMarksAt(N.from), V = 0; V < H.length; ++V)
|
|
@@ -7088,8 +7088,8 @@ var Jd = { exports: {} };
|
|
|
7088
7088
|
function u(y, m, k) {
|
|
7089
7089
|
var S = p(y, m, "widget");
|
|
7090
7090
|
if (typeof S == "function" && (S = S(k.from, k.to)), typeof S == "string") {
|
|
7091
|
-
var
|
|
7092
|
-
S = document.createElement("span"), S.appendChild(
|
|
7091
|
+
var R = document.createTextNode(S);
|
|
7092
|
+
S = document.createElement("span"), S.appendChild(R), S.className = "CodeMirror-foldmarker";
|
|
7093
7093
|
} else S && (S = S.cloneNode(!0));
|
|
7094
7094
|
return S;
|
|
7095
7095
|
}
|
|
@@ -7122,14 +7122,14 @@ var Jd = { exports: {} };
|
|
|
7122
7122
|
var y = Array.prototype.slice.call(arguments, 0);
|
|
7123
7123
|
return function(m, k) {
|
|
7124
7124
|
for (var S = 0; S < y.length; ++S) {
|
|
7125
|
-
var
|
|
7126
|
-
if (
|
|
7125
|
+
var R = y[S](m, k);
|
|
7126
|
+
if (R) return R;
|
|
7127
7127
|
}
|
|
7128
7128
|
};
|
|
7129
7129
|
}), r.registerHelper("fold", "auto", function(y, m) {
|
|
7130
7130
|
for (var k = y.getHelpers(m, "fold"), S = 0; S < k.length; S++) {
|
|
7131
|
-
var
|
|
7132
|
-
if (
|
|
7131
|
+
var R = k[S](y, m);
|
|
7132
|
+
if (R) return R;
|
|
7133
7133
|
}
|
|
7134
7134
|
});
|
|
7135
7135
|
var f = {
|
|
@@ -7157,7 +7157,7 @@ var Qd = Jd.exports;
|
|
|
7157
7157
|
r(Vt(), Qd);
|
|
7158
7158
|
})(function(r) {
|
|
7159
7159
|
r.defineOption("foldGutter", !1, function($, I, N) {
|
|
7160
|
-
N && N != r.Init && ($.clearGutter($.state.foldGutter.options.gutter), $.state.foldGutter = null, $.off("gutterClick",
|
|
7160
|
+
N && N != r.Init && ($.clearGutter($.state.foldGutter.options.gutter), $.state.foldGutter = null, $.off("gutterClick", R), $.off("changes", W), $.off("viewportChange", z), $.off("fold", D), $.off("unfold", D), $.off("swapDoc", W), $.off("optionChange", L)), I && ($.state.foldGutter = new u(f(I)), S($), $.on("gutterClick", R), $.on("changes", W), $.on("viewportChange", z), $.on("fold", D), $.on("unfold", D), $.on("swapDoc", W), $.on("optionChange", L));
|
|
7161
7161
|
});
|
|
7162
7162
|
var o = r.Pos;
|
|
7163
7163
|
function u($) {
|
|
@@ -7185,18 +7185,18 @@ var Qd = Jd.exports;
|
|
|
7185
7185
|
var H = $.state.foldGutter.options, V = I - 1, ne = $.foldOption(H, "minFoldSize"), ue = $.foldOption(H, "rangeFinder"), se = typeof H.indicatorFolded == "string" && k(H.indicatorFolded), de = typeof H.indicatorOpen == "string" && k(H.indicatorOpen);
|
|
7186
7186
|
$.eachLine(I, N, function(De) {
|
|
7187
7187
|
++V;
|
|
7188
|
-
var
|
|
7188
|
+
var Fe = null, ie = De.gutterMarkers;
|
|
7189
7189
|
if (ie && (ie = ie[H.gutter]), p($, V)) {
|
|
7190
7190
|
if (se && ie && se.test(ie.className)) return;
|
|
7191
|
-
|
|
7191
|
+
Fe = y(H.indicatorFolded);
|
|
7192
7192
|
} else {
|
|
7193
7193
|
var $e = o(V, 0), j = ue && ue($, $e);
|
|
7194
7194
|
if (j && j.to.line - j.from.line >= ne) {
|
|
7195
7195
|
if (de && ie && de.test(ie.className)) return;
|
|
7196
|
-
|
|
7196
|
+
Fe = y(H.indicatorOpen);
|
|
7197
7197
|
}
|
|
7198
7198
|
}
|
|
7199
|
-
!
|
|
7199
|
+
!Fe && !ie || $.setGutterMarker(De, H.gutter, Fe);
|
|
7200
7200
|
});
|
|
7201
7201
|
}
|
|
7202
7202
|
function k($) {
|
|
@@ -7208,7 +7208,7 @@ var Qd = Jd.exports;
|
|
|
7208
7208
|
m($, I.from, I.to);
|
|
7209
7209
|
}), N.from = I.from, N.to = I.to);
|
|
7210
7210
|
}
|
|
7211
|
-
function
|
|
7211
|
+
function R($, I, N) {
|
|
7212
7212
|
var H = $.state.foldGutter;
|
|
7213
7213
|
if (H) {
|
|
7214
7214
|
var V = H.options;
|
|
@@ -7291,15 +7291,15 @@ var Qd = Jd.exports;
|
|
|
7291
7291
|
to: r.Pos(N, V)
|
|
7292
7292
|
};
|
|
7293
7293
|
}
|
|
7294
|
-
for (var
|
|
7294
|
+
for (var R = [], L = 0; L < u.length; L++) {
|
|
7295
7295
|
var W = k(u[L]);
|
|
7296
|
-
W &&
|
|
7296
|
+
W && R.push(W);
|
|
7297
7297
|
}
|
|
7298
|
-
|
|
7298
|
+
R.sort(function(D, $) {
|
|
7299
7299
|
return D.ch - $.ch;
|
|
7300
7300
|
});
|
|
7301
|
-
for (var L = 0; L <
|
|
7302
|
-
var z = S(
|
|
7301
|
+
for (var L = 0; L < R.length; L++) {
|
|
7302
|
+
var z = S(R[L]);
|
|
7303
7303
|
if (z) return z;
|
|
7304
7304
|
}
|
|
7305
7305
|
return null;
|
|
@@ -7319,16 +7319,16 @@ var Qd = Jd.exports;
|
|
|
7319
7319
|
if (!m || p(y - 1) || (k = p(y - 2)) && k.end.line == y - 1)
|
|
7320
7320
|
return null;
|
|
7321
7321
|
for (var S = m.end; ; ) {
|
|
7322
|
-
var
|
|
7323
|
-
if (
|
|
7324
|
-
S =
|
|
7322
|
+
var R = p(S.line + 1);
|
|
7323
|
+
if (R == null) break;
|
|
7324
|
+
S = R.end;
|
|
7325
7325
|
}
|
|
7326
7326
|
return { from: u.clipPos(r.Pos(y, m.startCh + 1)), to: S };
|
|
7327
7327
|
}), r.registerHelper("fold", "include", function(u, f) {
|
|
7328
|
-
function p(
|
|
7329
|
-
if (
|
|
7330
|
-
var L = u.getTokenAt(r.Pos(
|
|
7331
|
-
if (/\S/.test(L.string) || (L = u.getTokenAt(r.Pos(
|
|
7328
|
+
function p(R) {
|
|
7329
|
+
if (R < u.firstLine() || R > u.lastLine()) return null;
|
|
7330
|
+
var L = u.getTokenAt(r.Pos(R, 1));
|
|
7331
|
+
if (/\S/.test(L.string) || (L = u.getTokenAt(r.Pos(R, L.end + 1))), L.type == "meta" && L.string.slice(0, 8) == "#include") return L.start + 8;
|
|
7332
7332
|
}
|
|
7333
7333
|
var y = f.line, m = p(y);
|
|
7334
7334
|
if (m == null || p(y - 1) != null) return null;
|
|
@@ -7407,7 +7407,10 @@ const Zd = Vd("trace", {
|
|
|
7407
7407
|
this.currentTrace = l;
|
|
7408
7408
|
}
|
|
7409
7409
|
}
|
|
7410
|
-
}), ic = () =>
|
|
7410
|
+
}), ic = () => {
|
|
7411
|
+
var l;
|
|
7412
|
+
return typeof window < "u" && ((l = window.GF_LOCAL_CONFIG) != null && l.TRACE_API_BASE_URL) ? window.GF_LOCAL_CONFIG.TRACE_API_BASE_URL : "/tracing";
|
|
7413
|
+
}, Ta = (l) => {
|
|
7411
7414
|
if (!l || typeof l != "string") return "";
|
|
7412
7415
|
const n = ic(), r = typeof window < "u" && n.startsWith("/") ? window.location.origin : "";
|
|
7413
7416
|
return `${n.startsWith("http") ? n : r + n}/v1/file/download?url=${encodeURIComponent(l)}`;
|
|
@@ -7563,11 +7566,11 @@ var cc = { exports: {} };
|
|
|
7563
7566
|
}(p), m = window.CodeMirror || y.default;
|
|
7564
7567
|
typeof Object.assign != "function" && Object.defineProperty(Object, "assign", { value: function(k, S) {
|
|
7565
7568
|
if (k == null) throw new TypeError("Cannot convert undefined or null to object");
|
|
7566
|
-
for (var
|
|
7569
|
+
for (var R = Object(k), L = 1; L < arguments.length; L++) {
|
|
7567
7570
|
var W = arguments[L];
|
|
7568
|
-
if (W != null) for (var z in W) Object.prototype.hasOwnProperty.call(W, z) && (
|
|
7571
|
+
if (W != null) for (var z in W) Object.prototype.hasOwnProperty.call(W, z) && (R[z] = W[z]);
|
|
7569
7572
|
}
|
|
7570
|
-
return
|
|
7573
|
+
return R;
|
|
7571
7574
|
}, writable: !0, configurable: !0 }), u.default = { name: "codemirror", data: function() {
|
|
7572
7575
|
return { content: "", codemirror: null, cminstance: null };
|
|
7573
7576
|
}, props: { code: String, value: String, marker: Function, unseenLines: Array, name: { type: String, default: "codemirror" }, placeholder: { type: String, default: "" }, merge: { type: Boolean, default: !1 }, options: { type: Object, default: function() {
|
|
@@ -7591,9 +7594,9 @@ var cc = { exports: {} };
|
|
|
7591
7594
|
this.merge ? (this.codemirror = m.MergeView(this.$refs.mergeview, S), this.cminstance = this.codemirror.edit) : (this.codemirror = m.fromTextArea(this.$refs.textarea, S), this.cminstance = this.codemirror, this.cminstance.setValue(this.code || this.value || this.content)), this.cminstance.on("change", function(L) {
|
|
7592
7595
|
k.content = L.getValue(), k.$emit && k.$emit("input", k.content);
|
|
7593
7596
|
});
|
|
7594
|
-
var
|
|
7597
|
+
var R = {};
|
|
7595
7598
|
["scroll", "changes", "beforeChange", "cursorActivity", "keyHandled", "inputRead", "electricInput", "beforeSelectionChange", "viewportChange", "swapDoc", "gutterClick", "gutterContextMenu", "focus", "blur", "refresh", "optionChange", "scrollCursorIntoView", "update"].concat(this.events).concat(this.globalEvents).filter(function(L) {
|
|
7596
|
-
return !
|
|
7599
|
+
return !R[L] && (R[L] = !0);
|
|
7597
7600
|
}).forEach(function(L) {
|
|
7598
7601
|
k.cminstance.on(L, function() {
|
|
7599
7602
|
for (var W = arguments.length, z = Array(W), D = 0; D < W; D++) z[D] = arguments[D];
|
|
@@ -7619,8 +7622,8 @@ var cc = { exports: {} };
|
|
|
7619
7622
|
}, unseenLineMarkers: function() {
|
|
7620
7623
|
var k = this;
|
|
7621
7624
|
this.unseenLines !== void 0 && this.marker !== void 0 && this.unseenLines.forEach(function(S) {
|
|
7622
|
-
var
|
|
7623
|
-
k.cminstance.setGutterMarker(S, "breakpoints",
|
|
7625
|
+
var R = k.cminstance.lineInfo(S);
|
|
7626
|
+
k.cminstance.setGutterMarker(S, "breakpoints", R.gutterMarkers ? null : k.marker());
|
|
7624
7627
|
});
|
|
7625
7628
|
}, switchMerge: function() {
|
|
7626
7629
|
var k = this.cminstance.doc.history, S = this.cminstance.doc.cleanGeneration;
|
|
@@ -7638,25 +7641,25 @@ var cc = { exports: {} };
|
|
|
7638
7641
|
return p[L];
|
|
7639
7642
|
});
|
|
7640
7643
|
}(m);
|
|
7641
|
-
var k = f(5), S = f(4),
|
|
7642
|
-
u.default =
|
|
7644
|
+
var k = f(5), S = f(4), R = S(y.a, k.a, !1, null, null, null);
|
|
7645
|
+
u.default = R.exports;
|
|
7643
7646
|
}, function(o, u, f) {
|
|
7644
7647
|
function p(z) {
|
|
7645
7648
|
return z && z.__esModule ? z : { default: z };
|
|
7646
7649
|
}
|
|
7647
7650
|
Object.defineProperty(u, "__esModule", { value: !0 }), u.install = u.codemirror = u.CodeMirror = void 0;
|
|
7648
|
-
var y = f(0), m = p(y), k = f(2), S = p(k),
|
|
7651
|
+
var y = f(0), m = p(y), k = f(2), S = p(k), R = window.CodeMirror || m.default, L = function(z, D) {
|
|
7649
7652
|
D && (D.options && (S.default.props.globalOptions.default = function() {
|
|
7650
7653
|
return D.options;
|
|
7651
7654
|
}), D.events && (S.default.props.globalEvents.default = function() {
|
|
7652
7655
|
return D.events;
|
|
7653
7656
|
})), z.component(S.default.name, S.default);
|
|
7654
|
-
}, W = { CodeMirror:
|
|
7655
|
-
u.default = W, u.CodeMirror =
|
|
7657
|
+
}, W = { CodeMirror: R, codemirror: S.default, install: L };
|
|
7658
|
+
u.default = W, u.CodeMirror = R, u.codemirror = S.default, u.install = L;
|
|
7656
7659
|
}, function(o, u) {
|
|
7657
7660
|
o.exports = function(f, p, y, m, k, S) {
|
|
7658
|
-
var
|
|
7659
|
-
W !== "object" && W !== "function" || (
|
|
7661
|
+
var R, L = f = f || {}, W = typeof f.default;
|
|
7662
|
+
W !== "object" && W !== "function" || (R = f, L = f.default);
|
|
7660
7663
|
var z = typeof L == "function" ? L.options : L;
|
|
7661
7664
|
p && (z.render = p.render, z.staticRenderFns = p.staticRenderFns, z._compiled = !0), y && (z.functional = !0), k && (z._scopeId = k);
|
|
7662
7665
|
var D;
|
|
@@ -7668,12 +7671,12 @@ var cc = { exports: {} };
|
|
|
7668
7671
|
return D.call(H), I(N, H);
|
|
7669
7672
|
}) : z.beforeCreate = I ? [].concat(I, D) : [D];
|
|
7670
7673
|
}
|
|
7671
|
-
return { esModule:
|
|
7674
|
+
return { esModule: R, exports: L, options: z };
|
|
7672
7675
|
};
|
|
7673
7676
|
}, function(o, u, f) {
|
|
7674
7677
|
var p = function() {
|
|
7675
|
-
var k = this, S = k.$createElement,
|
|
7676
|
-
return
|
|
7678
|
+
var k = this, S = k.$createElement, R = k._self._c || S;
|
|
7679
|
+
return R("div", { staticClass: "vue-codemirror", class: { merge: k.merge } }, [k.merge ? R("div", { ref: "mergeview" }) : R("textarea", { ref: "textarea", attrs: { name: k.name, placeholder: k.placeholder } })]);
|
|
7677
7680
|
}, y = [], m = { render: p, staticRenderFns: y };
|
|
7678
7681
|
u.a = m;
|
|
7679
7682
|
}]);
|
|
@@ -7918,12 +7921,12 @@ class La {
|
|
|
7918
7921
|
if (!(r = p.exec(n)) || this.rules.block.hr.test(n))
|
|
7919
7922
|
break;
|
|
7920
7923
|
y = r[0], n = n.substring(y.length);
|
|
7921
|
-
let
|
|
7924
|
+
let R = r[2].split(`
|
|
7922
7925
|
`, 1)[0].replace(/^\t+/, (I) => " ".repeat(3 * I.length)), L = n.split(`
|
|
7923
7926
|
`, 1)[0], W = 0;
|
|
7924
|
-
this.options.pedantic ? (W = 2, m =
|
|
7927
|
+
this.options.pedantic ? (W = 2, m = R.trimStart()) : (W = r[2].search(/[^ ]/), W = W > 4 ? 1 : W, m = R.slice(W), W += r[1].length);
|
|
7925
7928
|
let z = !1;
|
|
7926
|
-
if (!
|
|
7929
|
+
if (!R && /^ *$/.test(L) && (y += L + `
|
|
7927
7930
|
`, n = n.substring(L.length + 1), S = !0), !S) {
|
|
7928
7931
|
const I = new RegExp(`^ {0,${Math.min(3, W - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), N = new RegExp(`^ {0,${Math.min(3, W - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), H = new RegExp(`^ {0,${Math.min(3, W - 1)}}(?:\`\`\`|~~~)`), V = new RegExp(`^ {0,${Math.min(3, W - 1)}}#`);
|
|
7929
7932
|
for (; n; ) {
|
|
@@ -7935,13 +7938,13 @@ class La {
|
|
|
7935
7938
|
m += `
|
|
7936
7939
|
` + L.slice(W);
|
|
7937
7940
|
else {
|
|
7938
|
-
if (z ||
|
|
7941
|
+
if (z || R.search(/[^ ]/) >= 4 || H.test(R) || V.test(R) || N.test(R))
|
|
7939
7942
|
break;
|
|
7940
7943
|
m += `
|
|
7941
7944
|
` + L;
|
|
7942
7945
|
}
|
|
7943
7946
|
!z && !L.trim() && (z = !0), y += ne + `
|
|
7944
|
-
`, n = n.substring(ne.length + 1),
|
|
7947
|
+
`, n = n.substring(ne.length + 1), R = L.slice(W);
|
|
7945
7948
|
}
|
|
7946
7949
|
}
|
|
7947
7950
|
f.loose || (k ? f.loose = !0 : /\n *\n *$/.test(y) && (k = !0));
|
|
@@ -7959,7 +7962,7 @@ class La {
|
|
|
7959
7962
|
f.items[f.items.length - 1].raw = y.trimEnd(), f.items[f.items.length - 1].text = m.trimEnd(), f.raw = f.raw.trimEnd();
|
|
7960
7963
|
for (let S = 0; S < f.items.length; S++)
|
|
7961
7964
|
if (this.lexer.state.top = !1, f.items[S].tokens = this.lexer.blockTokens(f.items[S].text, []), !f.loose) {
|
|
7962
|
-
const
|
|
7965
|
+
const R = f.items[S].tokens.filter((W) => W.type === "space"), L = R.length > 0 && R.some((W) => /\n.*\n/.test(W.raw));
|
|
7963
7966
|
f.loose = L;
|
|
7964
7967
|
}
|
|
7965
7968
|
if (f.loose)
|
|
@@ -8126,8 +8129,8 @@ class La {
|
|
|
8126
8129
|
if (!(u[1] || u[2] || "") || !o || this.rules.inline.punctuation.exec(o)) {
|
|
8127
8130
|
const p = [...u[0]].length - 1;
|
|
8128
8131
|
let y, m, k = p, S = 0;
|
|
8129
|
-
const
|
|
8130
|
-
for (
|
|
8132
|
+
const R = u[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
8133
|
+
for (R.lastIndex = 0, r = r.slice(-1 * n.length + p); (u = R.exec(r)) != null; ) {
|
|
8131
8134
|
if (y = u[1] || u[2] || u[3] || u[4] || u[5] || u[6], !y)
|
|
8132
8135
|
continue;
|
|
8133
8136
|
if (m = [...y].length, u[3] || u[4]) {
|
|
@@ -8250,13 +8253,13 @@ class La {
|
|
|
8250
8253
|
}
|
|
8251
8254
|
}
|
|
8252
8255
|
}
|
|
8253
|
-
const ch = /^(?: *(?:\n|$))+/, fh = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, dh = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,
|
|
8256
|
+
const ch = /^(?: *(?:\n|$))+/, fh = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, dh = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Fi = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, hh = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, pc = /(?:[*+-]|\d{1,9}[.)])/, gc = je(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, pc).getRegex(), Us = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ph = /^[^\n]+/, qs = /(?!\s*\])(?:\\.|[^\[\]\\])+/, gh = je(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", qs).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), mh = je(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, pc).getRegex(), Na = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Gs = /<!--(?!-?>)[\s\S]*?(?:-->|$)/, vh = je("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", Gs).replace("tag", Na).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), mc = je(Us).replace("hr", Fi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Na).getRegex(), yh = je(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", mc).getRegex(), Ks = {
|
|
8254
8257
|
blockquote: yh,
|
|
8255
8258
|
code: fh,
|
|
8256
8259
|
def: gh,
|
|
8257
8260
|
fences: dh,
|
|
8258
8261
|
heading: hh,
|
|
8259
|
-
hr:
|
|
8262
|
+
hr: Fi,
|
|
8260
8263
|
html: vh,
|
|
8261
8264
|
lheading: gc,
|
|
8262
8265
|
list: mh,
|
|
@@ -8264,10 +8267,10 @@ const ch = /^(?: *(?:\n|$))+/, fh = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, dh =
|
|
|
8264
8267
|
paragraph: mc,
|
|
8265
8268
|
table: Li,
|
|
8266
8269
|
text: ph
|
|
8267
|
-
}, pu = je("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",
|
|
8270
|
+
}, pu = je("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Fi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Na).getRegex(), bh = {
|
|
8268
8271
|
...Ks,
|
|
8269
8272
|
table: pu,
|
|
8270
|
-
paragraph: je(Us).replace("hr",
|
|
8273
|
+
paragraph: je(Us).replace("hr", Fi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", pu).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Na).getRegex()
|
|
8271
8274
|
}, xh = {
|
|
8272
8275
|
...Ks,
|
|
8273
8276
|
html: je(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Gs).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
@@ -8276,9 +8279,9 @@ const ch = /^(?: *(?:\n|$))+/, fh = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, dh =
|
|
|
8276
8279
|
fences: Li,
|
|
8277
8280
|
// fences not supported
|
|
8278
8281
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
8279
|
-
paragraph: je(Us).replace("hr",
|
|
8282
|
+
paragraph: je(Us).replace("hr", Fi).replace("heading", ` *#{1,6} *[^
|
|
8280
8283
|
]`).replace("lheading", gc).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
8281
|
-
}, vc = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, wh = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, yc = /^( {2,}|\\)\n(?!\s*$)/, kh = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,
|
|
8284
|
+
}, vc = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, wh = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, yc = /^( {2,}|\\)\n(?!\s*$)/, kh = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ri = "\\p{P}$+<=>`^|~", Sh = je(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Ri).getRegex(), Ch = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, Th = je(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Ri).getRegex(), _h = je("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Ri).getRegex(), Lh = je("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Ri).getRegex(), Eh = je(/\\([punct])/, "gu").replace(/punct/g, Ri).getRegex(), Ih = je(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Ah = je(Gs).replace("(?:-->|$)", "-->").getRegex(), Dh = je("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ah).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ea = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Oh = je(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Ea).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), bc = je(/^!?\[(label)\]\[(ref)\]/).replace("label", Ea).replace("ref", qs).getRegex(), xc = je(/^!?\[(ref)\](?:\[\])?/).replace("ref", qs).getRegex(), Nh = je("reflink|nolink(?!\\()", "g").replace("reflink", bc).replace("nolink", xc).getRegex(), Vs = {
|
|
8282
8285
|
_backpedal: Li,
|
|
8283
8286
|
// only used for GFM url
|
|
8284
8287
|
anyPunctuation: Eh,
|
|
@@ -8299,7 +8302,7 @@ const ch = /^(?: *(?:\n|$))+/, fh = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, dh =
|
|
|
8299
8302
|
tag: Dh,
|
|
8300
8303
|
text: kh,
|
|
8301
8304
|
url: Li
|
|
8302
|
-
},
|
|
8305
|
+
}, Fh = {
|
|
8303
8306
|
...Vs,
|
|
8304
8307
|
link: je(/^!?\[(label)\]\((.*?)\)/).replace("label", Ea).getRegex(),
|
|
8305
8308
|
reflink: je(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ea).getRegex()
|
|
@@ -8310,7 +8313,7 @@ const ch = /^(?: *(?:\n|$))+/, fh = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, dh =
|
|
|
8310
8313
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
8311
8314
|
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
|
|
8312
8315
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
8313
|
-
},
|
|
8316
|
+
}, Rh = {
|
|
8314
8317
|
...Ms,
|
|
8315
8318
|
br: je(yc).replace("{2,}", "*").getRegex(),
|
|
8316
8319
|
text: je(Ms.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
@@ -8321,8 +8324,8 @@ const ch = /^(?: *(?:\n|$))+/, fh = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, dh =
|
|
|
8321
8324
|
}, Si = {
|
|
8322
8325
|
normal: Vs,
|
|
8323
8326
|
gfm: Ms,
|
|
8324
|
-
breaks:
|
|
8325
|
-
pedantic:
|
|
8327
|
+
breaks: Rh,
|
|
8328
|
+
pedantic: Fh
|
|
8326
8329
|
};
|
|
8327
8330
|
class vn {
|
|
8328
8331
|
constructor(n) {
|
|
@@ -8525,10 +8528,10 @@ class vn {
|
|
|
8525
8528
|
}
|
|
8526
8529
|
if (f = n, this.options.extensions && this.options.extensions.startInline) {
|
|
8527
8530
|
let S = 1 / 0;
|
|
8528
|
-
const
|
|
8531
|
+
const R = n.slice(1);
|
|
8529
8532
|
let L;
|
|
8530
8533
|
this.options.extensions.startInline.forEach((W) => {
|
|
8531
|
-
L = W.call({ lexer: this },
|
|
8534
|
+
L = W.call({ lexer: this }, R), typeof L == "number" && L >= 0 && (S = Math.min(S, L));
|
|
8532
8535
|
}), S < 1 / 0 && S >= 0 && (f = n.substring(0, S + 1));
|
|
8533
8536
|
}
|
|
8534
8537
|
if (o = this.tokenizer.inlineText(f)) {
|
|
@@ -8736,10 +8739,10 @@ class yn {
|
|
|
8736
8739
|
y += this.renderer.tablerow(m);
|
|
8737
8740
|
let k = "";
|
|
8738
8741
|
for (let S = 0; S < p.rows.length; S++) {
|
|
8739
|
-
const
|
|
8742
|
+
const R = p.rows[S];
|
|
8740
8743
|
m = "";
|
|
8741
|
-
for (let L = 0; L <
|
|
8742
|
-
m += this.renderer.tablecell(this.parseInline(
|
|
8744
|
+
for (let L = 0; L < R.length; L++)
|
|
8745
|
+
m += this.renderer.tablecell(this.parseInline(R[L].tokens), { header: !1, align: p.align[L] });
|
|
8743
8746
|
k += this.renderer.tablerow(m);
|
|
8744
8747
|
}
|
|
8745
8748
|
o += this.renderer.table(y, k);
|
|
@@ -8753,8 +8756,8 @@ class yn {
|
|
|
8753
8756
|
case "list": {
|
|
8754
8757
|
const p = f, y = p.ordered, m = p.start, k = p.loose;
|
|
8755
8758
|
let S = "";
|
|
8756
|
-
for (let
|
|
8757
|
-
const L = p.items[
|
|
8759
|
+
for (let R = 0; R < p.items.length; R++) {
|
|
8760
|
+
const L = p.items[R], W = L.checked, z = L.task;
|
|
8758
8761
|
let D = "";
|
|
8759
8762
|
if (L.task) {
|
|
8760
8763
|
const $ = this.renderer.checkbox(!!W);
|
|
@@ -8979,8 +8982,8 @@ class Mh {
|
|
|
8979
8982
|
continue;
|
|
8980
8983
|
const y = p, m = o.renderer[y], k = f[y];
|
|
8981
8984
|
f[y] = (...S) => {
|
|
8982
|
-
let
|
|
8983
|
-
return
|
|
8985
|
+
let R = m.apply(f, S);
|
|
8986
|
+
return R === !1 && (R = k.apply(f, S)), R || "";
|
|
8984
8987
|
};
|
|
8985
8988
|
}
|
|
8986
8989
|
u.renderer = f;
|
|
@@ -8994,8 +8997,8 @@ class Mh {
|
|
|
8994
8997
|
continue;
|
|
8995
8998
|
const y = p, m = o.tokenizer[y], k = f[y];
|
|
8996
8999
|
f[y] = (...S) => {
|
|
8997
|
-
let
|
|
8998
|
-
return
|
|
9000
|
+
let R = m.apply(f, S);
|
|
9001
|
+
return R === !1 && (R = k.apply(f, S)), R;
|
|
8999
9002
|
};
|
|
9000
9003
|
}
|
|
9001
9004
|
u.tokenizer = f;
|
|
@@ -9011,11 +9014,11 @@ class Mh {
|
|
|
9011
9014
|
Ei.passThroughHooks.has(p) ? f[y] = (S) => {
|
|
9012
9015
|
if (this.defaults.async)
|
|
9013
9016
|
return Promise.resolve(m.call(f, S)).then((L) => k.call(f, L));
|
|
9014
|
-
const
|
|
9015
|
-
return k.call(f,
|
|
9017
|
+
const R = m.call(f, S);
|
|
9018
|
+
return k.call(f, R);
|
|
9016
9019
|
} : f[y] = (...S) => {
|
|
9017
|
-
let
|
|
9018
|
-
return
|
|
9020
|
+
let R = m.apply(f, S);
|
|
9021
|
+
return R === !1 && (R = k.apply(f, S)), R;
|
|
9019
9022
|
};
|
|
9020
9023
|
}
|
|
9021
9024
|
u.hooks = f;
|
|
@@ -9531,7 +9534,10 @@ const op = {
|
|
|
9531
9534
|
loading: !1,
|
|
9532
9535
|
error: null,
|
|
9533
9536
|
pdfDoc: null,
|
|
9534
|
-
renderTask: null
|
|
9537
|
+
renderTask: null,
|
|
9538
|
+
pdfScale: 1.5,
|
|
9539
|
+
scaleMin: 0.5,
|
|
9540
|
+
scaleMax: 3
|
|
9535
9541
|
};
|
|
9536
9542
|
},
|
|
9537
9543
|
computed: {
|
|
@@ -9547,6 +9553,9 @@ const op = {
|
|
|
9547
9553
|
},
|
|
9548
9554
|
currentPage() {
|
|
9549
9555
|
this.renderCurrentPage();
|
|
9556
|
+
},
|
|
9557
|
+
pdfScale() {
|
|
9558
|
+
this.renderCurrentPage();
|
|
9550
9559
|
}
|
|
9551
9560
|
},
|
|
9552
9561
|
mounted() {
|
|
@@ -9557,7 +9566,7 @@ const op = {
|
|
|
9557
9566
|
},
|
|
9558
9567
|
methods: {
|
|
9559
9568
|
async loadPdf() {
|
|
9560
|
-
var n;
|
|
9569
|
+
var n, r;
|
|
9561
9570
|
const l = (n = this.element) == null ? void 0 : n.downloadUrl;
|
|
9562
9571
|
if (!l) {
|
|
9563
9572
|
this.error = "No PDF URL";
|
|
@@ -9565,19 +9574,16 @@ const op = {
|
|
|
9565
9574
|
}
|
|
9566
9575
|
this.loading = !0, this.error = null, this.cancelRender(), this.pdfDoc && (this.pdfDoc.destroy(), this.pdfDoc = null);
|
|
9567
9576
|
try {
|
|
9568
|
-
const
|
|
9569
|
-
if (!
|
|
9577
|
+
const o = sp();
|
|
9578
|
+
if (!o) {
|
|
9570
9579
|
this.error = "PDF.js not loaded";
|
|
9571
9580
|
return;
|
|
9572
9581
|
}
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
this.pdfDoc = await o.promise, this.totalPages = this.pdfDoc.numPages, this.loading = !1, await this.$nextTick(), await this.renderCurrentPage();
|
|
9579
|
-
} catch (r) {
|
|
9580
|
-
this.error = (r == null ? void 0 : r.message) || "Failed to load PDF";
|
|
9582
|
+
!o.GlobalWorkerOptions.workerSrc && ((r = window.GF_LOCAL_CONFIG) != null && r.WORKER_SRC) && (o.GlobalWorkerOptions.workerSrc = window.GF_LOCAL_CONFIG.WORKER_SRC);
|
|
9583
|
+
const u = o.getDocument({ url: l });
|
|
9584
|
+
this.pdfDoc = await u.promise, this.totalPages = this.pdfDoc.numPages, this.loading = !1, await this.$nextTick(), await this.renderCurrentPage();
|
|
9585
|
+
} catch (o) {
|
|
9586
|
+
this.error = (o == null ? void 0 : o.message) || "Failed to load PDF";
|
|
9581
9587
|
} finally {
|
|
9582
9588
|
this.loading = !1;
|
|
9583
9589
|
}
|
|
@@ -9589,8 +9595,8 @@ const op = {
|
|
|
9589
9595
|
if (!(!this.pdfDoc || !this.$refs.canvasRef)) {
|
|
9590
9596
|
this.cancelRender();
|
|
9591
9597
|
try {
|
|
9592
|
-
const l = await this.pdfDoc.getPage(this.currentPage), n = this.$refs.canvasRef, r = n.getContext("2d"),
|
|
9593
|
-
n.height = f.height, n.width = f.width, n.style.width = `${f.width /
|
|
9598
|
+
const l = await this.pdfDoc.getPage(this.currentPage), n = this.$refs.canvasRef, r = n.getContext("2d"), o = window.devicePixelRatio || 1, u = this.pdfScale * o, f = l.getViewport({ scale: u });
|
|
9599
|
+
n.height = f.height, n.width = f.width, n.style.width = `${f.width / o}px`, n.style.height = `${f.height / o}px`, this.renderTask = l.render({
|
|
9594
9600
|
canvasContext: r,
|
|
9595
9601
|
viewport: f
|
|
9596
9602
|
}), await this.renderTask.promise;
|
|
@@ -9607,6 +9613,12 @@ const op = {
|
|
|
9607
9613
|
nextPage() {
|
|
9608
9614
|
this.currentPage < this.totalPages && this.currentPage++;
|
|
9609
9615
|
},
|
|
9616
|
+
zoomIn() {
|
|
9617
|
+
this.pdfScale < this.scaleMax && (this.pdfScale = Math.min(this.scaleMax, Math.round((this.pdfScale + 0.25) * 100) / 100));
|
|
9618
|
+
},
|
|
9619
|
+
zoomOut() {
|
|
9620
|
+
this.pdfScale > this.scaleMin && (this.pdfScale = Math.max(this.scaleMin, Math.round((this.pdfScale - 0.25) * 100) / 100));
|
|
9621
|
+
},
|
|
9610
9622
|
downloadFile() {
|
|
9611
9623
|
var o, u, f;
|
|
9612
9624
|
const l = (o = this.element) == null ? void 0 : o.downloadUrl;
|
|
@@ -9619,14 +9631,14 @@ const op = {
|
|
|
9619
9631
|
var lp = function() {
|
|
9620
9632
|
var o;
|
|
9621
9633
|
var n = this, r = n._self._c;
|
|
9622
|
-
return r("div", { staticClass: "file-pdf-content" }, [n.element.label ? r("div", { staticClass: "image-label" }, [n._v(n._s(n.element.label))]) : n._e(), r("div", { staticClass: "file-pdf-toolbar" }, [r("el-button", { attrs: { size: "mini", disabled: n.currentPage <= 1 }, on: { click: n.prevPage } }, [n._v(n._s(n.$t("trace.pdfPrevPage")))]), r("span", { staticClass: "file-pdf-page-indicator" }, [n._v(n._s(n.formatPageIndicator))]), r("el-button", { attrs: { size: "mini", disabled: n.totalPages > 0 && n.currentPage >= n.totalPages }, on: { click: n.nextPage } }, [n._v(n._s(n.$t("trace.pdfNextPage")))]), r("el-button", { attrs: { size: "mini", type: "primary", disabled: !((o = n.element) != null && o.downloadUrl) }, on: { click: n.downloadFile } }, [n._v(n._s(n.$t("trace.pdfDownload")))])], 1), r("div", { staticClass: "file-pdf-viewer" }, [n.loading ? r("div", { staticClass: "file-pdf-loading" }, [n._v(n._s(n.$t("trace.pdfLoading")))]) : n.error ? r("div", { staticClass: "file-pdf-error" }, [n._v(n._s(n.error))]) : r("canvas", { ref: "canvasRef", staticClass: "file-pdf-canvas" })])]);
|
|
9634
|
+
return r("div", { staticClass: "file-pdf-content" }, [n.element.label ? r("div", { staticClass: "image-label" }, [n._v(n._s(n.element.label))]) : n._e(), r("div", { staticClass: "file-pdf-toolbar" }, [r("el-button", { attrs: { size: "mini", disabled: n.currentPage <= 1 }, on: { click: n.prevPage } }, [n._v(n._s(n.$t("trace.pdfPrevPage")))]), r("span", { staticClass: "file-pdf-page-indicator" }, [n._v(n._s(n.formatPageIndicator))]), r("el-button", { attrs: { size: "mini", disabled: n.totalPages > 0 && n.currentPage >= n.totalPages }, on: { click: n.nextPage } }, [n._v(n._s(n.$t("trace.pdfNextPage")))]), r("div", { staticClass: "file-pdf-zoom" }, [r("span", { staticClass: "file-pdf-zoom-btn", class: { disabled: n.pdfScale <= n.scaleMin }, on: { click: n.zoomOut } }, [r("i", { staticClass: "el-icon-minus" })]), r("span", { staticClass: "file-pdf-zoom-btn", class: { disabled: n.pdfScale >= n.scaleMax }, on: { click: n.zoomIn } }, [r("i", { staticClass: "el-icon-plus" })])]), r("el-button", { attrs: { size: "mini", type: "primary", disabled: !((o = n.element) != null && o.downloadUrl) }, on: { click: n.downloadFile } }, [n._v(n._s(n.$t("trace.pdfDownload")))])], 1), r("div", { staticClass: "file-pdf-viewer" }, [n.loading ? r("div", { staticClass: "file-pdf-loading" }, [n._v(n._s(n.$t("trace.pdfLoading")))]) : n.error ? r("div", { staticClass: "file-pdf-error" }, [n._v(n._s(n.error))]) : r("canvas", { ref: "canvasRef", staticClass: "file-pdf-canvas" })])]);
|
|
9623
9635
|
}, up = [], cp = /* @__PURE__ */ bn(
|
|
9624
9636
|
op,
|
|
9625
9637
|
lp,
|
|
9626
9638
|
up,
|
|
9627
9639
|
!1,
|
|
9628
9640
|
null,
|
|
9629
|
-
"
|
|
9641
|
+
"fbe9d6b8"
|
|
9630
9642
|
);
|
|
9631
9643
|
const Ys = cp.exports;
|
|
9632
9644
|
/*!
|
|
@@ -9908,7 +9920,7 @@ var vu = {
|
|
|
9908
9920
|
zoomed: null,
|
|
9909
9921
|
play: null,
|
|
9910
9922
|
stop: null
|
|
9911
|
-
}, gp = '<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>',
|
|
9923
|
+
}, gp = '<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>', Fa = typeof window < "u" && typeof window.document < "u", En = Fa ? window : {}, Wr = Fa && En.document.documentElement ? "ontouchstart" in En.document.documentElement : !1, Qs = Fa ? "PointerEvent" in En : !1, Ne = "viewer", ka = "move", Tc = "switch", Ti = "zoom", ya = "".concat(Ne, "-active"), mp = "".concat(Ne, "-close"), Sa = "".concat(Ne, "-fade"), zs = "".concat(Ne, "-fixed"), vp = "".concat(Ne, "-fullscreen"), yu = "".concat(Ne, "-fullscreen-exit"), ir = "".concat(Ne, "-hide"), yp = "".concat(Ne, "-hide-md-down"), bp = "".concat(Ne, "-hide-sm-down"), xp = "".concat(Ne, "-hide-xs-down"), Qt = "".concat(Ne, "-in"), Ii = "".concat(Ne, "-invisible"), jr = "".concat(Ne, "-loading"), wp = "".concat(Ne, "-move"), bu = "".concat(Ne, "-open"), $r = "".concat(Ne, "-show"), it = "".concat(Ne, "-transition"), Ur = "click", Bs = "dblclick", xu = "dragstart", wu = "focusin", ku = "keydown", Zt = "load", ar = "error", kp = Wr ? "touchend touchcancel" : "mouseup", Sp = Wr ? "touchmove" : "mousemove", Cp = Wr ? "touchstart" : "mousedown", Su = Qs ? "pointerdown" : Cp, Cu = Qs ? "pointermove" : Sp, Tu = Qs ? "pointerup pointercancel" : kp, _u = "resize", cn = "transitionend", Lu = "wheel", Eu = "ready", Iu = "show", Au = "shown", Du = "hide", Ou = "hidden", Nu = "view", Di = "viewed", Fu = "move", Ru = "moved", Mu = "rotate", $u = "rotated", Pu = "scale", zu = "scaled", Bu = "zoom", Hu = "zoomed", Wu = "play", ju = "stop", Aa = "".concat(Ne, "Action"), Zs = /\s\s*/, ba = ["zoom-in", "zoom-out", "one-to-one", "reset", "prev", "play", "next", "rotate-left", "rotate-right", "flip-horizontal", "flip-vertical"];
|
|
9912
9924
|
function Oi(l) {
|
|
9913
9925
|
return typeof l == "string";
|
|
9914
9926
|
}
|
|
@@ -10022,7 +10034,7 @@ function Hs(l, n, r) {
|
|
|
10022
10034
|
}
|
|
10023
10035
|
var _c = function() {
|
|
10024
10036
|
var l = !1;
|
|
10025
|
-
if (
|
|
10037
|
+
if (Fa) {
|
|
10026
10038
|
var n = !1, r = function() {
|
|
10027
10039
|
}, o = Object.defineProperty({}, "once", {
|
|
10028
10040
|
get: function() {
|
|
@@ -10058,8 +10070,8 @@ function Ee(l, n, r) {
|
|
|
10058
10070
|
var p = l.listeners, y = p === void 0 ? {} : p;
|
|
10059
10071
|
u = function() {
|
|
10060
10072
|
delete y[f][r], l.removeEventListener(f, u, o);
|
|
10061
|
-
for (var k = arguments.length, S = new Array(k),
|
|
10062
|
-
S[
|
|
10073
|
+
for (var k = arguments.length, S = new Array(k), R = 0; R < k; R++)
|
|
10074
|
+
S[R] = arguments[R];
|
|
10063
10075
|
r.apply(l, S);
|
|
10064
10076
|
}, y[f] || (y[f] = {}), y[f][r] && l.removeEventListener(f, y[f][r], o), y[f][r] = u, l.listeners = y;
|
|
10065
10077
|
}
|
|
@@ -10123,7 +10135,7 @@ function Op(l) {
|
|
|
10123
10135
|
var n = Js({}, l), r = [];
|
|
10124
10136
|
return Ke(l, function(o, u) {
|
|
10125
10137
|
delete n[u], Ke(n, function(f) {
|
|
10126
|
-
var p = Math.abs(o.startX - f.startX), y = Math.abs(o.startY - f.startY), m = Math.abs(o.endX - f.endX), k = Math.abs(o.endY - f.endY), S = Math.sqrt(p * p + y * y),
|
|
10138
|
+
var p = Math.abs(o.startX - f.startX), y = Math.abs(o.startY - f.startY), m = Math.abs(o.endX - f.endX), k = Math.abs(o.endY - f.endY), S = Math.sqrt(p * p + y * y), R = Math.sqrt(m * m + k * k), L = (R - S) / S;
|
|
10127
10139
|
r.push(L);
|
|
10128
10140
|
});
|
|
10129
10141
|
}), r.sort(function(o, u) {
|
|
@@ -10151,7 +10163,7 @@ function Np(l) {
|
|
|
10151
10163
|
pageY: r
|
|
10152
10164
|
};
|
|
10153
10165
|
}
|
|
10154
|
-
var
|
|
10166
|
+
var Fp = {
|
|
10155
10167
|
render: function() {
|
|
10156
10168
|
this.initContainer(), this.initViewer(), this.initList(), this.renderViewer();
|
|
10157
10169
|
},
|
|
@@ -10180,16 +10192,16 @@ var Rp = {
|
|
|
10180
10192
|
u.innerHTML = "", Ke(this.images, function(p, y) {
|
|
10181
10193
|
var m = p.src, k = p.alt || Dp(m), S = n.getImageURL(p);
|
|
10182
10194
|
if (m || S) {
|
|
10183
|
-
var
|
|
10195
|
+
var R = document.createElement("li"), L = document.createElement("img");
|
|
10184
10196
|
Ke(o.inheritedAttributes, function(W) {
|
|
10185
10197
|
var z = p.getAttribute(W);
|
|
10186
10198
|
z !== null && L.setAttribute(W, z);
|
|
10187
|
-
}), o.navbar && (L.src = m || S), L.alt = k, L.setAttribute("data-original-url", S || m),
|
|
10199
|
+
}), o.navbar && (L.src = m || S), L.alt = k, L.setAttribute("data-original-url", S || m), R.setAttribute("data-index", y), R.setAttribute("data-viewer-action", "view"), R.setAttribute("role", "button"), o.keyboard && R.setAttribute("tabindex", 0), R.appendChild(L), u.appendChild(R), f.push(R);
|
|
10188
10200
|
}
|
|
10189
10201
|
}), this.items = f, Ke(f, function(p) {
|
|
10190
10202
|
var y = p.firstElementChild, m, k;
|
|
10191
|
-
Hs(y, "filled", !0), o.loading && Le(p, jr), Ee(y, Zt, m = function(
|
|
10192
|
-
Ge(y, ar, k), o.loading && Be(p, jr), n.loadImage(
|
|
10203
|
+
Hs(y, "filled", !0), o.loading && Le(p, jr), Ee(y, Zt, m = function(R) {
|
|
10204
|
+
Ge(y, ar, k), o.loading && Be(p, jr), n.loadImage(R);
|
|
10193
10205
|
}, {
|
|
10194
10206
|
once: !0
|
|
10195
10207
|
}), Ee(y, ar, k = function() {
|
|
@@ -10226,9 +10238,9 @@ var Rp = {
|
|
|
10226
10238
|
abort: function() {
|
|
10227
10239
|
S.onload = null;
|
|
10228
10240
|
}
|
|
10229
|
-
}, S = Lc(u, o, function(
|
|
10230
|
-
var W =
|
|
10231
|
-
r.imageInitializing = !1, m * W > y ? $ = y / W : D = m * W, z = nt(z) ? z : 0.9, D = Math.min(D * z,
|
|
10241
|
+
}, S = Lc(u, o, function(R, L) {
|
|
10242
|
+
var W = R / L, z = Math.max(0, Math.min(1, o.initialCoverage)), D = y, $ = m;
|
|
10243
|
+
r.imageInitializing = !1, m * W > y ? $ = y / W : D = m * W, z = nt(z) ? z : 0.9, D = Math.min(D * z, R), $ = Math.min($ * z, L);
|
|
10232
10244
|
var I = (y - D) / 2, N = (m - $) / 2, H = {
|
|
10233
10245
|
left: I,
|
|
10234
10246
|
top: N,
|
|
@@ -10237,9 +10249,9 @@ var Rp = {
|
|
|
10237
10249
|
width: D,
|
|
10238
10250
|
height: $,
|
|
10239
10251
|
oldRatio: 1,
|
|
10240
|
-
ratio: D /
|
|
10252
|
+
ratio: D / R,
|
|
10241
10253
|
aspectRatio: W,
|
|
10242
|
-
naturalWidth:
|
|
10254
|
+
naturalWidth: R,
|
|
10243
10255
|
naturalHeight: L
|
|
10244
10256
|
}, V = Kt({}, H);
|
|
10245
10257
|
o.rotatable && (H.rotate = k.rotate || 0, V.rotate = 0), o.scalable && (H.scaleX = k.scaleX || 1, H.scaleY = k.scaleY || 1, V.scaleX = 1, V.scaleY = 1), r.imageData = H, r.initialImageData = V, n && n();
|
|
@@ -10272,7 +10284,7 @@ var Rp = {
|
|
|
10272
10284
|
var n = this.image;
|
|
10273
10285
|
n && (this.viewing && this.viewing.abort(), n.parentNode.removeChild(n), this.image = null, this.title.innerHTML = "");
|
|
10274
10286
|
}
|
|
10275
|
-
},
|
|
10287
|
+
}, Rp = {
|
|
10276
10288
|
bind: function() {
|
|
10277
10289
|
var n = this.options, r = this.viewer, o = this.canvas, u = this.element.ownerDocument;
|
|
10278
10290
|
Ee(r, Ur, this.onClick = this.click.bind(this)), Ee(r, xu, this.onDragStart = this.dragstart.bind(this)), Ee(o, Su, this.onPointerDown = this.pointerdown.bind(this)), Ee(u, Cu, this.onPointerMove = this.pointermove.bind(this)), Ee(u, Tu, this.onPointerUp = this.pointerup.bind(this)), Ee(u, ku, this.onKeyDown = this.keydown.bind(this)), Ee(window, _u, this.onResize = this.resize.bind(this)), n.zoomable && n.zoomOnWheel && Ee(r, Lu, this.onWheel = this.wheel.bind(this), {
|
|
@@ -10361,13 +10373,13 @@ var Rp = {
|
|
|
10361
10373
|
loadImage: function(n) {
|
|
10362
10374
|
var r = n.target, o = r.parentNode, u = o.offsetWidth || 30, f = o.offsetHeight || 50, p = !!Hr(r, "filled");
|
|
10363
10375
|
Lc(r, this.options, function(y, m) {
|
|
10364
|
-
var k = y / m, S = u,
|
|
10365
|
-
f * k > u ? p ? S = f * k :
|
|
10376
|
+
var k = y / m, S = u, R = f;
|
|
10377
|
+
f * k > u ? p ? S = f * k : R = u / k : p ? R = u / k : S = f * k, fn(r, Kt({
|
|
10366
10378
|
width: S,
|
|
10367
|
-
height:
|
|
10379
|
+
height: R
|
|
10368
10380
|
}, Ca({
|
|
10369
10381
|
translateX: (u - S) / 2,
|
|
10370
|
-
translateY: (f -
|
|
10382
|
+
translateY: (f - R) / 2
|
|
10371
10383
|
})));
|
|
10372
10384
|
});
|
|
10373
10385
|
},
|
|
@@ -10517,8 +10529,8 @@ var Rp = {
|
|
|
10517
10529
|
Be(f, Qt), n.hidden();
|
|
10518
10530
|
};
|
|
10519
10531
|
if (u.transition && !r) {
|
|
10520
|
-
var m = function(
|
|
10521
|
-
|
|
10532
|
+
var m = function(R) {
|
|
10533
|
+
R && R.target === f && (Ge(f, cn, m), n.hidden());
|
|
10522
10534
|
}, k = function() {
|
|
10523
10535
|
Pr(f, it) ? (Ee(f, cn, m), Be(f, Qt)) : y();
|
|
10524
10536
|
};
|
|
@@ -10545,40 +10557,40 @@ var Rp = {
|
|
|
10545
10557
|
if (!this.isShown)
|
|
10546
10558
|
return this.index = r, this.show();
|
|
10547
10559
|
this.viewing && this.viewing.abort();
|
|
10548
|
-
var o = this.element, u = this.options, f = this.title, p = this.canvas, y = this.items[r], m = y.querySelector("img"), k = Hr(m, "originalUrl"), S = m.getAttribute("alt"),
|
|
10560
|
+
var o = this.element, u = this.options, f = this.title, p = this.canvas, y = this.items[r], m = y.querySelector("img"), k = Hr(m, "originalUrl"), S = m.getAttribute("alt"), R = document.createElement("img");
|
|
10549
10561
|
if (Ke(u.inheritedAttributes, function($) {
|
|
10550
10562
|
var I = m.getAttribute($);
|
|
10551
|
-
I !== null &&
|
|
10552
|
-
}),
|
|
10563
|
+
I !== null && R.setAttribute($, I);
|
|
10564
|
+
}), R.src = k, R.alt = S, qe(u.view) && Ee(o, Nu, u.view, {
|
|
10553
10565
|
once: !0
|
|
10554
10566
|
}), ot(o, Nu, {
|
|
10555
10567
|
originalImage: this.images[r],
|
|
10556
10568
|
index: r,
|
|
10557
|
-
image:
|
|
10569
|
+
image: R
|
|
10558
10570
|
}) === !1 || !this.isShown || this.hiding || this.played)
|
|
10559
10571
|
return this;
|
|
10560
10572
|
var L = this.items[this.index];
|
|
10561
|
-
L && (Be(L, ya), L.removeAttribute("aria-selected")), Le(y, ya), y.setAttribute("aria-selected", !0), u.focus && y.focus(), this.image =
|
|
10573
|
+
L && (Be(L, ya), L.removeAttribute("aria-selected")), Le(y, ya), y.setAttribute("aria-selected", !0), u.focus && y.focus(), this.image = R, this.viewed = !1, this.index = r, this.imageData = {}, Le(R, Ii), u.loading && Le(p, jr), p.innerHTML = "", p.appendChild(R), this.renderList(), f.innerHTML = "";
|
|
10562
10574
|
var W = function() {
|
|
10563
10575
|
var I = n.imageData, N = Array.isArray(u.title) ? u.title[1] : u.title;
|
|
10564
|
-
f.innerHTML = Ep(qe(N) ? N.call(n,
|
|
10576
|
+
f.innerHTML = Ep(qe(N) ? N.call(n, R, I) : "".concat(S, " (").concat(I.naturalWidth, " × ").concat(I.naturalHeight, ")"));
|
|
10565
10577
|
}, z, D;
|
|
10566
10578
|
return Ee(o, Di, W, {
|
|
10567
10579
|
once: !0
|
|
10568
10580
|
}), this.viewing = {
|
|
10569
10581
|
abort: function() {
|
|
10570
|
-
Ge(o, Di, W),
|
|
10582
|
+
Ge(o, Di, W), R.complete ? n.imageRendering ? n.imageRendering.abort() : n.imageInitializing && n.imageInitializing.abort() : (R.src = "", Ge(R, Zt, z), n.timeout && clearTimeout(n.timeout));
|
|
10571
10583
|
}
|
|
10572
|
-
},
|
|
10573
|
-
Ge(
|
|
10584
|
+
}, R.complete ? this.load() : (Ee(R, Zt, z = function() {
|
|
10585
|
+
Ge(R, ar, D), n.load();
|
|
10574
10586
|
}, {
|
|
10575
10587
|
once: !0
|
|
10576
|
-
}), Ee(
|
|
10577
|
-
Ge(
|
|
10588
|
+
}), Ee(R, ar, D = function() {
|
|
10589
|
+
Ge(R, Zt, z), n.timeout && (clearTimeout(n.timeout), n.timeout = !1), Be(R, Ii), u.loading && Be(n.canvas, jr);
|
|
10578
10590
|
}, {
|
|
10579
10591
|
once: !0
|
|
10580
10592
|
}), this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(function() {
|
|
10581
|
-
Be(
|
|
10593
|
+
Be(R, Ii), n.timeout = !1;
|
|
10582
10594
|
}, 1e3)), this;
|
|
10583
10595
|
},
|
|
10584
10596
|
/**
|
|
@@ -10623,9 +10635,9 @@ var Rp = {
|
|
|
10623
10635
|
if (n = Number(n), o = Number(o), this.viewed && !this.played && p.movable) {
|
|
10624
10636
|
var m = y.x, k = y.y, S = !1;
|
|
10625
10637
|
if (nt(n) ? S = !0 : n = m, nt(o) ? S = !0 : o = k, S) {
|
|
10626
|
-
if (qe(p.move) && Ee(f,
|
|
10638
|
+
if (qe(p.move) && Ee(f, Fu, p.move, {
|
|
10627
10639
|
once: !0
|
|
10628
|
-
}), ot(f,
|
|
10640
|
+
}), ot(f, Fu, {
|
|
10629
10641
|
x: n,
|
|
10630
10642
|
y: o,
|
|
10631
10643
|
oldX: m,
|
|
@@ -10634,9 +10646,9 @@ var Rp = {
|
|
|
10634
10646
|
}) === !1)
|
|
10635
10647
|
return this;
|
|
10636
10648
|
y.x = n, y.y = o, y.left = n, y.top = o, this.moving = !0, this.renderImage(function() {
|
|
10637
|
-
r.moving = !1, qe(p.moved) && Ee(f,
|
|
10649
|
+
r.moving = !1, qe(p.moved) && Ee(f, Ru, p.moved, {
|
|
10638
10650
|
once: !0
|
|
10639
|
-
}), ot(f,
|
|
10651
|
+
}), ot(f, Ru, {
|
|
10640
10652
|
x: n,
|
|
10641
10653
|
y: o,
|
|
10642
10654
|
oldX: m,
|
|
@@ -10761,7 +10773,7 @@ var Rp = {
|
|
|
10761
10773
|
* @returns {Viewer} this
|
|
10762
10774
|
*/
|
|
10763
10775
|
zoomTo: function(n) {
|
|
10764
|
-
var r = this, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, f = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, p = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, y = this.element, m = this.options, k = this.pointers, S = this.imageData,
|
|
10776
|
+
var r = this, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, f = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, p = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, y = this.element, m = this.options, k = this.pointers, S = this.imageData, R = S.x, L = S.y, W = S.width, z = S.height, D = S.naturalWidth, $ = S.naturalHeight;
|
|
10765
10777
|
if (n = Math.max(0, n), nt(n) && this.viewed && !this.played && (p || m.zoomable)) {
|
|
10766
10778
|
if (!p) {
|
|
10767
10779
|
var I = Math.max(0.01, m.minZoomRatio), N = Math.min(100, m.maxZoomRatio);
|
|
@@ -10792,8 +10804,8 @@ var Rp = {
|
|
|
10792
10804
|
pageX: f.pageX,
|
|
10793
10805
|
pageY: f.pageY
|
|
10794
10806
|
};
|
|
10795
|
-
S.x -= ne * ((De.pageX - de.left -
|
|
10796
|
-
} else Br(u) && nt(u.x) && nt(u.y) ? (S.x -= ne * ((u.x -
|
|
10807
|
+
S.x -= ne * ((De.pageX - de.left - R) / W), S.y -= ue * ((De.pageY - de.top - L) / z);
|
|
10808
|
+
} else Br(u) && nt(u.x) && nt(u.y) ? (S.x -= ne * ((u.x - R) / W), S.y -= ue * ((u.y - L) / z)) : (S.x -= ne / 2, S.y -= ue / 2);
|
|
10797
10809
|
S.left = S.x, S.top = S.y, S.width = H, S.height = V, S.oldRatio = se, S.ratio = n, this.renderImage(function() {
|
|
10798
10810
|
r.zooming = !1, qe(m.zoomed) && Ee(y, Hu, m.zoomed, {
|
|
10799
10811
|
once: !0
|
|
@@ -10831,13 +10843,13 @@ var Rp = {
|
|
|
10831
10843
|
}), nt(u.interval) && u.interval > 0) {
|
|
10832
10844
|
var S = function() {
|
|
10833
10845
|
clearTimeout(n.playing.timeout), Be(y[k], Qt), k -= 1, k = k >= 0 ? k : m - 1, Le(y[k], Qt), n.playing.timeout = setTimeout(S, u.interval);
|
|
10834
|
-
},
|
|
10835
|
-
clearTimeout(n.playing.timeout), Be(y[k], Qt), k += 1, k = k < m ? k : 0, Le(y[k], Qt), n.playing.timeout = setTimeout(
|
|
10846
|
+
}, R = function() {
|
|
10847
|
+
clearTimeout(n.playing.timeout), Be(y[k], Qt), k += 1, k = k < m ? k : 0, Le(y[k], Qt), n.playing.timeout = setTimeout(R, u.interval);
|
|
10836
10848
|
};
|
|
10837
10849
|
m > 1 && (this.playing = {
|
|
10838
10850
|
prev: S,
|
|
10839
|
-
next:
|
|
10840
|
-
timeout: setTimeout(
|
|
10851
|
+
next: R,
|
|
10852
|
+
timeout: setTimeout(R, u.interval)
|
|
10841
10853
|
});
|
|
10842
10854
|
}
|
|
10843
10855
|
return this;
|
|
@@ -10920,8 +10932,8 @@ var Rp = {
|
|
|
10920
10932
|
if (this.images = f, this.length = f.length, this.ready) {
|
|
10921
10933
|
var p = [];
|
|
10922
10934
|
if (Ke(this.items, function(k, S) {
|
|
10923
|
-
var
|
|
10924
|
-
L &&
|
|
10935
|
+
var R = k.querySelector("img"), L = f[S];
|
|
10936
|
+
L && R ? (L.src !== R.src || L.alt !== R.alt) && p.push(S) : p.push(S);
|
|
10925
10937
|
}), fn(this.list, {
|
|
10926
10938
|
width: "auto"
|
|
10927
10939
|
}), this.initList(), this.isShown)
|
|
@@ -11071,12 +11083,12 @@ var Rp = {
|
|
|
11071
11083
|
if (k.complete)
|
|
11072
11084
|
m();
|
|
11073
11085
|
else {
|
|
11074
|
-
var S,
|
|
11086
|
+
var S, R;
|
|
11075
11087
|
Ee(k, Zt, S = function() {
|
|
11076
|
-
Ge(k, ar,
|
|
11088
|
+
Ge(k, ar, R), m();
|
|
11077
11089
|
}, {
|
|
11078
11090
|
once: !0
|
|
11079
|
-
}), Ee(k, ar,
|
|
11091
|
+
}), Ee(k, ar, R = function() {
|
|
11080
11092
|
Ge(k, Zt, S), m();
|
|
11081
11093
|
}, {
|
|
11082
11094
|
once: !0
|
|
@@ -11096,16 +11108,16 @@ var Rp = {
|
|
|
11096
11108
|
if (!this.ready) {
|
|
11097
11109
|
var r = this.element, o = this.options, u = r.parentNode, f = document.createElement("div");
|
|
11098
11110
|
f.innerHTML = gp;
|
|
11099
|
-
var p = f.querySelector(".".concat(Ne, "-container")), y = p.querySelector(".".concat(Ne, "-title")), m = p.querySelector(".".concat(Ne, "-toolbar")), k = p.querySelector(".".concat(Ne, "-navbar")), S = p.querySelector(".".concat(Ne, "-button")),
|
|
11100
|
-
if (this.parent = u, this.viewer = p, this.title = y, this.toolbar = m, this.navbar = k, this.button = S, this.canvas =
|
|
11111
|
+
var p = f.querySelector(".".concat(Ne, "-container")), y = p.querySelector(".".concat(Ne, "-title")), m = p.querySelector(".".concat(Ne, "-toolbar")), k = p.querySelector(".".concat(Ne, "-navbar")), S = p.querySelector(".".concat(Ne, "-button")), R = p.querySelector(".".concat(Ne, "-canvas"));
|
|
11112
|
+
if (this.parent = u, this.viewer = p, this.title = y, this.toolbar = m, this.navbar = k, this.button = S, this.canvas = R, this.footer = p.querySelector(".".concat(Ne, "-footer")), this.tooltipBox = p.querySelector(".".concat(Ne, "-tooltip")), this.player = p.querySelector(".".concat(Ne, "-player")), this.list = p.querySelector(".".concat(Ne, "-list")), p.id = "".concat(Ne).concat(this.id), y.id = "".concat(Ne, "Title").concat(this.id), Le(y, o.title ? xa(Array.isArray(o.title) ? o.title[0] : o.title) : ir), Le(k, o.navbar ? xa(o.navbar) : ir), Ni(S, ir, !o.button), o.keyboard && S.setAttribute("tabindex", 0), o.backdrop && (Le(p, "".concat(Ne, "-backdrop")), !o.inline && o.backdrop !== "static" && Hs(R, Aa, "hide")), Oi(o.className) && o.className && o.className.split(Zs).forEach(function(H) {
|
|
11101
11113
|
Le(p, H);
|
|
11102
11114
|
}), o.toolbar) {
|
|
11103
11115
|
var L = document.createElement("ul"), W = Br(o.toolbar), z = ba.slice(0, 3), D = ba.slice(7, 9), $ = ba.slice(9);
|
|
11104
11116
|
W || Le(m, xa(o.toolbar)), Ke(W ? o.toolbar : ba, function(H, V) {
|
|
11105
11117
|
var ne = W && Br(H), ue = W ? eo(V) : H, se = ne && !zr(H.show) ? H.show : H;
|
|
11106
11118
|
if (!(!se || !o.zoomable && z.indexOf(ue) !== -1 || !o.rotatable && D.indexOf(ue) !== -1 || !o.scalable && $.indexOf(ue) !== -1)) {
|
|
11107
|
-
var de = ne && !zr(H.size) ? H.size : H, De = ne && !zr(H.click) ? H.click : H,
|
|
11108
|
-
o.keyboard &&
|
|
11119
|
+
var de = ne && !zr(H.size) ? H.size : H, De = ne && !zr(H.click) ? H.click : H, Fe = document.createElement("li");
|
|
11120
|
+
o.keyboard && Fe.setAttribute("tabindex", 0), Fe.setAttribute("role", "button"), Le(Fe, "".concat(Ne, "-").concat(ue)), qe(De) || Hs(Fe, Aa, ue), nt(se) && Le(Fe, xa(se)), ["small", "large"].indexOf(de) !== -1 ? Le(Fe, "".concat(Ne, "-").concat(de)) : ue === "play" && Le(Fe, "".concat(Ne, "-large")), qe(De) && Ee(Fe, Ur, De), L.appendChild(Fe);
|
|
11109
11121
|
}
|
|
11110
11122
|
}), m.appendChild(L);
|
|
11111
11123
|
} else
|
|
@@ -11158,7 +11170,7 @@ var Rp = {
|
|
|
11158
11170
|
}
|
|
11159
11171
|
}]);
|
|
11160
11172
|
}();
|
|
11161
|
-
Kt(Ec.prototype,
|
|
11173
|
+
Kt(Ec.prototype, Fp, Rp, Mp, $p, Pp);
|
|
11162
11174
|
var Hp = typeof global == "object" && global && global.Object === Object && global, Ic = Hp, Wp = typeof self == "object" && self && self.Object === Object && self, jp = Ic || Wp || Function("return this")(), to = jp, Up = to.Symbol, Da = Up, Ac = Object.prototype, qp = Ac.hasOwnProperty, Gp = Ac.toString, Ci = Da ? Da.toStringTag : void 0;
|
|
11163
11175
|
function Kp(l) {
|
|
11164
11176
|
var n = qp.call(l, Ci), r = l[Ci];
|
|
@@ -11282,7 +11294,7 @@ function Nc(l, n) {
|
|
|
11282
11294
|
var r = typeof l;
|
|
11283
11295
|
return n = n ?? Dg, !!n && (r == "number" || r != "symbol" && Og.test(l)) && l > -1 && l % 1 == 0 && l < n;
|
|
11284
11296
|
}
|
|
11285
|
-
function
|
|
11297
|
+
function Fc(l, n, r) {
|
|
11286
11298
|
n == "__proto__" && Oa ? Oa(l, n, {
|
|
11287
11299
|
configurable: !0,
|
|
11288
11300
|
enumerable: !0,
|
|
@@ -11290,20 +11302,20 @@ function Rc(l, n, r) {
|
|
|
11290
11302
|
writable: !0
|
|
11291
11303
|
}) : l[n] = r;
|
|
11292
11304
|
}
|
|
11293
|
-
function
|
|
11305
|
+
function Rc(l, n) {
|
|
11294
11306
|
return l === n || l !== l && n !== n;
|
|
11295
11307
|
}
|
|
11296
|
-
var Ng = Object.prototype,
|
|
11308
|
+
var Ng = Object.prototype, Fg = Ng.hasOwnProperty;
|
|
11297
11309
|
function Mc(l, n, r) {
|
|
11298
11310
|
var o = l[n];
|
|
11299
|
-
(!(
|
|
11311
|
+
(!(Fg.call(l, n) && Rc(o, r)) || r === void 0 && !(n in l)) && Fc(l, n, r);
|
|
11300
11312
|
}
|
|
11301
|
-
function
|
|
11313
|
+
function Rg(l, n, r, o) {
|
|
11302
11314
|
var u = !r;
|
|
11303
11315
|
r || (r = {});
|
|
11304
11316
|
for (var f = -1, p = n.length; ++f < p; ) {
|
|
11305
11317
|
var y = n[f], m = void 0;
|
|
11306
|
-
m === void 0 && (m = l[y]), u ?
|
|
11318
|
+
m === void 0 && (m = l[y]), u ? Fc(r, y, m) : Mc(r, y, m);
|
|
11307
11319
|
}
|
|
11308
11320
|
return r;
|
|
11309
11321
|
}
|
|
@@ -11332,7 +11344,7 @@ function zg(l, n, r) {
|
|
|
11332
11344
|
if (!io(r))
|
|
11333
11345
|
return !1;
|
|
11334
11346
|
var o = typeof n;
|
|
11335
|
-
return (o == "number" ? ao(r) && Nc(n, r.length) : o == "string" && n in r) ?
|
|
11347
|
+
return (o == "number" ? ao(r) && Nc(n, r.length) : o == "string" && n in r) ? Rc(r[n], l) : !1;
|
|
11336
11348
|
}
|
|
11337
11349
|
function Bg(l) {
|
|
11338
11350
|
return $g(function(n, r) {
|
|
@@ -11377,10 +11389,10 @@ function Cm(l) {
|
|
|
11377
11389
|
return l(n);
|
|
11378
11390
|
};
|
|
11379
11391
|
}
|
|
11380
|
-
var Hc = typeof exports == "object" && exports && !exports.nodeType && exports, Ai = Hc && typeof module == "object" && module && !module.nodeType && module, Tm = Ai && Ai.exports === Hc,
|
|
11392
|
+
var Hc = typeof exports == "object" && exports && !exports.nodeType && exports, Ai = Hc && typeof module == "object" && module && !module.nodeType && module, Tm = Ai && Ai.exports === Hc, Fs = Tm && Ic.process, _m = function() {
|
|
11381
11393
|
try {
|
|
11382
11394
|
var l = Ai && Ai.require && Ai.require("util").types;
|
|
11383
|
-
return l ||
|
|
11395
|
+
return l || Fs && Fs.binding && Fs.binding("util");
|
|
11384
11396
|
} catch {
|
|
11385
11397
|
}
|
|
11386
11398
|
}(), Yu = _m, Ju = Yu && Yu.isTypedArray, Lm = Ju ? Cm(Ju) : Sm, Em = Lm, Im = Object.prototype, Am = Im.hasOwnProperty;
|
|
@@ -11395,10 +11407,10 @@ function Om(l, n) {
|
|
|
11395
11407
|
return l(n(r));
|
|
11396
11408
|
};
|
|
11397
11409
|
}
|
|
11398
|
-
var Nm = Om(Object.keys, Object),
|
|
11410
|
+
var Nm = Om(Object.keys, Object), Fm = Nm, Rm = Object.prototype, Mm = Rm.hasOwnProperty;
|
|
11399
11411
|
function $m(l) {
|
|
11400
11412
|
if (!Pc(l))
|
|
11401
|
-
return
|
|
11413
|
+
return Fm(l);
|
|
11402
11414
|
var n = [];
|
|
11403
11415
|
for (var r in Object(l))
|
|
11404
11416
|
Mm.call(l, r) && r != "constructor" && n.push(r);
|
|
@@ -11409,7 +11421,7 @@ function Pm(l) {
|
|
|
11409
11421
|
}
|
|
11410
11422
|
var zm = Object.prototype, Bm = zm.hasOwnProperty, Hm = Bg(function(l, n) {
|
|
11411
11423
|
if (Pc(n) || ao(n)) {
|
|
11412
|
-
|
|
11424
|
+
Rg(n, Pm(n), l);
|
|
11413
11425
|
return;
|
|
11414
11426
|
}
|
|
11415
11427
|
for (var r in n)
|
|
@@ -11476,8 +11488,8 @@ const Wc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11476
11488
|
function Wt(ye, xe) {
|
|
11477
11489
|
var pe = ye.next();
|
|
11478
11490
|
if (_e[pe]) {
|
|
11479
|
-
var
|
|
11480
|
-
if (
|
|
11491
|
+
var Re = _e[pe](ye, xe);
|
|
11492
|
+
if (Re !== !1) return Re;
|
|
11481
11493
|
}
|
|
11482
11494
|
if (pe == '"' || pe == "'")
|
|
11483
11495
|
return xe.tokenize = In(pe), xe.tokenize(ye, xe);
|
|
@@ -11505,23 +11517,23 @@ const Wc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11505
11517
|
}
|
|
11506
11518
|
function In(ye) {
|
|
11507
11519
|
return function(xe, pe) {
|
|
11508
|
-
for (var
|
|
11509
|
-
if (Ie == ye && !
|
|
11520
|
+
for (var Re = !1, Ie, $t = !1; (Ie = xe.next()) != null; ) {
|
|
11521
|
+
if (Ie == ye && !Re) {
|
|
11510
11522
|
$t = !0;
|
|
11511
11523
|
break;
|
|
11512
11524
|
}
|
|
11513
|
-
|
|
11525
|
+
Re = !Re && Ie == "\\";
|
|
11514
11526
|
}
|
|
11515
|
-
return ($t || !(
|
|
11527
|
+
return ($t || !(Re || lt)) && (pe.tokenize = null), "string";
|
|
11516
11528
|
};
|
|
11517
11529
|
}
|
|
11518
11530
|
function qn(ye, xe) {
|
|
11519
|
-
for (var pe = !1,
|
|
11520
|
-
if (
|
|
11531
|
+
for (var pe = !1, Re; Re = ye.next(); ) {
|
|
11532
|
+
if (Re == "/" && pe) {
|
|
11521
11533
|
xe.tokenize = null;
|
|
11522
11534
|
break;
|
|
11523
11535
|
}
|
|
11524
|
-
pe =
|
|
11536
|
+
pe = Re == "*";
|
|
11525
11537
|
}
|
|
11526
11538
|
return "comment";
|
|
11527
11539
|
}
|
|
@@ -11543,8 +11555,8 @@ const Wc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11543
11555
|
if (ye.sol() && (pe.align == null && (pe.align = !1), xe.indented = ye.indentation(), xe.startOfLine = !0), ye.eatSpace())
|
|
11544
11556
|
return ur(ye, xe), null;
|
|
11545
11557
|
be = xt = null;
|
|
11546
|
-
var
|
|
11547
|
-
if (
|
|
11558
|
+
var Re = (xe.tokenize || Wt)(ye, xe);
|
|
11559
|
+
if (Re == "comment" || Re == "meta") return Re;
|
|
11548
11560
|
if (pe.align == null && (pe.align = !0), be == ";" || be == ":" || be == "," && ye.match(/^\s*(?:\/\/.*)?$/, !1))
|
|
11549
11561
|
for (; xe.context.type == "statement"; ) f(xe);
|
|
11550
11562
|
else if (be == "{") u(xe, ye.column(), "}");
|
|
@@ -11554,17 +11566,17 @@ const Wc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11554
11566
|
for (; pe.type == "statement"; ) pe = f(xe);
|
|
11555
11567
|
for (pe.type == "}" && (pe = f(xe)); pe.type == "statement"; ) pe = f(xe);
|
|
11556
11568
|
} else be == pe.type ? f(xe) : we && ((pe.type == "}" || pe.type == "top") && be != ";" || pe.type == "statement" && be == "newstatement") && u(xe, ye.column(), "statement", ye.current());
|
|
11557
|
-
if (
|
|
11558
|
-
var Ie = _e.token(ye, xe,
|
|
11559
|
-
Ie !== void 0 && (
|
|
11569
|
+
if (Re == "variable" && (xe.prevToken == "def" || M.typeFirstDefinitions && p(ye, xe, ye.start) && y(xe.context) && ye.match(/^\s*\(/, !1)) && (Re = "def"), _e.token) {
|
|
11570
|
+
var Ie = _e.token(ye, xe, Re);
|
|
11571
|
+
Ie !== void 0 && (Re = Ie);
|
|
11560
11572
|
}
|
|
11561
|
-
return
|
|
11573
|
+
return Re == "def" && M.styleDefs === !1 && (Re = "variable"), xe.startOfLine = !1, xe.prevToken = xt ? "def" : Re || be, ur(ye, xe), Re;
|
|
11562
11574
|
},
|
|
11563
11575
|
indent: function(ye, xe) {
|
|
11564
11576
|
if (ye.tokenize != Wt && ye.tokenize != null || ye.typeAtEndOfLine && y(ye.context))
|
|
11565
11577
|
return r.Pass;
|
|
11566
|
-
var pe = ye.context,
|
|
11567
|
-
if (pe.type == "statement" &&
|
|
11578
|
+
var pe = ye.context, Re = xe && xe.charAt(0), Ie = Re == pe.type;
|
|
11579
|
+
if (pe.type == "statement" && Re == "}" && (pe = pe.prev), M.dontIndentStatements)
|
|
11568
11580
|
for (; pe.type == "statement" && M.dontIndentStatements.test(pe.info); )
|
|
11569
11581
|
pe = pe.prev;
|
|
11570
11582
|
if (_e.indent) {
|
|
@@ -11572,11 +11584,11 @@ const Wc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11572
11584
|
if (typeof $t == "number") return $t;
|
|
11573
11585
|
}
|
|
11574
11586
|
var Xt = pe.prev && pe.prev.info == "switch";
|
|
11575
|
-
if (M.allmanIndentation && /[{(]/.test(
|
|
11587
|
+
if (M.allmanIndentation && /[{(]/.test(Re)) {
|
|
11576
11588
|
for (; pe.type != "top" && pe.type != "}"; ) pe = pe.prev;
|
|
11577
11589
|
return pe.indented;
|
|
11578
11590
|
}
|
|
11579
|
-
return pe.type == "statement" ? pe.indented + (
|
|
11591
|
+
return pe.type == "statement" ? pe.indented + (Re == "{" ? 0 : he) : pe.align && (!E || pe.type != ")") ? pe.column + (Ie ? 0 : 1) : pe.type == ")" && !Ie ? pe.indented + he : pe.indented + (Ie ? 0 : K) + (!Ie && Xt && !/^(?:case|default)\b/.test(xe) ? K : 0);
|
|
11580
11592
|
},
|
|
11581
11593
|
electricInput: Oe ? /^\s*(?:case .*?:|default:|\{\}?|\})$/ : /^\s*[{}]$/,
|
|
11582
11594
|
blockCommentStart: "/*",
|
|
@@ -11593,7 +11605,7 @@ const Wc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11593
11605
|
function k(A, M) {
|
|
11594
11606
|
return typeof A == "function" ? A(M) : A.propertyIsEnumerable(M);
|
|
11595
11607
|
}
|
|
11596
|
-
var S = "auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",
|
|
11608
|
+
var S = "auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran", R = "alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq", L = "bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available", W = "FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT", z = m("int long char short double float unsigned signed void bool"), D = m("SEL instancetype id Class Protocol BOOL");
|
|
11597
11609
|
function $(A) {
|
|
11598
11610
|
return k(z, A) || /.+_t$/.test(A);
|
|
11599
11611
|
}
|
|
@@ -11637,7 +11649,7 @@ const Wc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11637
11649
|
var M = /(\w+)::~?(\w+)$/.exec(A);
|
|
11638
11650
|
return M && M[1] == M[2];
|
|
11639
11651
|
}
|
|
11640
|
-
function
|
|
11652
|
+
function Fe(A, M) {
|
|
11641
11653
|
for (var K; (K = A.next()) != null; )
|
|
11642
11654
|
if (K == '"' && !A.eat('"')) {
|
|
11643
11655
|
M.tokenize = null;
|
|
@@ -11675,7 +11687,7 @@ const Wc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11675
11687
|
modeProps: { fold: ["brace", "include"] }
|
|
11676
11688
|
}), $e(["text/x-c++src", "text/x-c++hdr"], {
|
|
11677
11689
|
name: "clike",
|
|
11678
|
-
keywords: m(S + " " +
|
|
11690
|
+
keywords: m(S + " " + R),
|
|
11679
11691
|
types: $,
|
|
11680
11692
|
blockKeywords: m(N + " class try catch"),
|
|
11681
11693
|
defKeywords: m(H + " class namespace"),
|
|
@@ -11736,7 +11748,7 @@ const Wc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11736
11748
|
atoms: m("true false null"),
|
|
11737
11749
|
hooks: {
|
|
11738
11750
|
"@": function(A, M) {
|
|
11739
|
-
return A.eat('"') ? (M.tokenize =
|
|
11751
|
+
return A.eat('"') ? (M.tokenize = Fe, Fe(A, M)) : (A.eatWhile(/[\w\$_]/), "meta");
|
|
11740
11752
|
}
|
|
11741
11753
|
}
|
|
11742
11754
|
});
|
|
@@ -11893,7 +11905,7 @@ const Wc = ({ images: l = [], options: n = {} } = {}) => {
|
|
|
11893
11905
|
modeProps: { fold: ["brace", "include"] }
|
|
11894
11906
|
}), $e("text/x-objectivec++", {
|
|
11895
11907
|
name: "clike",
|
|
11896
|
-
keywords: m(S + " " + L + " " +
|
|
11908
|
+
keywords: m(S + " " + L + " " + R),
|
|
11897
11909
|
types: I,
|
|
11898
11910
|
builtin: m(W),
|
|
11899
11911
|
blockKeywords: m(N + " @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),
|
|
@@ -12424,14 +12436,14 @@ function Km() {
|
|
|
12424
12436
|
var y = f.indentUnit, m = {}, k = p.htmlMode ? o : u;
|
|
12425
12437
|
for (var S in k) m[S] = k[S];
|
|
12426
12438
|
for (var S in p) m[S] = p[S];
|
|
12427
|
-
var
|
|
12439
|
+
var R, L;
|
|
12428
12440
|
function W(w, J) {
|
|
12429
12441
|
function G(K) {
|
|
12430
12442
|
return J.tokenize = K, K(w, J);
|
|
12431
12443
|
}
|
|
12432
12444
|
var A = w.next();
|
|
12433
12445
|
if (A == "<")
|
|
12434
|
-
return w.eat("!") ? w.eat("[") ? w.match("CDATA[") ? G($("atom", "]]>")) : null : w.match("--") ? G($("comment", "-->")) : w.match("DOCTYPE", !0, !0) ? (w.eatWhile(/[\w\._\-]/), G(I(1))) : null : w.eat("?") ? (w.eatWhile(/[\w\._\-]/), J.tokenize = $("meta", "?>"), "meta") : (
|
|
12446
|
+
return w.eat("!") ? w.eat("[") ? w.match("CDATA[") ? G($("atom", "]]>")) : null : w.match("--") ? G($("comment", "-->")) : w.match("DOCTYPE", !0, !0) ? (w.eatWhile(/[\w\._\-]/), G(I(1))) : null : w.eat("?") ? (w.eatWhile(/[\w\._\-]/), J.tokenize = $("meta", "?>"), "meta") : (R = w.eat("/") ? "closeTag" : "openTag", J.tokenize = z, "tag bracket");
|
|
12435
12447
|
if (A == "&") {
|
|
12436
12448
|
var M;
|
|
12437
12449
|
return w.eat("#") ? w.eat("x") ? M = w.eatWhile(/[a-fA-F\d]/) && w.eat(";") : M = w.eatWhile(/[\d]/) && w.eat(";") : M = w.eatWhile(/[\w\.\-:]/) && w.eat(";"), M ? "atom" : "error";
|
|
@@ -12442,9 +12454,9 @@ function Km() {
|
|
|
12442
12454
|
function z(w, J) {
|
|
12443
12455
|
var G = w.next();
|
|
12444
12456
|
if (G == ">" || G == "/" && w.eat(">"))
|
|
12445
|
-
return J.tokenize = W,
|
|
12457
|
+
return J.tokenize = W, R = G == ">" ? "endTag" : "selfcloseTag", "tag bracket";
|
|
12446
12458
|
if (G == "=")
|
|
12447
|
-
return
|
|
12459
|
+
return R = "equals", null;
|
|
12448
12460
|
if (G == "<") {
|
|
12449
12461
|
J.tokenize = W, J.state = ue, J.tagName = J.tagStart = null;
|
|
12450
12462
|
var A = J.tokenize(w, J);
|
|
@@ -12514,13 +12526,13 @@ function Km() {
|
|
|
12514
12526
|
function de(w, J, G) {
|
|
12515
12527
|
if (w == "word") {
|
|
12516
12528
|
var A = J.current();
|
|
12517
|
-
return G.context && G.context.tagName != A && m.implicitlyClosed.hasOwnProperty(N(G.context.tagName)) && V(G), G.context && G.context.tagName == A || m.matchClosing === !1 ? (L = "tag", De) : (L = "tag error",
|
|
12518
|
-
} else return m.allowMissingTagName && w == "endTag" ? (L = "tag bracket", De(w, J, G)) : (L = "error",
|
|
12529
|
+
return G.context && G.context.tagName != A && m.implicitlyClosed.hasOwnProperty(N(G.context.tagName)) && V(G), G.context && G.context.tagName == A || m.matchClosing === !1 ? (L = "tag", De) : (L = "tag error", Fe);
|
|
12530
|
+
} else return m.allowMissingTagName && w == "endTag" ? (L = "tag bracket", De(w, J, G)) : (L = "error", Fe);
|
|
12519
12531
|
}
|
|
12520
12532
|
function De(w, J, G) {
|
|
12521
12533
|
return w != "endTag" ? (L = "error", De) : (V(G), ue);
|
|
12522
12534
|
}
|
|
12523
|
-
function
|
|
12535
|
+
function Fe(w, J, G) {
|
|
12524
12536
|
return L = "error", De(w, J, G);
|
|
12525
12537
|
}
|
|
12526
12538
|
function ie(w, J, G) {
|
|
@@ -12555,9 +12567,9 @@ function Km() {
|
|
|
12555
12567
|
},
|
|
12556
12568
|
token: function(w, J) {
|
|
12557
12569
|
if (!J.tagName && w.sol() && (J.indented = w.indentation()), w.eatSpace()) return null;
|
|
12558
|
-
|
|
12570
|
+
R = null;
|
|
12559
12571
|
var G = J.tokenize(w, J);
|
|
12560
|
-
return (G ||
|
|
12572
|
+
return (G || R) && G != "comment" && (L = null, J.state = J.state(R || G, w, J), L && (G = L == "error" ? G + " error" : L)), G;
|
|
12561
12573
|
},
|
|
12562
12574
|
indent: function(w, J, G) {
|
|
12563
12575
|
var A = w.context;
|
|
@@ -12872,7 +12884,7 @@ function Vm() {
|
|
|
12872
12884
|
};
|
|
12873
12885
|
for (var k in m)
|
|
12874
12886
|
m.hasOwnProperty(k) && u.tokenTypeOverrides[k] && (m[k] = u.tokenTypeOverrides[k]);
|
|
12875
|
-
var S = /^([*\-_])(?:\s*\1){2,}\s*$/,
|
|
12887
|
+
var S = /^([*\-_])(?:\s*\1){2,}\s*$/, R = /^(?:[*\-+]|^[0-9]+([.)]))\s+/, L = /^\[(x| )\](?=\s)/i, W = u.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/, z = /^ {0,3}(?:\={1,}|-{2,})\s*$/, D = /^[^#!\[\]*_\\<>` "'(~:]+/, $ = /^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/, I = /^\s*\[[^\]]+?\]:.*$/, N = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/, H = " ";
|
|
12876
12888
|
function V(E, x, oe) {
|
|
12877
12889
|
return x.f = x.inline = oe, oe(E, x);
|
|
12878
12890
|
}
|
|
@@ -12911,12 +12923,12 @@ function Vm() {
|
|
|
12911
12923
|
return x.quote = 0, x.header = Ue[1].length, x.thisLine.header = !0, u.highlightFormatting && (x.formatting = "header"), x.f = x.inline, ie(x);
|
|
12912
12924
|
if (x.indentation <= _e && E.eat(">"))
|
|
12913
12925
|
return x.quote = oe ? 1 : x.quote + 1, u.highlightFormatting && (x.formatting = "quote"), E.eatSpace(), ie(x);
|
|
12914
|
-
if (!Oe && !x.setext && oe && x.indentation <= _e && (Ue = E.match(
|
|
12926
|
+
if (!Oe && !x.setext && oe && x.indentation <= _e && (Ue = E.match(R))) {
|
|
12915
12927
|
var ut = Ue[1] ? "ol" : "ul";
|
|
12916
12928
|
return x.indentation = lt + E.current().length, x.list = !0, x.quote = 0, x.listStack.push(x.indentation), x.em = !1, x.strong = !1, x.code = !1, x.strikethrough = !1, u.taskLists && E.match(L, !1) && (x.taskList = !0), x.f = x.inline, u.highlightFormatting && (x.formatting = ["list", "list-" + ut]), ie(x);
|
|
12917
12929
|
} else {
|
|
12918
12930
|
if (oe && x.indentation <= _e && (Ue = E.match($, !0)))
|
|
12919
|
-
return x.quote = 0, x.fencedEndRE = new RegExp(Ue[1] + "+ *$"), x.localMode = u.fencedCodeBlockHighlighting && y(Ue[2] || u.fencedCodeBlockDefaultMode), x.localMode && (x.localState = r.startState(x.localMode)), x.f = x.block =
|
|
12931
|
+
return x.quote = 0, x.fencedEndRE = new RegExp(Ue[1] + "+ *$"), x.localMode = u.fencedCodeBlockHighlighting && y(Ue[2] || u.fencedCodeBlockDefaultMode), x.localMode && (x.localState = r.startState(x.localMode)), x.f = x.block = Fe, u.highlightFormatting && (x.formatting = "code-block"), x.code = -1, ie(x);
|
|
12920
12932
|
if (
|
|
12921
12933
|
// if setext set, indicates line after ---/===
|
|
12922
12934
|
x.setext || // line before ---/===
|
|
@@ -12938,7 +12950,7 @@ function Vm() {
|
|
|
12938
12950
|
}
|
|
12939
12951
|
return oe;
|
|
12940
12952
|
}
|
|
12941
|
-
function
|
|
12953
|
+
function Fe(E, x) {
|
|
12942
12954
|
var oe = x.listStack[x.listStack.length - 1] || 0, Te = x.indentation < oe, Z = oe + 3;
|
|
12943
12955
|
if (x.fencedEndRE && x.indentation <= Z && (Te || E.match(x.fencedEndRE))) {
|
|
12944
12956
|
u.highlightFormatting && (x.formatting = "code-block");
|
|
@@ -13759,9 +13771,9 @@ const ev = {
|
|
|
13759
13771
|
return l != null && String(l).trim() !== "" ? !0 : ((u = (o = this.selectedSpan) == null ? void 0 : o.parsedContent) == null ? void 0 : u.outputs) !== void 0;
|
|
13760
13772
|
},
|
|
13761
13773
|
showIOTab() {
|
|
13762
|
-
var k, S,
|
|
13774
|
+
var k, S, R, L, W, z, D, $, I, N;
|
|
13763
13775
|
if (!this.selectedSpan) return !1;
|
|
13764
|
-
const l = (S = (k = this.selectedSpan) == null ? void 0 : k.parsedContent) == null ? void 0 : S.request_preview, n = (L = (
|
|
13776
|
+
const l = (S = (k = this.selectedSpan) == null ? void 0 : k.parsedContent) == null ? void 0 : S.request_preview, n = (L = (R = this.selectedSpan) == null ? void 0 : R.parsedContent) == null ? void 0 : L.response_preview, r = l != null && String(l).trim() !== "", o = n != null && String(n).trim() !== "";
|
|
13765
13777
|
if (r || o) return !0;
|
|
13766
13778
|
if (!(this.selectedSpan.type === "CLIENT" || this.selectedSpan.type === "EMBEDDING" || this.selectedSpan.type === "CHAT_MODEL")) return !1;
|
|
13767
13779
|
const f = (D = (z = (W = this.selectedSpan) == null ? void 0 : W.parsedContent) == null ? void 0 : z.attributes) == null ? void 0 : D["langsword.spanInputs"], p = (N = (I = ($ = this.selectedSpan) == null ? void 0 : $.parsedContent) == null ? void 0 : I.attributes) == null ? void 0 : N["langsword.spanOutputs"], y = f != null && f !== "", m = p != null && p !== "";
|
|
@@ -14205,7 +14217,7 @@ const ev = {
|
|
|
14205
14217
|
}
|
|
14206
14218
|
};
|
|
14207
14219
|
var tv = function() {
|
|
14208
|
-
var o, u, f, p, y, m, k, S,
|
|
14220
|
+
var o, u, f, p, y, m, k, S, R, L, W, z;
|
|
14209
14221
|
var n = this, r = n._self._c;
|
|
14210
14222
|
return r("el-drawer", { attrs: { visible: n.localVisible, "with-header": !0, title: n.drawerTitle, size: "90%", direction: "rtl", "before-close": n.handleClose }, on: { "update:visible": function(D) {
|
|
14211
14223
|
n.localVisible = D;
|
|
@@ -14250,7 +14262,7 @@ var tv = function() {
|
|
|
14250
14262
|
} } })]) : D.type === "file-pdf" ? r("div", [r("FilePdfViewer", { attrs: { element: D } })], 1) : D.type === "file-download" ? r("div", { staticClass: "file-download-content" }, [r("a", { staticClass: "file-download-link", attrs: { href: D.downloadUrl, target: "_blank", rel: "noopener noreferrer" } }, [n._v(n._s(D.filename))]), r("span", { staticClass: "file-download-hint" }, [n._v(n._s(n.$t("trace.clickToDownload")))])]) : n._e()]);
|
|
14251
14263
|
}), 0) : r("div", { staticClass: "empty-content" }, [r("el-empty", { attrs: { description: n.$t("trace.noInputs"), "image-size": 80 } })], 1)], 2)], 1)], 1) : n._e(), n.hasOutputs ? r("div", { staticClass: "io-section" }, [r("el-collapse", { model: { value: n.activeCollapse, callback: function(D) {
|
|
14252
14264
|
n.activeCollapse = D;
|
|
14253
|
-
}, expression: "activeCollapse" } }, [r("el-collapse-item", { attrs: { name: "outputs" } }, [r("template", { slot: "title" }, [r("span", { staticClass: "collapse-title-text" }, [n._v(n._s(n.$t("trace.outputs")))]), (S = n.selectedSpan.parsedContent) != null && S.response_preview || !((L = (
|
|
14265
|
+
}, expression: "activeCollapse" } }, [r("el-collapse-item", { attrs: { name: "outputs" } }, [r("template", { slot: "title" }, [r("span", { staticClass: "collapse-title-text" }, [n._v(n._s(n.$t("trace.outputs")))]), (S = n.selectedSpan.parsedContent) != null && S.response_preview || !((L = (R = n.selectedSpan.parsedContent) == null ? void 0 : R.outputs) != null && L.choices) ? r("el-tooltip", { attrs: { content: n.$t("debug.copyTooltip"), placement: "top" } }, [r("el-button", { staticClass: "copy-btn-inline", attrs: { type: "text", icon: "el-icon-document-copy", size: "mini" }, nativeOn: { click: function(D) {
|
|
14254
14266
|
var $;
|
|
14255
14267
|
D.stopPropagation(), n.copyToClipboard(($ = n.selectedSpan.parsedContent) != null && $.response_preview ? n.selectedSpan.parsedContent.response_preview : n.formatRawJson(n.selectedSpan.parsedContent.outputs));
|
|
14256
14268
|
} } })], 1) : n._e()], 1), ((W = n.selectedSpan.parsedContent) == null ? void 0 : W.outputs) !== void 0 ? r("OutputViewer", { attrs: { value: n.selectedSpan.parsedContent.outputs, "preview-markdown": (z = n.selectedSpan.parsedContent) == null ? void 0 : z.response_preview, "file-only": n.clientOutputsFileOnly, "support-file-elements": !0, "show-raw-toggle": !1, "content-key": n.selectedSpanId }, on: { copy: n.copyToClipboard } }) : r("div", { staticClass: "empty-content" }, [r("el-empty", { attrs: { description: n.$t("trace.noOutputs"), "image-size": 80 } })], 1)], 2)], 1)], 1) : n._e(), !n.hasInputs && !n.hasOutputs ? r("div", { staticClass: "empty-io" }, [r("el-empty", { attrs: { description: n.$t("trace.noIoData") } })], 1) : n._e()])]) : n._e(), r("el-tab-pane", { attrs: { label: n.$t("trace.attributes"), name: "attributes" } }, [r("el-table", { staticClass: "attributes-table", attrs: { data: n.attributesData, border: "", stripe: "" } }, [r("el-table-column", { attrs: { prop: "key", label: n.$t("trace.key"), width: "250" }, scopedSlots: n._u([{ key: "default", fn: function(D) {
|
|
@@ -14446,9 +14458,9 @@ const iv = rv.exports, av = {
|
|
|
14446
14458
|
const p = this.spans[0].type === "CLIENT" || this.spans[0].type === "EMBEDDING" || this.spans[0].type === "CHAT_MODEL", y = this.selectedSpan.has_events === !0, m = [];
|
|
14447
14459
|
p && m.push("io", "raw"), m.push("attributes"), y && m.push("events");
|
|
14448
14460
|
let k = "attributes";
|
|
14449
|
-
p && (k = "io"), m.includes(k) ? this.activeTab = k : this.activeTab = "attributes", (r = (n = this.selectedSpan.parsedContent) == null ? void 0 : n.inputs) != null && r.messages ? this.messageCollapse = this.selectedSpan.parsedContent.inputs.messages.map((
|
|
14461
|
+
p && (k = "io"), m.includes(k) ? this.activeTab = k : this.activeTab = "attributes", (r = (n = this.selectedSpan.parsedContent) == null ? void 0 : n.inputs) != null && r.messages ? this.messageCollapse = this.selectedSpan.parsedContent.inputs.messages.map((R, L) => `message-${L}`) : this.messageCollapse = [];
|
|
14450
14462
|
const S = (o = this.selectedSpan.parsedContent) == null ? void 0 : o.events;
|
|
14451
|
-
S && Array.isArray(S) && S.length > 0 ? this.eventsCollapse = S.map((
|
|
14463
|
+
S && Array.isArray(S) && S.length > 0 ? this.eventsCollapse = S.map((R, L) => `event-${L}`) : this.eventsCollapse = [];
|
|
14452
14464
|
}
|
|
14453
14465
|
} catch (u) {
|
|
14454
14466
|
console.error("Failed to load trace spans:", u), this.$message.error("加载 span 列表失败"), this.spans = [], this.filteredSpans = [], this.spanHasNextPage = !1;
|
|
@@ -15220,13 +15232,13 @@ This operation cannot be undone. Are you sure you want to continue?`,
|
|
|
15220
15232
|
"zh-CN": cv,
|
|
15221
15233
|
"en-US": fv
|
|
15222
15234
|
};
|
|
15223
|
-
let
|
|
15235
|
+
let Rs = !1;
|
|
15224
15236
|
const nc = (l) => {
|
|
15225
|
-
!l ||
|
|
15237
|
+
!l || Rs || (l.mergeLocaleMessage ? (Object.keys(_i).forEach((n) => {
|
|
15226
15238
|
l.mergeLocaleMessage(n, _i[n]);
|
|
15227
|
-
}),
|
|
15239
|
+
}), Rs = !0) : l.messages && (Object.keys(_i).forEach((n) => {
|
|
15228
15240
|
l.messages[n] || (l.messages[n] = {}), Object.assign(l.messages[n], _i[n]);
|
|
15229
|
-
}),
|
|
15241
|
+
}), Rs = !0));
|
|
15230
15242
|
}, mv = {
|
|
15231
15243
|
store: Zd,
|
|
15232
15244
|
router: uv,
|