PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/blocks/index.js +1030 -932 24.0.0 → trunk View file →
@@ -574,56 +574,56 @@
574 574 // node_modules/fast-deep-equal/es6/index.js
575 575 var require_es6 = __commonJS({
576 576 "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
577 577 "use strict";
578 - module.exports = function equal(a2, b3) {
579 - if (a2 === b3) return true;
580 - if (a2 && b3 && typeof a2 == "object" && typeof b3 == "object") {
581 - if (a2.constructor !== b3.constructor) return false;
582 - var length, i2, keys;
583 - if (Array.isArray(a2)) {
584 - length = a2.length;
585 - if (length != b3.length) return false;
586 - for (i2 = length; i2-- !== 0; )
587 - if (!equal(a2[i2], b3[i2])) return false;
578 + module.exports = function equal(a, b2) {
579 + if (a === b2) return true;
580 + if (a && b2 && typeof a == "object" && typeof b2 == "object") {
581 + if (a.constructor !== b2.constructor) return false;
582 + var length, i, keys;
583 + if (Array.isArray(a)) {
584 + length = a.length;
585 + if (length != b2.length) return false;
586 + for (i = length; i-- !== 0; )
587 + if (!equal(a[i], b2[i])) return false;
588 588 return true;
589 589 }
590 - if (a2 instanceof Map && b3 instanceof Map) {
591 - if (a2.size !== b3.size) return false;
592 - for (i2 of a2.entries())
593 - if (!b3.has(i2[0])) return false;
594 - for (i2 of a2.entries())
595 - if (!equal(i2[1], b3.get(i2[0]))) return false;
590 + if (a instanceof Map && b2 instanceof Map) {
591 + if (a.size !== b2.size) return false;
592 + for (i of a.entries())
593 + if (!b2.has(i[0])) return false;
594 + for (i of a.entries())
595 + if (!equal(i[1], b2.get(i[0]))) return false;
596 596 return true;
597 597 }
598 - if (a2 instanceof Set && b3 instanceof Set) {
599 - if (a2.size !== b3.size) return false;
600 - for (i2 of a2.entries())
601 - if (!b3.has(i2[0])) return false;
598 + if (a instanceof Set && b2 instanceof Set) {
599 + if (a.size !== b2.size) return false;
600 + for (i of a.entries())
601 + if (!b2.has(i[0])) return false;
602 602 return true;
603 603 }
604 - if (ArrayBuffer.isView(a2) && ArrayBuffer.isView(b3)) {
605 - length = a2.length;
606 - if (length != b3.length) return false;
607 - for (i2 = length; i2-- !== 0; )
608 - if (a2[i2] !== b3[i2]) return false;
604 + if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b2)) {
605 + length = a.length;
606 + if (length != b2.length) return false;
607 + for (i = length; i-- !== 0; )
608 + if (a[i] !== b2[i]) return false;
609 609 return true;
610 610 }
611 - if (a2.constructor === RegExp) return a2.source === b3.source && a2.flags === b3.flags;
612 - if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b3.valueOf();
613 - if (a2.toString !== Object.prototype.toString) return a2.toString() === b3.toString();
614 - keys = Object.keys(a2);
611 + if (a.constructor === RegExp) return a.source === b2.source && a.flags === b2.flags;
612 + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b2.valueOf();
613 + if (a.toString !== Object.prototype.toString) return a.toString() === b2.toString();
614 + keys = Object.keys(a);
615 615 length = keys.length;
616 - if (length !== Object.keys(b3).length) return false;
617 - for (i2 = length; i2-- !== 0; )
618 - if (!Object.prototype.hasOwnProperty.call(b3, keys[i2])) return false;
619 - for (i2 = length; i2-- !== 0; ) {
620 - var key = keys[i2];
621 - if (!equal(a2[key], b3[key])) return false;
616 + if (length !== Object.keys(b2).length) return false;
617 + for (i = length; i-- !== 0; )
618 + if (!Object.prototype.hasOwnProperty.call(b2, keys[i])) return false;
619 + for (i = length; i-- !== 0; ) {
620 + var key = keys[i];
621 + if (!equal(a[key], b2[key])) return false;
622 622 }
623 623 return true;
624 624 }
625 - return a2 !== a2 && b3 !== b3;
625 + return a !== a && b2 !== b2;
626 626 };
627 627 }
628 628 });
629 629
@@ -967,14 +967,14 @@
967 967 var import_data5 = __toESM(require_data(), 1);
968 968
969 969 // node_modules/tslib/tslib.es6.mjs
970 970 var __assign = function() {
971 - __assign = Object.assign || function __assign2(t3) {
972 - for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
973 - s2 = arguments[i2];
974 - for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2)) t3[p2] = s2[p2];
971 + __assign = Object.assign || function __assign2(t2) {
972 + for (var s, i = 1, n = arguments.length; i < n; i++) {
973 + s = arguments[i];
974 + for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t2[p2] = s[p2];
975 975 }
976 - return t3;
976 + return t2;
977 977 };
978 978 return __assign.apply(this, arguments);
979 979 };
980 980
@@ -999,13 +999,13 @@
999 999 while (result.charAt(end - 1) === "\0")
1000 1000 end--;
1001 1001 return result.slice(start, end).split("\0").map(transform).join(delimiter);
1002 1002 }
1003 - function replace(input, re2, value) {
1004 - if (re2 instanceof RegExp)
1005 - return input.replace(re2, value);
1006 - return re2.reduce(function(input2, re3) {
1007 - return input2.replace(re3, value);
1003 + function replace(input, re, value) {
1004 + if (re instanceof RegExp)
1005 + return input.replace(re, value);
1006 + return re.reduce(function(input2, re2) {
1007 + return input2.replace(re2, value);
1008 1008 }, input);
1009 1009 }
1010 1010
1011 1011 // node_modules/pascal-case/dist.es2015/index.js
@@ -1041,217 +1041,230 @@
1041 1041 var import_data2 = __toESM(require_data(), 1);
1042 1042 var import_i18n3 = __toESM(require_i18n(), 1);
1043 1043
1044 1044 // node_modules/colord/index.mjs
1045 - var r = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
1046 - var t = function(r2) {
1047 - return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
1045 + for (r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t2 = function(r3) {
1046 + return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3;
1047 + }, n = function(r3, t3, n2) {
1048 + return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = Math.pow(10, t3)), Math.round(n2 * r3) / n2 + 0;
1049 + }, u = function(r3, t3, n2) {
1050 + return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t3 ? r3 : t3;
1051 + }, e2 = function(r3) {
1052 + return (r3 = isFinite(r3) ? r3 % 360 : 0) < 0 ? r3 + 360 : r3;
1053 + }, o2 = function(r3, t3) {
1054 + return void 0 === t3 && (t3 = 0), n(r3, t3) % 360;
1055 + }, a = function(r3) {
1056 + return { r: u(r3.r, 0, 255), g: u(r3.g, 0, 255), b: u(r3.b, 0, 255), a: u(r3.a) };
1057 + }, i = function(r3) {
1058 + return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) };
1059 + }, s = /^#([0-9a-f]{3,8})$/i, d2 = function(r3, t3) {
1060 + var n2 = r3.charCodeAt(t3);
1061 + return (15 & n2) + 9 * (n2 >> 6);
1062 + }, h = function(r3, t3) {
1063 + return d2(r3, t3) << 4 | d2(r3, t3 + 1);
1064 + }, b2 = [], f2 = 0; f2 < 256; f2++) b2.push((f2 < 16 ? "0" : "") + f2.toString(16));
1065 + var r2;
1066 + var t2;
1067 + var n;
1068 + var u;
1069 + var e2;
1070 + var o2;
1071 + var a;
1072 + var i;
1073 + var s;
1074 + var d2;
1075 + var h;
1076 + var b2;
1077 + var f2;
1078 + var g = function(r2) {
1079 + return b2[u(r2, 0, 255)];
1048 1080 };
1049 - var n = function(r2, t3, n2) {
1050 - return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = Math.pow(10, t3)), Math.round(n2 * r2) / n2 + 0;
1081 + var c = function(r2) {
1082 + var t2 = r2.r, n = r2.g, u = r2.b, e2 = r2.a, o2 = Math.max(t2, n, u), a = o2 - Math.min(t2, n, u), i = a ? o2 === t2 ? (n - u) / a : o2 === n ? 2 + (u - t2) / a : 4 + (t2 - n) / a : 0;
1083 + return { h: 60 * (i < 0 ? i + 6 : i), s: o2 ? a / o2 * 100 : 0, v: o2 / 255 * 100, a: e2 };
1051 1084 };
1052 - var e = function(r2, t3, n2) {
1053 - return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t3 ? r2 : t3;
1085 + var v = function(r2) {
1086 + var t2 = r2.h, n = r2.s, u = r2.v, e2 = r2.a;
1087 + t2 = t2 / 360 * 6, n /= 100, u /= 100;
1088 + var o2 = Math.floor(t2), a = u * (1 - n), i = u * (1 - (t2 - o2) * n), s = u * (1 - (1 - t2 + o2) * n), d2 = o2 % 6;
1089 + return { r: 255 * [u, i, a, a, s, u][d2], g: 255 * [s, u, u, i, a, a][d2], b: 255 * [a, a, s, u, u, i][d2], a: e2 };
1054 1090 };
1055 - var u = function(r2) {
1056 - return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
1091 + var l = function(r2) {
1092 + return { h: e2(r2.h), s: u(r2.s, 0, 100), l: u(r2.l, 0, 100), a: u(r2.a) };
1057 1093 };
1058 - var a = function(r2) {
1059 - return { r: e(r2.r, 0, 255), g: e(r2.g, 0, 255), b: e(r2.b, 0, 255), a: e(r2.a) };
1094 + var p = function(r2) {
1095 + return { h: o2(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
1060 1096 };
1061 - var o = function(r2) {
1062 - return { r: n(r2.r), g: n(r2.g), b: n(r2.b), a: n(r2.a, 3) };
1097 + var m = function(r2) {
1098 + return v((n = (t2 = r2).s, { h: t2.h, s: (n *= ((u = t2.l) < 50 ? u : 100 - u) / 100) > 0 ? 2 * n / (u + n) * 100 : 0, v: u + n, a: t2.a }));
1099 + var t2, n, u;
1063 1100 };
1064 - var i = /^#([0-9a-f]{3,8})$/i;
1065 - var s = function(r2) {
1066 - var t3 = r2.toString(16);
1067 - return t3.length < 2 ? "0" + t3 : t3;
1101 + var y = function(r2) {
1102 + return { h: (t2 = c(r2)).h, s: (e2 = (200 - (n = t2.s)) * (u = t2.v) / 100) > 0 && e2 < 200 ? n * u / 100 / (e2 <= 100 ? e2 : 200 - e2) * 100 : 0, l: e2 / 2, a: t2.a };
1103 + var t2, n, u, e2;
1068 1104 };
1069 - var h = function(r2) {
1070 - var t3 = r2.r, n2 = r2.g, e2 = r2.b, u2 = r2.a, a2 = Math.max(t3, n2, e2), o3 = a2 - Math.min(t3, n2, e2), i2 = o3 ? a2 === t3 ? (n2 - e2) / o3 : a2 === n2 ? 2 + (e2 - t3) / o3 : 4 + (t3 - n2) / o3 : 0;
1071 - return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o3 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
1072 - };
1073 - var b = function(r2) {
1074 - var t3 = r2.h, n2 = r2.s, e2 = r2.v, u2 = r2.a;
1075 - t3 = t3 / 360 * 6, n2 /= 100, e2 /= 100;
1076 - var a2 = Math.floor(t3), o3 = e2 * (1 - n2), i2 = e2 * (1 - (t3 - a2) * n2), s2 = e2 * (1 - (1 - t3 + a2) * n2), h2 = a2 % 6;
1077 - return { r: 255 * [e2, i2, o3, o3, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o3, o3][h2], b: 255 * [o3, o3, s2, e2, e2, i2][h2], a: u2 };
1078 - };
1079 - var g = function(r2) {
1080 - return { h: u(r2.h), s: e(r2.s, 0, 100), l: e(r2.l, 0, 100), a: e(r2.a) };
1081 - };
1082 - var d = function(r2) {
1083 - return { h: n(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
1084 - };
1085 - var f = function(r2) {
1086 - return b((n2 = (t3 = r2).s, { h: t3.h, s: (n2 *= ((e2 = t3.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t3.a }));
1087 - var t3, n2, e2;
1088 - };
1089 - var c = function(r2) {
1090 - return { h: (t3 = h(r2)).h, s: (u2 = (200 - (n2 = t3.s)) * (e2 = t3.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t3.a };
1091 - var t3, n2, e2, u2;
1092 - };
1093 - var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
1094 - var p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
1095 - var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
1096 - var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
1097 - var y = { string: [[function(r2) {
1098 - var t3 = i.exec(r2);
1099 - return t3 ? (r2 = t3[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
1105 + var N = /^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
1106 + var x = /^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s+([+-]?(?:\d*\.\d+|\d+))%\s+([+-]?(?:\d*\.\d+|\d+))%\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
1107 + var M = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
1108 + var H = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
1109 + var $ = { string: [[function(r2) {
1110 + if (!s.test(r2)) return null;
1111 + var t2 = r2.length;
1112 + return t2 <= 5 ? { r: 17 * d2(r2, 1), g: 17 * d2(r2, 2), b: 17 * d2(r2, 3), a: 5 === t2 ? n(17 * d2(r2, 4) / 255, 2) : 1 } : 7 === t2 || 9 === t2 ? { r: h(r2, 1), g: h(r2, 3), b: h(r2, 5), a: 9 === t2 ? n(h(r2, 7) / 255, 2) : 1 } : null;
1100 1113 }, "hex"], [function(r2) {
1101 - var t3 = v.exec(r2) || m.exec(r2);
1102 - return t3 ? t3[2] !== t3[4] || t3[4] !== t3[6] ? null : a({ r: Number(t3[1]) / (t3[2] ? 100 / 255 : 1), g: Number(t3[3]) / (t3[4] ? 100 / 255 : 1), b: Number(t3[5]) / (t3[6] ? 100 / 255 : 1), a: void 0 === t3[7] ? 1 : Number(t3[7]) / (t3[8] ? 100 : 1) }) : null;
1103 - }, "rgb"], [function(t3) {
1104 - var n2 = l.exec(t3) || p.exec(t3);
1105 - if (!n2) return null;
1106 - var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
1107 - return f(a2);
1114 + var t2 = M.exec(r2) || H.exec(r2);
1115 + return t2 ? t2[2] !== t2[4] || t2[4] !== t2[6] ? null : a({ r: Number(t2[1]) / (t2[2] ? 100 / 255 : 1), g: Number(t2[3]) / (t2[4] ? 100 / 255 : 1), b: Number(t2[5]) / (t2[6] ? 100 / 255 : 1), a: void 0 === t2[7] ? 1 : Number(t2[7]) / (t2[8] ? 100 : 1) }) : null;
1116 + }, "rgb"], [function(t2) {
1117 + var n = N.exec(t2) || x.exec(t2);
1118 + if (!n) return null;
1119 + var u, e2, o2 = l({ h: (u = n[1], e2 = n[2], void 0 === e2 && (e2 = "deg"), Number(u) * (r2[e2] || 1)), s: Number(n[3]), l: Number(n[4]), a: void 0 === n[5] ? 1 : Number(n[5]) / (n[6] ? 100 : 1) });
1120 + return m(o2);
1108 1121 }, "hsl"]], object: [[function(r2) {
1109 - var n2 = r2.r, e2 = r2.g, u2 = r2.b, o3 = r2.a, i2 = void 0 === o3 ? 1 : o3;
1110 - return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
1122 + var n = r2.r, u = r2.g, e2 = r2.b, o2 = r2.a, i = void 0 === o2 ? 1 : o2;
1123 + return t2(n) && t2(u) && t2(e2) ? a({ r: Number(n), g: Number(u), b: Number(e2), a: Number(i) }) : null;
1111 1124 }, "rgb"], [function(r2) {
1112 - var n2 = r2.h, e2 = r2.s, u2 = r2.l, a2 = r2.a, o3 = void 0 === a2 ? 1 : a2;
1113 - if (!t(n2) || !t(e2) || !t(u2)) return null;
1114 - var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o3) });
1115 - return f(i2);
1125 + var n = r2.h, u = r2.s, e2 = r2.l, o2 = r2.a, a = void 0 === o2 ? 1 : o2;
1126 + if (!t2(n) || !t2(u) || !t2(e2)) return null;
1127 + var i = l({ h: Number(n), s: Number(u), l: Number(e2), a: Number(a) });
1128 + return m(i);
1116 1129 }, "hsl"], [function(r2) {
1117 - var n2 = r2.h, a2 = r2.s, o3 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
1118 - if (!t(n2) || !t(a2) || !t(o3)) return null;
1119 - var h2 = (function(r3) {
1120 - return { h: u(r3.h), s: e(r3.s, 0, 100), v: e(r3.v, 0, 100), a: e(r3.a) };
1121 - })({ h: Number(n2), s: Number(a2), v: Number(o3), a: Number(s2) });
1122 - return b(h2);
1130 + var n = r2.h, o2 = r2.s, a = r2.v, i = r2.a, s = void 0 === i ? 1 : i;
1131 + if (!t2(n) || !t2(o2) || !t2(a)) return null;
1132 + var d2 = (function(r3) {
1133 + return { h: e2(r3.h), s: u(r3.s, 0, 100), v: u(r3.v, 0, 100), a: u(r3.a) };
1134 + })({ h: Number(n), s: Number(o2), v: Number(a), a: Number(s) });
1135 + return v(d2);
1123 1136 }, "hsv"]] };
1124 - var N = function(r2, t3) {
1125 - for (var n2 = 0; n2 < t3.length; n2++) {
1126 - var e2 = t3[n2][0](r2);
1127 - if (e2) return [e2, t3[n2][1]];
1137 + var j = function(r2, t2) {
1138 + for (var n = 0; n < t2.length; n++) {
1139 + var u = t2[n][0](r2);
1140 + if (u) return [u, t2[n][1]];
1128 1141 }
1129 1142 return [null, void 0];
1130 1143 };
1131 - var x = function(r2) {
1132 - return "string" == typeof r2 ? N(r2.trim(), y.string) : "object" == typeof r2 && null !== r2 ? N(r2, y.object) : [null, void 0];
1144 + var w = function(r2) {
1145 + return "string" == typeof r2 ? j(r2.trim(), $.string) : "object" == typeof r2 && null !== r2 ? j(r2, $.object) : [null, void 0];
1133 1146 };
1134 - var M = function(r2, t3) {
1135 - var n2 = c(r2);
1136 - return { h: n2.h, s: e(n2.s + 100 * t3, 0, 100), l: n2.l, a: n2.a };
1147 + var k = function(r2, t2) {
1148 + var n = y(r2);
1149 + return { h: n.h, s: u(n.s + 100 * t2, 0, 100), l: n.l, a: n.a };
1137 1150 };
1138 - var H = function(r2) {
1151 + var E = function(r2) {
1139 1152 return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
1140 1153 };
1141 - var $ = function(r2, t3) {
1142 - var n2 = c(r2);
1143 - return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t3, 0, 100), a: n2.a };
1154 + var R = function(r2, t2) {
1155 + var n = y(r2);
1156 + return { h: n.h, s: n.s, l: u(n.l + 100 * t2, 0, 100), a: n.a };
1144 1157 };
1145 - var j = (function() {
1158 + var q = (function() {
1146 1159 function r2(r3) {
1147 - this.parsed = x(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
1160 + this.parsed = w(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
1148 1161 }
1149 1162 return r2.prototype.isValid = function() {
1150 1163 return null !== this.parsed;
1151 1164 }, r2.prototype.brightness = function() {
1152 - return n(H(this.rgba), 2);
1165 + return n(E(this.rgba), 2);
1153 1166 }, r2.prototype.isDark = function() {
1154 - return H(this.rgba) < 0.5;
1167 + return E(this.rgba) < 0.5;
1155 1168 }, r2.prototype.isLight = function() {
1156 - return H(this.rgba) >= 0.5;
1169 + return E(this.rgba) >= 0.5;
1157 1170 }, r2.prototype.toHex = function() {
1158 - return r3 = o(this.rgba), t3 = r3.r, e2 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t3) + s(e2) + s(u2) + i2;
1159 - var r3, t3, e2, u2, a2, i2;
1171 + return r3 = i(this.rgba), t2 = r3.r, u = r3.g, e2 = r3.b, a = (o2 = r3.a) < 1 ? g(n(255 * o2)) : "", "#" + g(t2) + g(u) + g(e2) + a;
1172 + var r3, t2, u, e2, o2, a;
1160 1173 }, r2.prototype.toRgb = function() {
1161 - return o(this.rgba);
1174 + return i(this.rgba);
1162 1175 }, r2.prototype.toRgbString = function() {
1163 - return r3 = o(this.rgba), t3 = r3.r, n2 = r3.g, e2 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t3 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t3 + ", " + n2 + ", " + e2 + ")";
1164 - var r3, t3, n2, e2, u2;
1176 + return r3 = i(this.rgba), t2 = r3.r, n = r3.g, u = r3.b, (e2 = r3.a) < 1 ? "rgba(" + t2 + ", " + n + ", " + u + ", " + e2 + ")" : "rgb(" + t2 + ", " + n + ", " + u + ")";
1177 + var r3, t2, n, u, e2;
1165 1178 }, r2.prototype.toHsl = function() {
1166 - return d(c(this.rgba));
1179 + return p(y(this.rgba));
1167 1180 }, r2.prototype.toHslString = function() {
1168 - return r3 = d(c(this.rgba)), t3 = r3.h, n2 = r3.s, e2 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t3 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t3 + ", " + n2 + "%, " + e2 + "%)";
1169 - var r3, t3, n2, e2, u2;
1181 + return r3 = p(y(this.rgba)), t2 = r3.h, n = r3.s, u = r3.l, (e2 = r3.a) < 1 ? "hsla(" + t2 + ", " + n + "%, " + u + "%, " + e2 + ")" : "hsl(" + t2 + ", " + n + "%, " + u + "%)";
1182 + var r3, t2, n, u, e2;
1170 1183 }, r2.prototype.toHsv = function() {
1171 - return r3 = h(this.rgba), { h: n(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
1184 + return r3 = c(this.rgba), { h: o2(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
1172 1185 var r3;
1173 1186 }, r2.prototype.invert = function() {
1174 - return w({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
1187 + return A({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
1175 1188 var r3;
1176 1189 }, r2.prototype.saturate = function(r3) {
1177 - return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, r3));
1190 + return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, r3));
1178 1191 }, r2.prototype.desaturate = function(r3) {
1179 - return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, -r3));
1192 + return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, -r3));
1180 1193 }, r2.prototype.grayscale = function() {
1181 - return w(M(this.rgba, -1));
1194 + return A(k(this.rgba, -1));
1182 1195 }, r2.prototype.lighten = function(r3) {
1183 - return void 0 === r3 && (r3 = 0.1), w($(this.rgba, r3));
1196 + return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, r3));
1184 1197 }, r2.prototype.darken = function(r3) {
1185 - return void 0 === r3 && (r3 = 0.1), w($(this.rgba, -r3));
1198 + return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, -r3));
1186 1199 }, r2.prototype.rotate = function(r3) {
1187 - return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
1200 + return void 0 === r3 && (r3 = 15), this.hue(y(this.rgba).h + r3);
1188 1201 }, r2.prototype.alpha = function(r3) {
1189 - return "number" == typeof r3 ? w({ r: (t3 = this.rgba).r, g: t3.g, b: t3.b, a: r3 }) : n(this.rgba.a, 3);
1190 - var t3;
1202 + return "number" == typeof r3 ? A({ r: (t2 = this.rgba).r, g: t2.g, b: t2.b, a: r3 }) : n(this.rgba.a, 3);
1203 + var t2;
1191 1204 }, r2.prototype.hue = function(r3) {
1192 - var t3 = c(this.rgba);
1193 - return "number" == typeof r3 ? w({ h: r3, s: t3.s, l: t3.l, a: t3.a }) : n(t3.h);
1205 + var t2 = y(this.rgba);
1206 + return "number" == typeof r3 ? A({ h: r3, s: t2.s, l: t2.l, a: t2.a }) : o2(t2.h);
1194 1207 }, r2.prototype.isEqual = function(r3) {
1195 - return this.toHex() === w(r3).toHex();
1208 + return this.toHex() === A(r3).toHex();
1196 1209 }, r2;
1197 1210 })();
1198 - var w = function(r2) {
1199 - return r2 instanceof j ? r2 : new j(r2);
1211 + var A = function(r2) {
1212 + return r2 instanceof q ? r2 : new q(r2);
1200 1213 };
1201 - var S = [];
1202 - var k = function(r2) {
1214 + var C = [];
1215 + var D = function(r2) {
1203 1216 r2.forEach(function(r3) {
1204 - S.indexOf(r3) < 0 && (r3(j, y), S.push(r3));
1217 + C.indexOf(r3) < 0 && (r3(q, $), C.push(r3));
1205 1218 });
1206 1219 };
1207 1220
1208 1221 // node_modules/colord/plugins/names.mjs
1209 - function names_default(e2, f2) {
1210 - var a2 = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r2 = {};
1211 - for (var d3 in a2) r2[a2[d3]] = d3;
1222 + var e = function(e2, f2) {
1223 + var a = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r2 = {};
1224 + for (var d2 in a) r2[a[d2]] = d2;
1212 1225 var l4 = {};
1213 1226 e2.prototype.toName = function(f3) {
1214 1227 if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return "transparent";
1215 - var d4, i2, n2 = r2[this.toHex()];
1216 - if (n2) return n2;
1228 + var d3, i, n = r2[this.toHex()];
1229 + if (n) return n;
1217 1230 if (null == f3 ? void 0 : f3.closest) {
1218 - var o3 = this.toRgb(), t3 = 1 / 0, b3 = "black";
1219 - if (!l4.length) for (var c2 in a2) l4[c2] = new e2(a2[c2]).toRgb();
1220 - for (var g3 in a2) {
1221 - var u2 = (d4 = o3, i2 = l4[g3], Math.pow(d4.r - i2.r, 2) + Math.pow(d4.g - i2.g, 2) + Math.pow(d4.b - i2.b, 2));
1222 - u2 < t3 && (t3 = u2, b3 = g3);
1231 + var o2 = this.toRgb(), t2 = 1 / 0, b2 = "black";
1232 + if (!l4.length) for (var c2 in a) l4[c2] = new e2(a[c2]).toRgb();
1233 + for (var g2 in a) {
1234 + var u = (d3 = o2, i = l4[g2], Math.pow(d3.r - i.r, 2) + Math.pow(d3.g - i.g, 2) + Math.pow(d3.b - i.b, 2));
1235 + u < t2 && (t2 = u, b2 = g2);
1223 1236 }
1224 - return b3;
1237 + return b2;
1225 1238 }
1226 1239 };
1227 1240 f2.string.push([function(f3) {
1228 - var r3 = f3.toLowerCase(), d4 = "transparent" === r3 ? "#0000" : a2[r3];
1229 - return d4 ? new e2(d4).toRgb() : null;
1241 + var r3 = f3.toLowerCase(), d3 = "transparent" === r3 ? "#0000" : a[r3];
1242 + return d3 ? new e2(d3).toRgb() : null;
1230 1243 }, "name"]);
1231 - }
1244 + };
1232 1245
1233 1246 // node_modules/colord/plugins/a11y.mjs
1234 - var o2 = function(o3) {
1235 - var t3 = o3 / 255;
1236 - return t3 < 0.04045 ? t3 / 12.92 : Math.pow((t3 + 0.055) / 1.055, 2.4);
1247 + var o = function(o2) {
1248 + var t2 = o2 / 255;
1249 + return t2 < 0.04045 ? t2 / 12.92 : Math.pow((t2 + 0.055) / 1.055, 2.4);
1237 1250 };
1238 - var t2 = function(t3) {
1239 - return 0.2126 * o2(t3.r) + 0.7152 * o2(t3.g) + 0.0722 * o2(t3.b);
1251 + var t = function(t2) {
1252 + return 0.2126 * o(t2.r) + 0.7152 * o(t2.g) + 0.0722 * o(t2.b);
1240 1253 };
1241 - function a11y_default(o3) {
1242 - o3.prototype.luminance = function() {
1243 - return o4 = t2(this.rgba), void 0 === (r2 = 2) && (r2 = 0), void 0 === n2 && (n2 = Math.pow(10, r2)), Math.round(n2 * o4) / n2 + 0;
1244 - var o4, r2, n2;
1245 - }, o3.prototype.contrast = function(r2) {
1254 + var r = function(o2) {
1255 + o2.prototype.luminance = function() {
1256 + return o3 = t(this.rgba), void 0 === (r2 = 2) && (r2 = 0), void 0 === n && (n = Math.pow(10, r2)), Math.round(n * o3) / n + 0;
1257 + var o3, r2, n;
1258 + }, o2.prototype.contrast = function(r2) {
1246 1259 void 0 === r2 && (r2 = "#FFF");
1247 - var n2, a2, i2, e2, v3, u2, d3, c2 = r2 instanceof o3 ? r2 : new o3(r2);
1248 - return e2 = this.rgba, v3 = c2.toRgb(), u2 = t2(e2), d3 = t2(v3), n2 = u2 > d3 ? (u2 + 0.05) / (d3 + 0.05) : (d3 + 0.05) / (u2 + 0.05), void 0 === (a2 = 2) && (a2 = 0), void 0 === i2 && (i2 = Math.pow(10, a2)), Math.floor(i2 * n2) / i2 + 0;
1249 - }, o3.prototype.isReadable = function(o4, t3) {
1250 - return void 0 === o4 && (o4 = "#FFF"), void 0 === t3 && (t3 = {}), this.contrast(o4) >= (e2 = void 0 === (i2 = (r2 = t3).size) ? "normal" : i2, "AAA" === (a2 = void 0 === (n2 = r2.level) ? "AA" : n2) && "normal" === e2 ? 7 : "AA" === a2 && "large" === e2 ? 3 : 4.5);
1251 - var r2, n2, a2, i2, e2;
1260 + var n, a, i, e2, v3, u, d2, c2 = r2 instanceof o2 ? r2 : new o2(r2);
1261 + return e2 = this.rgba, v3 = c2.toRgb(), u = t(e2), d2 = t(v3), n = u > d2 ? (u + 0.05) / (d2 + 0.05) : (d2 + 0.05) / (u + 0.05), void 0 === (a = 2) && (a = 0), void 0 === i && (i = Math.pow(10, a)), Math.floor(i * n) / i + 0;
1262 + }, o2.prototype.isReadable = function(o3, t2) {
1263 + return void 0 === o3 && (o3 = "#FFF"), void 0 === t2 && (t2 = {}), this.contrast(o3) >= (e2 = void 0 === (i = (r2 = t2).size) ? "normal" : i, "AAA" === (a = void 0 === (n = r2.level) ? "AA" : n) && "normal" === e2 ? 7 : "AA" === a && "large" === e2 ? 3 : 4.5);
1264 + var r2, n, a, i, e2;
1252 1265 };
1253 - }
1266 + };
1254 1267
1255 1268 // packages/blocks/build-module/api/utils.mjs
1256 1269 var import_element = __toESM(require_element(), 1);
1257 1270 var import_i18n2 = __toESM(require_i18n(), 1);
@@ -1532,8 +1545,13 @@
1532 1545 value: ["typography", "textIndent"],
1533 1546 support: ["typography", "textIndent"],
1534 1547 useEngine: true
1535 1548 },
1549 + textShadow: {
1550 + value: ["typography", "textShadow"],
1551 + support: ["typography", "textShadow"],
1552 + useEngine: true
1553 + },
1536 1554 writingMode: {
1537 1555 value: ["typography", "writingMode"],
1538 1556 support: ["typography", "__experimentalWritingMode"],
1539 1557 useEngine: true
@@ -1908,9 +1926,9 @@
1908 1926 return unlock((0, import_data.select)(store)).getAllBlockBindingsSources();
1909 1927 }
1910 1928
1911 1929 // packages/blocks/build-module/api/utils.mjs
1912 - k([names_default, a11y_default]);
1930 + D([e, r]);
1913 1931 var ICON_COLORS = ["#191e23", "#f8f9f9"];
1914 1932 function isUnmodifiedBlock(block, role) {
1915 1933 const blockAttributes = getBlockType(block.name)?.attributes ?? {};
1916 1934 const attributesByRole = role ? Object.entries(blockAttributes).filter(([key, definition]) => {
@@ -1945,9 +1963,9 @@
1945 1963 return { src: resolvedIcon };
1946 1964 }
1947 1965 const iconDescriptor = resolvedIcon;
1948 1966 if ("background" in iconDescriptor) {
1949 - const colordBgColor = w(iconDescriptor.background);
1967 + const colordBgColor = A(iconDescriptor.background);
1950 1968 const getColorContrast = (iconColor) => colordBgColor.contrast(iconColor);
1951 1969 const maxContrast = Math.max(...ICON_COLORS.map(getColorContrast));
1952 1970 return {
1953 1971 ...iconDescriptor,
@@ -2501,8 +2519,9 @@
2501 2519 "textAlign",
2502 2520 "textDecoration",
2503 2521 "textIndent",
2504 2522 "textTransform",
2523 + "textShadow",
2505 2524 "letterSpacing"
2506 2525 ];
2507 2526 function filterElementBlockSupports(blockSupports, name, element) {
2508 2527 return blockSupports.filter((support) => {
@@ -2875,15 +2894,15 @@
2875 2894 });
2876 2895 var import_deprecated5 = __toESM(require_deprecated(), 1);
2877 2896
2878 2897 // node_modules/is-plain-object/dist/is-plain-object.mjs
2879 - function isObject3(o3) {
2880 - return Object.prototype.toString.call(o3) === "[object Object]";
2898 + function isObject3(o2) {
2899 + return Object.prototype.toString.call(o2) === "[object Object]";
2881 2900 }
2882 - function isPlainObject(o3) {
2901 + function isPlainObject(o2) {
2883 2902 var ctor, prot;
2884 - if (isObject3(o3) === false) return false;
2885 - ctor = o3.constructor;
2903 + if (isObject3(o2) === false) return false;
2904 + ctor = o2.constructor;
2886 2905 if (ctor === void 0) return true;
2887 2906 prot = ctor.prototype;
2888 2907 if (isObject3(prot) === false) return false;
2889 2908 if (prot.hasOwnProperty("isPrototypeOf") === false) {
@@ -3230,10 +3249,10 @@
3230 3249 unlock(store).registerPrivateActions(private_actions_exports);
3231 3250
3232 3251 // node_modules/uuid/dist/stringify.js
3233 3252 var byteToHex = [];
3234 - for (let i2 = 0; i2 < 256; ++i2) {
3235 - byteToHex.push((i2 + 256).toString(16).slice(1));
3253 + for (let i = 0; i < 256; ++i) {
3254 + byteToHex.push((i + 256).toString(16).slice(1));
3236 3255 }
3237 3256 function unsafeStringify(arr, offset = 0) {
3238 3257 return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
3239 3258 }
@@ -3263,10 +3282,10 @@
3263 3282 offset = offset || 0;
3264 3283 if (offset < 0 || offset + 16 > buf.length) {
3265 3284 throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
3266 3285 }
3267 - for (let i2 = 0; i2 < 16; ++i2) {
3268 - buf[offset + i2] = rnds[i2];
3286 + for (let i = 0; i < 16; ++i) {
3287 + buf[offset + i] = rnds[i];
3269 3288 }
3270 3289 return buf;
3271 3290 }
3272 3291 return unsafeStringify(rnds);
@@ -3428,11 +3447,11 @@
3428 3447 transformedBlockType,
3429 3448 transformation
3430 3449 ) : void 0;
3431 3450 });
3432 - }).filter((bt) => !!bt);
3451 + }).filter((bt2) => !!bt2);
3433 3452 };
3434 - var isWildcardBlockTransform = (t3) => isBlockTypeTransform(t3) && Array.isArray(t3.blocks) && t3.blocks.includes("*");
3453 + var isWildcardBlockTransform = (t2) => isBlockTypeTransform(t2) && Array.isArray(t2.blocks) && t2.blocks.includes("*");
3435 3454 var isContainerGroupBlock = (name) => name === getGroupingBlockName();
3436 3455 function getPossibleBlockTransformations(blocks) {
3437 3456 if (!blocks.length) {
3438 3457 return [];
@@ -3452,14 +3471,14 @@
3452 3471 return [...blockTypesByNameAndVariation.values()];
3453 3472 }
3454 3473 function findTransform(transforms, predicate) {
3455 3474 const hooks = (0, import_hooks2.createHooks)();
3456 - for (let i2 = 0; i2 < transforms.length; i2++) {
3457 - const candidate = transforms[i2];
3475 + for (let i = 0; i < transforms.length; i++) {
3476 + const candidate = transforms[i];
3458 3477 if (predicate(candidate)) {
3459 3478 hooks.addFilter(
3460 3479 "transform",
3461 - "transform/" + i2.toString(),
3480 + "transform/" + i.toString(),
3462 3481 (result) => result ? result : candidate,
3463 3482 candidate.priority
3464 3483 );
3465 3484 }
@@ -3499,15 +3518,15 @@
3499 3518 );
3500 3519 const transformationsTo = getBlockTransforms("to", sourceName).filter(
3501 3520 isBlockTypeTransform
3502 3521 );
3503 - const isMatchingVariation = (t3) => variationName ? t3.variationName === variationName : !t3.variationName;
3522 + const isMatchingVariation = (t2) => variationName ? t2.variationName === variationName : !t2.variationName;
3504 3523 const transformation = findTransform(
3505 3524 transformationsTo,
3506 - (t3) => isMatchingVariation(t3) && (isWildcardBlockTransform(t3) || t3.blocks.indexOf(name) !== -1) && (!isMultiBlock || !!t3.isMultiBlock) && maybeCheckTransformIsMatch(t3, blocksArray)
3525 + (t2) => isMatchingVariation(t2) && (isWildcardBlockTransform(t2) || t2.blocks.indexOf(name) !== -1) && (!isMultiBlock || !!t2.isMultiBlock) && maybeCheckTransformIsMatch(t2, blocksArray)
3507 3526 ) || findTransform(
3508 3527 transformationsFrom,
3509 - (t3) => isMatchingVariation(t3) && (isWildcardBlockTransform(t3) || t3.blocks.indexOf(sourceName) !== -1) && (!isMultiBlock || !!t3.isMultiBlock) && maybeCheckTransformIsMatch(t3, blocksArray)
3528 + (t2) => isMatchingVariation(t2) && (isWildcardBlockTransform(t2) || t2.blocks.indexOf(sourceName) !== -1) && (!isMultiBlock || !!t2.isMultiBlock) && maybeCheckTransformIsMatch(t2, blocksArray)
3510 3529 );
3511 3530 if (!transformation) {
3512 3531 return null;
3513 3532 }
@@ -4431,10 +4450,10 @@
4431 4450 }
4432 4451 if (arguments.length === 0) {
4433 4452 return token;
4434 4453 }
4435 - for (var i2 = 0; i2 < arguments.length; i2++) {
4436 - if (token.type === arguments[i2]) {
4454 + for (var i = 0; i < arguments.length; i++) {
4455 + if (token.type === arguments[i]) {
4437 4456 return token;
4438 4457 }
4439 4458 }
4440 4459 throw new Error("token type was unexpectedly " + token.type);
@@ -4688,10 +4707,10 @@
4688 4707 }
4689 4708 function isEquivalentTextTokens(actual, expected, logger = createLogger()) {
4690 4709 let actualChars = actual.chars;
4691 4710 let expectedChars = expected.chars;
4692 - for (let i2 = 0; i2 < TEXT_NORMALIZATIONS.length; i2++) {
4693 - const normalize = TEXT_NORMALIZATIONS[i2];
4711 + for (let i = 0; i < TEXT_NORMALIZATIONS.length; i++) {
4712 + const normalize = TEXT_NORMALIZATIONS[i];
4694 4713 actualChars = normalize(actualChars);
4695 4714 expectedChars = normalize(expectedChars);
4696 4715 if (actualChars === expectedChars) {
4697 4716 return true;
@@ -4760,13 +4779,13 @@
4760 4779 );
4761 4780 return false;
4762 4781 }
4763 4782 const expectedAttributes = {};
4764 - for (let i2 = 0; i2 < expected.length; i2++) {
4765 - expectedAttributes[expected[i2][0].toLowerCase()] = expected[i2][1];
4783 + for (let i = 0; i < expected.length; i++) {
4784 + expectedAttributes[expected[i][0].toLowerCase()] = expected[i][1];
4766 4785 }
4767 - for (let i2 = 0; i2 < actual.length; i2++) {
4768 - const [name, actualValue] = actual[i2];
4786 + for (let i = 0; i < actual.length; i++) {
4787 + const [name, actualValue] = actual[i];
4769 4788 const nameLower = name.toLowerCase();
4770 4789 if (!expectedAttributes.hasOwnProperty(nameLower)) {
4771 4790 logger.warning("Encountered unexpected attribute `%s`.", name);
4772 4791 return false;
@@ -5157,16 +5176,16 @@
5157 5176 var head;
5158 5177 var tail;
5159 5178 options = options || {};
5160 5179 function memoized() {
5161 - var node = head, len = arguments.length, args, i2;
5180 + var node = head, len = arguments.length, args, i;
5162 5181 searchCache: while (node) {
5163 5182 if (node.args.length !== arguments.length) {
5164 5183 node = node.next;
5165 5184 continue;
5166 5185 }
5167 - for (i2 = 0; i2 < len; i2++) {
5168 - if (node.args[i2] !== arguments[i2]) {
5186 + for (i = 0; i < len; i++) {
5187 + if (node.args[i] !== arguments[i]) {
5169 5188 node = node.next;
5170 5189 continue searchCache;
5171 5190 }
5172 5191 }
@@ -5185,10 +5204,10 @@
5185 5204 }
5186 5205 return node.val;
5187 5206 }
5188 5207 args = new Array(len);
5189 - for (i2 = 0; i2 < len; i2++) {
5190 - args[i2] = arguments[i2];
5208 + for (i = 0; i < len; i++) {
5209 + args[i] = arguments[i];
5191 5210 }
5192 5211 node = {
5193 5212 args,
5194 5213 // Generate the result from original function
@@ -5250,12 +5269,12 @@
5250 5269 alternative: "wp.richText.concat",
5251 5270 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
5252 5271 });
5253 5272 const result = [];
5254 - for (let i2 = 0; i2 < blockNodes.length; i2++) {
5255 - const blockNode = Array.isArray(blockNodes[i2]) ? blockNodes[i2] : [blockNodes[i2]];
5256 - for (let j3 = 0; j3 < blockNode.length; j3++) {
5257 - const child = blockNode[j3];
5273 + for (let i = 0; i < blockNodes.length; i++) {
5274 + const blockNode = Array.isArray(blockNodes[i]) ? blockNodes[i] : [blockNodes[i]];
5275 + for (let j2 = 0; j2 < blockNode.length; j2++) {
5276 + const child = blockNode[j2];
5258 5277 const canConcatToPreviousString = typeof child === "string" && typeof result[result.length - 1] === "string";
5259 5278 if (canConcatToPreviousString) {
5260 5279 result[result.length - 1] += child;
5261 5280 } else {
@@ -5272,11 +5291,11 @@
5272 5291 alternative: "wp.richText.create",
5273 5292 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
5274 5293 });
5275 5294 const result = [];
5276 - for (let i2 = 0; i2 < domNodes.length; i2++) {
5295 + for (let i = 0; i < domNodes.length; i++) {
5277 5296 try {
5278 - result.push(fromDOM2(domNodes[i2]));
5297 + result.push(fromDOM2(domNodes[i]));
5279 5298 } catch {
5280 5299 }
5281 5300 }
5282 5301 return result;
@@ -5327,10 +5346,10 @@
5327 5346 return typeof node !== "string" && node?.type === type;
5328 5347 }
5329 5348 function getNamedNodeMapAsObject(nodeMap) {
5330 5349 const result = {};
5331 - for (let i2 = 0; i2 < nodeMap.length; i2++) {
5332 - const { name, value } = nodeMap[i2];
5350 + for (let i = 0; i < nodeMap.length; i++) {
5351 + const { name, value } = nodeMap[i];
5333 5352 result[name] = value;
5334 5353 }
5335 5354 return result;
5336 5355 }
@@ -5537,9 +5556,9 @@
5537 5556 );
5538 5557 function parseHtml(innerHTML) {
5539 5558 return parse(
5540 5559 innerHTML ?? "",
5541 - (h2) => h2
5560 + (h) => h
5542 5561 );
5543 5562 }
5544 5563 function parseWithAttributeSchema(innerHTML, attributeSchema) {
5545 5564 return matcherFromSource(attributeSchema)(
@@ -5676,10 +5695,10 @@
5676 5695 const { deprecated: deprecatedDefinitions } = blockType;
5677 5696 if (!deprecatedDefinitions || !deprecatedDefinitions.length) {
5678 5697 return block;
5679 5698 }
5680 - for (let i2 = 0; i2 < deprecatedDefinitions.length; i2++) {
5681 - const { isEligible = stubFalse } = deprecatedDefinitions[i2];
5699 + for (let i = 0; i < deprecatedDefinitions.length; i++) {
5700 + const { isEligible = stubFalse } = deprecatedDefinitions[i];
5682 5701 if (block.isValid && !isEligible(parsedAttributes, block.innerBlocks, {
5683 5702 blockNode: rawBlock,
5684 5703 block
5685 5704 })) {
@@ -5689,9 +5708,9 @@
5689 5708 omit(
5690 5709 blockType,
5691 5710 DEPRECATED_ENTRY_KEYS
5692 5711 ),
5693 - deprecatedDefinitions[i2]
5712 + deprecatedDefinitions[i]
5694 5713 );
5695 5714 let migratedBlock = {
5696 5715 ...block,
5697 5716 attributes: getBlockAttributes(
@@ -6281,41 +6300,41 @@
6281 6300 return [...objValue || [], ...srcValue || []];
6282 6301 }
6283 6302 }
6284 6303 }
6285 - function mergeTagNameSchemas(a2, b3) {
6286 - if (a2 === b3) {
6287 - return a2;
6304 + function mergeTagNameSchemas(a, b2) {
6305 + if (a === b2) {
6306 + return a;
6288 6307 }
6289 - for (const key in b3) {
6290 - if (a2[key]) {
6291 - a2[key] = mergeTagNameSchemaProperties(
6292 - a2[key],
6293 - b3[key],
6308 + for (const key in b2) {
6309 + if (a[key]) {
6310 + a[key] = mergeTagNameSchemaProperties(
6311 + a[key],
6312 + b2[key],
6294 6313 key
6295 6314 );
6296 - } else if (Array.isArray(b3[key])) {
6297 - a2[key] = b3[key].slice();
6315 + } else if (Array.isArray(b2[key])) {
6316 + a[key] = b2[key].slice();
6298 6317 } else {
6299 - a2[key] = { ...b3[key] };
6318 + a[key] = { ...b2[key] };
6300 6319 }
6301 6320 }
6302 - return a2;
6321 + return a;
6303 6322 }
6304 - function mergeSchemas(a2, b3) {
6305 - if (a2 === b3) {
6306 - return a2;
6323 + function mergeSchemas(a, b2) {
6324 + if (a === b2) {
6325 + return a;
6307 6326 }
6308 - for (const key in b3) {
6309 - if (a2[key]) {
6310 - a2[key] = mergeTagNameSchemas(a2[key], b3[key]);
6311 - } else if (Array.isArray(b3[key])) {
6312 - a2[key] = b3[key].slice();
6327 + for (const key in b2) {
6328 + if (a[key]) {
6329 + a[key] = mergeTagNameSchemas(a[key], b2[key]);
6330 + } else if (Array.isArray(b2[key])) {
6331 + a[key] = b2[key].slice();
6313 6332 } else {
6314 - a2[key] = { ...b3[key] };
6333 + a[key] = { ...b2[key] };
6315 6334 }
6316 6335 }
6317 - return a2;
6336 + return a;
6318 6337 }
6319 6338 return schemas.reduce(mergeSchemas, {});
6320 6339 }
6321 6340 function getBlockContentSchema(context) {
@@ -6331,10 +6350,10 @@
6331 6350 return false;
6332 6351 }
6333 6352 const wrapper = doc.body.children.item(0);
6334 6353 const descendants = wrapper.getElementsByTagName("*");
6335 - for (let i2 = 0; i2 < descendants.length; i2++) {
6336 - if (descendants.item(i2).tagName !== "BR") {
6354 + for (let i = 0; i < descendants.length; i++) {
6355 + if (descendants.item(i).tagName !== "BR") {
6337 6356 return false;
6338 6357 }
6339 6358 }
6340 6359 if (wrapper.tagName !== "SPAN") {
@@ -6396,9 +6415,9 @@
6396 6415 ["ul", "li", "ol"],
6397 6416 ["h1", "h2", "h3", "h4", "h5", "h6"]
6398 6417 ];
6399 6418 return inlineAllowedTagGroups.some(
6400 - (tagGroup) => [tag, contextTag].filter((t3) => !tagGroup.includes(t3)).length === 0
6419 + (tagGroup) => [tag, contextTag].filter((t2) => !tagGroup.includes(t2)).length === 0
6401 6420 );
6402 6421 }
6403 6422 function deepCheck(nodes, contextTag) {
6404 6423 return nodes.every(
@@ -6564,10 +6583,10 @@
6564 6583 node.src = "";
6565 6584 return;
6566 6585 }
6567 6586 const uint8Array = new Uint8Array(decoded.length);
6568 - for (let i2 = 0; i2 < uint8Array.length; i2++) {
6569 - uint8Array[i2] = decoded.charCodeAt(i2);
6587 + for (let i = 0; i < uint8Array.length; i++) {
6588 + uint8Array[i] = decoded.charCodeAt(i);
6570 6589 }
6571 6590 const name = type.replace("/", ".");
6572 6591 const file = new window.File([uint8Array], name, { type });
6573 6592 node.src = (0, import_blob.createBlobURL)(file);
@@ -6586,24 +6605,31 @@
6586 6605 node.innerHTML = normaliseBlocks(node.innerHTML);
6587 6606 }
6588 6607
6589 6608 // node_modules/marked/lib/marked.esm.js
6590 - function z() {
6609 + function A2() {
6591 6610 return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
6592 6611 }
6593 - var T = z();
6594 - function G(l4) {
6612 + var T = A2();
6613 + function U(l4) {
6595 6614 T = l4;
6596 6615 }
6597 - var _ = { exec: () => null };
6598 - function d2(l4, e2 = "") {
6599 - let t3 = typeof l4 == "string" ? l4 : l4.source, n2 = { replace: (s2, r2) => {
6600 - let i2 = typeof r2 == "string" ? r2 : r2.source;
6601 - return i2 = i2.replace(m2.caret, "$1"), t3 = t3.replace(s2, i2), n2;
6602 - }, getRegex: () => new RegExp(t3, e2) };
6603 - return n2;
6616 + var E2 = { exec: () => null };
6617 + function I(l4) {
6618 + let e2 = [];
6619 + return (t2) => {
6620 + let n = Math.max(0, Math.min(3, t2 - 1)), i = e2[n];
6621 + return i || (i = l4(n), e2[n] = i), i;
6622 + };
6604 6623 }
6605 - var Re = ((l4 = "") => {
6624 + function d(l4, e2 = "") {
6625 + let t2 = typeof l4 == "string" ? l4 : l4.source, n = { replace: (i, r2) => {
6626 + let o2 = typeof r2 == "string" ? r2 : r2.source;
6627 + return o2 = o2.replace(m2.caret, "$1"), t2 = t2.replace(i, o2), n;
6628 + }, getRegex: () => new RegExp(t2, e2) };
6629 + return n;
6630 + }
6631 + var we = ((l4 = "") => {
6606 6632 try {
6607 6633 return !!new RegExp("(?<=1)(?<!1)" + l4);
6608 6634 } catch {
6609 6635 return false;
@@ -6608,80 +6634,92 @@
6608 6634 } catch {
6609 6635 return false;
6610 6636 }
6611 6637 })();
6612 - var m2 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l4) => new RegExp(`^( {0,3}${l4})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}#`), htmlBeginRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}>`) };
6613 - var Te = /^(?:[ \t]*(?:\n|$))+/;
6614 - var Oe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
6615 - var we = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
6616 - var I = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
6617 - var ye = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
6618 - var Q = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
6619 - var ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
6620 - var oe = d2(ie).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
6621 - var Pe = d2(ie).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
6622 - var j2 = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
6623 - var Se = /^[^\n]+/;
6624 - var F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
6625 - var $e = d2(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
6626 - var Le = d2(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex();
6627 - var v2 = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
6628 - var U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
6629 - var _e = d2("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v2).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
6630 - var ae = d2(j2).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v2).getRegex();
6631 - var Me = d2(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex();
6632 - var K = { blockquote: Me, code: Oe, def: $e, fences: we, heading: ye, hr: I, html: _e, lheading: oe, list: Le, newline: Te, paragraph: ae, table: _, text: Se };
6633 - var re = d2("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v2).getRegex();
6634 - var ze = { ...K, lheading: Pe, table: re, paragraph: d2(j2).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v2).getRegex() };
6635 - var Ee = { ...K, html: d2(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d2(j2).replace("hr", I).replace("heading", ` *#{1,6} *[^
6636 -]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
6637 - var Ae = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
6638 - var Ce = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
6639 - var le = /^( {2,}|\\)\n(?!\s*$)/;
6640 - var Ie = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
6641 - var E = /[\p{P}\p{S}]/u;
6642 - var H2 = /[\s\p{P}\p{S}]/u;
6643 - var W = /[^\s\p{P}\p{S}]/u;
6644 - var Be = d2(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, H2).getRegex();
6645 - var ue = /(?!~)[\p{P}\p{S}]/u;
6646 - var De = /(?!~)[\s\p{P}\p{S}]/u;
6647 - var qe = /(?:[^\s\p{P}\p{S}]|~)/u;
6648 - var ve = d2(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Re ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
6649 - var pe = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
6650 - var He = d2(pe, "u").replace(/punct/g, E).getRegex();
6651 - var Ze = d2(pe, "u").replace(/punct/g, ue).getRegex();
6652 - var ce = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
6653 - var Ge = d2(ce, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H2).replace(/punct/g, E).getRegex();
6654 - var Ne = d2(ce, "gu").replace(/notPunctSpace/g, qe).replace(/punctSpace/g, De).replace(/punct/g, ue).getRegex();
6655 - var Qe = d2("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H2).replace(/punct/g, E).getRegex();
6656 - var je = d2(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, E).getRegex();
6657 - var Fe = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
6658 - var Ue = d2(Fe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H2).replace(/punct/g, E).getRegex();
6659 - var Ke = d2(/\\(punct)/, "gu").replace(/punct/g, E).getRegex();
6660 - var We = d2(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
6661 - var Xe = d2(U).replace("(?:-->|$)", "-->").getRegex();
6662 - var Je = d2("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Xe).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
6663 - var q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;
6664 - var Ve = d2(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
6665 - var he = d2(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", F).getRegex();
6666 - var ke = d2(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex();
6667 - var Ye = d2("reflink|nolink(?!\\()", "g").replace("reflink", he).replace("nolink", ke).getRegex();
6668 - var se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
6669 - var X = { _backpedal: _, anyPunctuation: Ke, autolink: We, blockSkip: ve, br: le, code: Ce, del: _, delLDelim: _, delRDelim: _, emStrongLDelim: He, emStrongRDelimAst: Ge, emStrongRDelimUnd: Qe, escape: Ae, link: Ve, nolink: ke, punctuation: Be, reflink: he, reflinkSearch: Ye, tag: Je, text: Ie, url: _ };
6670 - var et = { ...X, link: d2(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: d2(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() };
6671 - var N2 = { ...X, emStrongRDelimAst: Ne, emStrongLDelim: Ze, delLDelim: je, delRDelim: Ue, url: d2(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", se).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d2(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", se).getRegex() };
6672 - var tt = { ...N2, br: d2(le).replace("{2,}", "*").getRegex(), text: d2(N2.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
6673 - var B = { normal: K, gfm: ze, pedantic: Ee };
6674 - var A = { normal: X, gfm: N2, breaks: tt, pedantic: et };
6675 - var nt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
6676 - var de = (l4) => nt[l4];
6677 - function O(l4, e2) {
6638 + var m2 = { codeRemoveIndent: /^(?: {0,3}\t| {1,4})/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, endingSpaceTabChar: /[ \t]$/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l4) => new RegExp(`^( {0,3}${l4})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: I((l4) => new RegExp(`^ {0,${l4}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)), fencesBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:\`\`\`|~~~)`)), headingBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}#`)), htmlBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:</?(?:${H2})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`, "i")), blockquoteBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}>`)) };
6639 + var ye = /^(?:[ \t]*(?:\n|$))+/;
6640 + var Pe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
6641 + var Se = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
6642 + var v2 = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
6643 + var _e = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
6644 + var K = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
6645 + var le = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
6646 + var ue = d(le).replace(/bull/g, K).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
6647 + var $e = d(le).replace(/bull/g, K).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
6648 + var W = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;
6649 + var Le = /^[^\n]+/;
6650 + var X = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
6651 + var ze = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", X).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
6652 + var Ee = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, K).getRegex();
6653 + var H2 = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
6654 + var J = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
6655 + var Me = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", J).replace("tag", H2).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
6656 + var pe = (l4) => d(W).replace("hr", v2).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", l4).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H2).getRegex();
6657 + var Ae = pe(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/);
6658 + var Ie = pe(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/);
6659 + var Ce = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ie).getRegex();
6660 + var V = { blockquote: Ce, code: Pe, def: ze, fences: Se, heading: _e, hr: v2, html: Me, lheading: ue, list: Ee, newline: ye, paragraph: Ae, table: E2, text: Le };
6661 + var ie = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", v2).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H2).getRegex();
6662 + var Be = { ...V, lheading: $e, table: ie, paragraph: d(W).replace("hr", v2).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ie).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H2).getRegex() };
6663 + var De = { ...V, html: d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", J).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: E2, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d(W).replace("hr", v2).replace("heading", ` *#{1,6} *[^
6664 +]`).replace("lheading", ue).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
6665 + var qe = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
6666 + var ve = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
6667 + var ce = /^( {2,}|\\)\n(?!\s*$)[ \t]*/;
6668 + var He = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
6669 + var _ = /[\p{P}\p{S}]/u;
6670 + var C2 = /[\s\p{P}\p{S}]/u;
6671 + var Z = /[^\s\p{P}\p{S}]/u;
6672 + var Ze = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, C2).getRegex();
6673 + var Ge = /[\p{Pi}\p{Ps}"']/u;
6674 + var he = /(?!~)[\p{P}\p{S}]/u;
6675 + var Qe = /(?!~)[\s\p{P}\p{S}]/u;
6676 + var Ne = /(?:[^\s\p{P}\p{S}]|~)/u;
6677 + var je = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", we ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
6678 + var de = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
6679 + var Ue = d(de, "u").replace(/punct/g, _).getRegex();
6680 + var Fe = d(de, "u").replace(/punct/g, he).getRegex();
6681 + var Ke = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/;
6682 + var We = d(Ke, "u").replace(/openQuote/g, Ge).replace(/punct/g, _).getRegex();
6683 + var ke = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
6684 + var Xe = d(ke, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6685 + var Je = d(ke, "gu").replace(/notPunctSpace/g, Ne).replace(/punctSpace/g, Qe).replace(/punct/g, he).getRegex();
6686 + var Ve = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)";
6687 + var Ye = d(Ve, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6688 + var et = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6689 + var tt = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)";
6690 + var nt = d(tt, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6691 + var rt = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _).getRegex();
6692 + var st = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
6693 + var it = d(st, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6694 + var ot = d(/\\(punct)/, "gu").replace(/punct/g, _).getRegex();
6695 + var at = d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
6696 + var lt = d(J).replace("(?:-->|$)", "-->").getRegex();
6697 + var ut = d("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", lt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
6698 + var ge = /\[(?:\\[\s\S]|[^\[\]\\])*\]/;
6699 + var N2 = d(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", ge).getRegex();
6700 + var pt = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", N2).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
6701 + var ct = d(/^!?\[(label)\]\[(ref)\]/).replace("label", N2).replace("ref", X).getRegex();
6702 + var ht = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", X).getRegex();
6703 + var oe = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/;
6704 + var dt = d(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", ge).getRegex();
6705 + var kt = d("reflink|nolink(?!\\()", "g").replace("reflink", d(/^!?\[(label)\]\[(ref)\]/).replace("label", dt).replace("ref", oe).getRegex()).replace("nolink", d(/^!?\[(ref)\](?:\[\])?/).replace("ref", oe).getRegex()).getRegex();
6706 + var ae = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
6707 + var Y = { _backpedal: E2, anyPunctuation: ot, autolink: at, blockSkip: je, br: ce, code: ve, del: E2, delLDelim: E2, delRDelim: E2, emStrongLDelim: Ue, emStrongRDelimAst: Xe, emStrongRDelimUnd: et, escape: qe, link: pt, nolink: ht, punctuation: Ze, reflink: ct, reflinkSearch: kt, tag: ut, text: He, url: E2 };
6708 + var gt = { ...Y, emStrongLDelim: We, emStrongRDelimAst: Ye, emStrongRDelimUnd: nt, link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", N2).getRegex(), reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", N2).getRegex() };
6709 + var F = { ...Y, emStrongRDelimAst: Je, emStrongLDelim: Fe, delLDelim: rt, delRDelim: it, url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ae).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ae).getRegex() };
6710 + var ft = { ...F, br: d(ce).replace("{2,}", "*").getRegex(), text: d(F.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
6711 + var G = { normal: V, gfm: Be, pedantic: De };
6712 + var B = { normal: Y, gfm: F, breaks: ft, pedantic: gt };
6713 + var mt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
6714 + var fe = (l4) => mt[l4];
6715 + function R2(l4, e2) {
6678 6716 if (e2) {
6679 - if (m2.escapeTest.test(l4)) return l4.replace(m2.escapeReplace, de);
6680 - } else if (m2.escapeTestNoEncode.test(l4)) return l4.replace(m2.escapeReplaceNoEncode, de);
6717 + if (m2.escapeTest.test(l4)) return l4.replace(m2.escapeReplace, fe);
6718 + } else if (m2.escapeTestNoEncode.test(l4)) return l4.replace(m2.escapeReplaceNoEncode, fe);
6681 6719 return l4;
6682 6720 }
6683 - function J(l4) {
6721 + function ee(l4) {
6684 6722 try {
6685 6723 l4 = encodeURI(l4).replace(m2.percentDecode, "%");
6686 6724 } catch {
6687 6725 return null;
@@ -6687,74 +6725,109 @@
6687 6725 return null;
6688 6726 }
6689 6727 return l4;
6690 6728 }
6691 - function V(l4, e2) {
6692 - let t3 = l4.replace(m2.findPipe, (r2, i2, o3) => {
6693 - let u2 = false, a2 = i2;
6694 - for (; --a2 >= 0 && o3[a2] === "\\"; ) u2 = !u2;
6695 - return u2 ? "|" : " |";
6696 - }), n2 = t3.split(m2.splitPipe), s2 = 0;
6697 - if (n2[0].trim() || n2.shift(), n2.length > 0 && !n2.at(-1)?.trim() && n2.pop(), e2) if (n2.length > e2) n2.splice(e2);
6698 - else for (; n2.length < e2; ) n2.push("");
6699 - for (; s2 < n2.length; s2++) n2[s2] = n2[s2].trim().replace(m2.slashPipe, "|");
6700 - return n2;
6729 + function te(l4, e2) {
6730 + let t2 = l4.replace(m2.findPipe, (r2, o2, s) => {
6731 + let u = false, a = o2;
6732 + for (; --a >= 0 && s[a] === "\\"; ) u = !u;
6733 + return u ? "|" : " |";
6734 + }), n = t2.split(m2.splitPipe), i = 0;
6735 + if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e2) if (n.length > e2) n.splice(e2);
6736 + else for (; n.length < e2; ) n.push("");
6737 + for (; i < n.length; i++) n[i] = n[i].trim().replace(m2.slashPipe, "|");
6738 + return n;
6701 6739 }
6702 - function $2(l4, e2, t3) {
6703 - let n2 = l4.length;
6704 - if (n2 === 0) return "";
6705 - let s2 = 0;
6706 - for (; s2 < n2; ) {
6707 - let r2 = l4.charAt(n2 - s2 - 1);
6708 - if (r2 === e2 && !t3) s2++;
6709 - else if (r2 !== e2 && t3) s2++;
6740 + function $2(l4, e2, t2) {
6741 + let n = l4.length;
6742 + if (n === 0) return "";
6743 + let i = 0;
6744 + for (; i < n; ) {
6745 + let r2 = l4.charAt(n - i - 1);
6746 + if (r2 === e2 && !t2) i++;
6747 + else if (r2 !== e2 && t2) i++;
6710 6748 else break;
6711 6749 }
6712 - return l4.slice(0, n2 - s2);
6750 + return l4.slice(0, n - i);
6713 6751 }
6714 - function Y(l4) {
6752 + function ne(l4) {
6715 6753 let e2 = l4.split(`
6716 -`), t3 = e2.length - 1;
6717 - for (; t3 >= 0 && m2.blankLine.test(e2[t3]); ) t3--;
6718 - return e2.length - t3 <= 2 ? l4 : e2.slice(0, t3 + 1).join(`
6754 +`), t2 = e2.length - 1;
6755 + for (; t2 >= 0 && m2.blankLine.test(e2[t2]); ) t2--;
6756 + return e2.length - t2 <= 2 ? l4 : e2.slice(0, t2 + 1).join(`
6719 6757 `);
6720 6758 }
6721 - function ge(l4, e2) {
6759 + function D2(l4) {
6760 + return l4.toLowerCase().toUpperCase().toLowerCase();
6761 + }
6762 + function me(l4, e2) {
6722 6763 if (l4.indexOf(e2[1]) === -1) return -1;
6723 - let t3 = 0;
6724 - for (let n2 = 0; n2 < l4.length; n2++) if (l4[n2] === "\\") n2++;
6725 - else if (l4[n2] === e2[0]) t3++;
6726 - else if (l4[n2] === e2[1] && (t3--, t3 < 0)) return n2;
6727 - return t3 > 0 ? -2 : -1;
6764 + let t2 = 0;
6765 + for (let n = 0; n < l4.length; n++) if (l4[n] === "\\") n++;
6766 + else if (l4[n] === e2[0]) t2++;
6767 + else if (l4[n] === e2[1] && (t2--, t2 < 0)) return n;
6768 + return t2 > 0 ? -2 : -1;
6728 6769 }
6729 - function fe(l4, e2 = 0) {
6730 - let t3 = e2, n2 = "";
6731 - for (let s2 of l4) if (s2 === " ") {
6732 - let r2 = 4 - t3 % 4;
6733 - n2 += " ".repeat(r2), t3 += r2;
6734 - } else n2 += s2, t3++;
6735 - return n2;
6770 + function xe(l4, e2 = 0) {
6771 + let t2 = e2, n = "";
6772 + for (let i of l4) if (i === " ") {
6773 + let r2 = 4 - t2 % 4;
6774 + n += " ".repeat(r2), t2 += r2;
6775 + } else n += i, t2++;
6776 + return n;
6736 6777 }
6737 - function me(l4, e2, t3, n2, s2) {
6738 - let r2 = e2.href, i2 = e2.title || null, o3 = l4[1].replace(s2.other.outputLinkReplace, "$1");
6739 - n2.state.inLink = true;
6740 - let u2 = { type: l4[0].charAt(0) === "!" ? "image" : "link", raw: t3, href: r2, title: i2, text: o3, tokens: n2.inlineTokens(o3) };
6741 - return n2.state.inLink = false, u2;
6778 + function be(l4, e2, t2, n, i) {
6779 + let r2 = e2.href, o2 = e2.title || null, s = l4[1].replace(i.other.outputLinkReplace, "$1"), u = l4[0].charAt(0) === "!";
6780 + n.state.inLink = true;
6781 + let a = n.state.linkEmitted, p2 = n.state.inRawBlock;
6782 + n.state.linkEmitted = false;
6783 + let c2 = n.inlineTokens(s), h = n.state.linkEmitted;
6784 + if (n.state.linkEmitted = a, n.state.inLink = false, !u) {
6785 + if (h) {
6786 + n.state.inRawBlock = p2;
6787 + return;
6788 + }
6789 + n.state.linkEmitted = true;
6790 + }
6791 + return { type: u ? "image" : "link", raw: t2, href: r2, title: o2, text: s, tokens: c2 };
6742 6792 }
6743 - function rt(l4, e2, t3) {
6744 - let n2 = l4.match(t3.other.indentCodeCompensation);
6745 - if (n2 === null) return e2;
6746 - let s2 = n2[1];
6793 + function xt(l4, e2, t2) {
6794 + let n = l4.match(t2.other.indentCodeCompensation);
6795 + if (n === null) return e2;
6796 + let i = n[1];
6747 6797 return e2.split(`
6748 6798 `).map((r2) => {
6749 - let i2 = r2.match(t3.other.beginningSpace);
6750 - if (i2 === null) return r2;
6751 - let [o3] = i2;
6752 - return o3.length >= s2.length ? r2.slice(s2.length) : r2;
6799 + let o2 = r2.match(t2.other.beginningSpace);
6800 + if (o2 === null) return r2;
6801 + let [s] = o2;
6802 + return r2.slice(Math.min(s.length, i.length));
6753 6803 }).join(`
6754 6804 `);
6755 6805 }
6756 - var w2 = class {
6806 + function Re(l4, e2, t2, n) {
6807 + if (!e2.includes("<")) return false;
6808 + for (let i = 0; i < e2.length; i++) {
6809 + if (e2[i] === "\\") {
6810 + i++;
6811 + continue;
6812 + }
6813 + if (e2[i] === "`") {
6814 + let s = n.inline.code.exec(e2.slice(i));
6815 + if (s) {
6816 + i += s[0].length - 1;
6817 + continue;
6818 + }
6819 + }
6820 + if (e2[i] !== "<") continue;
6821 + let r2 = l4.slice(t2 + i), o2 = n.inline.tag.exec(r2) || n.inline.autolink.exec(r2);
6822 + if (o2) {
6823 + if (o2[0].length > e2.length - i) return true;
6824 + i += o2[0].length - 1;
6825 + }
6826 + }
6827 + return false;
6828 + }
6829 + var y2 = class {
6757 6830 options;
6758 6831 rules;
6759 6832 lexer;
6760 6833 constructor(e2) {
@@ -6760,319 +6833,326 @@
6760 6833 constructor(e2) {
6761 6834 this.options = e2 || T;
6762 6835 }
6763 6836 space(e2) {
6764 - let t3 = this.rules.block.newline.exec(e2);
6765 - if (t3 && t3[0].length > 0) return { type: "space", raw: t3[0] };
6837 + let t2 = this.rules.block.newline.exec(e2);
6838 + if (t2 && t2[0].length > 0) return { type: "space", raw: t2[0] };
6766 6839 }
6767 6840 code(e2) {
6768 - let t3 = this.rules.block.code.exec(e2);
6769 - if (t3) {
6770 - let n2 = this.options.pedantic ? t3[0] : Y(t3[0]), s2 = n2.replace(this.rules.other.codeRemoveIndent, "");
6771 - return { type: "code", raw: n2, codeBlockStyle: "indented", text: s2 };
6841 + let t2 = this.rules.block.code.exec(e2);
6842 + if (t2) {
6843 + let n = this.options.pedantic ? t2[0] : ne(t2[0]), i = n.replace(this.rules.other.codeRemoveIndent, "");
6844 + return { type: "code", raw: n, codeBlockStyle: "indented", text: i };
6772 6845 }
6773 6846 }
6774 6847 fences(e2) {
6775 - let t3 = this.rules.block.fences.exec(e2);
6776 - if (t3) {
6777 - let n2 = t3[0], s2 = rt(n2, t3[3] || "", this.rules);
6778 - return { type: "code", raw: n2, lang: t3[2] ? t3[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t3[2], text: s2 };
6848 + let t2 = this.rules.block.fences.exec(e2);
6849 + if (t2) {
6850 + let n = t2[0], i = xt(n, t2[3] || "", this.rules);
6851 + return { type: "code", raw: n, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: i };
6779 6852 }
6780 6853 }
6781 6854 heading(e2) {
6782 - let t3 = this.rules.block.heading.exec(e2);
6783 - if (t3) {
6784 - let n2 = t3[2].trim();
6785 - if (this.rules.other.endingHash.test(n2)) {
6786 - let s2 = $2(n2, "#");
6787 - (this.options.pedantic || !s2 || this.rules.other.endingSpaceChar.test(s2)) && (n2 = s2.trim());
6855 + let t2 = this.rules.block.heading.exec(e2);
6856 + if (t2) {
6857 + let n = t2[2].trim();
6858 + if (this.rules.other.endingHash.test(n)) {
6859 + let i = $2(n, "#");
6860 + (this.options.pedantic || !i || this.rules.other.endingSpaceTabChar.test(i)) && (n = i.trim());
6788 6861 }
6789 - return { type: "heading", raw: $2(t3[0], `
6790 -`), depth: t3[1].length, text: n2, tokens: this.lexer.inline(n2) };
6862 + return { type: "heading", raw: $2(t2[0], `
6863 +`), depth: t2[1].length, text: n, tokens: this.lexer.inline(n) };
6791 6864 }
6792 6865 }
6793 6866 hr(e2) {
6794 - let t3 = this.rules.block.hr.exec(e2);
6795 - if (t3) return { type: "hr", raw: $2(t3[0], `
6867 + let t2 = this.rules.block.hr.exec(e2);
6868 + if (t2) return { type: "hr", raw: $2(t2[0], `
6796 6869 `) };
6797 6870 }
6798 6871 blockquote(e2) {
6799 - let t3 = this.rules.block.blockquote.exec(e2);
6800 - if (t3) {
6801 - let n2 = $2(t3[0], `
6872 + let t2 = this.rules.block.blockquote.exec(e2);
6873 + if (t2) {
6874 + let n = $2(t2[0], `
6802 6875 `).split(`
6803 -`), s2 = "", r2 = "", i2 = [];
6804 - for (; n2.length > 0; ) {
6805 - let o3 = false, u2 = [], a2;
6806 - for (a2 = 0; a2 < n2.length; a2++) if (this.rules.other.blockquoteStart.test(n2[a2])) u2.push(n2[a2]), o3 = true;
6807 - else if (!o3) u2.push(n2[a2]);
6876 +`), i = "", r2 = "", o2 = [];
6877 + for (; n.length > 0; ) {
6878 + let s = false, u = [], a;
6879 + for (a = 0; a < n.length; a++) if (this.rules.other.blockquoteStart.test(n[a])) u.push(n[a]), s = true;
6880 + else if (!s) u.push(n[a]);
6808 6881 else break;
6809 - n2 = n2.slice(a2);
6810 - let c2 = u2.join(`
6811 -`), p2 = c2.replace(this.rules.other.blockquoteSetextReplace, `
6882 + n = n.slice(a);
6883 + let p2 = u.join(`
6884 +`), c2 = p2.replace(this.rules.other.blockquoteSetextReplace, `
6812 6885 $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
6813 - s2 = s2 ? `${s2}
6814 -${c2}` : c2, r2 = r2 ? `${r2}
6815 -${p2}` : p2;
6816 - let k2 = this.lexer.state.top;
6817 - if (this.lexer.state.top = true, this.lexer.blockTokens(p2, i2, true), this.lexer.state.top = k2, n2.length === 0) break;
6818 - let h2 = i2.at(-1);
6819 - if (h2?.type === "code") break;
6820 - if (h2?.type === "blockquote") {
6821 - let R = h2, f2 = R.raw + `
6822 -` + n2.join(`
6823 -`), S2 = this.blockquote(f2);
6824 - i2[i2.length - 1] = S2, s2 = s2.substring(0, s2.length - R.raw.length) + S2.raw, r2 = r2.substring(0, r2.length - R.text.length) + S2.text;
6886 + i = i ? `${i}
6887 +${p2}` : p2, r2 = r2 ? `${r2}
6888 +${c2}` : c2;
6889 + let h = this.lexer.state.top;
6890 + if (this.lexer.state.top = true, this.lexer.blockTokens(c2, o2, true), this.lexer.state.top = h, n.length === 0) break;
6891 + let k2 = o2.at(-1);
6892 + if (k2?.type === "code") break;
6893 + if (k2?.type === "blockquote") {
6894 + let O = k2, g2 = n.join(`
6895 +`), w2 = O.raw + `
6896 +` + g2.replace(this.rules.other.blockquoteSetextReplace2, ""), z = this.blockquote(w2);
6897 + o2[o2.length - 1] = z, i = `${i}
6898 +${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
6825 6899 break;
6826 - } else if (h2?.type === "list") {
6827 - let R = h2, f2 = R.raw + `
6828 -` + n2.join(`
6829 -`), S2 = this.list(f2);
6830 - i2[i2.length - 1] = S2, s2 = s2.substring(0, s2.length - h2.raw.length) + S2.raw, r2 = r2.substring(0, r2.length - R.raw.length) + S2.raw, n2 = f2.substring(i2.at(-1).raw.length).split(`
6900 + } else if (k2?.type === "list") {
6901 + let O = k2, g2 = O.raw + `
6902 +` + n.join(`
6903 +`), w2 = this.list(g2);
6904 + o2[o2.length - 1] = w2, i = i.substring(0, i.length - k2.raw.length) + w2.raw, r2 = r2.substring(0, r2.length - O.raw.length) + w2.raw, n = g2.substring(o2.at(-1).raw.length).split(`
6831 6905 `);
6832 6906 continue;
6833 6907 }
6834 6908 }
6835 - return { type: "blockquote", raw: s2, tokens: i2, text: r2 };
6909 + return { type: "blockquote", raw: i, tokens: o2, text: r2 };
6836 6910 }
6837 6911 }
6838 6912 list(e2) {
6839 - let t3 = this.rules.block.list.exec(e2);
6840 - if (t3) {
6841 - let n2 = t3[1].trim(), s2 = n2.length > 1, r2 = { type: "list", raw: "", ordered: s2, start: s2 ? +n2.slice(0, -1) : "", loose: false, items: [] };
6842 - n2 = s2 ? `\\d{1,9}\\${n2.slice(-1)}` : `\\${n2}`, this.options.pedantic && (n2 = s2 ? n2 : "[*+-]");
6843 - let i2 = this.rules.other.listItemRegex(n2), o3 = false;
6913 + let t2 = this.rules.block.list.exec(e2);
6914 + if (t2) {
6915 + let n = t2[1].trim(), i = n.length > 1, r2 = { type: "list", raw: "", ordered: i, start: i ? +n.slice(0, -1) : "", loose: false, items: [] };
6916 + n = i ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = i ? n : "[*+-]");
6917 + let o2 = this.rules.other.listItemRegex(n), s = false;
6844 6918 for (; e2; ) {
6845 - let a2 = false, c2 = "", p2 = "";
6846 - if (!(t3 = i2.exec(e2)) || this.rules.block.hr.test(e2)) break;
6847 - c2 = t3[0], e2 = e2.substring(c2.length);
6848 - let k2 = fe(t3[2].split(`
6849 -`, 1)[0], t3[1].length), h2 = e2.split(`
6850 -`, 1)[0], R = !k2.trim(), f2 = 0;
6851 - if (this.options.pedantic ? (f2 = 2, p2 = k2.trimStart()) : R ? f2 = t3[1].length + 1 : (f2 = k2.search(this.rules.other.nonSpaceChar), f2 = f2 > 4 ? 1 : f2, p2 = k2.slice(f2), f2 += t3[1].length), R && this.rules.other.blankLine.test(h2) && (c2 += h2 + `
6852 -`, e2 = e2.substring(h2.length + 1), a2 = true), !a2) {
6853 - let S2 = this.rules.other.nextBulletRegex(f2), ee = this.rules.other.hrRegex(f2), te = this.rules.other.fencesBeginRegex(f2), ne = this.rules.other.headingBeginRegex(f2), xe = this.rules.other.htmlBeginRegex(f2), be = this.rules.other.blockquoteBeginRegex(f2);
6919 + let a = false, p2 = "", c2 = "";
6920 + if (!(t2 = o2.exec(e2)) || this.rules.block.hr.test(e2)) break;
6921 + p2 = t2[0], e2 = e2.substring(p2.length);
6922 + let h = xe(t2[2].split(`
6923 +`, 1)[0], t2[1].length), k2 = e2.split(`
6924 +`, 1)[0], O = !h.trim(), g2 = 0;
6925 + if (this.options.pedantic ? (g2 = 2, c2 = h.trimStart()) : O ? g2 = t2[1].length + 1 : (g2 = h.search(this.rules.other.nonSpaceChar), g2 = g2 > 4 ? 1 : g2, c2 = h.slice(g2), g2 += t2[1].length), O && this.rules.other.blankLine.test(k2) && (p2 += k2 + `
6926 +`, e2 = e2.substring(k2.length + 1), a = true), !a) {
6927 + let w2 = this.rules.other.nextBulletRegex(g2), z = this.rules.other.hrRegex(g2), re = this.rules.other.fencesBeginRegex(g2), se = this.rules.other.headingBeginRegex(g2), Te = this.rules.other.htmlBeginRegex(g2), Oe = this.rules.other.blockquoteBeginRegex(g2);
6854 6928 for (; e2; ) {
6855 - let Z = e2.split(`
6856 -`, 1)[0], C;
6857 - if (h2 = Z, this.options.pedantic ? (h2 = h2.replace(this.rules.other.listReplaceNesting, " "), C = h2) : C = h2.replace(this.rules.other.tabCharGlobal, " "), te.test(h2) || ne.test(h2) || xe.test(h2) || be.test(h2) || S2.test(h2) || ee.test(h2)) break;
6858 - if (C.search(this.rules.other.nonSpaceChar) >= f2 || !h2.trim()) p2 += `
6859 -` + C.slice(f2);
6929 + let j2 = e2.split(`
6930 +`, 1)[0], q2;
6931 + if (k2 = j2, this.options.pedantic ? (k2 = k2.replace(this.rules.other.listReplaceNesting, " "), q2 = k2) : q2 = k2.replace(this.rules.other.tabCharGlobal, " "), re.test(k2) || se.test(k2) || Te.test(k2) || Oe.test(k2) || w2.test(k2) || z.test(k2)) break;
6932 + if (q2.search(this.rules.other.nonSpaceChar) >= g2 || !k2.trim()) c2 += `
6933 +` + q2.slice(g2);
6860 6934 else {
6861 - if (R || k2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(k2) || ne.test(k2) || ee.test(k2)) break;
6862 - p2 += `
6863 -` + h2;
6935 + if (O || h.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || re.test(h) || se.test(h) || z.test(h)) break;
6936 + c2 += `
6937 +` + k2;
6864 6938 }
6865 - R = !h2.trim(), c2 += Z + `
6866 -`, e2 = e2.substring(Z.length + 1), k2 = C.slice(f2);
6939 + O = !k2.trim(), p2 += j2 + `
6940 +`, e2 = e2.substring(j2.length + 1), h = q2.slice(g2);
6867 6941 }
6868 6942 }
6869 - r2.loose || (o3 ? r2.loose = true : this.rules.other.doubleBlankLine.test(c2) && (o3 = true)), r2.items.push({ type: "list_item", raw: c2, task: !!this.options.gfm && this.rules.other.listIsTask.test(p2), loose: false, text: p2, tokens: [] }), r2.raw += c2;
6943 + r2.loose || (s ? r2.loose = true : this.rules.other.doubleBlankLine.test(p2) && (s = true)), r2.items.push({ type: "list_item", raw: p2, task: !!this.options.gfm && this.rules.other.listIsTask.test(c2), loose: false, text: c2, tokens: [] }), r2.raw += p2;
6870 6944 }
6871 - let u2 = r2.items.at(-1);
6872 - if (u2) u2.raw = u2.raw.trimEnd(), u2.text = u2.text.trimEnd();
6945 + let u = r2.items.at(-1);
6946 + if (u) u.raw = u.raw.trimEnd(), u.text = u.text.trimEnd();
6873 6947 else return;
6874 6948 r2.raw = r2.raw.trimEnd();
6875 - for (let a2 of r2.items) {
6876 - this.lexer.state.top = false, a2.tokens = this.lexer.blockTokens(a2.text, []);
6877 - let c2 = a2.tokens[0];
6878 - if (a2.task && (c2?.type === "text" || c2?.type === "paragraph")) {
6879 - a2.text = a2.text.replace(this.rules.other.listReplaceTask, ""), c2.raw = c2.raw.replace(this.rules.other.listReplaceTask, ""), c2.text = c2.text.replace(this.rules.other.listReplaceTask, "");
6880 - for (let k2 = this.lexer.inlineQueue.length - 1; k2 >= 0; k2--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[k2].src)) {
6881 - this.lexer.inlineQueue[k2].src = this.lexer.inlineQueue[k2].src.replace(this.rules.other.listReplaceTask, "");
6949 + for (let a of r2.items) if (this.lexer.state.top = false, a.tokens = this.lexer.blockTokens(a.text, []), !r2.loose) {
6950 + let p2 = a.tokens.filter((h) => h.type === "space"), c2 = p2.length > 0 && p2.some((h) => this.rules.other.anyLine.test(h.raw));
6951 + r2.loose = c2;
6952 + }
6953 + for (let a of r2.items) {
6954 + let p2 = a.tokens[0];
6955 + if (a.task && (p2?.type === "text" || p2?.type === "paragraph")) {
6956 + a.text = a.text.replace(this.rules.other.listReplaceTask, ""), p2.raw = p2.raw.replace(this.rules.other.listReplaceTask, ""), p2.text = p2.text.replace(this.rules.other.listReplaceTask, "");
6957 + for (let h = this.lexer.inlineQueue.length - 1; h >= 0; h--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)) {
6958 + this.lexer.inlineQueue[h].src = this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask, "");
6882 6959 break;
6883 6960 }
6884 - let p2 = this.rules.other.listTaskCheckbox.exec(a2.raw);
6885 - if (p2) {
6886 - let k2 = { type: "checkbox", raw: p2[0] + " ", checked: p2[0] !== "[ ]" };
6887 - a2.checked = k2.checked, r2.loose ? a2.tokens[0] && ["paragraph", "text"].includes(a2.tokens[0].type) && "tokens" in a2.tokens[0] && a2.tokens[0].tokens ? (a2.tokens[0].raw = k2.raw + a2.tokens[0].raw, a2.tokens[0].text = k2.raw + a2.tokens[0].text, a2.tokens[0].tokens.unshift(k2)) : a2.tokens.unshift({ type: "paragraph", raw: k2.raw, text: k2.raw, tokens: [k2] }) : a2.tokens.unshift(k2);
6961 + let c2 = this.rules.other.listTaskCheckbox.exec(a.raw);
6962 + if (c2) {
6963 + let h = { type: "checkbox", raw: c2[0] + " ", checked: c2[0] !== "[ ]" };
6964 + a.checked = h.checked, r2.loose ? a.tokens[0] && ["paragraph", "text"].includes(a.tokens[0].type) && "tokens" in a.tokens[0] && a.tokens[0].tokens ? (a.tokens[0].raw = h.raw + a.tokens[0].raw, a.tokens[0].text = h.raw + a.tokens[0].text, a.tokens[0].tokens.unshift(h)) : a.tokens.unshift({ type: "paragraph", raw: h.raw, text: h.raw, tokens: [h] }) : a.tokens.unshift(h);
6888 6965 }
6889 - } else a2.task && (a2.task = false);
6890 - if (!r2.loose) {
6891 - let p2 = a2.tokens.filter((h2) => h2.type === "space"), k2 = p2.length > 0 && p2.some((h2) => this.rules.other.anyLine.test(h2.raw));
6892 - r2.loose = k2;
6893 - }
6966 + } else a.task && (a.task = false);
6894 6967 }
6895 - if (r2.loose) for (let a2 of r2.items) {
6896 - a2.loose = true;
6897 - for (let c2 of a2.tokens) c2.type === "text" && (c2.type = "paragraph");
6968 + if (r2.loose) for (let a of r2.items) {
6969 + a.loose = true;
6970 + for (let p2 of a.tokens) p2.type === "text" && (p2.type = "paragraph");
6898 6971 }
6899 6972 return r2;
6900 6973 }
6901 6974 }
6902 6975 html(e2) {
6903 - let t3 = this.rules.block.html.exec(e2);
6904 - if (t3) {
6905 - let n2 = Y(t3[0]);
6906 - return { type: "html", block: true, raw: n2, pre: t3[1] === "pre" || t3[1] === "script" || t3[1] === "style", text: n2 };
6976 + let t2 = this.rules.block.html.exec(e2);
6977 + if (t2) {
6978 + let n = ne(t2[0]);
6979 + return { type: "html", block: true, raw: n, pre: t2[1] === "pre" || t2[1] === "script" || t2[1] === "style", text: n };
6907 6980 }
6908 6981 }
6909 6982 def(e2) {
6910 - let t3 = this.rules.block.def.exec(e2);
6911 - if (t3) {
6912 - let n2 = t3[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), s2 = t3[2] ? t3[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r2 = t3[3] ? t3[3].substring(1, t3[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t3[3];
6913 - return { type: "def", tag: n2, raw: $2(t3[0], `
6914 -`), href: s2, title: r2 };
6983 + let t2 = this.rules.block.def.exec(e2);
6984 + if (t2) {
6985 + let n = D2(t2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), i = t2[2] ? t2[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r2 = t2[3] ? t2[3].substring(1, t2[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t2[3];
6986 + return { type: "def", tag: n, raw: $2(t2[0], `
6987 +`), href: i, title: r2 };
6915 6988 }
6916 6989 }
6917 6990 table(e2) {
6918 - let t3 = this.rules.block.table.exec(e2);
6919 - if (!t3 || !this.rules.other.tableDelimiter.test(t3[2])) return;
6920 - let n2 = V(t3[1]), s2 = t3[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t3[3]?.trim() ? t3[3].replace(this.rules.other.tableRowBlankLine, "").split(`
6921 -`) : [], i2 = { type: "table", raw: $2(t3[0], `
6991 + let t2 = this.rules.block.table.exec(e2);
6992 + if (!t2 || !this.rules.other.tableDelimiter.test(t2[2])) return;
6993 + let n = te(t2[1]), i = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t2[3]?.trim() ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split(`
6994 +`) : [], o2 = { type: "table", raw: $2(t2[0], `
6922 6995 `), header: [], align: [], rows: [] };
6923 - if (n2.length === s2.length) {
6924 - for (let o3 of s2) this.rules.other.tableAlignRight.test(o3) ? i2.align.push("right") : this.rules.other.tableAlignCenter.test(o3) ? i2.align.push("center") : this.rules.other.tableAlignLeft.test(o3) ? i2.align.push("left") : i2.align.push(null);
6925 - for (let o3 = 0; o3 < n2.length; o3++) i2.header.push({ text: n2[o3], tokens: this.lexer.inline(n2[o3]), header: true, align: i2.align[o3] });
6926 - for (let o3 of r2) i2.rows.push(V(o3, i2.header.length).map((u2, a2) => ({ text: u2, tokens: this.lexer.inline(u2), header: false, align: i2.align[a2] })));
6927 - return i2;
6996 + if (n.length === i.length) {
6997 + for (let s of i) this.rules.other.tableAlignRight.test(s) ? o2.align.push("right") : this.rules.other.tableAlignCenter.test(s) ? o2.align.push("center") : this.rules.other.tableAlignLeft.test(s) ? o2.align.push("left") : o2.align.push(null);
6998 + for (let s = 0; s < n.length; s++) o2.header.push({ text: n[s], tokens: this.lexer.inline(n[s]), header: true, align: o2.align[s] });
6999 + for (let s of r2) o2.rows.push(te(s, o2.header.length).map((u, a) => ({ text: u, tokens: this.lexer.inline(u), header: false, align: o2.align[a] })));
7000 + return o2;
6928 7001 }
6929 7002 }
6930 7003 lheading(e2) {
6931 - let t3 = this.rules.block.lheading.exec(e2);
6932 - if (t3) {
6933 - let n2 = t3[1].trim();
6934 - return { type: "heading", raw: $2(t3[0], `
6935 -`), depth: t3[2].charAt(0) === "=" ? 1 : 2, text: n2, tokens: this.lexer.inline(n2) };
7004 + let t2 = this.rules.block.lheading.exec(e2);
7005 + if (t2) {
7006 + let n = t2[1].trim();
7007 + return { type: "heading", raw: $2(t2[0], `
7008 +`), depth: t2[2].charAt(0) === "=" ? 1 : 2, text: n, tokens: this.lexer.inline(n) };
6936 7009 }
6937 7010 }
6938 7011 paragraph(e2) {
6939 - let t3 = this.rules.block.paragraph.exec(e2);
6940 - if (t3) {
6941 - let n2 = t3[1].charAt(t3[1].length - 1) === `
6942 -` ? t3[1].slice(0, -1) : t3[1];
6943 - return { type: "paragraph", raw: t3[0], text: n2, tokens: this.lexer.inline(n2) };
7012 + let t2 = this.rules.block.paragraph.exec(e2);
7013 + if (t2) {
7014 + let n = t2[1].charAt(t2[1].length - 1) === `
7015 +` ? t2[1].slice(0, -1) : t2[1];
7016 + return { type: "paragraph", raw: t2[0], text: n, tokens: this.lexer.inline(n) };
6944 7017 }
6945 7018 }
6946 7019 text(e2) {
6947 - let t3 = this.rules.block.text.exec(e2);
6948 - if (t3) return { type: "text", raw: t3[0], text: t3[0], tokens: this.lexer.inline(t3[0]) };
7020 + let t2 = this.rules.block.text.exec(e2);
7021 + if (t2) return { type: "text", raw: t2[0], text: t2[0], tokens: this.lexer.inline(t2[0]) };
6949 7022 }
6950 7023 escape(e2) {
6951 - let t3 = this.rules.inline.escape.exec(e2);
6952 - if (t3) return { type: "escape", raw: t3[0], text: t3[1] };
7024 + let t2 = this.rules.inline.escape.exec(e2);
7025 + if (t2) return { type: "escape", raw: t2[0], text: t2[1] };
6953 7026 }
6954 7027 tag(e2) {
6955 - let t3 = this.rules.inline.tag.exec(e2);
6956 - if (t3) return !this.lexer.state.inLink && this.rules.other.startATag.test(t3[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t3[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t3[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t3[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t3[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t3[0] };
7028 + let t2 = this.rules.inline.tag.exec(e2);
7029 + if (t2) return !this.lexer.state.inLink && this.rules.other.startATag.test(t2[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t2[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t2[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t2[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t2[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t2[0] };
6957 7030 }
6958 7031 link(e2) {
6959 - let t3 = this.rules.inline.link.exec(e2);
6960 - if (t3) {
6961 - let n2 = t3[2].trim();
6962 - if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n2)) {
6963 - if (!this.rules.other.endAngleBracket.test(n2)) return;
6964 - let i2 = $2(n2.slice(0, -1), "\\");
6965 - if ((n2.length - i2.length) % 2 === 0) return;
7032 + let t2 = this.rules.inline.link.exec(e2);
7033 + if (t2) {
7034 + let n = t2[0].charAt(0) === "!" ? 2 : 1;
7035 + if (!this.options.pedantic && Re(e2, t2[1], n, this.rules)) return;
7036 + let i = t2[2].trim();
7037 + if (!this.options.pedantic && this.rules.other.startAngleBracket.test(i)) {
7038 + if (!this.rules.other.endAngleBracket.test(i)) return;
7039 + let s = $2(i.slice(0, -1), "\\");
7040 + if ((i.length - s.length) % 2 === 0) return;
6966 7041 } else {
6967 - let i2 = ge(t3[2], "()");
6968 - if (i2 === -2) return;
6969 - if (i2 > -1) {
6970 - let u2 = (t3[0].indexOf("!") === 0 ? 5 : 4) + t3[1].length + i2;
6971 - t3[2] = t3[2].substring(0, i2), t3[0] = t3[0].substring(0, u2).trim(), t3[3] = "";
7042 + let s = me(t2[2], "()");
7043 + if (s === -2) return;
7044 + if (s > -1) {
7045 + let a = (t2[0].indexOf("!") === 0 ? 5 : 4) + t2[1].length + s;
7046 + t2[2] = t2[2].substring(0, s), t2[0] = t2[0].substring(0, a).trim(), t2[3] = "";
6972 7047 }
6973 7048 }
6974 - let s2 = t3[2], r2 = "";
7049 + let r2 = t2[2], o2 = "";
6975 7050 if (this.options.pedantic) {
6976 - let i2 = this.rules.other.pedanticHrefTitle.exec(s2);
6977 - i2 && (s2 = i2[1], r2 = i2[3]);
6978 - } else r2 = t3[3] ? t3[3].slice(1, -1) : "";
6979 - return s2 = s2.trim(), this.rules.other.startAngleBracket.test(s2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n2) ? s2 = s2.slice(1) : s2 = s2.slice(1, -1)), me(t3, { href: s2 && s2.replace(this.rules.inline.anyPunctuation, "$1"), title: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1") }, t3[0], this.lexer, this.rules);
7051 + let s = this.rules.other.pedanticHrefTitle.exec(r2);
7052 + s && (r2 = s[1], o2 = s[3]);
7053 + } else o2 = t2[3] ? t2[3].slice(1, -1) : "";
7054 + return r2 = r2.trim(), this.rules.other.startAngleBracket.test(r2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(i) ? r2 = r2.slice(1) : r2 = r2.slice(1, -1)), be(t2, { href: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1"), title: o2 && o2.replace(this.rules.inline.anyPunctuation, "$1") }, t2[0], this.lexer, this.rules);
6980 7055 }
6981 7056 }
6982 - reflink(e2, t3) {
6983 - let n2;
6984 - if ((n2 = this.rules.inline.reflink.exec(e2)) || (n2 = this.rules.inline.nolink.exec(e2))) {
6985 - let s2 = (n2[2] || n2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), r2 = t3[s2.toLowerCase()];
6986 - if (!r2) {
6987 - let i2 = n2[0].charAt(0);
6988 - return { type: "text", raw: i2, text: i2 };
7057 + reflink(e2, t2) {
7058 + let n;
7059 + if ((n = this.rules.inline.reflink.exec(e2)) || (n = this.rules.inline.nolink.exec(e2))) {
7060 + let i = n[0].charAt(0) === "!" ? 2 : 1;
7061 + if (!this.options.pedantic && Re(e2, n[1], i, this.rules)) return;
7062 + let r2 = (n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "), o2 = t2[D2(r2)];
7063 + if (!o2) {
7064 + let s = n[0].charAt(0);
7065 + return { type: "text", raw: s, text: s };
6989 7066 }
6990 - return me(n2, r2, n2[0], this.lexer, this.rules);
7067 + return be(n, o2, n[0], this.lexer, this.rules);
6991 7068 }
6992 7069 }
6993 - emStrong(e2, t3, n2 = "") {
6994 - let s2 = this.rules.inline.emStrongLDelim.exec(e2);
6995 - if (!s2 || !s2[1] && !s2[2] && !s2[3] && !s2[4] || s2[4] && n2.match(this.rules.other.unicodeAlphaNumeric)) return;
6996 - if (!(s2[1] || s2[3] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
6997 - let i2 = [...s2[0]].length - 1, o3, u2, a2 = i2, c2 = 0, p2 = s2[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
6998 - for (p2.lastIndex = 0, t3 = t3.slice(-1 * e2.length + i2); (s2 = p2.exec(t3)) !== null; ) {
6999 - if (o3 = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !o3) continue;
7000 - if (u2 = [...o3].length, s2[3] || s2[4]) {
7001 - a2 += u2;
7070 + emStrong(e2, t2, n = "") {
7071 + let i = this.rules.inline.emStrongLDelim.exec(e2);
7072 + if (!i || !i[1] && !i[2] && !i[3] && !i[4] || i[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
7073 + if (!(i[1] || i[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
7074 + let o2 = [...i[0]].length - 1, s, u, a = o2, p2 = 0, c2 = i[0][0], h = n === c2, k2 = c2 === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
7075 + for (k2.lastIndex = 0, t2 = t2.slice(-1 * e2.length + o2); (i = k2.exec(t2)) !== null; ) {
7076 + if (s = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !s) continue;
7077 + if (u = [...s].length, i[3] || i[4]) {
7078 + a += u;
7002 7079 continue;
7003 - } else if ((s2[5] || s2[6]) && i2 % 3 && !((i2 + u2) % 3)) {
7004 - c2 += u2;
7005 - continue;
7080 + } else if (i[5] || i[6]) {
7081 + if (o2 % 3 && !((o2 + u) % 3)) {
7082 + p2 += u;
7083 + continue;
7084 + }
7085 + if (h) break;
7006 7086 }
7007 - if (a2 -= u2, a2 > 0) continue;
7008 - u2 = Math.min(u2, u2 + a2 + c2);
7009 - let k2 = [...s2[0]][0].length, h2 = e2.slice(0, i2 + s2.index + k2 + u2);
7010 - if (Math.min(i2, u2) % 2) {
7011 - let f2 = h2.slice(1, -1);
7012 - return { type: "em", raw: h2, text: f2, tokens: this.lexer.inlineTokens(f2) };
7087 + if (a -= u, a > 0) continue;
7088 + u = Math.min(u, u + a + p2);
7089 + let O = [...i[0]][0].length, g2 = e2.slice(0, o2 + i.index + O + u);
7090 + if (Math.min(o2, u) % 2) {
7091 + let z = g2.slice(1, -1);
7092 + return { type: "em", raw: g2, text: z, tokens: this.lexer.inlineTokens(z) };
7013 7093 }
7014 - let R = h2.slice(2, -2);
7015 - return { type: "strong", raw: h2, text: R, tokens: this.lexer.inlineTokens(R) };
7094 + let w2 = g2.slice(2, -2);
7095 + return { type: "strong", raw: g2, text: w2, tokens: this.lexer.inlineTokens(w2) };
7016 7096 }
7017 7097 }
7018 7098 }
7019 7099 codespan(e2) {
7020 - let t3 = this.rules.inline.code.exec(e2);
7021 - if (t3) {
7022 - let n2 = t3[2].replace(this.rules.other.newLineCharGlobal, " "), s2 = this.rules.other.nonSpaceChar.test(n2), r2 = this.rules.other.startingSpaceChar.test(n2) && this.rules.other.endingSpaceChar.test(n2);
7023 - return s2 && r2 && (n2 = n2.substring(1, n2.length - 1)), { type: "codespan", raw: t3[0], text: n2 };
7100 + let t2 = this.rules.inline.code.exec(e2);
7101 + if (t2) {
7102 + let n = t2[2].replace(this.rules.other.newLineCharGlobal, " "), i = this.rules.other.nonSpaceChar.test(n), r2 = this.rules.other.startingSpaceChar.test(n) && this.rules.other.endingSpaceChar.test(n);
7103 + return i && r2 && (n = n.substring(1, n.length - 1)), { type: "codespan", raw: t2[0], text: n };
7024 7104 }
7025 7105 }
7026 7106 br(e2) {
7027 - let t3 = this.rules.inline.br.exec(e2);
7028 - if (t3) return { type: "br", raw: t3[0] };
7107 + let t2 = this.rules.inline.br.exec(e2);
7108 + if (t2) return { type: "br", raw: t2[0] };
7029 7109 }
7030 - del(e2, t3, n2 = "") {
7031 - let s2 = this.rules.inline.delLDelim.exec(e2);
7032 - if (!s2) return;
7033 - if (!(s2[1] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
7034 - let i2 = [...s2[0]].length - 1, o3, u2, a2 = i2, c2 = this.rules.inline.delRDelim;
7035 - for (c2.lastIndex = 0, t3 = t3.slice(-1 * e2.length + i2); (s2 = c2.exec(t3)) !== null; ) {
7036 - if (o3 = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !o3 || (u2 = [...o3].length, u2 !== i2)) continue;
7037 - if (s2[3] || s2[4]) {
7038 - a2 += u2;
7110 + del(e2, t2, n = "") {
7111 + let i = this.rules.inline.delLDelim.exec(e2);
7112 + if (!i) return;
7113 + if (!(i[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
7114 + let o2 = [...i[0]].length - 1, s, u, a = o2, p2 = this.rules.inline.delRDelim;
7115 + for (p2.lastIndex = 0, t2 = t2.slice(-1 * e2.length + o2); (i = p2.exec(t2)) !== null; ) {
7116 + if (s = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !s || (u = [...s].length, u !== o2)) continue;
7117 + if (i[3] || i[4]) {
7118 + a += u;
7039 7119 continue;
7040 7120 }
7041 - if (a2 -= u2, a2 > 0) continue;
7042 - u2 = Math.min(u2, u2 + a2);
7043 - let p2 = [...s2[0]][0].length, k2 = e2.slice(0, i2 + s2.index + p2 + u2), h2 = k2.slice(i2, -i2);
7044 - return { type: "del", raw: k2, text: h2, tokens: this.lexer.inlineTokens(h2) };
7121 + if (a -= u, a > 0) continue;
7122 + u = Math.min(u, u + a);
7123 + let c2 = [...i[0]][0].length, h = e2.slice(0, o2 + i.index + c2 + u), k2 = h.slice(o2, -o2);
7124 + return { type: "del", raw: h, text: k2, tokens: this.lexer.inlineTokens(k2) };
7045 7125 }
7046 7126 }
7047 7127 }
7048 7128 autolink(e2) {
7049 - let t3 = this.rules.inline.autolink.exec(e2);
7050 - if (t3) {
7051 - let n2, s2;
7052 - return t3[2] === "@" ? (n2 = t3[1], s2 = "mailto:" + n2) : (n2 = t3[1], s2 = n2), { type: "link", raw: t3[0], text: n2, href: s2, tokens: [{ type: "text", raw: n2, text: n2 }] };
7129 + let t2 = this.rules.inline.autolink.exec(e2);
7130 + if (t2) {
7131 + let n, i;
7132 + return t2[2] === "@" ? (n = t2[1], i = "mailto:" + n) : (n = t2[1], i = n), { type: "link", raw: t2[0], text: n, href: i, autolink: true, tokens: [{ type: "text", raw: n, text: n }] };
7053 7133 }
7054 7134 }
7055 7135 url(e2) {
7056 - let t3;
7057 - if (t3 = this.rules.inline.url.exec(e2)) {
7058 - let n2, s2;
7059 - if (t3[2] === "@") n2 = t3[0], s2 = "mailto:" + n2;
7136 + let t2;
7137 + if (t2 = this.rules.inline.url.exec(e2)) {
7138 + let n, i;
7139 + if (t2[2] === "@") n = t2[0], i = "mailto:" + n;
7060 7140 else {
7061 7141 let r2;
7062 7142 do
7063 - r2 = t3[0], t3[0] = this.rules.inline._backpedal.exec(t3[0])?.[0] ?? "";
7064 - while (r2 !== t3[0]);
7065 - n2 = t3[0], t3[1] === "www." ? s2 = "http://" + t3[0] : s2 = t3[0];
7143 + r2 = t2[0], t2[0] = this.rules.inline._backpedal.exec(t2[0])?.[0] ?? "";
7144 + while (r2 !== t2[0]);
7145 + n = t2[0], t2[1] === "www." ? i = "http://" + t2[0] : i = t2[0];
7066 7146 }
7067 - return { type: "link", raw: t3[0], text: n2, href: s2, tokens: [{ type: "text", raw: n2, text: n2 }] };
7147 + return { type: "link", raw: t2[0], text: n, href: i, autolink: true, tokens: [{ type: "text", raw: n, text: n }] };
7068 7148 }
7069 7149 }
7070 7150 inlineText(e2) {
7071 - let t3 = this.rules.inline.text.exec(e2);
7072 - if (t3) {
7073 - let n2 = this.lexer.state.inRawBlock;
7074 - return { type: "text", raw: t3[0], text: t3[0], escaped: n2 };
7151 + let t2 = this.rules.inline.text.exec(e2);
7152 + if (t2) {
7153 + let n = this.lexer.state.inRawBlock;
7154 + return { type: "text", raw: t2[0], text: t2[0], escaped: n };
7075 7155 }
7076 7156 }
7077 7157 };
7078 7158 var x2 = class l2 {
@@ -7081,120 +7161,120 @@
7081 7161 state;
7082 7162 inlineQueue;
7083 7163 tokenizer;
7084 7164 constructor(e2) {
7085 - this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e2 || T, this.options.tokenizer = this.options.tokenizer || new w2(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
7086 - let t3 = { other: m2, block: B.normal, inline: A.normal };
7087 - this.options.pedantic ? (t3.block = B.pedantic, t3.inline = A.pedantic) : this.options.gfm && (t3.block = B.gfm, this.options.breaks ? t3.inline = A.breaks : t3.inline = A.gfm), this.tokenizer.rules = t3;
7165 + this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e2 || T, this.options.tokenizer = this.options.tokenizer || new y2(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, linkEmitted: false, top: true };
7166 + let t2 = { other: m2, block: G.normal, inline: B.normal };
7167 + this.options.pedantic ? (t2.block = G.pedantic, t2.inline = B.pedantic) : this.options.gfm && (t2.block = G.gfm, this.options.breaks ? t2.inline = B.breaks : t2.inline = B.gfm), this.tokenizer.rules = t2;
7088 7168 }
7089 7169 static get rules() {
7090 - return { block: B, inline: A };
7170 + return { block: G, inline: B };
7091 7171 }
7092 - static lex(e2, t3) {
7093 - return new l2(t3).lex(e2);
7172 + static lex(e2, t2) {
7173 + return new l2(t2).lex(e2);
7094 7174 }
7095 - static lexInline(e2, t3) {
7096 - return new l2(t3).inlineTokens(e2);
7175 + static lexInline(e2, t2) {
7176 + return new l2(t2).inlineTokens(e2);
7097 7177 }
7098 7178 lex(e2) {
7099 7179 e2 = e2.replace(m2.carriageReturn, `
7100 7180 `), this.blockTokens(e2, this.tokens);
7101 - for (let t3 = 0; t3 < this.inlineQueue.length; t3++) {
7102 - let n2 = this.inlineQueue[t3];
7103 - this.inlineTokens(n2.src, n2.tokens);
7181 + for (let t2 = 0; t2 < this.inlineQueue.length; t2++) {
7182 + let n = this.inlineQueue[t2];
7183 + this.inlineTokens(n.src, n.tokens);
7104 7184 }
7105 7185 return this.inlineQueue = [], this.tokens;
7106 7186 }
7107 - blockTokens(e2, t3 = [], n2 = false) {
7187 + blockTokens(e2, t2 = [], n = false) {
7108 7188 this.tokenizer.lexer = this, this.options.pedantic && (e2 = e2.replace(m2.tabCharGlobal, " ").replace(m2.spaceLine, ""));
7109 - let s2 = 1 / 0;
7189 + let i = 1 / 0;
7110 7190 for (; e2; ) {
7111 - if (e2.length < s2) s2 = e2.length;
7191 + if (e2.length < i) i = e2.length;
7112 7192 else {
7113 7193 this.infiniteLoopError(e2.charCodeAt(0));
7114 7194 break;
7115 7195 }
7116 7196 let r2;
7117 - if (this.options.extensions?.block?.some((o3) => (r2 = o3.call({ lexer: this }, e2, t3)) ? (e2 = e2.substring(r2.raw.length), t3.push(r2), true) : false)) continue;
7197 + if (this.options.extensions?.block?.some((s) => (r2 = s.call({ lexer: this }, e2, t2)) ? (e2 = e2.substring(r2.raw.length), t2.push(r2), true) : false)) continue;
7118 7198 if (r2 = this.tokenizer.space(e2)) {
7119 7199 e2 = e2.substring(r2.raw.length);
7120 - let o3 = t3.at(-1);
7121 - r2.raw.length === 1 && o3 !== void 0 ? o3.raw += `
7122 -` : t3.push(r2);
7200 + let s = t2.at(-1);
7201 + r2.raw.length === 1 && s !== void 0 ? s.raw += `
7202 +` : t2.push(r2);
7123 7203 continue;
7124 7204 }
7125 7205 if (r2 = this.tokenizer.code(e2)) {
7126 7206 e2 = e2.substring(r2.raw.length);
7127 - let o3 = t3.at(-1);
7128 - o3?.type === "paragraph" || o3?.type === "text" ? (o3.raw += (o3.raw.endsWith(`
7207 + let s = t2.at(-1);
7208 + s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
7129 7209 `) ? "" : `
7130 -`) + r2.raw, o3.text += `
7131 -` + r2.text, this.inlineQueue.at(-1).src = o3.text) : t3.push(r2);
7210 +`) + r2.raw, s.text += `
7211 +` + r2.text, this.inlineQueue.at(-1).src = s.text) : t2.push(r2);
7132 7212 continue;
7133 7213 }
7134 7214 if (r2 = this.tokenizer.fences(e2)) {
7135 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7215 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7136 7216 continue;
7137 7217 }
7138 7218 if (r2 = this.tokenizer.heading(e2)) {
7139 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7219 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7140 7220 continue;
7141 7221 }
7142 7222 if (r2 = this.tokenizer.hr(e2)) {
7143 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7223 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7144 7224 continue;
7145 7225 }
7146 7226 if (r2 = this.tokenizer.blockquote(e2)) {
7147 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7227 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7148 7228 continue;
7149 7229 }
7150 7230 if (r2 = this.tokenizer.list(e2)) {
7151 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7231 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7152 7232 continue;
7153 7233 }
7154 7234 if (r2 = this.tokenizer.html(e2)) {
7155 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7235 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7156 7236 continue;
7157 7237 }
7158 7238 if (r2 = this.tokenizer.def(e2)) {
7159 7239 e2 = e2.substring(r2.raw.length);
7160 - let o3 = t3.at(-1);
7161 - o3?.type === "paragraph" || o3?.type === "text" ? (o3.raw += (o3.raw.endsWith(`
7240 + let s = t2.at(-1);
7241 + s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
7162 7242 `) ? "" : `
7163 -`) + r2.raw, o3.text += `
7164 -` + r2.raw, this.inlineQueue.at(-1).src = o3.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title }, t3.push(r2));
7243 +`) + r2.raw, s.text += `
7244 +` + r2.raw, this.inlineQueue.at(-1).src = s.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title }, t2.push(r2));
7165 7245 continue;
7166 7246 }
7167 7247 if (r2 = this.tokenizer.table(e2)) {
7168 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7248 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7169 7249 continue;
7170 7250 }
7171 7251 if (r2 = this.tokenizer.lheading(e2)) {
7172 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7252 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7173 7253 continue;
7174 7254 }
7175 - let i2 = e2;
7255 + let o2 = e2;
7176 7256 if (this.options.extensions?.startBlock) {
7177 - let o3 = 1 / 0, u2 = e2.slice(1), a2;
7178 - this.options.extensions.startBlock.forEach((c2) => {
7179 - a2 = c2.call({ lexer: this }, u2), typeof a2 == "number" && a2 >= 0 && (o3 = Math.min(o3, a2));
7180 - }), o3 < 1 / 0 && o3 >= 0 && (i2 = e2.substring(0, o3 + 1));
7257 + let s = 1 / 0, u = e2.slice(1), a;
7258 + this.options.extensions.startBlock.forEach((p2) => {
7259 + a = p2.call({ lexer: this }, u), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
7260 + }), s < 1 / 0 && s >= 0 && (o2 = e2.substring(0, s + 1));
7181 7261 }
7182 - if (this.state.top && (r2 = this.tokenizer.paragraph(i2))) {
7183 - let o3 = t3.at(-1);
7184 - n2 && o3?.type === "paragraph" ? (o3.raw += (o3.raw.endsWith(`
7262 + if (this.state.top && (r2 = this.tokenizer.paragraph(o2))) {
7263 + let s = t2.at(-1);
7264 + n && s?.type === "paragraph" ? (s.raw += (s.raw.endsWith(`
7185 7265 `) ? "" : `
7186 -`) + r2.raw, o3.text += `
7187 -` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = o3.text) : t3.push(r2), n2 = i2.length !== e2.length, e2 = e2.substring(r2.raw.length);
7266 +`) + r2.raw, s.text += `
7267 +` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t2.push(r2), n = o2.length !== e2.length, e2 = e2.substring(r2.raw.length);
7188 7268 continue;
7189 7269 }
7190 7270 if (r2 = this.tokenizer.text(e2)) {
7191 7271 e2 = e2.substring(r2.raw.length);
7192 - let o3 = t3.at(-1);
7193 - o3?.type === "text" ? (o3.raw += (o3.raw.endsWith(`
7272 + let s = t2.at(-1);
7273 + s?.type === "text" ? (s.raw += (s.raw.endsWith(`
7194 7274 `) ? "" : `
7195 -`) + r2.raw, o3.text += `
7196 -` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = o3.text) : t3.push(r2);
7275 +`) + r2.raw, s.text += `
7276 +` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t2.push(r2);
7197 7277 continue;
7198 7278 }
7199 7279 if (e2) {
7200 7280 this.infiniteLoopError(e2.charCodeAt(0));
@@ -7200,87 +7280,105 @@
7200 7280 this.infiniteLoopError(e2.charCodeAt(0));
7201 7281 break;
7202 7282 }
7203 7283 }
7204 - return this.state.top = true, t3;
7284 + return this.state.top = true, t2;
7205 7285 }
7206 - inline(e2, t3 = []) {
7207 - return this.inlineQueue.push({ src: e2, tokens: t3 }), t3;
7286 + inline(e2, t2 = []) {
7287 + return this.inlineQueue.push({ src: e2, tokens: t2 }), t2;
7208 7288 }
7209 - inlineTokens(e2, t3 = []) {
7289 + linkInText(e2) {
7290 + if (!e2.includes("[")) return false;
7291 + let t2 = this.tokenizer.rules.inline.link;
7292 + for (let n of e2.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t2.test(n[0]) && e2.charAt(n.index - 1) !== "!") return true;
7293 + for (let n of e2.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
7294 + let i = n[0], r2 = i.lastIndexOf("[");
7295 + if (!(i.charAt(0) === "!" || !Object.hasOwn(this.tokens.links, D2(i.slice(r2 + 1, -1)))) && !(r2 > 1 && this.linkInText(i.slice(1, r2 - 1)))) return true;
7296 + }
7297 + return false;
7298 + }
7299 + inlineTokens(e2, t2 = []) {
7210 7300 this.tokenizer.lexer = this;
7211 - let n2 = e2, s2 = null;
7212 - if (this.tokens.links) {
7213 - let a2 = Object.keys(this.tokens.links);
7214 - if (a2.length > 0) for (; (s2 = this.tokenizer.rules.inline.reflinkSearch.exec(n2)) !== null; ) a2.includes(s2[0].slice(s2[0].lastIndexOf("[") + 1, -1)) && (n2 = n2.slice(0, s2.index) + "[" + "a".repeat(s2[0].length - 2) + "]" + n2.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
7301 + let n = e2;
7302 + if (this.tokens.links && e2.includes("[")) {
7303 + let s = this.tokenizer.rules.inline.reflinkSearch, u = (a) => {
7304 + let p2 = a.lastIndexOf("[");
7305 + if (!Object.hasOwn(this.tokens.links, D2(a.slice(p2 + 1, -1)))) return a;
7306 + if (p2 > 1 && a.charAt(0) !== "!") {
7307 + let c2 = a.slice(1, p2 - 1);
7308 + if (this.linkInText(c2)) return "[" + c2.replace(s, u) + "][" + "a".repeat(a.length - p2 - 2) + "]";
7309 + }
7310 + return "[" + "a".repeat(a.length - 2) + "]";
7311 + };
7312 + n = n.replace(s, u);
7215 7313 }
7216 - for (; (s2 = this.tokenizer.rules.inline.anyPunctuation.exec(n2)) !== null; ) n2 = n2.slice(0, s2.index) + "++" + n2.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
7217 - let r2;
7218 - for (; (s2 = this.tokenizer.rules.inline.blockSkip.exec(n2)) !== null; ) r2 = s2[2] ? s2[2].length : 0, n2 = n2.slice(0, s2.index + r2) + "[" + "a".repeat(s2[0].length - r2 - 2) + "]" + n2.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
7219 - n2 = this.options.hooks?.emStrongMask?.call({ lexer: this }, n2) ?? n2;
7220 - let i2 = false, o3 = "", u2 = 1 / 0;
7314 + n = n.replace(this.tokenizer.rules.inline.anyPunctuation, (s) => "+".repeat(s.length)), n = n.replace(this.tokenizer.rules.inline.blockSkip, (s, u, a) => {
7315 + let p2 = a ? a.length : 0;
7316 + return s.slice(0, p2) + "[" + "a".repeat(s.length - p2 - 2) + "]";
7317 + }), n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
7318 + let i = false, r2 = "", o2 = 1 / 0;
7221 7319 for (; e2; ) {
7222 - if (e2.length < u2) u2 = e2.length;
7320 + if (e2.length < o2) o2 = e2.length;
7223 7321 else {
7224 7322 this.infiniteLoopError(e2.charCodeAt(0));
7225 7323 break;
7226 7324 }
7227 - i2 || (o3 = ""), i2 = false;
7228 - let a2;
7229 - if (this.options.extensions?.inline?.some((p2) => (a2 = p2.call({ lexer: this }, e2, t3)) ? (e2 = e2.substring(a2.raw.length), t3.push(a2), true) : false)) continue;
7230 - if (a2 = this.tokenizer.escape(e2)) {
7231 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7325 + i || (r2 = ""), i = false;
7326 + let s;
7327 + if (this.options.extensions?.inline?.some((a) => (s = a.call({ lexer: this }, e2, t2)) ? (e2 = e2.substring(s.raw.length), t2.push(s), true) : false)) continue;
7328 + if (s = this.tokenizer.escape(e2)) {
7329 + e2 = e2.substring(s.raw.length), t2.push(s);
7232 7330 continue;
7233 7331 }
7234 - if (a2 = this.tokenizer.tag(e2)) {
7235 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7332 + if (s = this.tokenizer.tag(e2)) {
7333 + e2 = e2.substring(s.raw.length), t2.push(s);
7236 7334 continue;
7237 7335 }
7238 - if (a2 = this.tokenizer.link(e2)) {
7239 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7336 + if (s = this.tokenizer.link(e2)) {
7337 + e2 = e2.substring(s.raw.length), t2.push(s);
7240 7338 continue;
7241 7339 }
7242 - if (a2 = this.tokenizer.reflink(e2, this.tokens.links)) {
7243 - e2 = e2.substring(a2.raw.length);
7244 - let p2 = t3.at(-1);
7245 - a2.type === "text" && p2?.type === "text" ? (p2.raw += a2.raw, p2.text += a2.text) : t3.push(a2);
7340 + if (s = this.tokenizer.reflink(e2, this.tokens.links)) {
7341 + e2 = e2.substring(s.raw.length);
7342 + let a = t2.at(-1);
7343 + s.type === "text" && a?.type === "text" ? (a.raw += s.raw, a.text += s.text) : t2.push(s);
7246 7344 continue;
7247 7345 }
7248 - if (a2 = this.tokenizer.emStrong(e2, n2, o3)) {
7249 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7346 + if (s = this.tokenizer.emStrong(e2, n, r2)) {
7347 + e2 = e2.substring(s.raw.length), t2.push(s);
7250 7348 continue;
7251 7349 }
7252 - if (a2 = this.tokenizer.codespan(e2)) {
7253 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7350 + if (s = this.tokenizer.codespan(e2)) {
7351 + e2 = e2.substring(s.raw.length), t2.push(s);
7254 7352 continue;
7255 7353 }
7256 - if (a2 = this.tokenizer.br(e2)) {
7257 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7354 + if (s = this.tokenizer.br(e2)) {
7355 + e2 = e2.substring(s.raw.length), t2.push(s);
7258 7356 continue;
7259 7357 }
7260 - if (a2 = this.tokenizer.del(e2, n2, o3)) {
7261 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7358 + if (s = this.tokenizer.del(e2, n, r2)) {
7359 + e2 = e2.substring(s.raw.length), t2.push(s);
7262 7360 continue;
7263 7361 }
7264 - if (a2 = this.tokenizer.autolink(e2)) {
7265 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7362 + if (s = this.tokenizer.autolink(e2)) {
7363 + e2 = e2.substring(s.raw.length), t2.push(s);
7266 7364 continue;
7267 7365 }
7268 - if (!this.state.inLink && (a2 = this.tokenizer.url(e2))) {
7269 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7366 + if (!this.state.inLink && (s = this.tokenizer.url(e2))) {
7367 + e2 = e2.substring(s.raw.length), t2.push(s);
7270 7368 continue;
7271 7369 }
7272 - let c2 = e2;
7370 + let u = e2;
7273 7371 if (this.options.extensions?.startInline) {
7274 - let p2 = 1 / 0, k2 = e2.slice(1), h2;
7275 - this.options.extensions.startInline.forEach((R) => {
7276 - h2 = R.call({ lexer: this }, k2), typeof h2 == "number" && h2 >= 0 && (p2 = Math.min(p2, h2));
7277 - }), p2 < 1 / 0 && p2 >= 0 && (c2 = e2.substring(0, p2 + 1));
7372 + let a = 1 / 0, p2 = e2.slice(1), c2;
7373 + this.options.extensions.startInline.forEach((h) => {
7374 + c2 = h.call({ lexer: this }, p2), typeof c2 == "number" && c2 >= 0 && (a = Math.min(a, c2));
7375 + }), a < 1 / 0 && a >= 0 && (u = e2.substring(0, a + 1));
7278 7376 }
7279 - if (a2 = this.tokenizer.inlineText(c2)) {
7280 - e2 = e2.substring(a2.raw.length), a2.raw.slice(-1) !== "_" && (o3 = a2.raw.slice(-1)), i2 = true;
7281 - let p2 = t3.at(-1);
7282 - p2?.type === "text" ? (p2.raw += a2.raw, p2.text += a2.text) : t3.push(a2);
7377 + if (s = this.tokenizer.inlineText(u)) {
7378 + e2 = e2.substring(s.raw.length), s.raw.slice(-1) !== "_" && (r2 = s.raw.slice(-1)), i = true;
7379 + let a = t2.at(-1);
7380 + a?.type === "text" ? (a.raw += s.raw, a.text += s.text) : t2.push(s);
7283 7381 continue;
7284 7382 }
7285 7383 if (e2) {
7286 7384 this.infiniteLoopError(e2.charCodeAt(0));
@@ -7286,17 +7384,17 @@
7286 7384 this.infiniteLoopError(e2.charCodeAt(0));
7287 7385 break;
7288 7386 }
7289 7387 }
7290 - return t3;
7388 + return t2;
7291 7389 }
7292 7390 infiniteLoopError(e2) {
7293 - let t3 = "Infinite loop on byte: " + e2;
7294 - if (this.options.silent) console.error(t3);
7295 - else throw new Error(t3);
7391 + let t2 = "Infinite loop on byte: " + e2;
7392 + if (this.options.silent) console.error(t2);
7393 + else throw new Error(t2);
7296 7394 }
7297 7395 };
7298 - var y2 = class {
7396 + var P = class {
7299 7397 options;
7300 7398 parser;
7301 7399 constructor(e2) {
7302 7400 this.options = e2 || T;
@@ -7303,14 +7401,14 @@
7303 7401 }
7304 7402 space(e2) {
7305 7403 return "";
7306 7404 }
7307 - code({ text: e2, lang: t3, escaped: n2 }) {
7308 - let s2 = (t3 || "").match(m2.notSpaceStart)?.[0], r2 = e2.replace(m2.endingNewline, "") + `
7405 + code({ text: e2, lang: t2, escaped: n }) {
7406 + let i = (t2 || "").match(m2.notSpaceStart)?.[0], r2 = e2 ? e2.replace(m2.endingNewline, "") + `
7407 +` : "";
7408 + return i ? '<pre><code class="language-' + R2(i) + '">' + (n ? r2 : R2(r2, true)) + `</code></pre>
7409 +` : "<pre><code>" + (n ? r2 : R2(r2, true)) + `</code></pre>
7309 7410 `;
7310 - return s2 ? '<pre><code class="language-' + O(s2) + '">' + (n2 ? r2 : O(r2, true)) + `</code></pre>
7311 -` : "<pre><code>" + (n2 ? r2 : O(r2, true)) + `</code></pre>
7312 -`;
7313 7411 }
7314 7412 blockquote({ tokens: e2 }) {
7315 7413 return `<blockquote>
7316 7414 ${this.parser.parse(e2)}</blockquote>
@@ -7321,10 +7419,10 @@
7321 7419 }
7322 7420 def(e2) {
7323 7421 return "";
7324 7422 }
7325 - heading({ tokens: e2, depth: t3 }) {
7326 - return `<h${t3}>${this.parser.parseInline(e2)}</h${t3}>
7423 + heading({ tokens: e2, depth: t2 }) {
7424 + return `<h${t2}>${this.parser.parseInline(e2)}</h${t2}>
7327 7425 `;
7328 7426 }
7329 7427 hr(e2) {
7330 7428 return `<hr>
@@ -7330,16 +7428,16 @@
7330 7428 return `<hr>
7331 7429 `;
7332 7430 }
7333 7431 list(e2) {
7334 - let t3 = e2.ordered, n2 = e2.start, s2 = "";
7335 - for (let o3 = 0; o3 < e2.items.length; o3++) {
7336 - let u2 = e2.items[o3];
7337 - s2 += this.listitem(u2);
7432 + let t2 = e2.ordered, n = e2.start, i = "";
7433 + for (let s = 0; s < e2.items.length; s++) {
7434 + let u = e2.items[s];
7435 + i += this.listitem(u);
7338 7436 }
7339 - let r2 = t3 ? "ol" : "ul", i2 = t3 && n2 !== 1 ? ' start="' + n2 + '"' : "";
7340 - return "<" + r2 + i2 + `>
7341 -` + s2 + "</" + r2 + `>
7437 + let r2 = t2 ? "ol" : "ul", o2 = t2 && n !== 1 ? ' start="' + n + '"' : "";
7438 + return "<" + r2 + o2 + `>
7439 +` + i + "</" + r2 + `>
7342 7440 `;
7343 7441 }
7344 7442 listitem(e2) {
7345 7443 return `<li>${this.parser.parse(e2.tokens)}</li>
@@ -7352,22 +7450,22 @@
7352 7450 return `<p>${this.parser.parseInline(e2)}</p>
7353 7451 `;
7354 7452 }
7355 7453 table(e2) {
7356 - let t3 = "", n2 = "";
7357 - for (let r2 = 0; r2 < e2.header.length; r2++) n2 += this.tablecell(e2.header[r2]);
7358 - t3 += this.tablerow({ text: n2 });
7359 - let s2 = "";
7454 + let t2 = "", n = "";
7455 + for (let r2 = 0; r2 < e2.header.length; r2++) n += this.tablecell(e2.header[r2]);
7456 + t2 += this.tablerow({ text: n });
7457 + let i = "";
7360 7458 for (let r2 = 0; r2 < e2.rows.length; r2++) {
7361 - let i2 = e2.rows[r2];
7362 - n2 = "";
7363 - for (let o3 = 0; o3 < i2.length; o3++) n2 += this.tablecell(i2[o3]);
7364 - s2 += this.tablerow({ text: n2 });
7459 + let o2 = e2.rows[r2];
7460 + n = "";
7461 + for (let s = 0; s < o2.length; s++) n += this.tablecell(o2[s]);
7462 + i += this.tablerow({ text: n });
7365 7463 }
7366 - return s2 && (s2 = `<tbody>${s2}</tbody>`), `<table>
7464 + return i && (i = `<tbody>${i}</tbody>`), `<table>
7367 7465 <thead>
7368 -` + t3 + `</thead>
7369 -` + s2 + `</table>
7466 +` + t2 + `</thead>
7467 +` + i + `</table>
7370 7468 `;
7371 7469 }
7372 7470 tablerow({ text: e2 }) {
7373 7471 return `<tr>
@@ -7374,10 +7472,10 @@
7374 7472 ${e2}</tr>
7375 7473 `;
7376 7474 }
7377 7475 tablecell(e2) {
7378 - let t3 = this.parser.parseInline(e2.tokens), n2 = e2.header ? "th" : "td";
7379 - return (e2.align ? `<${n2} align="${e2.align}">` : `<${n2}>`) + t3 + `</${n2}>
7476 + let t2 = this.parser.parseInline(e2.tokens), n = e2.header ? "th" : "td";
7477 + return (e2.align ? `<${n} align="${e2.align}">` : `<${n}>`) + t2 + `</${n}>
7380 7478 `;
7381 7479 }
7382 7480 strong({ tokens: e2 }) {
7383 7481 return `<strong>${this.parser.parseInline(e2)}</strong>`;
@@ -7385,9 +7483,9 @@
7385 7483 em({ tokens: e2 }) {
7386 7484 return `<em>${this.parser.parseInline(e2)}</em>`;
7387 7485 }
7388 7486 codespan({ text: e2 }) {
7389 - return `<code>${O(e2, true)}</code>`;
7487 + return `<code>${R2(e2, true)}</code>`;
7390 7488 }
7391 7489 br(e2) {
7392 7490 return "<br>";
7393 7491 }
@@ -7393,25 +7491,25 @@
7393 7491 }
7394 7492 del({ tokens: e2 }) {
7395 7493 return `<del>${this.parser.parseInline(e2)}</del>`;
7396 7494 }
7397 - link({ href: e2, title: t3, tokens: n2 }) {
7398 - let s2 = this.parser.parseInline(n2), r2 = J(e2);
7399 - if (r2 === null) return s2;
7400 - e2 = r2;
7401 - let i2 = '<a href="' + e2 + '"';
7402 - return t3 && (i2 += ' title="' + O(t3) + '"'), i2 += ">" + s2 + "</a>", i2;
7495 + link({ href: e2, title: t2, text: n, tokens: i, autolink: r2 }) {
7496 + let o2 = r2 ? R2(n, true) : this.parser.parseInline(i), s = ee(e2);
7497 + if (s === null) return o2;
7498 + e2 = R2(s, r2);
7499 + let u = '<a href="' + e2 + '"';
7500 + return t2 && (u += ' title="' + R2(t2) + '"'), u += ">" + o2 + "</a>", u;
7403 7501 }
7404 - image({ href: e2, title: t3, text: n2, tokens: s2 }) {
7405 - s2 && (n2 = this.parser.parseInline(s2, this.parser.textRenderer));
7406 - let r2 = J(e2);
7407 - if (r2 === null) return O(n2);
7502 + image({ href: e2, title: t2, text: n, tokens: i }) {
7503 + i && (n = this.parser.parseInline(i, this.parser.textRenderer));
7504 + let r2 = ee(e2);
7505 + if (r2 === null) return R2(n);
7408 7506 e2 = r2;
7409 - let i2 = `<img src="${e2}" alt="${O(n2)}"`;
7410 - return t3 && (i2 += ` title="${O(t3)}"`), i2 += ">", i2;
7507 + let o2 = `<img src="${R2(e2)}" alt="${R2(n)}"`;
7508 + return t2 && (o2 += ` title="${R2(t2)}"`), o2 += ">", o2;
7411 7509 }
7412 7510 text(e2) {
7413 - return "tokens" in e2 && e2.tokens ? this.parser.parseInline(e2.tokens) : "escaped" in e2 && e2.escaped ? e2.text : O(e2.text);
7511 + return "tokens" in e2 && e2.tokens ? this.parser.parseInline(e2.tokens) : "escaped" in e2 && e2.escaped ? e2.text : R2(e2.text);
7414 7512 }
7415 7513 };
7416 7514 var L = class {
7417 7515 strong({ text: e2 }) {
@@ -7444,161 +7542,161 @@
7444 7542 checkbox({ raw: e2 }) {
7445 7543 return e2;
7446 7544 }
7447 7545 };
7448 - var b2 = class l3 {
7546 + var b = class l3 {
7449 7547 options;
7450 7548 renderer;
7451 7549 textRenderer;
7452 7550 constructor(e2) {
7453 - this.options = e2 || T, this.options.renderer = this.options.renderer || new y2(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
7551 + this.options = e2 || T, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
7454 7552 }
7455 - static parse(e2, t3) {
7456 - return new l3(t3).parse(e2);
7553 + static parse(e2, t2) {
7554 + return new l3(t2).parse(e2);
7457 7555 }
7458 - static parseInline(e2, t3) {
7459 - return new l3(t3).parseInline(e2);
7556 + static parseInline(e2, t2) {
7557 + return new l3(t2).parseInline(e2);
7460 7558 }
7461 7559 parse(e2) {
7462 7560 this.renderer.parser = this;
7463 - let t3 = "";
7464 - for (let n2 = 0; n2 < e2.length; n2++) {
7465 - let s2 = e2[n2];
7466 - if (this.options.extensions?.renderers?.[s2.type]) {
7467 - let i2 = s2, o3 = this.options.extensions.renderers[i2.type].call({ parser: this }, i2);
7468 - if (o3 !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(i2.type)) {
7469 - t3 += o3 || "";
7561 + let t2 = "";
7562 + for (let n = 0; n < e2.length; n++) {
7563 + let i = e2[n];
7564 + if (this.options.extensions?.renderers?.[i.type]) {
7565 + let o2 = i, s = this.options.extensions.renderers[o2.type].call({ parser: this }, o2);
7566 + if (s !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(o2.type)) {
7567 + t2 += s || "";
7470 7568 continue;
7471 7569 }
7472 7570 }
7473 - let r2 = s2;
7571 + let r2 = i;
7474 7572 switch (r2.type) {
7475 7573 case "space": {
7476 - t3 += this.renderer.space(r2);
7574 + t2 += this.renderer.space(r2);
7477 7575 break;
7478 7576 }
7479 7577 case "hr": {
7480 - t3 += this.renderer.hr(r2);
7578 + t2 += this.renderer.hr(r2);
7481 7579 break;
7482 7580 }
7483 7581 case "heading": {
7484 - t3 += this.renderer.heading(r2);
7582 + t2 += this.renderer.heading(r2);
7485 7583 break;
7486 7584 }
7487 7585 case "code": {
7488 - t3 += this.renderer.code(r2);
7586 + t2 += this.renderer.code(r2);
7489 7587 break;
7490 7588 }
7491 7589 case "table": {
7492 - t3 += this.renderer.table(r2);
7590 + t2 += this.renderer.table(r2);
7493 7591 break;
7494 7592 }
7495 7593 case "blockquote": {
7496 - t3 += this.renderer.blockquote(r2);
7594 + t2 += this.renderer.blockquote(r2);
7497 7595 break;
7498 7596 }
7499 7597 case "list": {
7500 - t3 += this.renderer.list(r2);
7598 + t2 += this.renderer.list(r2);
7501 7599 break;
7502 7600 }
7503 7601 case "checkbox": {
7504 - t3 += this.renderer.checkbox(r2);
7602 + t2 += this.renderer.checkbox(r2);
7505 7603 break;
7506 7604 }
7507 7605 case "html": {
7508 - t3 += this.renderer.html(r2);
7606 + t2 += this.renderer.html(r2);
7509 7607 break;
7510 7608 }
7511 7609 case "def": {
7512 - t3 += this.renderer.def(r2);
7610 + t2 += this.renderer.def(r2);
7513 7611 break;
7514 7612 }
7515 7613 case "paragraph": {
7516 - t3 += this.renderer.paragraph(r2);
7614 + t2 += this.renderer.paragraph(r2);
7517 7615 break;
7518 7616 }
7519 7617 case "text": {
7520 - t3 += this.renderer.text(r2);
7618 + t2 += this.renderer.text(r2);
7521 7619 break;
7522 7620 }
7523 7621 default: {
7524 - let i2 = 'Token with "' + r2.type + '" type was not found.';
7525 - if (this.options.silent) return console.error(i2), "";
7526 - throw new Error(i2);
7622 + let o2 = 'Token with "' + r2.type + '" type was not found.';
7623 + if (this.options.silent) return console.error(o2), "";
7624 + throw new Error(o2);
7527 7625 }
7528 7626 }
7529 7627 }
7530 - return t3;
7628 + return t2;
7531 7629 }
7532 - parseInline(e2, t3 = this.renderer) {
7630 + parseInline(e2, t2 = this.renderer) {
7533 7631 this.renderer.parser = this;
7534 - let n2 = "";
7535 - for (let s2 = 0; s2 < e2.length; s2++) {
7536 - let r2 = e2[s2];
7632 + let n = "";
7633 + for (let i = 0; i < e2.length; i++) {
7634 + let r2 = e2[i];
7537 7635 if (this.options.extensions?.renderers?.[r2.type]) {
7538 - let o3 = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
7539 - if (o3 !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
7540 - n2 += o3 || "";
7636 + let s = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
7637 + if (s !== false || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
7638 + n += s || "";
7541 7639 continue;
7542 7640 }
7543 7641 }
7544 - let i2 = r2;
7545 - switch (i2.type) {
7642 + let o2 = r2;
7643 + switch (o2.type) {
7546 7644 case "escape": {
7547 - n2 += t3.text(i2);
7645 + n += t2.text(o2);
7548 7646 break;
7549 7647 }
7550 7648 case "html": {
7551 - n2 += t3.html(i2);
7649 + n += t2.html(o2);
7552 7650 break;
7553 7651 }
7554 7652 case "link": {
7555 - n2 += t3.link(i2);
7653 + n += t2.link(o2);
7556 7654 break;
7557 7655 }
7558 7656 case "image": {
7559 - n2 += t3.image(i2);
7657 + n += t2.image(o2);
7560 7658 break;
7561 7659 }
7562 7660 case "checkbox": {
7563 - n2 += t3.checkbox(i2);
7661 + n += t2.checkbox(o2);
7564 7662 break;
7565 7663 }
7566 7664 case "strong": {
7567 - n2 += t3.strong(i2);
7665 + n += t2.strong(o2);
7568 7666 break;
7569 7667 }
7570 7668 case "em": {
7571 - n2 += t3.em(i2);
7669 + n += t2.em(o2);
7572 7670 break;
7573 7671 }
7574 7672 case "codespan": {
7575 - n2 += t3.codespan(i2);
7673 + n += t2.codespan(o2);
7576 7674 break;
7577 7675 }
7578 7676 case "br": {
7579 - n2 += t3.br(i2);
7677 + n += t2.br(o2);
7580 7678 break;
7581 7679 }
7582 7680 case "del": {
7583 - n2 += t3.del(i2);
7681 + n += t2.del(o2);
7584 7682 break;
7585 7683 }
7586 7684 case "text": {
7587 - n2 += t3.text(i2);
7685 + n += t2.text(o2);
7588 7686 break;
7589 7687 }
7590 7688 default: {
7591 - let o3 = 'Token with "' + i2.type + '" type was not found.';
7592 - if (this.options.silent) return console.error(o3), "";
7593 - throw new Error(o3);
7689 + let s = 'Token with "' + o2.type + '" type was not found.';
7690 + if (this.options.silent) return console.error(s), "";
7691 + throw new Error(s);
7594 7692 }
7595 7693 }
7596 7694 }
7597 - return n2;
7695 + return n;
7598 7696 }
7599 7697 };
7600 - var P = class {
7698 + var S = class {
7601 7699 options;
7602 7700 block;
7603 7701 constructor(e2) {
7604 7702 this.options = e2 || T;
@@ -7620,210 +7718,210 @@
7620 7718 provideLexer(e2 = this.block) {
7621 7719 return e2 ? x2.lex : x2.lexInline;
7622 7720 }
7623 7721 provideParser(e2 = this.block) {
7624 - return e2 ? b2.parse : b2.parseInline;
7722 + return e2 ? b.parse : b.parseInline;
7625 7723 }
7626 7724 };
7627 - var D = class {
7628 - defaults = z();
7725 + var Q = class {
7726 + defaults = A2();
7629 7727 options = this.setOptions;
7630 7728 parse = this.parseMarkdown(true);
7631 7729 parseInline = this.parseMarkdown(false);
7632 - Parser = b2;
7633 - Renderer = y2;
7730 + Parser = b;
7731 + Renderer = P;
7634 7732 TextRenderer = L;
7635 7733 Lexer = x2;
7636 - Tokenizer = w2;
7637 - Hooks = P;
7734 + Tokenizer = y2;
7735 + Hooks = S;
7638 7736 constructor(...e2) {
7639 7737 this.use(...e2);
7640 7738 }
7641 - walkTokens(e2, t3) {
7642 - let n2 = [];
7643 - for (let s2 of e2) switch (n2 = n2.concat(t3.call(this, s2)), s2.type) {
7739 + walkTokens(e2, t2) {
7740 + let n = [];
7741 + for (let i of e2) switch (n = n.concat(t2.call(this, i)), i.type) {
7644 7742 case "table": {
7645 - let r2 = s2;
7646 - for (let i2 of r2.header) n2 = n2.concat(this.walkTokens(i2.tokens, t3));
7647 - for (let i2 of r2.rows) for (let o3 of i2) n2 = n2.concat(this.walkTokens(o3.tokens, t3));
7743 + let r2 = i;
7744 + for (let o2 of r2.header) n = n.concat(this.walkTokens(o2.tokens, t2));
7745 + for (let o2 of r2.rows) for (let s of o2) n = n.concat(this.walkTokens(s.tokens, t2));
7648 7746 break;
7649 7747 }
7650 7748 case "list": {
7651 - let r2 = s2;
7652 - n2 = n2.concat(this.walkTokens(r2.items, t3));
7749 + let r2 = i;
7750 + n = n.concat(this.walkTokens(r2.items, t2));
7653 7751 break;
7654 7752 }
7655 7753 default: {
7656 - let r2 = s2;
7657 - this.defaults.extensions?.childTokens?.[r2.type] ? this.defaults.extensions.childTokens[r2.type].forEach((i2) => {
7658 - let o3 = r2[i2].flat(1 / 0);
7659 - n2 = n2.concat(this.walkTokens(o3, t3));
7660 - }) : r2.tokens && (n2 = n2.concat(this.walkTokens(r2.tokens, t3)));
7754 + let r2 = i;
7755 + this.defaults.extensions?.childTokens?.[r2.type] ? this.defaults.extensions.childTokens[r2.type].forEach((o2) => {
7756 + let s = r2[o2].flat(1 / 0);
7757 + n = n.concat(this.walkTokens(s, t2));
7758 + }) : r2.tokens && (n = n.concat(this.walkTokens(r2.tokens, t2)));
7661 7759 }
7662 7760 }
7663 - return n2;
7761 + return n;
7664 7762 }
7665 7763 use(...e2) {
7666 - let t3 = this.defaults.extensions || { renderers: {}, childTokens: {} };
7667 - return e2.forEach((n2) => {
7668 - let s2 = { ...n2 };
7669 - if (s2.async = this.defaults.async || s2.async || false, n2.extensions && (n2.extensions.forEach((r2) => {
7764 + let t2 = this.defaults.extensions || { renderers: {}, childTokens: {} };
7765 + return e2.forEach((n) => {
7766 + let i = { ...n };
7767 + if (i.async = this.defaults.async || i.async || false, n.extensions && (n.extensions.forEach((r2) => {
7670 7768 if (!r2.name) throw new Error("extension name required");
7671 7769 if ("renderer" in r2) {
7672 - let i2 = t3.renderers[r2.name];
7673 - i2 ? t3.renderers[r2.name] = function(...o3) {
7674 - let u2 = r2.renderer.apply(this, o3);
7675 - return u2 === false && (u2 = i2.apply(this, o3)), u2;
7676 - } : t3.renderers[r2.name] = r2.renderer;
7770 + let o2 = t2.renderers[r2.name];
7771 + o2 ? t2.renderers[r2.name] = function(...s) {
7772 + let u = r2.renderer.apply(this, s);
7773 + return u === false && (u = o2.apply(this, s)), u;
7774 + } : t2.renderers[r2.name] = r2.renderer;
7677 7775 }
7678 7776 if ("tokenizer" in r2) {
7679 7777 if (!r2.level || r2.level !== "block" && r2.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
7680 - let i2 = t3[r2.level];
7681 - i2 ? i2.unshift(r2.tokenizer) : t3[r2.level] = [r2.tokenizer], r2.start && (r2.level === "block" ? t3.startBlock ? t3.startBlock.push(r2.start) : t3.startBlock = [r2.start] : r2.level === "inline" && (t3.startInline ? t3.startInline.push(r2.start) : t3.startInline = [r2.start]));
7778 + let o2 = t2[r2.level];
7779 + o2 ? o2.unshift(r2.tokenizer) : t2[r2.level] = [r2.tokenizer], r2.start && (r2.level === "block" ? t2.startBlock ? t2.startBlock.push(r2.start) : t2.startBlock = [r2.start] : r2.level === "inline" && (t2.startInline ? t2.startInline.push(r2.start) : t2.startInline = [r2.start]));
7682 7780 }
7683 - "childTokens" in r2 && r2.childTokens && (t3.childTokens[r2.name] = r2.childTokens);
7684 - }), s2.extensions = t3), n2.renderer) {
7685 - let r2 = this.defaults.renderer || new y2(this.defaults);
7686 - for (let i2 in n2.renderer) {
7687 - if (!(i2 in r2)) throw new Error(`renderer '${i2}' does not exist`);
7688 - if (["options", "parser"].includes(i2)) continue;
7689 - let o3 = i2, u2 = n2.renderer[o3], a2 = r2[o3];
7690 - r2[o3] = (...c2) => {
7691 - let p2 = u2.apply(r2, c2);
7692 - return p2 === false && (p2 = a2.apply(r2, c2)), p2 || "";
7781 + "childTokens" in r2 && r2.childTokens && (t2.childTokens[r2.name] = r2.childTokens);
7782 + }), i.extensions = t2), n.renderer) {
7783 + let r2 = this.defaults.renderer || new P(this.defaults);
7784 + for (let o2 in n.renderer) {
7785 + if (!(o2 in r2)) throw new Error(`renderer '${o2}' does not exist`);
7786 + if (["options", "parser"].includes(o2)) continue;
7787 + let s = o2, u = n.renderer[s], a = r2[s];
7788 + r2[s] = (...p2) => {
7789 + let c2 = u.apply(r2, p2);
7790 + return c2 === false && (c2 = a.apply(r2, p2)), c2 || "";
7693 7791 };
7694 7792 }
7695 - s2.renderer = r2;
7793 + i.renderer = r2;
7696 7794 }
7697 - if (n2.tokenizer) {
7698 - let r2 = this.defaults.tokenizer || new w2(this.defaults);
7699 - for (let i2 in n2.tokenizer) {
7700 - if (!(i2 in r2)) throw new Error(`tokenizer '${i2}' does not exist`);
7701 - if (["options", "rules", "lexer"].includes(i2)) continue;
7702 - let o3 = i2, u2 = n2.tokenizer[o3], a2 = r2[o3];
7703 - r2[o3] = (...c2) => {
7704 - let p2 = u2.apply(r2, c2);
7705 - return p2 === false && (p2 = a2.apply(r2, c2)), p2;
7795 + if (n.tokenizer) {
7796 + let r2 = this.defaults.tokenizer || new y2(this.defaults);
7797 + for (let o2 in n.tokenizer) {
7798 + if (!(o2 in r2)) throw new Error(`tokenizer '${o2}' does not exist`);
7799 + if (["options", "rules", "lexer"].includes(o2)) continue;
7800 + let s = o2, u = n.tokenizer[s], a = r2[s];
7801 + r2[s] = (...p2) => {
7802 + let c2 = u.apply(r2, p2);
7803 + return c2 === false && (c2 = a.apply(r2, p2)), c2;
7706 7804 };
7707 7805 }
7708 - s2.tokenizer = r2;
7806 + i.tokenizer = r2;
7709 7807 }
7710 - if (n2.hooks) {
7711 - let r2 = this.defaults.hooks || new P();
7712 - for (let i2 in n2.hooks) {
7713 - if (!(i2 in r2)) throw new Error(`hook '${i2}' does not exist`);
7714 - if (["options", "block"].includes(i2)) continue;
7715 - let o3 = i2, u2 = n2.hooks[o3], a2 = r2[o3];
7716 - P.passThroughHooks.has(i2) ? r2[o3] = (c2) => {
7717 - if (this.defaults.async && P.passThroughHooksRespectAsync.has(i2)) return (async () => {
7718 - let k2 = await u2.call(r2, c2);
7719 - return a2.call(r2, k2);
7808 + if (n.hooks) {
7809 + let r2 = this.defaults.hooks || new S();
7810 + for (let o2 in n.hooks) {
7811 + if (!(o2 in r2)) throw new Error(`hook '${o2}' does not exist`);
7812 + if (["options", "block"].includes(o2)) continue;
7813 + let s = o2, u = n.hooks[s], a = r2[s];
7814 + S.passThroughHooks.has(o2) ? r2[s] = (p2) => {
7815 + if (this.defaults.async && S.passThroughHooksRespectAsync.has(o2)) return (async () => {
7816 + let h = await u.call(r2, p2);
7817 + return a.call(r2, h);
7720 7818 })();
7721 - let p2 = u2.call(r2, c2);
7722 - return a2.call(r2, p2);
7723 - } : r2[o3] = (...c2) => {
7819 + let c2 = u.call(r2, p2);
7820 + return a.call(r2, c2);
7821 + } : r2[s] = (...p2) => {
7724 7822 if (this.defaults.async) return (async () => {
7725 - let k2 = await u2.apply(r2, c2);
7726 - return k2 === false && (k2 = await a2.apply(r2, c2)), k2;
7823 + let h = await u.apply(r2, p2);
7824 + return h === false && (h = await a.apply(r2, p2)), h;
7727 7825 })();
7728 - let p2 = u2.apply(r2, c2);
7729 - return p2 === false && (p2 = a2.apply(r2, c2)), p2;
7826 + let c2 = u.apply(r2, p2);
7827 + return c2 === false && (c2 = a.apply(r2, p2)), c2;
7730 7828 };
7731 7829 }
7732 - s2.hooks = r2;
7830 + i.hooks = r2;
7733 7831 }
7734 - if (n2.walkTokens) {
7735 - let r2 = this.defaults.walkTokens, i2 = n2.walkTokens;
7736 - s2.walkTokens = function(o3) {
7737 - let u2 = [];
7738 - return u2.push(i2.call(this, o3)), r2 && (u2 = u2.concat(r2.call(this, o3))), u2;
7832 + if (n.walkTokens) {
7833 + let r2 = this.defaults.walkTokens, o2 = n.walkTokens;
7834 + i.walkTokens = function(s) {
7835 + let u = [];
7836 + return u.push(o2.call(this, s)), r2 && (u = u.concat(r2.call(this, s))), u;
7739 7837 };
7740 7838 }
7741 - this.defaults = { ...this.defaults, ...s2 };
7839 + this.defaults = { ...this.defaults, ...i };
7742 7840 }), this;
7743 7841 }
7744 7842 setOptions(e2) {
7745 7843 return this.defaults = { ...this.defaults, ...e2 }, this;
7746 7844 }
7747 - lexer(e2, t3) {
7748 - return x2.lex(e2, t3 ?? this.defaults);
7845 + lexer(e2, t2) {
7846 + return x2.lex(e2, t2 ?? this.defaults);
7749 7847 }
7750 - parser(e2, t3) {
7751 - return b2.parse(e2, t3 ?? this.defaults);
7848 + parser(e2, t2) {
7849 + return b.parse(e2, t2 ?? this.defaults);
7752 7850 }
7753 7851 parseMarkdown(e2) {
7754 - return (n2, s2) => {
7755 - let r2 = { ...s2 }, i2 = { ...this.defaults, ...r2 }, o3 = this.onError(!!i2.silent, !!i2.async);
7756 - if (this.defaults.async === true && r2.async === false) return o3(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
7757 - if (typeof n2 > "u" || n2 === null) return o3(new Error("marked(): input parameter is undefined or null"));
7758 - if (typeof n2 != "string") return o3(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n2) + ", string expected"));
7759 - if (i2.hooks && (i2.hooks.options = i2, i2.hooks.block = e2), i2.async) return (async () => {
7760 - let u2 = i2.hooks ? await i2.hooks.preprocess(n2) : n2, c2 = await (i2.hooks ? await i2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(u2, i2), p2 = i2.hooks ? await i2.hooks.processAllTokens(c2) : c2;
7761 - i2.walkTokens && await Promise.all(this.walkTokens(p2, i2.walkTokens));
7762 - let h2 = await (i2.hooks ? await i2.hooks.provideParser(e2) : e2 ? b2.parse : b2.parseInline)(p2, i2);
7763 - return i2.hooks ? await i2.hooks.postprocess(h2) : h2;
7764 - })().catch(o3);
7852 + return (n, i) => {
7853 + let r2 = { ...i }, o2 = { ...this.defaults, ...r2 }, s = this.onError(!!o2.silent, !!o2.async);
7854 + if (this.defaults.async === true && r2.async === false) return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
7855 + if (typeof n > "u" || n === null) return s(new Error("marked(): input parameter is undefined or null"));
7856 + if (typeof n != "string") return s(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
7857 + if (o2.hooks && (o2.hooks.options = o2, o2.hooks.block = e2), o2.async) return (async () => {
7858 + let u = o2.hooks ? await o2.hooks.preprocess(n) : n, p2 = await (o2.hooks ? await o2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(u, o2), c2 = o2.hooks ? await o2.hooks.processAllTokens(p2) : p2;
7859 + o2.walkTokens && await Promise.all(this.walkTokens(c2, o2.walkTokens));
7860 + let k2 = await (o2.hooks ? await o2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(c2, o2);
7861 + return o2.hooks ? await o2.hooks.postprocess(k2) : k2;
7862 + })().catch(s);
7765 7863 try {
7766 - i2.hooks && (n2 = i2.hooks.preprocess(n2));
7767 - let a2 = (i2.hooks ? i2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(n2, i2);
7768 - i2.hooks && (a2 = i2.hooks.processAllTokens(a2)), i2.walkTokens && this.walkTokens(a2, i2.walkTokens);
7769 - let p2 = (i2.hooks ? i2.hooks.provideParser(e2) : e2 ? b2.parse : b2.parseInline)(a2, i2);
7770 - return i2.hooks && (p2 = i2.hooks.postprocess(p2)), p2;
7771 - } catch (u2) {
7772 - return o3(u2);
7864 + o2.hooks && (n = o2.hooks.preprocess(n));
7865 + let a = (o2.hooks ? o2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(n, o2);
7866 + o2.hooks && (a = o2.hooks.processAllTokens(a)), o2.walkTokens && this.walkTokens(a, o2.walkTokens);
7867 + let c2 = (o2.hooks ? o2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(a, o2);
7868 + return o2.hooks && (c2 = o2.hooks.postprocess(c2)), c2;
7869 + } catch (u) {
7870 + return s(u);
7773 7871 }
7774 7872 };
7775 7873 }
7776 - onError(e2, t3) {
7777 - return (n2) => {
7778 - if (n2.message += `
7874 + onError(e2, t2) {
7875 + return (n) => {
7876 + if (n.message += `
7779 7877 Please report this to https://github.com/markedjs/marked.`, e2) {
7780 - let s2 = "<p>An error occurred:</p><pre>" + O(n2.message + "", true) + "</pre>";
7781 - return t3 ? Promise.resolve(s2) : s2;
7878 + let i = "<p>An error occurred:</p><pre>" + R2(n.message + "", true) + "</pre>";
7879 + return t2 ? Promise.resolve(i) : i;
7782 7880 }
7783 - if (t3) return Promise.reject(n2);
7784 - throw n2;
7881 + if (t2) return Promise.reject(n);
7882 + throw n;
7785 7883 };
7786 7884 }
7787 7885 };
7788 - var M2 = new D();
7789 - function g2(l4, e2) {
7886 + var M2 = new Q();
7887 + function f(l4, e2) {
7790 7888 return M2.parse(l4, e2);
7791 7889 }
7792 - g2.options = g2.setOptions = function(l4) {
7793 - return M2.setOptions(l4), g2.defaults = M2.defaults, G(g2.defaults), g2;
7890 + f.options = f.setOptions = function(l4) {
7891 + return M2.setOptions(l4), f.defaults = M2.defaults, U(f.defaults), f;
7794 7892 };
7795 - g2.getDefaults = z;
7796 - g2.defaults = T;
7797 - g2.use = function(...l4) {
7798 - return M2.use(...l4), g2.defaults = M2.defaults, G(g2.defaults), g2;
7799 - };
7800 - g2.walkTokens = function(l4, e2) {
7893 + f.getDefaults = A2;
7894 + f.defaults = T;
7895 + function bt(...l4) {
7896 + return M2.use(...l4), f.defaults = M2.defaults, U(f.defaults), f;
7897 + }
7898 + f.use = bt;
7899 + f.walkTokens = function(l4, e2) {
7801 7900 return M2.walkTokens(l4, e2);
7802 7901 };
7803 - g2.parseInline = M2.parseInline;
7804 - g2.Parser = b2;
7805 - g2.parser = b2.parse;
7806 - g2.Renderer = y2;
7807 - g2.TextRenderer = L;
7808 - g2.Lexer = x2;
7809 - g2.lexer = x2.lex;
7810 - g2.Tokenizer = w2;
7811 - g2.Hooks = P;
7812 - g2.parse = g2;
7813 - var jt = g2.options;
7814 - var Ft = g2.setOptions;
7815 - var Ut = g2.use;
7816 - var Kt = g2.walkTokens;
7817 - var Wt = g2.parseInline;
7818 - var Jt = b2.parse;
7819 - var Vt = x2.lex;
7902 + f.parseInline = M2.parseInline;
7903 + f.Parser = b;
7904 + f.parser = b.parse;
7905 + f.Renderer = P;
7906 + f.TextRenderer = L;
7907 + f.Lexer = x2;
7908 + f.lexer = x2.lex;
7909 + f.Tokenizer = y2;
7910 + f.Hooks = S;
7911 + f.parse = f;
7912 + var un = f.options;
7913 + var pn = f.setOptions;
7914 + var cn = f.walkTokens;
7915 + var hn = f.parseInline;
7916 + var kn = b.parse;
7917 + var gn = x2.lex;
7820 7918
7821 7919 // packages/blocks/build-module/api/raw-handling/markdown-converter.mjs
7822 7920 function escapeBodyText(value) {
7823 7921 return value.replace(/&(?!#?\w+;)/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
7824 7922 }
7825 - var converter = new D({
7923 + var converter = new Q({
7826 7924 gfm: true,
7827 7925 breaks: true,
7828 7926 renderer: {
7829 7927 // Match showdown's `omitExtraWLInCodeBlocks`: marked appends `\n`
@@ -8019,13 +8117,13 @@
8019 8117 if (/\\[a-zA-Z]+\s*\{/g.test(text2)) {
8020 8118 return true;
8021 8119 }
8022 8120 const softClues = [
8023 - (t3) => t3.includes("^") && !t3.startsWith("^"),
8024 - (t3) => ["=", "+", "-", "/", "*"].some(
8025 - (operator) => t3.includes(operator)
8121 + (t2) => t2.includes("^") && !t2.startsWith("^"),
8122 + (t2) => ["=", "+", "-", "/", "*"].some(
8123 + (operator) => t2.includes(operator)
8026 8124 ),
8027 - (t3) => /\\[a-zA-Z]+/g.test(t3)
8125 + (t2) => /\\[a-zA-Z]+/g.test(t2)
8028 8126 ];
8029 8127 if (softClues.filter((clue) => clue(text2)).length >= 2) {
8030 8128 return true;
8031 8129 }