@dcodegroup-au/dsg-vue 0.1.12 → 0.1.13

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.
@@ -30,9 +30,9 @@ var _t = { exports: {} };
30
30
  */
31
31
  var Ui = _t.exports, Kn;
32
32
  function Vi() {
33
- return Kn || (Kn = 1, (function(Ce, Xt) {
33
+ return Kn || (Kn = 1, (function(we, Xt) {
34
34
  (function(nt, Y) {
35
- Ce.exports = Y();
35
+ we.exports = Y();
36
36
  })(Ui, function() {
37
37
  return (
38
38
  /******/
@@ -44,7 +44,7 @@ function Vi() {
44
44
  ((Z) => {
45
45
  var E = function() {
46
46
  this.Diff_Timeout = 1, this.Diff_EditCost = 4, this.Match_Threshold = 0.5, this.Match_Distance = 1e3, this.Patch_DeleteThreshold = 0.5, this.Patch_Margin = 4, this.Match_MaxBits = 32;
47
- }, L = -1, x = 1, A = 0;
47
+ }, M = -1, D = 1, A = 0;
48
48
  E.Diff = function(c, l) {
49
49
  return [c, l];
50
50
  }, E.prototype.diff_main = function(c, l, y, p) {
@@ -64,18 +64,18 @@ function Vi() {
64
64
  }, E.prototype.diff_compute_ = function(c, l, y, p) {
65
65
  var m;
66
66
  if (!c)
67
- return [new E.Diff(x, l)];
67
+ return [new E.Diff(D, l)];
68
68
  if (!l)
69
- return [new E.Diff(L, c)];
69
+ return [new E.Diff(M, c)];
70
70
  var d = c.length > l.length ? c : l, v = c.length > l.length ? l : c, w = d.indexOf(v);
71
71
  if (w != -1)
72
- return m = [new E.Diff(x, d.substring(0, w)), new E.Diff(A, v), new E.Diff(x, d.substring(w + v.length))], c.length > l.length && (m[0][0] = m[2][0] = L), m;
72
+ return m = [new E.Diff(D, d.substring(0, w)), new E.Diff(A, v), new E.Diff(D, d.substring(w + v.length))], c.length > l.length && (m[0][0] = m[2][0] = M), m;
73
73
  if (v.length == 1)
74
- return [new E.Diff(L, c), new E.Diff(x, l)];
74
+ return [new E.Diff(M, c), new E.Diff(D, l)];
75
75
  var b = this.diff_halfMatch_(c, l);
76
76
  if (b) {
77
- var g = b[0], s = b[1], C = b[2], _ = b[3], D = b[4], M = this.diff_main(g, C, y, p), P = this.diff_main(s, _, y, p);
78
- return M.concat([new E.Diff(A, D)], P);
77
+ var g = b[0], s = b[1], C = b[2], _ = b[3], x = b[4], L = this.diff_main(g, C, y, p), P = this.diff_main(s, _, y, p);
78
+ return L.concat([new E.Diff(A, x)], P);
79
79
  }
80
80
  return y && c.length > 100 && l.length > 100 ? this.diff_lineMode_(c, l, p) : this.diff_bisect_(c, l, p);
81
81
  }, E.prototype.diff_lineMode_ = function(c, l, y) {
@@ -85,10 +85,10 @@ function Vi() {
85
85
  this.diff_charsToLines_(d, m), this.diff_cleanupSemantic(d), d.push(new E.Diff(A, ""));
86
86
  for (var v = 0, w = 0, b = 0, g = "", s = ""; v < d.length; ) {
87
87
  switch (d[v][0]) {
88
- case x:
88
+ case D:
89
89
  b++, s += d[v][1];
90
90
  break;
91
- case L:
91
+ case M:
92
92
  w++, g += d[v][1];
93
93
  break;
94
94
  case A:
@@ -108,16 +108,16 @@ function Vi() {
108
108
  for (var p = c.length, m = l.length, d = Math.ceil((p + m) / 2), v = d, w = 2 * d, b = new Array(w), g = new Array(w), s = 0; s < w; s++)
109
109
  b[s] = -1, g[s] = -1;
110
110
  b[v + 1] = 0, g[v + 1] = 0;
111
- for (var C = p - m, _ = C % 2 != 0, D = 0, M = 0, P = 0, F = 0, z = 0; z < d && !((/* @__PURE__ */ new Date()).getTime() > y); z++) {
112
- for (var Q = -z + D; Q <= z - M; Q += 2) {
111
+ for (var C = p - m, _ = C % 2 != 0, x = 0, L = 0, P = 0, F = 0, z = 0; z < d && !((/* @__PURE__ */ new Date()).getTime() > y); z++) {
112
+ for (var Q = -z + x; Q <= z - L; Q += 2) {
113
113
  var ne = v + Q, oe;
114
114
  Q == -z || Q != z && b[ne - 1] < b[ne + 1] ? oe = b[ne + 1] : oe = b[ne - 1] + 1;
115
115
  for (var me = oe - Q; oe < p && me < m && c.charAt(oe) == l.charAt(me); )
116
116
  oe++, me++;
117
117
  if (b[ne] = oe, oe > p)
118
- M += 2;
118
+ L += 2;
119
119
  else if (me > m)
120
- D += 2;
120
+ x += 2;
121
121
  else if (_) {
122
122
  var fe = v + C - Q;
123
123
  if (fe >= 0 && fe < w && g[fe] != -1) {
@@ -127,17 +127,17 @@ function Vi() {
127
127
  }
128
128
  }
129
129
  }
130
- for (var we = -z + P; we <= z - F; we += 2) {
131
- var fe = v + we, le;
132
- we == -z || we != z && g[fe - 1] < g[fe + 1] ? le = g[fe + 1] : le = g[fe - 1] + 1;
133
- for (var Te = le - we; le < p && Te < m && c.charAt(p - le - 1) == l.charAt(m - Te - 1); )
130
+ for (var ve = -z + P; ve <= z - F; ve += 2) {
131
+ var fe = v + ve, le;
132
+ ve == -z || ve != z && g[fe - 1] < g[fe + 1] ? le = g[fe + 1] : le = g[fe - 1] + 1;
133
+ for (var Te = le - ve; le < p && Te < m && c.charAt(p - le - 1) == l.charAt(m - Te - 1); )
134
134
  le++, Te++;
135
135
  if (g[fe] = le, le > p)
136
136
  F += 2;
137
137
  else if (Te > m)
138
138
  P += 2;
139
139
  else if (!_) {
140
- var ne = v + C - we;
140
+ var ne = v + C - ve;
141
141
  if (ne >= 0 && ne < w && b[ne] != -1) {
142
142
  var oe = b[ne], me = v + oe - ne;
143
143
  if (le = p - le, oe >= le)
@@ -146,7 +146,7 @@ function Vi() {
146
146
  }
147
147
  }
148
148
  }
149
- return [new E.Diff(L, c), new E.Diff(x, l)];
149
+ return [new E.Diff(M, c), new E.Diff(D, l)];
150
150
  }, E.prototype.diff_bisectSplit_ = function(c, l, y, p, m) {
151
151
  var d = c.substring(0, y), v = l.substring(0, p), w = c.substring(y), b = l.substring(p), g = this.diff_main(d, v, !1, m), s = this.diff_main(w, b, !1, m);
152
152
  return g.concat(s);
@@ -157,8 +157,8 @@ function Vi() {
157
157
  for (var g = "", s = 0, C = -1, _ = y.length; C < b.length - 1; ) {
158
158
  C = b.indexOf(`
159
159
  `, s), C == -1 && (C = b.length - 1);
160
- var D = b.substring(s, C + 1);
161
- (p.hasOwnProperty ? p.hasOwnProperty(D) : p[D] !== void 0) ? g += String.fromCharCode(p[D]) : (_ == d && (D = b.substring(s), C = b.length), g += String.fromCharCode(_), p[D] = _, y[_++] = D), s = C + 1;
160
+ var x = b.substring(s, C + 1);
161
+ (p.hasOwnProperty ? p.hasOwnProperty(x) : p[x] !== void 0) ? g += String.fromCharCode(p[x]) : (_ == d && (x = b.substring(s), C = b.length), g += String.fromCharCode(_), p[x] = _, y[_++] = x), s = C + 1;
162
162
  }
163
163
  return g;
164
164
  }
@@ -209,12 +209,12 @@ function Vi() {
209
209
  if (y.length < 4 || p.length * 2 < y.length)
210
210
  return null;
211
211
  var m = this;
212
- function d(M, P, F) {
213
- for (var z = M.substring(F, F + Math.floor(M.length / 4)), Q = -1, ne = "", oe, me, fe, le; (Q = P.indexOf(z, Q + 1)) != -1; ) {
214
- var we = m.diff_commonPrefix(M.substring(F), P.substring(Q)), Te = m.diff_commonSuffix(M.substring(0, F), P.substring(0, Q));
215
- ne.length < Te + we && (ne = P.substring(Q - Te, Q) + P.substring(Q, Q + we), oe = M.substring(0, F - Te), me = M.substring(F + we), fe = P.substring(0, Q - Te), le = P.substring(Q + we));
212
+ function d(L, P, F) {
213
+ for (var z = L.substring(F, F + Math.floor(L.length / 4)), Q = -1, ne = "", oe, me, fe, le; (Q = P.indexOf(z, Q + 1)) != -1; ) {
214
+ var ve = m.diff_commonPrefix(L.substring(F), P.substring(Q)), Te = m.diff_commonSuffix(L.substring(0, F), P.substring(0, Q));
215
+ ne.length < Te + ve && (ne = P.substring(Q - Te, Q) + P.substring(Q, Q + ve), oe = L.substring(0, F - Te), me = L.substring(F + ve), fe = P.substring(0, Q - Te), le = P.substring(Q + ve));
216
216
  }
217
- return ne.length * 2 >= M.length ? [oe, me, fe, le, ne] : null;
217
+ return ne.length * 2 >= L.length ? [oe, me, fe, le, ne] : null;
218
218
  }
219
219
  var v = d(y, p, Math.ceil(y.length / 4)), w = d(y, p, Math.ceil(y.length / 2)), b;
220
220
  if (!v && !w)
@@ -222,24 +222,24 @@ function Vi() {
222
222
  w ? v ? b = v[4].length > w[4].length ? v : w : b = w : b = v;
223
223
  var g, s, C, _;
224
224
  c.length > l.length ? (g = b[0], s = b[1], C = b[2], _ = b[3]) : (C = b[0], _ = b[1], g = b[2], s = b[3]);
225
- var D = b[4];
226
- return [g, s, C, _, D];
225
+ var x = b[4];
226
+ return [g, s, C, _, x];
227
227
  }, E.prototype.diff_cleanupSemantic = function(c) {
228
228
  for (var l = !1, y = [], p = 0, m = null, d = 0, v = 0, w = 0, b = 0, g = 0; d < c.length; )
229
- c[d][0] == A ? (y[p++] = d, v = b, w = g, b = 0, g = 0, m = c[d][1]) : (c[d][0] == x ? b += c[d][1].length : g += c[d][1].length, m && m.length <= Math.max(v, w) && m.length <= Math.max(b, g) && (c.splice(y[p - 1], 0, new E.Diff(L, m)), c[y[p - 1] + 1][0] = x, p--, p--, d = p > 0 ? y[p - 1] : -1, v = 0, w = 0, b = 0, g = 0, m = null, l = !0)), d++;
229
+ c[d][0] == A ? (y[p++] = d, v = b, w = g, b = 0, g = 0, m = c[d][1]) : (c[d][0] == D ? b += c[d][1].length : g += c[d][1].length, m && m.length <= Math.max(v, w) && m.length <= Math.max(b, g) && (c.splice(y[p - 1], 0, new E.Diff(M, m)), c[y[p - 1] + 1][0] = D, p--, p--, d = p > 0 ? y[p - 1] : -1, v = 0, w = 0, b = 0, g = 0, m = null, l = !0)), d++;
230
230
  for (l && this.diff_cleanupMerge(c), this.diff_cleanupSemanticLossless(c), d = 1; d < c.length; ) {
231
- if (c[d - 1][0] == L && c[d][0] == x) {
232
- var s = c[d - 1][1], C = c[d][1], _ = this.diff_commonOverlap_(s, C), D = this.diff_commonOverlap_(C, s);
233
- _ >= D ? (_ >= s.length / 2 || _ >= C.length / 2) && (c.splice(d, 0, new E.Diff(A, C.substring(0, _))), c[d - 1][1] = s.substring(0, s.length - _), c[d + 1][1] = C.substring(_), d++) : (D >= s.length / 2 || D >= C.length / 2) && (c.splice(d, 0, new E.Diff(A, s.substring(0, D))), c[d - 1][0] = x, c[d - 1][1] = C.substring(0, C.length - D), c[d + 1][0] = L, c[d + 1][1] = s.substring(D), d++), d++;
231
+ if (c[d - 1][0] == M && c[d][0] == D) {
232
+ var s = c[d - 1][1], C = c[d][1], _ = this.diff_commonOverlap_(s, C), x = this.diff_commonOverlap_(C, s);
233
+ _ >= x ? (_ >= s.length / 2 || _ >= C.length / 2) && (c.splice(d, 0, new E.Diff(A, C.substring(0, _))), c[d - 1][1] = s.substring(0, s.length - _), c[d + 1][1] = C.substring(_), d++) : (x >= s.length / 2 || x >= C.length / 2) && (c.splice(d, 0, new E.Diff(A, s.substring(0, x))), c[d - 1][0] = D, c[d - 1][1] = C.substring(0, C.length - x), c[d + 1][0] = M, c[d + 1][1] = s.substring(x), d++), d++;
234
234
  }
235
235
  d++;
236
236
  }
237
237
  }, E.prototype.diff_cleanupSemanticLossless = function(c) {
238
- function l(D, M) {
239
- if (!D || !M)
238
+ function l(x, L) {
239
+ if (!x || !L)
240
240
  return 6;
241
- var P = D.charAt(D.length - 1), F = M.charAt(0), z = P.match(E.nonAlphaNumericRegex_), Q = F.match(E.nonAlphaNumericRegex_), ne = z && P.match(E.whitespaceRegex_), oe = Q && F.match(E.whitespaceRegex_), me = ne && P.match(E.linebreakRegex_), fe = oe && F.match(E.linebreakRegex_), le = me && D.match(E.blanklineEndRegex_), we = fe && M.match(E.blanklineStartRegex_);
242
- return le || we ? 5 : me || fe ? 4 : z && !ne && oe ? 3 : ne || oe ? 2 : z || Q ? 1 : 0;
241
+ var P = x.charAt(x.length - 1), F = L.charAt(0), z = P.match(E.nonAlphaNumericRegex_), Q = F.match(E.nonAlphaNumericRegex_), ne = z && P.match(E.whitespaceRegex_), oe = Q && F.match(E.whitespaceRegex_), me = ne && P.match(E.linebreakRegex_), fe = oe && F.match(E.linebreakRegex_), le = me && x.match(E.blanklineEndRegex_), ve = fe && L.match(E.blanklineStartRegex_);
242
+ return le || ve ? 5 : me || fe ? 4 : z && !ne && oe ? 3 : ne || oe ? 2 : z || Q ? 1 : 0;
243
243
  }
244
244
  for (var y = 1; y < c.length - 1; ) {
245
245
  if (c[y - 1][0] == A && c[y + 1][0] == A) {
@@ -259,20 +259,20 @@ function Vi() {
259
259
  }
260
260
  }, E.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/, E.whitespaceRegex_ = /\s/, E.linebreakRegex_ = /[\r\n]/, E.blanklineEndRegex_ = /\n\r?\n$/, E.blanklineStartRegex_ = /^\r?\n\r?\n/, E.prototype.diff_cleanupEfficiency = function(c) {
261
261
  for (var l = !1, y = [], p = 0, m = null, d = 0, v = !1, w = !1, b = !1, g = !1; d < c.length; )
262
- c[d][0] == A ? (c[d][1].length < this.Diff_EditCost && (b || g) ? (y[p++] = d, v = b, w = g, m = c[d][1]) : (p = 0, m = null), b = g = !1) : (c[d][0] == L ? g = !0 : b = !0, m && (v && w && b && g || m.length < this.Diff_EditCost / 2 && v + w + b + g == 3) && (c.splice(y[p - 1], 0, new E.Diff(L, m)), c[y[p - 1] + 1][0] = x, p--, m = null, v && w ? (b = g = !0, p = 0) : (p--, d = p > 0 ? y[p - 1] : -1, b = g = !1), l = !0)), d++;
262
+ c[d][0] == A ? (c[d][1].length < this.Diff_EditCost && (b || g) ? (y[p++] = d, v = b, w = g, m = c[d][1]) : (p = 0, m = null), b = g = !1) : (c[d][0] == M ? g = !0 : b = !0, m && (v && w && b && g || m.length < this.Diff_EditCost / 2 && v + w + b + g == 3) && (c.splice(y[p - 1], 0, new E.Diff(M, m)), c[y[p - 1] + 1][0] = D, p--, m = null, v && w ? (b = g = !0, p = 0) : (p--, d = p > 0 ? y[p - 1] : -1, b = g = !1), l = !0)), d++;
263
263
  l && this.diff_cleanupMerge(c);
264
264
  }, E.prototype.diff_cleanupMerge = function(c) {
265
265
  c.push(new E.Diff(A, ""));
266
266
  for (var l = 0, y = 0, p = 0, m = "", d = "", v; l < c.length; )
267
267
  switch (c[l][0]) {
268
- case x:
268
+ case D:
269
269
  p++, d += c[l][1], l++;
270
270
  break;
271
- case L:
271
+ case M:
272
272
  y++, m += c[l][1], l++;
273
273
  break;
274
274
  case A:
275
- y + p > 1 ? (y !== 0 && p !== 0 && (v = this.diff_commonPrefix(d, m), v !== 0 && (l - y - p > 0 && c[l - y - p - 1][0] == A ? c[l - y - p - 1][1] += d.substring(0, v) : (c.splice(0, 0, new E.Diff(A, d.substring(0, v))), l++), d = d.substring(v), m = m.substring(v)), v = this.diff_commonSuffix(d, m), v !== 0 && (c[l][1] = d.substring(d.length - v) + c[l][1], d = d.substring(0, d.length - v), m = m.substring(0, m.length - v))), l -= y + p, c.splice(l, y + p), m.length && (c.splice(l, 0, new E.Diff(L, m)), l++), d.length && (c.splice(l, 0, new E.Diff(x, d)), l++), l++) : l !== 0 && c[l - 1][0] == A ? (c[l - 1][1] += c[l][1], c.splice(l, 1)) : l++, p = 0, y = 0, m = "", d = "";
275
+ y + p > 1 ? (y !== 0 && p !== 0 && (v = this.diff_commonPrefix(d, m), v !== 0 && (l - y - p > 0 && c[l - y - p - 1][0] == A ? c[l - y - p - 1][1] += d.substring(0, v) : (c.splice(0, 0, new E.Diff(A, d.substring(0, v))), l++), d = d.substring(v), m = m.substring(v)), v = this.diff_commonSuffix(d, m), v !== 0 && (c[l][1] = d.substring(d.length - v) + c[l][1], d = d.substring(0, d.length - v), m = m.substring(0, m.length - v))), l -= y + p, c.splice(l, y + p), m.length && (c.splice(l, 0, new E.Diff(M, m)), l++), d.length && (c.splice(l, 0, new E.Diff(D, d)), l++), l++) : l !== 0 && c[l - 1][0] == A ? (c[l - 1][1] += c[l][1], c.splice(l, 1)) : l++, p = 0, y = 0, m = "", d = "";
276
276
  break;
277
277
  }
278
278
  c[c.length - 1][1] === "" && c.pop();
@@ -282,17 +282,17 @@ function Vi() {
282
282
  w && this.diff_cleanupMerge(c);
283
283
  }, E.prototype.diff_xIndex = function(c, l) {
284
284
  var y = 0, p = 0, m = 0, d = 0, v;
285
- for (v = 0; v < c.length && (c[v][0] !== x && (y += c[v][1].length), c[v][0] !== L && (p += c[v][1].length), !(y > l)); v++)
285
+ for (v = 0; v < c.length && (c[v][0] !== D && (y += c[v][1].length), c[v][0] !== M && (p += c[v][1].length), !(y > l)); v++)
286
286
  m = y, d = p;
287
- return c.length != v && c[v][0] === L ? d : d + (l - m);
287
+ return c.length != v && c[v][0] === M ? d : d + (l - m);
288
288
  }, E.prototype.diff_prettyHtml = function(c) {
289
289
  for (var l = [], y = /&/g, p = /</g, m = />/g, d = /\n/g, v = 0; v < c.length; v++) {
290
290
  var w = c[v][0], b = c[v][1], g = b.replace(y, "&amp;").replace(p, "&lt;").replace(m, "&gt;").replace(d, "&para;<br>");
291
291
  switch (w) {
292
- case x:
292
+ case D:
293
293
  l[v] = '<ins style="background:#e6ffe6;">' + g + "</ins>";
294
294
  break;
295
- case L:
295
+ case M:
296
296
  l[v] = '<del style="background:#ffe6e6;">' + g + "</del>";
297
297
  break;
298
298
  case A:
@@ -303,20 +303,20 @@ function Vi() {
303
303
  return l.join("");
304
304
  }, E.prototype.diff_text1 = function(c) {
305
305
  for (var l = [], y = 0; y < c.length; y++)
306
- c[y][0] !== x && (l[y] = c[y][1]);
306
+ c[y][0] !== D && (l[y] = c[y][1]);
307
307
  return l.join("");
308
308
  }, E.prototype.diff_text2 = function(c) {
309
309
  for (var l = [], y = 0; y < c.length; y++)
310
- c[y][0] !== L && (l[y] = c[y][1]);
310
+ c[y][0] !== M && (l[y] = c[y][1]);
311
311
  return l.join("");
312
312
  }, E.prototype.diff_levenshtein = function(c) {
313
313
  for (var l = 0, y = 0, p = 0, m = 0; m < c.length; m++) {
314
314
  var d = c[m][0], v = c[m][1];
315
315
  switch (d) {
316
- case x:
316
+ case D:
317
317
  y += v.length;
318
318
  break;
319
- case L:
319
+ case M:
320
320
  p += v.length;
321
321
  break;
322
322
  case A:
@@ -328,10 +328,10 @@ function Vi() {
328
328
  }, E.prototype.diff_toDelta = function(c) {
329
329
  for (var l = [], y = 0; y < c.length; y++)
330
330
  switch (c[y][0]) {
331
- case x:
331
+ case D:
332
332
  l[y] = "+" + encodeURI(c[y][1]);
333
333
  break;
334
- case L:
334
+ case M:
335
335
  l[y] = "-" + c[y][1].length;
336
336
  break;
337
337
  case A:
@@ -345,7 +345,7 @@ function Vi() {
345
345
  switch (d[v].charAt(0)) {
346
346
  case "+":
347
347
  try {
348
- y[p++] = new E.Diff(x, decodeURI(w));
348
+ y[p++] = new E.Diff(D, decodeURI(w));
349
349
  } catch {
350
350
  throw new Error("Illegal escape in diff_fromDelta: " + w);
351
351
  }
@@ -357,7 +357,7 @@ function Vi() {
357
357
  if (isNaN(b) || b < 0)
358
358
  throw new Error("Invalid number in diff_fromDelta: " + w);
359
359
  var g = c.substring(m, m += b);
360
- d[v].charAt(0) == "=" ? y[p++] = new E.Diff(A, g) : y[p++] = new E.Diff(L, g);
360
+ d[v].charAt(0) == "=" ? y[p++] = new E.Diff(A, g) : y[p++] = new E.Diff(M, g);
361
361
  break;
362
362
  default:
363
363
  if (d[v])
@@ -383,24 +383,24 @@ function Vi() {
383
383
  w != -1 && (v = Math.min(d(0, w), v), w = c.lastIndexOf(l, y + l.length), w != -1 && (v = Math.min(d(0, w), v)));
384
384
  var b = 1 << l.length - 1;
385
385
  w = -1;
386
- for (var g, s, C = l.length + c.length, _, D = 0; D < l.length; D++) {
386
+ for (var g, s, C = l.length + c.length, _, x = 0; x < l.length; x++) {
387
387
  for (g = 0, s = C; g < s; )
388
- d(D, y + s) <= v ? g = s : C = s, s = Math.floor((C - g) / 2 + g);
388
+ d(x, y + s) <= v ? g = s : C = s, s = Math.floor((C - g) / 2 + g);
389
389
  C = s;
390
- var M = Math.max(1, y - s + 1), P = Math.min(y + s, c.length) + l.length, F = Array(P + 2);
391
- F[P + 1] = (1 << D) - 1;
392
- for (var z = P; z >= M; z--) {
390
+ var L = Math.max(1, y - s + 1), P = Math.min(y + s, c.length) + l.length, F = Array(P + 2);
391
+ F[P + 1] = (1 << x) - 1;
392
+ for (var z = P; z >= L; z--) {
393
393
  var Q = p[c.charAt(z - 1)];
394
- if (D === 0 ? F[z] = (F[z + 1] << 1 | 1) & Q : F[z] = (F[z + 1] << 1 | 1) & Q | ((_[z + 1] | _[z]) << 1 | 1) | _[z + 1], F[z] & b) {
395
- var ne = d(D, z - 1);
394
+ if (x === 0 ? F[z] = (F[z + 1] << 1 | 1) & Q : F[z] = (F[z + 1] << 1 | 1) & Q | ((_[z + 1] | _[z]) << 1 | 1) | _[z + 1], F[z] & b) {
395
+ var ne = d(x, z - 1);
396
396
  if (ne <= v)
397
397
  if (v = ne, w = z - 1, w > y)
398
- M = Math.max(1, 2 * y - w);
398
+ L = Math.max(1, 2 * y - w);
399
399
  else
400
400
  break;
401
401
  }
402
402
  }
403
- if (d(D + 1, y) > v)
403
+ if (d(x + 1, y) > v)
404
404
  break;
405
405
  _ = F;
406
406
  }
@@ -449,19 +449,19 @@ function Vi() {
449
449
  if (m.length === 0)
450
450
  return [];
451
451
  for (var d = [], v = new E.patch_obj(), w = 0, b = 0, g = 0, s = p, C = p, _ = 0; _ < m.length; _++) {
452
- var D = m[_][0], M = m[_][1];
453
- switch (!w && D !== A && (v.start1 = b, v.start2 = g), D) {
454
- case x:
455
- v.diffs[w++] = m[_], v.length2 += M.length, C = C.substring(0, g) + M + C.substring(g);
452
+ var x = m[_][0], L = m[_][1];
453
+ switch (!w && x !== A && (v.start1 = b, v.start2 = g), x) {
454
+ case D:
455
+ v.diffs[w++] = m[_], v.length2 += L.length, C = C.substring(0, g) + L + C.substring(g);
456
456
  break;
457
- case L:
458
- v.length1 += M.length, v.diffs[w++] = m[_], C = C.substring(0, g) + C.substring(g + M.length);
457
+ case M:
458
+ v.length1 += L.length, v.diffs[w++] = m[_], C = C.substring(0, g) + C.substring(g + L.length);
459
459
  break;
460
460
  case A:
461
- M.length <= 2 * this.Patch_Margin && w && m.length != _ + 1 ? (v.diffs[w++] = m[_], v.length1 += M.length, v.length2 += M.length) : M.length >= 2 * this.Patch_Margin && w && (this.patch_addContext_(v, s), d.push(v), v = new E.patch_obj(), w = 0, s = C, b = g);
461
+ L.length <= 2 * this.Patch_Margin && w && m.length != _ + 1 ? (v.diffs[w++] = m[_], v.length1 += L.length, v.length2 += L.length) : L.length >= 2 * this.Patch_Margin && w && (this.patch_addContext_(v, s), d.push(v), v = new E.patch_obj(), w = 0, s = C, b = g);
462
462
  break;
463
463
  }
464
- D !== x && (b += M.length), D !== L && (g += M.length);
464
+ x !== D && (b += L.length), x !== M && (g += L.length);
465
465
  }
466
466
  return w && (this.patch_addContext_(v, s), d.push(v)), d;
467
467
  }, E.prototype.patch_deepCopy = function(c) {
@@ -494,9 +494,9 @@ function Vi() {
494
494
  m[d] = !1;
495
495
  else {
496
496
  this.diff_cleanupSemanticLossless(C);
497
- for (var _ = 0, D, M = 0; M < c[d].diffs.length; M++) {
498
- var P = c[d].diffs[M];
499
- P[0] !== A && (D = this.diff_xIndex(C, _)), P[0] === x ? l = l.substring(0, b + D) + P[1] + l.substring(b + D) : P[0] === L && (l = l.substring(0, b + D) + l.substring(b + this.diff_xIndex(C, _ + P[1].length))), P[0] !== L && (_ += P[1].length);
497
+ for (var _ = 0, x, L = 0; L < c[d].diffs.length; L++) {
498
+ var P = c[d].diffs[L];
499
+ P[0] !== A && (x = this.diff_xIndex(C, _)), P[0] === D ? l = l.substring(0, b + x) + P[1] + l.substring(b + x) : P[0] === M && (l = l.substring(0, b + x) + l.substring(b + this.diff_xIndex(C, _ + P[1].length))), P[0] !== M && (_ += P[1].length);
500
500
  }
501
501
  }
502
502
  }
@@ -531,7 +531,7 @@ function Vi() {
531
531
  var w = new E.patch_obj(), b = !0;
532
532
  for (w.start1 = m - v.length, w.start2 = d - v.length, v !== "" && (w.length1 = w.length2 = v.length, w.diffs.push(new E.Diff(A, v))); p.diffs.length !== 0 && w.length1 < l - this.Patch_Margin; ) {
533
533
  var g = p.diffs[0][0], s = p.diffs[0][1];
534
- g === x ? (w.length2 += s.length, d += s.length, w.diffs.push(p.diffs.shift()), b = !1) : g === L && w.diffs.length == 1 && w.diffs[0][0] == A && s.length > 2 * l ? (w.length1 += s.length, m += s.length, b = !1, w.diffs.push(new E.Diff(g, s)), p.diffs.shift()) : (s = s.substring(0, l - w.length1 - this.Patch_Margin), w.length1 += s.length, m += s.length, g === A ? (w.length2 += s.length, d += s.length) : b = !1, w.diffs.push(new E.Diff(g, s)), s == p.diffs[0][1] ? p.diffs.shift() : p.diffs[0][1] = p.diffs[0][1].substring(s.length));
534
+ g === D ? (w.length2 += s.length, d += s.length, w.diffs.push(p.diffs.shift()), b = !1) : g === M && w.diffs.length == 1 && w.diffs[0][0] == A && s.length > 2 * l ? (w.length1 += s.length, m += s.length, b = !1, w.diffs.push(new E.Diff(g, s)), p.diffs.shift()) : (s = s.substring(0, l - w.length1 - this.Patch_Margin), w.length1 += s.length, m += s.length, g === A ? (w.length2 += s.length, d += s.length) : b = !1, w.diffs.push(new E.Diff(g, s)), s == p.diffs[0][1] ? p.diffs.shift() : p.diffs[0][1] = p.diffs[0][1].substring(s.length));
535
535
  }
536
536
  v = this.diff_text2(w.diffs), v = v.substring(v.length - this.Patch_Margin);
537
537
  var C = this.diff_text1(p.diffs).substring(0, this.Patch_Margin);
@@ -560,9 +560,9 @@ function Vi() {
560
560
  throw new Error("Illegal escape in patch_fromText: " + b);
561
561
  }
562
562
  if (w == "-")
563
- v.diffs.push(new E.Diff(L, b));
563
+ v.diffs.push(new E.Diff(M, b));
564
564
  else if (w == "+")
565
- v.diffs.push(new E.Diff(x, b));
565
+ v.diffs.push(new E.Diff(D, b));
566
566
  else if (w == " ")
567
567
  v.diffs.push(new E.Diff(A, b));
568
568
  else {
@@ -582,10 +582,10 @@ function Vi() {
582
582
  for (var y = ["@@ -" + c + " +" + l + ` @@
583
583
  `], p, m = 0; m < this.diffs.length; m++) {
584
584
  switch (this.diffs[m][0]) {
585
- case x:
585
+ case D:
586
586
  p = "+";
587
587
  break;
588
- case L:
588
+ case M:
589
589
  p = "-";
590
590
  break;
591
591
  case A:
@@ -596,20 +596,20 @@ function Vi() {
596
596
  `;
597
597
  }
598
598
  return y.join("").replace(/%20/g, " ");
599
- }, Z.exports = E, Z.exports.diff_match_patch = E, Z.exports.DIFF_DELETE = L, Z.exports.DIFF_INSERT = x, Z.exports.DIFF_EQUAL = A;
599
+ }, Z.exports = E, Z.exports.diff_match_patch = E, Z.exports.DIFF_DELETE = M, Z.exports.DIFF_INSERT = D, Z.exports.DIFF_EQUAL = A;
600
600
  })
601
601
  ),
602
602
  /***/
603
603
  408: (
604
604
  /***/
605
- ((Z, E, L) => {
606
- L.d(E, {
605
+ ((Z, E, M) => {
606
+ M.d(E, {
607
607
  default: () => (
608
608
  /* binding */
609
609
  Fe
610
610
  )
611
611
  });
612
- var x = L(135), A = L(840), c = L(775), l = L(428), y = L(325), p = L(483), m = L(999), d = function(I) {
612
+ var D = M(135), A = M(840), c = M(775), l = M(428), y = M(325), p = M(483), m = M(999), d = function(I) {
613
613
  I === void 0 && (I = document);
614
614
  var re = function(W) {
615
615
  var j = document.createElement("img");
@@ -630,7 +630,7 @@ function Vi() {
630
630
  }), I.querySelectorAll("img").forEach(function(W) {
631
631
  window.vditorImageIntersectionObserver.observe(W);
632
632
  }));
633
- }, v = L(472), w = L(280), b = L(637), g = L(825), s = L(11), C = L(194), _ = L(436), D = L(229), M = L(145), P = L(538), F = L(413), z = L(106), Q = L(673), ne = function(I) {
633
+ }, v = M(472), w = M(280), b = M(637), g = M(825), s = M(11), C = M(194), _ = M(436), x = M(229), L = M(145), P = M(538), F = M(413), z = M(106), Q = M(673), ne = function(I) {
634
634
  document.querySelectorAll(".vditor-anchor").forEach(function(re) {
635
635
  I === 1 && re.classList.add("vditor-anchor--left"), re.onclick = function() {
636
636
  var W = re.getAttribute("href").substr(1), j = document.getElementById("vditorAnchor-" + W).offsetTop;
@@ -640,11 +640,11 @@ function Vi() {
640
640
  var re = document.getElementById("vditorAnchor-" + decodeURIComponent(window.location.hash.substr(1)));
641
641
  re && (document.querySelector("html").scrollTop = re.offsetTop);
642
642
  };
643
- }, oe = L(214), me = L(810), fe = function(I, re) {
643
+ }, oe = M(214), me = M(810), fe = function(I, re) {
644
644
  if (re === void 0 && (re = "zh_CN"), !(typeof speechSynthesis > "u" || typeof SpeechSynthesisUtterance > "u")) {
645
645
  var W = function() {
646
- var Le = speechSynthesis.getVoices(), X, de;
647
- return Le.forEach(function(De) {
646
+ var Me = speechSynthesis.getVoices(), X, de;
647
+ return Me.forEach(function(De) {
648
648
  De.lang === re.replace("_", "-") && (X = De), De.default && (de = De);
649
649
  }), X || (X = de), X;
650
650
  }, j = '<svg><use xlink:href="#vditor-icon-play"></use></svg>', pe = '<svg><use xlink:href="#vditor-icon-pause"></use></svg>';
@@ -654,8 +654,8 @@ function Vi() {
654
654
  var ge = W(), ie = new SpeechSynthesisUtterance();
655
655
  ie.voice = ge, ie.onend = ie.onerror = function() {
656
656
  K.style.display = "none", speechSynthesis.cancel(), K.classList.remove("vditor-speech--current"), K.innerHTML = j;
657
- }, I.addEventListener(window.ontouchstart !== void 0 ? "touchend" : "click", function(Le) {
658
- var X = Le.target;
657
+ }, I.addEventListener(window.ontouchstart !== void 0 ? "touchend" : "click", function(Me) {
658
+ var X = Me.target;
659
659
  if (X.classList.contains("vditor-speech") || X.parentElement.classList.contains("vditor-speech")) {
660
660
  K.classList.contains("vditor-speech--current") ? speechSynthesis.speaking && (speechSynthesis.paused ? (speechSynthesis.resume(), K.innerHTML = pe) : (speechSynthesis.pause(), K.innerHTML = j)) : (ie.text = K.getAttribute("data-text"), speechSynthesis.speak(ie), K.classList.add("vditor-speech--current"), K.innerHTML = pe), (0, me.Hc)(window.vditorSpeechRange), I.focus();
661
661
  return;
@@ -665,7 +665,7 @@ function Vi() {
665
665
  if (De) {
666
666
  window.vditorSpeechRange = de.cloneRange();
667
667
  var Ne = de.getBoundingClientRect();
668
- K.innerHTML = j, K.style.display = "block", K.style.top = Ne.top + Ne.height + document.querySelector("html").scrollTop - 20 + "px", window.ontouchstart !== void 0 ? K.style.left = Le.changedTouches[Le.changedTouches.length - 1].pageX + 2 + "px" : K.style.left = Le.clientX + 2 + "px", K.setAttribute("data-text", De);
668
+ K.innerHTML = j, K.style.display = "block", K.style.top = Ne.top + Ne.height + document.querySelector("html").scrollTop - 20 + "px", window.ontouchstart !== void 0 ? K.style.left = Me.changedTouches[Me.changedTouches.length - 1].pageX + 2 + "px" : K.style.left = Me.clientX + 2 + "px", K.setAttribute("data-text", De);
669
669
  }
670
670
  }
671
671
  });
@@ -684,7 +684,7 @@ function Vi() {
684
684
  ge(De);
685
685
  }
686
686
  }
687
- function Le(de) {
687
+ function Me(de) {
688
688
  try {
689
689
  X(j.throw(de));
690
690
  } catch (De) {
@@ -692,11 +692,11 @@ function Vi() {
692
692
  }
693
693
  }
694
694
  function X(de) {
695
- de.done ? K(de.value) : pe(de.value).then(ie, Le);
695
+ de.done ? K(de.value) : pe(de.value).then(ie, Me);
696
696
  }
697
697
  X((j = j.apply(I, re || [])).next());
698
698
  });
699
- }, we = function(I, re) {
699
+ }, ve = function(I, re) {
700
700
  var W = { label: 0, sent: function() {
701
701
  if (K[0] & 1) throw K[1];
702
702
  return K[1];
@@ -706,10 +706,10 @@ function Vi() {
706
706
  }), ge;
707
707
  function ie(X) {
708
708
  return function(de) {
709
- return Le([X, de]);
709
+ return Me([X, de]);
710
710
  };
711
711
  }
712
- function Le(X) {
712
+ function Me(X) {
713
713
  if (j) throw new TypeError("Generator is already executing.");
714
714
  for (; ge && (ge = 0, X[0] && (W = 0)), W; ) try {
715
715
  if (j = 1, pe && (K = X[0] & 2 ? pe.return : X[0] ? pe.throw || ((K = pe.return) && K.call(pe), 0) : pe.next) && !(K = K.call(pe, X[1])).done) return K;
@@ -758,14 +758,14 @@ function Vi() {
758
758
  }, Te = function(I) {
759
759
  var re, W = {
760
760
  anchor: 0,
761
- cdn: M.g.CDN,
761
+ cdn: L.g.CDN,
762
762
  customEmoji: {},
763
- emojiPath: "".concat(M.g.CDN, "/dist/images/emoji"),
764
- hljs: M.g.HLJS_OPTIONS,
763
+ emojiPath: "".concat(L.g.CDN, "/dist/images/emoji"),
764
+ hljs: L.g.HLJS_OPTIONS,
765
765
  icon: "ant",
766
766
  lang: "zh_CN",
767
- markdown: M.g.MARKDOWN_OPTIONS,
768
- math: M.g.MATH_OPTIONS,
767
+ markdown: L.g.MARKDOWN_OPTIONS,
768
+ math: L.g.MATH_OPTIONS,
769
769
  mode: "light",
770
770
  speech: {
771
771
  enable: !1
@@ -775,10 +775,10 @@ function Vi() {
775
775
  enable: !0
776
776
  }
777
777
  },
778
- theme: M.g.THEME_OPTIONS
778
+ theme: L.g.THEME_OPTIONS
779
779
  };
780
780
  return I.cdn && (!((re = I.theme) === null || re === void 0) && re.path || (W.theme.path = "".concat(I.cdn, "/dist/css/content-theme")), I.emojiPath || (W.emojiPath = "".concat(I.cdn, "/dist/images/emoji"))), (0, Q.T)(W, I);
781
- }, ve = function(I, re) {
781
+ }, Ee = function(I, re) {
782
782
  var W = Te(re);
783
783
  return (0, F.G)("".concat(W.cdn, "/dist/js/lute/lute.min.js"), "vditorLuteScript").then(function() {
784
784
  var j = (0, oe.X)({
@@ -810,17 +810,17 @@ function Vi() {
810
810
  }, k = function(I, re, W) {
811
811
  return le(void 0, void 0, void 0, function() {
812
812
  var j, pe, K, ge;
813
- return we(this, function(ie) {
813
+ return ve(this, function(ie) {
814
814
  switch (ie.label) {
815
815
  case 0:
816
- return j = Te(W), [4, ve(re, j)];
816
+ return j = Te(W), [4, Ee(re, j)];
817
817
  case 1:
818
818
  if (pe = ie.sent(), j.transform && (pe = j.transform(pe)), I.innerHTML = pe, I.classList.add("vditor-reset"), j.i18n) return [3, 5];
819
819
  if (["de_DE", "en_US", "es_ES", "fr_FR", "ja_JP", "ko_KR", "pt_BR", "ru_RU", "sv_SE", "vi_VN", "zh_CN", "zh_TW"].includes(j.lang)) return [3, 2];
820
820
  throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");
821
821
  case 2:
822
- return K = "vditorI18nScript", ge = K + j.lang, document.querySelectorAll('head script[id^="'.concat(K, '"]')).forEach(function(Le) {
823
- Le.id !== ge && document.head.removeChild(Le);
822
+ return K = "vditorI18nScript", ge = K + j.lang, document.querySelectorAll('head script[id^="'.concat(K, '"]')).forEach(function(Me) {
823
+ Me.id !== ge && document.head.removeChild(Me);
824
824
  }), [4, (0, F.G)("".concat(j.cdn, "/dist/js/i18n/").concat(j.lang, ".js"), ge)];
825
825
  case 3:
826
826
  ie.sent(), ie.label = 4;
@@ -836,8 +836,8 @@ function Vi() {
836
836
  return (0, P.Z)(j.theme.current, j.theme.path), j.anchor === 1 && I.classList.add("vditor-reset--anchor"), (0, l.O)(I, j.hljs), (0, m.s)(j.hljs, I, j.cdn), (0, v.H)(I, {
837
837
  cdn: j.cdn,
838
838
  math: j.math
839
- }), (0, b.i)(I, j.cdn, j.mode), (0, g.J)(I, j.cdn, j.mode), (0, s.K)(I, j.cdn), (0, y.P)(I, j.cdn), (0, p.v)(I, j.cdn), (0, c.p)(I, j.cdn, j.mode), (0, C.P)(I, j.cdn, j.mode), (0, D.B)(I, j.cdn), (0, x.Q)(I, j.cdn), j.render.media.enable && (0, w.Y)(I), j.speech.enable && fe(I), j.anchor !== 0 && ne(j.anchor), j.after && j.after(), j.lazyLoadImage && d(I), I.addEventListener("click", function(Le) {
840
- var X = (0, z.lG)(Le.target, "SPAN");
839
+ }), (0, b.i)(I, j.cdn, j.mode), (0, g.J)(I, j.cdn, j.mode), (0, s.K)(I, j.cdn), (0, y.P)(I, j.cdn), (0, p.v)(I, j.cdn), (0, c.p)(I, j.cdn, j.mode), (0, C.P)(I, j.cdn, j.mode), (0, x.B)(I, j.cdn), (0, D.Q)(I, j.cdn), j.render.media.enable && (0, w.Y)(I), j.speech.enable && fe(I), j.anchor !== 0 && ne(j.anchor), j.after && j.after(), j.lazyLoadImage && d(I), I.addEventListener("click", function(Me) {
840
+ var X = (0, z.lG)(Me.target, "SPAN");
841
841
  if (X && (0, z.fb)(X, "vditor-toc")) {
842
842
  var de = I.querySelector("#" + X.getAttribute("data-target-id"));
843
843
  de && window.scrollTo(window.scrollX, de.offsetTop);
@@ -850,12 +850,12 @@ function Vi() {
850
850
  }
851
851
  });
852
852
  });
853
- }, je = L(190), ht = L(580), mt = (
853
+ }, je = M(190), ht = M(580), mt = (
854
854
  /** @class */
855
855
  (function() {
856
856
  function I() {
857
857
  }
858
- return I.adapterRender = A, I.previewImage = je.E, I.codeRender = l.O, I.graphvizRender = p.v, I.highlightRender = m.s, I.mathRender = v.H, I.mermaidRender = b.i, I.SMILESRender = g.J, I.markmapRender = s.K, I.flowchartRender = y.P, I.chartRender = c.p, I.abcRender = x.Q, I.mindmapRender = C.P, I.plantumlRender = D.B, I.outlineRender = _.k, I.mediaRender = w.Y, I.speechRender = fe, I.lazyLoadImageRender = d, I.md2html = ve, I.preview = k, I.setCodeTheme = ht.Y, I.setContentTheme = P.Z, I;
858
+ return I.adapterRender = A, I.previewImage = je.E, I.codeRender = l.O, I.graphvizRender = p.v, I.highlightRender = m.s, I.mathRender = v.H, I.mermaidRender = b.i, I.SMILESRender = g.J, I.markmapRender = s.K, I.flowchartRender = y.P, I.chartRender = c.p, I.abcRender = D.Q, I.mindmapRender = C.P, I.plantumlRender = x.B, I.outlineRender = _.k, I.mediaRender = w.Y, I.speechRender = fe, I.lazyLoadImageRender = d, I.md2html = Ee, I.preview = k, I.setCodeTheme = ht.Y, I.setContentTheme = P.Z, I;
859
859
  })()
860
860
  );
861
861
  const Fe = mt;
@@ -864,12 +864,12 @@ function Vi() {
864
864
  /***/
865
865
  145: (
866
866
  /***/
867
- ((Z, E, L) => {
868
- L.d(E, {
867
+ ((Z, E, M) => {
868
+ M.d(E, {
869
869
  /* harmony export */
870
870
  H: () => (
871
871
  /* binding */
872
- x
872
+ D
873
873
  ),
874
874
  /* harmony export */
875
875
  g: () => (
@@ -878,7 +878,7 @@ function Vi() {
878
878
  )
879
879
  /* harmony export */
880
880
  });
881
- var x = "3.11.2", A = (
881
+ var D = "3.11.2", A = (
882
882
  /** @class */
883
883
  (function() {
884
884
  function c() {
@@ -1213,8 +1213,8 @@ function Vi() {
1213
1213
  /***/
1214
1214
  825: (
1215
1215
  /***/
1216
- ((Z, E, L) => {
1217
- L.d(E, {
1216
+ ((Z, E, M) => {
1217
+ M.d(E, {
1218
1218
  /* harmony export */
1219
1219
  J: () => (
1220
1220
  /* binding */
@@ -1222,8 +1222,8 @@ function Vi() {
1222
1222
  )
1223
1223
  /* harmony export */
1224
1224
  });
1225
- var x = L(145), A = L(413), c = L(840), l = L(494), y = function(p, m, d) {
1226
- p === void 0 && (p = document), m === void 0 && (m = x.g.CDN);
1225
+ var D = M(145), A = M(413), c = M(840), l = M(494), y = function(p, m, d) {
1226
+ p === void 0 && (p = document), m === void 0 && (m = D.g.CDN);
1227
1227
  var v = c.SMILESRenderAdapter.getElements(p);
1228
1228
  v.length > 0 && (0, A.G)("".concat(m, "/dist/js/smiles-drawer/smiles-drawer.min.js?v=2.1.7"), "vditorAbcjsScript").then(function() {
1229
1229
  var w = new SmiDrawer({}, {});
@@ -1241,8 +1241,8 @@ function Vi() {
1241
1241
  /***/
1242
1242
  135: (
1243
1243
  /***/
1244
- ((Z, E, L) => {
1245
- L.d(E, {
1244
+ ((Z, E, M) => {
1245
+ M.d(E, {
1246
1246
  /* harmony export */
1247
1247
  Q: () => (
1248
1248
  /* binding */
@@ -1250,8 +1250,8 @@ function Vi() {
1250
1250
  )
1251
1251
  /* harmony export */
1252
1252
  });
1253
- var x = L(145), A = L(413), c = L(840), l = function(y, p) {
1254
- y === void 0 && (y = document), p === void 0 && (p = x.g.CDN);
1253
+ var D = M(145), A = M(413), c = M(840), l = function(y, p) {
1254
+ y === void 0 && (y = document), p === void 0 && (p = D.g.CDN);
1255
1255
  var m = c.abcRenderAdapter.getElements(y);
1256
1256
  m.length > 0 && (0, A.G)("".concat(p, "/dist/js/abcjs/abcjs_basic.min.js"), "vditorAbcjsScript").then(function() {
1257
1257
  m.forEach(function(d) {
@@ -1264,12 +1264,12 @@ function Vi() {
1264
1264
  /***/
1265
1265
  840: (
1266
1266
  /***/
1267
- ((Z, E, L) => {
1268
- L.r(E), L.d(E, {
1267
+ ((Z, E, M) => {
1268
+ M.r(E), M.d(E, {
1269
1269
  /* harmony export */
1270
1270
  mathRenderAdapter: () => (
1271
1271
  /* binding */
1272
- x
1272
+ D
1273
1273
  ),
1274
1274
  /* harmony export */
1275
1275
  SMILESRenderAdapter: () => (
@@ -1318,7 +1318,7 @@ function Vi() {
1318
1318
  )
1319
1319
  /* harmony export */
1320
1320
  });
1321
- var x = {
1321
+ var D = {
1322
1322
  getCode: function(b) {
1323
1323
  return b.textContent;
1324
1324
  },
@@ -1395,8 +1395,8 @@ function Vi() {
1395
1395
  /***/
1396
1396
  775: (
1397
1397
  /***/
1398
- ((Z, E, L) => {
1399
- L.d(E, {
1398
+ ((Z, E, M) => {
1399
+ M.d(E, {
1400
1400
  /* harmony export */
1401
1401
  p: () => (
1402
1402
  /* binding */
@@ -1404,7 +1404,7 @@ function Vi() {
1404
1404
  )
1405
1405
  /* harmony export */
1406
1406
  });
1407
- var x = L(145), A = L(413), c = L(840), l = L(494), y = function(d, v, w, b) {
1407
+ var D = M(145), A = M(413), c = M(840), l = M(494), y = function(d, v, w, b) {
1408
1408
  function g(s) {
1409
1409
  return s instanceof w ? s : new w(function(C) {
1410
1410
  C(s);
@@ -1413,22 +1413,22 @@ function Vi() {
1413
1413
  return new (w || (w = Promise))(function(s, C) {
1414
1414
  function _(P) {
1415
1415
  try {
1416
- M(b.next(P));
1416
+ L(b.next(P));
1417
1417
  } catch (F) {
1418
1418
  C(F);
1419
1419
  }
1420
1420
  }
1421
- function D(P) {
1421
+ function x(P) {
1422
1422
  try {
1423
- M(b.throw(P));
1423
+ L(b.throw(P));
1424
1424
  } catch (F) {
1425
1425
  C(F);
1426
1426
  }
1427
1427
  }
1428
- function M(P) {
1429
- P.done ? s(P.value) : g(P.value).then(_, D);
1428
+ function L(P) {
1429
+ P.done ? s(P.value) : g(P.value).then(_, x);
1430
1430
  }
1431
- M((b = b.apply(d, v || [])).next());
1431
+ L((b = b.apply(d, v || [])).next());
1432
1432
  });
1433
1433
  }, p = function(d, v) {
1434
1434
  var w = { label: 0, sent: function() {
@@ -1438,66 +1438,66 @@ function Vi() {
1438
1438
  return C = { next: _(0), throw: _(1), return: _(2) }, typeof Symbol == "function" && (C[Symbol.iterator] = function() {
1439
1439
  return this;
1440
1440
  }), C;
1441
- function _(M) {
1441
+ function _(L) {
1442
1442
  return function(P) {
1443
- return D([M, P]);
1443
+ return x([L, P]);
1444
1444
  };
1445
1445
  }
1446
- function D(M) {
1446
+ function x(L) {
1447
1447
  if (b) throw new TypeError("Generator is already executing.");
1448
- for (; C && (C = 0, M[0] && (w = 0)), w; ) try {
1449
- if (b = 1, g && (s = M[0] & 2 ? g.return : M[0] ? g.throw || ((s = g.return) && s.call(g), 0) : g.next) && !(s = s.call(g, M[1])).done) return s;
1450
- switch (g = 0, s && (M = [M[0] & 2, s.value]), M[0]) {
1448
+ for (; C && (C = 0, L[0] && (w = 0)), w; ) try {
1449
+ if (b = 1, g && (s = L[0] & 2 ? g.return : L[0] ? g.throw || ((s = g.return) && s.call(g), 0) : g.next) && !(s = s.call(g, L[1])).done) return s;
1450
+ switch (g = 0, s && (L = [L[0] & 2, s.value]), L[0]) {
1451
1451
  case 0:
1452
1452
  case 1:
1453
- s = M;
1453
+ s = L;
1454
1454
  break;
1455
1455
  case 4:
1456
- return w.label++, { value: M[1], done: !1 };
1456
+ return w.label++, { value: L[1], done: !1 };
1457
1457
  case 5:
1458
- w.label++, g = M[1], M = [0];
1458
+ w.label++, g = L[1], L = [0];
1459
1459
  continue;
1460
1460
  case 7:
1461
- M = w.ops.pop(), w.trys.pop();
1461
+ L = w.ops.pop(), w.trys.pop();
1462
1462
  continue;
1463
1463
  default:
1464
- if (s = w.trys, !(s = s.length > 0 && s[s.length - 1]) && (M[0] === 6 || M[0] === 2)) {
1464
+ if (s = w.trys, !(s = s.length > 0 && s[s.length - 1]) && (L[0] === 6 || L[0] === 2)) {
1465
1465
  w = 0;
1466
1466
  continue;
1467
1467
  }
1468
- if (M[0] === 3 && (!s || M[1] > s[0] && M[1] < s[3])) {
1469
- w.label = M[1];
1468
+ if (L[0] === 3 && (!s || L[1] > s[0] && L[1] < s[3])) {
1469
+ w.label = L[1];
1470
1470
  break;
1471
1471
  }
1472
- if (M[0] === 6 && w.label < s[1]) {
1473
- w.label = s[1], s = M;
1472
+ if (L[0] === 6 && w.label < s[1]) {
1473
+ w.label = s[1], s = L;
1474
1474
  break;
1475
1475
  }
1476
1476
  if (s && w.label < s[2]) {
1477
- w.label = s[2], w.ops.push(M);
1477
+ w.label = s[2], w.ops.push(L);
1478
1478
  break;
1479
1479
  }
1480
1480
  s[2] && w.ops.pop(), w.trys.pop();
1481
1481
  continue;
1482
1482
  }
1483
- M = v.call(d, w);
1483
+ L = v.call(d, w);
1484
1484
  } catch (P) {
1485
- M = [6, P], g = 0;
1485
+ L = [6, P], g = 0;
1486
1486
  } finally {
1487
1487
  b = s = 0;
1488
1488
  }
1489
- if (M[0] & 5) throw M[1];
1490
- return { value: M[0] ? M[1] : void 0, done: !0 };
1489
+ if (L[0] & 5) throw L[1];
1490
+ return { value: L[0] ? L[1] : void 0, done: !0 };
1491
1491
  }
1492
1492
  }, m = function(d, v, w) {
1493
- d === void 0 && (d = document), v === void 0 && (v = x.g.CDN);
1493
+ d === void 0 && (d = document), v === void 0 && (v = D.g.CDN);
1494
1494
  var b = c.chartRenderAdapter.getElements(d);
1495
1495
  b.length > 0 && (0, A.G)("".concat(v, "/dist/js/echarts/echarts.min.js?v=5.5.1"), "vditorEchartsScript").then(function() {
1496
1496
  b.forEach(function(g) {
1497
1497
  return y(void 0, void 0, void 0, function() {
1498
1498
  var s, C, _;
1499
- return p(this, function(D) {
1500
- switch (D.label) {
1499
+ return p(this, function(x) {
1500
+ switch (x.label) {
1501
1501
  case 0:
1502
1502
  if (g.parentElement.classList.contains("vditor-wysiwyg__pre") || g.parentElement.classList.contains("vditor-ir__marker--pre"))
1503
1503
  return [
@@ -1509,16 +1509,16 @@ function Vi() {
1509
1509
  2
1510
1510
  /*return*/
1511
1511
  ];
1512
- D.label = 1;
1512
+ x.label = 1;
1513
1513
  case 1:
1514
- return D.trys.push([1, 3, , 4]), g.getAttribute("data-processed") === "true" ? [
1514
+ return x.trys.push([1, 3, , 4]), g.getAttribute("data-processed") === "true" ? [
1515
1515
  2
1516
1516
  /*return*/
1517
1517
  ] : [4, (0, l.Qf)(s)];
1518
1518
  case 2:
1519
- return C = D.sent(), echarts.init(g, w === "dark" ? "dark" : void 0).setOption(C), g.setAttribute("data-processed", "true"), [3, 4];
1519
+ return C = x.sent(), echarts.init(g, w === "dark" ? "dark" : void 0).setOption(C), g.setAttribute("data-processed", "true"), [3, 4];
1520
1520
  case 3:
1521
- return _ = D.sent(), g.className = "vditor-reset--error", g.innerHTML = "echarts render error: <br>".concat(_), [3, 4];
1521
+ return _ = x.sent(), g.className = "vditor-reset--error", g.innerHTML = "echarts render error: <br>".concat(_), [3, 4];
1522
1522
  case 4:
1523
1523
  return [
1524
1524
  2
@@ -1535,8 +1535,8 @@ function Vi() {
1535
1535
  /***/
1536
1536
  428: (
1537
1537
  /***/
1538
- ((Z, E, L) => {
1539
- L.d(E, {
1538
+ ((Z, E, M) => {
1539
+ M.d(E, {
1540
1540
  /* harmony export */
1541
1541
  O: () => (
1542
1542
  /* binding */
@@ -1544,7 +1544,7 @@ function Vi() {
1544
1544
  )
1545
1545
  /* harmony export */
1546
1546
  });
1547
- var x = L(105), A = L(145), c = function(l, y) {
1547
+ var D = M(105), A = M(145), c = function(l, y) {
1548
1548
  Array.from(l.querySelectorAll("pre > code")).filter(function(p, m) {
1549
1549
  return !(p.parentElement.classList.contains("vditor-wysiwyg__pre") || p.parentElement.classList.contains("vditor-ir__marker--pre") || p.classList.contains("language-mermaid") || p.classList.contains("language-flowchart") || p.classList.contains("language-echarts") || p.classList.contains("language-mindmap") || p.classList.contains("language-plantuml") || p.classList.contains("language-markmap") || p.classList.contains("language-abc") || p.classList.contains("language-graphviz") || p.classList.contains("language-math") || p.classList.contains("language-smiles") || p.style.maxHeight.indexOf("px") > -1 || l.classList.contains("vditor-preview") && m > 5);
1550
1550
  }).forEach(function(p) {
@@ -1564,7 +1564,7 @@ onmouseover="this.setAttribute('aria-label', '`).concat(((d = window.VditorI18n)
1564
1564
  class="vditor-tooltipped vditor-tooltipped__w"
1565
1565
  onclick="event.stopPropagation();this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '`).concat(((v = window.VditorI18n) === null || v === void 0 ? void 0 : v.copied) || "已复制", `');this.previousElementSibling.blur()">`).concat(g, "</span>");
1566
1566
  var C = document.createElement("textarea");
1567
- C.value = (0, x.X)(w), s.insertAdjacentElement("afterbegin", C), y && y.renderMenu && y.renderMenu(p, s), p.before(s), p.style.maxHeight = window.outerHeight - 40 + "px", p.insertAdjacentHTML("afterend", '<span style="position: absolute">'.concat(A.g.ZWSP, "</span>"));
1567
+ C.value = (0, D.X)(w), s.insertAdjacentElement("afterbegin", C), y && y.renderMenu && y.renderMenu(p, s), p.before(s), p.style.maxHeight = window.outerHeight - 40 + "px", p.insertAdjacentHTML("afterend", '<span style="position: absolute">'.concat(A.g.ZWSP, "</span>"));
1568
1568
  });
1569
1569
  };
1570
1570
  })
@@ -1572,8 +1572,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1572
1572
  /***/
1573
1573
  325: (
1574
1574
  /***/
1575
- ((Z, E, L) => {
1576
- L.d(E, {
1575
+ ((Z, E, M) => {
1576
+ M.d(E, {
1577
1577
  /* harmony export */
1578
1578
  P: () => (
1579
1579
  /* binding */
@@ -1581,8 +1581,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1581
1581
  )
1582
1582
  /* harmony export */
1583
1583
  });
1584
- var x = L(145), A = L(413), c = L(840), l = function(y, p) {
1585
- p === void 0 && (p = x.g.CDN);
1584
+ var D = M(145), A = M(413), c = M(840), l = function(y, p) {
1585
+ p === void 0 && (p = D.g.CDN);
1586
1586
  var m = c.flowchartRenderAdapter.getElements(y);
1587
1587
  m.length !== 0 && (0, A.G)("".concat(p, "/dist/js/flowchart.js/flowchart.min.js"), "vditorFlowchartScript").then(function() {
1588
1588
  m.forEach(function(d) {
@@ -1598,8 +1598,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1598
1598
  /***/
1599
1599
  483: (
1600
1600
  /***/
1601
- ((Z, E, L) => {
1602
- L.d(E, {
1601
+ ((Z, E, M) => {
1602
+ M.d(E, {
1603
1603
  /* harmony export */
1604
1604
  v: () => (
1605
1605
  /* binding */
@@ -1607,8 +1607,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1607
1607
  )
1608
1608
  /* harmony export */
1609
1609
  });
1610
- var x = L(145), A = L(413), c = L(840), l = function(y, p) {
1611
- p === void 0 && (p = x.g.CDN);
1610
+ var D = M(145), A = M(413), c = M(840), l = function(y, p) {
1611
+ p === void 0 && (p = D.g.CDN);
1612
1612
  var m = c.graphvizRenderAdapter.getElements(y);
1613
1613
  m.length !== 0 && (0, A.G)("".concat(p, "/dist/js/graphviz/viz.js"), "vditorGraphVizScript").then(function() {
1614
1614
  m.forEach(function(d) {
@@ -1634,8 +1634,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1634
1634
  /***/
1635
1635
  999: (
1636
1636
  /***/
1637
- ((Z, E, L) => {
1638
- L.d(E, {
1637
+ ((Z, E, M) => {
1638
+ M.d(E, {
1639
1639
  /* harmony export */
1640
1640
  s: () => (
1641
1641
  /* binding */
@@ -1643,10 +1643,10 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1643
1643
  )
1644
1644
  /* harmony export */
1645
1645
  });
1646
- var x = L(145), A = L(413), c = L(290), l = function(y, p, m) {
1647
- p === void 0 && (p = document), m === void 0 && (m = x.g.CDN);
1646
+ var D = M(145), A = M(413), c = M(290), l = function(y, p, m) {
1647
+ p === void 0 && (p = document), m === void 0 && (m = D.g.CDN);
1648
1648
  var d = y.style;
1649
- x.g.CODE_THEME.includes(d) || (d = "github");
1649
+ D.g.CODE_THEME.includes(d) || (d = "github");
1650
1650
  var v = document.getElementById("vditorHljsStyle"), w = "".concat(m, "/dist/js/highlight.js/styles/").concat(d, ".min.css");
1651
1651
  if (v && v.getAttribute("href") !== w && v.remove(), (0, c.c)("".concat(m, "/dist/js/highlight.js/styles/").concat(d, ".min.css"), "vditorHljsStyle"), y.enable !== !1) {
1652
1652
  var b = p.querySelectorAll("pre > code");
@@ -1663,14 +1663,14 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1663
1663
  g.classList.add("vditor-linenumber");
1664
1664
  var C = g.querySelector(".vditor-linenumber__temp");
1665
1665
  C || (C = document.createElement("div"), C.className = "vditor-linenumber__temp", g.insertAdjacentElement("beforeend", C));
1666
- var _ = getComputedStyle(g).whiteSpace, D = !1;
1667
- (_ === "pre-wrap" || _ === "pre-line") && (D = !0);
1668
- var M = "", P = g.textContent.split(/\r\n|\r|\n/g);
1666
+ var _ = getComputedStyle(g).whiteSpace, x = !1;
1667
+ (_ === "pre-wrap" || _ === "pre-line") && (x = !0);
1668
+ var L = "", P = g.textContent.split(/\r\n|\r|\n/g);
1669
1669
  P.pop(), P.map(function(F) {
1670
1670
  var z = "";
1671
- D && (C.textContent = F || `
1672
- `, z = ' style="height:'.concat(C.getBoundingClientRect().height, 'px"')), M += "<span".concat(z, "></span>");
1673
- }), C.style.display = "none", M = '<span class="vditor-linenumber__rows">'.concat(M, "</span>"), g.insertAdjacentHTML("beforeend", M);
1671
+ x && (C.textContent = F || `
1672
+ `, z = ' style="height:'.concat(C.getBoundingClientRect().height, 'px"')), L += "<span".concat(z, "></span>");
1673
+ }), C.style.display = "none", L = '<span class="vditor-linenumber__rows">'.concat(L, "</span>"), g.insertAdjacentHTML("beforeend", L);
1674
1674
  }
1675
1675
  }
1676
1676
  });
@@ -1683,8 +1683,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1683
1683
  /***/
1684
1684
  11: (
1685
1685
  /***/
1686
- ((Z, E, L) => {
1687
- L.d(E, {
1686
+ ((Z, E, M) => {
1687
+ M.d(E, {
1688
1688
  /* harmony export */
1689
1689
  K: () => (
1690
1690
  /* binding */
@@ -1692,12 +1692,12 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1692
1692
  )
1693
1693
  /* harmony export */
1694
1694
  });
1695
- var x = L(145), A = L(413), c = L(840), l = {}, y = function(d, v) {
1696
- var w = d.transform(v), b = Object.keys(w.features).filter(function(D) {
1697
- return !l[D];
1695
+ var D = M(145), A = M(413), c = M(840), l = {}, y = function(d, v) {
1696
+ var w = d.transform(v), b = Object.keys(w.features).filter(function(x) {
1697
+ return !l[x];
1698
1698
  });
1699
- b.forEach(function(D) {
1700
- l[D] = !0;
1699
+ b.forEach(function(x) {
1700
+ l[x] = !0;
1701
1701
  });
1702
1702
  var g = d.getAssets(b), s = g.styles, C = g.scripts, _ = window.markmap;
1703
1703
  return s && _.loadCSS(s), C && _.loadJS(C), w;
@@ -1706,10 +1706,10 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1706
1706
  w.globalCSS;
1707
1707
  var C = new b();
1708
1708
  d.innerHTML = '<svg style="width:100%"></svg>';
1709
- var _ = d.firstChild, D = g.create(_, null), M = y(C, v), P = M.root, F = M.frontmatter, z = F?.markmap, Q = s(z);
1710
- D.setData(P, Q), D.fit();
1709
+ var _ = d.firstChild, x = g.create(_, null), L = y(C, v), P = L.root, F = L.frontmatter, z = F?.markmap, Q = s(z);
1710
+ x.setData(P, Q), x.fit();
1711
1711
  }, m = function(d, v) {
1712
- d === void 0 && (d = document), v === void 0 && (v = x.g.CDN);
1712
+ d === void 0 && (d = document), v === void 0 && (v = D.g.CDN);
1713
1713
  var w = c.markmapRenderAdapter.getElements(d);
1714
1714
  w.length !== 0 && (0, A.G)("".concat(v, "/dist/js/markmap/markmap.min.js"), "vditorMarkerScript").then(function() {
1715
1715
  w.forEach(function(b) {
@@ -1726,8 +1726,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1726
1726
  /***/
1727
1727
  472: (
1728
1728
  /***/
1729
- ((Z, E, L) => {
1730
- L.d(E, {
1729
+ ((Z, E, M) => {
1730
+ M.d(E, {
1731
1731
  /* harmony export */
1732
1732
  H: () => (
1733
1733
  /* binding */
@@ -1735,12 +1735,12 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1735
1735
  )
1736
1736
  /* harmony export */
1737
1737
  });
1738
- var x = L(145), A = L(413), c = L(290), l = L(105), y = L(840), p = function(m, d) {
1738
+ var D = M(145), A = M(413), c = M(290), l = M(105), y = M(840), p = function(m, d) {
1739
1739
  m === void 0 && (m = document);
1740
1740
  var v = y.mathRenderAdapter.getElements(m);
1741
1741
  if (v.length !== 0) {
1742
1742
  var w = {
1743
- cdn: x.g.CDN,
1743
+ cdn: D.g.CDN,
1744
1744
  math: {
1745
1745
  engine: "KaTeX",
1746
1746
  inlineDigit: !1,
@@ -1765,8 +1765,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1765
1765
  }
1766
1766
  s.addEventListener("copy", function(_) {
1767
1767
  _.stopPropagation(), _.preventDefault();
1768
- var D = _.currentTarget.closest(".language-math");
1769
- _.clipboardData.setData("text/html", D.innerHTML), _.clipboardData.setData("text/plain", D.getAttribute("data-math"));
1768
+ var x = _.currentTarget.closest(".language-math");
1769
+ _.clipboardData.setData("text/html", x.innerHTML), _.clipboardData.setData("text/plain", x.getAttribute("data-math"));
1770
1770
  });
1771
1771
  }
1772
1772
  });
@@ -1775,11 +1775,11 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1775
1775
  else if (d.math.engine === "MathJax") {
1776
1776
  var b = function(s) {
1777
1777
  if (s.length !== 0) {
1778
- var C = 0, _ = s[s.length - 1], D = function() {
1779
- var M = s[C++];
1780
- M === _ ? M() : M(D);
1778
+ var C = 0, _ = s[s.length - 1], x = function() {
1779
+ var L = s[C++];
1780
+ L === _ ? L() : L(x);
1781
1781
  };
1782
- D();
1782
+ x();
1783
1783
  }
1784
1784
  };
1785
1785
  window.MathJax || (window.MathJax = {
@@ -1794,18 +1794,18 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1794
1794
  }
1795
1795
  }, Object.assign(window.MathJax, d.math.mathJaxOptions)), (0, A.J)("".concat(d.cdn, "/dist/js/mathjax/tex-svg-full.js"), "protyleMathJaxScript");
1796
1796
  var g = function(s, C) {
1797
- var _ = (0, l.X)(s.textContent).trim(), D = window.MathJax.getMetricsFor(s);
1798
- D.display = s.tagName === "DIV", window.MathJax.tex2svgPromise(_, D).then(function(M) {
1799
- s.innerHTML = "", s.setAttribute("data-math", _), s.append(M), window.MathJax.startup.document.clear(), window.MathJax.startup.document.updateDocument();
1800
- var P = M.querySelector('[data-mml-node="merror"]');
1797
+ var _ = (0, l.X)(s.textContent).trim(), x = window.MathJax.getMetricsFor(s);
1798
+ x.display = s.tagName === "DIV", window.MathJax.tex2svgPromise(_, x).then(function(L) {
1799
+ s.innerHTML = "", s.setAttribute("data-math", _), s.append(L), window.MathJax.startup.document.clear(), window.MathJax.startup.document.updateDocument();
1800
+ var P = L.querySelector('[data-mml-node="merror"]');
1801
1801
  P && P.textContent.trim() !== "" && (s.innerHTML = P.textContent.trim(), s.className = "vditor-reset--error"), C && C();
1802
1802
  });
1803
1803
  };
1804
1804
  window.MathJax.startup.promise.then(function() {
1805
- for (var s = [], C = function(D) {
1806
- var M = v[D];
1807
- !M.parentElement.classList.contains("vditor-wysiwyg__pre") && !M.parentElement.classList.contains("vditor-ir__marker--pre") && !M.getAttribute("data-math") && (0, l.X)(M.textContent).trim() && s.push(function(P) {
1808
- D === v.length - 1 ? g(M) : g(M, P);
1805
+ for (var s = [], C = function(x) {
1806
+ var L = v[x];
1807
+ !L.parentElement.classList.contains("vditor-wysiwyg__pre") && !L.parentElement.classList.contains("vditor-ir__marker--pre") && !L.getAttribute("data-math") && (0, l.X)(L.textContent).trim() && s.push(function(P) {
1808
+ x === v.length - 1 ? g(L) : g(L, P);
1809
1809
  });
1810
1810
  }, _ = 0; _ < v.length; _++)
1811
1811
  C(_);
@@ -1819,8 +1819,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1819
1819
  /***/
1820
1820
  280: (
1821
1821
  /***/
1822
- ((Z, E, L) => {
1823
- L.d(E, {
1822
+ ((Z, E, M) => {
1823
+ M.d(E, {
1824
1824
  /* harmony export */
1825
1825
  Y: () => (
1826
1826
  /* binding */
@@ -1828,7 +1828,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1828
1828
  )
1829
1829
  /* harmony export */
1830
1830
  });
1831
- var x = L(494), A = function(p, m) {
1831
+ var D = M(494), A = function(p, m) {
1832
1832
  p.insertAdjacentHTML("afterend", '<video controls="controls" src="'.concat(m, '"></video>')), p.remove();
1833
1833
  }, c = function(p, m) {
1834
1834
  p.insertAdjacentHTML("afterend", '<audio controls="controls" src="'.concat(m, '"></audio>')), p.remove();
@@ -1850,8 +1850,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1850
1850
  p.insertAdjacentHTML("afterend", `<iframe class="iframe__video"
1851
1851
  src="https://www.dailymotion.com/embed/video/`.concat(s[2], '"></iframe>')), p.remove();
1852
1852
  else if (m.indexOf("bilibili.com") > -1 && (m.indexOf("bvid=") > -1 || C && C[1])) {
1853
- var D = {
1854
- bvid: (0, x.on)("bvid", m) || C && C[1],
1853
+ var x = {
1854
+ bvid: (0, D.on)("bvid", m) || C && C[1],
1855
1855
  page: "1",
1856
1856
  high_quality: "1",
1857
1857
  as_wide: "1",
@@ -1862,13 +1862,13 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1862
1862
  if (F) {
1863
1863
  z === 0 && (F = F.substr(1));
1864
1864
  var Q = F.split("=");
1865
- D[Q[0]] = Q[1];
1865
+ x[Q[0]] = Q[1];
1866
1866
  }
1867
1867
  });
1868
- var M = "https://player.bilibili.com/player.html?", P = Object.keys(D);
1868
+ var L = "https://player.bilibili.com/player.html?", P = Object.keys(x);
1869
1869
  P.forEach(function(F, z) {
1870
- M += "".concat(F, "=").concat(D[F]), z < P.length - 1 && (M += "&");
1871
- }), p.insertAdjacentHTML("afterend", '<iframe class="iframe__video" src="'.concat(M, '"></iframe>')), p.remove();
1870
+ L += "".concat(F, "=").concat(x[F]), z < P.length - 1 && (L += "&");
1871
+ }), p.insertAdjacentHTML("afterend", '<iframe class="iframe__video" src="'.concat(L, '"></iframe>')), p.remove();
1872
1872
  } else _ && _[1] && (p.insertAdjacentHTML("afterend", '<iframe class="iframe__video" src="//embed.ted.com/talks/'.concat(_[1], '"></iframe>')), p.remove());
1873
1873
  }, y = function(p) {
1874
1874
  p && p.querySelectorAll("a").forEach(function(m) {
@@ -1881,8 +1881,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1881
1881
  /***/
1882
1882
  637: (
1883
1883
  /***/
1884
- ((Z, E, L) => {
1885
- L.d(E, {
1884
+ ((Z, E, M) => {
1885
+ M.d(E, {
1886
1886
  /* harmony export */
1887
1887
  i: () => (
1888
1888
  /* binding */
@@ -1890,7 +1890,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1890
1890
  )
1891
1891
  /* harmony export */
1892
1892
  });
1893
- var x = L(145), A = L(413), c = L(840), l = L(494), y = function(d, v, w, b) {
1893
+ var D = M(145), A = M(413), c = M(840), l = M(494), y = function(d, v, w, b) {
1894
1894
  function g(s) {
1895
1895
  return s instanceof w ? s : new w(function(C) {
1896
1896
  C(s);
@@ -1899,22 +1899,22 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1899
1899
  return new (w || (w = Promise))(function(s, C) {
1900
1900
  function _(P) {
1901
1901
  try {
1902
- M(b.next(P));
1902
+ L(b.next(P));
1903
1903
  } catch (F) {
1904
1904
  C(F);
1905
1905
  }
1906
1906
  }
1907
- function D(P) {
1907
+ function x(P) {
1908
1908
  try {
1909
- M(b.throw(P));
1909
+ L(b.throw(P));
1910
1910
  } catch (F) {
1911
1911
  C(F);
1912
1912
  }
1913
1913
  }
1914
- function M(P) {
1915
- P.done ? s(P.value) : g(P.value).then(_, D);
1914
+ function L(P) {
1915
+ P.done ? s(P.value) : g(P.value).then(_, x);
1916
1916
  }
1917
- M((b = b.apply(d, v || [])).next());
1917
+ L((b = b.apply(d, v || [])).next());
1918
1918
  });
1919
1919
  }, p = function(d, v) {
1920
1920
  var w = { label: 0, sent: function() {
@@ -1924,59 +1924,59 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
1924
1924
  return C = { next: _(0), throw: _(1), return: _(2) }, typeof Symbol == "function" && (C[Symbol.iterator] = function() {
1925
1925
  return this;
1926
1926
  }), C;
1927
- function _(M) {
1927
+ function _(L) {
1928
1928
  return function(P) {
1929
- return D([M, P]);
1929
+ return x([L, P]);
1930
1930
  };
1931
1931
  }
1932
- function D(M) {
1932
+ function x(L) {
1933
1933
  if (b) throw new TypeError("Generator is already executing.");
1934
- for (; C && (C = 0, M[0] && (w = 0)), w; ) try {
1935
- if (b = 1, g && (s = M[0] & 2 ? g.return : M[0] ? g.throw || ((s = g.return) && s.call(g), 0) : g.next) && !(s = s.call(g, M[1])).done) return s;
1936
- switch (g = 0, s && (M = [M[0] & 2, s.value]), M[0]) {
1934
+ for (; C && (C = 0, L[0] && (w = 0)), w; ) try {
1935
+ if (b = 1, g && (s = L[0] & 2 ? g.return : L[0] ? g.throw || ((s = g.return) && s.call(g), 0) : g.next) && !(s = s.call(g, L[1])).done) return s;
1936
+ switch (g = 0, s && (L = [L[0] & 2, s.value]), L[0]) {
1937
1937
  case 0:
1938
1938
  case 1:
1939
- s = M;
1939
+ s = L;
1940
1940
  break;
1941
1941
  case 4:
1942
- return w.label++, { value: M[1], done: !1 };
1942
+ return w.label++, { value: L[1], done: !1 };
1943
1943
  case 5:
1944
- w.label++, g = M[1], M = [0];
1944
+ w.label++, g = L[1], L = [0];
1945
1945
  continue;
1946
1946
  case 7:
1947
- M = w.ops.pop(), w.trys.pop();
1947
+ L = w.ops.pop(), w.trys.pop();
1948
1948
  continue;
1949
1949
  default:
1950
- if (s = w.trys, !(s = s.length > 0 && s[s.length - 1]) && (M[0] === 6 || M[0] === 2)) {
1950
+ if (s = w.trys, !(s = s.length > 0 && s[s.length - 1]) && (L[0] === 6 || L[0] === 2)) {
1951
1951
  w = 0;
1952
1952
  continue;
1953
1953
  }
1954
- if (M[0] === 3 && (!s || M[1] > s[0] && M[1] < s[3])) {
1955
- w.label = M[1];
1954
+ if (L[0] === 3 && (!s || L[1] > s[0] && L[1] < s[3])) {
1955
+ w.label = L[1];
1956
1956
  break;
1957
1957
  }
1958
- if (M[0] === 6 && w.label < s[1]) {
1959
- w.label = s[1], s = M;
1958
+ if (L[0] === 6 && w.label < s[1]) {
1959
+ w.label = s[1], s = L;
1960
1960
  break;
1961
1961
  }
1962
1962
  if (s && w.label < s[2]) {
1963
- w.label = s[2], w.ops.push(M);
1963
+ w.label = s[2], w.ops.push(L);
1964
1964
  break;
1965
1965
  }
1966
1966
  s[2] && w.ops.pop(), w.trys.pop();
1967
1967
  continue;
1968
1968
  }
1969
- M = v.call(d, w);
1969
+ L = v.call(d, w);
1970
1970
  } catch (P) {
1971
- M = [6, P], g = 0;
1971
+ L = [6, P], g = 0;
1972
1972
  } finally {
1973
1973
  b = s = 0;
1974
1974
  }
1975
- if (M[0] & 5) throw M[1];
1976
- return { value: M[0] ? M[1] : void 0, done: !0 };
1975
+ if (L[0] & 5) throw L[1];
1976
+ return { value: L[0] ? L[1] : void 0, done: !0 };
1977
1977
  }
1978
1978
  }, m = function(d, v, w) {
1979
- d === void 0 && (d = document), v === void 0 && (v = x.g.CDN);
1979
+ d === void 0 && (d = document), v === void 0 && (v = D.g.CDN);
1980
1980
  var b = c.mermaidRenderAdapter.getElements(d);
1981
1981
  b.length !== 0 && (0, A.G)("".concat(v, "/dist/js/mermaid/mermaid.min.js?v=11.6.0"), "vditorMermaidScript").then(function() {
1982
1982
  var g = {
@@ -2003,7 +2003,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2003
2003
  };
2004
2004
  w === "dark" && (g.theme = "dark"), mermaid.initialize(g), b.forEach(function(s) {
2005
2005
  return y(void 0, void 0, void 0, function() {
2006
- var C, _, D, M, P;
2006
+ var C, _, x, L, P;
2007
2007
  return p(this, function(F) {
2008
2008
  switch (F.label) {
2009
2009
  case 0:
@@ -2016,10 +2016,10 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2016
2016
  case 1:
2017
2017
  return F.trys.push([1, 3, , 4]), [4, mermaid.render(_, s.textContent)];
2018
2018
  case 2:
2019
- return D = F.sent(), s.innerHTML = D.svg, [3, 4];
2019
+ return x = F.sent(), s.innerHTML = x.svg, [3, 4];
2020
2020
  case 3:
2021
- return M = F.sent(), P = document.querySelector("#" + _), s.innerHTML = "".concat(P.outerHTML, `<br>
2022
- <div style="text-align: left"><small>`).concat(M.message.replace(/\n/, "<br>"), "</small></div>"), P.parentElement.remove(), [3, 4];
2021
+ return L = F.sent(), P = document.querySelector("#" + _), s.innerHTML = "".concat(P.outerHTML, `<br>
2022
+ <div style="text-align: left"><small>`).concat(L.message.replace(/\n/, "<br>"), "</small></div>"), P.parentElement.remove(), [3, 4];
2023
2023
  case 4:
2024
2024
  return s.setAttribute("data-processed", "true"), [
2025
2025
  2
@@ -2036,8 +2036,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2036
2036
  /***/
2037
2037
  194: (
2038
2038
  /***/
2039
- ((Z, E, L) => {
2040
- L.d(E, {
2039
+ ((Z, E, M) => {
2040
+ M.d(E, {
2041
2041
  /* harmony export */
2042
2042
  P: () => (
2043
2043
  /* binding */
@@ -2045,8 +2045,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2045
2045
  )
2046
2046
  /* harmony export */
2047
2047
  });
2048
- var x = L(145), A = L(413), c = L(840), l = function(y, p, m) {
2049
- y === void 0 && (y = document), p === void 0 && (p = x.g.CDN);
2048
+ var D = M(145), A = M(413), c = M(840), l = function(y, p, m) {
2049
+ y === void 0 && (y = document), p === void 0 && (p = D.g.CDN);
2050
2050
  var d = c.mindmapRenderAdapter.getElements(y);
2051
2051
  d.length > 0 && (0, A.G)("".concat(p, "/dist/js/echarts/echarts.min.js?v=5.5.1"), "vditorEchartsScript").then(function() {
2052
2052
  d.forEach(function(v) {
@@ -2105,8 +2105,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2105
2105
  /***/
2106
2106
  436: (
2107
2107
  /***/
2108
- ((Z, E, L) => {
2109
- L.d(E, {
2108
+ ((Z, E, M) => {
2109
+ M.d(E, {
2110
2110
  /* harmony export */
2111
2111
  k: () => (
2112
2112
  /* binding */
@@ -2114,10 +2114,10 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2114
2114
  )
2115
2115
  /* harmony export */
2116
2116
  });
2117
- var x = L(771), A = L(472), c = function(l, y, p) {
2117
+ var D = M(771), A = M(472), c = function(l, y, p) {
2118
2118
  var m = "", d = [];
2119
2119
  if (Array.from(l.children).forEach(function(g, s) {
2120
- if ((0, x.W)(g)) {
2120
+ if ((0, D.W)(g)) {
2121
2121
  if (p) {
2122
2122
  var C = g.id.lastIndexOf("_");
2123
2123
  g.id = g.id.substring(0, C === -1 ? void 0 : C) + "_" + s;
@@ -2174,8 +2174,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2174
2174
  /***/
2175
2175
  229: (
2176
2176
  /***/
2177
- ((Z, E, L) => {
2178
- L.d(E, {
2177
+ ((Z, E, M) => {
2178
+ M.d(E, {
2179
2179
  /* harmony export */
2180
2180
  B: () => (
2181
2181
  /* binding */
@@ -2183,8 +2183,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2183
2183
  )
2184
2184
  /* harmony export */
2185
2185
  });
2186
- var x = L(145), A = L(413), c = L(840), l = function(y, p) {
2187
- y === void 0 && (y = document), p === void 0 && (p = x.g.CDN);
2186
+ var D = M(145), A = M(413), c = M(840), l = function(y, p) {
2187
+ y === void 0 && (y = document), p === void 0 && (p = D.g.CDN);
2188
2188
  var m = c.plantumlRenderAdapter.getElements(y);
2189
2189
  m.length !== 0 && (0, A.G)("".concat(p, "/dist/js/plantuml/plantuml-encoder.min.js"), "vditorPlantumlScript").then(function() {
2190
2190
  m.forEach(function(d) {
@@ -2205,16 +2205,16 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2205
2205
  /***/
2206
2206
  214: (
2207
2207
  /***/
2208
- ((Z, E, L) => {
2209
- L.d(E, {
2208
+ ((Z, E, M) => {
2209
+ M.d(E, {
2210
2210
  /* harmony export */
2211
2211
  X: () => (
2212
2212
  /* binding */
2213
- x
2213
+ D
2214
2214
  )
2215
2215
  /* harmony export */
2216
2216
  });
2217
- var x = function(A) {
2217
+ var D = function(A) {
2218
2218
  var c = Lute.New();
2219
2219
  return c.PutEmojis(A.emojis), c.SetEmojiSite(A.emojiSite), c.SetHeadingAnchor(A.headingAnchor), c.SetInlineMathAllowDigitAfterOpenMarker(A.inlineMathDigit), c.SetAutoSpace(A.autoSpace), c.SetToC(A.toc), c.SetFootnotes(A.footnotes), c.SetFixTermTypo(A.fixTermTypo), c.SetVditorCodeBlockPreview(A.codeBlockPreview), c.SetVditorMathBlockPreview(A.mathBlockPreview), c.SetSanitize(A.sanitize), c.SetChineseParagraphBeginningSpace(A.paragraphBeginningSpace), c.SetRenderListStyle(A.listStyle), c.SetLinkBase(A.linkBase), c.SetLinkPrefix(A.linkPrefix), c.SetMark(A.mark), c.SetGFMAutoLink(A.gfmAutoLink), A.lazyLoadImage && c.SetImageLazyLoading(A.lazyLoadImage), c;
2220
2220
  };
@@ -2223,16 +2223,16 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2223
2223
  /***/
2224
2224
  190: (
2225
2225
  /***/
2226
- ((Z, E, L) => {
2227
- L.d(E, {
2226
+ ((Z, E, M) => {
2227
+ M.d(E, {
2228
2228
  /* harmony export */
2229
2229
  E: () => (
2230
2230
  /* binding */
2231
- x
2231
+ D
2232
2232
  )
2233
2233
  /* harmony export */
2234
2234
  });
2235
- var x = function(A, c, l) {
2235
+ var D = function(A, c, l) {
2236
2236
  l === void 0 && (l = "classic");
2237
2237
  var y = A.getBoundingClientRect(), p = 36;
2238
2238
  document.body.insertAdjacentHTML("beforeend", '<div class="vditor vditor-img'.concat(l === "dark" ? " vditor--dark" : "", `">
@@ -2268,8 +2268,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2268
2268
  /***/
2269
2269
  580: (
2270
2270
  /***/
2271
- ((Z, E, L) => {
2272
- L.d(E, {
2271
+ ((Z, E, M) => {
2272
+ M.d(E, {
2273
2273
  /* harmony export */
2274
2274
  Y: () => (
2275
2275
  /* binding */
@@ -2277,8 +2277,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2277
2277
  )
2278
2278
  /* harmony export */
2279
2279
  });
2280
- var x = L(145), A = L(290), c = function(l, y) {
2281
- y === void 0 && (y = x.g.CDN), x.g.CODE_THEME.includes(l) || (l = "github");
2280
+ var D = M(145), A = M(290), c = function(l, y) {
2281
+ y === void 0 && (y = D.g.CDN), D.g.CODE_THEME.includes(l) || (l = "github");
2282
2282
  var p = document.getElementById("vditorHljsStyle"), m = "".concat(y, "/dist/js/highlight.js/styles/").concat(l, ".min.css");
2283
2283
  p ? p.getAttribute("href") !== m && (p.remove(), (0, A.c)(m, "vditorHljsStyle")) : (0, A.c)(m, "vditorHljsStyle");
2284
2284
  };
@@ -2287,8 +2287,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2287
2287
  /***/
2288
2288
  538: (
2289
2289
  /***/
2290
- ((Z, E, L) => {
2291
- L.d(E, {
2290
+ ((Z, E, M) => {
2291
+ M.d(E, {
2292
2292
  /* harmony export */
2293
2293
  Z: () => (
2294
2294
  /* binding */
@@ -2296,10 +2296,10 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2296
2296
  )
2297
2297
  /* harmony export */
2298
2298
  });
2299
- var x = L(290), A = function(c, l) {
2299
+ var D = M(290), A = function(c, l) {
2300
2300
  if (!(!c || !l)) {
2301
2301
  var y = document.getElementById("vditorContentTheme"), p = "".concat(l, "/").concat(c, ".css");
2302
- y ? y.getAttribute("href") !== p && (y.remove(), (0, x.c)(p, "vditorContentTheme")) : (0, x.c)(p, "vditorContentTheme");
2302
+ y ? y.getAttribute("href") !== p && (y.remove(), (0, D.c)(p, "vditorContentTheme")) : (0, D.c)(p, "vditorContentTheme");
2303
2303
  }
2304
2304
  };
2305
2305
  })
@@ -2307,12 +2307,12 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2307
2307
  /***/
2308
2308
  413: (
2309
2309
  /***/
2310
- ((Z, E, L) => {
2311
- L.d(E, {
2310
+ ((Z, E, M) => {
2311
+ M.d(E, {
2312
2312
  /* harmony export */
2313
2313
  J: () => (
2314
2314
  /* binding */
2315
- x
2315
+ D
2316
2316
  ),
2317
2317
  /* harmony export */
2318
2318
  G: () => (
@@ -2321,7 +2321,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2321
2321
  )
2322
2322
  /* harmony export */
2323
2323
  });
2324
- var x = function(c, l) {
2324
+ var D = function(c, l) {
2325
2325
  if (document.getElementById(l))
2326
2326
  return !1;
2327
2327
  var y = new XMLHttpRequest();
@@ -2347,16 +2347,16 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2347
2347
  /***/
2348
2348
  290: (
2349
2349
  /***/
2350
- ((Z, E, L) => {
2351
- L.d(E, {
2350
+ ((Z, E, M) => {
2351
+ M.d(E, {
2352
2352
  /* harmony export */
2353
2353
  c: () => (
2354
2354
  /* binding */
2355
- x
2355
+ D
2356
2356
  )
2357
2357
  /* harmony export */
2358
2358
  });
2359
- var x = function(A, c) {
2359
+ var D = function(A, c) {
2360
2360
  if (!document.getElementById(c)) {
2361
2361
  var l = document.createElement("link");
2362
2362
  l.id = c, l.rel = "stylesheet", l.type = "text/css", l.href = A, document.getElementsByTagName("head")[0].appendChild(l);
@@ -2367,16 +2367,16 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2367
2367
  /***/
2368
2368
  105: (
2369
2369
  /***/
2370
- ((Z, E, L) => {
2371
- L.d(E, {
2370
+ ((Z, E, M) => {
2371
+ M.d(E, {
2372
2372
  /* harmony export */
2373
2373
  X: () => (
2374
2374
  /* binding */
2375
- x
2375
+ D
2376
2376
  )
2377
2377
  /* harmony export */
2378
2378
  });
2379
- var x = function(A) {
2379
+ var D = function(A) {
2380
2380
  return A.replace(/\u00a0/g, " ");
2381
2381
  };
2382
2382
  })
@@ -2384,12 +2384,12 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2384
2384
  /***/
2385
2385
  410: (
2386
2386
  /***/
2387
- ((Z, E, L) => {
2388
- L.d(E, {
2387
+ ((Z, E, M) => {
2388
+ M.d(E, {
2389
2389
  /* harmony export */
2390
2390
  G6: () => (
2391
2391
  /* binding */
2392
- x
2392
+ D
2393
2393
  ),
2394
2394
  /* harmony export */
2395
2395
  vU: () => (
@@ -2423,7 +2423,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2423
2423
  )
2424
2424
  /* harmony export */
2425
2425
  });
2426
- var x = function() {
2426
+ var D = function() {
2427
2427
  return navigator.userAgent.indexOf("Safari") > -1 && navigator.userAgent.indexOf("Chrome") === -1;
2428
2428
  }, A = function() {
2429
2429
  return navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
@@ -2447,12 +2447,12 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2447
2447
  /***/
2448
2448
  494: (
2449
2449
  /***/
2450
- ((Z, E, L) => {
2451
- L.d(E, {
2450
+ ((Z, E, M) => {
2451
+ M.d(E, {
2452
2452
  /* harmony export */
2453
2453
  Wb: () => (
2454
2454
  /* binding */
2455
- x
2455
+ D
2456
2456
  ),
2457
2457
  /* harmony export */
2458
2458
  on: () => (
@@ -2466,7 +2466,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2466
2466
  )
2467
2467
  /* harmony export */
2468
2468
  });
2469
- var x = function() {
2469
+ var D = function() {
2470
2470
  return ([1e7].toString() + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, function(l) {
2471
2471
  return (parseInt(l, 10) ^ window.crypto.getRandomValues(new Uint32Array(1))[0] & 15 >> parseInt(l, 10) / 4).toString(16);
2472
2472
  });
@@ -2482,8 +2482,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2482
2482
  /***/
2483
2483
  106: (
2484
2484
  /***/
2485
- ((Z, E, L) => {
2486
- L.d(E, {
2485
+ ((Z, E, M) => {
2486
+ M.d(E, {
2487
2487
  /* harmony export */
2488
2488
  JQ: () => (
2489
2489
  /* binding */
@@ -2526,13 +2526,13 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2526
2526
  )
2527
2527
  /* harmony export */
2528
2528
  });
2529
- var x = L(771), A = function(w, b) {
2529
+ var D = M(771), A = function(w, b) {
2530
2530
  for (var g = d(w, b), s = !1, C = !1; g && !g.classList.contains("vditor-reset") && !C; )
2531
2531
  s = d(g.parentElement, b), s ? g = s : C = !0;
2532
2532
  return g || !1;
2533
2533
  }, c = function(w, b) {
2534
- for (var g = (0, x.S)(w, b), s = !1, C = !1; g && !g.classList.contains("vditor-reset") && !C; )
2535
- s = (0, x.S)(g.parentElement, b), s ? g = s : C = !0;
2534
+ for (var g = (0, D.S)(w, b), s = !1, C = !1; g && !g.classList.contains("vditor-reset") && !C; )
2535
+ s = (0, D.S)(g.parentElement, b), s ? g = s : C = !0;
2536
2536
  return g || !1;
2537
2537
  }, l = function(w) {
2538
2538
  var b = c(w, "UL"), g = c(w, "OL"), s = b;
@@ -2578,12 +2578,12 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2578
2578
  /***/
2579
2579
  771: (
2580
2580
  /***/
2581
- ((Z, E, L) => {
2582
- L.d(E, {
2581
+ ((Z, E, M) => {
2582
+ M.d(E, {
2583
2583
  /* harmony export */
2584
2584
  S: () => (
2585
2585
  /* binding */
2586
- x
2586
+ D
2587
2587
  ),
2588
2588
  /* harmony export */
2589
2589
  W: () => (
@@ -2592,7 +2592,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2592
2592
  )
2593
2593
  /* harmony export */
2594
2594
  });
2595
- var x = function(c, l) {
2595
+ var D = function(c, l) {
2596
2596
  if (!c)
2597
2597
  return !1;
2598
2598
  c.nodeType === 3 && (c = c.parentElement);
@@ -2600,7 +2600,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2600
2600
  y.nodeName.indexOf(l) === 0 ? p = !0 : y = y.parentElement;
2601
2601
  return p && y;
2602
2602
  }, A = function(c) {
2603
- var l = x(c, "H");
2603
+ var l = D(c, "H");
2604
2604
  return l && l.tagName.length === 2 && l.tagName !== "HR" ? l : !1;
2605
2605
  };
2606
2606
  })
@@ -2608,21 +2608,21 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2608
2608
  /***/
2609
2609
  673: (
2610
2610
  /***/
2611
- ((Z, E, L) => {
2612
- L.d(E, {
2611
+ ((Z, E, M) => {
2612
+ M.d(E, {
2613
2613
  /* harmony export */
2614
2614
  T: () => (
2615
2615
  /* binding */
2616
- x
2616
+ D
2617
2617
  )
2618
2618
  /* harmony export */
2619
2619
  });
2620
- var x = function() {
2620
+ var D = function() {
2621
2621
  for (var A = [], c = 0; c < arguments.length; c++)
2622
2622
  A[c] = arguments[c];
2623
2623
  for (var l = {}, y = function(m) {
2624
2624
  for (var d in m)
2625
- m.hasOwnProperty(d) && (Object.prototype.toString.call(m[d]) === "[object Object]" ? l[d] = x(l[d], m[d]) : l[d] = m[d]);
2625
+ m.hasOwnProperty(d) && (Object.prototype.toString.call(m[d]) === "[object Object]" ? l[d] = D(l[d], m[d]) : l[d] = m[d]);
2626
2626
  }, p = 0; p < A.length; p++)
2627
2627
  y(A[p]);
2628
2628
  return l;
@@ -2632,8 +2632,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2632
2632
  /***/
2633
2633
  810: (
2634
2634
  /***/
2635
- ((Z, E, L) => {
2636
- L.d(E, {
2635
+ ((Z, E, M) => {
2636
+ M.d(E, {
2637
2637
  /* harmony export */
2638
2638
  zh: () => (
2639
2639
  /* binding */
@@ -2676,7 +2676,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2676
2676
  )
2677
2677
  /* harmony export */
2678
2678
  });
2679
- var x = L(145), A = L(410), c = L(106), l = function(g) {
2679
+ var D = M(145), A = M(410), c = M(106), l = function(g) {
2680
2680
  var s, C = g[g.currentMode].element;
2681
2681
  return getSelection().rangeCount > 0 && (s = getSelection().getRangeAt(0), C.isEqualNode(s.startContainer) || C.contains(s.startContainer)) ? s : g[g.currentMode].range ? g[g.currentMode].range : (C.focus(), s = C.ownerDocument.createRange(), s.setStart(C, 0), s.collapse(!0), s);
2682
2682
  }, y = function(g) {
@@ -2689,18 +2689,18 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2689
2689
  var C = g.parentElement.getBoundingClientRect(), _;
2690
2690
  if (s.getClientRects().length === 0)
2691
2691
  if (s.startContainer.nodeType === 3) {
2692
- var D = s.startContainer.parentElement;
2693
- if (D && D.getClientRects().length > 0)
2694
- _ = D.getClientRects()[0];
2692
+ var x = s.startContainer.parentElement;
2693
+ if (x && x.getClientRects().length > 0)
2694
+ _ = x.getClientRects()[0];
2695
2695
  else
2696
2696
  return {
2697
2697
  left: 0,
2698
2698
  top: 0
2699
2699
  };
2700
2700
  } else {
2701
- var M = s.startContainer.children;
2702
- if (M[s.startOffset] && M[s.startOffset].getClientRects().length > 0)
2703
- _ = M[s.startOffset].getClientRects()[0];
2701
+ var L = s.startContainer.children;
2702
+ if (L[s.startOffset] && L[s.startOffset].getClientRects().length > 0)
2703
+ _ = L[s.startOffset].getClientRects()[0];
2704
2704
  else if (s.startContainer.childNodes.length > 0) {
2705
2705
  var P = s.cloneRange();
2706
2706
  s.selectNode(s.startContainer.childNodes[Math.max(0, s.startOffset - 1)]), _ = s.getClientRects()[0], s.setEnd(P.endContainer, P.endOffset), s.setStart(P.startContainer, P.startOffset);
@@ -2740,23 +2740,23 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2740
2740
  C = window.getSelection().getRangeAt(0);
2741
2741
  }
2742
2742
  if (p(s, C)) {
2743
- var D = C.cloneRange();
2744
- g.childNodes[0] && g.childNodes[0].childNodes[0] ? D.setStart(g.childNodes[0].childNodes[0], 0) : D.selectNodeContents(g), D.setEnd(C.startContainer, C.startOffset), _.start = D.toString().length, _.end = _.start + C.toString().length;
2743
+ var x = C.cloneRange();
2744
+ g.childNodes[0] && g.childNodes[0].childNodes[0] ? x.setStart(g.childNodes[0].childNodes[0], 0) : x.selectNodeContents(g), x.setEnd(C.startContainer, C.startOffset), _.start = x.toString().length, _.end = _.start + C.toString().length;
2745
2745
  }
2746
2746
  return _;
2747
2747
  }, v = function(g, s, C) {
2748
- var _ = 0, D = 0, M = C.childNodes[D], P = !1, F = !1;
2748
+ var _ = 0, x = 0, L = C.childNodes[x], P = !1, F = !1;
2749
2749
  g = Math.max(0, g), s = Math.max(0, s);
2750
2750
  var z = C.ownerDocument.createRange();
2751
- for (z.setStart(M || C, 0), z.collapse(!0); !F && M; ) {
2752
- var Q = _ + M.textContent.length;
2753
- if (!P && g >= _ && g <= Q && (g === 0 ? z.setStart(M, 0) : M.childNodes[0].nodeType === 3 ? z.setStart(M.childNodes[0], g - _) : M.nextSibling ? z.setStartBefore(M.nextSibling) : z.setStartAfter(M), P = !0, g === s)) {
2751
+ for (z.setStart(L || C, 0), z.collapse(!0); !F && L; ) {
2752
+ var Q = _ + L.textContent.length;
2753
+ if (!P && g >= _ && g <= Q && (g === 0 ? z.setStart(L, 0) : L.childNodes[0].nodeType === 3 ? z.setStart(L.childNodes[0], g - _) : L.nextSibling ? z.setStartBefore(L.nextSibling) : z.setStartAfter(L), P = !0, g === s)) {
2754
2754
  F = !0;
2755
2755
  break;
2756
2756
  }
2757
- P && s >= _ && s <= Q && (s === 0 ? z.setEnd(M, 0) : M.childNodes[0].nodeType === 3 ? z.setEnd(M.childNodes[0], s - _) : M.nextSibling ? z.setEndBefore(M.nextSibling) : z.setEndAfter(M), F = !0), _ = Q, M = C.childNodes[++D];
2757
+ P && s >= _ && s <= Q && (s === 0 ? z.setEnd(L, 0) : L.childNodes[0].nodeType === 3 ? z.setEnd(L.childNodes[0], s - _) : L.nextSibling ? z.setEndBefore(L.nextSibling) : z.setEndAfter(L), F = !0), _ = Q, L = C.childNodes[++x];
2758
2758
  }
2759
- return !F && C.childNodes[D - 1] && z.setStartBefore(C.childNodes[D - 1]), m(z), z;
2759
+ return !F && C.childNodes[x - 1] && z.setStartBefore(C.childNodes[x - 1]), m(z), z;
2760
2760
  }, w = function(g, s) {
2761
2761
  var C = g.querySelector("wbr");
2762
2762
  if (C) {
@@ -2764,7 +2764,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2764
2764
  C.previousSibling ? s.setStart(C.previousSibling, C.previousSibling.textContent.length) : C.nextSibling ? C.nextSibling.nodeType === 3 ? s.setStart(C.nextSibling, 0) : s.setStartBefore(C.nextSibling) : s.setStart(C.parentElement, 0);
2765
2765
  else if (C.previousElementSibling.isSameNode(C.previousSibling))
2766
2766
  if (C.previousElementSibling.lastChild) {
2767
- s.setStartBefore(C), s.collapse(!0), m(s), (0, A.i7)() && (C.previousElementSibling.tagName === "EM" || C.previousElementSibling.tagName === "STRONG" || C.previousElementSibling.tagName === "S") && (s.insertNode(document.createTextNode(x.g.ZWSP)), s.collapse(!1)), C.remove();
2767
+ s.setStartBefore(C), s.collapse(!0), m(s), (0, A.i7)() && (C.previousElementSibling.tagName === "EM" || C.previousElementSibling.tagName === "STRONG" || C.previousElementSibling.tagName === "S") && (s.insertNode(document.createTextNode(D.g.ZWSP)), s.collapse(!1)), C.remove();
2768
2768
  return;
2769
2769
  } else
2770
2770
  s.setStartAfter(C.previousElementSibling);
@@ -2777,22 +2777,22 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2777
2777
  C.innerHTML = g;
2778
2778
  var _ = C.querySelectorAll("p");
2779
2779
  _.length === 1 && !_[0].previousSibling && !_[0].nextSibling && s[s.currentMode].element.children.length > 0 && C.firstElementChild.tagName === "P" && (g = _[0].innerHTML.trim());
2780
- var D = document.createElement("div");
2781
- D.innerHTML = g;
2782
- var M = l(s);
2783
- if (M.toString() !== "" && (s[s.currentMode].preventInput = !0, document.execCommand("delete", !1, "")), D.firstElementChild && D.firstElementChild.getAttribute("data-block") === "0") {
2784
- D.lastElementChild.insertAdjacentHTML("beforeend", "<wbr>");
2785
- var P = (0, c.F9)(M.startContainer);
2780
+ var x = document.createElement("div");
2781
+ x.innerHTML = g;
2782
+ var L = l(s);
2783
+ if (L.toString() !== "" && (s[s.currentMode].preventInput = !0, document.execCommand("delete", !1, "")), x.firstElementChild && x.firstElementChild.getAttribute("data-block") === "0") {
2784
+ x.lastElementChild.insertAdjacentHTML("beforeend", "<wbr>");
2785
+ var P = (0, c.F9)(L.startContainer);
2786
2786
  if (!P)
2787
- s[s.currentMode].element.insertAdjacentHTML("beforeend", D.innerHTML);
2787
+ s[s.currentMode].element.insertAdjacentHTML("beforeend", x.innerHTML);
2788
2788
  else {
2789
- var F = (0, c.lG)(M.startContainer, "LI");
2790
- F && D.firstElementChild.tagName === "UL" ? F.insertAdjacentHTML("afterend", D.firstElementChild.innerHTML) : P.insertAdjacentHTML("afterend", D.innerHTML);
2789
+ var F = (0, c.lG)(L.startContainer, "LI");
2790
+ F && x.firstElementChild.tagName === "UL" ? F.insertAdjacentHTML("afterend", x.firstElementChild.innerHTML) : P.insertAdjacentHTML("afterend", x.innerHTML);
2791
2791
  }
2792
- w(s[s.currentMode].element, M);
2792
+ w(s[s.currentMode].element, L);
2793
2793
  } else {
2794
2794
  var z = document.createElement("template");
2795
- z.innerHTML = g, M.insertNode(z.content.cloneNode(!0)), M.collapse(!1), m(M);
2795
+ z.innerHTML = g, L.insertNode(z.content.cloneNode(!0)), L.collapse(!1), m(L);
2796
2796
  }
2797
2797
  };
2798
2798
  })
@@ -2803,7 +2803,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2803
2803
  var E = nt[Z];
2804
2804
  if (E !== void 0)
2805
2805
  return E.exports;
2806
- var L = nt[Z] = {
2806
+ var M = nt[Z] = {
2807
2807
  /******/
2808
2808
  // no module.id needed
2809
2809
  /******/
@@ -2812,24 +2812,24 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2812
2812
  exports: {}
2813
2813
  /******/
2814
2814
  };
2815
- return pt[Z](L, L.exports, Y), L.exports;
2815
+ return pt[Z](M, M.exports, Y), M.exports;
2816
2816
  }
2817
2817
  Y.d = (Z, E) => {
2818
- for (var L in E)
2819
- Y.o(E, L) && !Y.o(Z, L) && Object.defineProperty(Z, L, { enumerable: !0, get: E[L] });
2818
+ for (var M in E)
2819
+ Y.o(E, M) && !Y.o(Z, M) && Object.defineProperty(Z, M, { enumerable: !0, get: E[M] });
2820
2820
  }, Y.o = (Z, E) => Object.prototype.hasOwnProperty.call(Z, E), Y.r = (Z) => {
2821
2821
  typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(Z, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(Z, "__esModule", { value: !0 });
2822
2822
  };
2823
- var ke = {};
2823
+ var Le = {};
2824
2824
  return (() => {
2825
- Y.d(ke, {
2825
+ Y.d(Le, {
2826
2826
  default: () => (
2827
2827
  /* binding */
2828
2828
  _i
2829
2829
  )
2830
2830
  });
2831
- var Z = Y(408), E = Y(145), L = Y(105), x = function(e) {
2832
- return e.currentMode === "sv" ? (0, L.X)("".concat(e.sv.element.textContent, `
2831
+ var Z = Y(408), E = Y(145), M = Y(105), D = function(e) {
2832
+ return e.currentMode === "sv" ? (0, M.X)("".concat(e.sv.element.textContent, `
2833
2833
  `).replace(/\n\n$/, `
2834
2834
  `)) : e.currentMode === "wysiwyg" ? e.lute.VditorDOM2Md(e.wysiwyg.element.innerHTML) : e.currentMode === "ir" ? e.lute.VditorIRDOM2Md(e.ir.element.innerHTML) : "";
2835
2835
  }, A = Y(413), c = (
@@ -2846,7 +2846,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2846
2846
  n.element.lastElementChild.style.display = "block", n.element.firstElementChild.innerHTML = "", n.ASTChart.setOption({
2847
2847
  series: [
2848
2848
  {
2849
- data: JSON.parse(t.lute.RenderEChartsJSON(x(t))),
2849
+ data: JSON.parse(t.lute.RenderEChartsJSON(D(t))),
2850
2850
  initialTreeDepth: -1,
2851
2851
  label: {
2852
2852
  align: "left",
@@ -2943,7 +2943,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2943
2943
  });
2944
2944
  }, s = Y(106), C = Y(771), _ = function(e, t, n, r) {
2945
2945
  r && console.log("".concat(e, " - ").concat(n, ": ").concat(t));
2946
- }, D = Y(135), M = Y(775), P = Y(428), F = Y(325), z = Y(483), Q = Y(999), ne = Y(472), oe = Y(637), me = Y(11), fe = Y(194), le = Y(229), we = Y(825), Te = function(e, t, n) {
2946
+ }, x = Y(135), L = Y(775), P = Y(428), F = Y(325), z = Y(483), Q = Y(999), ne = Y(472), oe = Y(637), me = Y(11), fe = Y(194), le = Y(229), ve = Y(825), Te = function(e, t, n) {
2947
2947
  n === void 0 && (n = "sv");
2948
2948
  var r = document.createElement("div");
2949
2949
  r.innerHTML = e;
@@ -2956,7 +2956,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2956
2956
  return /\n/.test(o) || a.length === 1 ? n === "wysiwyg" ? '<div class="vditor-wysiwyg__block" data-block="0" data-type="code-block"><pre><code>'.concat(o.replace(/&/g, "&amp;").replace(/</g, "&lt;"), "<wbr></code></pre></div>") : "\n```\n" + o.replace(/&/g, "&amp;").replace(/</g, "&lt;") + "\n```" : n === "wysiwyg" ? "<code>".concat(o.replace(/&/g, "&amp;").replace(/</g, "&lt;"), "</code><wbr>") : "`".concat(o, "`");
2957
2957
  }
2958
2958
  return !1;
2959
- }, ve = function(e, t) {
2959
+ }, Ee = function(e, t) {
2960
2960
  if (e) {
2961
2961
  if (e.parentElement.getAttribute("data-type") === "html-block") {
2962
2962
  e.setAttribute("data-render", "1");
@@ -2964,17 +2964,17 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
2964
2964
  }
2965
2965
  var n = e.firstElementChild.className.replace("language-", "");
2966
2966
  if (n === "abc")
2967
- (0, D.Q)(e, t.options.cdn);
2967
+ (0, x.Q)(e, t.options.cdn);
2968
2968
  else if (n === "mermaid")
2969
2969
  (0, oe.i)(e, t.options.cdn, t.options.theme);
2970
2970
  else if (n === "smiles")
2971
- (0, we.J)(e, t.options.cdn, t.options.theme);
2971
+ (0, ve.J)(e, t.options.cdn, t.options.theme);
2972
2972
  else if (n === "markmap")
2973
2973
  (0, me.K)(e, t.options.cdn);
2974
2974
  else if (n === "flowchart")
2975
2975
  (0, F.P)(e, t.options.cdn);
2976
2976
  else if (n === "echarts")
2977
- (0, M.p)(e, t.options.cdn, t.options.theme);
2977
+ (0, L.p)(e, t.options.cdn, t.options.theme);
2978
2978
  else if (n === "mindmap")
2979
2979
  (0, fe.P)(e, t.options.cdn, t.options.theme);
2980
2980
  else if (n === "plantuml")
@@ -3058,14 +3058,14 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3058
3058
  break;
3059
3059
  }
3060
3060
  if (o) {
3061
- typeof e.options.input == "function" && e.options.input(x(e));
3061
+ typeof e.options.input == "function" && e.options.input(D(e));
3062
3062
  return;
3063
3063
  }
3064
3064
  if (h && /^#{1,6} $/.test(i.textContent) && (h = !1), h) {
3065
3065
  var f = (0, s.fb)(t.startContainer, "vditor-ir__marker");
3066
3066
  if (!f) {
3067
3067
  var S = t.startContainer.previousSibling;
3068
- S && S.nodeType !== 3 && S.classList.contains("vditor-ir__node--expand") && S.classList.remove("vditor-ir__node--expand"), typeof e.options.input == "function" && e.options.input(x(e));
3068
+ S && S.nodeType !== 3 && S.classList.contains("vditor-ir__node--expand") && S.classList.remove("vditor-ir__node--expand"), typeof e.options.input == "function" && e.options.input(D(e));
3069
3069
  return;
3070
3070
  }
3071
3071
  }
@@ -3107,11 +3107,11 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3107
3107
  Ae.forEach(function($, be) {
3108
3108
  be === 0 ? ue = $ : (ue.insertAdjacentHTML("beforeend", $.innerHTML), $.remove());
3109
3109
  }), Ae.length > 0 && e.ir.element.insertAdjacentElement("beforeend", Ae[0]);
3110
- var Me, xe = e.ir.element.querySelectorAll("[data-type='footnotes-block']");
3110
+ var ke, xe = e.ir.element.querySelectorAll("[data-type='footnotes-block']");
3111
3111
  xe.forEach(function($, be) {
3112
- be === 0 ? Me = $ : (Me.insertAdjacentHTML("beforeend", $.innerHTML), $.remove());
3112
+ be === 0 ? ke = $ : (ke.insertAdjacentHTML("beforeend", $.innerHTML), $.remove());
3113
3113
  }), xe.length > 0 && e.ir.element.insertAdjacentElement("beforeend", xe[0]), (0, k.ib)(e.ir.element, t), e.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function($) {
3114
- ve($, e);
3114
+ Ee($, e);
3115
3115
  }), je(e), Ve(e, {
3116
3116
  enableAddUndoStack: !0,
3117
3117
  enableHint: !0,
@@ -3274,7 +3274,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3274
3274
  break;
3275
3275
  }
3276
3276
  if (o === 0 && (u = !1), u) {
3277
- Ee(e);
3277
+ Se(e);
3278
3278
  return;
3279
3279
  }
3280
3280
  if (t.inputType === "deleteContentBackward") {
@@ -3283,14 +3283,14 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3283
3283
  if (f.getAttribute("data-type") === "code-block-close-marker") {
3284
3284
  var S = bt(i, "code-block-open-marker");
3285
3285
  if (S) {
3286
- S.textContent = f.textContent, Ee(e);
3286
+ S.textContent = f.textContent, Se(e);
3287
3287
  return;
3288
3288
  }
3289
3289
  }
3290
3290
  if (f.getAttribute("data-type") === "code-block-open-marker") {
3291
3291
  var S = bt(i, "code-block-close-marker", !1);
3292
3292
  if (S) {
3293
- S.textContent = f.textContent, Ee(e);
3293
+ S.textContent = f.textContent, Se(e);
3294
3294
  return;
3295
3295
  }
3296
3296
  }
@@ -3298,7 +3298,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3298
3298
  var T = (0, s.a1)(i, "data-type", "math-block-open-marker");
3299
3299
  if (T) {
3300
3300
  var N = T.nextElementSibling.nextElementSibling;
3301
- N && N.getAttribute("data-type") === "math-block-close-marker" && (N.remove(), Ee(e));
3301
+ N && N.getAttribute("data-type") === "math-block-close-marker" && (N.remove(), Se(e));
3302
3302
  return;
3303
3303
  }
3304
3304
  a.querySelectorAll('[data-type="code-block-open-marker"]').forEach(function(O) {
@@ -3308,17 +3308,17 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3308
3308
  });
3309
3309
  var R = (0, s.a1)(i, "data-type", "heading-marker");
3310
3310
  if (R && R.textContent.indexOf("#") === -1) {
3311
- Ee(e);
3311
+ Se(e);
3312
3312
  return;
3313
3313
  }
3314
3314
  }
3315
3315
  if ((t.data === " " || t.inputType === "deleteContentBackward") && ((0, s.a1)(i, "data-type", "padding") || (0, s.a1)(i, "data-type", "li-marker") || (0, s.a1)(i, "data-type", "task-marker") || (0, s.a1)(i, "data-type", "blockquote-marker"))) {
3316
- Ee(e);
3316
+ Se(e);
3317
3317
  return;
3318
3318
  }
3319
3319
  }
3320
3320
  if (a && a.textContent.trimRight() === "$$") {
3321
- Ee(e);
3321
+ Se(e);
3322
3322
  return;
3323
3323
  }
3324
3324
  a || (a = e.sv.element), ((n = a.firstElementChild) === null || n === void 0 ? void 0 : n.getAttribute("data-type")) === "link-ref-defs-block" && (a = e.sv.element), (0, s.a1)(i, "data-type", "footnotes-link") && (a = e.sv.element), a.textContent.indexOf(Lute.Caret) === -1 && r.insertNode(document.createTextNode(Lute.Caret)), a.querySelectorAll("[style]").forEach(function(O) {
@@ -3345,12 +3345,12 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3345
3345
  e.sv.element.insertAdjacentElement("beforeend", O.parentElement);
3346
3346
  }), ge(e.sv.element, function(O) {
3347
3347
  e.sv.element.insertAdjacentElement("beforeend", O);
3348
- }), (0, k.ib)(e.sv.element, r), ye(e), Ee(e, {
3348
+ }), (0, k.ib)(e.sv.element, r), ye(e), Se(e, {
3349
3349
  enableAddUndoStack: !0,
3350
3350
  enableHint: !0,
3351
3351
  enableInput: !0
3352
3352
  });
3353
- }, Le = function(e, t) {
3353
+ }, Me = function(e, t) {
3354
3354
  var n, r, i, a, o;
3355
3355
  if (e.sv.composingLock = t.isComposing, t.isComposing || (t.key.indexOf("Arrow") === -1 && t.key !== "Meta" && t.key !== "Control" && t.key !== "Alt" && t.key !== "Shift" && t.key !== "CapsLock" && t.key !== "Escape" && !/^F\d{1,2}$/.test(t.key) && e.undo.recordFirstPosition(e, t), t.key !== "Enter" && t.key !== "Tab" && t.key !== "Backspace" && t.key.indexOf("Arrow") === -1 && !(0, l.yl)(t) && t.key !== "Escape"))
3356
3356
  return !1;
@@ -3358,13 +3358,13 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3358
3358
  u.startContainer.nodeType !== 3 && u.startContainer.tagName === "DIV" && (h = u.startContainer.childNodes[u.startOffset - 1]);
3359
3359
  var f = (0, s.a1)(h, "data-type", "text"), S = (0, s.a1)(h, "data-type", "blockquote-marker");
3360
3360
  if (!S && u.startOffset === 0 && f && f.previousElementSibling && f.previousElementSibling.getAttribute("data-type") === "blockquote-marker" && (S = f.previousElementSibling), S && t.key === "Enter" && !(0, l.yl)(t) && !t.altKey && S.nextElementSibling.textContent.trim() === "" && (0, k.im)(S, e.sv.element, u).start === S.textContent.length)
3361
- return ((n = S.previousElementSibling) === null || n === void 0 ? void 0 : n.getAttribute("data-type")) === "padding" && S.previousElementSibling.setAttribute("data-action", "enter-remove"), S.remove(), Ee(e), t.preventDefault(), !0;
3361
+ return ((n = S.previousElementSibling) === null || n === void 0 ? void 0 : n.getAttribute("data-type")) === "padding" && S.previousElementSibling.setAttribute("data-action", "enter-remove"), S.remove(), Se(e), t.preventDefault(), !0;
3362
3362
  var T = (0, s.a1)(h, "data-type", "li-marker"), N = (0, s.a1)(h, "data-type", "task-marker"), R = T;
3363
3363
  if (R || N && N.nextElementSibling.getAttribute("data-type") !== "task-marker" && (R = N), !R && u.startOffset === 0 && f && f.previousElementSibling && (f.previousElementSibling.getAttribute("data-type") === "li-marker" || f.previousElementSibling.getAttribute("data-type") === "task-marker") && (R = f.previousElementSibling), R) {
3364
3364
  var H = (0, k.im)(R, e.sv.element, u).start, U = R.getAttribute("data-type") === "task-marker", B = R;
3365
3365
  if (U && (B = R.previousElementSibling.previousElementSibling.previousElementSibling), H === R.textContent.length) {
3366
3366
  if (t.key === "Enter" && !(0, l.yl)(t) && !t.altKey && !t.shiftKey && R.nextElementSibling.textContent.trim() === "")
3367
- return ((r = B.previousElementSibling) === null || r === void 0 ? void 0 : r.getAttribute("data-type")) === "padding" ? (B.previousElementSibling.remove(), ie(e)) : (U && (B.remove(), R.previousElementSibling.previousElementSibling.remove(), R.previousElementSibling.remove()), R.nextElementSibling.remove(), R.remove(), Ee(e)), t.preventDefault(), !0;
3367
+ return ((r = B.previousElementSibling) === null || r === void 0 ? void 0 : r.getAttribute("data-type")) === "padding" ? (B.previousElementSibling.remove(), ie(e)) : (U && (B.remove(), R.previousElementSibling.previousElementSibling.remove(), R.previousElementSibling.remove()), R.nextElementSibling.remove(), R.remove(), Se(e)), t.preventDefault(), !0;
3368
3368
  if (t.key === "Tab")
3369
3369
  return t.shiftKey ? B.previousElementSibling.getAttribute("data-type") === "padding" && B.previousElementSibling.remove() : B.insertAdjacentHTML("beforebegin", '<span data-type="padding">'.concat(B.textContent.replace(/\S/g, " "), "</span>")), /^\d/.test(B.textContent) && (B.textContent = B.textContent.replace(/^\d{1,}/, "1"), u.selectNodeContents(R.firstChild), u.collapse(!1)), ie(e), t.preventDefault(), !0;
3370
3370
  }
@@ -3379,19 +3379,19 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3379
3379
  `;
3380
3380
  if (G) {
3381
3381
  if (((i = G.previousElementSibling) === null || i === void 0 ? void 0 : i.getAttribute("data-action")) === "enter-remove")
3382
- return G.previousElementSibling.remove(), Ee(e), t.preventDefault(), !0;
3382
+ return G.previousElementSibling.remove(), Se(e), t.preventDefault(), !0;
3383
3383
  se += rr(G);
3384
3384
  }
3385
- return u.insertNode(document.createTextNode(se)), u.collapse(!1), O && O.textContent.trim() !== "" && !V ? ie(e) : Ee(e), t.preventDefault(), !0;
3385
+ return u.insertNode(document.createTextNode(se)), u.collapse(!1), O && O.textContent.trim() !== "" && !V ? ie(e) : Se(e), t.preventDefault(), !0;
3386
3386
  }
3387
3387
  if (t.key === "Backspace" && !(0, l.yl)(t) && !t.altKey && !t.shiftKey) {
3388
3388
  if (G && ((a = G.previousElementSibling) === null || a === void 0 ? void 0 : a.getAttribute("data-type")) === "newline" && (0, k.im)(G, e.sv.element, u).start === 1 && // 飘号的处理需在 inputEvent 中,否则上下飘号对不齐
3389
3389
  G.getAttribute("data-type").indexOf("code-block-") === -1)
3390
- return u.setStart(G, 0), u.extractContents(), G.textContent.trim() !== "" ? ie(e) : Ee(e), t.preventDefault(), !0;
3390
+ return u.setStart(G, 0), u.extractContents(), G.textContent.trim() !== "" ? ie(e) : Se(e), t.preventDefault(), !0;
3391
3391
  if (O && (0, k.im)(O, e.sv.element, u).start === 0 && O.previousElementSibling) {
3392
3392
  u.extractContents();
3393
3393
  var ae = O.previousElementSibling.lastElementChild;
3394
- return ae.getAttribute("data-type") === "newline" && (ae.remove(), ae = O.previousElementSibling.lastElementChild), ae.getAttribute("data-type") !== "newline" && (ae.insertAdjacentHTML("afterend", O.innerHTML), O.remove()), O.textContent.trim() !== "" && !(!((o = O.previousElementSibling) === null || o === void 0) && o.querySelector('[data-type="code-block-open-marker"]')) ? ie(e) : (ae.getAttribute("data-type") !== "newline" && (u.selectNodeContents(ae.lastChild), u.collapse(!1)), Ee(e)), t.preventDefault(), !0;
3394
+ return ae.getAttribute("data-type") === "newline" && (ae.remove(), ae = O.previousElementSibling.lastElementChild), ae.getAttribute("data-type") !== "newline" && (ae.insertAdjacentHTML("afterend", O.innerHTML), O.remove()), O.textContent.trim() !== "" && !(!((o = O.previousElementSibling) === null || o === void 0) && o.querySelector('[data-type="code-block-open-marker"]')) ? ie(e) : (ae.getAttribute("data-type") !== "newline" && (u.selectNodeContents(ae.lastChild), u.collapse(!1)), Se(e)), t.preventDefault(), !0;
3395
3395
  }
3396
3396
  }
3397
3397
  return !1;
@@ -3513,7 +3513,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3513
3513
  enableInput: !0
3514
3514
  }), t.enableHint && e.hint.render(e), clearTimeout(e.wysiwyg.afterRenderTimeoutId), e.wysiwyg.afterRenderTimeoutId = window.setTimeout(function() {
3515
3515
  if (!e.wysiwyg.composingLock) {
3516
- var n = x(e);
3516
+ var n = D(e);
3517
3517
  typeof e.options.input == "function" && t.enableInput && e.options.input(n), e.options.counter.enable && e.counter.render(e, n), e.options.cache.enable && (0, l.pK)() && (localStorage.setItem(e.options.cache.id, n), e.options.cache.after && e.options.cache.after(n)), e.devtools && e.devtools.renderEchart(e), t.enableAddUndoStack && e.undo.addToUndoStack(e);
3518
3518
  }
3519
3519
  }, e.options.undoDelay);
@@ -3769,7 +3769,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3769
3769
  for (var tt = q - 1; tt >= Ke; tt--)
3770
3770
  f.rows[tt].remove(), f.rows.length === 1 && f.querySelector("tbody").remove();
3771
3771
  }
3772
- typeof e.options.input == "function" && e.options.input(x(e));
3772
+ typeof e.options.input == "function" && e.options.input(D(e));
3773
3773
  }
3774
3774
  }, H = function(q) {
3775
3775
  Et(f, q), q === "right" ? (G.classList.remove("vditor-icon--current"), V.classList.remove("vditor-icon--current"), J.classList.add("vditor-icon--current")) : q === "center" ? (G.classList.remove("vditor-icon--current"), J.classList.remove("vditor-icon--current"), V.classList.add("vditor-icon--current")) : (V.classList.remove("vditor-icon--current"), J.classList.remove("vditor-icon--current"), G.classList.add("vditor-icon--current")), (0, k.Hc)(t), ce(e);
@@ -3807,8 +3807,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3807
3807
  var q = getSelection().getRangeAt(0).startContainer, te = (0, s.lG)(q, "TD") || (0, s.lG)(q, "TH");
3808
3808
  te && St(e, f, te, "beforebegin");
3809
3809
  };
3810
- var Me = document.createElement("button");
3811
- Me.setAttribute("type", "button"), Me.setAttribute("aria-label", window.VditorI18n["delete-row"] + "<" + (0, l.ns)("⌘-") + ">"), Me.setAttribute("data-type", "deleteRow"), Me.innerHTML = '<svg><use xlink:href="#vditor-icon-delete-row"></use></svg>', Me.className = "vditor-icon vditor-tooltipped vditor-tooltipped__n", Me.onclick = function() {
3810
+ var ke = document.createElement("button");
3811
+ ke.setAttribute("type", "button"), ke.setAttribute("aria-label", window.VditorI18n["delete-row"] + "<" + (0, l.ns)("⌘-") + ">"), ke.setAttribute("data-type", "deleteRow"), ke.innerHTML = '<svg><use xlink:href="#vditor-icon-delete-row"></use></svg>', ke.className = "vditor-icon vditor-tooltipped vditor-tooltipped__n", ke.onclick = function() {
3812
3812
  var q = getSelection().getRangeAt(0).startContainer, te = (0, s.lG)(q, "TD") || (0, s.lG)(q, "TH");
3813
3813
  te && vn(e, t, te);
3814
3814
  };
@@ -3844,7 +3844,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3844
3844
  }
3845
3845
  _e(e, q) || Be(q, t);
3846
3846
  }
3847
- }, Je(t, f, e), Xe(t, f, e), Ie(f, e), e.wysiwyg.popover.insertAdjacentElement("beforeend", G), e.wysiwyg.popover.insertAdjacentElement("beforeend", V), e.wysiwyg.popover.insertAdjacentElement("beforeend", J), e.wysiwyg.popover.insertAdjacentElement("beforeend", ae), e.wysiwyg.popover.insertAdjacentElement("beforeend", se), e.wysiwyg.popover.insertAdjacentElement("beforeend", Ae), e.wysiwyg.popover.insertAdjacentElement("beforeend", ue), e.wysiwyg.popover.insertAdjacentElement("beforeend", Me), e.wysiwyg.popover.insertAdjacentElement("beforeend", xe), e.wysiwyg.popover.insertAdjacentElement("beforeend", $), e.wysiwyg.popover.insertAdjacentHTML("beforeend", " x "), e.wysiwyg.popover.insertAdjacentElement("beforeend", Mt), He(e, "table"), Re(e, f);
3847
+ }, Je(t, f, e), Xe(t, f, e), Ie(f, e), e.wysiwyg.popover.insertAdjacentElement("beforeend", G), e.wysiwyg.popover.insertAdjacentElement("beforeend", V), e.wysiwyg.popover.insertAdjacentElement("beforeend", J), e.wysiwyg.popover.insertAdjacentElement("beforeend", ae), e.wysiwyg.popover.insertAdjacentElement("beforeend", se), e.wysiwyg.popover.insertAdjacentElement("beforeend", Ae), e.wysiwyg.popover.insertAdjacentElement("beforeend", ue), e.wysiwyg.popover.insertAdjacentElement("beforeend", ke), e.wysiwyg.popover.insertAdjacentElement("beforeend", xe), e.wysiwyg.popover.insertAdjacentElement("beforeend", $), e.wysiwyg.popover.insertAdjacentHTML("beforeend", " x "), e.wysiwyg.popover.insertAdjacentElement("beforeend", Mt), He(e, "table"), Re(e, f);
3848
3848
  }
3849
3849
  var Gt = (0, s.a1)(n, "data-type", "link-ref");
3850
3850
  Gt && tn(e, Gt, t);
@@ -3855,26 +3855,26 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3855
3855
  $.setAttribute("aria-label", window.VditorI18n.footnoteRef + "<" + (0, l.ns)("⌥Enter") + ">"), $.className = "vditor-tooltipped vditor-tooltipped__n";
3856
3856
  var We = document.createElement("input");
3857
3857
  $.appendChild(We), We.className = "vditor-input", We.setAttribute("placeholder", window.VditorI18n.footnoteRef + "<" + (0, l.ns)("⌥Enter") + ">"), We.style.width = "120px", We.value = Qe.getAttribute("data-footnotes-label"), We.oninput = function() {
3858
- We.value.trim() !== "" && Qe.setAttribute("data-footnotes-label", We.value), typeof e.options.input == "function" && e.options.input(x(e));
3858
+ We.value.trim() !== "" && Qe.setAttribute("data-footnotes-label", We.value), typeof e.options.input == "function" && e.options.input(D(e));
3859
3859
  }, We.onkeydown = function(te) {
3860
3860
  te.isComposing || _e(e, te) || Be(te, t);
3861
3861
  }, Ie(Qe, e), e.wysiwyg.popover.insertAdjacentElement("beforeend", $), He(e, "footnotes-ref"), Re(e, Qe);
3862
3862
  }
3863
- var Se = (0, s.fb)(n, "vditor-wysiwyg__block"), In = Se ? Se.getAttribute("data-type").indexOf("block") > -1 : !1;
3863
+ var Ce = (0, s.fb)(n, "vditor-wysiwyg__block"), In = Ce ? Ce.getAttribute("data-type").indexOf("block") > -1 : !1;
3864
3864
  if (e.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(q) {
3865
- if (!Se || Se && In && !Se.contains(q)) {
3865
+ if (!Ce || Ce && In && !Ce.contains(q)) {
3866
3866
  var te = q.previousElementSibling;
3867
3867
  te.style.display = "none";
3868
3868
  }
3869
- }), Se && In) {
3870
- if (e.wysiwyg.popover.innerHTML = "", Je(t, Se, e), Xe(t, Se, e), Ie(Se, e), Se.getAttribute("data-type") === "code-block") {
3869
+ }), Ce && In) {
3870
+ if (e.wysiwyg.popover.innerHTML = "", Je(t, Ce, e), Xe(t, Ce, e), Ie(Ce, e), Ce.getAttribute("data-type") === "code-block") {
3871
3871
  var kt = document.createElement("span");
3872
3872
  kt.setAttribute("aria-label", window.VditorI18n.language + "<" + (0, l.ns)("⌥Enter") + ">"), kt.className = "vditor-tooltipped vditor-tooltipped__n";
3873
3873
  var Pe = document.createElement("input");
3874
3874
  kt.appendChild(Pe);
3875
- var ut = Se.firstElementChild.firstElementChild;
3875
+ var ut = Ce.firstElementChild.firstElementChild;
3876
3876
  Pe.className = "vditor-input", Pe.setAttribute("placeholder", window.VditorI18n.language + "<" + (0, l.ns)("⌥Enter") + ">"), Pe.value = ut.className.indexOf("language-") > -1 ? ut.className.split("-")[1].split(" ")[0] : "", Pe.oninput = function(q) {
3877
- Pe.value.trim() !== "" ? ut.className = "language-".concat(Pe.value) : (ut.className = "", e.hint.recentLanguage = ""), Se.lastElementChild.classList.contains("vditor-wysiwyg__preview") && (Se.lastElementChild.innerHTML = Se.firstElementChild.innerHTML, ve(Se.lastElementChild, e)), ce(e), q.detail === 1 && (t.setStart(ut.firstChild, 0), t.collapse(!0), (0, k.Hc)(t));
3877
+ Pe.value.trim() !== "" ? ut.className = "language-".concat(Pe.value) : (ut.className = "", e.hint.recentLanguage = ""), Ce.lastElementChild.classList.contains("vditor-wysiwyg__preview") && (Ce.lastElementChild.innerHTML = Ce.firstElementChild.innerHTML, Ee(Ce.lastElementChild, e)), ce(e), q.detail === 1 && (t.setStart(ut.firstChild, 0), t.collapse(!0), (0, k.Hc)(t));
3878
3878
  }, Pe.onkeydown = function(q) {
3879
3879
  if (!q.isComposing && !_e(e, q)) {
3880
3880
  if (q.key === "Escape" && e.hint.element.style.display === "block") {
@@ -3897,21 +3897,21 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3897
3897
  }, e.wysiwyg.popover.insertAdjacentElement("beforeend", kt), He(e, "code-block");
3898
3898
  } else
3899
3899
  He(e, "block");
3900
- Re(e, Se);
3900
+ Re(e, Ce);
3901
3901
  } else
3902
- Se = void 0;
3902
+ Ce = void 0;
3903
3903
  if (S) {
3904
3904
  e.wysiwyg.popover.innerHTML = "";
3905
3905
  var $ = document.createElement("span");
3906
3906
  $.setAttribute("aria-label", "ID<" + (0, l.ns)("⌥Enter") + ">"), $.className = "vditor-tooltipped vditor-tooltipped__n";
3907
3907
  var qe = document.createElement("input");
3908
3908
  $.appendChild(qe), qe.className = "vditor-input", qe.setAttribute("placeholder", "ID<" + (0, l.ns)("⌥Enter") + ">"), qe.style.width = "120px", qe.value = S.getAttribute("data-id") || "", qe.oninput = function() {
3909
- S.setAttribute("data-id", qe.value), typeof e.options.input == "function" && e.options.input(x(e));
3909
+ S.setAttribute("data-id", qe.value), typeof e.options.input == "function" && e.options.input(D(e));
3910
3910
  }, qe.onkeydown = function(te) {
3911
3911
  te.isComposing || _e(e, te) || Be(te, t);
3912
3912
  }, Je(t, S, e), Xe(t, S, e), Ie(S, e), e.wysiwyg.popover.insertAdjacentElement("beforeend", $), He(e, "heading"), Re(e, S);
3913
3913
  }
3914
- if (h && Dt(e, h, t), !N && !i && !f && !Se && !h && !Gt && !Qe && !S && !T) {
3914
+ if (h && Dt(e, h, t), !N && !i && !f && !Ce && !h && !Gt && !Qe && !S && !T) {
3915
3915
  var et = (0, s.a1)(n, "data-block", "0");
3916
3916
  et && et.parentElement.isEqualNode(e.wysiwyg.element) ? (e.wysiwyg.popover.innerHTML = "", Je(t, et, e), Xe(t, et, e), Ie(et, e), He(e, "block"), Re(e, et)) : e.wysiwyg.popover.style.display = "none";
3917
3917
  }
@@ -3928,7 +3928,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3928
3928
  }, tn = function(e, t, n) {
3929
3929
  n === void 0 && (n = getSelection().getRangeAt(0)), e.wysiwyg.popover.innerHTML = "";
3930
3930
  var r = function() {
3931
- a.value.trim() !== "" && (t.tagName === "IMG" ? t.setAttribute("alt", a.value) : t.textContent = a.value), u.value.trim() !== "" && t.setAttribute("data-link-label", u.value), typeof e.options.input == "function" && e.options.input(x(e));
3931
+ a.value.trim() !== "" && (t.tagName === "IMG" ? t.setAttribute("alt", a.value) : t.textContent = a.value), u.value.trim() !== "" && t.setAttribute("data-link-label", u.value), typeof e.options.input == "function" && e.options.input(D(e));
3932
3932
  }, i = document.createElement("span");
3933
3933
  i.setAttribute("aria-label", window.VditorI18n.textIsNotEmpty), i.className = "vditor-tooltipped vditor-tooltipped__n";
3934
3934
  var a = document.createElement("input");
@@ -4014,7 +4014,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4014
4014
  var n = e.target;
4015
4015
  t.wysiwyg.popover.innerHTML = "";
4016
4016
  var r = function() {
4017
- n.setAttribute("src", a.value), n.setAttribute("alt", u.value), n.setAttribute("title", f.value), typeof t.options.input == "function" && t.options.input(x(t));
4017
+ n.setAttribute("src", a.value), n.setAttribute("alt", u.value), n.setAttribute("title", f.value), typeof t.options.input == "function" && t.options.input(D(t));
4018
4018
  }, i = document.createElement("span");
4019
4019
  i.setAttribute("aria-label", window.VditorI18n.imageURL), i.className = "vditor-tooltipped vditor-tooltipped__n";
4020
4020
  var a = document.createElement("input");
@@ -4054,7 +4054,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4054
4054
  });
4055
4055
  var r = e.wysiwyg.element;
4056
4056
  r.innerHTML = e.lute.Md2VditorDOM(t), r.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(i) {
4057
- ve(i, e), i.previousElementSibling.setAttribute("style", "display:none");
4057
+ Ee(i, e), i.previousElementSibling.setAttribute("style", "display:none");
4058
4058
  }), ce(e, n);
4059
4059
  }, Qn = function(e, t, n) {
4060
4060
  for (var r = e.startContainer.parentElement, i = !1, a = "", o = "", u = Xn(e), h = u.beforeHTML, f = u.afterHTML; r && !i; ) {
@@ -4103,7 +4103,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4103
4103
  var T = document.createElement("div");
4104
4104
  T.className = "vditor-wysiwyg__block", T.setAttribute("data-type", "code-block"), T.setAttribute("data-block", "0"), T.setAttribute("data-marker", "```"), a.toString() === "" ? T.innerHTML = `<pre><code><wbr>
4105
4105
  </code></pre>` : (T.innerHTML = "<pre><code>".concat(a.toString(), "<wbr></code></pre>"), a.deleteContents()), a.insertNode(T), f && (f.outerHTML = e.lute.SpinVditorDOM(f.outerHTML)), (0, k.ib)(e.wysiwyg.element, a), e.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(se) {
4106
- ve(se, e);
4106
+ Ee(se, e);
4107
4107
  }), t.classList.add("vditor-menu--disabled");
4108
4108
  } else if (o === "link") {
4109
4109
  if (a.toString() === "") {
@@ -4192,14 +4192,14 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4192
4192
  };
4193
4193
  })(), Ze = function(e, t, n) {
4194
4194
  var r;
4195
- if (typeof n != "string" ? (b(e, ["subToolbar", "hint"]), n.preventDefault(), r = x(e)) : r = n, !(e.currentMode === t && typeof n != "string")) {
4195
+ if (typeof n != "string" ? (b(e, ["subToolbar", "hint"]), n.preventDefault(), r = D(e)) : r = n, !(e.currentMode === t && typeof n != "string")) {
4196
4196
  if (e.devtools && e.devtools.renderEchart(e), e.options.preview.mode === "both" && t === "sv" ? e.preview.element.style.display = "block" : e.preview.element.style.display = "none", m(e.toolbar.elements, E.g.EDIT_TOOLBARS), y(e.toolbar.elements, E.g.EDIT_TOOLBARS), d(e.toolbar.elements, ["outdent", "indent"]), t === "ir")
4197
4197
  v(e.toolbar.elements, ["both"]), w(e.toolbar.elements, ["outdent", "indent", "outline", "insert-before", "insert-after"]), e.sv.element.style.display = "none", e.wysiwyg.element.parentElement.style.display = "none", e.ir.element.parentElement.style.display = "block", e.lute.SetVditorIR(!0), e.lute.SetVditorWYSIWYG(!1), e.lute.SetVditorSV(!1), e.currentMode = "ir", e.ir.element.innerHTML = e.lute.Md2VditorIRDOM(r), Ve(e, {
4198
4198
  enableAddUndoStack: !0,
4199
4199
  enableHint: !1,
4200
4200
  enableInput: !1
4201
4201
  }), Ne(e), e.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(a) {
4202
- ve(a, e);
4202
+ Ee(a, e);
4203
4203
  }), e.ir.element.querySelectorAll(".vditor-toc").forEach(function(a) {
4204
4204
  (0, ne.H)(a, {
4205
4205
  cdn: e.options.cdn,
@@ -4220,7 +4220,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4220
4220
  else if (t === "sv") {
4221
4221
  w(e.toolbar.elements, ["both"]), v(e.toolbar.elements, ["outdent", "indent", "outline", "insert-before", "insert-after"]), e.wysiwyg.element.parentElement.style.display = "none", e.ir.element.parentElement.style.display = "none", (e.options.preview.mode === "both" || e.options.preview.mode === "editor") && (e.sv.element.style.display = "block"), e.lute.SetVditorIR(!1), e.lute.SetVditorWYSIWYG(!1), e.lute.SetVditorSV(!0), e.currentMode = "sv";
4222
4222
  var i = an(r, e);
4223
- i === "<div data-block='0'></div>" && (i = ""), e.sv.element.innerHTML = i, ge(e.sv.element), Ee(e, {
4223
+ i === "<div data-block='0'></div>" && (i = ""), e.sv.element.innerHTML = i, ge(e.sv.element), Se(e, {
4224
4224
  enableAddUndoStack: !0,
4225
4225
  enableHint: !1,
4226
4226
  enableInput: !1
@@ -4255,7 +4255,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4255
4255
  return (0, k.Gb)(e, t) ? getSelection().toString() : "";
4256
4256
  }, Ht = function(e, t) {
4257
4257
  t.addEventListener("focus", function() {
4258
- e.options.focus && e.options.focus(x(e)), b(e, ["subToolbar", "hint"]);
4258
+ e.options.focus && e.options.focus(D(e)), b(e, ["subToolbar", "hint"]);
4259
4259
  });
4260
4260
  }, rn = function(e, t) {
4261
4261
  t.addEventListener("dblclick", function(n) {
@@ -4267,7 +4267,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4267
4267
  var r = e.ir.element.querySelector(".vditor-ir__node--expand");
4268
4268
  r && r.classList.remove("vditor-ir__node--expand");
4269
4269
  } else e.currentMode === "wysiwyg" && !e.wysiwyg.selectPopover.contains(n.relatedTarget) && e.wysiwyg.hideComment();
4270
- e[e.currentMode].range = (0, k.zh)(e), e.options.blur && e.options.blur(x(e));
4270
+ e[e.currentMode].range = (0, k.zh)(e), e.options.blur && e.options.blur(D(e));
4271
4271
  });
4272
4272
  }, Nt = function(e, t) {
4273
4273
  t.addEventListener("dragstart", function(n) {
@@ -4296,7 +4296,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4296
4296
  t.addEventListener("keydown", function(n) {
4297
4297
  if (!n.isComposing && e.options.keydown && e.options.keydown(n), !((e.options.hint.extend.length > 1 || e.toolbar.elements.emoji) && e.hint.select(n, e))) {
4298
4298
  if (e.options.comment.enable && e.currentMode === "wysiwyg" && (n.key === "Backspace" || I("⌘X", n)) && e.wysiwyg.getComments(e), e.currentMode === "sv") {
4299
- if (Le(e, n))
4299
+ if (Me(e, n))
4300
4300
  return;
4301
4301
  } else if (e.currentMode === "wysiwyg") {
4302
4302
  if (Yn(e, n))
@@ -4304,7 +4304,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4304
4304
  } else if (e.currentMode === "ir" && pe(e, n))
4305
4305
  return;
4306
4306
  if (e.options.ctrlEnter && I("⌘Enter", n)) {
4307
- e.options.ctrlEnter(x(e)), n.preventDefault();
4307
+ e.options.ctrlEnter(D(e)), n.preventDefault();
4308
4308
  return;
4309
4309
  }
4310
4310
  if (I("⌘Z", n) && !e.toolbar.elements.undo) {
@@ -4316,7 +4316,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4316
4316
  return;
4317
4317
  }
4318
4318
  if (n.key === "Escape") {
4319
- e.hint.element.style.display === "block" ? e.hint.element.style.display = "none" : e.options.esc && !n.isComposing && e.options.esc(x(e)), n.preventDefault();
4319
+ e.hint.element.style.display === "block" ? e.hint.element.style.display = "none" : e.options.esc && !n.isComposing && e.options.esc(D(e)), n.preventDefault();
4320
4320
  return;
4321
4321
  }
4322
4322
  if ((0, l.yl)(n) && n.altKey && !n.shiftKey && /^Digit[1-6]$/.test(n.code)) {
@@ -4396,13 +4396,13 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4396
4396
  n = n.previousElementSibling;
4397
4397
  }
4398
4398
  return r;
4399
- }, Ee = function(e, t) {
4399
+ }, Se = function(e, t) {
4400
4400
  t === void 0 && (t = {
4401
4401
  enableAddUndoStack: !0,
4402
4402
  enableHint: !1,
4403
4403
  enableInput: !0
4404
4404
  }), t.enableHint && e.hint.render(e), e.preview.render(e);
4405
- var n = x(e);
4405
+ var n = D(e);
4406
4406
  typeof e.options.input == "function" && t.enableInput && e.options.input(n), e.options.counter.enable && e.counter.render(e, n), e.options.cache.enable && (0, l.pK)() && (localStorage.setItem(e.options.cache.id, n), e.options.cache.after && e.options.cache.after(n)), e.devtools && e.devtools.renderEchart(e), clearTimeout(e.sv.processTimeoutId), e.sv.processTimeoutId = window.setTimeout(function() {
4407
4407
  t.enableAddUndoStack && !e.sv.composingLock && e.undo.addToUndoStack(e);
4408
4408
  }, e.options.undoDelay);
@@ -4436,7 +4436,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4436
4436
  S ? S.insertAdjacentText("afterend", f) : o.insertAdjacentText("afterbegin", f), ie(e);
4437
4437
  return;
4438
4438
  }
4439
- (0, k.ib)(e.sv.element, i), Ee(e);
4439
+ (0, k.ib)(e.sv.element, i), Se(e);
4440
4440
  }
4441
4441
  }, sn = function(e) {
4442
4442
  switch (e.currentMode) {
@@ -4712,7 +4712,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4712
4712
  G.forEach(function(V, J) {
4713
4713
  J === 0 ? O = V : (O.insertAdjacentHTML("beforeend", V.innerHTML), V.remove());
4714
4714
  }), G.length > 0 && e.wysiwyg.element.insertAdjacentElement("beforeend", G[0]), (0, k.ib)(e.wysiwyg.element, t), e.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(V) {
4715
- ve(V, e);
4715
+ Ee(V, e);
4716
4716
  }), n && (n.inputType === "deleteContentBackward" || n.inputType === "deleteContentForward") && e.options.comment.enable && (e.wysiwyg.triggerRemoveComment(e), e.options.comment.adjustTop(e.wysiwyg.getComments(e, !0)));
4717
4717
  }
4718
4718
  je(e), ce(e, {
@@ -4901,7 +4901,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4901
4901
  }), r.insertAdjacentHTML("beforeend", "<".concat(a.tagName, ' data-block="0">').concat(o, "</").concat(a.tagName, ">")), e.currentMode === "wysiwyg" ? a.outerHTML = e.lute.SpinVditorDOM(a.outerHTML) : a.outerHTML = e.lute.SpinVditorIRDOM(a.outerHTML), (0, k.ib)(e[e.currentMode].element, n);
4902
4902
  var u = (0, s.O9)(n.startContainer);
4903
4903
  u && u.querySelectorAll(".vditor-".concat(e.currentMode, "__preview[data-render='2']")).forEach(function(h) {
4904
- ve(h, e), e.currentMode === "wysiwyg" && h.previousElementSibling.setAttribute("style", "display:none");
4904
+ Ee(h, e), e.currentMode === "wysiwyg" && h.previousElementSibling.setAttribute("style", "display:none");
4905
4905
  }), ee(e), Ye(e);
4906
4906
  } else
4907
4907
  e[e.currentMode].element.focus();
@@ -4923,7 +4923,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4923
4923
  }), f && (o.innerHTML = f, u[0].insertAdjacentElement("beforeend", o)), e.currentMode === "wysiwyg" ? r.outerHTML = e.lute.SpinVditorDOM(r.outerHTML) : r.outerHTML = e.lute.SpinVditorIRDOM(r.outerHTML), (0, k.ib)(e[e.currentMode].element, n);
4924
4924
  var S = (0, s.O9)(n.startContainer);
4925
4925
  S && S.querySelectorAll(".vditor-".concat(e.currentMode, "__preview[data-render='2']")).forEach(function(T) {
4926
- ve(T, e), e.currentMode === "wysiwyg" && T.previousElementSibling.setAttribute("style", "display:none");
4926
+ Ee(T, e), e.currentMode === "wysiwyg" && T.previousElementSibling.setAttribute("style", "display:none");
4927
4927
  }), ee(e), Ye(e);
4928
4928
  } else
4929
4929
  e[e.currentMode].element.focus();
@@ -4950,7 +4950,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4950
4950
  enableAddUndoStack: !0,
4951
4951
  enableHint: !1,
4952
4952
  enableInput: !0
4953
- }), e.currentMode === "wysiwyg" ? ce(e, t) : e.currentMode === "ir" ? Ve(e, t) : e.currentMode === "sv" && Ee(e, t);
4953
+ }), e.currentMode === "wysiwyg" ? ce(e, t) : e.currentMode === "ir" ? Ve(e, t) : e.currentMode === "sv" && Se(e, t);
4954
4954
  }, gn = function(e, t, n, r) {
4955
4955
  var i, a = e.startContainer, o = (0, s.lG)(a, "LI");
4956
4956
  if (o) {
@@ -5252,19 +5252,19 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
5252
5252
  if (ue.status === 200) {
5253
5253
  var Ae = ue.responseText;
5254
5254
  e.options.upload.linkToImgFormat && (Ae = e.options.upload.linkToImgFormat(ue.responseText));
5255
- var Me = JSON.parse(Ae);
5256
- if (Me.code !== 0) {
5257
- e.tip.show(Me.msg);
5255
+ var ke = JSON.parse(Ae);
5256
+ if (ke.code !== 0) {
5257
+ e.tip.show(ke.msg);
5258
5258
  return;
5259
5259
  }
5260
- var xe = Me.data.originalURL;
5260
+ var xe = ke.data.originalURL;
5261
5261
  if (e.currentMode === "sv")
5262
5262
  e.sv.element.querySelectorAll(".vditor-sv__marker--link").forEach(function(be) {
5263
- be.textContent === xe && (be.textContent = Me.data.url);
5263
+ be.textContent === xe && (be.textContent = ke.data.url);
5264
5264
  });
5265
5265
  else {
5266
5266
  var $ = e[e.currentMode].element.querySelector('img[src="'.concat(xe, '"]'));
5267
- $.src = Me.data.url, e.currentMode === "ir" && ($.previousElementSibling.previousElementSibling.innerHTML = Me.data.url);
5267
+ $.src = ke.data.url, e.currentMode === "ir" && ($.previousElementSibling.previousElementSibling.innerHTML = ke.data.url);
5268
5268
  }
5269
5269
  ee(e);
5270
5270
  } else
@@ -5274,7 +5274,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
5274
5274
  }, ue.send(JSON.stringify({ url: ae }));
5275
5275
  }
5276
5276
  return e.currentMode === "ir" ? ['<span class="vditor-ir__marker vditor-ir__marker--link">'.concat(Lute.EscapeHTMLStr(ae), "</span>"), Lute.WalkContinue] : e.currentMode === "wysiwyg" ? ["", Lute.WalkContinue] : ['<span class="vditor-sv__marker--link">'.concat(Lute.EscapeHTMLStr(ae), "</span>"), Lute.WalkContinue];
5277
- }, (r.replace(/&amp;/g, "&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig, "").trim() === '<a href="'.concat(i, '">').concat(i, "</a>") || r.replace(/&amp;/g, "&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig, "").trim() === '<!--StartFragment--><a href="'.concat(i, '">').concat(i, "</a><!--EndFragment-->")) && (r = ""), h = new DOMParser().parseFromString(r, "text/html"), h.body && (r = h.body.innerHTML), r = Lute.Sanitize(r), e.wysiwyg.getComments(e), f = e[e.currentMode].element.scrollHeight, S = Te(r, i, e.currentMode), T = e.currentMode === "sv" ? (0, s.a1)(t.target, "data-type", "code-block") : (0, s.lG)(t.target, "CODE"), T ? (e.currentMode === "sv" ? document.execCommand("insertHTML", !1, i.replace(/&/g, "&amp;").replace(/</g, "&lt;")) : (N = (0, k.im)(t.target, e[e.currentMode].element), T.parentElement.tagName !== "PRE" && (i += E.g.ZWSP), T.textContent = T.textContent.substring(0, N.start) + i + T.textContent.substring(N.end), (0, k.$j)(N.start + i.length, N.start + i.length, T.parentElement), !((G = T.parentElement) === null || G === void 0) && G.nextElementSibling.classList.contains("vditor-".concat(e.currentMode, "__preview")) && (T.parentElement.nextElementSibling.innerHTML = T.outerHTML, ve(T.parentElement.nextElementSibling, e))), [3, 10]) : [3, 1]);
5277
+ }, (r.replace(/&amp;/g, "&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig, "").trim() === '<a href="'.concat(i, '">').concat(i, "</a>") || r.replace(/&amp;/g, "&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig, "").trim() === '<!--StartFragment--><a href="'.concat(i, '">').concat(i, "</a><!--EndFragment-->")) && (r = ""), h = new DOMParser().parseFromString(r, "text/html"), h.body && (r = h.body.innerHTML), r = Lute.Sanitize(r), e.wysiwyg.getComments(e), f = e[e.currentMode].element.scrollHeight, S = Te(r, i, e.currentMode), T = e.currentMode === "sv" ? (0, s.a1)(t.target, "data-type", "code-block") : (0, s.lG)(t.target, "CODE"), T ? (e.currentMode === "sv" ? document.execCommand("insertHTML", !1, i.replace(/&/g, "&amp;").replace(/</g, "&lt;")) : (N = (0, k.im)(t.target, e[e.currentMode].element), T.parentElement.tagName !== "PRE" && (i += E.g.ZWSP), T.textContent = T.textContent.substring(0, N.start) + i + T.textContent.substring(N.end), (0, k.$j)(N.start + i.length, N.start + i.length, T.parentElement), !((G = T.parentElement) === null || G === void 0) && G.nextElementSibling.classList.contains("vditor-".concat(e.currentMode, "__preview")) && (T.parentElement.nextElementSibling.innerHTML = T.outerHTML, Ee(T.parentElement.nextElementSibling, e))), [3, 10]) : [3, 1]);
5278
5278
  case 1:
5279
5279
  return S ? (n.pasteCode(S), [3, 10]) : [3, 2];
5280
5280
  case 2:
@@ -5306,7 +5306,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
5306
5306
  return e.currentMode !== "sv" && (B = (0, s.F9)((0, k.zh)(e).startContainer), B && (O = (0, k.zh)(e), e[e.currentMode].element.querySelectorAll("wbr").forEach(function(J) {
5307
5307
  J.remove();
5308
5308
  }), O.insertNode(document.createElement("wbr")), e.currentMode === "wysiwyg" ? B.outerHTML = e.lute.SpinVditorDOM(B.outerHTML) : B.outerHTML = e.lute.SpinVditorIRDOM(B.outerHTML), (0, k.ib)(e[e.currentMode].element, O)), e[e.currentMode].element.querySelectorAll(".vditor-".concat(e.currentMode, "__preview[data-render='2']")).forEach(function(J) {
5309
- ve(J, e);
5309
+ Ee(J, e);
5310
5310
  })), e.wysiwyg.triggerRemoveComment(e), ee(e), e[e.currentMode].element.scrollHeight - f > Math.min(e[e.currentMode].element.clientHeight, window.innerHeight) / 2 && ye(e), [
5311
5311
  2
5312
5312
  /*return*/
@@ -5385,7 +5385,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
5385
5385
  enableInput: !0
5386
5386
  }), t.enableHint && xn(e), clearTimeout(e.ir.processTimeoutId), e.ir.processTimeoutId = window.setTimeout(function() {
5387
5387
  if (!e.ir.composingLock) {
5388
- var n = x(e);
5388
+ var n = D(e);
5389
5389
  typeof e.options.input == "function" && t.enableInput && e.options.input(n), e.options.counter.enable && e.counter.render(e, n), e.options.cache.enable && (0, l.pK)() && (localStorage.setItem(e.options.cache.id, n), e.options.cache.after && e.options.cache.after(n)), e.devtools && e.devtools.renderEchart(e), t.enableAddUndoStack && e.undo.addToUndoStack(e);
5390
5390
  }
5391
5391
  }, e.options.undoDelay);
@@ -5541,7 +5541,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
5541
5541
  if (u) {
5542
5542
  u.textContent = E.g.ZWSP + a.trimRight(), o.selectNodeContents(u), o.collapse(!1), Ve(i), u.parentElement.querySelectorAll("code").forEach(function(T) {
5543
5543
  T.className = "language-" + a.trimRight();
5544
- }), ve(u.parentElement.querySelector(".vditor-ir__preview"), i), n.recentLanguage = a.trimRight();
5544
+ }), Ee(u.parentElement.querySelector(".vditor-ir__preview"), i), n.recentLanguage = a.trimRight();
5545
5545
  return;
5546
5546
  }
5547
5547
  }
@@ -5554,10 +5554,10 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
5554
5554
  }
5555
5555
  if (o.setStart(o.startContainer, n.lastIndex), o.deleteContents(), i.options.hint.parse ? i.currentMode === "sv" ? (0, k.oC)(i.lute.SpinVditorSVDOM(a), i) : i.currentMode === "wysiwyg" ? (0, k.oC)(i.lute.SpinVditorDOM(a), i) : (0, k.oC)(i.lute.SpinVditorIRDOM(a), i) : (0, k.oC)(a, i), n.splitChar === ":" && a.indexOf(":") > -1 && i.currentMode !== "sv" && o.insertNode(document.createTextNode(" ")), o.collapse(!1), (0, k.Hc)(o), i.currentMode === "wysiwyg") {
5556
5556
  var S = (0, s.fb)(o.startContainer, "vditor-wysiwyg__block");
5557
- S && S.lastElementChild.classList.contains("vditor-wysiwyg__preview") && (S.lastElementChild.innerHTML = S.firstElementChild.innerHTML, ve(S.lastElementChild, i));
5557
+ S && S.lastElementChild.classList.contains("vditor-wysiwyg__preview") && (S.lastElementChild.innerHTML = S.firstElementChild.innerHTML, Ee(S.lastElementChild, i));
5558
5558
  } else if (i.currentMode === "ir") {
5559
5559
  var S = (0, s.fb)(o.startContainer, "vditor-ir__marker--pre");
5560
- S && S.nextElementSibling.classList.contains("vditor-ir__preview") && (S.nextElementSibling.innerHTML = S.innerHTML, ve(S.nextElementSibling, i));
5560
+ S && S.nextElementSibling.classList.contains("vditor-ir__preview") && (S.nextElementSibling.innerHTML = S.innerHTML, Ee(S.nextElementSibling, i));
5561
5561
  }
5562
5562
  ee(i);
5563
5563
  }, this.timeId = -1, this.element = document.createElement("div"), this.element.className = "vditor-hint", this.recentLanguage = "", t.push({ key: ":" });
@@ -5657,7 +5657,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
5657
5657
  i = a[1];
5658
5658
  else {
5659
5659
  var h = a[a.length - 2].slice(-1);
5660
- (0, L.X)(h) === " " && o.length < u && (i = o);
5660
+ (0, M.X)(h) === " " && o.length < u && (i = o);
5661
5661
  }
5662
5662
  return i;
5663
5663
  }, e;
@@ -5752,7 +5752,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
5752
5752
  })()
5753
5753
  ), Dn = function(e) {
5754
5754
  if (e.currentMode === "sv")
5755
- return e.lute.Md2HTML(x(e));
5755
+ return e.lute.Md2HTML(D(e));
5756
5756
  if (e.currentMode === "wysiwyg")
5757
5757
  return e.lute.VditorDOM2HTML(e.wysiwyg.element.innerHTML);
5758
5758
  if (e.currentMode === "ir")
@@ -5860,11 +5860,11 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
5860
5860
  this.previewElement.innerHTML = n;
5861
5861
  return;
5862
5862
  }
5863
- if (x(t).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "") === "") {
5863
+ if (D(t).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "") === "") {
5864
5864
  this.previewElement.innerHTML = "";
5865
5865
  return;
5866
5866
  }
5867
- var i = (/* @__PURE__ */ new Date()).getTime(), a = x(t);
5867
+ var i = (/* @__PURE__ */ new Date()).getTime(), a = D(t);
5868
5868
  this.mdTimeoutId = window.setTimeout(function() {
5869
5869
  if (t.options.preview.url) {
5870
5870
  var o = new XMLHttpRequest();
@@ -5892,7 +5892,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
5892
5892
  var r = (/* @__PURE__ */ new Date()).getTime() - n;
5893
5893
  (/* @__PURE__ */ new Date()).getTime() - n > 2600 ? (t.tip.show(window.VditorI18n.performanceTip.replace("${x}", r.toString())), t.preview.element.setAttribute("data-type", "renderPerformance")) : t.preview.element.getAttribute("data-type") === "renderPerformance" && (t.tip.hide(), t.preview.element.removeAttribute("data-type"));
5894
5894
  var i = t.preview.element.querySelector(".vditor-comment--focus");
5895
- i && i.classList.remove("vditor-comment--focus"), (0, P.O)(t.preview.previewElement, t.options.preview.hljs), (0, Q.s)(t.options.preview.hljs, t.preview.previewElement, t.options.cdn), (0, oe.i)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, me.K)(t.preview.previewElement, t.options.cdn), (0, we.J)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, F.P)(t.preview.previewElement, t.options.cdn), (0, z.v)(t.preview.previewElement, t.options.cdn), (0, M.p)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, fe.P)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, le.B)(t.preview.previewElement, t.options.cdn), (0, D.Q)(t.preview.previewElement, t.options.cdn), t.options.preview.render.media.enable && (0, Er.Y)(t.preview.previewElement), t.options.customRenders.forEach(function(u) {
5895
+ i && i.classList.remove("vditor-comment--focus"), (0, P.O)(t.preview.previewElement, t.options.preview.hljs), (0, Q.s)(t.options.preview.hljs, t.preview.previewElement, t.options.cdn), (0, oe.i)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, me.K)(t.preview.previewElement, t.options.cdn), (0, ve.J)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, F.P)(t.preview.previewElement, t.options.cdn), (0, z.v)(t.preview.previewElement, t.options.cdn), (0, L.p)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, fe.P)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, le.B)(t.preview.previewElement, t.options.cdn), (0, x.Q)(t.preview.previewElement, t.options.cdn), t.options.preview.render.media.enable && (0, Er.Y)(t.preview.previewElement), t.options.customRenders.forEach(function(u) {
5896
5896
  u.render(t.preview.previewElement, t);
5897
5897
  });
5898
5898
  var a = t.preview.element, o = t.outline.render(t);
@@ -5965,7 +5965,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
5965
5965
  }), this.element.addEventListener("input", function(r) {
5966
5966
  if (!(r.inputType === "deleteByDrag" || r.inputType === "insertFromDrop") && !(n.composingLock || r.data === "‘" || r.data === "“" || r.data === "《")) {
5967
5967
  if (n.preventInput) {
5968
- n.preventInput = !1, Ee(t, {
5968
+ n.preventInput = !1, Se(t, {
5969
5969
  enableAddUndoStack: !0,
5970
5970
  enableHint: !0,
5971
5971
  enableInput: !0
@@ -6270,7 +6270,7 @@ data-value=":`).concat(u, ': " data-key=":').concat(u, ':" class="vditor-emojis_
6270
6270
  var r = document.createElement("a");
6271
6271
  "download" in r ? (r.download = n, r.style.display = "none", r.href = URL.createObjectURL(new Blob([t])), document.body.appendChild(r), r.click(), r.remove()) : e.tip.show(window.VditorI18n.downloadTip, 0);
6272
6272
  }, Ur = function(e) {
6273
- var t = x(e);
6273
+ var t = D(e);
6274
6274
  Rn(e, t, t.substr(0, 10) + ".md");
6275
6275
  }, Vr = function(e) {
6276
6276
  e.tip.show(window.VditorI18n.generate, 3800);
@@ -6297,7 +6297,7 @@ window.addEventListener("message", (e) => {
6297
6297
  }, 3600);
6298
6298
  }, false);
6299
6299
  <\/script>`)), t.contentDocument.close(), setTimeout(function() {
6300
- t.contentWindow.postMessage(x(e), "*");
6300
+ t.contentWindow.postMessage(D(e), "*");
6301
6301
  }, 200);
6302
6302
  }, Wr = function(e) {
6303
6303
  var t = Dn(e), n = '<html><head><link rel="stylesheet" type="text/css" href="'.concat(e.options.cdn, `/dist/index.css"/>
@@ -7116,7 +7116,7 @@ window.addEventListener("message", (e) => {
7116
7116
  if (this[n.currentMode].lastText = i, n[n.currentMode].element.innerHTML = i, n.currentMode !== "sv" && (n[n.currentMode].element.querySelectorAll(".vditor-".concat(n.currentMode, "__preview")).forEach(function(u) {
7117
7117
  u.parentElement.querySelector(".language-echarts") && (n.currentMode === "ir" ? u.parentElement.outerHTML = n.lute.SpinVditorIRDOM(u.parentElement.outerHTML) : u.parentElement.outerHTML = n.lute.SpinVditorDOM(u.parentElement.outerHTML));
7118
7118
  }), n[n.currentMode].element.querySelectorAll(".vditor-".concat(n.currentMode, "__preview[data-render='2']")).forEach(function(u) {
7119
- ve(u, n);
7119
+ Ee(u, n);
7120
7120
  })), n[n.currentMode].element.querySelector("wbr"))
7121
7121
  (0, k.ib)(n[n.currentMode].element, n[n.currentMode].element.ownerDocument.createRange()), ye(n);
7122
7122
  else {
@@ -7128,7 +7128,7 @@ window.addEventListener("message", (e) => {
7128
7128
  enableHint: !1,
7129
7129
  enableInput: !0
7130
7130
  }), Ye(n), n[n.currentMode].element.querySelectorAll(".vditor-".concat(n.currentMode, "__preview[data-render='2']")).forEach(function(u) {
7131
- ve(u, n);
7131
+ Ee(u, n);
7132
7132
  }), this[n.currentMode].undoStack.length > 1 ? m(n.toolbar.elements, ["undo"]) : d(n.toolbar.elements, ["undo"]), this[n.currentMode].redoStack.length !== 0 ? m(n.toolbar.elements, ["redo"]) : d(n.toolbar.elements, ["redo"]);
7133
7133
  }, e.prototype.resetStack = function() {
7134
7134
  this.ir = {
@@ -7727,7 +7727,7 @@ window.addEventListener("message", (e) => {
7727
7727
  f && /^#{1,6} $/.test(a.textContent) && (f = !1);
7728
7728
  var S = (0, C.W)(getSelection().getRangeAt(0).startContainer);
7729
7729
  if (S && S.textContent === "" && (je(t), S.remove()), u && a.getAttribute("data-type") !== "code-block" || f || Ft(a.innerHTML) || Wt(a.innerHTML) && a.previousElementSibling) {
7730
- typeof t.options.input == "function" && t.options.input(x(t));
7730
+ typeof t.options.input == "function" && t.options.input(D(t));
7731
7731
  return;
7732
7732
  }
7733
7733
  r.inputType === "insertParagraph" && n.element.innerHTML === "<p><br></p><p><br></p>" && a.previousElementSibling.remove(), wt(t, i, r);
@@ -7856,7 +7856,7 @@ window.addEventListener("message", (e) => {
7856
7856
  }, t.prototype.setTheme = function(n, r, i, a) {
7857
7857
  this.vditor.options.theme = n, de(this.vditor), r && (this.vditor.options.preview.theme.current = r, (0, X.Z)(r, a || this.vditor.options.preview.theme.path)), i && (this.vditor.options.preview.hljs.style = i, (0, Nn.Y)(i, this.vditor.options.cdn));
7858
7858
  }, t.prototype.getValue = function() {
7859
- return x(this.vditor);
7859
+ return D(this.vditor);
7860
7860
  }, t.prototype.getCurrentMode = function() {
7861
7861
  return this.vditor.currentMode;
7862
7862
  }, t.prototype.focus = function() {
@@ -7912,7 +7912,7 @@ window.addEventListener("message", (e) => {
7912
7912
  this.vditor.currentMode === "ir" ? (0, k.oC)(this.vditor.lute.Md2VditorIRDOM(n), this.vditor) : this.vditor.currentMode === "wysiwyg" ? (0, k.oC)(this.vditor.lute.Md2VditorDOM(n), this.vditor) : Bt(this.vditor, n), this.vditor.outline.render(this.vditor), ee(this.vditor);
7913
7913
  }, t.prototype.setValue = function(n, r) {
7914
7914
  var i = this;
7915
- r === void 0 && (r = !1), this.vditor.currentMode === "sv" ? (this.vditor.sv.element.innerHTML = "<div data-block='0'>".concat(this.vditor.lute.SpinVditorSVDOM(n), "</div>"), Ee(this.vditor, {
7915
+ r === void 0 && (r = !1), this.vditor.currentMode === "sv" ? (this.vditor.sv.element.innerHTML = "<div data-block='0'>".concat(this.vditor.lute.SpinVditorSVDOM(n), "</div>"), Se(this.vditor, {
7916
7916
  enableAddUndoStack: !0,
7917
7917
  enableHint: !1,
7918
7918
  enableInput: !1
@@ -7921,7 +7921,7 @@ window.addEventListener("message", (e) => {
7921
7921
  enableHint: !1,
7922
7922
  enableInput: !1
7923
7923
  }) : (this.vditor.ir.element.innerHTML = this.vditor.lute.Md2VditorIRDOM(n), this.vditor.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(a) {
7924
- ve(a, i.vditor);
7924
+ Ee(a, i.vditor);
7925
7925
  }), Ve(this.vditor, {
7926
7926
  enableAddUndoStack: !0,
7927
7927
  enableHint: !1,
@@ -8021,7 +8021,7 @@ window.addEventListener("message", (e) => {
8021
8021
  })(Z.default)
8022
8022
  );
8023
8023
  const _i = Ti;
8024
- })(), ke = ke.default, ke;
8024
+ })(), Le = Le.default, Le;
8025
8025
  })()
8026
8026
  );
8027
8027
  });
@@ -8050,18 +8050,18 @@ const Fi = /* @__PURE__ */ ji(Wi), qi = { class: "dsg-editor" }, Ki = {
8050
8050
  modelModifiers: {}
8051
8051
  }),
8052
8052
  emits: /* @__PURE__ */ Vn(["on-before-input", "on-after-input", "update:modelValue"], ["update:modelValue"]),
8053
- setup(Ce, { expose: Xt, emit: pt }) {
8054
- let nt = xi(Ce, "modelValue"), Y = Wn(nt);
8053
+ setup(we, { expose: Xt, emit: pt }) {
8054
+ let nt = xi(we, "modelValue"), Y = Wn(nt);
8055
8055
  Di(
8056
8056
  () => Y.value,
8057
8057
  (w, b) => {
8058
8058
  m("update:modelValue", w);
8059
8059
  }
8060
8060
  );
8061
- const ke = Wn(), Z = Hi("vditor"), E = () => ({
8062
- modelId: Ce.targetModel ? Ce.targetModel.id : "",
8063
- modelClass: Ce.targetModelClass ? Ce.targetModelClass : ""
8064
- }), L = (w, b) => {
8061
+ const Le = Wn(), Z = Hi("vditor"), E = () => ({
8062
+ modelId: we.targetModel ? we.targetModel.id : "",
8063
+ modelClass: we.targetModelClass ? we.targetModelClass : ""
8064
+ }), M = (w, b) => {
8065
8065
  if (!w)
8066
8066
  return !1;
8067
8067
  w.nodeType === 3 && (w = w.parentElement);
@@ -8069,13 +8069,13 @@ const Fi = /* @__PURE__ */ ji(Wi), qi = { class: "dsg-editor" }, Ki = {
8069
8069
  for (; g && !s && !g.classList.contains("vditor-reset"); )
8070
8070
  g.nodeName === b ? s = !0 : g = g.parentElement;
8071
8071
  return s && g;
8072
- }, x = (w) => {
8072
+ }, D = (w) => {
8073
8073
  let b;
8074
8074
  const g = w[w.currentMode].element;
8075
8075
  return getSelection().rangeCount > 0 && (b = getSelection().getRangeAt(0), g.isEqualNode(b.startContainer) || g.contains(b.startContainer)) ? b : w[w.currentMode].range ? w[w.currentMode].range : (g.focus(), b = g.ownerDocument.createRange(), b.setStart(g, 0), b.collapse(!0), b);
8076
8076
  }, A = (w) => {
8077
- let b = x(ke.value.vditor);
8078
- const g = L(b.startContainer, "LI");
8077
+ let b = D(Le.value.vditor);
8078
+ const g = M(b.startContainer, "LI");
8079
8079
  if (!g || g.nextElementSibling || g.previousElementSibling)
8080
8080
  return !1;
8081
8081
  if (g.parentNode?.previousSibling?.nodeName === "UL" && g.parentNode?.previousSibling?.firstChild.classList.contains("vditor-task")) {
@@ -8084,7 +8084,7 @@ const Fi = /* @__PURE__ */ ji(Wi), qi = { class: "dsg-editor" }, Ki = {
8084
8084
  let _ = document.createElement("input");
8085
8085
  _.setAttribute("type", "checkbox"), g.insertBefore(_, g.firstChild), C && C.parentNode && C.parentNode.removeChild(C), b.setStartAfter(g), b.collapse(!0);
8086
8086
  }
8087
- }, c = () => Ce.csrf ? Ce.csrf : window.csrf, l = (w) => new Promise((b) => {
8087
+ }, c = () => we.csrf ? we.csrf : window.csrf, l = (w) => new Promise((b) => {
8088
8088
  new MutationObserver((s, C) => {
8089
8089
  const _ = document.querySelector(w);
8090
8090
  _ && (C.disconnect(), b(_));
@@ -8100,13 +8100,31 @@ const Fi = /* @__PURE__ */ ji(Wi), qi = { class: "dsg-editor" }, Ki = {
8100
8100
  for (const g of b.clipboardData.items)
8101
8101
  if (g.type.startsWith("image/")) {
8102
8102
  const s = b.clipboardData?.files[0].name.split(".").slice(0, -1).join("") || "pasted-image", C = g.type.split("/")[1];
8103
- b.preventDefault(), b.stopPropagation();
8104
- const _ = new FileReader();
8105
- _.readAsDataURL(g.getAsFile()), _.onload = () => {
8106
- const D = _.result;
8107
- ke.value?.insertMD(`🐰 ![${s}.${C}](${D})
8103
+ if (b.preventDefault(), b.stopPropagation(), we.mediaUploadEndpoint && c() !== "") {
8104
+ const _ = new FormData(), x = E();
8105
+ Object.keys(x).forEach((L) => {
8106
+ _.append(L, x[L]);
8107
+ }), _.append("file", g.getAsFile()), fetch(we.mediaUploadEndpoint, {
8108
+ method: "POST",
8109
+ headers: {
8110
+ "X-CSRF-TOKEN": c()
8111
+ },
8112
+ body: _
8113
+ }).then((L) => L.json()).then((L) => {
8114
+ Le.value?.insertMD(`![${L.filename}](${L.file_url})
8108
8115
  `);
8109
- };
8116
+ }).catch(() => {
8117
+ Le.value?.vditor.tip.show("The file upload failed", 5e3);
8118
+ });
8119
+ return;
8120
+ } else {
8121
+ const _ = new FileReader();
8122
+ _.readAsDataURL(g.getAsFile()), _.onload = () => {
8123
+ const x = _.result;
8124
+ Le.value?.insertMD(`![${s}.${C}](${x})
8125
+ `);
8126
+ };
8127
+ }
8110
8128
  }
8111
8129
  }
8112
8130
  },
@@ -8135,7 +8153,7 @@ const Fi = /* @__PURE__ */ ji(Wi), qi = { class: "dsg-editor" }, Ki = {
8135
8153
  "insert-after",
8136
8154
  "|"
8137
8155
  ];
8138
- Ce.mediaUploadEndpoint && c() !== "" && w.push("upload");
8156
+ we.mediaUploadEndpoint && c() !== "" && w.push("upload");
8139
8157
  let b = [
8140
8158
  "table",
8141
8159
  "|",
@@ -8171,46 +8189,46 @@ const Fi = /* @__PURE__ */ ji(Wi), qi = { class: "dsg-editor" }, Ki = {
8171
8189
  after: () => {
8172
8190
  Z.value.getElementsByClassName("vditor-wysiwyg")[0].addEventListener("keyup", (g) => {
8173
8191
  g.key === "Enter" && A() && g.preventDefault();
8174
- }), Y.value && ke.value?.setValue(Y.value);
8192
+ }), Y.value && Le.value?.setValue(Y.value);
8175
8193
  },
8176
8194
  input: (b) => {
8177
8195
  m("on-before-input", Y.value, b), Y.value = b, m("on-after-input", b);
8178
8196
  },
8179
8197
  upload: {}
8180
8198
  };
8181
- Ce.mediaUploadEndpoint && c() !== "" && (w.upload = {
8199
+ we.mediaUploadEndpoint && c() !== "" && (w.upload = {
8182
8200
  accept: "image/*",
8183
- url: Ce.mediaUploadEndpoint,
8201
+ url: we.mediaUploadEndpoint,
8184
8202
  headers: { "X-CSRF-TOKEN": c() },
8185
8203
  extraData: E(),
8186
8204
  multiple: !1,
8187
8205
  error: (b) => {
8188
- ke.value?.vditor.tip.show("The file upload failed", 5e3);
8206
+ Le.value?.vditor.tip.show("The file upload failed", 5e3);
8189
8207
  },
8190
8208
  success: (b, g) => {
8191
8209
  const s = JSON.parse(g);
8192
8210
  document.execCommand("insertHTML", !1, `![${s.filename}](${s.file_url})
8193
- `), Y.value = ke.value.getValue(), ke.value?.setValue(ke.value.getValue()), m("update:modelValue", Y.value), ke.value?.vditor.tip.hide();
8211
+ `), Y.value = Le.value.getValue(), Le.value?.setValue(Le.value.getValue()), m("update:modelValue", Y.value), Le.value?.vditor.tip.hide();
8194
8212
  }
8195
- }), Z.value && (ke.value = new Fi(Z.value, w), l("pre.vditor-reset").then((b) => {
8213
+ }), Z.value && (Le.value = new Fi(Z.value, w), l("pre.vditor-reset").then((b) => {
8196
8214
  y(b);
8197
8215
  }));
8198
8216
  });
8199
8217
  const m = pt;
8200
8218
  return Xt({
8201
- getEditor: () => ke.value,
8219
+ getEditor: () => Le.value,
8202
8220
  getEditorValue: () => Y.value
8203
8221
  }), (w, b) => (dt(), Tt("div", qi, [
8204
8222
  Fn("div", null, [
8205
- Ce.label ? (dt(), Ni(Bi, {
8223
+ we.label ? (dt(), Ni(Bi, {
8206
8224
  key: 0,
8207
8225
  classes: "dsg-editor__label",
8208
- label: Ce.label
8226
+ label: we.label
8209
8227
  }, null, 8, ["label"])) : qn("", !0),
8210
8228
  Fn("div", Ki, null, 512)
8211
8229
  ]),
8212
- Ce.errors && Ce.errors.length ? (dt(), Tt("div", zi, [
8213
- (dt(!0), Tt(Ri, null, Ii(Ce.errors, (g, s) => (dt(), Tt("div", {
8230
+ we.errors && we.errors.length ? (dt(), Tt("div", zi, [
8231
+ (dt(!0), Tt(Ri, null, Ii(we.errors, (g, s) => (dt(), Tt("div", {
8214
8232
  class: "dsg-editor--error",
8215
8233
  key: s
8216
8234
  }, Pi(g), 1))), 128))