@blueking/ai-blueking 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/ai-blueking.vue.d.ts +2 -0
- package/dist/components/render-content.vue.d.ts +2 -0
- package/dist/vue2/index.es.min.js +180 -162
- package/dist/vue2/index.iife.min.js +24 -24
- package/dist/vue2/index.umd.min.js +3 -3
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +351 -336
- package/dist/vue3/index.iife.min.js +3 -3
- package/dist/vue3/index.umd.min.js +12 -12
- package/dist/vue3/style.css +1 -1
- package/package.json +1 -1
|
@@ -167,14 +167,14 @@ function Zo() {
|
|
|
167
167
|
const o = e, r = o.currentScript, {
|
|
168
168
|
DocumentFragment: s,
|
|
169
169
|
HTMLTemplateElement: c,
|
|
170
|
-
Node:
|
|
171
|
-
Element:
|
|
170
|
+
Node: a,
|
|
171
|
+
Element: i,
|
|
172
172
|
NodeFilter: l,
|
|
173
173
|
NamedNodeMap: u = n.NamedNodeMap || n.MozNamedAttrMap,
|
|
174
174
|
HTMLFormElement: f,
|
|
175
175
|
DOMParser: h,
|
|
176
176
|
trustedTypes: d
|
|
177
|
-
} = n, x =
|
|
177
|
+
} = n, x = i.prototype, k = oe(x, "cloneNode"), D = oe(x, "nextSibling"), y = oe(x, "childNodes"), _ = oe(x, "parentNode");
|
|
178
178
|
if (typeof c == "function") {
|
|
179
179
|
const T = e.createElement("template");
|
|
180
180
|
T.content && T.content.ownerDocument && (e = T.content.ownerDocument);
|
|
@@ -343,7 +343,7 @@ function Zo() {
|
|
|
343
343
|
}, On = function(p) {
|
|
344
344
|
return p instanceof f && (typeof p.nodeName != "string" || typeof p.textContent != "string" || typeof p.removeChild != "function" || !(p.attributes instanceof u) || typeof p.removeAttribute != "function" || typeof p.setAttribute != "function" || typeof p.namespaceURI != "string" || typeof p.insertBefore != "function" || typeof p.hasChildNodes != "function");
|
|
345
345
|
}, Bn = function(p) {
|
|
346
|
-
return typeof
|
|
346
|
+
return typeof a == "function" && p instanceof a;
|
|
347
347
|
}, dt = function(p, m, w) {
|
|
348
348
|
L[p] && ne(L[p], (N) => {
|
|
349
349
|
N.call(t, m, w, Lt);
|
|
@@ -373,7 +373,7 @@ function Zo() {
|
|
|
373
373
|
}
|
|
374
374
|
return it(p), !0;
|
|
375
375
|
}
|
|
376
|
-
return p instanceof
|
|
376
|
+
return p instanceof i && !kr(p) || (w === "noscript" || w === "noembed" || w === "noframes") && Q(/<\/no(script|embed|frames)/i, p.innerHTML) ? (it(p), !0) : (Ct && p.nodeType === Gt.text && (m = p.textContent, ne([Y, E, P], (N) => {
|
|
377
377
|
m = Vt(m, N, " ");
|
|
378
378
|
}), p.textContent !== m && (Ut(t.removed, {
|
|
379
379
|
element: p.cloneNode()
|
|
@@ -485,7 +485,7 @@ function Zo() {
|
|
|
485
485
|
if (!V[at] || Nt[at])
|
|
486
486
|
throw Ht("root node is forbidden and cannot be sanitized in-place");
|
|
487
487
|
}
|
|
488
|
-
} else if (T instanceof
|
|
488
|
+
} else if (T instanceof a)
|
|
489
489
|
m = Nn("<!---->"), w = m.ownerDocument.importNode(T, !0), w.nodeType === Gt.element && w.nodeName === "BODY" || w.nodeName === "HTML" ? m = w : m.appendChild(w);
|
|
490
490
|
else {
|
|
491
491
|
if (!Et && !Ct && !_t && // eslint-disable-next-line unicorn/prefer-includes
|
|
@@ -2699,27 +2699,27 @@ function wP(n) {
|
|
|
2699
2699
|
return o;
|
|
2700
2700
|
}
|
|
2701
2701
|
function be(n, t, e) {
|
|
2702
|
-
var o, r, s, c,
|
|
2703
|
-
for (typeof t != "string" && (e = t, t = be.defaultChars), typeof e > "u" && (e = !0),
|
|
2702
|
+
var o, r, s, c, a, i = "";
|
|
2703
|
+
for (typeof t != "string" && (e = t, t = be.defaultChars), typeof e > "u" && (e = !0), a = wP(t), o = 0, r = n.length; o < r; o++) {
|
|
2704
2704
|
if (s = n.charCodeAt(o), e && s === 37 && o + 2 < r && /^[0-9a-f]{2}$/i.test(n.slice(o + 1, o + 3))) {
|
|
2705
|
-
|
|
2705
|
+
i += n.slice(o, o + 3), o += 2;
|
|
2706
2706
|
continue;
|
|
2707
2707
|
}
|
|
2708
2708
|
if (s < 128) {
|
|
2709
|
-
|
|
2709
|
+
i += a[s];
|
|
2710
2710
|
continue;
|
|
2711
2711
|
}
|
|
2712
2712
|
if (s >= 55296 && s <= 57343) {
|
|
2713
2713
|
if (s >= 55296 && s <= 56319 && o + 1 < r && (c = n.charCodeAt(o + 1), c >= 56320 && c <= 57343)) {
|
|
2714
|
-
|
|
2714
|
+
i += encodeURIComponent(n[o] + n[o + 1]), o++;
|
|
2715
2715
|
continue;
|
|
2716
2716
|
}
|
|
2717
|
-
|
|
2717
|
+
i += "%EF%BF%BD";
|
|
2718
2718
|
continue;
|
|
2719
2719
|
}
|
|
2720
|
-
|
|
2720
|
+
i += encodeURIComponent(n[o]);
|
|
2721
2721
|
}
|
|
2722
|
-
return
|
|
2722
|
+
return i;
|
|
2723
2723
|
}
|
|
2724
2724
|
be.defaultChars = ";/?:@&=+$,-_.!~*'()#";
|
|
2725
2725
|
be.componentChars = "-_.!~*'()";
|
|
@@ -2737,22 +2737,22 @@ function EP(n) {
|
|
|
2737
2737
|
function _e(n, t) {
|
|
2738
2738
|
var e;
|
|
2739
2739
|
return typeof t != "string" && (t = _e.defaultChars), e = EP(t), n.replace(/(%[a-f0-9]{2})+/gi, function(o) {
|
|
2740
|
-
var r, s, c,
|
|
2740
|
+
var r, s, c, a, i, l, u, f = "";
|
|
2741
2741
|
for (r = 0, s = o.length; r < s; r += 3) {
|
|
2742
2742
|
if (c = parseInt(o.slice(r + 1, r + 3), 16), c < 128) {
|
|
2743
2743
|
f += e[c];
|
|
2744
2744
|
continue;
|
|
2745
2745
|
}
|
|
2746
|
-
if ((c & 224) === 192 && r + 3 < s && (
|
|
2747
|
-
u = c << 6 & 1984 |
|
|
2746
|
+
if ((c & 224) === 192 && r + 3 < s && (a = parseInt(o.slice(r + 4, r + 6), 16), (a & 192) === 128)) {
|
|
2747
|
+
u = c << 6 & 1984 | a & 63, u < 128 ? f += "��" : f += String.fromCharCode(u), r += 3;
|
|
2748
2748
|
continue;
|
|
2749
2749
|
}
|
|
2750
|
-
if ((c & 240) === 224 && r + 6 < s && (
|
|
2751
|
-
u = c << 12 & 61440 |
|
|
2750
|
+
if ((c & 240) === 224 && r + 6 < s && (a = parseInt(o.slice(r + 4, r + 6), 16), i = parseInt(o.slice(r + 7, r + 9), 16), (a & 192) === 128 && (i & 192) === 128)) {
|
|
2751
|
+
u = c << 12 & 61440 | a << 6 & 4032 | i & 63, u < 2048 || u >= 55296 && u <= 57343 ? f += "���" : f += String.fromCharCode(u), r += 6;
|
|
2752
2752
|
continue;
|
|
2753
2753
|
}
|
|
2754
|
-
if ((c & 248) === 240 && r + 9 < s && (
|
|
2755
|
-
u = c << 18 & 1835008 |
|
|
2754
|
+
if ((c & 248) === 240 && r + 9 < s && (a = parseInt(o.slice(r + 4, r + 6), 16), i = parseInt(o.slice(r + 7, r + 9), 16), l = parseInt(o.slice(r + 10, r + 12), 16), (a & 192) === 128 && (i & 192) === 128 && (l & 192) === 128)) {
|
|
2755
|
+
u = c << 18 & 1835008 | a << 12 & 258048 | i << 6 & 4032 | l & 63, u < 65536 || u > 1114111 ? f += "����" : (u -= 65536, f += String.fromCharCode(55296 + (u >> 10), 56320 + (u & 1023))), r += 9;
|
|
2756
2756
|
continue;
|
|
2757
2757
|
}
|
|
2758
2758
|
f += "�";
|
|
@@ -2792,23 +2792,23 @@ function NP(n, t) {
|
|
|
2792
2792
|
return e.parse(n, t), e;
|
|
2793
2793
|
}
|
|
2794
2794
|
de.prototype.parse = function(n, t) {
|
|
2795
|
-
var e, o, r, s, c,
|
|
2796
|
-
if (
|
|
2797
|
-
var
|
|
2798
|
-
if (
|
|
2799
|
-
return this.pathname =
|
|
2795
|
+
var e, o, r, s, c, a = n;
|
|
2796
|
+
if (a = a.trim(), !t && n.split("#").length === 1) {
|
|
2797
|
+
var i = qP.exec(a);
|
|
2798
|
+
if (i)
|
|
2799
|
+
return this.pathname = i[1], i[2] && (this.search = i[2]), this;
|
|
2800
2800
|
}
|
|
2801
|
-
var l = SP.exec(
|
|
2802
|
-
if (l && (l = l[0], r = l.toLowerCase(), this.protocol = l,
|
|
2801
|
+
var l = SP.exec(a);
|
|
2802
|
+
if (l && (l = l[0], r = l.toLowerCase(), this.protocol = l, a = a.substr(l.length)), (t || l || a.match(/^\/\/[^@\/]+@[^@\/]+/)) && (c = a.substr(0, 2) === "//", c && !(l && io[l]) && (a = a.substr(2), this.slashes = !0)), !io[l] && (c || l && !ao[l])) {
|
|
2803
2803
|
var u = -1;
|
|
2804
2804
|
for (e = 0; e < so.length; e++)
|
|
2805
|
-
s =
|
|
2805
|
+
s = a.indexOf(so[e]), s !== -1 && (u === -1 || s < u) && (u = s);
|
|
2806
2806
|
var f, h;
|
|
2807
|
-
for (u === -1 ? h =
|
|
2808
|
-
s =
|
|
2809
|
-
u === -1 && (u =
|
|
2810
|
-
var d =
|
|
2811
|
-
|
|
2807
|
+
for (u === -1 ? h = a.lastIndexOf("@") : h = a.lastIndexOf("@", u), h !== -1 && (f = a.slice(0, h), a = a.slice(h + 1), this.auth = f), u = -1, e = 0; e < ro.length; e++)
|
|
2808
|
+
s = a.indexOf(ro[e]), s !== -1 && (u === -1 || s < u) && (u = s);
|
|
2809
|
+
u === -1 && (u = a.length), a[u - 1] === ":" && u--;
|
|
2810
|
+
var d = a.slice(0, u);
|
|
2811
|
+
a = a.slice(u), this.parseHost(d), this.hostname = this.hostname || "";
|
|
2812
2812
|
var x = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
2813
2813
|
if (!x) {
|
|
2814
2814
|
var k = this.hostname.split(/\./);
|
|
@@ -2819,7 +2819,7 @@ de.prototype.parse = function(n, t) {
|
|
|
2819
2819
|
D.charCodeAt(_) > 127 ? y += "x" : y += D[_];
|
|
2820
2820
|
if (!y.match(co)) {
|
|
2821
2821
|
var C = k.slice(0, e), S = k.slice(e + 1), v = D.match(PP);
|
|
2822
|
-
v && (C.push(v[1]), S.unshift(v[2])), S.length && (
|
|
2822
|
+
v && (C.push(v[1]), S.unshift(v[2])), S.length && (a = S.join(".") + a), this.hostname = C.join(".");
|
|
2823
2823
|
break;
|
|
2824
2824
|
}
|
|
2825
2825
|
}
|
|
@@ -2827,10 +2827,10 @@ de.prototype.parse = function(n, t) {
|
|
|
2827
2827
|
}
|
|
2828
2828
|
this.hostname.length > IP && (this.hostname = ""), x && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
|
|
2829
2829
|
}
|
|
2830
|
-
var F =
|
|
2831
|
-
F !== -1 && (this.hash =
|
|
2832
|
-
var z =
|
|
2833
|
-
return z !== -1 && (this.search =
|
|
2830
|
+
var F = a.indexOf("#");
|
|
2831
|
+
F !== -1 && (this.hash = a.substr(F), a = a.slice(0, F));
|
|
2832
|
+
var z = a.indexOf("?");
|
|
2833
|
+
return z !== -1 && (this.search = a.substr(z), a = a.slice(0, z)), a && (this.pathname = a), ao[r] && this.hostname && !this.pathname && (this.pathname = ""), this;
|
|
2834
2834
|
};
|
|
2835
2835
|
de.prototype.parseHost = function(n) {
|
|
2836
2836
|
var t = LP.exec(n);
|
|
@@ -2887,10 +2887,10 @@ function BP() {
|
|
|
2887
2887
|
function c(b, q, A) {
|
|
2888
2888
|
return [].concat(b.slice(0, q), A, b.slice(q + 1));
|
|
2889
2889
|
}
|
|
2890
|
-
function
|
|
2890
|
+
function a(b) {
|
|
2891
2891
|
return !(b >= 55296 && b <= 57343 || b >= 64976 && b <= 65007 || (b & 65535) === 65535 || (b & 65535) === 65534 || b >= 0 && b <= 8 || b === 11 || b >= 14 && b <= 31 || b >= 127 && b <= 159 || b > 1114111);
|
|
2892
2892
|
}
|
|
2893
|
-
function
|
|
2893
|
+
function i(b) {
|
|
2894
2894
|
if (b > 65535) {
|
|
2895
2895
|
b -= 65536;
|
|
2896
2896
|
var q = 55296 + (b >> 10), A = 56320 + (b & 1023);
|
|
@@ -2901,7 +2901,7 @@ function BP() {
|
|
|
2901
2901
|
var l = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g, u = /&([a-z#][a-z0-9]{1,31});/gi, f = new RegExp(l.source + "|" + u.source, "gi"), h = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i, d = Yo;
|
|
2902
2902
|
function x(b, q) {
|
|
2903
2903
|
var A;
|
|
2904
|
-
return r(d, q) ? d[q] : q.charCodeAt(0) === 35 && h.test(q) && (A = q[1].toLowerCase() === "x" ? parseInt(q.slice(2), 16) : parseInt(q.slice(1), 10),
|
|
2904
|
+
return r(d, q) ? d[q] : q.charCodeAt(0) === 35 && h.test(q) && (A = q[1].toLowerCase() === "x" ? parseInt(q.slice(2), 16) : parseInt(q.slice(1), 10), a(A)) ? i(A) : b;
|
|
2905
2905
|
}
|
|
2906
2906
|
function k(b) {
|
|
2907
2907
|
return b.indexOf("\\") < 0 ? b : b.replace(l, "$1");
|
|
@@ -3000,25 +3000,25 @@ function BP() {
|
|
|
3000
3000
|
function P(b) {
|
|
3001
3001
|
return b = b.trim().replace(/\s+/g, " "), "ẞ".toLowerCase() === "Ṿ" && (b = b.replace(/ẞ/g, "ß")), b.toLowerCase().toUpperCase();
|
|
3002
3002
|
}
|
|
3003
|
-
n.lib = {}, n.lib.mdurl = Mt, n.lib.ucmicro = BP(), n.assign = s, n.isString = e, n.has = r, n.unescapeMd = k, n.unescapeAll = D, n.isValidEntityCode =
|
|
3003
|
+
n.lib = {}, n.lib.mdurl = Mt, n.lib.ucmicro = BP(), n.assign = s, n.isString = e, n.has = r, n.unescapeMd = k, n.unescapeAll = D, n.isValidEntityCode = a, n.fromCodePoint = i, n.escapeHtml = S, n.arrayReplaceAt = c, n.isSpace = z, n.isWhiteSpace = tt, n.isMdAsciiPunct = E, n.isPunctChar = Y, n.escapeRE = F, n.normalizeReference = P;
|
|
3004
3004
|
})(M);
|
|
3005
3005
|
var ve = {}, UP = function(t, e, o) {
|
|
3006
|
-
var r, s, c,
|
|
3006
|
+
var r, s, c, a, i = -1, l = t.posMax, u = t.pos;
|
|
3007
3007
|
for (t.pos = e + 1, r = 1; t.pos < l; ) {
|
|
3008
3008
|
if (c = t.src.charCodeAt(t.pos), c === 93 && (r--, r === 0)) {
|
|
3009
3009
|
s = !0;
|
|
3010
3010
|
break;
|
|
3011
3011
|
}
|
|
3012
|
-
if (
|
|
3013
|
-
if (
|
|
3012
|
+
if (a = t.pos, t.md.inline.skipToken(t), c === 91) {
|
|
3013
|
+
if (a === t.pos - 1)
|
|
3014
3014
|
r++;
|
|
3015
3015
|
else if (o)
|
|
3016
3016
|
return t.pos = u, -1;
|
|
3017
3017
|
}
|
|
3018
3018
|
}
|
|
3019
|
-
return s && (
|
|
3019
|
+
return s && (i = t.pos), t.pos = u, i;
|
|
3020
3020
|
}, mo = M.unescapeAll, VP = function(t, e, o) {
|
|
3021
|
-
var r, s, c = e,
|
|
3021
|
+
var r, s, c = e, a = {
|
|
3022
3022
|
ok: !1,
|
|
3023
3023
|
pos: 0,
|
|
3024
3024
|
lines: 0,
|
|
@@ -3027,16 +3027,16 @@ var ve = {}, UP = function(t, e, o) {
|
|
|
3027
3027
|
if (t.charCodeAt(c) === 60) {
|
|
3028
3028
|
for (c++; c < o; ) {
|
|
3029
3029
|
if (r = t.charCodeAt(c), r === 10 || r === 60)
|
|
3030
|
-
return
|
|
3030
|
+
return a;
|
|
3031
3031
|
if (r === 62)
|
|
3032
|
-
return
|
|
3032
|
+
return a.pos = c + 1, a.str = mo(t.slice(e + 1, c)), a.ok = !0, a;
|
|
3033
3033
|
if (r === 92 && c + 1 < o) {
|
|
3034
3034
|
c += 2;
|
|
3035
3035
|
continue;
|
|
3036
3036
|
}
|
|
3037
3037
|
c++;
|
|
3038
3038
|
}
|
|
3039
|
-
return
|
|
3039
|
+
return a;
|
|
3040
3040
|
}
|
|
3041
3041
|
for (s = 0; c < o && (r = t.charCodeAt(c), !(r === 32 || r < 32 || r === 127)); ) {
|
|
3042
3042
|
if (r === 92 && c + 1 < o) {
|
|
@@ -3046,7 +3046,7 @@ var ve = {}, UP = function(t, e, o) {
|
|
|
3046
3046
|
continue;
|
|
3047
3047
|
}
|
|
3048
3048
|
if (r === 40 && (s++, s > 32))
|
|
3049
|
-
return
|
|
3049
|
+
return a;
|
|
3050
3050
|
if (r === 41) {
|
|
3051
3051
|
if (s === 0)
|
|
3052
3052
|
break;
|
|
@@ -3054,24 +3054,24 @@ var ve = {}, UP = function(t, e, o) {
|
|
|
3054
3054
|
}
|
|
3055
3055
|
c++;
|
|
3056
3056
|
}
|
|
3057
|
-
return e === c || s !== 0 || (
|
|
3057
|
+
return e === c || s !== 0 || (a.str = mo(t.slice(e, c)), a.pos = c, a.ok = !0), a;
|
|
3058
3058
|
}, HP = M.unescapeAll, GP = function(t, e, o) {
|
|
3059
|
-
var r, s, c = 0,
|
|
3059
|
+
var r, s, c = 0, a = e, i = {
|
|
3060
3060
|
ok: !1,
|
|
3061
3061
|
pos: 0,
|
|
3062
3062
|
lines: 0,
|
|
3063
3063
|
str: ""
|
|
3064
3064
|
};
|
|
3065
|
-
if (
|
|
3066
|
-
return
|
|
3067
|
-
for (
|
|
3068
|
-
if (r = t.charCodeAt(
|
|
3069
|
-
return
|
|
3065
|
+
if (a >= o || (s = t.charCodeAt(a), s !== 34 && s !== 39 && s !== 40))
|
|
3066
|
+
return i;
|
|
3067
|
+
for (a++, s === 40 && (s = 41); a < o; ) {
|
|
3068
|
+
if (r = t.charCodeAt(a), r === s)
|
|
3069
|
+
return i.pos = a + 1, i.lines = c, i.str = HP(t.slice(e + 1, a)), i.ok = !0, i;
|
|
3070
3070
|
if (r === 40 && s === 41)
|
|
3071
|
-
return
|
|
3072
|
-
r === 10 ? c++ : r === 92 &&
|
|
3071
|
+
return i;
|
|
3072
|
+
r === 10 ? c++ : r === 92 && a + 1 < o && (a++, t.charCodeAt(a) === 10 && c++), a++;
|
|
3073
3073
|
}
|
|
3074
|
-
return
|
|
3074
|
+
return i;
|
|
3075
3075
|
};
|
|
3076
3076
|
ve.parseLinkLabel = UP;
|
|
3077
3077
|
ve.parseLinkDestination = VP;
|
|
@@ -3087,9 +3087,9 @@ pt.code_block = function(n, t, e, o, r) {
|
|
|
3087
3087
|
`;
|
|
3088
3088
|
};
|
|
3089
3089
|
pt.fence = function(n, t, e, o, r) {
|
|
3090
|
-
var s = n[t], c = s.info ? ZP(s.info).trim() : "",
|
|
3091
|
-
return c && (f = c.split(/(\s+)/g),
|
|
3092
|
-
` : c ? (u = s.attrIndex("class"), h = s.attrs ? s.attrs.slice() : [], u < 0 ? h.push(["class", e.langPrefix +
|
|
3090
|
+
var s = n[t], c = s.info ? ZP(s.info).trim() : "", a = "", i = "", l, u, f, h, d;
|
|
3091
|
+
return c && (f = c.split(/(\s+)/g), a = f[0], i = f.slice(2).join("")), e.highlight ? l = e.highlight(s.content, a, i) || At(s.content) : l = At(s.content), l.indexOf("<pre") === 0 ? l + `
|
|
3092
|
+
` : c ? (u = s.attrIndex("class"), h = s.attrs ? s.attrs.slice() : [], u < 0 ? h.push(["class", e.langPrefix + a]) : (h[u] = h[u].slice(), h[u][1] += " " + e.langPrefix + a), d = {
|
|
3093
3093
|
attrs: h
|
|
3094
3094
|
}, "<pre><code" + r.renderAttrs(d) + ">" + l + `</code></pre>
|
|
3095
3095
|
`) : "<pre><code" + r.renderAttrs(s) + ">" + l + `</code></pre>
|
|
@@ -3131,13 +3131,13 @@ It.prototype.renderAttrs = function(t) {
|
|
|
3131
3131
|
return r;
|
|
3132
3132
|
};
|
|
3133
3133
|
It.prototype.renderToken = function(t, e, o) {
|
|
3134
|
-
var r, s = "", c = !1,
|
|
3135
|
-
return
|
|
3136
|
-
`), s += (
|
|
3134
|
+
var r, s = "", c = !1, a = t[e];
|
|
3135
|
+
return a.hidden ? "" : (a.block && a.nesting !== -1 && e && t[e - 1].hidden && (s += `
|
|
3136
|
+
`), s += (a.nesting === -1 ? "</" : "<") + a.tag, s += this.renderAttrs(a), a.nesting === 0 && o.xhtmlOut && (s += " /"), a.block && (c = !0, a.nesting === 1 && e + 1 < t.length && (r = t[e + 1], (r.type === "inline" || r.hidden || r.nesting === -1 && r.tag === a.tag) && (c = !1))), s += c ? `>
|
|
3137
3137
|
` : ">", s);
|
|
3138
3138
|
};
|
|
3139
3139
|
It.prototype.renderInline = function(n, t, e) {
|
|
3140
|
-
for (var o, r = "", s = this.rules, c = 0,
|
|
3140
|
+
for (var o, r = "", s = this.rules, c = 0, a = n.length; c < a; c++)
|
|
3141
3141
|
o = n[c].type, typeof s[o] < "u" ? r += s[o](n, c, t, e, this) : r += this.renderToken(n, c, t);
|
|
3142
3142
|
return r;
|
|
3143
3143
|
};
|
|
@@ -3148,9 +3148,9 @@ It.prototype.renderInlineAsText = function(n, t, e) {
|
|
|
3148
3148
|
return o;
|
|
3149
3149
|
};
|
|
3150
3150
|
It.prototype.render = function(n, t, e) {
|
|
3151
|
-
var o, r, s, c = "",
|
|
3151
|
+
var o, r, s, c = "", a = this.rules;
|
|
3152
3152
|
for (o = 0, r = n.length; o < r; o++)
|
|
3153
|
-
s = n[o].type, s === "inline" ? c += this.renderInline(n[o].children, t, e) : typeof
|
|
3153
|
+
s = n[o].type, s === "inline" ? c += this.renderInline(n[o].children, t, e) : typeof a[s] < "u" ? c += a[s](n, o, t, e, this) : c += this.renderToken(n, o, t, e);
|
|
3154
3154
|
return c;
|
|
3155
3155
|
};
|
|
3156
3156
|
var YP = It;
|
|
@@ -3265,20 +3265,20 @@ function eN(n) {
|
|
|
3265
3265
|
return /^<\/a\s*>/i.test(n);
|
|
3266
3266
|
}
|
|
3267
3267
|
var nN = function(t) {
|
|
3268
|
-
var e, o, r, s, c,
|
|
3268
|
+
var e, o, r, s, c, a, i, l, u, f, h, d, x, k, D, y, _ = t.tokens, g;
|
|
3269
3269
|
if (t.md.options.linkify) {
|
|
3270
3270
|
for (o = 0, r = _.length; o < r; o++)
|
|
3271
3271
|
if (!(_[o].type !== "inline" || !t.md.linkify.pretest(_[o].content)))
|
|
3272
3272
|
for (s = _[o].children, x = 0, e = s.length - 1; e >= 0; e--) {
|
|
3273
|
-
if (
|
|
3274
|
-
for (e--; s[e].level !==
|
|
3273
|
+
if (a = s[e], a.type === "link_close") {
|
|
3274
|
+
for (e--; s[e].level !== a.level && s[e].type !== "link_open"; )
|
|
3275
3275
|
e--;
|
|
3276
3276
|
continue;
|
|
3277
3277
|
}
|
|
3278
|
-
if (
|
|
3279
|
-
for (u =
|
|
3280
|
-
k = g[l].url, D = t.md.normalizeLink(k), t.md.validateLink(D) && (y = g[l].text, g[l].schema ? g[l].schema === "mailto:" && !/^mailto:/i.test(y) ? y = t.md.normalizeLinkText("mailto:" + y).replace(/^mailto:/, "") : y = t.md.normalizeLinkText(y) : y = t.md.normalizeLinkText("http://" + y).replace(/^http:\/\//, ""), f = g[l].index, f > h && (c = new t.Token("text", "", 0), c.content = u.slice(h, f), c.level = d,
|
|
3281
|
-
h < u.length && (c = new t.Token("text", "", 0), c.content = u.slice(h), c.level = d,
|
|
3278
|
+
if (a.type === "html_inline" && (tN(a.content) && x > 0 && x--, eN(a.content) && x++), !(x > 0) && a.type === "text" && t.md.linkify.test(a.content)) {
|
|
3279
|
+
for (u = a.content, g = t.md.linkify.match(u), i = [], d = a.level, h = 0, g.length > 0 && g[0].index === 0 && e > 0 && s[e - 1].type === "text_special" && (g = g.slice(1)), l = 0; l < g.length; l++)
|
|
3280
|
+
k = g[l].url, D = t.md.normalizeLink(k), t.md.validateLink(D) && (y = g[l].text, g[l].schema ? g[l].schema === "mailto:" && !/^mailto:/i.test(y) ? y = t.md.normalizeLinkText("mailto:" + y).replace(/^mailto:/, "") : y = t.md.normalizeLinkText(y) : y = t.md.normalizeLinkText("http://" + y).replace(/^http:\/\//, ""), f = g[l].index, f > h && (c = new t.Token("text", "", 0), c.content = u.slice(h, f), c.level = d, i.push(c)), c = new t.Token("link_open", "a", 1), c.attrs = [["href", D]], c.level = d++, c.markup = "linkify", c.info = "auto", i.push(c), c = new t.Token("text", "", 0), c.content = y, c.level = d, i.push(c), c = new t.Token("link_close", "a", -1), c.level = --d, c.markup = "linkify", c.info = "auto", i.push(c), h = g[l].lastIndex);
|
|
3281
|
+
h < u.length && (c = new t.Token("text", "", 0), c.content = u.slice(h), c.level = d, i.push(c)), _[o].children = s = $P(s, e, i);
|
|
3282
3282
|
}
|
|
3283
3283
|
}
|
|
3284
3284
|
}
|
|
@@ -3310,14 +3310,14 @@ function se(n, t, e) {
|
|
|
3310
3310
|
return n.slice(0, t) + e + n.slice(t + 1);
|
|
3311
3311
|
}
|
|
3312
3312
|
function pN(n, t) {
|
|
3313
|
-
var e, o, r, s, c,
|
|
3313
|
+
var e, o, r, s, c, a, i, l, u, f, h, d, x, k, D, y, _, g, C, S, v;
|
|
3314
3314
|
for (C = [], e = 0; e < n.length; e++) {
|
|
3315
|
-
for (o = n[e],
|
|
3315
|
+
for (o = n[e], i = n[e].level, _ = C.length - 1; _ >= 0 && !(C[_].level <= i); _--)
|
|
3316
3316
|
;
|
|
3317
3317
|
if (C.length = _ + 1, o.type === "text") {
|
|
3318
|
-
r = o.content, c = 0,
|
|
3318
|
+
r = o.content, c = 0, a = r.length;
|
|
3319
3319
|
t:
|
|
3320
|
-
for (; c <
|
|
3320
|
+
for (; c < a && (vo.lastIndex = c, s = vo.exec(r), !!s); ) {
|
|
3321
3321
|
if (D = y = !0, c = s.index + 1, g = s[0] === "'", u = 32, s.index - 1 >= 0)
|
|
3322
3322
|
u = r.charCodeAt(s.index - 1);
|
|
3323
3323
|
else
|
|
@@ -3326,7 +3326,7 @@ function pN(n, t) {
|
|
|
3326
3326
|
u = n[_].content.charCodeAt(n[_].content.length - 1);
|
|
3327
3327
|
break;
|
|
3328
3328
|
}
|
|
3329
|
-
if (f = 32, c <
|
|
3329
|
+
if (f = 32, c < a)
|
|
3330
3330
|
f = r.charCodeAt(c);
|
|
3331
3331
|
else
|
|
3332
3332
|
for (_ = e + 1; _ < n.length && !(n[_].type === "softbreak" || n[_].type === "hardbreak"); _++)
|
|
@@ -3339,13 +3339,13 @@ function pN(n, t) {
|
|
|
3339
3339
|
continue;
|
|
3340
3340
|
}
|
|
3341
3341
|
if (y) {
|
|
3342
|
-
for (_ = C.length - 1; _ >= 0 && (l = C[_], !(C[_].level <
|
|
3343
|
-
if (l.single === g && C[_].level ===
|
|
3342
|
+
for (_ = C.length - 1; _ >= 0 && (l = C[_], !(C[_].level < i)); _--)
|
|
3343
|
+
if (l.single === g && C[_].level === i) {
|
|
3344
3344
|
l = C[_], g ? (S = t.md.options.quotes[2], v = t.md.options.quotes[3]) : (S = t.md.options.quotes[0], v = t.md.options.quotes[1]), o.content = se(o.content, s.index, v), n[l.token].content = se(
|
|
3345
3345
|
n[l.token].content,
|
|
3346
3346
|
l.pos,
|
|
3347
3347
|
S
|
|
3348
|
-
), c += v.length - 1, l.token === e && (c += S.length - 1), r = o.content,
|
|
3348
|
+
), c += v.length - 1, l.token === e && (c += S.length - 1), r = o.content, a = r.length, C.length = _;
|
|
3349
3349
|
continue t;
|
|
3350
3350
|
}
|
|
3351
3351
|
}
|
|
@@ -3353,7 +3353,7 @@ function pN(n, t) {
|
|
|
3353
3353
|
token: e,
|
|
3354
3354
|
pos: s.index,
|
|
3355
3355
|
single: g,
|
|
3356
|
-
level:
|
|
3356
|
+
level: i
|
|
3357
3357
|
}) : y && g && (o.content = se(o.content, s.index, ko));
|
|
3358
3358
|
}
|
|
3359
3359
|
}
|
|
@@ -3365,14 +3365,14 @@ var fN = function(t) {
|
|
|
3365
3365
|
for (e = t.tokens.length - 1; e >= 0; e--)
|
|
3366
3366
|
t.tokens[e].type !== "inline" || !uN.test(t.tokens[e].content) || pN(t.tokens[e].children, t);
|
|
3367
3367
|
}, hN = function(t) {
|
|
3368
|
-
var e, o, r, s, c,
|
|
3369
|
-
for (e = 0, o =
|
|
3370
|
-
if (
|
|
3371
|
-
for (r =
|
|
3368
|
+
var e, o, r, s, c, a, i = t.tokens;
|
|
3369
|
+
for (e = 0, o = i.length; e < o; e++)
|
|
3370
|
+
if (i[e].type === "inline") {
|
|
3371
|
+
for (r = i[e].children, c = r.length, s = 0; s < c; s++)
|
|
3372
3372
|
r[s].type === "text_special" && (r[s].type = "text");
|
|
3373
|
-
for (s =
|
|
3374
|
-
r[s].type === "text" && s + 1 < c && r[s + 1].type === "text" ? r[s + 1].content = r[s].content + r[s + 1].content : (s !==
|
|
3375
|
-
s !==
|
|
3373
|
+
for (s = a = 0; s < c; s++)
|
|
3374
|
+
r[s].type === "text" && s + 1 < c && r[s + 1].type === "text" ? r[s + 1].content = r[s].content + r[s + 1].content : (s !== a && (r[a] = r[s]), a++);
|
|
3375
|
+
s !== a && (r.length = a);
|
|
3376
3376
|
}
|
|
3377
3377
|
};
|
|
3378
3378
|
function Pt(n, t, e) {
|
|
@@ -3435,23 +3435,23 @@ function Ye(n, t) {
|
|
|
3435
3435
|
return n.src.slice(e, o);
|
|
3436
3436
|
}
|
|
3437
3437
|
function xo(n) {
|
|
3438
|
-
var t = [], e = 0, o = n.length, r, s = !1, c = 0,
|
|
3438
|
+
var t = [], e = 0, o = n.length, r, s = !1, c = 0, a = "";
|
|
3439
3439
|
for (r = n.charCodeAt(e); e < o; )
|
|
3440
|
-
r === 124 && (s ? (
|
|
3441
|
-
return t.push(
|
|
3440
|
+
r === 124 && (s ? (a += n.substring(c, e - 1), c = e) : (t.push(a + n.substring(c, e)), a = "", c = e + 1)), s = r === 92, e++, r = n.charCodeAt(e);
|
|
3441
|
+
return t.push(a + n.substring(c)), t;
|
|
3442
3442
|
}
|
|
3443
3443
|
var _N = function(t, e, o, r) {
|
|
3444
|
-
var s, c,
|
|
3445
|
-
if (e + 2 > o || (u = e + 1, t.sCount[u] < t.blkIndent) || t.sCount[u] - t.blkIndent >= 4 || (
|
|
3444
|
+
var s, c, a, i, l, u, f, h, d, x, k, D, y, _, g, C, S, v;
|
|
3445
|
+
if (e + 2 > o || (u = e + 1, t.sCount[u] < t.blkIndent) || t.sCount[u] - t.blkIndent >= 4 || (a = t.bMarks[u] + t.tShift[u], a >= t.eMarks[u]) || (S = t.src.charCodeAt(a++), S !== 124 && S !== 45 && S !== 58) || a >= t.eMarks[u] || (v = t.src.charCodeAt(a++), v !== 124 && v !== 45 && v !== 58 && !Ze(v)) || S === 45 && Ze(v))
|
|
3446
3446
|
return !1;
|
|
3447
|
-
for (;
|
|
3448
|
-
if (s = t.src.charCodeAt(
|
|
3447
|
+
for (; a < t.eMarks[u]; ) {
|
|
3448
|
+
if (s = t.src.charCodeAt(a), s !== 124 && s !== 45 && s !== 58 && !Ze(s))
|
|
3449
3449
|
return !1;
|
|
3450
|
-
|
|
3450
|
+
a++;
|
|
3451
3451
|
}
|
|
3452
|
-
for (c = Ye(t, e + 1), f = c.split("|"), x = [],
|
|
3453
|
-
if (k = f[
|
|
3454
|
-
if (
|
|
3452
|
+
for (c = Ye(t, e + 1), f = c.split("|"), x = [], i = 0; i < f.length; i++) {
|
|
3453
|
+
if (k = f[i].trim(), !k) {
|
|
3454
|
+
if (i === 0 || i === f.length - 1)
|
|
3455
3455
|
continue;
|
|
3456
3456
|
return !1;
|
|
3457
3457
|
}
|
|
@@ -3463,18 +3463,18 @@ var _N = function(t, e, o, r) {
|
|
|
3463
3463
|
return !1;
|
|
3464
3464
|
if (r)
|
|
3465
3465
|
return !0;
|
|
3466
|
-
for (_ = t.parentType, t.parentType = "table", C = t.md.block.ruler.getRules("blockquote"), d = t.push("table_open", "table", 1), d.map = D = [e, 0], d = t.push("thead_open", "thead", 1), d.map = [e, e + 1], d = t.push("tr_open", "tr", 1), d.map = [e, e + 1],
|
|
3467
|
-
d = t.push("th_open", "th", 1), x[
|
|
3466
|
+
for (_ = t.parentType, t.parentType = "table", C = t.md.block.ruler.getRules("blockquote"), d = t.push("table_open", "table", 1), d.map = D = [e, 0], d = t.push("thead_open", "thead", 1), d.map = [e, e + 1], d = t.push("tr_open", "tr", 1), d.map = [e, e + 1], i = 0; i < f.length; i++)
|
|
3467
|
+
d = t.push("th_open", "th", 1), x[i] && (d.attrs = [["style", "text-align:" + x[i]]]), d = t.push("inline", "", 0), d.content = f[i].trim(), d.children = [], d = t.push("th_close", "th", -1);
|
|
3468
3468
|
for (d = t.push("tr_close", "tr", -1), d = t.push("thead_close", "thead", -1), u = e + 2; u < o && !(t.sCount[u] < t.blkIndent); u++) {
|
|
3469
|
-
for (g = !1,
|
|
3470
|
-
if (C[
|
|
3469
|
+
for (g = !1, i = 0, l = C.length; i < l; i++)
|
|
3470
|
+
if (C[i](t, u, o, !0)) {
|
|
3471
3471
|
g = !0;
|
|
3472
3472
|
break;
|
|
3473
3473
|
}
|
|
3474
3474
|
if (g || (c = Ye(t, u).trim(), !c) || t.sCount[u] - t.blkIndent >= 4)
|
|
3475
3475
|
break;
|
|
3476
|
-
for (f = xo(c), f.length && f[0] === "" && f.shift(), f.length && f[f.length - 1] === "" && f.pop(), u === e + 2 && (d = t.push("tbody_open", "tbody", 1), d.map = y = [e + 2, 0]), d = t.push("tr_open", "tr", 1), d.map = [u, u + 1],
|
|
3477
|
-
d = t.push("td_open", "td", 1), x[
|
|
3476
|
+
for (f = xo(c), f.length && f[0] === "" && f.shift(), f.length && f[f.length - 1] === "" && f.pop(), u === e + 2 && (d = t.push("tbody_open", "tbody", 1), d.map = y = [e + 2, 0]), d = t.push("tr_open", "tr", 1), d.map = [u, u + 1], i = 0; i < h; i++)
|
|
3477
|
+
d = t.push("td_open", "td", 1), x[i] && (d.attrs = [["style", "text-align:" + x[i]]]), d = t.push("inline", "", 0), d.content = f[i] ? f[i].trim() : "", d.children = [], d = t.push("td_close", "td", -1);
|
|
3478
3478
|
d = t.push("tr_close", "tr", -1);
|
|
3479
3479
|
}
|
|
3480
3480
|
return y && (d = t.push("tbody_close", "tbody", -1), y[1] = u), d = t.push("table_close", "table", -1), D[1] = u, t.parentType = _, t.line = u, !0;
|
|
@@ -3496,36 +3496,36 @@ var _N = function(t, e, o, r) {
|
|
|
3496
3496
|
return t.line = s, c = t.push("code_block", "code", 0), c.content = t.getLines(e, s, 4 + t.blkIndent, !1) + `
|
|
3497
3497
|
`, c.map = [e, t.line], !0;
|
|
3498
3498
|
}, kN = function(t, e, o, r) {
|
|
3499
|
-
var s, c,
|
|
3500
|
-
if (t.sCount[e] - t.blkIndent >= 4 || d + 3 > x || (s = t.src.charCodeAt(d), s !== 126 && s !== 96) || (l = d, d = t.skipChars(d, s), c = d - l, c < 3) || (f = t.src.slice(l, d),
|
|
3499
|
+
var s, c, a, i, l, u, f, h = !1, d = t.bMarks[e] + t.tShift[e], x = t.eMarks[e];
|
|
3500
|
+
if (t.sCount[e] - t.blkIndent >= 4 || d + 3 > x || (s = t.src.charCodeAt(d), s !== 126 && s !== 96) || (l = d, d = t.skipChars(d, s), c = d - l, c < 3) || (f = t.src.slice(l, d), a = t.src.slice(d, x), s === 96 && a.indexOf(String.fromCharCode(s)) >= 0))
|
|
3501
3501
|
return !1;
|
|
3502
3502
|
if (r)
|
|
3503
3503
|
return !0;
|
|
3504
|
-
for (
|
|
3505
|
-
if (t.src.charCodeAt(d) === s && !(t.sCount[
|
|
3504
|
+
for (i = e; i++, !(i >= o || (d = l = t.bMarks[i] + t.tShift[i], x = t.eMarks[i], d < x && t.sCount[i] < t.blkIndent)); )
|
|
3505
|
+
if (t.src.charCodeAt(d) === s && !(t.sCount[i] - t.blkIndent >= 4) && (d = t.skipChars(d, s), !(d - l < c) && (d = t.skipSpaces(d), !(d < x)))) {
|
|
3506
3506
|
h = !0;
|
|
3507
3507
|
break;
|
|
3508
3508
|
}
|
|
3509
|
-
return c = t.sCount[e], t.line =
|
|
3509
|
+
return c = t.sCount[e], t.line = i + (h ? 1 : 0), u = t.push("fence", "code", 0), u.info = a, u.content = t.getLines(e + 1, i, c, !0), u.markup = f, u.map = [e, t.line], !0;
|
|
3510
3510
|
}, xN = M.isSpace, yN = function(t, e, o, r) {
|
|
3511
|
-
var s, c,
|
|
3511
|
+
var s, c, a, i, l, u, f, h, d, x, k, D, y, _, g, C, S, v, F, z, tt = t.lineMax, L = t.bMarks[e] + t.tShift[e], Y = t.eMarks[e];
|
|
3512
3512
|
if (t.sCount[e] - t.blkIndent >= 4 || t.src.charCodeAt(L) !== 62)
|
|
3513
3513
|
return !1;
|
|
3514
3514
|
if (r)
|
|
3515
3515
|
return !0;
|
|
3516
3516
|
for (x = [], k = [], _ = [], g = [], v = t.md.block.ruler.getRules("blockquote"), y = t.parentType, t.parentType = "blockquote", h = e; h < o && (z = t.sCount[h] < t.blkIndent, L = t.bMarks[h] + t.tShift[h], Y = t.eMarks[h], !(L >= Y)); h++) {
|
|
3517
3517
|
if (t.src.charCodeAt(L++) === 62 && !z) {
|
|
3518
|
-
for (
|
|
3518
|
+
for (i = t.sCount[h] + 1, t.src.charCodeAt(L) === 32 ? (L++, i++, s = !1, C = !0) : t.src.charCodeAt(L) === 9 ? (C = !0, (t.bsCount[h] + i) % 4 === 3 ? (L++, i++, s = !1) : s = !0) : C = !1, d = i, x.push(t.bMarks[h]), t.bMarks[h] = L; L < Y && (c = t.src.charCodeAt(L), xN(c)); ) {
|
|
3519
3519
|
c === 9 ? d += 4 - (d + t.bsCount[h] + (s ? 1 : 0)) % 4 : d++;
|
|
3520
3520
|
L++;
|
|
3521
3521
|
}
|
|
3522
|
-
u = L >= Y, k.push(t.bsCount[h]), t.bsCount[h] = t.sCount[h] + 1 + (C ? 1 : 0), _.push(t.sCount[h]), t.sCount[h] = d -
|
|
3522
|
+
u = L >= Y, k.push(t.bsCount[h]), t.bsCount[h] = t.sCount[h] + 1 + (C ? 1 : 0), _.push(t.sCount[h]), t.sCount[h] = d - i, g.push(t.tShift[h]), t.tShift[h] = L - t.bMarks[h];
|
|
3523
3523
|
continue;
|
|
3524
3524
|
}
|
|
3525
3525
|
if (u)
|
|
3526
3526
|
break;
|
|
3527
|
-
for (S = !1,
|
|
3528
|
-
if (v[
|
|
3527
|
+
for (S = !1, a = 0, l = v.length; a < l; a++)
|
|
3528
|
+
if (v[a](t, h, o, !0)) {
|
|
3529
3529
|
S = !0;
|
|
3530
3530
|
break;
|
|
3531
3531
|
}
|
|
@@ -3535,19 +3535,19 @@ var _N = function(t, e, o, r) {
|
|
|
3535
3535
|
}
|
|
3536
3536
|
x.push(t.bMarks[h]), k.push(t.bsCount[h]), g.push(t.tShift[h]), _.push(t.sCount[h]), t.sCount[h] = -1;
|
|
3537
3537
|
}
|
|
3538
|
-
for (D = t.blkIndent, t.blkIndent = 0, F = t.push("blockquote_open", "blockquote", 1), F.markup = ">", F.map = f = [e, 0], t.md.block.tokenize(t, e, h), F = t.push("blockquote_close", "blockquote", -1), F.markup = ">", t.lineMax = tt, t.parentType = y, f[1] = t.line,
|
|
3539
|
-
t.bMarks[
|
|
3538
|
+
for (D = t.blkIndent, t.blkIndent = 0, F = t.push("blockquote_open", "blockquote", 1), F.markup = ">", F.map = f = [e, 0], t.md.block.tokenize(t, e, h), F = t.push("blockquote_close", "blockquote", -1), F.markup = ">", t.lineMax = tt, t.parentType = y, f[1] = t.line, a = 0; a < g.length; a++)
|
|
3539
|
+
t.bMarks[a + e] = x[a], t.tShift[a + e] = g[a], t.sCount[a + e] = _[a], t.bsCount[a + e] = k[a];
|
|
3540
3540
|
return t.blkIndent = D, !0;
|
|
3541
3541
|
}, AN = M.isSpace, wN = function(t, e, o, r) {
|
|
3542
|
-
var s, c,
|
|
3542
|
+
var s, c, a, i, l = t.bMarks[e] + t.tShift[e], u = t.eMarks[e];
|
|
3543
3543
|
if (t.sCount[e] - t.blkIndent >= 4 || (s = t.src.charCodeAt(l++), s !== 42 && s !== 45 && s !== 95))
|
|
3544
3544
|
return !1;
|
|
3545
3545
|
for (c = 1; l < u; ) {
|
|
3546
|
-
if (
|
|
3546
|
+
if (a = t.src.charCodeAt(l++), a !== s && !AN(a))
|
|
3547
3547
|
return !1;
|
|
3548
|
-
|
|
3548
|
+
a === s && c++;
|
|
3549
3549
|
}
|
|
3550
|
-
return c < 3 ? !1 : (r || (t.line = e + 1,
|
|
3550
|
+
return c < 3 ? !1 : (r || (t.line = e + 1, i = t.push("hr", "hr", 0), i.map = [e, t.line], i.markup = Array(c + 1).join(String.fromCharCode(s))), !0);
|
|
3551
3551
|
}, $o = M.isSpace;
|
|
3552
3552
|
function yo(n, t) {
|
|
3553
3553
|
var e, o, r, s;
|
|
@@ -3577,7 +3577,7 @@ function CN(n, t) {
|
|
|
3577
3577
|
n.tokens[e].level === r && n.tokens[e].type === "paragraph_open" && (n.tokens[e + 2].hidden = !0, n.tokens[e].hidden = !0, e += 2);
|
|
3578
3578
|
}
|
|
3579
3579
|
var EN = function(t, e, o, r) {
|
|
3580
|
-
var s, c,
|
|
3580
|
+
var s, c, a, i, l, u, f, h, d, x, k, D, y, _, g, C, S, v, F, z, tt, L, Y, E, P, b, q, A = e, j = !1, wt = !0;
|
|
3581
3581
|
if (t.sCount[A] - t.blkIndent >= 4 || t.listIndent >= 0 && t.sCount[A] - t.listIndent >= 4 && t.sCount[A] < t.blkIndent)
|
|
3582
3582
|
return !1;
|
|
3583
3583
|
if (r && t.parentType === "paragraph" && t.sCount[A] >= t.blkIndent && (j = !0), (L = Ao(t, A)) >= 0) {
|
|
@@ -3601,10 +3601,10 @@ var EN = function(t, e, o, r) {
|
|
|
3601
3601
|
break;
|
|
3602
3602
|
tt++;
|
|
3603
3603
|
}
|
|
3604
|
-
if (c = tt, c >= _ ? l = 1 : l = g - u, l > 4 && (l = 1),
|
|
3604
|
+
if (c = tt, c >= _ ? l = 1 : l = g - u, l > 4 && (l = 1), i = u + l, q = t.push("list_item_open", "li", 1), q.markup = String.fromCharCode(D), q.map = h = [A, 0], f && (q.info = t.src.slice(E, L - 1)), z = t.tight, F = t.tShift[A], v = t.sCount[A], C = t.listIndent, t.listIndent = t.blkIndent, t.blkIndent = i, t.tight = !0, t.tShift[A] = c - t.bMarks[A], t.sCount[A] = g, c >= _ && t.isEmpty(A + 1) ? t.line = Math.min(t.line + 2, o) : t.md.block.tokenize(t, A, o, !0), (!t.tight || Y) && (wt = !1), Y = t.line - A > 1 && t.isEmpty(t.line - 1), t.blkIndent = t.listIndent, t.listIndent = C, t.tShift[A] = F, t.sCount[A] = v, t.tight = z, q = t.push("list_item_close", "li", -1), q.markup = String.fromCharCode(D), A = t.line, h[1] = A, A >= o || t.sCount[A] < t.blkIndent || t.sCount[A] - t.blkIndent >= 4)
|
|
3605
3605
|
break;
|
|
3606
|
-
for (P = !1,
|
|
3607
|
-
if (b[
|
|
3606
|
+
for (P = !1, a = 0, d = b.length; a < d; a++)
|
|
3607
|
+
if (b[a](t, A, o, !0)) {
|
|
3608
3608
|
P = !0;
|
|
3609
3609
|
break;
|
|
3610
3610
|
}
|
|
@@ -3621,7 +3621,7 @@ var EN = function(t, e, o, r) {
|
|
|
3621
3621
|
}
|
|
3622
3622
|
return f ? q = t.push("ordered_list_close", "ol", -1) : q = t.push("bullet_list_close", "ul", -1), q.markup = String.fromCharCode(D), x[1] = A, t.line = A, t.parentType = S, wt && CN(t, k), !0;
|
|
3623
3623
|
}, DN = M.normalizeReference, ce = M.isSpace, TN = function(t, e, o, r) {
|
|
3624
|
-
var s, c,
|
|
3624
|
+
var s, c, a, i, l, u, f, h, d, x, k, D, y, _, g, C, S = 0, v = t.bMarks[e] + t.tShift[e], F = t.eMarks[e], z = e + 1;
|
|
3625
3625
|
if (t.sCount[e] - t.blkIndent >= 4 || t.src.charCodeAt(v) !== 91)
|
|
3626
3626
|
return !1;
|
|
3627
3627
|
for (; ++v < F; )
|
|
@@ -3630,10 +3630,10 @@ var EN = function(t, e, o, r) {
|
|
|
3630
3630
|
return !1;
|
|
3631
3631
|
break;
|
|
3632
3632
|
}
|
|
3633
|
-
for (
|
|
3633
|
+
for (i = t.lineMax, g = t.md.block.ruler.getRules("reference"), x = t.parentType, t.parentType = "reference"; z < i && !t.isEmpty(z); z++)
|
|
3634
3634
|
if (!(t.sCount[z] - t.blkIndent > 3) && !(t.sCount[z] < 0)) {
|
|
3635
3635
|
for (_ = !1, u = 0, f = g.length; u < f; u++)
|
|
3636
|
-
if (g[u](t, z,
|
|
3636
|
+
if (g[u](t, z, i, !0)) {
|
|
3637
3637
|
_ = !0;
|
|
3638
3638
|
break;
|
|
3639
3639
|
}
|
|
@@ -3658,15 +3658,15 @@ var EN = function(t, e, o, r) {
|
|
|
3658
3658
|
break;
|
|
3659
3659
|
if (k = t.md.helpers.parseLinkDestination(y, v, F), !k.ok || (l = t.md.normalizeLink(k.str), !t.md.validateLink(l)))
|
|
3660
3660
|
return !1;
|
|
3661
|
-
for (v = k.pos, S += k.lines, c = v,
|
|
3661
|
+
for (v = k.pos, S += k.lines, c = v, a = S, D = v; v < F; v++)
|
|
3662
3662
|
if (s = y.charCodeAt(v), s === 10)
|
|
3663
3663
|
S++;
|
|
3664
3664
|
else if (!ce(s))
|
|
3665
3665
|
break;
|
|
3666
|
-
for (k = t.md.helpers.parseLinkTitle(y, v, F), v < F && D !== v && k.ok ? (C = k.str, v = k.pos, S += k.lines) : (C = "", v = c, S =
|
|
3666
|
+
for (k = t.md.helpers.parseLinkTitle(y, v, F), v < F && D !== v && k.ok ? (C = k.str, v = k.pos, S += k.lines) : (C = "", v = c, S = a); v < F && (s = y.charCodeAt(v), !!ce(s)); )
|
|
3667
3667
|
v++;
|
|
3668
3668
|
if (v < F && y.charCodeAt(v) !== 10 && C)
|
|
3669
|
-
for (C = "", v = c, S =
|
|
3669
|
+
for (C = "", v = c, S = a; v < F && (s = y.charCodeAt(v), !!ce(s)); )
|
|
3670
3670
|
v++;
|
|
3671
3671
|
return v < F && y.charCodeAt(v) !== 10 || (h = DN(y.slice(1, d)), !h) ? !1 : (r || (typeof t.env.references > "u" && (t.env.references = {}), typeof t.env.references[h] > "u" && (t.env.references[h] = { title: C, href: l }), t.parentType = x, t.line = e + S + 1), !0);
|
|
3672
3672
|
}, SN = [
|
|
@@ -3744,32 +3744,32 @@ var VN = SN, HN = ke.HTML_OPEN_CLOSE_TAG_RE, qt = [
|
|
|
3744
3744
|
[new RegExp("^</?(" + VN.join("|") + ")(?=(\\s|/?>|$))", "i"), /^$/, !0],
|
|
3745
3745
|
[new RegExp(HN.source + "\\s*$"), /^$/, !1]
|
|
3746
3746
|
], GN = function(t, e, o, r) {
|
|
3747
|
-
var s, c,
|
|
3747
|
+
var s, c, a, i, l = t.bMarks[e] + t.tShift[e], u = t.eMarks[e];
|
|
3748
3748
|
if (t.sCount[e] - t.blkIndent >= 4 || !t.md.options.html || t.src.charCodeAt(l) !== 60)
|
|
3749
3749
|
return !1;
|
|
3750
|
-
for (
|
|
3750
|
+
for (i = t.src.slice(l, u), s = 0; s < qt.length && !qt[s][0].test(i); s++)
|
|
3751
3751
|
;
|
|
3752
3752
|
if (s === qt.length)
|
|
3753
3753
|
return !1;
|
|
3754
3754
|
if (r)
|
|
3755
3755
|
return qt[s][2];
|
|
3756
|
-
if (c = e + 1, !qt[s][1].test(
|
|
3756
|
+
if (c = e + 1, !qt[s][1].test(i)) {
|
|
3757
3757
|
for (; c < o && !(t.sCount[c] < t.blkIndent); c++)
|
|
3758
|
-
if (l = t.bMarks[c] + t.tShift[c], u = t.eMarks[c],
|
|
3759
|
-
|
|
3758
|
+
if (l = t.bMarks[c] + t.tShift[c], u = t.eMarks[c], i = t.src.slice(l, u), qt[s][1].test(i)) {
|
|
3759
|
+
i.length !== 0 && c++;
|
|
3760
3760
|
break;
|
|
3761
3761
|
}
|
|
3762
3762
|
}
|
|
3763
|
-
return t.line = c,
|
|
3763
|
+
return t.line = c, a = t.push("html_block", "", 0), a.map = [e, c], a.content = t.getLines(e, c, t.blkIndent, !0), !0;
|
|
3764
3764
|
}, wo = M.isSpace, jN = function(t, e, o, r) {
|
|
3765
|
-
var s, c,
|
|
3765
|
+
var s, c, a, i, l = t.bMarks[e] + t.tShift[e], u = t.eMarks[e];
|
|
3766
3766
|
if (t.sCount[e] - t.blkIndent >= 4 || (s = t.src.charCodeAt(l), s !== 35 || l >= u))
|
|
3767
3767
|
return !1;
|
|
3768
3768
|
for (c = 1, s = t.src.charCodeAt(++l); s === 35 && l < u && c <= 6; )
|
|
3769
3769
|
c++, s = t.src.charCodeAt(++l);
|
|
3770
|
-
return c > 6 || l < u && !wo(s) ? !1 : (r || (u = t.skipSpacesBack(u, l),
|
|
3770
|
+
return c > 6 || l < u && !wo(s) ? !1 : (r || (u = t.skipSpacesBack(u, l), a = t.skipCharsBack(u, 35, l), a > l && wo(t.src.charCodeAt(a - 1)) && (u = a), t.line = e + 1, i = t.push("heading_open", "h" + String(c), 1), i.markup = "########".slice(0, c), i.map = [e, t.line], i = t.push("inline", "", 0), i.content = t.src.slice(l, u).trim(), i.map = [e, t.line], i.children = [], i = t.push("heading_close", "h" + String(c), -1), i.markup = "########".slice(0, c)), !0);
|
|
3771
3771
|
}, ZN = function(t, e, o) {
|
|
3772
|
-
var r, s, c,
|
|
3772
|
+
var r, s, c, a, i, l, u, f, h, d = e + 1, x, k = t.md.block.ruler.getRules("paragraph");
|
|
3773
3773
|
if (t.sCount[e] - t.blkIndent >= 4)
|
|
3774
3774
|
return !1;
|
|
3775
3775
|
for (x = t.parentType, t.parentType = "paragraph"; d < o && !t.isEmpty(d); d++)
|
|
@@ -3779,7 +3779,7 @@ var VN = SN, HN = ke.HTML_OPEN_CLOSE_TAG_RE, qt = [
|
|
|
3779
3779
|
break;
|
|
3780
3780
|
}
|
|
3781
3781
|
if (!(t.sCount[d] < 0)) {
|
|
3782
|
-
for (s = !1, c = 0,
|
|
3782
|
+
for (s = !1, c = 0, a = k.length; c < a; c++)
|
|
3783
3783
|
if (k[c](t, d, o, !0)) {
|
|
3784
3784
|
s = !0;
|
|
3785
3785
|
break;
|
|
@@ -3788,12 +3788,12 @@ var VN = SN, HN = ke.HTML_OPEN_CLOSE_TAG_RE, qt = [
|
|
|
3788
3788
|
break;
|
|
3789
3789
|
}
|
|
3790
3790
|
}
|
|
3791
|
-
return f ? (r = t.getLines(e, d, t.blkIndent, !1).trim(), t.line = d + 1,
|
|
3791
|
+
return f ? (r = t.getLines(e, d, t.blkIndent, !1).trim(), t.line = d + 1, i = t.push("heading_open", "h" + String(f), 1), i.markup = String.fromCharCode(h), i.map = [e, t.line], i = t.push("inline", "", 0), i.content = r, i.map = [e, t.line - 1], i.children = [], i = t.push("heading_close", "h" + String(f), -1), i.markup = String.fromCharCode(h), t.parentType = x, !0) : !1;
|
|
3792
3792
|
}, YN = function(t, e, o) {
|
|
3793
|
-
var r, s, c,
|
|
3793
|
+
var r, s, c, a, i, l, u = e + 1, f = t.md.block.ruler.getRules("paragraph");
|
|
3794
3794
|
for (l = t.parentType, t.parentType = "paragraph"; u < o && !t.isEmpty(u); u++)
|
|
3795
3795
|
if (!(t.sCount[u] - t.blkIndent > 3) && !(t.sCount[u] < 0)) {
|
|
3796
|
-
for (s = !1, c = 0,
|
|
3796
|
+
for (s = !1, c = 0, a = f.length; c < a; c++)
|
|
3797
3797
|
if (f[c](t, u, o, !0)) {
|
|
3798
3798
|
s = !0;
|
|
3799
3799
|
break;
|
|
@@ -3801,18 +3801,18 @@ var VN = SN, HN = ke.HTML_OPEN_CLOSE_TAG_RE, qt = [
|
|
|
3801
3801
|
if (s)
|
|
3802
3802
|
break;
|
|
3803
3803
|
}
|
|
3804
|
-
return r = t.getLines(e, u, t.blkIndent, !1).trim(), t.line = u,
|
|
3804
|
+
return r = t.getLines(e, u, t.blkIndent, !1).trim(), t.line = u, i = t.push("paragraph_open", "p", 1), i.map = [e, t.line], i = t.push("inline", "", 0), i.content = r, i.map = [e, t.line], i.children = [], i = t.push("paragraph_close", "p", -1), t.parentType = l, !0;
|
|
3805
3805
|
}, nr = pn, xe = M.isSpace;
|
|
3806
3806
|
function ft(n, t, e, o) {
|
|
3807
|
-
var r, s, c,
|
|
3808
|
-
for (this.src = n, this.md = t, this.env = e, this.tokens = o, 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, this.result = "", s = this.src, f = !1, c =
|
|
3809
|
-
if (r = s.charCodeAt(
|
|
3807
|
+
var r, s, c, a, i, l, u, f;
|
|
3808
|
+
for (this.src = n, this.md = t, this.env = e, this.tokens = o, 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, this.result = "", s = this.src, f = !1, c = a = l = u = 0, i = s.length; a < i; a++) {
|
|
3809
|
+
if (r = s.charCodeAt(a), !f)
|
|
3810
3810
|
if (xe(r)) {
|
|
3811
3811
|
l++, r === 9 ? u += 4 - u % 4 : u++;
|
|
3812
3812
|
continue;
|
|
3813
3813
|
} else
|
|
3814
3814
|
f = !0;
|
|
3815
|
-
(r === 10 ||
|
|
3815
|
+
(r === 10 || a === i - 1) && (r !== 10 && a++, this.bMarks.push(c), this.eMarks.push(a), this.tShift.push(l), this.sCount.push(u), this.bsCount.push(0), f = !1, l = 0, u = 0, c = a + 1);
|
|
3816
3816
|
}
|
|
3817
3817
|
this.bMarks.push(s.length), this.eMarks.push(s.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
|
|
3818
3818
|
}
|
|
@@ -3855,20 +3855,20 @@ ft.prototype.skipCharsBack = function(t, e, o) {
|
|
|
3855
3855
|
return t;
|
|
3856
3856
|
};
|
|
3857
3857
|
ft.prototype.getLines = function(t, e, o, r) {
|
|
3858
|
-
var s, c,
|
|
3858
|
+
var s, c, a, i, l, u, f, h = t;
|
|
3859
3859
|
if (t >= e)
|
|
3860
3860
|
return "";
|
|
3861
3861
|
for (u = new Array(e - t), s = 0; h < e; h++, s++) {
|
|
3862
|
-
for (c = 0, f =
|
|
3863
|
-
if (
|
|
3864
|
-
|
|
3865
|
-
else if (
|
|
3862
|
+
for (c = 0, f = i = this.bMarks[h], h + 1 < e || r ? l = this.eMarks[h] + 1 : l = this.eMarks[h]; i < l && c < o; ) {
|
|
3863
|
+
if (a = this.src.charCodeAt(i), xe(a))
|
|
3864
|
+
a === 9 ? c += 4 - (c + this.bsCount[h]) % 4 : c++;
|
|
3865
|
+
else if (i - f < this.tShift[h])
|
|
3866
3866
|
c++;
|
|
3867
3867
|
else
|
|
3868
3868
|
break;
|
|
3869
|
-
|
|
3869
|
+
i++;
|
|
3870
3870
|
}
|
|
3871
|
-
c > o ? u[s] = new Array(c - o + 1).join(" ") + this.src.slice(
|
|
3871
|
+
c > o ? u[s] = new Array(c - o + 1).join(" ") + this.src.slice(i, l) : u[s] = this.src.slice(i, l);
|
|
3872
3872
|
}
|
|
3873
3873
|
return u.join("");
|
|
3874
3874
|
};
|
|
@@ -3894,20 +3894,20 @@ function ye() {
|
|
|
3894
3894
|
this.ruler.push(ie[n][0], ie[n][1], { alt: (ie[n][2] || []).slice() });
|
|
3895
3895
|
}
|
|
3896
3896
|
ye.prototype.tokenize = function(n, t, e) {
|
|
3897
|
-
for (var o, r, s, c = this.ruler.getRules(""),
|
|
3897
|
+
for (var o, r, s, c = this.ruler.getRules(""), a = c.length, i = t, l = !1, u = n.md.options.maxNesting; i < e && (n.line = i = n.skipEmptyLines(i), !(i >= e || n.sCount[i] < n.blkIndent)); ) {
|
|
3898
3898
|
if (n.level >= u) {
|
|
3899
3899
|
n.line = e;
|
|
3900
3900
|
break;
|
|
3901
3901
|
}
|
|
3902
|
-
for (s = n.line, r = 0; r <
|
|
3903
|
-
if (o = c[r](n,
|
|
3902
|
+
for (s = n.line, r = 0; r < a; r++)
|
|
3903
|
+
if (o = c[r](n, i, e, !1), o) {
|
|
3904
3904
|
if (s >= n.line)
|
|
3905
3905
|
throw new Error("block rule didn't increment state.line");
|
|
3906
3906
|
break;
|
|
3907
3907
|
}
|
|
3908
3908
|
if (!o)
|
|
3909
3909
|
throw new Error("none of the block rules matched");
|
|
3910
|
-
n.tight = !l, n.isEmpty(n.line - 1) && (l = !0),
|
|
3910
|
+
n.tight = !l, n.isEmpty(n.line - 1) && (l = !0), i = n.line, i < e && n.isEmpty(i) && (l = !0, i++, n.line = i);
|
|
3911
3911
|
}
|
|
3912
3912
|
};
|
|
3913
3913
|
ye.prototype.parse = function(n, t, e, o) {
|
|
@@ -3951,8 +3951,8 @@ var JN = function(t, e) {
|
|
|
3951
3951
|
o++;
|
|
3952
3952
|
return o === t.pos ? !1 : (e || (t.pending += t.src.slice(t.pos, o)), t.pos = o, !0);
|
|
3953
3953
|
}, $N = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i, tz = function(t, e) {
|
|
3954
|
-
var o, r, s, c,
|
|
3955
|
-
return !t.md.options.linkify || t.linkLevel > 0 || (o = t.pos, r = t.posMax, o + 3 > r) || t.src.charCodeAt(o) !== 58 || t.src.charCodeAt(o + 1) !== 47 || t.src.charCodeAt(o + 2) !== 47 || (s = t.pending.match($N), !s) || (c = s[1],
|
|
3954
|
+
var o, r, s, c, a, i, l, u;
|
|
3955
|
+
return !t.md.options.linkify || t.linkLevel > 0 || (o = t.pos, r = t.posMax, o + 3 > r) || t.src.charCodeAt(o) !== 58 || t.src.charCodeAt(o + 1) !== 47 || t.src.charCodeAt(o + 2) !== 47 || (s = t.pending.match($N), !s) || (c = s[1], a = t.md.linkify.matchAtStart(t.src.slice(o - c.length)), !a) || (i = a.url, i.length <= c.length) || (i = i.replace(/\*+$/, ""), l = t.md.normalizeLink(i), !t.md.validateLink(l)) ? !1 : (e || (t.pending = t.pending.slice(0, -c.length), u = t.push("link_open", "a", 1), u.attrs = [["href", l]], u.markup = "linkify", u.info = "auto", u = t.push("text", "", 0), u.content = t.md.normalizeLinkText(i), u = t.push("link_close", "a", -1), u.markup = "linkify", u.info = "auto"), t.pos += i.length - c.length, !0);
|
|
3956
3956
|
}, ez = M.isSpace, nz = function(t, e) {
|
|
3957
3957
|
var o, r, s, c = t.pos;
|
|
3958
3958
|
if (t.src.charCodeAt(c) !== 10)
|
|
@@ -3977,38 +3977,38 @@ for (var Co = 0; Co < 256; Co++)
|
|
|
3977
3977
|
hn[n.charCodeAt(0)] = 1;
|
|
3978
3978
|
});
|
|
3979
3979
|
var rz = function(t, e) {
|
|
3980
|
-
var o, r, s, c,
|
|
3981
|
-
if (t.src.charCodeAt(
|
|
3980
|
+
var o, r, s, c, a, i = t.pos, l = t.posMax;
|
|
3981
|
+
if (t.src.charCodeAt(i) !== 92 || (i++, i >= l))
|
|
3982
3982
|
return !1;
|
|
3983
|
-
if (o = t.src.charCodeAt(
|
|
3984
|
-
for (e || t.push("hardbreak", "br", 0),
|
|
3985
|
-
|
|
3986
|
-
return t.pos =
|
|
3983
|
+
if (o = t.src.charCodeAt(i), o === 10) {
|
|
3984
|
+
for (e || t.push("hardbreak", "br", 0), i++; i < l && (o = t.src.charCodeAt(i), !!oz(o)); )
|
|
3985
|
+
i++;
|
|
3986
|
+
return t.pos = i, !0;
|
|
3987
3987
|
}
|
|
3988
|
-
return c = t.src[
|
|
3988
|
+
return c = t.src[i], o >= 55296 && o <= 56319 && i + 1 < l && (r = t.src.charCodeAt(i + 1), r >= 56320 && r <= 57343 && (c += t.src[i + 1], i++)), s = "\\" + c, e || (a = t.push("text_special", "", 0), o < 256 && hn[o] !== 0 ? a.content = c : a.content = s, a.markup = s, a.info = "escape"), t.pos = i + 1, !0;
|
|
3989
3989
|
}, sz = function(t, e) {
|
|
3990
|
-
var o, r, s, c,
|
|
3990
|
+
var o, r, s, c, a, i, l, u, f = t.pos, h = t.src.charCodeAt(f);
|
|
3991
3991
|
if (h !== 96)
|
|
3992
3992
|
return !1;
|
|
3993
3993
|
for (o = f, f++, r = t.posMax; f < r && t.src.charCodeAt(f) === 96; )
|
|
3994
3994
|
f++;
|
|
3995
3995
|
if (s = t.src.slice(o, f), l = s.length, t.backticksScanned && (t.backticks[l] || 0) <= o)
|
|
3996
3996
|
return e || (t.pending += s), t.pos += l, !0;
|
|
3997
|
-
for (
|
|
3998
|
-
for (
|
|
3999
|
-
|
|
4000
|
-
if (u =
|
|
4001
|
-
return e || (c = t.push("code_inline", "code", 0), c.markup = s, c.content = t.src.slice(f,
|
|
4002
|
-
t.backticks[u] =
|
|
3997
|
+
for (i = f; (a = t.src.indexOf("`", i)) !== -1; ) {
|
|
3998
|
+
for (i = a + 1; i < r && t.src.charCodeAt(i) === 96; )
|
|
3999
|
+
i++;
|
|
4000
|
+
if (u = i - a, u === l)
|
|
4001
|
+
return e || (c = t.push("code_inline", "code", 0), c.markup = s, c.content = t.src.slice(f, a).replace(/\n/g, " ").replace(/^ (.+) $/, "$1")), t.pos = i, !0;
|
|
4002
|
+
t.backticks[u] = a;
|
|
4003
4003
|
}
|
|
4004
4004
|
return t.backticksScanned = !0, e || (t.pending += s), t.pos += l, !0;
|
|
4005
4005
|
}, Ae = {};
|
|
4006
4006
|
Ae.tokenize = function(t, e) {
|
|
4007
|
-
var o, r, s, c,
|
|
4008
|
-
if (e || l !== 126 || (r = t.scanDelims(t.pos, !0), c = r.length,
|
|
4007
|
+
var o, r, s, c, a, i = t.pos, l = t.src.charCodeAt(i);
|
|
4008
|
+
if (e || l !== 126 || (r = t.scanDelims(t.pos, !0), c = r.length, a = String.fromCharCode(l), c < 2))
|
|
4009
4009
|
return !1;
|
|
4010
|
-
for (c % 2 && (s = t.push("text", "", 0), s.content =
|
|
4011
|
-
s = t.push("text", "", 0), s.content =
|
|
4010
|
+
for (c % 2 && (s = t.push("text", "", 0), s.content = a, c--), o = 0; o < c; o += 2)
|
|
4011
|
+
s = t.push("text", "", 0), s.content = a + a, t.delimiters.push({
|
|
4012
4012
|
marker: l,
|
|
4013
4013
|
length: 0,
|
|
4014
4014
|
// disable "rule of 3" length checks meant for emphasis
|
|
@@ -4020,11 +4020,11 @@ Ae.tokenize = function(t, e) {
|
|
|
4020
4020
|
return t.pos += r.length, !0;
|
|
4021
4021
|
};
|
|
4022
4022
|
function Eo(n, t) {
|
|
4023
|
-
var e, o, r, s, c,
|
|
4024
|
-
for (e = 0; e <
|
|
4025
|
-
r = t[e], r.marker === 126 && r.end !== -1 && (s = t[r.end], c = n.tokens[r.token], c.type = "s_open", c.tag = "s", c.nesting = 1, c.markup = "~~", c.content = "", c = n.tokens[s.token], c.type = "s_close", c.tag = "s", c.nesting = -1, c.markup = "~~", c.content = "", n.tokens[s.token - 1].type === "text" && n.tokens[s.token - 1].content === "~" &&
|
|
4026
|
-
for (;
|
|
4027
|
-
for (e =
|
|
4023
|
+
var e, o, r, s, c, a = [], i = t.length;
|
|
4024
|
+
for (e = 0; e < i; e++)
|
|
4025
|
+
r = t[e], r.marker === 126 && r.end !== -1 && (s = t[r.end], c = n.tokens[r.token], c.type = "s_open", c.tag = "s", c.nesting = 1, c.markup = "~~", c.content = "", c = n.tokens[s.token], c.type = "s_close", c.tag = "s", c.nesting = -1, c.markup = "~~", c.content = "", n.tokens[s.token - 1].type === "text" && n.tokens[s.token - 1].content === "~" && a.push(s.token - 1));
|
|
4026
|
+
for (; a.length; ) {
|
|
4027
|
+
for (e = a.pop(), o = e + 1; o < n.tokens.length && n.tokens[o].type === "s_close"; )
|
|
4028
4028
|
o++;
|
|
4029
4029
|
o--, e !== o && (c = n.tokens[o], n.tokens[o] = n.tokens[e], n.tokens[e] = c);
|
|
4030
4030
|
}
|
|
@@ -4036,14 +4036,14 @@ Ae.postProcess = function(t) {
|
|
|
4036
4036
|
};
|
|
4037
4037
|
var we = {};
|
|
4038
4038
|
we.tokenize = function(t, e) {
|
|
4039
|
-
var o, r, s, c = t.pos,
|
|
4040
|
-
if (e ||
|
|
4039
|
+
var o, r, s, c = t.pos, a = t.src.charCodeAt(c);
|
|
4040
|
+
if (e || a !== 95 && a !== 42)
|
|
4041
4041
|
return !1;
|
|
4042
|
-
for (r = t.scanDelims(t.pos,
|
|
4043
|
-
s = t.push("text", "", 0), s.content = String.fromCharCode(
|
|
4042
|
+
for (r = t.scanDelims(t.pos, a === 42), o = 0; o < r.length; o++)
|
|
4043
|
+
s = t.push("text", "", 0), s.content = String.fromCharCode(a), t.delimiters.push({
|
|
4044
4044
|
// Char code of the starting marker (number).
|
|
4045
4045
|
//
|
|
4046
|
-
marker:
|
|
4046
|
+
marker: a,
|
|
4047
4047
|
// Total length of these series of delimiters.
|
|
4048
4048
|
//
|
|
4049
4049
|
length: r.length,
|
|
@@ -4063,11 +4063,11 @@ we.tokenize = function(t, e) {
|
|
|
4063
4063
|
return t.pos += r.length, !0;
|
|
4064
4064
|
};
|
|
4065
4065
|
function Do(n, t) {
|
|
4066
|
-
var e, o, r, s, c,
|
|
4067
|
-
for (e =
|
|
4068
|
-
o = t[e], !(o.marker !== 95 && o.marker !== 42) && o.end !== -1 && (r = t[o.end],
|
|
4066
|
+
var e, o, r, s, c, a, i = t.length;
|
|
4067
|
+
for (e = i - 1; e >= 0; e--)
|
|
4068
|
+
o = t[e], !(o.marker !== 95 && o.marker !== 42) && o.end !== -1 && (r = t[o.end], a = e > 0 && t[e - 1].end === o.end + 1 && // check that first two markers match and adjacent
|
|
4069
4069
|
t[e - 1].marker === o.marker && t[e - 1].token === o.token - 1 && // check that last two markers are adjacent (we can safely assume they match)
|
|
4070
|
-
t[o.end + 1].token === r.token + 1, c = String.fromCharCode(o.marker), s = n.tokens[o.token], s.type =
|
|
4070
|
+
t[o.end + 1].token === r.token + 1, c = String.fromCharCode(o.marker), s = n.tokens[o.token], s.type = a ? "strong_open" : "em_open", s.tag = a ? "strong" : "em", s.nesting = 1, s.markup = a ? c + c : c, s.content = "", s = n.tokens[r.token], s.type = a ? "strong_close" : "em_close", s.tag = a ? "strong" : "em", s.nesting = -1, s.markup = a ? c + c : c, s.content = "", a && (n.tokens[t[e - 1].token].content = "", n.tokens[t[o.end + 1].token].content = "", e--));
|
|
4071
4071
|
}
|
|
4072
4072
|
we.postProcess = function(t) {
|
|
4073
4073
|
var e, o = t.tokens_meta, r = t.tokens_meta.length;
|
|
@@ -4075,36 +4075,36 @@ we.postProcess = function(t) {
|
|
|
4075
4075
|
o[e] && o[e].delimiters && Do(t, o[e].delimiters);
|
|
4076
4076
|
};
|
|
4077
4077
|
var cz = M.normalizeReference, We = M.isSpace, iz = function(t, e) {
|
|
4078
|
-
var o, r, s, c,
|
|
4079
|
-
if (t.src.charCodeAt(t.pos) !== 91 || (
|
|
4078
|
+
var o, r, s, c, a, i, l, u, f, h = "", d = "", x = t.pos, k = t.posMax, D = t.pos, y = !0;
|
|
4079
|
+
if (t.src.charCodeAt(t.pos) !== 91 || (a = t.pos + 1, c = t.md.helpers.parseLinkLabel(t, t.pos, !0), c < 0))
|
|
4080
4080
|
return !1;
|
|
4081
|
-
if (
|
|
4082
|
-
for (y = !1,
|
|
4081
|
+
if (i = c + 1, i < k && t.src.charCodeAt(i) === 40) {
|
|
4082
|
+
for (y = !1, i++; i < k && (r = t.src.charCodeAt(i), !(!We(r) && r !== 10)); i++)
|
|
4083
4083
|
;
|
|
4084
|
-
if (
|
|
4084
|
+
if (i >= k)
|
|
4085
4085
|
return !1;
|
|
4086
|
-
if (D =
|
|
4087
|
-
for (h = t.md.normalizeLink(l.str), t.md.validateLink(h) ?
|
|
4086
|
+
if (D = i, l = t.md.helpers.parseLinkDestination(t.src, i, t.posMax), l.ok) {
|
|
4087
|
+
for (h = t.md.normalizeLink(l.str), t.md.validateLink(h) ? i = l.pos : h = "", D = i; i < k && (r = t.src.charCodeAt(i), !(!We(r) && r !== 10)); i++)
|
|
4088
4088
|
;
|
|
4089
|
-
if (l = t.md.helpers.parseLinkTitle(t.src,
|
|
4090
|
-
for (d = l.str,
|
|
4089
|
+
if (l = t.md.helpers.parseLinkTitle(t.src, i, t.posMax), i < k && D !== i && l.ok)
|
|
4090
|
+
for (d = l.str, i = l.pos; i < k && (r = t.src.charCodeAt(i), !(!We(r) && r !== 10)); i++)
|
|
4091
4091
|
;
|
|
4092
4092
|
}
|
|
4093
|
-
(
|
|
4093
|
+
(i >= k || t.src.charCodeAt(i) !== 41) && (y = !0), i++;
|
|
4094
4094
|
}
|
|
4095
4095
|
if (y) {
|
|
4096
4096
|
if (typeof t.env.references > "u")
|
|
4097
4097
|
return !1;
|
|
4098
|
-
if (
|
|
4098
|
+
if (i < k && t.src.charCodeAt(i) === 91 ? (D = i + 1, i = t.md.helpers.parseLinkLabel(t, i), i >= 0 ? s = t.src.slice(D, i++) : i = c + 1) : i = c + 1, s || (s = t.src.slice(a, c)), u = t.env.references[cz(s)], !u)
|
|
4099
4099
|
return t.pos = x, !1;
|
|
4100
4100
|
h = u.href, d = u.title;
|
|
4101
4101
|
}
|
|
4102
|
-
return e || (t.pos =
|
|
4102
|
+
return e || (t.pos = a, t.posMax = c, f = t.push("link_open", "a", 1), f.attrs = o = [["href", h]], d && o.push(["title", d]), t.linkLevel++, t.md.inline.tokenize(t), t.linkLevel--, f = t.push("link_close", "a", -1)), t.pos = i, t.posMax = k, !0;
|
|
4103
4103
|
}, az = M.normalizeReference, Xe = M.isSpace, lz = function(t, e) {
|
|
4104
|
-
var o, r, s, c,
|
|
4105
|
-
if (t.src.charCodeAt(t.pos) !== 33 || t.src.charCodeAt(t.pos + 1) !== 91 || (
|
|
4104
|
+
var o, r, s, c, a, i, l, u, f, h, d, x, k, D = "", y = t.pos, _ = t.posMax;
|
|
4105
|
+
if (t.src.charCodeAt(t.pos) !== 33 || t.src.charCodeAt(t.pos + 1) !== 91 || (i = t.pos + 2, a = t.md.helpers.parseLinkLabel(t, t.pos + 1, !1), a < 0))
|
|
4106
4106
|
return !1;
|
|
4107
|
-
if (l =
|
|
4107
|
+
if (l = a + 1, l < _ && t.src.charCodeAt(l) === 40) {
|
|
4108
4108
|
for (l++; l < _ && (r = t.src.charCodeAt(l), !(!Xe(r) && r !== 10)); l++)
|
|
4109
4109
|
;
|
|
4110
4110
|
if (l >= _)
|
|
@@ -4122,27 +4122,27 @@ var cz = M.normalizeReference, We = M.isSpace, iz = function(t, e) {
|
|
|
4122
4122
|
} else {
|
|
4123
4123
|
if (typeof t.env.references > "u")
|
|
4124
4124
|
return !1;
|
|
4125
|
-
if (l < _ && t.src.charCodeAt(l) === 91 ? (k = l + 1, l = t.md.helpers.parseLinkLabel(t, l), l >= 0 ? c = t.src.slice(k, l++) : l =
|
|
4125
|
+
if (l < _ && t.src.charCodeAt(l) === 91 ? (k = l + 1, l = t.md.helpers.parseLinkLabel(t, l), l >= 0 ? c = t.src.slice(k, l++) : l = a + 1) : l = a + 1, c || (c = t.src.slice(i, a)), u = t.env.references[az(c)], !u)
|
|
4126
4126
|
return t.pos = y, !1;
|
|
4127
4127
|
D = u.href, h = u.title;
|
|
4128
4128
|
}
|
|
4129
|
-
return e || (s = t.src.slice(
|
|
4129
|
+
return e || (s = t.src.slice(i, a), t.md.inline.parse(
|
|
4130
4130
|
s,
|
|
4131
4131
|
t.md,
|
|
4132
4132
|
t.env,
|
|
4133
4133
|
x = []
|
|
4134
4134
|
), d = t.push("image", "img", 0), d.attrs = o = [["src", D], ["alt", ""]], d.children = x, d.content = s, h && o.push(["title", h])), t.pos = l, t.posMax = _, !0;
|
|
4135
4135
|
}, uz = /^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/, pz = /^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/, fz = function(t, e) {
|
|
4136
|
-
var o, r, s, c,
|
|
4136
|
+
var o, r, s, c, a, i, l = t.pos;
|
|
4137
4137
|
if (t.src.charCodeAt(l) !== 60)
|
|
4138
4138
|
return !1;
|
|
4139
|
-
for (
|
|
4140
|
-
if (++l >=
|
|
4139
|
+
for (a = t.pos, i = t.posMax; ; ) {
|
|
4140
|
+
if (++l >= i || (c = t.src.charCodeAt(l), c === 60))
|
|
4141
4141
|
return !1;
|
|
4142
4142
|
if (c === 62)
|
|
4143
4143
|
break;
|
|
4144
4144
|
}
|
|
4145
|
-
return o = t.src.slice(
|
|
4145
|
+
return o = t.src.slice(a + 1, l), pz.test(o) ? (r = t.md.normalizeLink(o), t.md.validateLink(r) ? (e || (s = t.push("link_open", "a", 1), s.attrs = [["href", r]], s.markup = "autolink", s.info = "auto", s = t.push("text", "", 0), s.content = t.md.normalizeLinkText(o), s = t.push("link_close", "a", -1), s.markup = "autolink", s.info = "auto"), t.pos += o.length + 2, !0) : !1) : uz.test(o) ? (r = t.md.normalizeLink("mailto:" + o), t.md.validateLink(r) ? (e || (s = t.push("link_open", "a", 1), s.attrs = [["href", r]], s.markup = "autolink", s.info = "auto", s = t.push("text", "", 0), s.content = t.md.normalizeLinkText(o), s = t.push("link_close", "a", -1), s.markup = "autolink", s.info = "auto"), t.pos += o.length + 2, !0) : !1) : !1;
|
|
4146
4146
|
}, hz = ke.HTML_TAG_RE;
|
|
4147
4147
|
function dz(n) {
|
|
4148
4148
|
return /^<a[>\s]/i.test(n);
|
|
@@ -4155,28 +4155,28 @@ function gz(n) {
|
|
|
4155
4155
|
return t >= 97 && t <= 122;
|
|
4156
4156
|
}
|
|
4157
4157
|
var bz = function(t, e) {
|
|
4158
|
-
var o, r, s, c,
|
|
4159
|
-
return !t.md.options.html || (s = t.posMax, t.src.charCodeAt(
|
|
4158
|
+
var o, r, s, c, a = t.pos;
|
|
4159
|
+
return !t.md.options.html || (s = t.posMax, t.src.charCodeAt(a) !== 60 || a + 2 >= s) || (o = t.src.charCodeAt(a + 1), o !== 33 && o !== 63 && o !== 47 && !gz(o)) || (r = t.src.slice(a).match(hz), !r) ? !1 : (e || (c = t.push("html_inline", "", 0), c.content = r[0], dz(c.content) && t.linkLevel++, mz(c.content) && t.linkLevel--), t.pos += r[0].length, !0);
|
|
4160
4160
|
}, To = Yo, _z = M.has, vz = M.isValidEntityCode, So = M.fromCodePoint, kz = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, xz = /^&([a-z][a-z0-9]{1,31});/i, yz = function(t, e) {
|
|
4161
|
-
var o, r, s, c,
|
|
4162
|
-
if (t.src.charCodeAt(
|
|
4161
|
+
var o, r, s, c, a = t.pos, i = t.posMax;
|
|
4162
|
+
if (t.src.charCodeAt(a) !== 38 || a + 1 >= i)
|
|
4163
4163
|
return !1;
|
|
4164
|
-
if (o = t.src.charCodeAt(
|
|
4165
|
-
if (s = t.src.slice(
|
|
4164
|
+
if (o = t.src.charCodeAt(a + 1), o === 35) {
|
|
4165
|
+
if (s = t.src.slice(a).match(kz), s)
|
|
4166
4166
|
return e || (r = s[1][0].toLowerCase() === "x" ? parseInt(s[1].slice(1), 16) : parseInt(s[1], 10), c = t.push("text_special", "", 0), c.content = vz(r) ? So(r) : So(65533), c.markup = s[0], c.info = "entity"), t.pos += s[0].length, !0;
|
|
4167
|
-
} else if (s = t.src.slice(
|
|
4167
|
+
} else if (s = t.src.slice(a).match(xz), s && _z(To, s[1]))
|
|
4168
4168
|
return e || (c = t.push("text_special", "", 0), c.content = To[s[1]], c.markup = s[0], c.info = "entity"), t.pos += s[0].length, !0;
|
|
4169
4169
|
return !1;
|
|
4170
4170
|
};
|
|
4171
4171
|
function Lo(n) {
|
|
4172
|
-
var t, e, o, r, s, c,
|
|
4172
|
+
var t, e, o, r, s, c, a, i, l = {}, u = n.length;
|
|
4173
4173
|
if (u) {
|
|
4174
4174
|
var f = 0, h = -2, d = [];
|
|
4175
4175
|
for (t = 0; t < u; t++)
|
|
4176
4176
|
if (o = n[t], d.push(0), (n[f].marker !== o.marker || h !== o.token - 1) && (f = t), h = o.token, o.length = o.length || 0, !!o.close) {
|
|
4177
4177
|
for (l.hasOwnProperty(o.marker) || (l[o.marker] = [-1, -1, -1, -1, -1, -1]), s = l[o.marker][(o.open ? 3 : 0) + o.length % 3], e = f - d[f] - 1, c = e; e > s; e -= d[e] + 1)
|
|
4178
|
-
if (r = n[e], r.marker === o.marker && r.open && r.end < 0 && (
|
|
4179
|
-
|
|
4178
|
+
if (r = n[e], r.marker === o.marker && r.open && r.end < 0 && (a = !1, (r.close || o.open) && (r.length + o.length) % 3 === 0 && (r.length % 3 !== 0 || o.length % 3 !== 0) && (a = !0), !a)) {
|
|
4179
|
+
i = e > 0 && !n[e - 1].open ? d[e - 1] + 1 : 0, d[t] = t - e + i, d[e] = i, o.open = !1, r.end = t, r.close = !1, c = -1, h = -2;
|
|
4180
4180
|
break;
|
|
4181
4181
|
}
|
|
4182
4182
|
c !== -1 && (l[o.marker][(o.open ? 3 : 0) + (o.length || 0) % 3] = c);
|
|
@@ -4206,12 +4206,12 @@ Xt.prototype.push = function(n, t, e) {
|
|
|
4206
4206
|
return e < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), o.level = this.level, e > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], r = { delimiters: this.delimiters }), this.pendingLevel = this.level, this.tokens.push(o), this.tokens_meta.push(r), o;
|
|
4207
4207
|
};
|
|
4208
4208
|
Xt.prototype.scanDelims = function(n, t) {
|
|
4209
|
-
var e = n, o, r, s, c,
|
|
4209
|
+
var e = n, o, r, s, c, a, i, l, u, f, h = !0, d = !0, x = this.posMax, k = this.src.charCodeAt(n);
|
|
4210
4210
|
for (o = n > 0 ? this.src.charCodeAt(n - 1) : 32; e < x && this.src.charCodeAt(e) === k; )
|
|
4211
4211
|
e++;
|
|
4212
|
-
return s = e - n, r = e < x ? this.src.charCodeAt(e) : 32, l = Fo(o) || Ro(String.fromCharCode(o)), f = Fo(r) || Ro(String.fromCharCode(r)),
|
|
4212
|
+
return s = e - n, r = e < x ? this.src.charCodeAt(e) : 32, l = Fo(o) || Ro(String.fromCharCode(o)), f = Fo(r) || Ro(String.fromCharCode(r)), i = qo(o), u = qo(r), u ? h = !1 : f && (i || l || (h = !1)), i ? d = !1 : l && (u || f || (d = !1)), t ? (c = h, a = d) : (c = h && (!d || l), a = d && (!h || f)), {
|
|
4213
4213
|
can_open: c,
|
|
4214
|
-
can_close:
|
|
4214
|
+
can_close: a,
|
|
4215
4215
|
length: s
|
|
4216
4216
|
};
|
|
4217
4217
|
};
|
|
@@ -4245,9 +4245,9 @@ function Kt() {
|
|
|
4245
4245
|
this.ruler2.push(Qe[n][0], Qe[n][1]);
|
|
4246
4246
|
}
|
|
4247
4247
|
Kt.prototype.skipToken = function(n) {
|
|
4248
|
-
var t, e, o = n.pos, r = this.ruler.getRules(""), s = r.length, c = n.md.options.maxNesting,
|
|
4249
|
-
if (typeof
|
|
4250
|
-
n.pos =
|
|
4248
|
+
var t, e, o = n.pos, r = this.ruler.getRules(""), s = r.length, c = n.md.options.maxNesting, a = n.cache;
|
|
4249
|
+
if (typeof a[o] < "u") {
|
|
4250
|
+
n.pos = a[o];
|
|
4251
4251
|
return;
|
|
4252
4252
|
}
|
|
4253
4253
|
if (n.level < c) {
|
|
@@ -4259,11 +4259,11 @@ Kt.prototype.skipToken = function(n) {
|
|
|
4259
4259
|
}
|
|
4260
4260
|
} else
|
|
4261
4261
|
n.pos = n.posMax;
|
|
4262
|
-
t || n.pos++,
|
|
4262
|
+
t || n.pos++, a[o] = n.pos;
|
|
4263
4263
|
};
|
|
4264
4264
|
Kt.prototype.tokenize = function(n) {
|
|
4265
|
-
for (var t, e, o, r = this.ruler.getRules(""), s = r.length, c = n.posMax,
|
|
4266
|
-
if (o = n.pos, n.level <
|
|
4265
|
+
for (var t, e, o, r = this.ruler.getRules(""), s = r.length, c = n.posMax, a = n.md.options.maxNesting; n.pos < c; ) {
|
|
4266
|
+
if (o = n.pos, n.level < a) {
|
|
4267
4267
|
for (e = 0; e < s; e++)
|
|
4268
4268
|
if (t = r[e](n, !1), t) {
|
|
4269
4269
|
if (o >= n.pos)
|
|
@@ -4281,9 +4281,9 @@ Kt.prototype.tokenize = function(n) {
|
|
|
4281
4281
|
n.pending && n.pushPending();
|
|
4282
4282
|
};
|
|
4283
4283
|
Kt.prototype.parse = function(n, t, e, o) {
|
|
4284
|
-
var r, s, c,
|
|
4285
|
-
for (this.tokenize(
|
|
4286
|
-
s[r](
|
|
4284
|
+
var r, s, c, a = new this.State(n, t, e, o);
|
|
4285
|
+
for (this.tokenize(a), s = this.ruler2.getRules(""), c = s.length, r = 0; r < c; r++)
|
|
4286
|
+
s[r](a);
|
|
4287
4287
|
};
|
|
4288
4288
|
Kt.prototype.State = Cz;
|
|
4289
4289
|
var Ez = Kt, Je, Io;
|
|
@@ -4386,34 +4386,34 @@ function No() {
|
|
|
4386
4386
|
function me(n) {
|
|
4387
4387
|
var t = n.re = Dz()(n.__opts__), e = n.__tlds__.slice();
|
|
4388
4388
|
n.onCompile(), n.__tlds_replaced__ || e.push(Mz), e.push(t.src_xn), t.src_tlds = e.join("|");
|
|
4389
|
-
function o(
|
|
4390
|
-
return
|
|
4389
|
+
function o(a) {
|
|
4390
|
+
return a.replace("%TLDS%", t.src_tlds);
|
|
4391
4391
|
}
|
|
4392
4392
|
t.email_fuzzy = RegExp(o(t.tpl_email_fuzzy), "i"), t.link_fuzzy = RegExp(o(t.tpl_link_fuzzy), "i"), t.link_no_ip_fuzzy = RegExp(o(t.tpl_link_no_ip_fuzzy), "i"), t.host_fuzzy_test = RegExp(o(t.tpl_host_fuzzy_test), "i");
|
|
4393
4393
|
var r = [];
|
|
4394
4394
|
n.__compiled__ = {};
|
|
4395
|
-
function s(
|
|
4396
|
-
throw new Error('(LinkifyIt) Invalid schema "' +
|
|
4395
|
+
function s(a, i) {
|
|
4396
|
+
throw new Error('(LinkifyIt) Invalid schema "' + a + '": ' + i);
|
|
4397
4397
|
}
|
|
4398
|
-
Object.keys(n.__schemas__).forEach(function(
|
|
4399
|
-
var
|
|
4400
|
-
if (
|
|
4398
|
+
Object.keys(n.__schemas__).forEach(function(a) {
|
|
4399
|
+
var i = n.__schemas__[a];
|
|
4400
|
+
if (i !== null) {
|
|
4401
4401
|
var l = { validate: null, link: null };
|
|
4402
|
-
if (n.__compiled__[
|
|
4403
|
-
Lz(
|
|
4402
|
+
if (n.__compiled__[a] = l, Sz(i)) {
|
|
4403
|
+
Lz(i.validate) ? l.validate = Nz(i.validate) : Po(i.validate) ? l.validate = i.validate : s(a, i), Po(i.normalize) ? l.normalize = i.normalize : i.normalize ? s(a, i) : l.normalize = No();
|
|
4404
4404
|
return;
|
|
4405
4405
|
}
|
|
4406
|
-
if (Tz(
|
|
4407
|
-
r.push(
|
|
4406
|
+
if (Tz(i)) {
|
|
4407
|
+
r.push(a);
|
|
4408
4408
|
return;
|
|
4409
4409
|
}
|
|
4410
|
-
s(
|
|
4410
|
+
s(a, i);
|
|
4411
4411
|
}
|
|
4412
|
-
}), r.forEach(function(
|
|
4413
|
-
n.__compiled__[n.__schemas__[
|
|
4412
|
+
}), r.forEach(function(a) {
|
|
4413
|
+
n.__compiled__[n.__schemas__[a]] && (n.__compiled__[a].validate = n.__compiled__[n.__schemas__[a]].validate, n.__compiled__[a].normalize = n.__compiled__[n.__schemas__[a]].normalize);
|
|
4414
4414
|
}), n.__compiled__[""] = { validate: null, normalize: No() };
|
|
4415
|
-
var c = Object.keys(n.__compiled__).filter(function(
|
|
4416
|
-
return
|
|
4415
|
+
var c = Object.keys(n.__compiled__).filter(function(a) {
|
|
4416
|
+
return a.length > 0 && n.__compiled__[a];
|
|
4417
4417
|
}).map(qz).join("|");
|
|
4418
4418
|
n.re.schema_test = RegExp("(^|(?!_)(?:[><|]|" + t.src_ZPCc + "))(" + c + ")", "i"), n.re.schema_search = RegExp("(^|(?!_)(?:[><|]|" + t.src_ZPCc + "))(" + c + ")", "ig"), n.re.schema_at_start = RegExp("^" + n.re.schema_search.source, "i"), n.re.pretest = RegExp(
|
|
4419
4419
|
"(" + n.re.schema_test.source + ")|(" + n.re.host_fuzzy_test.source + ")|@",
|
|
@@ -4442,15 +4442,15 @@ nt.prototype.set = function(t) {
|
|
|
4442
4442
|
nt.prototype.test = function(t) {
|
|
4443
4443
|
if (this.__text_cache__ = t, this.__index__ = -1, !t.length)
|
|
4444
4444
|
return !1;
|
|
4445
|
-
var e, o, r, s, c,
|
|
4445
|
+
var e, o, r, s, c, a, i, l, u;
|
|
4446
4446
|
if (this.re.schema_test.test(t)) {
|
|
4447
|
-
for (
|
|
4448
|
-
if (s = this.testSchemaAt(t, e[2],
|
|
4447
|
+
for (i = this.re.schema_search, i.lastIndex = 0; (e = i.exec(t)) !== null; )
|
|
4448
|
+
if (s = this.testSchemaAt(t, e[2], i.lastIndex), s) {
|
|
4449
4449
|
this.__schema__ = e[2], this.__index__ = e.index + e[1].length, this.__last_index__ = e.index + e[0].length + s;
|
|
4450
4450
|
break;
|
|
4451
4451
|
}
|
|
4452
4452
|
}
|
|
4453
|
-
return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (l = t.search(this.re.host_fuzzy_test), l >= 0 && (this.__index__ < 0 || l < this.__index__) && (o = t.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (c = o.index + o[1].length, (this.__index__ < 0 || c < this.__index__) && (this.__schema__ = "", this.__index__ = c, this.__last_index__ = o.index + o[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (u = t.indexOf("@"), u >= 0 && (r = t.match(this.re.email_fuzzy)) !== null && (c = r.index + r[1].length,
|
|
4453
|
+
return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (l = t.search(this.re.host_fuzzy_test), l >= 0 && (this.__index__ < 0 || l < this.__index__) && (o = t.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (c = o.index + o[1].length, (this.__index__ < 0 || c < this.__index__) && (this.__schema__ = "", this.__index__ = c, this.__last_index__ = o.index + o[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (u = t.indexOf("@"), u >= 0 && (r = t.match(this.re.email_fuzzy)) !== null && (c = r.index + r[1].length, a = r.index + r[0].length, (this.__index__ < 0 || c < this.__index__ || c === this.__index__ && a > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = c, this.__last_index__ = a))), this.__index__ >= 0;
|
|
4454
4454
|
};
|
|
4455
4455
|
nt.prototype.pretest = function(t) {
|
|
4456
4456
|
return this.re.pretest.test(t);
|
|
@@ -4534,13 +4534,13 @@ const ar = (n) => String.fromCodePoint(...n), Yz = function(n) {
|
|
|
4534
4534
|
const t = [], e = n.length;
|
|
4535
4535
|
let o = 0, r = sr, s = rr, c = n.lastIndexOf(cr);
|
|
4536
4536
|
c < 0 && (c = 0);
|
|
4537
|
-
for (let
|
|
4538
|
-
n.charCodeAt(
|
|
4539
|
-
for (let
|
|
4540
|
-
const
|
|
4537
|
+
for (let a = 0; a < c; ++a)
|
|
4538
|
+
n.charCodeAt(a) >= 128 && bt("not-basic"), t.push(n.charCodeAt(a));
|
|
4539
|
+
for (let a = c > 0 ? c + 1 : 0; a < e; ) {
|
|
4540
|
+
const i = o;
|
|
4541
4541
|
for (let u = 1, f = lt; ; f += lt) {
|
|
4542
|
-
|
|
4543
|
-
const h = Yz(n.charCodeAt(
|
|
4542
|
+
a >= e && bt("invalid-input");
|
|
4543
|
+
const h = Yz(n.charCodeAt(a++));
|
|
4544
4544
|
h >= lt && bt("invalid-input"), h > ut((Ft - o) / u) && bt("overflow"), o += h * u;
|
|
4545
4545
|
const d = f <= s ? mn : f >= s + Yt ? Yt : f - s;
|
|
4546
4546
|
if (h < d)
|
|
@@ -4549,7 +4549,7 @@ const ar = (n) => String.fromCodePoint(...n), Yz = function(n) {
|
|
|
4549
4549
|
u > ut(Ft / x) && bt("overflow"), u *= x;
|
|
4550
4550
|
}
|
|
4551
4551
|
const l = t.length + 1;
|
|
4552
|
-
s = lr(o -
|
|
4552
|
+
s = lr(o - i, l, i == 0), ut(o / l) > Ft - r && bt("overflow"), r += ut(o / l), o %= l, t.splice(o++, 0, r);
|
|
4553
4553
|
}
|
|
4554
4554
|
return String.fromCodePoint(...t);
|
|
4555
4555
|
}, _n = function(n) {
|
|
@@ -4557,16 +4557,16 @@ const ar = (n) => String.fromCodePoint(...n), Yz = function(n) {
|
|
|
4557
4557
|
n = gn(n);
|
|
4558
4558
|
const e = n.length;
|
|
4559
4559
|
let o = sr, r = 0, s = rr;
|
|
4560
|
-
for (const
|
|
4561
|
-
|
|
4560
|
+
for (const i of n)
|
|
4561
|
+
i < 128 && t.push(tn(i));
|
|
4562
4562
|
const c = t.length;
|
|
4563
|
-
let
|
|
4564
|
-
for (c && t.push(cr);
|
|
4565
|
-
let
|
|
4563
|
+
let a = c;
|
|
4564
|
+
for (c && t.push(cr); a < e; ) {
|
|
4565
|
+
let i = Ft;
|
|
4566
4566
|
for (const u of n)
|
|
4567
|
-
u >= o && u <
|
|
4568
|
-
const l =
|
|
4569
|
-
|
|
4567
|
+
u >= o && u < i && (i = u);
|
|
4568
|
+
const l = a + 1;
|
|
4569
|
+
i - o > ut((Ft - r) / l) && bt("overflow"), r += (i - o) * l, o = i;
|
|
4570
4570
|
for (const u of n)
|
|
4571
4571
|
if (u < o && ++r > Ft && bt("overflow"), u === o) {
|
|
4572
4572
|
let f = r;
|
|
@@ -4579,7 +4579,7 @@ const ar = (n) => String.fromCodePoint(...n), Yz = function(n) {
|
|
|
4579
4579
|
tn(zo(d + x % k, 0))
|
|
4580
4580
|
), f = ut(x / k);
|
|
4581
4581
|
}
|
|
4582
|
-
t.push(tn(zo(f, 0))), s = lr(r, l,
|
|
4582
|
+
t.push(tn(zo(f, 0))), s = lr(r, l, a === c), r = 0, ++a;
|
|
4583
4583
|
}
|
|
4584
4584
|
++r, ++o;
|
|
4585
4585
|
}
|
|
@@ -4994,7 +4994,7 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
4994
4994
|
},
|
|
4995
4995
|
emits: ["update:value", "enter", "choose-prompt"],
|
|
4996
4996
|
setup(n, { emit: t }) {
|
|
4997
|
-
const e = n, o = t, r = wr, s = an, c = Rt(""),
|
|
4997
|
+
const e = n, o = t, r = wr, s = an, c = Rt(""), a = Rt(40), i = Rt(), l = Rt(!1), u = le(() => {
|
|
4998
4998
|
var g;
|
|
4999
4999
|
return ((g = e.prompts) == null ? void 0 : g.filter((C) => C.content.includes(c.value))) || [];
|
|
5000
5000
|
}), f = (g) => {
|
|
@@ -5004,14 +5004,14 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5004
5004
|
e.value === "/" && ((g = e.prompts) != null && g.length) ? y() : _();
|
|
5005
5005
|
}, d = () => {
|
|
5006
5006
|
let C = 24 + e.value.split(/\r?\n/).length * 16;
|
|
5007
|
-
C >= 200 && (C = 200),
|
|
5007
|
+
C >= 200 && (C = 200), a.value = C;
|
|
5008
5008
|
}, x = (g) => {
|
|
5009
5009
|
o("update:value", g.content), o("choose-prompt", g), _(), D();
|
|
5010
5010
|
}, k = (g, C) => {
|
|
5011
5011
|
C.key === "Enter" && !C.shiftKey && (C.preventDefault(), o("enter"));
|
|
5012
5012
|
}, D = () => {
|
|
5013
5013
|
var C;
|
|
5014
|
-
const g = (C =
|
|
5014
|
+
const g = (C = i.value) == null ? void 0 : C.$el.querySelector("textarea");
|
|
5015
5015
|
g == null || g.focus();
|
|
5016
5016
|
}, y = () => {
|
|
5017
5017
|
l.value = !0;
|
|
@@ -5097,13 +5097,13 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5097
5097
|
style: he({
|
|
5098
5098
|
width: "calc(100% - 84px)",
|
|
5099
5099
|
"margin-right": "7px",
|
|
5100
|
-
"--text-height":
|
|
5100
|
+
"--text-height": a.value + "px"
|
|
5101
5101
|
})
|
|
5102
5102
|
},
|
|
5103
5103
|
[
|
|
5104
5104
|
Zt(B(Yn), {
|
|
5105
5105
|
ref_key: "inputRef",
|
|
5106
|
-
ref:
|
|
5106
|
+
ref: i,
|
|
5107
5107
|
class: "send-prompt",
|
|
5108
5108
|
clearable: !0,
|
|
5109
5109
|
"model-value": g.value,
|
|
@@ -5129,13 +5129,13 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5129
5129
|
for (const [o, r] of t)
|
|
5130
5130
|
e[o] = r;
|
|
5131
5131
|
return e;
|
|
5132
|
-
}, F9 = /* @__PURE__ */ vn(R9, [["__scopeId", "data-v-f2501723"]]), M9 = (n) => (Sr("data-v-
|
|
5132
|
+
}, F9 = /* @__PURE__ */ vn(R9, [["__scopeId", "data-v-f2501723"]]), M9 = (n) => (Sr("data-v-d241dc35"), n = n(), Lr(), n), I9 = { class: "ai-operation" }, P9 = /* @__PURE__ */ M9(() => /* @__PURE__ */ I(
|
|
5133
5133
|
"i",
|
|
5134
5134
|
{ class: "ai-blueking-icon ai-blueking-fasong" },
|
|
5135
5135
|
null,
|
|
5136
5136
|
-1
|
|
5137
5137
|
/* HOISTED */
|
|
5138
|
-
)),
|
|
5138
|
+
)), N9 = /* @__PURE__ */ Wt({
|
|
5139
5139
|
__name: "render-content",
|
|
5140
5140
|
props: {
|
|
5141
5141
|
messages: {},
|
|
@@ -5144,60 +5144,72 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5144
5144
|
background: { default: "#f5f7fa" },
|
|
5145
5145
|
userPhoto: {}
|
|
5146
5146
|
},
|
|
5147
|
-
emits: ["send", "choose-prompt"],
|
|
5147
|
+
emits: ["send", "choose-prompt", "scroll"],
|
|
5148
5148
|
setup(n, { emit: t }) {
|
|
5149
5149
|
const e = n, o = t, r = an, s = Rt(""), c = () => {
|
|
5150
5150
|
Tr(() => {
|
|
5151
|
-
const
|
|
5152
|
-
|
|
5151
|
+
const u = document.querySelector(".ai-messages");
|
|
5152
|
+
u.scrollTop = u.scrollHeight;
|
|
5153
5153
|
});
|
|
5154
|
-
},
|
|
5154
|
+
}, a = () => {
|
|
5155
5155
|
e.loading || (o("send", s.value), s.value = "");
|
|
5156
|
-
},
|
|
5157
|
-
o("choose-prompt",
|
|
5156
|
+
}, i = (u) => {
|
|
5157
|
+
o("choose-prompt", u);
|
|
5158
|
+
}, l = (u) => {
|
|
5159
|
+
o("scroll", u);
|
|
5158
5160
|
};
|
|
5159
5161
|
return Oo(() => e.messages, c, {
|
|
5160
|
-
deep: !0
|
|
5161
|
-
|
|
5162
|
+
deep: !0,
|
|
5163
|
+
immediate: !0
|
|
5164
|
+
}), (u, f) => (U(), X(
|
|
5162
5165
|
"section",
|
|
5163
5166
|
{
|
|
5164
5167
|
style: he({
|
|
5165
|
-
background:
|
|
5168
|
+
background: u.background
|
|
5166
5169
|
}),
|
|
5167
5170
|
class: "ai-content"
|
|
5168
5171
|
},
|
|
5169
5172
|
[
|
|
5170
|
-
I(
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5173
|
+
I(
|
|
5174
|
+
"ul",
|
|
5175
|
+
{
|
|
5176
|
+
class: "ai-messages",
|
|
5177
|
+
onScroll: l
|
|
5178
|
+
},
|
|
5179
|
+
[
|
|
5180
|
+
(U(!0), X(
|
|
5181
|
+
ue,
|
|
5182
|
+
null,
|
|
5183
|
+
Bo(u.messages, (h) => (U(), pe(D9, {
|
|
5184
|
+
class: "ai-message",
|
|
5185
|
+
key: h.content,
|
|
5186
|
+
message: h,
|
|
5187
|
+
"user-photo": u.userPhoto
|
|
5188
|
+
}, null, 8, ["message", "user-photo"]))),
|
|
5189
|
+
128
|
|
5190
|
+
/* KEYED_FRAGMENT */
|
|
5191
|
+
))
|
|
5192
|
+
],
|
|
5193
|
+
32
|
|
5194
|
+
/* NEED_HYDRATION */
|
|
5195
|
+
),
|
|
5196
|
+
xt((U(), X("section", I9, [
|
|
5185
5197
|
Zt(F9, {
|
|
5186
5198
|
value: s.value,
|
|
5187
|
-
"onUpdate:value":
|
|
5188
|
-
prompts:
|
|
5189
|
-
onChoosePrompt:
|
|
5190
|
-
onEnter:
|
|
5199
|
+
"onUpdate:value": f[0] || (f[0] = (h) => s.value = h),
|
|
5200
|
+
prompts: u.prompts,
|
|
5201
|
+
onChoosePrompt: i,
|
|
5202
|
+
onEnter: a
|
|
5191
5203
|
}, null, 8, ["value", "prompts"]),
|
|
5192
5204
|
Zt(B(Cr), {
|
|
5193
5205
|
class: "ai-operation-button",
|
|
5194
|
-
disabled:
|
|
5206
|
+
disabled: u.loading || !s.value,
|
|
5195
5207
|
size: "large",
|
|
5196
5208
|
theme: "primary",
|
|
5197
|
-
onClick:
|
|
5209
|
+
onClick: a
|
|
5198
5210
|
}, {
|
|
5199
5211
|
default: fe(() => [
|
|
5200
|
-
|
|
5212
|
+
P9,
|
|
5201
5213
|
Uo(
|
|
5202
5214
|
" " + ge(B(gt)("发送")),
|
|
5203
5215
|
1
|
|
@@ -5210,7 +5222,7 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5210
5222
|
])), [
|
|
5211
5223
|
[B(r), {
|
|
5212
5224
|
content: B(gt)("内容正在执行中,请执行完成后再输入"),
|
|
5213
|
-
disabled: !
|
|
5225
|
+
disabled: !u.loading,
|
|
5214
5226
|
extCls: "ai-tooltips ai-blueking-popover ai-blueking-pop2-content"
|
|
5215
5227
|
}]
|
|
5216
5228
|
])
|
|
@@ -5219,7 +5231,7 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5219
5231
|
/* STYLE */
|
|
5220
5232
|
));
|
|
5221
5233
|
}
|
|
5222
|
-
}),
|
|
5234
|
+
}), z9 = /* @__PURE__ */ vn(N9, [["__scopeId", "data-v-d241dc35"]]), O9 = /* @__PURE__ */ Wt({
|
|
5223
5235
|
__name: "render-modal",
|
|
5224
5236
|
props: {
|
|
5225
5237
|
headBackground: { default: "linear-gradient(267deg, #2dd1f4 0%, #1482ff 95%)" },
|
|
@@ -5251,7 +5263,7 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5251
5263
|
type: "",
|
|
5252
5264
|
clientX: 0,
|
|
5253
5265
|
clientY: 0
|
|
5254
|
-
},
|
|
5266
|
+
}, a = () => {
|
|
5255
5267
|
var P, b, q, A;
|
|
5256
5268
|
const E = (j, wt) => j === void 0 ? wt : j;
|
|
5257
5269
|
return {
|
|
@@ -5260,7 +5272,7 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5260
5272
|
left: E((q = e.startPosition) == null ? void 0 : q.left, 0),
|
|
5261
5273
|
right: E((A = e.startPosition) == null ? void 0 : A.right, s.width - e.sizeLimit.width)
|
|
5262
5274
|
};
|
|
5263
|
-
},
|
|
5275
|
+
}, i = Rt(a()), l = le(() => i.value.top <= e.positionLimit.top && i.value.bottom <= e.positionLimit.bottom), u = (E) => {
|
|
5264
5276
|
c.isMove = !0, c.type = "move", c.clientX = E.clientX, c.clientY = E.clientY;
|
|
5265
5277
|
}, f = (E) => {
|
|
5266
5278
|
c.isMove = !0, c.type = "rightDrag", c.clientX = E.clientX;
|
|
@@ -5281,10 +5293,10 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5281
5293
|
}, g = () => {
|
|
5282
5294
|
c.isMove = !1;
|
|
5283
5295
|
}, C = (E, P) => {
|
|
5284
|
-
["move", "leftDrag"].includes(c.type) && (
|
|
5296
|
+
["move", "leftDrag"].includes(c.type) && (i.value.left += E), ["move", "rightDrag"].includes(c.type) && (i.value.right -= E), ["move", "topDrag"].includes(c.type) && (i.value.top += P), ["move", "bottomDrag"].includes(c.type) && (i.value.bottom -= P), ["topLeftDrag"].includes(c.type) && (i.value.left += E, i.value.top += P), ["topRightDrag"].includes(c.type) && (i.value.right -= E, i.value.top += P), ["bottomLeftDrag"].includes(c.type) && (i.value.left += E, i.value.bottom -= P), ["bottomRightDrag"].includes(c.type) && (i.value.right -= E, i.value.bottom -= P);
|
|
5285
5297
|
}, S = (E, P) => {
|
|
5286
|
-
const { top: b, bottom: q, left: A, right: j } =
|
|
5287
|
-
(s.width - A - j < e.sizeLimit.width || A < e.positionLimit.left || j < e.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(c.type) && (
|
|
5298
|
+
const { top: b, bottom: q, left: A, right: j } = i.value;
|
|
5299
|
+
(s.width - A - j < e.sizeLimit.width || A < e.positionLimit.left || j < e.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(c.type) && (i.value.left -= E), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(c.type) && (i.value.right += E)), (s.height - b - q < e.sizeLimit.height || b < e.positionLimit.top || q < e.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(c.type) && (i.value.top -= P), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(c.type) && (i.value.bottom += P));
|
|
5288
5300
|
}, v = (E) => {
|
|
5289
5301
|
if (!c.isMove)
|
|
5290
5302
|
return;
|
|
@@ -5292,11 +5304,11 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5292
5304
|
const P = E.clientX - c.clientX, b = E.clientY - c.clientY;
|
|
5293
5305
|
C(P, b), S(P, b), c.clientX = E.clientX, c.clientY = E.clientY;
|
|
5294
5306
|
}, F = () => {
|
|
5295
|
-
s.height = window.innerHeight, s.width = window.innerWidth,
|
|
5307
|
+
s.height = window.innerHeight, s.width = window.innerWidth, i.value = a();
|
|
5296
5308
|
}, z = () => {
|
|
5297
|
-
|
|
5309
|
+
i.value.top = e.positionLimit.top, i.value.bottom = e.positionLimit.bottom;
|
|
5298
5310
|
}, tt = () => {
|
|
5299
|
-
|
|
5311
|
+
i.value.top = s.height - e.sizeLimit.height, i.value.bottom = e.positionLimit.bottom;
|
|
5300
5312
|
}, L = () => {
|
|
5301
5313
|
o("clear");
|
|
5302
5314
|
}, Y = () => {
|
|
@@ -5310,10 +5322,10 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5310
5322
|
"section",
|
|
5311
5323
|
{
|
|
5312
5324
|
style: he({
|
|
5313
|
-
top:
|
|
5314
|
-
bottom:
|
|
5315
|
-
left:
|
|
5316
|
-
right:
|
|
5325
|
+
top: i.value.top + "px",
|
|
5326
|
+
bottom: i.value.bottom + "px",
|
|
5327
|
+
left: i.value.left + "px",
|
|
5328
|
+
right: i.value.right + "px"
|
|
5317
5329
|
}),
|
|
5318
5330
|
class: "ai-modal"
|
|
5319
5331
|
},
|
|
@@ -5501,7 +5513,7 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5501
5513
|
/* STYLE */
|
|
5502
5514
|
));
|
|
5503
5515
|
}
|
|
5504
|
-
}),
|
|
5516
|
+
}), B9 = /* @__PURE__ */ vn(O9, [["__scopeId", "data-v-de00de78"]]), H9 = /* @__PURE__ */ Wt({
|
|
5505
5517
|
__name: "ai-blueking",
|
|
5506
5518
|
props: {
|
|
5507
5519
|
messages: {},
|
|
@@ -5515,7 +5527,7 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5515
5527
|
userPhoto: {},
|
|
5516
5528
|
logo: {}
|
|
5517
5529
|
},
|
|
5518
|
-
emits: ["clear", "close", "send", "choose-prompt"],
|
|
5530
|
+
emits: ["clear", "close", "send", "choose-prompt", "scroll"],
|
|
5519
5531
|
setup(n, { emit: t }) {
|
|
5520
5532
|
const e = t, o = () => {
|
|
5521
5533
|
e("clear");
|
|
@@ -5525,8 +5537,10 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5525
5537
|
e("send", i);
|
|
5526
5538
|
}, c = (i) => {
|
|
5527
5539
|
e("choose-prompt", i);
|
|
5540
|
+
}, a = (i) => {
|
|
5541
|
+
e("scroll", i);
|
|
5528
5542
|
};
|
|
5529
|
-
return (i,
|
|
5543
|
+
return (i, l) => (U(), pe(B9, {
|
|
5530
5544
|
"head-background": i.headBackground,
|
|
5531
5545
|
logo: i.logo,
|
|
5532
5546
|
"position-limit": i.positionLimit,
|
|
@@ -5536,13 +5550,14 @@ const d9 = /* @__PURE__ */ os(h9), m9 = "data:image/png;base64,iVBORw0KGgoAAAANS
|
|
|
5536
5550
|
onClose: r
|
|
5537
5551
|
}, {
|
|
5538
5552
|
default: fe(() => [
|
|
5539
|
-
Zt(
|
|
5553
|
+
Zt(z9, {
|
|
5540
5554
|
background: i.background,
|
|
5541
5555
|
loading: i.loading,
|
|
5542
5556
|
messages: i.messages,
|
|
5543
5557
|
prompts: i.prompts,
|
|
5544
5558
|
"user-photo": i.userPhoto,
|
|
5545
5559
|
onChoosePrompt: c,
|
|
5560
|
+
onScroll: a,
|
|
5546
5561
|
onSend: s
|
|
5547
5562
|
}, null, 8, ["background", "loading", "messages", "prompts", "user-photo"])
|
|
5548
5563
|
]),
|
|
@@ -5561,5 +5576,5 @@ Er({
|
|
|
5561
5576
|
prefix: "bk"
|
|
5562
5577
|
});
|
|
5563
5578
|
export {
|
|
5564
|
-
|
|
5579
|
+
H9 as default
|
|
5565
5580
|
};
|