@opentiny/tiny-robot 0.3.0-alpha.25 → 0.3.0-alpha.27

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,12 +1,12 @@
1
1
  var hn = Object.defineProperty;
2
2
  var pn = (u, e, t) => e in u ? hn(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
3
3
  var Mu = (u, e, t) => pn(u, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as Du, ref as c0, createElementBlock as $, openBlock as S, createElementVNode as Y, createVNode as At, toDisplayString as Au, unref as i0, normalizeClass as Eu, withDirectives as bn, vShow as _n, computed as J, useCssModule as mn, createCommentVNode as Xu, createBlock as eu, resolveDynamicComponent as mu, createTextVNode as xn, inject as $0, normalizeProps as Ae, mergeProps as Ju, h as j0, useSlots as gn, useAttrs as kn, normalizeStyle as En, renderSlot as ge, Fragment as u0, renderList as ke, watch as An, createSlots as G0, withCtx as W0, guardReactiveProps as Cn, provide as Z0 } from "vue";
4
+ import { defineComponent as Du, ref as c0, createElementBlock as $, openBlock as S, createElementVNode as Y, createVNode as At, toDisplayString as Au, unref as i0, normalizeClass as Eu, withDirectives as bn, vShow as _n, computed as X, useCssModule as mn, createCommentVNode as Xu, createBlock as eu, resolveDynamicComponent as mu, createTextVNode as xn, inject as $0, normalizeProps as Ae, mergeProps as Ju, h as j0, useSlots as gn, useAttrs as kn, normalizeStyle as En, renderSlot as ge, Fragment as u0, renderList as ke, watch as An, createSlots as G0, withCtx as W0, guardReactiveProps as Cn, provide as Z0 } from "vue";
5
5
  import { _ as Dn } from "../loading.js";
6
6
  import { t as yn } from "../utils.js";
7
7
  import { IconArrowUp as Fn, IconPlugin as V0, IconArrowDown as Tn, IconLoading as Sn, IconError as wn, IconCancelled as vn } from "@opentiny/tiny-robot-svgs";
8
8
  import { _ as re } from "../_plugin-vue_export-helper.js";
9
- import { u as Rn } from "../index2.js";
9
+ import { u as Rn } from "../index3.js";
10
10
  class a0 {
11
11
  }
12
12
  const In = { class: "tr-bubble__step-text" }, Mn = { class: "tr-bubble__step-text-title" }, Ln = { class: "tr-bubble__step-text-content-wrapper" }, On = /* @__PURE__ */ Du({
@@ -60,21 +60,21 @@ const In = { class: "tr-bubble__step-text" }, Mn = { class: "tr-bubble__step-tex
60
60
  ["success", { text: "已调用", icon: V0 }],
61
61
  ["failed", { text: "调用失败", icon: wn }],
62
62
  ["cancelled", { text: "已取消", icon: vn }]
63
- ]), r = J(() => n.get(e.status) || { text: "", icon: V0 }), o = mn(), i = (c) => {
63
+ ]), r = X(() => n.get(e.status) || { text: "", icon: V0 }), o = mn(), i = (c) => {
64
64
  if (!c)
65
65
  return "";
66
66
  let a = "";
67
67
  const s = e.formatPretty ? 2 : 0;
68
68
  try {
69
69
  typeof c == "string" ? a = JSON.stringify(JSON.parse(c), null, s) : a = JSON.stringify(c, null, s);
70
- } catch (d) {
71
- console.warn(d);
70
+ } catch (f) {
71
+ console.warn(f);
72
72
  }
73
73
  return a = a.replace(
74
74
  /("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g,
75
- (d) => {
76
- let f = "number";
77
- return /^"/.test(d) ? f = /:$/.test(d) ? "key" : "string" : /true|false/.test(d) ? f = "boolean" : /null/.test(d) && (f = "null"), `<span class="${o[f]}">${d}</span>`;
75
+ (f) => {
76
+ let d = "number";
77
+ return /^"/.test(f) ? d = /:$/.test(f) ? "key" : "string" : /true|false/.test(f) ? d = "boolean" : /null/.test(f) && (d = "null"), `<span class="${o[d]}">${f}</span>`;
78
78
  }
79
79
  ), a;
80
80
  };
@@ -126,7 +126,7 @@ const In = { class: "tr-bubble__step-text" }, Mn = { class: "tr-bubble__step-tex
126
126
  const e = $0(Dt, Ct), t = $0(yt, s0), n = u, r = (i) => {
127
127
  const c = e.get(i) || t;
128
128
  return typeof c == "function" ? { isComponent: !1, vNodeOrComponent: c(n.item) } : c instanceof a0 ? { isComponent: !1, vNodeOrComponent: c.render(n.item) } : { isComponent: !0, vNodeOrComponent: c };
129
- }, o = J(() => r(n.item.type));
129
+ }, o = X(() => r(n.item.type));
130
130
  return (i, c) => o.value.isComponent ? (S(), eu(mu(o.value.vNodeOrComponent), Ae(Ju({ key: 0 }, n.item)), null, 16)) : (S(), eu(mu(o.value.vNodeOrComponent), { key: 1 }));
131
131
  }
132
132
  });
@@ -290,8 +290,8 @@ function vt() {
290
290
  Node: c,
291
291
  Element: a,
292
292
  NodeFilter: s,
293
- NamedNodeMap: d = u.NamedNodeMap || u.MozNamedAttrMap,
294
- HTMLFormElement: f,
293
+ NamedNodeMap: f = u.NamedNodeMap || u.MozNamedAttrMap,
294
+ HTMLFormElement: d,
295
295
  DOMParser: _,
296
296
  trustedTypes: p
297
297
  } = u, h = a.prototype, C = Vu(h, "cloneNode"), D = Vu(h, "remove"), T = Vu(h, "nextSibling"), E = Vu(h, "childNodes"), k = Vu(h, "parentNode");
@@ -449,7 +449,7 @@ function vt() {
449
449
  null
450
450
  );
451
451
  }, qe = function(l) {
452
- return l instanceof f && (typeof l.nodeName != "string" || typeof l.textContent != "string" || typeof l.removeChild != "function" || !(l.attributes instanceof d) || typeof l.removeAttribute != "function" || typeof l.setAttribute != "function" || typeof l.namespaceURI != "string" || typeof l.insertBefore != "function" || typeof l.hasChildNodes != "function");
452
+ return l instanceof d && (typeof l.nodeName != "string" || typeof l.textContent != "string" || typeof l.removeChild != "function" || !(l.attributes instanceof f) || typeof l.removeAttribute != "function" || typeof l.setAttribute != "function" || typeof l.namespaceURI != "string" || typeof l.insertBefore != "function" || typeof l.hasChildNodes != "function");
453
453
  }, N0 = function(l) {
454
454
  return typeof c == "function" && l instanceof c;
455
455
  };
@@ -693,16 +693,16 @@ function Nu(u, e) {
693
693
  if ((c & 240) === 224 && o + 6 < i) {
694
694
  const a = parseInt(n.slice(o + 4, o + 6), 16), s = parseInt(n.slice(o + 7, o + 9), 16);
695
695
  if ((a & 192) === 128 && (s & 192) === 128) {
696
- const d = c << 12 & 61440 | a << 6 & 4032 | s & 63;
697
- d < 2048 || d >= 55296 && d <= 57343 ? r += "���" : r += String.fromCharCode(d), o += 6;
696
+ const f = c << 12 & 61440 | a << 6 & 4032 | s & 63;
697
+ f < 2048 || f >= 55296 && f <= 57343 ? r += "���" : r += String.fromCharCode(f), o += 6;
698
698
  continue;
699
699
  }
700
700
  }
701
701
  if ((c & 248) === 240 && o + 9 < i) {
702
- const a = parseInt(n.slice(o + 4, o + 6), 16), s = parseInt(n.slice(o + 7, o + 9), 16), d = parseInt(n.slice(o + 10, o + 12), 16);
703
- if ((a & 192) === 128 && (s & 192) === 128 && (d & 192) === 128) {
704
- let f = c << 18 & 1835008 | a << 12 & 258048 | s << 6 & 4032 | d & 63;
705
- f < 65536 || f > 1114111 ? r += "����" : (f -= 65536, r += String.fromCharCode(55296 + (f >> 10), 56320 + (f & 1023))), o += 9;
702
+ const a = parseInt(n.slice(o + 4, o + 6), 16), s = parseInt(n.slice(o + 7, o + 9), 16), f = parseInt(n.slice(o + 10, o + 12), 16);
703
+ if ((a & 192) === 128 && (s & 192) === 128 && (f & 192) === 128) {
704
+ let d = c << 18 & 1835008 | a << 12 & 258048 | s << 6 & 4032 | f & 63;
705
+ d < 65536 || d > 1114111 ? r += "����" : (d -= 65536, r += String.fromCharCode(55296 + (d >> 10), 56320 + (d & 1023))), o += 9;
706
706
  continue;
707
707
  }
708
708
  }
@@ -798,8 +798,8 @@ Ce.prototype.parse = function(u, e) {
798
798
  let s = -1;
799
799
  for (let h = 0; h < it.length; h++)
800
800
  n = o.indexOf(it[h]), n !== -1 && (s === -1 || n < s) && (s = n);
801
- let d, f;
802
- s === -1 ? f = o.lastIndexOf("@") : f = o.lastIndexOf("@", s), f !== -1 && (d = o.slice(0, f), o = o.slice(f + 1), this.auth = d), s = -1;
801
+ let f, d;
802
+ s === -1 ? d = o.lastIndexOf("@") : d = o.lastIndexOf("@", s), d !== -1 && (f = o.slice(0, d), o = o.slice(d + 1), this.auth = f), s = -1;
803
803
  for (let h = 0; h < ct.length; h++)
804
804
  n = o.indexOf(ct[h]), n !== -1 && (s === -1 || n < s) && (s = n);
805
805
  s === -1 && (s = o.length), o[s - 1] === ":" && s--;
@@ -1428,18 +1428,18 @@ iu.fence = function(u, e, t, n, r) {
1428
1428
  const o = u[e], i = o.info ? Bu(o.info).trim() : "";
1429
1429
  let c = "", a = "";
1430
1430
  if (i) {
1431
- const d = i.split(/(\s+)/g);
1432
- c = d[0], a = d.slice(2).join("");
1431
+ const f = i.split(/(\s+)/g);
1432
+ c = f[0], a = f.slice(2).join("");
1433
1433
  }
1434
1434
  let s;
1435
1435
  if (t.highlight ? s = t.highlight(o.content, c, a) || xu(o.content) : s = xu(o.content), s.indexOf("<pre") === 0)
1436
1436
  return s + `
1437
1437
  `;
1438
1438
  if (i) {
1439
- const d = o.attrIndex("class"), f = o.attrs ? o.attrs.slice() : [];
1440
- d < 0 ? f.push(["class", t.langPrefix + c]) : (f[d] = f[d].slice(), f[d][1] += " " + t.langPrefix + c);
1439
+ const f = o.attrIndex("class"), d = o.attrs ? o.attrs.slice() : [];
1440
+ f < 0 ? d.push(["class", t.langPrefix + c]) : (d[f] = d[f].slice(), d[f][1] += " " + t.langPrefix + c);
1441
1441
  const _ = {
1442
- attrs: f
1442
+ attrs: d
1443
1443
  };
1444
1444
  return `<pre><code${r.renderAttrs(_)}>${s}</code></pre>
1445
1445
  `;
@@ -1701,8 +1701,8 @@ function Fo(u) {
1701
1701
  if (c.type === "html_inline" && (Do(c.content) && o > 0 && o--, yo(c.content) && o++), !(o > 0) && c.type === "text" && u.md.linkify.test(c.content)) {
1702
1702
  const a = c.content;
1703
1703
  let s = u.md.linkify.match(a);
1704
- const d = [];
1705
- let f = c.level, _ = 0;
1704
+ const f = [];
1705
+ let d = c.level, _ = 0;
1706
1706
  s.length > 0 && s[0].index === 0 && i > 0 && r[i - 1].type === "text_special" && (s = s.slice(1));
1707
1707
  for (let p = 0; p < s.length; p++) {
1708
1708
  const h = s[p].url, C = u.md.normalizeLink(h);
@@ -1713,20 +1713,20 @@ function Fo(u) {
1713
1713
  const T = s[p].index;
1714
1714
  if (T > _) {
1715
1715
  const A = new u.Token("text", "", 0);
1716
- A.content = a.slice(_, T), A.level = f, d.push(A);
1716
+ A.content = a.slice(_, T), A.level = d, f.push(A);
1717
1717
  }
1718
1718
  const E = new u.Token("link_open", "a", 1);
1719
- E.attrs = [["href", C]], E.level = f++, E.markup = "linkify", E.info = "auto", d.push(E);
1719
+ E.attrs = [["href", C]], E.level = d++, E.markup = "linkify", E.info = "auto", f.push(E);
1720
1720
  const k = new u.Token("text", "", 0);
1721
- k.content = D, k.level = f, d.push(k);
1721
+ k.content = D, k.level = d, f.push(k);
1722
1722
  const m = new u.Token("link_close", "a", -1);
1723
- m.level = --f, m.markup = "linkify", m.info = "auto", d.push(m), _ = s[p].lastIndex;
1723
+ m.level = --d, m.markup = "linkify", m.info = "auto", f.push(m), _ = s[p].lastIndex;
1724
1724
  }
1725
1725
  if (_ < a.length) {
1726
1726
  const p = new u.Token("text", "", 0);
1727
- p.content = a.slice(_), p.level = f, d.push(p);
1727
+ p.content = a.slice(_), p.level = d, f.push(p);
1728
1728
  }
1729
- e[t].children = r = Bt(r, i, d);
1729
+ e[t].children = r = Bt(r, i, f);
1730
1730
  }
1731
1731
  }
1732
1732
  }
@@ -1776,15 +1776,15 @@ function Oo(u, e) {
1776
1776
  u:
1777
1777
  for (; a < s; ) {
1778
1778
  ft.lastIndex = a;
1779
- const d = ft.exec(c);
1780
- if (!d)
1779
+ const f = ft.exec(c);
1780
+ if (!f)
1781
1781
  break;
1782
- let f = !0, _ = !0;
1783
- a = d.index + 1;
1784
- const p = d[0] === "'";
1782
+ let d = !0, _ = !0;
1783
+ a = f.index + 1;
1784
+ const p = f[0] === "'";
1785
1785
  let h = 32;
1786
- if (d.index - 1 >= 0)
1787
- h = c.charCodeAt(d.index - 1);
1786
+ if (f.index - 1 >= 0)
1787
+ h = c.charCodeAt(f.index - 1);
1788
1788
  else
1789
1789
  for (t = r - 1; t >= 0 && !(u[t].type === "softbreak" || u[t].type === "hardbreak"); t--)
1790
1790
  if (u[t].content) {
@@ -1801,8 +1801,8 @@ function Oo(u, e) {
1801
1801
  break;
1802
1802
  }
1803
1803
  const D = ue(h) || Ku(String.fromCharCode(h)), T = ue(C) || Ku(String.fromCharCode(C)), E = Qu(h), k = Qu(C);
1804
- if (k ? f = !1 : T && (E || D || (f = !1)), E ? _ = !1 : D && (k || T || (_ = !1)), C === 34 && d[0] === '"' && h >= 48 && h <= 57 && (_ = f = !1), f && _ && (f = D, _ = T), !f && !_) {
1805
- p && (o.content = me(o.content, d.index, dt));
1804
+ if (k ? d = !1 : T && (E || D || (d = !1)), E ? _ = !1 : D && (k || T || (_ = !1)), C === 34 && f[0] === '"' && h >= 48 && h <= 57 && (_ = d = !1), d && _ && (d = D, _ = T), !d && !_) {
1805
+ p && (o.content = me(o.content, f.index, dt));
1806
1806
  continue;
1807
1807
  }
1808
1808
  if (_)
@@ -1813,7 +1813,7 @@ function Oo(u, e) {
1813
1813
  if (m.single === p && n[t].level === i) {
1814
1814
  m = n[t];
1815
1815
  let A, y;
1816
- p ? (A = e.md.options.quotes[2], y = e.md.options.quotes[3]) : (A = e.md.options.quotes[0], y = e.md.options.quotes[1]), o.content = me(o.content, d.index, y), u[m.token].content = me(
1816
+ p ? (A = e.md.options.quotes[2], y = e.md.options.quotes[3]) : (A = e.md.options.quotes[0], y = e.md.options.quotes[1]), o.content = me(o.content, f.index, y), u[m.token].content = me(
1817
1817
  u[m.token].content,
1818
1818
  m.pos,
1819
1819
  A
@@ -1821,12 +1821,12 @@ function Oo(u, e) {
1821
1821
  continue u;
1822
1822
  }
1823
1823
  }
1824
- f ? n.push({
1824
+ d ? n.push({
1825
1825
  token: r,
1826
- pos: d.index,
1826
+ pos: f.index,
1827
1827
  single: p,
1828
1828
  level: i
1829
- }) : _ && p && (o.content = me(o.content, d.index, dt));
1829
+ }) : _ && p && (o.content = me(o.content, f.index, dt));
1830
1830
  }
1831
1831
  }
1832
1832
  }
@@ -1873,15 +1873,15 @@ b0.prototype.State = zt;
1873
1873
  function au(u, e, t, n) {
1874
1874
  this.src = u, this.md = e, this.env = t, this.tokens = n, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0;
1875
1875
  const r = this.src;
1876
- for (let o = 0, i = 0, c = 0, a = 0, s = r.length, d = !1; i < s; i++) {
1877
- const f = r.charCodeAt(i);
1878
- if (!d)
1879
- if (w(f)) {
1880
- c++, f === 9 ? a += 4 - a % 4 : a++;
1876
+ for (let o = 0, i = 0, c = 0, a = 0, s = r.length, f = !1; i < s; i++) {
1877
+ const d = r.charCodeAt(i);
1878
+ if (!f)
1879
+ if (w(d)) {
1880
+ c++, d === 9 ? a += 4 - a % 4 : a++;
1881
1881
  continue;
1882
1882
  } else
1883
- d = !0;
1884
- (f === 10 || i === s - 1) && (f !== 10 && i++, this.bMarks.push(o), this.eMarks.push(i), this.tShift.push(c), this.sCount.push(a), this.bsCount.push(0), d = !1, c = 0, a = 0, o = i + 1);
1883
+ f = !0;
1884
+ (d === 10 || i === s - 1) && (d !== 10 && i++, this.bMarks.push(o), this.eMarks.push(i), this.tShift.push(c), this.sCount.push(a), this.bsCount.push(0), f = !1, c = 0, a = 0, o = i + 1);
1885
1885
  }
1886
1886
  this.bMarks.push(r.length), this.eMarks.push(r.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
1887
1887
  }
@@ -1933,18 +1933,18 @@ au.prototype.getLines = function(e, t, n, r) {
1933
1933
  for (let i = 0, c = e; c < t; c++, i++) {
1934
1934
  let a = 0;
1935
1935
  const s = this.bMarks[c];
1936
- let d = s, f;
1937
- for (c + 1 < t || r ? f = this.eMarks[c] + 1 : f = this.eMarks[c]; d < f && a < n; ) {
1938
- const _ = this.src.charCodeAt(d);
1936
+ let f = s, d;
1937
+ for (c + 1 < t || r ? d = this.eMarks[c] + 1 : d = this.eMarks[c]; f < d && a < n; ) {
1938
+ const _ = this.src.charCodeAt(f);
1939
1939
  if (w(_))
1940
1940
  _ === 9 ? a += 4 - (a + this.bsCount[c]) % 4 : a++;
1941
- else if (d - s < this.tShift[c])
1941
+ else if (f - s < this.tShift[c])
1942
1942
  a++;
1943
1943
  else
1944
1944
  break;
1945
- d++;
1945
+ f++;
1946
1946
  }
1947
- a > n ? o[i] = new Array(a - n + 1).join(" ") + this.src.slice(d, f) : o[i] = this.src.slice(d, f);
1947
+ a > n ? o[i] = new Array(a - n + 1).join(" ") + this.src.slice(f, d) : o[i] = this.src.slice(f, d);
1948
1948
  }
1949
1949
  return o.join("");
1950
1950
  };
@@ -1983,7 +1983,7 @@ function zo(u, e, t, n) {
1983
1983
  o++;
1984
1984
  }
1985
1985
  let a = Ye(u, e + 1), s = a.split("|");
1986
- const d = [];
1986
+ const f = [];
1987
1987
  for (let m = 0; m < s.length; m++) {
1988
1988
  const A = s[m].trim();
1989
1989
  if (!A) {
@@ -1993,13 +1993,13 @@ function zo(u, e, t, n) {
1993
1993
  }
1994
1994
  if (!/^:?-+:?$/.test(A))
1995
1995
  return !1;
1996
- A.charCodeAt(A.length - 1) === 58 ? d.push(A.charCodeAt(0) === 58 ? "center" : "right") : A.charCodeAt(0) === 58 ? d.push("left") : d.push("");
1996
+ A.charCodeAt(A.length - 1) === 58 ? f.push(A.charCodeAt(0) === 58 ? "center" : "right") : A.charCodeAt(0) === 58 ? f.push("left") : f.push("");
1997
1997
  }
1998
1998
  if (a = Ye(u, e).trim(), a.indexOf("|") === -1 || u.sCount[e] - u.blkIndent >= 4)
1999
1999
  return !1;
2000
2000
  s = ht(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop();
2001
- const f = s.length;
2002
- if (f === 0 || f !== d.length)
2001
+ const d = s.length;
2002
+ if (d === 0 || d !== f.length)
2003
2003
  return !1;
2004
2004
  if (n)
2005
2005
  return !0;
@@ -2013,7 +2013,7 @@ function zo(u, e, t, n) {
2013
2013
  T.map = [e, e + 1];
2014
2014
  for (let m = 0; m < s.length; m++) {
2015
2015
  const A = u.push("th_open", "th", 1);
2016
- d[m] && (A.attrs = [["style", "text-align:" + d[m]]]);
2016
+ f[m] && (A.attrs = [["style", "text-align:" + f[m]]]);
2017
2017
  const y = u.push("inline", "", 0);
2018
2018
  y.content = s[m].trim(), y.children = [], u.push("th_close", "th", -1);
2019
2019
  }
@@ -2026,7 +2026,7 @@ function zo(u, e, t, n) {
2026
2026
  m = !0;
2027
2027
  break;
2028
2028
  }
2029
- if (m || (a = Ye(u, r).trim(), !a) || u.sCount[r] - u.blkIndent >= 4 || (s = ht(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop(), k += f - s.length, k > Po))
2029
+ if (m || (a = Ye(u, r).trim(), !a) || u.sCount[r] - u.blkIndent >= 4 || (s = ht(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop(), k += d - s.length, k > Po))
2030
2030
  break;
2031
2031
  if (r === e + 2) {
2032
2032
  const y = u.push("tbody_open", "tbody", 1);
@@ -2034,9 +2034,9 @@ function zo(u, e, t, n) {
2034
2034
  }
2035
2035
  const A = u.push("tr_open", "tr", 1);
2036
2036
  A.map = [r, r + 1];
2037
- for (let y = 0; y < f; y++) {
2037
+ for (let y = 0; y < d; y++) {
2038
2038
  const I = u.push("td_open", "td", 1);
2039
- d[y] && (I.attrs = [["style", "text-align:" + d[y]]]);
2039
+ f[y] && (I.attrs = [["style", "text-align:" + f[y]]]);
2040
2040
  const V = u.push("inline", "", 0);
2041
2041
  V.content = s[y] ? s[y].trim() : "", V.children = [], u.push("td_close", "td", -1);
2042
2042
  }
@@ -2076,20 +2076,20 @@ function Uo(u, e, t, n) {
2076
2076
  let a = r - c;
2077
2077
  if (a < 3)
2078
2078
  return !1;
2079
- const s = u.src.slice(c, r), d = u.src.slice(r, o);
2080
- if (i === 96 && d.indexOf(String.fromCharCode(i)) >= 0)
2079
+ const s = u.src.slice(c, r), f = u.src.slice(r, o);
2080
+ if (i === 96 && f.indexOf(String.fromCharCode(i)) >= 0)
2081
2081
  return !1;
2082
2082
  if (n)
2083
2083
  return !0;
2084
- let f = e, _ = !1;
2085
- for (; f++, !(f >= t || (r = c = u.bMarks[f] + u.tShift[f], o = u.eMarks[f], r < o && u.sCount[f] < u.blkIndent)); )
2086
- if (u.src.charCodeAt(r) === i && !(u.sCount[f] - u.blkIndent >= 4) && (r = u.skipChars(r, i), !(r - c < a) && (r = u.skipSpaces(r), !(r < o)))) {
2084
+ let d = e, _ = !1;
2085
+ for (; d++, !(d >= t || (r = c = u.bMarks[d] + u.tShift[d], o = u.eMarks[d], r < o && u.sCount[d] < u.blkIndent)); )
2086
+ if (u.src.charCodeAt(r) === i && !(u.sCount[d] - u.blkIndent >= 4) && (r = u.skipChars(r, i), !(r - c < a) && (r = u.skipSpaces(r), !(r < o)))) {
2087
2087
  _ = !0;
2088
2088
  break;
2089
2089
  }
2090
- a = u.sCount[e], u.line = f + (_ ? 1 : 0);
2090
+ a = u.sCount[e], u.line = d + (_ ? 1 : 0);
2091
2091
  const p = u.push("fence", "code", 0);
2092
- return p.info = d, p.content = u.getLines(e + 1, f, a, !0), p.markup = s, p.map = [e, u.line], !0;
2092
+ return p.info = f, p.content = u.getLines(e + 1, d, a, !0), p.markup = s, p.map = [e, u.line], !0;
2093
2093
  }
2094
2094
  function Ho(u, e, t, n) {
2095
2095
  let r = u.bMarks[e] + u.tShift[e], o = u.eMarks[e];
@@ -2098,7 +2098,7 @@ function Ho(u, e, t, n) {
2098
2098
  return !1;
2099
2099
  if (n)
2100
2100
  return !0;
2101
- const c = [], a = [], s = [], d = [], f = u.md.block.ruler.getRules("blockquote"), _ = u.parentType;
2101
+ const c = [], a = [], s = [], f = [], d = u.md.block.ruler.getRules("blockquote"), _ = u.parentType;
2102
2102
  u.parentType = "blockquote";
2103
2103
  let p = !1, h;
2104
2104
  for (h = e; h < t; h++) {
@@ -2117,22 +2117,22 @@ function Ho(u, e, t, n) {
2117
2117
  break;
2118
2118
  r++;
2119
2119
  }
2120
- p = r >= o, a.push(u.bsCount[h]), u.bsCount[h] = u.sCount[h] + 1 + (y ? 1 : 0), s.push(u.sCount[h]), u.sCount[h] = V - A, d.push(u.tShift[h]), u.tShift[h] = r - u.bMarks[h];
2120
+ p = r >= o, a.push(u.bsCount[h]), u.bsCount[h] = u.sCount[h] + 1 + (y ? 1 : 0), s.push(u.sCount[h]), u.sCount[h] = V - A, f.push(u.tShift[h]), u.tShift[h] = r - u.bMarks[h];
2121
2121
  continue;
2122
2122
  }
2123
2123
  if (p)
2124
2124
  break;
2125
2125
  let m = !1;
2126
- for (let A = 0, y = f.length; A < y; A++)
2127
- if (f[A](u, h, t, !0)) {
2126
+ for (let A = 0, y = d.length; A < y; A++)
2127
+ if (d[A](u, h, t, !0)) {
2128
2128
  m = !0;
2129
2129
  break;
2130
2130
  }
2131
2131
  if (m) {
2132
- u.lineMax = h, u.blkIndent !== 0 && (c.push(u.bMarks[h]), a.push(u.bsCount[h]), d.push(u.tShift[h]), s.push(u.sCount[h]), u.sCount[h] -= u.blkIndent);
2132
+ u.lineMax = h, u.blkIndent !== 0 && (c.push(u.bMarks[h]), a.push(u.bsCount[h]), f.push(u.tShift[h]), s.push(u.sCount[h]), u.sCount[h] -= u.blkIndent);
2133
2133
  break;
2134
2134
  }
2135
- c.push(u.bMarks[h]), a.push(u.bsCount[h]), d.push(u.tShift[h]), s.push(u.sCount[h]), u.sCount[h] = -1;
2135
+ c.push(u.bMarks[h]), a.push(u.bsCount[h]), f.push(u.tShift[h]), s.push(u.sCount[h]), u.sCount[h] = -1;
2136
2136
  }
2137
2137
  const C = u.blkIndent;
2138
2138
  u.blkIndent = 0;
@@ -2142,8 +2142,8 @@ function Ho(u, e, t, n) {
2142
2142
  D.map = T, u.md.block.tokenize(u, e, h);
2143
2143
  const E = u.push("blockquote_close", "blockquote", -1);
2144
2144
  E.markup = ">", u.lineMax = i, u.parentType = _, T[1] = u.line;
2145
- for (let k = 0; k < d.length; k++)
2146
- u.bMarks[k + e] = c[k], u.tShift[k + e] = d[k], u.sCount[k + e] = s[k], u.bsCount[k + e] = a[k];
2145
+ for (let k = 0; k < f.length; k++)
2146
+ u.bMarks[k + e] = c[k], u.tShift[k + e] = f[k], u.sCount[k + e] = s[k], u.bsCount[k + e] = a[k];
2147
2147
  return u.blkIndent = C, !0;
2148
2148
  }
2149
2149
  function $o(u, e, t, n) {
@@ -2213,21 +2213,21 @@ function Go(u, e, t, n) {
2213
2213
  let r, o, i, c, a = e, s = !0;
2214
2214
  if (u.sCount[a] - u.blkIndent >= 4 || u.listIndent >= 0 && u.sCount[a] - u.listIndent >= 4 && u.sCount[a] < u.blkIndent)
2215
2215
  return !1;
2216
- let d = !1;
2217
- n && u.parentType === "paragraph" && u.sCount[a] >= u.blkIndent && (d = !0);
2218
- let f, _, p;
2216
+ let f = !1;
2217
+ n && u.parentType === "paragraph" && u.sCount[a] >= u.blkIndent && (f = !0);
2218
+ let d, _, p;
2219
2219
  if ((p = bt(u, a)) >= 0) {
2220
- if (f = !0, i = u.bMarks[a] + u.tShift[a], _ = Number(u.src.slice(i, p - 1)), d && _ !== 1) return !1;
2220
+ if (d = !0, i = u.bMarks[a] + u.tShift[a], _ = Number(u.src.slice(i, p - 1)), f && _ !== 1) return !1;
2221
2221
  } else if ((p = pt(u, a)) >= 0)
2222
- f = !1;
2222
+ d = !1;
2223
2223
  else
2224
2224
  return !1;
2225
- if (d && u.skipSpaces(p) >= u.eMarks[a])
2225
+ if (f && u.skipSpaces(p) >= u.eMarks[a])
2226
2226
  return !1;
2227
2227
  if (n)
2228
2228
  return !0;
2229
2229
  const h = u.src.charCodeAt(p - 1), C = u.tokens.length;
2230
- f ? (c = u.push("ordered_list_open", "ol", 1), _ !== 1 && (c.attrs = [["start", _]])) : c = u.push("bullet_list_open", "ul", 1);
2230
+ d ? (c = u.push("ordered_list_open", "ol", 1), _ !== 1 && (c.attrs = [["start", _]])) : c = u.push("bullet_list_open", "ul", 1);
2231
2231
  const D = [a, 0];
2232
2232
  c.map = D, c.markup = String.fromCharCode(h);
2233
2233
  let T = !1;
@@ -2252,7 +2252,7 @@ function Go(u, e, t, n) {
2252
2252
  const V = m + I;
2253
2253
  c = u.push("list_item_open", "li", 1), c.markup = String.fromCharCode(h);
2254
2254
  const nu = [a, 0];
2255
- c.map = nu, f && (c.info = u.src.slice(i, p - 1));
2255
+ c.map = nu, d && (c.info = u.src.slice(i, p - 1));
2256
2256
  const gu = u.tight, M = u.tShift[a], zu = u.sCount[a], qu = u.listIndent;
2257
2257
  if (u.listIndent = u.blkIndent, u.blkIndent = V, u.tight = !0, u.tShift[a] = y - u.bMarks[a], u.sCount[a] = A, y >= r && u.isEmpty(a + 1) ? u.line = Math.min(u.line + 2, t) : u.md.block.tokenize(u, a, t, !0), (!u.tight || T) && (s = !1), T = u.line - a > 1 && u.isEmpty(u.line - 1), u.blkIndent = u.listIndent, u.listIndent = qu, u.tShift[a] = M, u.sCount[a] = zu, u.tight = gu, c = u.push("list_item_close", "li", -1), c.markup = String.fromCharCode(h), a = u.line, nu[1] = a, a >= t || u.sCount[a] < u.blkIndent || u.sCount[a] - u.blkIndent >= 4)
2258
2258
  break;
@@ -2264,7 +2264,7 @@ function Go(u, e, t, n) {
2264
2264
  }
2265
2265
  if (yu)
2266
2266
  break;
2267
- if (f) {
2267
+ if (d) {
2268
2268
  if (p = bt(u, a), p < 0)
2269
2269
  break;
2270
2270
  i = u.bMarks[a] + u.tShift[a];
@@ -2273,7 +2273,7 @@ function Go(u, e, t, n) {
2273
2273
  if (h !== u.src.charCodeAt(p - 1))
2274
2274
  break;
2275
2275
  }
2276
- return f ? c = u.push("ordered_list_close", "ol", -1) : c = u.push("bullet_list_close", "ul", -1), c.markup = String.fromCharCode(h), D[1] = a, u.line = a, u.parentType = k, s && jo(u, C), !0;
2276
+ return d ? c = u.push("ordered_list_close", "ol", -1) : c = u.push("bullet_list_close", "ul", -1), c.markup = String.fromCharCode(h), D[1] = a, u.line = a, u.parentType = k, s && jo(u, C), !0;
2277
2277
  }
2278
2278
  function Wo(u, e, t, n) {
2279
2279
  let r = u.bMarks[e] + u.tShift[e], o = u.eMarks[e], i = e + 1;
@@ -2326,13 +2326,13 @@ function Wo(u, e, t, n) {
2326
2326
  k !== null && (a += k, o = a.length, i++);
2327
2327
  } else if (!w(E)) break;
2328
2328
  }
2329
- const d = u.md.helpers.parseLinkDestination(a, r, o);
2330
- if (!d.ok)
2329
+ const f = u.md.helpers.parseLinkDestination(a, r, o);
2330
+ if (!f.ok)
2331
2331
  return !1;
2332
- const f = u.md.normalizeLink(d.str);
2333
- if (!u.md.validateLink(f))
2332
+ const d = u.md.normalizeLink(f.str);
2333
+ if (!u.md.validateLink(d))
2334
2334
  return !1;
2335
- r = d.pos;
2335
+ r = f.pos;
2336
2336
  const _ = r, p = i, h = r;
2337
2337
  for (; r < o; r++) {
2338
2338
  const E = a.charCodeAt(r);
@@ -2364,7 +2364,7 @@ function Wo(u, e, t, n) {
2364
2364
  if (r < o && a.charCodeAt(r) !== 10)
2365
2365
  return !1;
2366
2366
  const T = Te(a.slice(1, s));
2367
- return T ? (n || (typeof u.env.references > "u" && (u.env.references = {}), typeof u.env.references[T] > "u" && (u.env.references[T] = { title: D, href: f }), u.line = i), !0) : !1;
2367
+ return T ? (n || (typeof u.env.references > "u" && (u.env.references = {}), typeof u.env.references[T] > "u" && (u.env.references[T] = { title: D, href: d }), u.line = i), !0) : !1;
2368
2368
  }
2369
2369
  const Zo = [
2370
2370
  "address",
@@ -2480,10 +2480,10 @@ function ic(u, e, t, n) {
2480
2480
  a > r && w(u.src.charCodeAt(a - 1)) && (o = a), u.line = e + 1;
2481
2481
  const s = u.push("heading_open", "h" + String(c), 1);
2482
2482
  s.markup = "########".slice(0, c), s.map = [e, u.line];
2483
- const d = u.push("inline", "", 0);
2484
- d.content = u.src.slice(r, o).trim(), d.map = [e, u.line], d.children = [];
2485
- const f = u.push("heading_close", "h" + String(c), -1);
2486
- return f.markup = "########".slice(0, c), !0;
2483
+ const f = u.push("inline", "", 0);
2484
+ f.content = u.src.slice(r, o).trim(), f.map = [e, u.line], f.children = [];
2485
+ const d = u.push("heading_close", "h" + String(c), -1);
2486
+ return d.markup = "########".slice(0, c), !0;
2487
2487
  }
2488
2488
  function ac(u, e, t) {
2489
2489
  const n = u.md.block.ruler.getRules("paragraph");
@@ -2520,10 +2520,10 @@ function ac(u, e, t) {
2520
2520
  u.line = c + 1;
2521
2521
  const s = u.push("heading_open", "h" + String(o), 1);
2522
2522
  s.markup = String.fromCharCode(i), s.map = [e, u.line];
2523
- const d = u.push("inline", "", 0);
2524
- d.content = a, d.map = [e, u.line - 1], d.children = [];
2525
- const f = u.push("heading_close", "h" + String(o), -1);
2526
- return f.markup = String.fromCharCode(i), u.parentType = r, !0;
2523
+ const f = u.push("inline", "", 0);
2524
+ f.content = a, f.map = [e, u.line - 1], f.children = [];
2525
+ const d = u.push("heading_close", "h" + String(o), -1);
2526
+ return d.markup = String.fromCharCode(i), u.parentType = r, !0;
2527
2527
  }
2528
2528
  function sc(u, e, t) {
2529
2529
  const n = u.md.block.ruler.getRules("paragraph"), r = u.parentType;
@@ -2532,8 +2532,8 @@ function sc(u, e, t) {
2532
2532
  if (u.sCount[o] - u.blkIndent > 3 || u.sCount[o] < 0)
2533
2533
  continue;
2534
2534
  let s = !1;
2535
- for (let d = 0, f = n.length; d < f; d++)
2536
- if (n[d](u, o, t, !0)) {
2535
+ for (let f = 0, d = n.length; f < d; f++)
2536
+ if (n[f](u, o, t, !0)) {
2537
2537
  s = !0;
2538
2538
  break;
2539
2539
  }
@@ -2577,8 +2577,8 @@ Se.prototype.tokenize = function(u, e, t) {
2577
2577
  }
2578
2578
  const a = u.line;
2579
2579
  let s = !1;
2580
- for (let d = 0; d < r; d++)
2581
- if (s = n[d](u, i, t, !1), s) {
2580
+ for (let f = 0; f < r; f++)
2581
+ if (s = n[f](u, i, t, !1), s) {
2582
2582
  if (a >= u.line)
2583
2583
  throw new Error("block rule didn't increment state.line");
2584
2584
  break;
@@ -2612,7 +2612,7 @@ ce.prototype.scanDelims = function(u, e) {
2612
2612
  let o = u;
2613
2613
  for (; o < t && this.src.charCodeAt(o) === n; )
2614
2614
  o++;
2615
- const i = o - u, c = o < t ? this.src.charCodeAt(o) : 32, a = ue(r) || Ku(String.fromCharCode(r)), s = ue(c) || Ku(String.fromCharCode(c)), d = Qu(r), f = Qu(c), _ = !f && (!s || d || a), p = !d && (!a || f || s);
2615
+ const i = o - u, c = o < t ? this.src.charCodeAt(o) : 32, a = ue(r) || Ku(String.fromCharCode(r)), s = ue(c) || Ku(String.fromCharCode(c)), f = Qu(r), d = Qu(c), _ = !d && (!s || f || a), p = !f && (!a || d || s);
2616
2616
  return { can_open: _ && (e || !p || a), can_close: p && (e || !_ || s), length: i };
2617
2617
  };
2618
2618
  ce.prototype.Token = tu;
@@ -2670,10 +2670,10 @@ function hc(u, e) {
2670
2670
  u.pending = u.pending.slice(0, -o.length);
2671
2671
  const s = u.push("link_open", "a", 1);
2672
2672
  s.attrs = [["href", a]], s.markup = "linkify", s.info = "auto";
2673
- const d = u.push("text", "", 0);
2674
- d.content = u.md.normalizeLinkText(c);
2675
- const f = u.push("link_close", "a", -1);
2676
- f.markup = "linkify", f.info = "auto";
2673
+ const f = u.push("text", "", 0);
2674
+ f.content = u.md.normalizeLinkText(c);
2675
+ const d = u.push("link_close", "a", -1);
2676
+ d.markup = "linkify", d.info = "auto";
2677
2677
  }
2678
2678
  return u.pos += c.length - o.length, !0;
2679
2679
  }
@@ -2740,15 +2740,15 @@ function _c(u, e) {
2740
2740
  for (; (s = u.src.indexOf("`", a)) !== -1; ) {
2741
2741
  for (a = s + 1; a < o && u.src.charCodeAt(a) === 96; )
2742
2742
  a++;
2743
- const d = a - s;
2744
- if (d === c) {
2743
+ const f = a - s;
2744
+ if (f === c) {
2745
2745
  if (!e) {
2746
- const f = u.push("code_inline", "code", 0);
2747
- f.markup = i, f.content = u.src.slice(t, s).replace(/\n/g, " ").replace(/^ (.+) $/, "$1");
2746
+ const d = u.push("code_inline", "code", 0);
2747
+ d.markup = i, d.content = u.src.slice(t, s).replace(/\n/g, " ").replace(/^ (.+) $/, "$1");
2748
2748
  }
2749
2749
  return u.pos = a, !0;
2750
2750
  }
2751
- u.backticks[d] = s;
2751
+ u.backticks[f] = s;
2752
2752
  }
2753
2753
  return u.backticksScanned = !0, e || (u.pending += i), u.pos += c, !0;
2754
2754
  }
@@ -2861,29 +2861,29 @@ function Ec(u, e) {
2861
2861
  let t, n, r, o, i = "", c = "", a = u.pos, s = !0;
2862
2862
  if (u.src.charCodeAt(u.pos) !== 91)
2863
2863
  return !1;
2864
- const d = u.pos, f = u.posMax, _ = u.pos + 1, p = u.md.helpers.parseLinkLabel(u, u.pos, !0);
2864
+ const f = u.pos, d = u.posMax, _ = u.pos + 1, p = u.md.helpers.parseLinkLabel(u, u.pos, !0);
2865
2865
  if (p < 0)
2866
2866
  return !1;
2867
2867
  let h = p + 1;
2868
- if (h < f && u.src.charCodeAt(h) === 40) {
2869
- for (s = !1, h++; h < f && (t = u.src.charCodeAt(h), !(!w(t) && t !== 10)); h++)
2868
+ if (h < d && u.src.charCodeAt(h) === 40) {
2869
+ for (s = !1, h++; h < d && (t = u.src.charCodeAt(h), !(!w(t) && t !== 10)); h++)
2870
2870
  ;
2871
- if (h >= f)
2871
+ if (h >= d)
2872
2872
  return !1;
2873
2873
  if (a = h, r = u.md.helpers.parseLinkDestination(u.src, h, u.posMax), r.ok) {
2874
- for (i = u.md.normalizeLink(r.str), u.md.validateLink(i) ? h = r.pos : i = "", a = h; h < f && (t = u.src.charCodeAt(h), !(!w(t) && t !== 10)); h++)
2874
+ for (i = u.md.normalizeLink(r.str), u.md.validateLink(i) ? h = r.pos : i = "", a = h; h < d && (t = u.src.charCodeAt(h), !(!w(t) && t !== 10)); h++)
2875
2875
  ;
2876
- if (r = u.md.helpers.parseLinkTitle(u.src, h, u.posMax), h < f && a !== h && r.ok)
2877
- for (c = r.str, h = r.pos; h < f && (t = u.src.charCodeAt(h), !(!w(t) && t !== 10)); h++)
2876
+ if (r = u.md.helpers.parseLinkTitle(u.src, h, u.posMax), h < d && a !== h && r.ok)
2877
+ for (c = r.str, h = r.pos; h < d && (t = u.src.charCodeAt(h), !(!w(t) && t !== 10)); h++)
2878
2878
  ;
2879
2879
  }
2880
- (h >= f || u.src.charCodeAt(h) !== 41) && (s = !0), h++;
2880
+ (h >= d || u.src.charCodeAt(h) !== 41) && (s = !0), h++;
2881
2881
  }
2882
2882
  if (s) {
2883
2883
  if (typeof u.env.references > "u")
2884
2884
  return !1;
2885
- if (h < f && u.src.charCodeAt(h) === 91 ? (a = h + 1, h = u.md.helpers.parseLinkLabel(u, h), h >= 0 ? n = u.src.slice(a, h++) : h = p + 1) : h = p + 1, n || (n = u.src.slice(_, p)), o = u.env.references[Te(n)], !o)
2886
- return u.pos = d, !1;
2885
+ if (h < d && u.src.charCodeAt(h) === 91 ? (a = h + 1, h = u.md.helpers.parseLinkLabel(u, h), h >= 0 ? n = u.src.slice(a, h++) : h = p + 1) : h = p + 1, n || (n = u.src.slice(_, p)), o = u.env.references[Te(n)], !o)
2886
+ return u.pos = f, !1;
2887
2887
  i = o.href, c = o.title;
2888
2888
  }
2889
2889
  if (!e) {
@@ -2891,11 +2891,11 @@ function Ec(u, e) {
2891
2891
  const C = u.push("link_open", "a", 1), D = [["href", i]];
2892
2892
  C.attrs = D, c && D.push(["title", c]), u.linkLevel++, u.md.inline.tokenize(u), u.linkLevel--, u.push("link_close", "a", -1);
2893
2893
  }
2894
- return u.pos = h, u.posMax = f, !0;
2894
+ return u.pos = h, u.posMax = d, !0;
2895
2895
  }
2896
2896
  function Ac(u, e) {
2897
- let t, n, r, o, i, c, a, s, d = "";
2898
- const f = u.pos, _ = u.posMax;
2897
+ let t, n, r, o, i, c, a, s, f = "";
2898
+ const d = u.pos, _ = u.posMax;
2899
2899
  if (u.src.charCodeAt(u.pos) !== 33 || u.src.charCodeAt(u.pos + 1) !== 91)
2900
2900
  return !1;
2901
2901
  const p = u.pos + 2, h = u.md.helpers.parseLinkLabel(u, u.pos + 1, !1);
@@ -2906,7 +2906,7 @@ function Ac(u, e) {
2906
2906
  ;
2907
2907
  if (o >= _)
2908
2908
  return !1;
2909
- for (s = o, c = u.md.helpers.parseLinkDestination(u.src, o, u.posMax), c.ok && (d = u.md.normalizeLink(c.str), u.md.validateLink(d) ? o = c.pos : d = ""), s = o; o < _ && (t = u.src.charCodeAt(o), !(!w(t) && t !== 10)); o++)
2909
+ for (s = o, c = u.md.helpers.parseLinkDestination(u.src, o, u.posMax), c.ok && (f = u.md.normalizeLink(c.str), u.md.validateLink(f) ? o = c.pos : f = ""), s = o; o < _ && (t = u.src.charCodeAt(o), !(!w(t) && t !== 10)); o++)
2910
2910
  ;
2911
2911
  if (c = u.md.helpers.parseLinkTitle(u.src, o, u.posMax), o < _ && s !== o && c.ok)
2912
2912
  for (a = c.str, o = c.pos; o < _ && (t = u.src.charCodeAt(o), !(!w(t) && t !== 10)); o++)
@@ -2914,14 +2914,14 @@ function Ac(u, e) {
2914
2914
  else
2915
2915
  a = "";
2916
2916
  if (o >= _ || u.src.charCodeAt(o) !== 41)
2917
- return u.pos = f, !1;
2917
+ return u.pos = d, !1;
2918
2918
  o++;
2919
2919
  } else {
2920
2920
  if (typeof u.env.references > "u")
2921
2921
  return !1;
2922
2922
  if (o < _ && u.src.charCodeAt(o) === 91 ? (s = o + 1, o = u.md.helpers.parseLinkLabel(u, o), o >= 0 ? r = u.src.slice(s, o++) : o = h + 1) : o = h + 1, r || (r = u.src.slice(p, h)), i = u.env.references[Te(r)], !i)
2923
- return u.pos = f, !1;
2924
- d = i.href, a = i.title;
2923
+ return u.pos = d, !1;
2924
+ f = i.href, a = i.title;
2925
2925
  }
2926
2926
  if (!e) {
2927
2927
  n = u.src.slice(p, h);
@@ -2932,7 +2932,7 @@ function Ac(u, e) {
2932
2932
  u.env,
2933
2933
  C
2934
2934
  );
2935
- const D = u.push("image", "img", 0), T = [["src", d], ["alt", ""]];
2935
+ const D = u.push("image", "img", 0), T = [["src", f], ["alt", ""]];
2936
2936
  D.attrs = T, D.children = C, D.content = n, a && T.push(["title", a]);
2937
2937
  }
2938
2938
  return u.pos = o, u.posMax = _, !0;
@@ -3046,19 +3046,19 @@ function xt(u) {
3046
3046
  if (o.push(0), (u[n].marker !== c.marker || r !== c.token - 1) && (n = i), r = c.token, c.length = c.length || 0, !c.close) continue;
3047
3047
  e.hasOwnProperty(c.marker) || (e[c.marker] = [-1, -1, -1, -1, -1, -1]);
3048
3048
  const a = e[c.marker][(c.open ? 3 : 0) + c.length % 3];
3049
- let s = n - o[n] - 1, d = s;
3049
+ let s = n - o[n] - 1, f = s;
3050
3050
  for (; s > a; s -= o[s] + 1) {
3051
- const f = u[s];
3052
- if (f.marker === c.marker && f.open && f.end < 0) {
3051
+ const d = u[s];
3052
+ if (d.marker === c.marker && d.open && d.end < 0) {
3053
3053
  let _ = !1;
3054
- if ((f.close || c.open) && (f.length + c.length) % 3 === 0 && (f.length % 3 !== 0 || c.length % 3 !== 0) && (_ = !0), !_) {
3054
+ if ((d.close || c.open) && (d.length + c.length) % 3 === 0 && (d.length % 3 !== 0 || c.length % 3 !== 0) && (_ = !0), !_) {
3055
3055
  const p = s > 0 && !u[s - 1].open ? o[s - 1] + 1 : 0;
3056
- o[i] = i - s + p, o[s] = p, c.open = !1, f.end = i, f.close = !1, d = -1, r = -2;
3056
+ o[i] = i - s + p, o[s] = p, c.open = !1, d.end = i, d.close = !1, f = -1, r = -2;
3057
3057
  break;
3058
3058
  }
3059
3059
  }
3060
3060
  }
3061
- d !== -1 && (e[c.marker][(c.open ? 3 : 0) + (c.length || 0) % 3] = d);
3061
+ f !== -1 && (e[c.marker][(c.open ? 3 : 0) + (c.length || 0) % 3] = f);
3062
3062
  }
3063
3063
  }
3064
3064
  function Mc(u) {
@@ -3290,21 +3290,21 @@ function o0(u, e) {
3290
3290
  const t = new Wc(u, e);
3291
3291
  return u.__compiled__[t.schema].normalize(t, u), t;
3292
3292
  }
3293
- function X(u, e) {
3294
- if (!(this instanceof X))
3295
- return new X(u, e);
3293
+ function J(u, e) {
3294
+ if (!(this instanceof J))
3295
+ return new J(u, e);
3296
3296
  e || qc(u) && (e = u, u = {}), this.__opts__ = r0({}, Gt, e), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = r0({}, Uc, u), this.__compiled__ = {}, this.__tlds__ = $c, this.__tlds_replaced__ = !1, this.re = {}, ye(this);
3297
3297
  }
3298
- X.prototype.add = function(e, t) {
3298
+ J.prototype.add = function(e, t) {
3299
3299
  return this.__schemas__[e] = t, ye(this), this;
3300
3300
  };
3301
- X.prototype.set = function(e) {
3301
+ J.prototype.set = function(e) {
3302
3302
  return this.__opts__ = r0(this.__opts__, e), this;
3303
3303
  };
3304
- X.prototype.test = function(e) {
3304
+ J.prototype.test = function(e) {
3305
3305
  if (this.__text_cache__ = e, this.__index__ = -1, !e.length)
3306
3306
  return !1;
3307
- let t, n, r, o, i, c, a, s, d;
3307
+ let t, n, r, o, i, c, a, s, f;
3308
3308
  if (this.re.schema_test.test(e)) {
3309
3309
  for (a = this.re.schema_search, a.lastIndex = 0; (t = a.exec(e)) !== null; )
3310
3310
  if (o = this.testSchemaAt(e, t[2], a.lastIndex), o) {
@@ -3312,15 +3312,15 @@ X.prototype.test = function(e) {
3312
3312
  break;
3313
3313
  }
3314
3314
  }
3315
- return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (s = e.search(this.re.host_fuzzy_test), s >= 0 && (this.__index__ < 0 || s < this.__index__) && (n = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (i = n.index + n[1].length, (this.__index__ < 0 || i < this.__index__) && (this.__schema__ = "", this.__index__ = i, this.__last_index__ = n.index + n[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (d = e.indexOf("@"), d >= 0 && (r = e.match(this.re.email_fuzzy)) !== null && (i = r.index + r[1].length, c = r.index + r[0].length, (this.__index__ < 0 || i < this.__index__ || i === this.__index__ && c > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = i, this.__last_index__ = c))), this.__index__ >= 0;
3315
+ return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (s = e.search(this.re.host_fuzzy_test), s >= 0 && (this.__index__ < 0 || s < this.__index__) && (n = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (i = n.index + n[1].length, (this.__index__ < 0 || i < this.__index__) && (this.__schema__ = "", this.__index__ = i, this.__last_index__ = n.index + n[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (f = e.indexOf("@"), f >= 0 && (r = e.match(this.re.email_fuzzy)) !== null && (i = r.index + r[1].length, c = r.index + r[0].length, (this.__index__ < 0 || i < this.__index__ || i === this.__index__ && c > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = i, this.__last_index__ = c))), this.__index__ >= 0;
3316
3316
  };
3317
- X.prototype.pretest = function(e) {
3317
+ J.prototype.pretest = function(e) {
3318
3318
  return this.re.pretest.test(e);
3319
3319
  };
3320
- X.prototype.testSchemaAt = function(e, t, n) {
3320
+ J.prototype.testSchemaAt = function(e, t, n) {
3321
3321
  return this.__compiled__[t.toLowerCase()] ? this.__compiled__[t.toLowerCase()].validate(e, n, this) : 0;
3322
3322
  };
3323
- X.prototype.match = function(e) {
3323
+ J.prototype.match = function(e) {
3324
3324
  const t = [];
3325
3325
  let n = 0;
3326
3326
  this.__index__ >= 0 && this.__text_cache__ === e && (t.push(o0(this, n)), n = this.__last_index__);
@@ -3329,22 +3329,22 @@ X.prototype.match = function(e) {
3329
3329
  t.push(o0(this, n)), r = r.slice(this.__last_index__), n += this.__last_index__;
3330
3330
  return t.length ? t : null;
3331
3331
  };
3332
- X.prototype.matchAtStart = function(e) {
3332
+ J.prototype.matchAtStart = function(e) {
3333
3333
  if (this.__text_cache__ = e, this.__index__ = -1, !e.length) return null;
3334
3334
  const t = this.re.schema_at_start.exec(e);
3335
3335
  if (!t) return null;
3336
3336
  const n = this.testSchemaAt(e, t[2], t[0].length);
3337
3337
  return n ? (this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + n, o0(this, 0)) : null;
3338
3338
  };
3339
- X.prototype.tlds = function(e, t) {
3339
+ J.prototype.tlds = function(e, t) {
3340
3340
  return e = Array.isArray(e) ? e : [e], t ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function(n, r, o) {
3341
3341
  return n !== o[r - 1];
3342
3342
  }).reverse(), ye(this), this) : (this.__tlds__ = e.slice(), this.__tlds_replaced__ = !0, ye(this), this);
3343
3343
  };
3344
- X.prototype.normalize = function(e) {
3344
+ J.prototype.normalize = function(e) {
3345
3345
  e.schema || (e.url = "http://" + e.url), e.schema === "mailto:" && !/^mailto:/i.test(e.url) && (e.url = "mailto:" + e.url);
3346
3346
  };
3347
- X.prototype.onCompile = function() {
3347
+ J.prototype.onCompile = function() {
3348
3348
  };
3349
3349
  const Ou = 2147483647, ou = 36, m0 = 1, ee = 26, Zc = 38, Vc = 700, Wt = 72, Zt = 128, Vt = "-", Yc = /^xn--/, Xc = /[^\0-\x7F]/, Jc = /[\x2E\u3002\uFF0E\uFF61]/g, Qc = {
3350
3350
  overflow: "Overflow: input needs wider integers to process",
@@ -3399,15 +3399,15 @@ const ui = (u) => String.fromCodePoint(...u), ei = function(u) {
3399
3399
  u.charCodeAt(c) >= 128 && pu("not-basic"), e.push(u.charCodeAt(c));
3400
3400
  for (let c = i > 0 ? i + 1 : 0; c < t; ) {
3401
3401
  const a = n;
3402
- for (let d = 1, f = ou; ; f += ou) {
3402
+ for (let f = 1, d = ou; ; d += ou) {
3403
3403
  c >= t && pu("invalid-input");
3404
3404
  const _ = ei(u.charCodeAt(c++));
3405
- _ >= ou && pu("invalid-input"), _ > cu((Ou - n) / d) && pu("overflow"), n += _ * d;
3406
- const p = f <= o ? m0 : f >= o + ee ? ee : f - o;
3405
+ _ >= ou && pu("invalid-input"), _ > cu((Ou - n) / f) && pu("overflow"), n += _ * f;
3406
+ const p = d <= o ? m0 : d >= o + ee ? ee : d - o;
3407
3407
  if (_ < p)
3408
3408
  break;
3409
3409
  const h = ou - p;
3410
- d > cu(Ou / h) && pu("overflow"), d *= h;
3410
+ f > cu(Ou / h) && pu("overflow"), f *= h;
3411
3411
  }
3412
3412
  const s = e.length + 1;
3413
3413
  o = Jt(n - a, s, a == 0), cu(n / s) > Ou - r && pu("overflow"), r += cu(n / s), n %= s, e.splice(n++, 0, r);
@@ -3424,23 +3424,23 @@ const ui = (u) => String.fromCodePoint(...u), ei = function(u) {
3424
3424
  let c = i;
3425
3425
  for (i && e.push(Vt); c < t; ) {
3426
3426
  let a = Ou;
3427
- for (const d of u)
3428
- d >= n && d < a && (a = d);
3427
+ for (const f of u)
3428
+ f >= n && f < a && (a = f);
3429
3429
  const s = c + 1;
3430
3430
  a - n > cu((Ou - r) / s) && pu("overflow"), r += (a - n) * s, n = a;
3431
- for (const d of u)
3432
- if (d < n && ++r > Ou && pu("overflow"), d === n) {
3433
- let f = r;
3431
+ for (const f of u)
3432
+ if (f < n && ++r > Ou && pu("overflow"), f === n) {
3433
+ let d = r;
3434
3434
  for (let _ = ou; ; _ += ou) {
3435
3435
  const p = _ <= o ? m0 : _ >= o + ee ? ee : _ - o;
3436
- if (f < p)
3436
+ if (d < p)
3437
3437
  break;
3438
- const h = f - p, C = ou - p;
3438
+ const h = d - p, C = ou - p;
3439
3439
  e.push(
3440
3440
  Ke(Et(p + h % C, 0))
3441
- ), f = cu(h / C);
3441
+ ), d = cu(h / C);
3442
3442
  }
3443
- e.push(Ke(Et(f, 0))), o = Jt(r, s, c === i), r = 0, ++c;
3443
+ e.push(Ke(Et(d, 0))), o = Jt(r, s, c === i), r = 0, ++c;
3444
3444
  }
3445
3445
  ++r, ++n;
3446
3446
  }
@@ -3671,7 +3671,7 @@ function di(u) {
3671
3671
  function K(u, e) {
3672
3672
  if (!(this instanceof K))
3673
3673
  return new K(u, e);
3674
- e || h0(u) || (e = u || {}, u = "default"), this.inline = new ie(), this.block = new Se(), this.core = new b0(), this.renderer = new Pu(), this.linkify = new X(), this.validateLink = li, this.normalizeLink = fi, this.normalizeLinkText = di, this.utils = po, this.helpers = Fe({}, xo), this.options = {}, this.configure(u), e && this.set(e);
3674
+ e || h0(u) || (e = u || {}, u = "default"), this.inline = new ie(), this.block = new Se(), this.core = new b0(), this.renderer = new Pu(), this.linkify = new J(), this.validateLink = li, this.normalizeLink = fi, this.normalizeLinkText = di, this.utils = po, this.helpers = Fe({}, xo), this.options = {}, this.configure(u), e && this.set(e);
3675
3675
  }
3676
3676
  K.prototype.set = function(u) {
3677
3677
  return Fe(this.options, u), this;
@@ -3789,18 +3789,18 @@ const hi = {
3789
3789
  maxWidth: {}
3790
3790
  },
3791
3791
  setup(u) {
3792
- const e = u, t = gn(), n = J(() => {
3793
- const f = e.contentRenderer;
3794
- return f ? typeof f == "function" ? { isComponent: !1, vNodeOrComponent: f(e) } : f instanceof a0 ? { isComponent: !1, vNodeOrComponent: f.render(e) } : { isComponent: !0, vNodeOrComponent: f } : null;
3795
- }), r = kn(), o = J(() => {
3792
+ const e = u, t = gn(), n = X(() => {
3793
+ const d = e.contentRenderer;
3794
+ return d ? typeof d == "function" ? { isComponent: !1, vNodeOrComponent: d(e) } : d instanceof a0 ? { isComponent: !1, vNodeOrComponent: d.render(e) } : { isComponent: !0, vNodeOrComponent: d } : null;
3795
+ }), r = kn(), o = X(() => {
3796
3796
  if (!e.customContentField)
3797
3797
  return null;
3798
- const f = r[e.customContentField];
3799
- return typeof f == "string" || Array.isArray(f) && f.length > 0 ? f : null;
3800
- }), i = J(() => o.value || e.content), c = J(() => Array.isArray(i.value) ? "" : i.value), a = J(() => Array.isArray(i.value) ? i.value : []), s = J(() => e.placement === "start"), d = J(() => e.maxWidth ? {
3798
+ const d = r[e.customContentField];
3799
+ return typeof d == "string" || Array.isArray(d) && d.length > 0 ? d : null;
3800
+ }), i = X(() => o.value || e.content), c = X(() => Array.isArray(i.value) ? "" : i.value), a = X(() => Array.isArray(i.value) ? i.value : []), s = X(() => e.placement === "start"), f = X(() => e.maxWidth ? {
3801
3801
  "--max-width": yn(e.maxWidth)
3802
3802
  } : {});
3803
- return (f, _) => (S(), $("div", {
3803
+ return (d, _) => (S(), $("div", {
3804
3804
  class: Eu([
3805
3805
  "tr-bubble",
3806
3806
  {
@@ -3808,12 +3808,12 @@ const hi = {
3808
3808
  "placement-end": !s.value
3809
3809
  }
3810
3810
  ]),
3811
- style: En(d.value)
3811
+ style: En(f.value)
3812
3812
  }, [
3813
3813
  e.avatar ? (S(), $("div", hi, [
3814
3814
  (S(), eu(mu(e.avatar)))
3815
3815
  ])) : Xu("", !0),
3816
- e.loading ? ge(f.$slots, "loading", {
3816
+ e.loading ? ge(d.$slots, "loading", {
3817
3817
  key: 1,
3818
3818
  bubbleProps: e
3819
3819
  }, () => [
@@ -3835,7 +3835,7 @@ const hi = {
3835
3835
  key: h,
3836
3836
  item: p
3837
3837
  }, null, 8, ["item"]))), 128))
3838
- ])) : ge(f.$slots, "default", {
3838
+ ])) : ge(d.$slots, "default", {
3839
3839
  key: 1,
3840
3840
  bubbleProps: e
3841
3841
  }, () => [
@@ -3845,7 +3845,7 @@ const hi = {
3845
3845
  ], !0),
3846
3846
  e.aborted ? (S(), $("span", _i, Au(e.abortedText), 1)) : Xu("", !0),
3847
3847
  t.footer ? (S(), $("div", mi, [
3848
- ge(f.$slots, "footer", { bubbleProps: e }, void 0, !0)
3848
+ ge(d.$slots, "footer", { bubbleProps: e }, void 0, !0)
3849
3849
  ])) : Xu("", !0)
3850
3850
  ], 2))
3851
3851
  ], 6));
@@ -3863,61 +3863,79 @@ const hi = {
3863
3863
  const e = u, t = c0(null), { y: n } = Rn(t, {
3864
3864
  behavior: "smooth",
3865
3865
  throttle: 100
3866
- }), r = J(() => e.items.at(-1));
3866
+ }), r = X(() => e.items.at(-1)), o = X(() => {
3867
+ var f, d;
3868
+ if (!r.value)
3869
+ return 0;
3870
+ const a = r.value.customContentField || ((d = (f = e.roles) == null ? void 0 : f[r.value.role || ""]) == null ? void 0 : d.customContentField);
3871
+ if (!a)
3872
+ return 0;
3873
+ const s = r.value;
3874
+ if (Array.isArray(s[a])) {
3875
+ const _ = s[a].at(-1);
3876
+ if (_ && typeof _ == "object" && "content" in _)
3877
+ try {
3878
+ return JSON.stringify(_.content).length;
3879
+ } catch {
3880
+ }
3881
+ return s[a].length;
3882
+ }
3883
+ return 0;
3884
+ });
3867
3885
  An(
3868
3886
  [() => e.items.length, () => {
3869
- var c;
3870
- return (c = r.value) == null ? void 0 : c.content;
3871
- }],
3887
+ var a;
3888
+ return (a = r.value) == null ? void 0 : a.content;
3889
+ }, () => o.value],
3872
3890
  () => {
3873
3891
  !e.autoScroll || !t.value || (n.value = t.value.scrollHeight);
3874
3892
  },
3875
3893
  { deep: !0 }
3876
3894
  );
3877
- const o = J(() => e.items.map((c) => {
3878
- var h;
3879
- const a = c.role ? ((h = e.roles) == null ? void 0 : h[c.role]) || {} : {};
3880
- if (a.hidden)
3895
+ const i = X(() => e.items.map((a) => {
3896
+ var C;
3897
+ const s = a.role ? ((C = e.roles) == null ? void 0 : C[a.role]) || {} : {};
3898
+ if (s.hidden)
3881
3899
  return null;
3882
- const { slots: s, hidden: d, ...f } = a, { slots: _, ...p } = c;
3900
+ const { slots: f, hidden: d, ..._ } = s, { slots: p, ...h } = a;
3883
3901
  return {
3884
- id: c.id,
3885
- props: { ...f, ...p, "data-role": c.role },
3886
- slots: { ...s, ..._ }
3902
+ id: a.id,
3903
+ props: { ..._, ...h, "data-role": a.role },
3904
+ slots: { ...f, ...p }
3887
3905
  };
3888
- }).filter((c) => !!c)), i = J(() => {
3889
- var s;
3890
- if (!(e.loading && e.loadingRole && ((s = e.roles) != null && s[e.loadingRole])))
3906
+ }).filter((a) => !!a)), c = X(() => {
3907
+ var f;
3908
+ if (!(e.loading && e.loadingRole && ((f = e.roles) != null && f[e.loadingRole])))
3891
3909
  return null;
3892
- const { slots: c, ...a } = e.roles[e.loadingRole];
3893
- return { props: { ...a, loading: !0 }, slots: c };
3910
+ const { slots: a, ...s } = e.roles[e.loadingRole];
3911
+ return { props: { ...s, loading: !0 }, slots: a };
3894
3912
  });
3895
- return (c, a) => (S(), $("div", {
3913
+ return (a, s) => (S(), $("div", {
3896
3914
  class: "tr-bubble-list",
3897
3915
  ref_key: "scrollContainerRef",
3898
3916
  ref: t
3899
3917
  }, [
3900
- (S(!0), $(u0, null, ke(o.value, (s, d) => (S(), eu(Cu, Ju({
3901
- key: s.id || d
3902
- }, { ref_for: !0 }, s.props), G0({ _: 2 }, [
3903
- ke(s.slots, (f, _) => ({
3904
- name: _,
3905
- fn: W0((p) => [
3906
- (S(), eu(mu(f), Ju({ ref_for: !0 }, p), null, 16))
3918
+ (S(!0), $(u0, null, ke(i.value, (f, d) => (S(), eu(Cu, Ju({
3919
+ key: f.id || d
3920
+ }, { ref_for: !0 }, f.props), G0({ _: 2 }, [
3921
+ ke(f.slots, (_, p) => ({
3922
+ name: p,
3923
+ fn: W0((h) => [
3924
+ (S(), eu(mu(_), Ju({ ref_for: !0 }, h), null, 16))
3907
3925
  ])
3908
3926
  }))
3909
3927
  ]), 1040))), 128)),
3910
- i.value ? (S(), eu(Cu, Ae(Ju({ key: 0 }, i.value.props)), G0({ _: 2 }, [
3911
- ke(i.value.slots, (s, d) => ({
3928
+ c.value ? (S(), eu(Cu, Ae(Ju({ key: 0 }, c.value.props)), G0({ _: 2 }, [
3929
+ ke(c.value.slots, (f, d) => ({
3912
3930
  name: d,
3913
- fn: W0((f) => [
3914
- (S(), eu(mu(s), Ae(Cn(f)), null, 16))
3931
+ fn: W0((_) => [
3932
+ (S(), eu(mu(f), Ae(Cn(_)), null, 16))
3915
3933
  ])
3916
3934
  }))
3917
3935
  ]), 1040)) : Xu("", !0)
3918
3936
  ], 512));
3919
3937
  }
3920
- }), te = /* @__PURE__ */ re(gi, [["__scopeId", "data-v-4f1ab0c2"]]), ne = /* @__PURE__ */ Du({
3938
+ }), te = /* @__PURE__ */ re(gi, [["__scopeId", "data-v-44d81d62"]]), ne = /* @__PURE__ */ Du({
3921
3939
  __name: "BubbleProvider",
3922
3940
  props: {
3923
3941
  contentRenderers: { default: () => ({}) }