@dcodegroup-au/dsg-vue 0.1.11 → 0.1.12

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.
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as Ai, mergeModels as Vn, useModel as xi, ref as Wn, watch as Di, useTemplateRef as Hi, onMounted as Oi, createElementBlock as Tt, openBlock as dt, createElementVNode as Fn, createCommentVNode as qn, createBlock as Ni, Fragment as Ri, renderList as Ii, toDisplayString as Pi } from "vue";
2
2
  import { g as ji } from "./_commonjsHelpers-C6fGbg64.js";
3
- import { _ as Bi } from "./DsgLabel.vue_vue_type_style_index_0_lang-BRVMqZ-w.js";
3
+ import { _ as Bi } from "./DsgLabel.vue_vue_type_style_index_0_lang-BXePb1IV.js";
4
4
  var _t = { exports: {} };
5
5
  /*!
6
6
  * Vditor v3.11.2 - A markdown editor written in TypeScript.
@@ -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(Oe, Xt) {
33
+ return Kn || (Kn = 1, (function(Ce, Xt) {
34
34
  (function(nt, Y) {
35
- Oe.exports = Y();
35
+ Ce.exports = Y();
36
36
  })(Ui, function() {
37
37
  return (
38
38
  /******/
@@ -130,11 +130,11 @@ function Vi() {
130
130
  for (var we = -z + P; we <= z - F; we += 2) {
131
131
  var fe = v + we, le;
132
132
  we == -z || we != z && g[fe - 1] < g[fe + 1] ? le = g[fe + 1] : le = g[fe - 1] + 1;
133
- for (var ke = le - we; le < p && ke < m && c.charAt(p - le - 1) == l.charAt(m - ke - 1); )
134
- le++, ke++;
133
+ for (var Te = le - we; le < p && Te < m && c.charAt(p - le - 1) == l.charAt(m - Te - 1); )
134
+ le++, Te++;
135
135
  if (g[fe] = le, le > p)
136
136
  F += 2;
137
- else if (ke > m)
137
+ else if (Te > m)
138
138
  P += 2;
139
139
  else if (!_) {
140
140
  var ne = v + C - we;
@@ -211,8 +211,8 @@ function Vi() {
211
211
  var m = this;
212
212
  function d(M, P, F) {
213
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)), ke = m.diff_commonSuffix(M.substring(0, F), P.substring(0, Q));
215
- ne.length < ke + we && (ne = P.substring(Q - ke, Q) + P.substring(Q, Q + we), oe = M.substring(0, F - ke), me = M.substring(F + we), fe = P.substring(0, Q - ke), le = P.substring(Q + we));
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));
216
216
  }
217
217
  return ne.length * 2 >= M.length ? [oe, me, fe, le, ne] : null;
218
218
  }
@@ -643,9 +643,9 @@ function Vi() {
643
643
  }, oe = L(214), me = L(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 Ce = speechSynthesis.getVoices(), X, de;
647
- return Ce.forEach(function(xe) {
648
- xe.lang === re.replace("_", "-") && (X = xe), xe.default && (de = xe);
646
+ var Le = speechSynthesis.getVoices(), X, de;
647
+ return Le.forEach(function(De) {
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>';
651
651
  document.getElementById("vditorIconScript") || (j = '<svg viewBox="0 0 32 32"><path d="M3.436 0l25.128 16-25.128 16v-32z"></path></svg>', pe = '<svg viewBox="0 0 32 32"><path d="M20.617 0h9.128v32h-9.128v-32zM2.255 32v-32h9.128v32h-9.128z"></path></svg>');
@@ -654,18 +654,18 @@ 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(Ce) {
658
- var X = Ce.target;
657
+ }, I.addEventListener(window.ontouchstart !== void 0 ? "touchend" : "click", function(Le) {
658
+ var X = Le.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;
662
662
  }
663
663
  if (K.style.display = "none", speechSynthesis.cancel(), K.classList.remove("vditor-speech--current"), K.innerHTML = j, getSelection().rangeCount !== 0) {
664
- var de = getSelection().getRangeAt(0), xe = de.toString().trim();
665
- if (xe) {
664
+ var de = getSelection().getRangeAt(0), De = de.toString().trim();
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 = Ce.changedTouches[Ce.changedTouches.length - 1].pageX + 2 + "px" : K.style.left = Ce.clientX + 2 + "px", K.setAttribute("data-text", xe);
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);
669
669
  }
670
670
  }
671
671
  });
@@ -680,19 +680,19 @@ function Vi() {
680
680
  function ie(de) {
681
681
  try {
682
682
  X(j.next(de));
683
- } catch (xe) {
684
- ge(xe);
683
+ } catch (De) {
684
+ ge(De);
685
685
  }
686
686
  }
687
- function Ce(de) {
687
+ function Le(de) {
688
688
  try {
689
689
  X(j.throw(de));
690
- } catch (xe) {
691
- ge(xe);
690
+ } catch (De) {
691
+ ge(De);
692
692
  }
693
693
  }
694
694
  function X(de) {
695
- de.done ? K(de.value) : pe(de.value).then(ie, Ce);
695
+ de.done ? K(de.value) : pe(de.value).then(ie, Le);
696
696
  }
697
697
  X((j = j.apply(I, re || [])).next());
698
698
  });
@@ -706,10 +706,10 @@ function Vi() {
706
706
  }), ge;
707
707
  function ie(X) {
708
708
  return function(de) {
709
- return Ce([X, de]);
709
+ return Le([X, de]);
710
710
  };
711
711
  }
712
- function Ce(X) {
712
+ function Le(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;
@@ -755,7 +755,7 @@ function Vi() {
755
755
  if (X[0] & 5) throw X[1];
756
756
  return { value: X[0] ? X[1] : void 0, done: !0 };
757
757
  }
758
- }, ke = function(I) {
758
+ }, Te = function(I) {
759
759
  var re, W = {
760
760
  anchor: 0,
761
761
  cdn: M.g.CDN,
@@ -779,7 +779,7 @@ function Vi() {
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
781
  }, ve = function(I, re) {
782
- var W = ke(re);
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)({
785
785
  autoSpace: W.markdown.autoSpace,
@@ -813,14 +813,14 @@ function Vi() {
813
813
  return we(this, function(ie) {
814
814
  switch (ie.label) {
815
815
  case 0:
816
- return j = ke(W), [4, ve(re, j)];
816
+ return j = Te(W), [4, ve(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(Ce) {
823
- Ce.id !== ge && document.head.removeChild(Ce);
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);
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(Ce) {
840
- var X = (0, z.lG)(Ce.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, 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");
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);
@@ -2820,9 +2820,9 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
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 Me = {};
2823
+ var ke = {};
2824
2824
  return (() => {
2825
- Y.d(Me, {
2825
+ Y.d(ke, {
2826
2826
  default: () => (
2827
2827
  /* binding */
2828
2828
  _i
@@ -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), ke = function(e, t, n) {
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) {
2947
2947
  n === void 0 && (n = "sv");
2948
2948
  var r = document.createElement("div");
2949
2949
  r.innerHTML = e;
@@ -3103,14 +3103,14 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3103
3103
  ae && ae.setAttribute("aria-label", J.substr(se.length + 3).trim().substr(0, 24));
3104
3104
  }
3105
3105
  }
3106
- var ue, _e = e.ir.element.querySelectorAll("[data-type='link-ref-defs-block']");
3107
- _e.forEach(function($, be) {
3108
- be === 0 ? ue = $ : (ue.insertAdjacentHTML("beforeend", $.innerHTML), $.remove());
3109
- }), _e.length > 0 && e.ir.element.insertAdjacentElement("beforeend", _e[0]);
3110
- var Le, Ae = e.ir.element.querySelectorAll("[data-type='footnotes-block']");
3106
+ var ue, Ae = e.ir.element.querySelectorAll("[data-type='link-ref-defs-block']");
3111
3107
  Ae.forEach(function($, be) {
3112
- be === 0 ? Le = $ : (Le.insertAdjacentHTML("beforeend", $.innerHTML), $.remove());
3113
- }), Ae.length > 0 && e.ir.element.insertAdjacentElement("beforeend", Ae[0]), (0, k.ib)(e.ir.element, t), e.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function($) {
3108
+ be === 0 ? ue = $ : (ue.insertAdjacentHTML("beforeend", $.innerHTML), $.remove());
3109
+ }), Ae.length > 0 && e.ir.element.insertAdjacentElement("beforeend", Ae[0]);
3110
+ var Me, xe = e.ir.element.querySelectorAll("[data-type='footnotes-block']");
3111
+ xe.forEach(function($, be) {
3112
+ be === 0 ? Me = $ : (Me.insertAdjacentHTML("beforeend", $.innerHTML), $.remove());
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
3114
  ve($, e);
3115
3115
  }), je(e), Ve(e, {
3116
3116
  enableAddUndoStack: !0,
@@ -3350,7 +3350,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3350
3350
  enableHint: !0,
3351
3351
  enableInput: !0
3352
3352
  });
3353
- }, Ce = function(e, t) {
3353
+ }, Le = 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;
@@ -3397,7 +3397,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3397
3397
  return !1;
3398
3398
  }, X = Y(538), de = function(e) {
3399
3399
  e.options.theme === "dark" ? e.element.classList.add("vditor--dark") : e.element.classList.remove("vditor--dark");
3400
- }, xe = function(e) {
3400
+ }, De = function(e) {
3401
3401
  e.element.innerHTML = "", e.element.classList.add("vditor"), e.options.rtl && e.element.setAttribute("dir", "rtl"), de(e), (0, X.Z)(e.options.preview.theme.current, e.options.preview.theme.path), typeof e.options.height == "number" ? e.element.style.height = e.options.height + "px" : e.element.style.height = e.options.height, typeof e.options.minHeight == "number" && (e.element.style.minHeight = e.options.minHeight + "px"), typeof e.options.width == "number" ? e.element.style.width = e.options.width + "px" : e.element.style.width = e.options.width, e.element.appendChild(e.toolbar.element);
3402
3402
  var t = document.createElement("div");
3403
3403
  if (t.className = "vditor-content", e.options.outline.position === "left" && t.appendChild(e.outline.element), t.appendChild(e.wysiwyg.element.parentElement), t.appendChild(e.sv.element), t.appendChild(e.ir.element.parentElement), t.appendChild(e.preview.element), e.toolbar.elements.devtools && t.appendChild(e.devtools.element), e.options.outline.position === "right" && (e.outline.element.classList.add("vditor-outline--right"), t.appendChild(e.outline.element)), e.upload && t.appendChild(e.upload.element), e.options.resize.enable && t.appendChild(e.resize.element), t.appendChild(e.hint.element), t.appendChild(e.tip.element), e.element.appendChild(t), t.addEventListener("click", function() {
@@ -3622,7 +3622,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3622
3622
  B.focus(), B.select();
3623
3623
  }
3624
3624
  }
3625
- if (Te(e, t))
3625
+ if (_e(e, t))
3626
3626
  return !0;
3627
3627
  if (I("⇧⌘U", t)) {
3628
3628
  var O = e.wysiwyg.popover.querySelector('[data-type="up"]');
@@ -3670,7 +3670,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3670
3670
  J && J.nodeType !== 3 && J.getAttribute("data-type") === "math-inline" && n.setStartAfter(J);
3671
3671
  }
3672
3672
  return i && mt(i, e, t, n) ? (t.preventDefault(), !0) : !1;
3673
- }, Te = function(e, t) {
3673
+ }, _e = function(e, t) {
3674
3674
  if (I("⇧⌘X", t)) {
3675
3675
  var n = e.wysiwyg.popover.querySelector('[data-type="remove"]');
3676
3676
  return n && n.click(), t.preventDefault(), !0;
@@ -3683,7 +3683,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3683
3683
  t.startContainer.nodeType === 3 ? n = t.startContainer.parentElement : n = n.childNodes[t.startOffset >= n.childNodes.length ? n.childNodes.length - 1 : t.startOffset];
3684
3684
  var r = (0, s.a1)(n, "data-type", "footnotes-block");
3685
3685
  if (r) {
3686
- e.wysiwyg.popover.innerHTML = "", Ie(r, e), De(e, "footnotes-block"), Re(e, r);
3686
+ e.wysiwyg.popover.innerHTML = "", Ie(r, e), He(e, "footnotes-block"), Re(e, r);
3687
3687
  return;
3688
3688
  }
3689
3689
  var i = (0, s.lG)(n, "LI");
@@ -3741,14 +3741,14 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3741
3741
  ]), p(e.toolbar.elements, ["inline-code"])) : S ? (d(e.toolbar.elements, ["bold"]), p(e.toolbar.elements, ["headings"])) : f && d(e.toolbar.elements, ["table"]);
3742
3742
  var T = (0, s.fb)(n, "vditor-toc");
3743
3743
  if (T) {
3744
- e.wysiwyg.popover.innerHTML = "", Ie(T, e), De(e, "vditor-toc"), Re(e, T);
3744
+ e.wysiwyg.popover.innerHTML = "", Ie(T, e), He(e, "vditor-toc"), Re(e, T);
3745
3745
  return;
3746
3746
  }
3747
3747
  var N = (0, C.S)(n, "BLOCKQUOTE");
3748
- if (N && (e.wysiwyg.popover.innerHTML = "", Je(t, N, e), Xe(t, N, e), Ie(N, e), De(e, "blockquote"), Re(e, N)), i && (e.wysiwyg.popover.innerHTML = "", Je(t, i, e), Xe(t, i, e), Ie(i, e), De(e, "li"), Re(e, i)), f) {
3748
+ if (N && (e.wysiwyg.popover.innerHTML = "", Je(t, N, e), Xe(t, N, e), Ie(N, e), He(e, "blockquote"), Re(e, N)), i && (e.wysiwyg.popover.innerHTML = "", Je(t, i, e), Xe(t, i, e), Ie(i, e), He(e, "li"), Re(e, i)), f) {
3749
3749
  e.options.lang, e.options, e.wysiwyg.popover.innerHTML = "";
3750
3750
  var R = function() {
3751
- var q = f.rows.length, te = f.rows[0].cells.length, Ke = parseInt(be.value, 10) || q, ze = parseInt(He.value, 10) || te;
3751
+ var q = f.rows.length, te = f.rows[0].cells.length, Ke = parseInt(be.value, 10) || q, ze = parseInt(Oe.value, 10) || te;
3752
3752
  if (!(Ke === q && te === ze)) {
3753
3753
  if (te !== ze)
3754
3754
  for (var ft = ze - te, Ue = 0; Ue < f.rows.length; Ue++)
@@ -3802,18 +3802,18 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3802
3802
  var q = getSelection().getRangeAt(0).startContainer, te = (0, s.lG)(q, "TD") || (0, s.lG)(q, "TH");
3803
3803
  te && St(e, f, te);
3804
3804
  };
3805
- var _e = document.createElement("button");
3806
- _e.setAttribute("type", "button"), _e.setAttribute("aria-label", window.VditorI18n.insertColumnLeft + "<" + (0, l.ns)("⇧⌘G") + ">"), _e.setAttribute("data-type", "insertColumn"), _e.innerHTML = '<svg><use xlink:href="#vditor-icon-insert-columnb"></use></svg>', _e.className = "vditor-icon vditor-tooltipped vditor-tooltipped__n", _e.onclick = function() {
3805
+ var Ae = document.createElement("button");
3806
+ Ae.setAttribute("type", "button"), Ae.setAttribute("aria-label", window.VditorI18n.insertColumnLeft + "<" + (0, l.ns)("⇧⌘G") + ">"), Ae.setAttribute("data-type", "insertColumn"), Ae.innerHTML = '<svg><use xlink:href="#vditor-icon-insert-columnb"></use></svg>', Ae.className = "vditor-icon vditor-tooltipped vditor-tooltipped__n", Ae.onclick = function() {
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 Le = document.createElement("button");
3811
- Le.setAttribute("type", "button"), Le.setAttribute("aria-label", window.VditorI18n["delete-row"] + "<" + (0, l.ns)("⌘-") + ">"), Le.setAttribute("data-type", "deleteRow"), Le.innerHTML = '<svg><use xlink:href="#vditor-icon-delete-row"></use></svg>', Le.className = "vditor-icon vditor-tooltipped vditor-tooltipped__n", Le.onclick = function() {
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() {
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
  };
3815
- var Ae = document.createElement("button");
3816
- Ae.setAttribute("type", "button"), Ae.setAttribute("aria-label", window.VditorI18n["delete-column"] + "<" + (0, l.ns)("⇧⌘-") + ">"), Ae.setAttribute("data-type", "deleteColumn"), Ae.innerHTML = '<svg><use xlink:href="#vditor-icon-delete-column"></use></svg>', Ae.className = "vditor-icon vditor-tooltipped vditor-tooltipped__n", Ae.onclick = function() {
3815
+ var xe = document.createElement("button");
3816
+ xe.setAttribute("type", "button"), xe.setAttribute("aria-label", window.VditorI18n["delete-column"] + "<" + (0, l.ns)("⇧⌘-") + ">"), xe.setAttribute("data-type", "deleteColumn"), xe.innerHTML = '<svg><use xlink:href="#vditor-icon-delete-column"></use></svg>', xe.className = "vditor-icon vditor-tooltipped vditor-tooltipped__n", xe.onclick = function() {
3817
3817
  var q = getSelection().getRangeAt(0).startContainer, te = (0, s.lG)(q, "TD") || (0, s.lG)(q, "TH");
3818
3818
  te && En(e, t, f, te);
3819
3819
  };
@@ -3825,26 +3825,26 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3825
3825
  }, be.onkeydown = function(q) {
3826
3826
  if (!q.isComposing) {
3827
3827
  if (q.key === "Tab") {
3828
- He.focus(), He.select(), q.preventDefault();
3828
+ Oe.focus(), Oe.select(), q.preventDefault();
3829
3829
  return;
3830
3830
  }
3831
- Te(e, q) || Be(q, t);
3831
+ _e(e, q) || Be(q, t);
3832
3832
  }
3833
3833
  };
3834
3834
  var Mt = document.createElement("span");
3835
3835
  Mt.setAttribute("aria-label", window.VditorI18n.column), Mt.className = "vditor-tooltipped vditor-tooltipped__n";
3836
- var He = document.createElement("input");
3837
- Mt.appendChild(He), He.type = "number", He.min = "1", He.className = "vditor-input", He.style.width = "42px", He.style.textAlign = "center", He.setAttribute("placeholder", window.VditorI18n.column), He.value = f.rows[0].cells.length.toString(), He.oninput = function() {
3836
+ var Oe = document.createElement("input");
3837
+ Mt.appendChild(Oe), Oe.type = "number", Oe.min = "1", Oe.className = "vditor-input", Oe.style.width = "42px", Oe.style.textAlign = "center", Oe.setAttribute("placeholder", window.VditorI18n.column), Oe.value = f.rows[0].cells.length.toString(), Oe.oninput = function() {
3838
3838
  R();
3839
- }, He.onkeydown = function(q) {
3839
+ }, Oe.onkeydown = function(q) {
3840
3840
  if (!q.isComposing) {
3841
3841
  if (q.key === "Tab") {
3842
3842
  be.focus(), be.select(), q.preventDefault();
3843
3843
  return;
3844
3844
  }
3845
- Te(e, q) || Be(q, t);
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", _e), e.wysiwyg.popover.insertAdjacentElement("beforeend", ue), e.wysiwyg.popover.insertAdjacentElement("beforeend", Le), e.wysiwyg.popover.insertAdjacentElement("beforeend", Ae), e.wysiwyg.popover.insertAdjacentElement("beforeend", $), e.wysiwyg.popover.insertAdjacentHTML("beforeend", " x "), e.wysiwyg.popover.insertAdjacentElement("beforeend", Mt), De(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", 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);
3848
3848
  }
3849
3849
  var Gt = (0, s.a1)(n, "data-type", "link-ref");
3850
3850
  Gt && tn(e, Gt, t);
@@ -3857,8 +3857,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
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
3858
  We.value.trim() !== "" && Qe.setAttribute("data-footnotes-label", We.value), typeof e.options.input == "function" && e.options.input(x(e));
3859
3859
  }, We.onkeydown = function(te) {
3860
- te.isComposing || Te(e, te) || Be(te, t);
3861
- }, Ie(Qe, e), e.wysiwyg.popover.insertAdjacentElement("beforeend", $), De(e, "footnotes-ref"), Re(e, Qe);
3860
+ te.isComposing || _e(e, te) || Be(te, t);
3861
+ }, Ie(Qe, e), e.wysiwyg.popover.insertAdjacentElement("beforeend", $), He(e, "footnotes-ref"), Re(e, Qe);
3862
3862
  }
3863
3863
  var Se = (0, s.fb)(n, "vditor-wysiwyg__block"), In = Se ? Se.getAttribute("data-type").indexOf("block") > -1 : !1;
3864
3864
  if (e.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(q) {
@@ -3876,7 +3876,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
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
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));
3878
3878
  }, Pe.onkeydown = function(q) {
3879
- if (!q.isComposing && !Te(e, q)) {
3879
+ if (!q.isComposing && !_e(e, q)) {
3880
3880
  if (q.key === "Escape" && e.hint.element.style.display === "block") {
3881
3881
  e.hint.element.style.display = "none", q.preventDefault();
3882
3882
  return;
@@ -3894,9 +3894,9 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3894
3894
  });
3895
3895
  }), e.hint.genHTML(ze, ft, e), q.preventDefault();
3896
3896
  }
3897
- }, e.wysiwyg.popover.insertAdjacentElement("beforeend", kt), De(e, "code-block");
3897
+ }, e.wysiwyg.popover.insertAdjacentElement("beforeend", kt), He(e, "code-block");
3898
3898
  } else
3899
- De(e, "block");
3899
+ He(e, "block");
3900
3900
  Re(e, Se);
3901
3901
  } else
3902
3902
  Se = void 0;
@@ -3908,12 +3908,12 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
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
3909
  S.setAttribute("data-id", qe.value), typeof e.options.input == "function" && e.options.input(x(e));
3910
3910
  }, qe.onkeydown = function(te) {
3911
- te.isComposing || Te(e, te) || Be(te, t);
3912
- }, Je(t, S, e), Xe(t, S, e), Ie(S, e), e.wysiwyg.popover.insertAdjacentElement("beforeend", $), De(e, "heading"), Re(e, S);
3911
+ te.isComposing || _e(e, te) || Be(te, t);
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
3914
  if (h && Dt(e, h, t), !N && !i && !f && !Se && !h && !Gt && !Qe && !S && !T) {
3915
3915
  var et = (0, s.a1)(n, "data-block", "0");
3916
- et && et.parentElement.isEqualNode(e.wysiwyg.element) ? (e.wysiwyg.popover.innerHTML = "", Je(t, et, e), Xe(t, et, e), Ie(et, e), De(e, "block"), Re(e, et)) : e.wysiwyg.popover.style.display = "none";
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
  }
3918
3918
  e.wysiwyg.element.querySelectorAll('span[data-type="backslash"] > span').forEach(function(q) {
3919
3919
  q.style.display = "none";
@@ -3935,7 +3935,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3935
3935
  i.appendChild(a), a.className = "vditor-input", a.setAttribute("placeholder", window.VditorI18n.textIsNotEmpty), a.style.width = "120px", a.value = t.getAttribute("alt") || t.textContent, a.oninput = function() {
3936
3936
  r();
3937
3937
  }, a.onkeydown = function(h) {
3938
- Te(e, h) || Be(h, n) || at(e, t, h, u);
3938
+ _e(e, h) || Be(h, n) || at(e, t, h, u);
3939
3939
  };
3940
3940
  var o = document.createElement("span");
3941
3941
  o.setAttribute("aria-label", window.VditorI18n.linkRef), o.className = "vditor-tooltipped vditor-tooltipped__n";
@@ -3943,8 +3943,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3943
3943
  o.appendChild(u), u.className = "vditor-input", u.setAttribute("placeholder", window.VditorI18n.linkRef), u.value = t.getAttribute("data-link-label"), u.oninput = function() {
3944
3944
  r();
3945
3945
  }, u.onkeydown = function(h) {
3946
- Te(e, h) || Be(h, n) || at(e, t, h, a);
3947
- }, Ie(t, e), e.wysiwyg.popover.insertAdjacentElement("beforeend", i), e.wysiwyg.popover.insertAdjacentElement("beforeend", o), De(e, "link-ref"), Re(e, t);
3946
+ _e(e, h) || Be(h, n) || at(e, t, h, a);
3947
+ }, Ie(t, e), e.wysiwyg.popover.insertAdjacentElement("beforeend", i), e.wysiwyg.popover.insertAdjacentElement("beforeend", o), He(e, "link-ref"), Re(e, t);
3948
3948
  }, Je = function(e, t, n) {
3949
3949
  var r = t.previousElementSibling;
3950
3950
  if (!(!r || !t.parentElement.isEqualNode(n.wysiwyg.element) && t.tagName !== "LI")) {
@@ -3992,7 +3992,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
3992
3992
  i.appendChild(a), a.className = "vditor-input", a.setAttribute("placeholder", window.VditorI18n.textIsNotEmpty), a.style.width = "120px", a.value = t.innerHTML || "", a.oninput = function() {
3993
3993
  r();
3994
3994
  }, a.onkeydown = function(S) {
3995
- Te(e, S) || Be(S, n) || at(e, t, S, u);
3995
+ _e(e, S) || Be(S, n) || at(e, t, S, u);
3996
3996
  };
3997
3997
  var o = document.createElement("span");
3998
3998
  o.setAttribute("aria-label", window.VditorI18n.link), o.className = "vditor-tooltipped vditor-tooltipped__n";
@@ -4000,7 +4000,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4000
4000
  o.appendChild(u), u.className = "vditor-input", u.setAttribute("placeholder", window.VditorI18n.link), u.value = t.getAttribute("href") || "", u.oninput = function() {
4001
4001
  r();
4002
4002
  }, u.onkeydown = function(S) {
4003
- Te(e, S) || Be(S, n) || at(e, t, S, f);
4003
+ _e(e, S) || Be(S, n) || at(e, t, S, f);
4004
4004
  };
4005
4005
  var h = document.createElement("span");
4006
4006
  h.setAttribute("aria-label", window.VditorI18n.tooltipText), h.className = "vditor-tooltipped vditor-tooltipped__n";
@@ -4008,8 +4008,8 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4008
4008
  h.appendChild(f), f.className = "vditor-input", f.setAttribute("placeholder", window.VditorI18n.tooltipText), f.style.width = "60px", f.value = t.getAttribute("title") || "", f.oninput = function() {
4009
4009
  r();
4010
4010
  }, f.onkeydown = function(S) {
4011
- Te(e, S) || Be(S, n) || at(e, t, S, a);
4012
- }, Ie(t, e), e.wysiwyg.popover.insertAdjacentElement("beforeend", i), e.wysiwyg.popover.insertAdjacentElement("beforeend", o), e.wysiwyg.popover.insertAdjacentElement("beforeend", h), De(e, "a"), Re(e, t);
4011
+ _e(e, S) || Be(S, n) || at(e, t, S, a);
4012
+ }, Ie(t, e), e.wysiwyg.popover.insertAdjacentElement("beforeend", i), e.wysiwyg.popover.insertAdjacentElement("beforeend", o), e.wysiwyg.popover.insertAdjacentElement("beforeend", h), He(e, "a"), Re(e, t);
4013
4013
  }, $n = function(e, t) {
4014
4014
  var n = e.target;
4015
4015
  t.wysiwyg.popover.innerHTML = "";
@@ -4021,7 +4021,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4021
4021
  i.appendChild(a), a.className = "vditor-input", a.setAttribute("placeholder", window.VditorI18n.imageURL), a.value = n.getAttribute("src") || "", a.oninput = function() {
4022
4022
  r();
4023
4023
  }, a.onkeydown = function(S) {
4024
- Te(t, S);
4024
+ _e(t, S);
4025
4025
  };
4026
4026
  var o = document.createElement("span");
4027
4027
  o.setAttribute("aria-label", window.VditorI18n.alternateText), o.className = "vditor-tooltipped vditor-tooltipped__n";
@@ -4029,7 +4029,7 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4029
4029
  o.appendChild(u), u.className = "vditor-input", u.setAttribute("placeholder", window.VditorI18n.alternateText), u.style.width = "52px", u.value = n.getAttribute("alt") || "", u.oninput = function() {
4030
4030
  r();
4031
4031
  }, u.onkeydown = function(S) {
4032
- Te(t, S);
4032
+ _e(t, S);
4033
4033
  };
4034
4034
  var h = document.createElement("span");
4035
4035
  h.setAttribute("aria-label", window.VditorI18n.title), h.className = "vditor-tooltipped vditor-tooltipped__n";
@@ -4037,12 +4037,12 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
4037
4037
  h.appendChild(f), f.className = "vditor-input", f.setAttribute("placeholder", window.VditorI18n.title), f.value = n.getAttribute("title") || "", f.oninput = function() {
4038
4038
  r();
4039
4039
  }, f.onkeydown = function(S) {
4040
- Te(t, S);
4041
- }, Ie(n, t), t.wysiwyg.popover.insertAdjacentElement("beforeend", i), t.wysiwyg.popover.insertAdjacentElement("beforeend", o), t.wysiwyg.popover.insertAdjacentElement("beforeend", h), De(t, "image"), Re(t, n);
4040
+ _e(t, S);
4041
+ }, Ie(n, t), t.wysiwyg.popover.insertAdjacentElement("beforeend", i), t.wysiwyg.popover.insertAdjacentElement("beforeend", o), t.wysiwyg.popover.insertAdjacentElement("beforeend", h), He(t, "image"), Re(t, n);
4042
4042
  }, Be = function(e, t) {
4043
4043
  if (!(0, l.yl)(e) && !e.shiftKey && e.key === "Enter" || e.key === "Escape")
4044
4044
  return t && (0, k.Hc)(t), e.preventDefault(), e.stopPropagation(), !0;
4045
- }, De = function(e, t) {
4045
+ }, He = function(e, t) {
4046
4046
  e.options.customWysiwygToolbar(t, e.wysiwyg.popover);
4047
4047
  }, Ye = function(e) {
4048
4048
  e.currentMode === "wysiwyg" ? Ge(e) : e.currentMode === "ir" && rt(e);
@@ -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 (Ce(e, n))
4299
+ if (Le(e, n))
4300
4300
  return;
4301
4301
  } else if (e.currentMode === "wysiwyg") {
4302
4302
  if (Yn(e, n))
@@ -5250,21 +5250,21 @@ onclick="event.stopPropagation();this.previousElementSibling.select();document.e
5250
5250
  ue.open("POST", e.options.upload.linkToImgUrl), e.options.upload.token && ue.setRequestHeader("X-Upload-Token", e.options.upload.token), e.options.upload.withCredentials && (ue.withCredentials = !0), ln(e, ue), ue.setRequestHeader("Content-Type", "application/json; charset=utf-8"), ue.onreadystatechange = function() {
5251
5251
  if (ue.readyState === XMLHttpRequest.DONE) {
5252
5252
  if (ue.status === 200) {
5253
- var _e = ue.responseText;
5254
- e.options.upload.linkToImgFormat && (_e = e.options.upload.linkToImgFormat(ue.responseText));
5255
- var Le = JSON.parse(_e);
5256
- if (Le.code !== 0) {
5257
- e.tip.show(Le.msg);
5253
+ var Ae = ue.responseText;
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);
5258
5258
  return;
5259
5259
  }
5260
- var Ae = Le.data.originalURL;
5260
+ var xe = Me.data.originalURL;
5261
5261
  if (e.currentMode === "sv")
5262
5262
  e.sv.element.querySelectorAll(".vditor-sv__marker--link").forEach(function(be) {
5263
- be.textContent === Ae && (be.textContent = Le.data.url);
5263
+ be.textContent === xe && (be.textContent = Me.data.url);
5264
5264
  });
5265
5265
  else {
5266
- var $ = e[e.currentMode].element.querySelector('img[src="'.concat(Ae, '"]'));
5267
- $.src = Le.data.url, e.currentMode === "ir" && ($.previousElementSibling.previousElementSibling.innerHTML = Le.data.url);
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);
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 = ke(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, ve(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:
@@ -8015,13 +8015,13 @@ window.addEventListener("message", (e) => {
8015
8015
  paragraphBeginningSpace: i.vditor.options.preview.markdown.paragraphBeginningSpace,
8016
8016
  sanitize: i.vditor.options.preview.markdown.sanitize,
8017
8017
  toc: i.vditor.options.preview.markdown.toc
8018
- }), i.vditor.preview = new Sr(i.vditor), xe(i.vditor), r.after && r.after(), r.icon && (0, A.J)("".concat(r.cdn, "/dist/js/icons/").concat(r.icon, ".js"), "vditorIconScript");
8018
+ }), i.vditor.preview = new Sr(i.vditor), De(i.vditor), r.after && r.after(), r.icon && (0, A.J)("".concat(r.cdn, "/dist/js/icons/").concat(r.icon, ".js"), "vditorIconScript");
8019
8019
  }));
8020
8020
  }, t;
8021
8021
  })(Z.default)
8022
8022
  );
8023
8023
  const _i = Ti;
8024
- })(), Me = Me.default, Me;
8024
+ })(), ke = ke.default, ke;
8025
8025
  })()
8026
8026
  );
8027
8027
  });
@@ -8050,17 +8050,17 @@ 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(Oe, { expose: Xt, emit: pt }) {
8054
- let nt = xi(Oe, "modelValue"), Y = Wn(nt);
8053
+ setup(Ce, { expose: Xt, emit: pt }) {
8054
+ let nt = xi(Ce, "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 Me = Wn(), Z = Hi("vditor"), E = () => ({
8062
- modelId: Oe.targetModel ? Oe.targetModel.id : "",
8063
- modelClass: Oe.targetModelClass ? Oe.targetModelClass : ""
8061
+ const ke = Wn(), Z = Hi("vditor"), E = () => ({
8062
+ modelId: Ce.targetModel ? Ce.targetModel.id : "",
8063
+ modelClass: Ce.targetModelClass ? Ce.targetModelClass : ""
8064
8064
  }), L = (w, b) => {
8065
8065
  if (!w)
8066
8066
  return !1;
@@ -8074,7 +8074,7 @@ const Fi = /* @__PURE__ */ ji(Wi), qi = { class: "dsg-editor" }, Ki = {
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(Me.value.vditor);
8077
+ let b = x(ke.value.vditor);
8078
8078
  const g = L(b.startContainer, "LI");
8079
8079
  if (!g || g.nextElementSibling || g.previousElementSibling)
8080
8080
  return !1;
@@ -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 = () => Oe.csrf ? Oe.csrf : window.csrf, l = (w) => new Promise((b) => {
8087
+ }, c = () => Ce.csrf ? Ce.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(_));
@@ -8104,7 +8104,7 @@ const Fi = /* @__PURE__ */ ji(Wi), qi = { class: "dsg-editor" }, Ki = {
8104
8104
  const _ = new FileReader();
8105
8105
  _.readAsDataURL(g.getAsFile()), _.onload = () => {
8106
8106
  const D = _.result;
8107
- Me.value?.insertMD(`🐰 ![${s}.${C}](${D})
8107
+ ke.value?.insertMD(`🐰 ![${s}.${C}](${D})
8108
8108
  `);
8109
8109
  };
8110
8110
  }
@@ -8135,7 +8135,7 @@ const Fi = /* @__PURE__ */ ji(Wi), qi = { class: "dsg-editor" }, Ki = {
8135
8135
  "insert-after",
8136
8136
  "|"
8137
8137
  ];
8138
- Oe.mediaUploadEndpoint && c() !== "" && w.push("upload");
8138
+ Ce.mediaUploadEndpoint && c() !== "" && w.push("upload");
8139
8139
  let b = [
8140
8140
  "table",
8141
8141
  "|",
@@ -8171,46 +8171,46 @@ const Fi = /* @__PURE__ */ ji(Wi), qi = { class: "dsg-editor" }, Ki = {
8171
8171
  after: () => {
8172
8172
  Z.value.getElementsByClassName("vditor-wysiwyg")[0].addEventListener("keyup", (g) => {
8173
8173
  g.key === "Enter" && A() && g.preventDefault();
8174
- }), Y.value && Me.value?.setValue(Y.value);
8174
+ }), Y.value && ke.value?.setValue(Y.value);
8175
8175
  },
8176
8176
  input: (b) => {
8177
8177
  m("on-before-input", Y.value, b), Y.value = b, m("on-after-input", b);
8178
8178
  },
8179
8179
  upload: {}
8180
8180
  };
8181
- Oe.mediaUploadEndpoint && c() !== "" && (w.upload = {
8181
+ Ce.mediaUploadEndpoint && c() !== "" && (w.upload = {
8182
8182
  accept: "image/*",
8183
- url: Oe.mediaUploadEndpoint,
8183
+ url: Ce.mediaUploadEndpoint,
8184
8184
  headers: { "X-CSRF-TOKEN": c() },
8185
8185
  extraData: E(),
8186
8186
  multiple: !1,
8187
8187
  error: (b) => {
8188
- Me.value?.vditor.tip.show("The file upload failed", 5e3);
8188
+ ke.value?.vditor.tip.show("The file upload failed", 5e3);
8189
8189
  },
8190
8190
  success: (b, g) => {
8191
8191
  const s = JSON.parse(g);
8192
8192
  document.execCommand("insertHTML", !1, `![${s.filename}](${s.file_url})
8193
- `), Y.value = Me.value.getValue(), Me.value?.setValue(Me.value.getValue()), m("update:modelValue", Y.value), Me.value?.vditor.tip.hide();
8193
+ `), Y.value = ke.value.getValue(), ke.value?.setValue(ke.value.getValue()), m("update:modelValue", Y.value), ke.value?.vditor.tip.hide();
8194
8194
  }
8195
- }), Z.value && (Me.value = new Fi(Z.value, w), l("pre.vditor-reset").then((b) => {
8195
+ }), Z.value && (ke.value = new Fi(Z.value, w), l("pre.vditor-reset").then((b) => {
8196
8196
  y(b);
8197
8197
  }));
8198
8198
  });
8199
8199
  const m = pt;
8200
8200
  return Xt({
8201
- getEditor: () => Me.value,
8201
+ getEditor: () => ke.value,
8202
8202
  getEditorValue: () => Y.value
8203
8203
  }), (w, b) => (dt(), Tt("div", qi, [
8204
8204
  Fn("div", null, [
8205
- w.label ? (dt(), Ni(Bi, {
8205
+ Ce.label ? (dt(), Ni(Bi, {
8206
8206
  key: 0,
8207
8207
  classes: "dsg-editor__label",
8208
- label: w.label
8208
+ label: Ce.label
8209
8209
  }, null, 8, ["label"])) : qn("", !0),
8210
8210
  Fn("div", Ki, null, 512)
8211
8211
  ]),
8212
- w.errors && w.errors.length ? (dt(), Tt("div", zi, [
8213
- (dt(!0), Tt(Ri, null, Ii(w.errors, (g, s) => (dt(), Tt("div", {
8212
+ Ce.errors && Ce.errors.length ? (dt(), Tt("div", zi, [
8213
+ (dt(!0), Tt(Ri, null, Ii(Ce.errors, (g, s) => (dt(), Tt("div", {
8214
8214
  class: "dsg-editor--error",
8215
8215
  key: s
8216
8216
  }, Pi(g), 1))), 128))