@bpmn-io/form-js-playground 1.21.2 → 1.21.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,9 +31,9 @@
31
31
  f = {};
32
32
  for (r in u) "key" == r ? t = u[r] : "ref" == r ? o = u[r] : f[r] = u[r];
33
33
  if (arguments.length > 2 && (f.children = arguments.length > 3 ? n$1.call(arguments, 2) : i), "function" == typeof l && null != l.defaultProps) for (r in l.defaultProps) void 0 === f[r] && (f[r] = l.defaultProps[r]);
34
- return d$2(l, f, t, o, null);
34
+ return d$1(l, f, t, o, null);
35
35
  }
36
- function d$2(n, i, t, o, r) {
36
+ function d$1(n, i, t, o, r) {
37
37
  var f = {
38
38
  type: n,
39
39
  props: i,
@@ -57,10 +57,10 @@
57
57
  function b$2(n, l) {
58
58
  this.props = n, this.context = l;
59
59
  }
60
- function g$2(n, l) {
61
- if (null == l) return n.__ ? g$2(n.__, n.__.__k.indexOf(n) + 1) : null;
60
+ function g$3(n, l) {
61
+ if (null == l) return n.__ ? g$3(n.__, n.__.__k.indexOf(n) + 1) : null;
62
62
  for (var u; l < n.__k.length; l++) if (null != (u = n.__k[l]) && null != u.__e) return u.__e;
63
- return "function" == typeof n.type ? g$2(n) : null;
63
+ return "function" == typeof n.type ? g$3(n) : null;
64
64
  }
65
65
  function m$2(n) {
66
66
  var l, u;
@@ -77,7 +77,7 @@
77
77
  }
78
78
  function x$1() {
79
79
  var n, l, u, i, o, r, e, c;
80
- for (t$2.sort(f$1); n = t$2.shift();) n.__d && (l = t$2.length, i = void 0, o = void 0, e = (r = (u = n).__v).__e, (c = u.__P) && (i = [], (o = h$1({}, r)).__v = r.__v + 1, L$3(c, r, o, u.__n, void 0 !== c.ownerSVGElement, null != r.__h ? [e] : null, i, null == e ? g$2(r) : e, r.__h), M$2(i, r), r.__e != e && m$2(r)), t$2.length > l && t$2.sort(f$1));
80
+ for (t$2.sort(f$1); n = t$2.shift();) n.__d && (l = t$2.length, i = void 0, o = void 0, e = (r = (u = n).__v).__e, (c = u.__P) && (i = [], (o = h$1({}, r)).__v = r.__v + 1, L$3(c, r, o, u.__n, void 0 !== c.ownerSVGElement, null != r.__h ? [e] : null, i, null == e ? g$3(r) : e, r.__h), M$2(i, r), r.__e != e && m$2(r)), t$2.length > l && t$2.sort(f$1));
81
81
  x$1.__r = 0;
82
82
  }
83
83
  function P$4(n, l, u, i, t, o, r, f, e, a) {
@@ -90,9 +90,9 @@
90
90
  w,
91
91
  x = i && i.__k || s$2,
92
92
  P = x.length;
93
- for (u.__k = [], h = 0; h < l.length; h++) if (null != (_ = u.__k[h] = null == (_ = l[h]) || "boolean" == typeof _ || "function" == typeof _ ? null : "string" == typeof _ || "number" == typeof _ || "bigint" == typeof _ ? d$2(null, _, null, null, _) : v$3(_) ? d$2(k$3, {
93
+ for (u.__k = [], h = 0; h < l.length; h++) if (null != (_ = u.__k[h] = null == (_ = l[h]) || "boolean" == typeof _ || "function" == typeof _ ? null : "string" == typeof _ || "number" == typeof _ || "bigint" == typeof _ ? d$1(null, _, null, null, _) : v$3(_) ? d$1(k$3, {
94
94
  children: _
95
- }, null, null, null) : _.__b > 0 ? d$2(_.type, _.props, _.key, _.ref ? _.ref : null, _.__v) : _)) {
95
+ }, null, null, null) : _.__b > 0 ? d$1(_.type, _.props, _.key, _.ref ? _.ref : null, _.__v) : _)) {
96
96
  if (_.__ = u, _.__b = u.__b + 1, null === (y = x[h]) || y && _.key == y.key && _.type === y.type) x[h] = void 0;else for (p = 0; p < P; p++) {
97
97
  if ((y = x[p]) && _.key == y.key && _.type === y.type) {
98
98
  x[p] = void 0;
@@ -100,18 +100,18 @@
100
100
  }
101
101
  y = null;
102
102
  }
103
- L$3(n, _, y = y || c$1, t, o, r, f, e, a), b = _.__e, (p = _.ref) && y.ref != p && (w || (w = []), y.ref && w.push(y.ref, null, _), w.push(p, _.__c || b, _)), null != b ? (null == m && (m = b), "function" == typeof _.type && _.__k === y.__k ? _.__d = e = C$3(_, e, n) : e = $$2(n, _, y, x, b, e), "function" == typeof u.type && (u.__d = e)) : e && y.__e == e && e.parentNode != n && (e = g$2(y));
103
+ L$3(n, _, y = y || c$1, t, o, r, f, e, a), b = _.__e, (p = _.ref) && y.ref != p && (w || (w = []), y.ref && w.push(y.ref, null, _), w.push(p, _.__c || b, _)), null != b ? (null == m && (m = b), "function" == typeof _.type && _.__k === y.__k ? _.__d = e = C$3(_, e, n) : e = $$2(n, _, y, x, b, e), "function" == typeof u.type && (u.__d = e)) : e && y.__e == e && e.parentNode != n && (e = g$3(y));
104
104
  }
105
105
  for (u.__e = m, h = P; h--;) null != x[h] && ("function" == typeof u.type && null != x[h].__e && x[h].__e == u.__d && (u.__d = A(i).nextSibling), q$3(x[h], x[h]));
106
- if (w) for (h = 0; h < w.length; h++) O(w[h], w[++h], w[++h]);
106
+ if (w) for (h = 0; h < w.length; h++) O$1(w[h], w[++h], w[++h]);
107
107
  }
108
108
  function C$3(n, l, u) {
109
109
  for (var i, t = n.__k, o = 0; t && o < t.length; o++) (i = t[o]) && (i.__ = n, l = "function" == typeof i.type ? C$3(i, l, u) : $$2(u, i, i, t, i.__e, l));
110
110
  return l;
111
111
  }
112
- function S$1(n, l) {
112
+ function S(n, l) {
113
113
  return l = l || [], null == n || "boolean" == typeof n || (v$3(n) ? n.some(function (n) {
114
- S$1(n, l);
114
+ S(n, l);
115
115
  }) : l.push(n)), l;
116
116
  }
117
117
  function $$2(n, l, u, i, t, o) {
@@ -128,7 +128,7 @@
128
128
  if (n.__k) for (l = n.__k.length - 1; l >= 0; l--) if ((u = n.__k[l]) && (i = A(u))) return i;
129
129
  return null;
130
130
  }
131
- function H$1(n, l, u, i, t) {
131
+ function H$2(n, l, u, i, t) {
132
132
  var o;
133
133
  for (o in u) "children" === o || "key" === o || o in l || T$4(n, o, null, u[o], i);
134
134
  for (o in l) t && "function" != typeof l[o] || "children" === o || "key" === o || "value" === o || "checked" === o || u[o] === l[o] || T$4(n, o, l[o], u[o], i);
@@ -235,12 +235,12 @@
235
235
  if (null != r) for (y = {}, k = 0; k < l.attributes.length; k++) y[l.attributes[k].name] = l.attributes[k].value;
236
236
  (h || a) && (h && (a && h.__html == a.__html || h.__html === l.innerHTML) || (l.innerHTML = h && h.__html || ""));
237
237
  }
238
- if (H$1(l, d, y, o, e), h) u.__k = [];else if (P$4(l, v$3(k = u.props.children) ? k : [k], u, i, t, o && "foreignObject" !== _, r, f, r ? r[0] : i.__k && g$2(i, 0), e), null != r) for (k = r.length; k--;) null != r[k] && p$1(r[k]);
238
+ if (H$2(l, d, y, o, e), h) u.__k = [];else if (P$4(l, v$3(k = u.props.children) ? k : [k], u, i, t, o && "foreignObject" !== _, r, f, r ? r[0] : i.__k && g$3(i, 0), e), null != r) for (k = r.length; k--;) null != r[k] && p$1(r[k]);
239
239
  e || ("value" in d && void 0 !== (k = d.value) && (k !== l.value || "progress" === _ && !k || "option" === _ && k !== y.value) && T$4(l, "value", k, y.value, false), "checked" in d && void 0 !== (k = d.checked) && k !== l.checked && T$4(l, "checked", k, y.checked, false));
240
240
  }
241
241
  return l;
242
242
  }
243
- function O(n, u, i) {
243
+ function O$1(n, u, i) {
244
244
  try {
245
245
  "function" == typeof n ? n(u) : n.current = u;
246
246
  } catch (n) {
@@ -249,7 +249,7 @@
249
249
  }
250
250
  function q$3(n, u, i) {
251
251
  var t, o;
252
- if (l$2.unmount && l$2.unmount(n), (t = n.ref) && (t.current && t.current !== n.__e || O(t, null, u)), null != (t = n.__c)) {
252
+ if (l$2.unmount && l$2.unmount(n), (t = n.ref) && (t.current && t.current !== n.__e || O$1(t, null, u)), null != (t = n.__c)) {
253
253
  if (t.componentWillUnmount) try {
254
254
  t.componentWillUnmount();
255
255
  } catch (n) {
@@ -1307,7 +1307,7 @@
1307
1307
  v$2 = l$2.diffed,
1308
1308
  l$1 = l$2.__c,
1309
1309
  m$1 = l$2.unmount;
1310
- function d$1(t, u) {
1310
+ function d(t, u) {
1311
1311
  l$2.__h && l$2.__h(r, t, o$1 || u), o$1 = 0;
1312
1312
  var i = r.__H || (r.__H = {
1313
1313
  __: [],
@@ -1321,7 +1321,7 @@
1321
1321
  return o$1 = 1, s$1(B$2, n);
1322
1322
  }
1323
1323
  function s$1(n, u, i) {
1324
- var o = d$1(t$1++, 2);
1324
+ var o = d(t$1++, 2);
1325
1325
  if (o.t = n, !o.__c && (o.__ = [i ? i(u) : B$2(void 0, u), function (n) {
1326
1326
  var t = o.__N ? o.__N[0] : o.__[0],
1327
1327
  r = o.t(t, n);
@@ -1357,11 +1357,11 @@
1357
1357
  return o.__N || o.__;
1358
1358
  }
1359
1359
  function p(u, i) {
1360
- var o = d$1(t$1++, 3);
1360
+ var o = d(t$1++, 3);
1361
1361
  !l$2.__s && z$3(o.__H, i) && (o.__ = u, o.i = i, r.__H.__h.push(o));
1362
1362
  }
1363
1363
  function y$1(u, i) {
1364
- var o = d$1(t$1++, 4);
1364
+ var o = d(t$1++, 4);
1365
1365
  !l$2.__s && z$3(o.__H, i) && (o.__ = u, o.i = i, r.__h.push(o));
1366
1366
  }
1367
1367
  function _$2(n) {
@@ -1372,7 +1372,7 @@
1372
1372
  }, []);
1373
1373
  }
1374
1374
  function F$2(n, r) {
1375
- var u = d$1(t$1++, 7);
1375
+ var u = d(t$1++, 7);
1376
1376
  return z$3(u.__H, r) ? (u.__V = n(), u.i = r, u.__h = n, u.__V) : u.__;
1377
1377
  }
1378
1378
  function T$3(n, t) {
@@ -1382,7 +1382,7 @@
1382
1382
  }
1383
1383
  function q$2(n) {
1384
1384
  var u = r.context[n.__c],
1385
- i = d$1(t$1++, 9);
1385
+ i = d(t$1++, 9);
1386
1386
  return i.c = n, u ? (null == i.__ && (i.__ = true, u.sub(r)), u.props.value) : n.__;
1387
1387
  }
1388
1388
  function b$1() {
@@ -1430,14 +1430,14 @@
1430
1430
  }
1431
1431
  }), u.__H = void 0, r && l$2.__e(r, u.__v));
1432
1432
  };
1433
- var g$1 = "function" == typeof requestAnimationFrame;
1433
+ var g$2 = "function" == typeof requestAnimationFrame;
1434
1434
  function j$2(n) {
1435
1435
  var t,
1436
1436
  r = function () {
1437
- clearTimeout(u), g$1 && cancelAnimationFrame(t), setTimeout(n);
1437
+ clearTimeout(u), g$2 && cancelAnimationFrame(t), setTimeout(n);
1438
1438
  },
1439
1439
  u = setTimeout(r, 100);
1440
- g$1 && (t = requestAnimationFrame(r));
1440
+ g$2 && (t = requestAnimationFrame(r));
1441
1441
  }
1442
1442
  function k$2(n) {
1443
1443
  var t = r,
@@ -15688,7 +15688,7 @@
15688
15688
  window.flatpickr = flatpickr;
15689
15689
  }
15690
15690
 
15691
- function g(n, t) {
15691
+ function g$1(n, t) {
15692
15692
  for (var e in t) n[e] = t[e];
15693
15693
  return n;
15694
15694
  }
@@ -15710,7 +15710,7 @@
15710
15710
  var N$1 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
15711
15711
  function k$1(n) {
15712
15712
  function t(t) {
15713
- var e = g({}, t);
15713
+ var e = g$1({}, t);
15714
15714
  return delete e.ref, n(e, t.ref || null);
15715
15715
  }
15716
15716
  return t.$$typeof = N$1, t.render = t, t.prototype.isReactComponent = t.__f = true, t.displayName = "ForwardRef(" + (n.displayName || n.name) + ")", t;
@@ -15724,7 +15724,7 @@
15724
15724
  function L$2(n, t, e) {
15725
15725
  return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function (n) {
15726
15726
  "function" == typeof n.__c && n.__c();
15727
- }), n.__c.__H = null), null != (n = g({}, n)).__c && (n.__c.__P === e && (n.__c.__P = t), n.__c = null), n.__k = n.__k && n.__k.map(function (n) {
15727
+ }), n.__c.__H = null), null != (n = g$1({}, n)).__c && (n.__c.__P === e && (n.__c.__P = t), n.__c = null), n.__k = n.__k && n.__k.map(function (n) {
15728
15728
  return L$2(n, t, e);
15729
15729
  })), n;
15730
15730
  }
@@ -15740,7 +15740,7 @@
15740
15740
  var t = n.__.__c;
15741
15741
  return t && t.__a && t.__a(n);
15742
15742
  }
15743
- function V() {
15743
+ function V$1() {
15744
15744
  this.u = null, this.o = null;
15745
15745
  }
15746
15746
  l$2.unmount = function (n) {
@@ -15827,7 +15827,7 @@
15827
15827
  });
15828
15828
  return r.containerInfo = e, r;
15829
15829
  }
15830
- (V.prototype = new b$2()).__a = function (n) {
15830
+ (V$1.prototype = new b$2()).__a = function (n) {
15831
15831
  var t = this,
15832
15832
  e = F$1(t.__v),
15833
15833
  r = t.o.get(n);
@@ -15837,22 +15837,22 @@
15837
15837
  };
15838
15838
  e ? e(o) : o();
15839
15839
  };
15840
- }, V.prototype.render = function (n) {
15840
+ }, V$1.prototype.render = function (n) {
15841
15841
  this.u = null, this.o = new Map();
15842
- var t = S$1(n.children);
15842
+ var t = S(n.children);
15843
15843
  n.revealOrder && "b" === n.revealOrder[0] && t.reverse();
15844
15844
  for (var e = t.length; e--;) this.o.set(t[e], this.u = [1, 0, this.u]);
15845
15845
  return n.children;
15846
- }, V.prototype.componentDidUpdate = V.prototype.componentDidMount = function () {
15846
+ }, V$1.prototype.componentDidUpdate = V$1.prototype.componentDidMount = function () {
15847
15847
  var n = this;
15848
15848
  this.o.forEach(function (t, e) {
15849
15849
  W$1(n, e, t);
15850
15850
  });
15851
15851
  };
15852
15852
  var B$1 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103,
15853
- H = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,
15854
- Z$1 = /^on(Ani|Tra|Tou|BeforeInp|Compo)/,
15855
- Y$1 = /[A-Z0-9]/g,
15853
+ H$1 = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,
15854
+ Z = /^on(Ani|Tra|Tou|BeforeInp|Compo)/,
15855
+ Y$2 = /[A-Z0-9]/g,
15856
15856
  $$1 = "undefined" != typeof document,
15857
15857
  q$1 = function (n) {
15858
15858
  return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n);
@@ -15900,12 +15900,12 @@
15900
15900
  var i = t[o];
15901
15901
  if (!("value" === o && "defaultValue" in t && null == i || $$1 && "children" === o && "noscript" === e || "class" === o || "className" === o)) {
15902
15902
  var l = o.toLowerCase();
15903
- "defaultValue" === o && "value" in t && null == t.value ? o = "value" : "download" === o && true === i ? i = "" : "ondoubleclick" === l ? o = "ondblclick" : "onchange" !== l || "input" !== e && "textarea" !== e || q$1(t.type) ? "onfocus" === l ? o = "onfocusin" : "onblur" === l ? o = "onfocusout" : Z$1.test(o) ? o = l : -1 === e.indexOf("-") && H.test(o) ? o = o.replace(Y$1, "-$&").toLowerCase() : null === i && (i = void 0) : l = o = "oninput", "oninput" === l && u[o = l] && (o = "oninputCapture"), u[o] = i;
15903
+ "defaultValue" === o && "value" in t && null == t.value ? o = "value" : "download" === o && true === i ? i = "" : "ondoubleclick" === l ? o = "ondblclick" : "onchange" !== l || "input" !== e && "textarea" !== e || q$1(t.type) ? "onfocus" === l ? o = "onfocusin" : "onblur" === l ? o = "onfocusout" : Z.test(o) ? o = l : -1 === e.indexOf("-") && H$1.test(o) ? o = o.replace(Y$2, "-$&").toLowerCase() : null === i && (i = void 0) : l = o = "oninput", "oninput" === l && u[o = l] && (o = "oninputCapture"), u[o] = i;
15904
15904
  }
15905
15905
  }
15906
- "select" == e && u.multiple && Array.isArray(u.value) && (u.value = S$1(t.children).forEach(function (n) {
15906
+ "select" == e && u.multiple && Array.isArray(u.value) && (u.value = S(t.children).forEach(function (n) {
15907
15907
  n.props.selected = -1 != u.value.indexOf(n.props.value);
15908
- })), "select" == e && null != u.defaultValue && (u.value = S$1(t.children).forEach(function (n) {
15908
+ })), "select" == e && null != u.defaultValue && (u.value = S(t.children).forEach(function (n) {
15909
15909
  n.props.selected = u.multiple ? -1 != u.defaultValue.indexOf(n.props.value) : u.defaultValue == n.props.value;
15910
15910
  })), t.class && !t.className ? (u.class = t.class, Object.defineProperty(u, "className", en)) : (t.className && !t.class || t.class && t.className) && (u.class = u.className = t.className), n.props = u;
15911
15911
  }(n), n.$$typeof = B$1, rn && rn(n);
@@ -51288,8 +51288,8 @@
51288
51288
  };
51289
51289
 
51290
51290
  /**
51291
- * marked v17.0.1 - a markdown parser
51292
- * Copyright (c) 2018-2025, MarkedJS. (MIT License)
51291
+ * marked v18.0.0 - a markdown parser
51292
+ * Copyright (c) 2018-2026, MarkedJS. (MIT License)
51293
51293
  * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
51294
51294
  * https://github.com/markedjs/marked
51295
51295
  */
@@ -51299,7 +51299,7 @@
51299
51299
  * The code in this file is generated from files in ./src/
51300
51300
  */
51301
51301
 
51302
- function L$1() {
51302
+ function z$1() {
51303
51303
  return {
51304
51304
  async: false,
51305
51305
  breaks: false,
@@ -51313,11 +51313,11 @@
51313
51313
  walkTokens: null
51314
51314
  };
51315
51315
  }
51316
- var T$1 = L$1();
51317
- function Z(u) {
51316
+ var T$1 = z$1();
51317
+ function G(u) {
51318
51318
  T$1 = u;
51319
51319
  }
51320
- var C = {
51320
+ var _ = {
51321
51321
  exec: () => null
51322
51322
  };
51323
51323
  function k(u, e = "") {
@@ -51331,7 +51331,7 @@
51331
51331
  };
51332
51332
  return n;
51333
51333
  }
51334
- var me = (() => {
51334
+ var Re$1 = (() => {
51335
51335
  try {
51336
51336
  return !!new RegExp("(?<=1)(?<!1)");
51337
51337
  } catch {
@@ -51355,7 +51355,6 @@
51355
51355
  blockquoteStart: /^ {0,3}>/,
51356
51356
  blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
51357
51357
  blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
51358
- listReplaceTabs: /^\t+/,
51359
51358
  listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
51360
51359
  listIsTask: /^\[[ xX]\] +\S/,
51361
51360
  listReplaceTask: /^\[[ xX]\] +/,
@@ -51380,7 +51379,6 @@
51380
51379
  escapeReplace: /[&<>"']/g,
51381
51380
  escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
51382
51381
  escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
51383
- unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,
51384
51382
  caret: /(^|[^\[])\^/g,
51385
51383
  percentDecode: /%25/g,
51386
51384
  findPipe: /\|/g,
@@ -51395,154 +51393,162 @@
51395
51393
  hrRegex: u => new RegExp(`^ {0,${Math.min(3, u - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),
51396
51394
  fencesBeginRegex: u => new RegExp(`^ {0,${Math.min(3, u - 1)}}(?:\`\`\`|~~~)`),
51397
51395
  headingBeginRegex: u => new RegExp(`^ {0,${Math.min(3, u - 1)}}#`),
51398
- htmlBeginRegex: u => new RegExp(`^ {0,${Math.min(3, u - 1)}}<(?:[a-z].*>|!--)`, "i")
51396
+ htmlBeginRegex: u => new RegExp(`^ {0,${Math.min(3, u - 1)}}<(?:[a-z].*>|!--)`, "i"),
51397
+ blockquoteBeginRegex: u => new RegExp(`^ {0,${Math.min(3, u - 1)}}>`)
51399
51398
  },
51400
- xe$1 = /^(?:[ \t]*(?:\n|$))+/,
51401
- be = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,
51402
- Re$1 = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,
51403
- I = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,
51404
- Te$1 = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,
51405
- N = /(?:[*+-]|\d{1,9}[.)])/,
51406
- re$1 = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
51407
- se$1 = k(re$1).replace(/bull/g, N).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(),
51408
- Oe = k(re$1).replace(/bull/g, N).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(),
51409
- Q = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,
51410
- we = /^[^\n]+/,
51399
+ Te$1 = /^(?:[ \t]*(?:\n|$))+/,
51400
+ Oe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,
51401
+ we = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,
51402
+ C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,
51403
+ ye = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,
51404
+ Q = / {0,3}(?:[*+-]|\d{1,9}[.)])/,
51405
+ ie$1 = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
51406
+ oe$1 = k(ie$1).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(),
51407
+ Pe = k(ie$1).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(),
51408
+ j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,
51409
+ Se = /^[^\n]+/,
51411
51410
  F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,
51412
- ye = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),
51413
- Pe = k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, N).getRegex(),
51411
+ $e = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),
51412
+ Le$1 = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex(),
51414
51413
  v$1 = "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",
51415
- j = /<!--(?:-?>|[\s\S]*?(?:-->|$))/,
51416
- Se = k("^ {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", j).replace("tag", v$1).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),
51417
- ie$1 = k(Q).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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v$1).getRegex(),
51418
- $e = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ie$1).getRegex(),
51419
- U = {
51420
- blockquote: $e,
51421
- code: be,
51422
- def: ye,
51423
- fences: Re$1,
51424
- heading: Te$1,
51425
- hr: I,
51426
- html: Se,
51427
- lheading: se$1,
51428
- list: Pe,
51429
- newline: xe$1,
51430
- paragraph: ie$1,
51431
- table: C,
51432
- text: we
51414
+ U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/,
51415
+ _e$1 = k("^ {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", v$1).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),
51416
+ ae = k(j).replace("hr", C).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", v$1).getRegex(),
51417
+ Me$1 = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex(),
51418
+ K = {
51419
+ blockquote: Me$1,
51420
+ code: Oe,
51421
+ def: $e,
51422
+ fences: we,
51423
+ heading: ye,
51424
+ hr: C,
51425
+ html: _e$1,
51426
+ lheading: oe$1,
51427
+ list: Le$1,
51428
+ newline: Te$1,
51429
+ paragraph: ae,
51430
+ table: _,
51431
+ text: Se
51433
51432
  },
51434
- te$1 = k("^ *([^\\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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v$1).getRegex(),
51435
- _e$1 = {
51436
- ...U,
51437
- lheading: Oe,
51438
- table: te$1,
51439
- paragraph: k(Q).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", te$1).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v$1).getRegex()
51433
+ re$1 = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).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", v$1).getRegex(),
51434
+ ze = {
51435
+ ...K,
51436
+ lheading: Pe,
51437
+ table: re$1,
51438
+ paragraph: k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re$1).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", v$1).getRegex()
51440
51439
  },
51441
- Le$1 = {
51442
- ...U,
51443
- html: k(`^ *(?: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(),
51440
+ Ee = {
51441
+ ...K,
51442
+ html: k(`^ *(?: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(),
51444
51443
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
51445
51444
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
51446
- fences: C,
51445
+ fences: _,
51447
51446
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
51448
- paragraph: k(Q).replace("hr", I).replace("heading", ` *#{1,6} *[^
51449
- ]`).replace("lheading", se$1).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
51447
+ paragraph: k(j).replace("hr", C).replace("heading", ` *#{1,6} *[^
51448
+ ]`).replace("lheading", oe$1).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
51450
51449
  },
51451
- Me$1 = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
51452
- ze = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
51453
- oe$1 = /^( {2,}|\\)\n(?!\s*$)/,
51454
- Ae$1 = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,
51455
- D = /[\p{P}\p{S}]/u,
51456
- K = /[\s\p{P}\p{S}]/u,
51457
- ae = /[^\s\p{P}\p{S}]/u,
51458
- Ce = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, K).getRegex(),
51459
- le$1 = /(?!~)[\p{P}\p{S}]/u,
51460
- Ie$1 = /(?!~)[\s\p{P}\p{S}]/u,
51461
- Ee = /(?:[^\s\p{P}\p{S}]|~)/u,
51462
- Be$1 = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", me ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(),
51463
- ue$1 = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,
51464
- qe = k(ue$1, "u").replace(/punct/g, D).getRegex(),
51465
- ve = k(ue$1, "u").replace(/punct/g, le$1).getRegex(),
51466
- pe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",
51467
- De$1 = k(pe, "gu").replace(/notPunctSpace/g, ae).replace(/punctSpace/g, K).replace(/punct/g, D).getRegex(),
51468
- He = k(pe, "gu").replace(/notPunctSpace/g, Ee).replace(/punctSpace/g, Ie$1).replace(/punct/g, le$1).getRegex(),
51469
- Ze = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ae).replace(/punctSpace/g, K).replace(/punct/g, D).getRegex(),
51470
- Ge = k(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(),
51471
- Ne$1 = k(/^<(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(),
51472
- Qe = k(j).replace("(?:-->|$)", "-->").getRegex(),
51473
- Fe = k("^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", Qe).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),
51474
- q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,
51475
- je = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),
51476
- ce$1 = k(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", F).getRegex(),
51477
- he = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex(),
51478
- Ue = k("reflink|nolink(?!\\()", "g").replace("reflink", ce$1).replace("nolink", he).getRegex(),
51479
- ne$1 = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,
51480
- W = {
51481
- _backpedal: C,
51482
- anyPunctuation: Ge,
51483
- autolink: Ne$1,
51484
- blockSkip: Be$1,
51485
- br: oe$1,
51486
- code: ze,
51487
- del: C,
51488
- emStrongLDelim: qe,
51489
- emStrongRDelimAst: De$1,
51490
- emStrongRDelimUnd: Ze,
51491
- escape: Me$1,
51492
- link: je,
51493
- nolink: he,
51494
- punctuation: Ce,
51495
- reflink: ce$1,
51496
- reflinkSearch: Ue,
51497
- tag: Fe,
51498
- text: Ae$1,
51499
- url: C
51450
+ Ie$1 = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
51451
+ Ae$1 = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
51452
+ le$1 = /^( {2,}|\\)\n(?!\s*$)/,
51453
+ Ce = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,
51454
+ E = /[\p{P}\p{S}]/u,
51455
+ H = /[\s\p{P}\p{S}]/u,
51456
+ W = /[^\s\p{P}\p{S}]/u,
51457
+ Be$1 = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, H).getRegex(),
51458
+ ue$1 = /(?!~)[\p{P}\p{S}]/u,
51459
+ De$1 = /(?!~)[\s\p{P}\p{S}]/u,
51460
+ qe = /(?:[^\s\p{P}\p{S}]|~)/u,
51461
+ ve = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Re$1 ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(),
51462
+ pe = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,
51463
+ He = k(pe, "u").replace(/punct/g, E).getRegex(),
51464
+ Ze = k(pe, "u").replace(/punct/g, ue$1).getRegex(),
51465
+ ce$1 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",
51466
+ Ge = k(ce$1, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, E).getRegex(),
51467
+ Ne$1 = k(ce$1, "gu").replace(/notPunctSpace/g, qe).replace(/punctSpace/g, De$1).replace(/punct/g, ue$1).getRegex(),
51468
+ Qe = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, E).getRegex(),
51469
+ je = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, E).getRegex(),
51470
+ Fe = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",
51471
+ Ue = k(Fe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, E).getRegex(),
51472
+ Ke = k(/\\(punct)/, "gu").replace(/punct/g, E).getRegex(),
51473
+ We = k(/^<(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(),
51474
+ Xe$1 = k(U).replace("(?:-->|$)", "-->").getRegex(),
51475
+ Je = k("^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$1).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),
51476
+ q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,
51477
+ Ve = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),
51478
+ he = k(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", F).getRegex(),
51479
+ ke$1 = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex(),
51480
+ Ye$1 = k("reflink|nolink(?!\\()", "g").replace("reflink", he).replace("nolink", ke$1).getRegex(),
51481
+ se$1 = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,
51482
+ X = {
51483
+ _backpedal: _,
51484
+ anyPunctuation: Ke,
51485
+ autolink: We,
51486
+ blockSkip: ve,
51487
+ br: le$1,
51488
+ code: Ae$1,
51489
+ del: _,
51490
+ delLDelim: _,
51491
+ delRDelim: _,
51492
+ emStrongLDelim: He,
51493
+ emStrongRDelimAst: Ge,
51494
+ emStrongRDelimUnd: Qe,
51495
+ escape: Ie$1,
51496
+ link: Ve,
51497
+ nolink: ke$1,
51498
+ punctuation: Be$1,
51499
+ reflink: he,
51500
+ reflinkSearch: Ye$1,
51501
+ tag: Je,
51502
+ text: Ce,
51503
+ url: _
51500
51504
  },
51501
- Ke = {
51502
- ...W,
51505
+ et = {
51506
+ ...X,
51503
51507
  link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(),
51504
51508
  reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex()
51505
51509
  },
51506
- G = {
51507
- ...W,
51508
- emStrongRDelimAst: He,
51509
- emStrongLDelim: ve,
51510
- url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ne$1).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
51510
+ N = {
51511
+ ...X,
51512
+ emStrongRDelimAst: Ne$1,
51513
+ emStrongLDelim: Ze,
51514
+ delLDelim: je,
51515
+ delRDelim: Ue,
51516
+ url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", se$1).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
51511
51517
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
51512
51518
  del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
51513
- text: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ne$1).getRegex()
51519
+ text: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", se$1).getRegex()
51514
51520
  },
51515
- We = {
51516
- ...G,
51517
- br: k(oe$1).replace("{2,}", "*").getRegex(),
51518
- text: k(G.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
51521
+ tt = {
51522
+ ...N,
51523
+ br: k(le$1).replace("{2,}", "*").getRegex(),
51524
+ text: k(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
51519
51525
  },
51520
- E = {
51521
- normal: U,
51522
- gfm: _e$1,
51523
- pedantic: Le$1
51526
+ B = {
51527
+ normal: K,
51528
+ gfm: ze,
51529
+ pedantic: Ee
51524
51530
  },
51525
- M$1 = {
51526
- normal: W,
51527
- gfm: G,
51528
- breaks: We,
51529
- pedantic: Ke
51531
+ I = {
51532
+ normal: X,
51533
+ gfm: N,
51534
+ breaks: tt,
51535
+ pedantic: et
51530
51536
  };
51531
- var Xe$1 = {
51537
+ var nt = {
51532
51538
  "&": "&amp;",
51533
51539
  "<": "&lt;",
51534
51540
  ">": "&gt;",
51535
51541
  '"': "&quot;",
51536
51542
  "'": "&#39;"
51537
51543
  },
51538
- ke$1 = u => Xe$1[u];
51539
- function w(u, e) {
51544
+ de = u => nt[u];
51545
+ function O(u, e) {
51540
51546
  if (e) {
51541
- if (m.escapeTest.test(u)) return u.replace(m.escapeReplace, ke$1);
51542
- } else if (m.escapeTestNoEncode.test(u)) return u.replace(m.escapeReplaceNoEncode, ke$1);
51547
+ if (m.escapeTest.test(u)) return u.replace(m.escapeReplace, de);
51548
+ } else if (m.escapeTestNoEncode.test(u)) return u.replace(m.escapeReplaceNoEncode, de);
51543
51549
  return u;
51544
51550
  }
51545
- function X(u) {
51551
+ function J(u) {
51546
51552
  try {
51547
51553
  u = encodeURI(u).replace(m.percentDecode, "%");
51548
51554
  } catch {
@@ -51550,7 +51556,7 @@
51550
51556
  }
51551
51557
  return u;
51552
51558
  }
51553
- function J(u, e) {
51559
+ function V(u, e) {
51554
51560
  let t = u.replace(m.findPipe, (i, s, a) => {
51555
51561
  let o = false,
51556
51562
  l = s;
@@ -51563,7 +51569,7 @@
51563
51569
  for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
51564
51570
  return n;
51565
51571
  }
51566
- function z$1(u, e, t) {
51572
+ function $(u, e, t) {
51567
51573
  let n = u.length;
51568
51574
  if (n === 0) return "";
51569
51575
  let r = 0;
@@ -51573,13 +51579,30 @@
51573
51579
  }
51574
51580
  return u.slice(0, n - r);
51575
51581
  }
51576
- function de(u, e) {
51582
+ function Y$1(u) {
51583
+ let e = u.split(`
51584
+ `),
51585
+ t = e.length - 1;
51586
+ for (; t >= 0 && !e[t].trim();) t--;
51587
+ return e.length - t <= 2 ? u : e.slice(0, t + 1).join(`
51588
+ `);
51589
+ }
51590
+ function ge(u, e) {
51577
51591
  if (u.indexOf(e[1]) === -1) return -1;
51578
51592
  let t = 0;
51579
51593
  for (let n = 0; n < u.length; n++) if (u[n] === "\\") n++;else if (u[n] === e[0]) t++;else if (u[n] === e[1] && (t--, t < 0)) return n;
51580
51594
  return t > 0 ? -2 : -1;
51581
51595
  }
51582
- function ge(u, e, t, n, r) {
51596
+ function fe$1(u, e = 0) {
51597
+ let t = e,
51598
+ n = "";
51599
+ for (let r of u) if (r === " ") {
51600
+ let i = 4 - t % 4;
51601
+ n += " ".repeat(i), t += i;
51602
+ } else n += r, t++;
51603
+ return n;
51604
+ }
51605
+ function me(u, e, t, n, r) {
51583
51606
  let i = e.href,
51584
51607
  s = e.title || null,
51585
51608
  a = u[1].replace(r.other.outputLinkReplace, "$1");
@@ -51594,7 +51617,7 @@
51594
51617
  };
51595
51618
  return n.state.inLink = false, o;
51596
51619
  }
51597
- function Je(u, e, t) {
51620
+ function rt(u, e, t) {
51598
51621
  let n = u.match(t.other.indentCodeCompensation);
51599
51622
  if (n === null) return e;
51600
51623
  let r = n[1];
@@ -51607,7 +51630,7 @@
51607
51630
  }).join(`
51608
51631
  `);
51609
51632
  }
51610
- var y = class {
51633
+ var w = class {
51611
51634
  options;
51612
51635
  rules;
51613
51636
  lexer;
@@ -51624,13 +51647,13 @@
51624
51647
  code(e) {
51625
51648
  let t = this.rules.block.code.exec(e);
51626
51649
  if (t) {
51627
- let n = t[0].replace(this.rules.other.codeRemoveIndent, "");
51650
+ let n = this.options.pedantic ? t[0] : Y$1(t[0]),
51651
+ r = n.replace(this.rules.other.codeRemoveIndent, "");
51628
51652
  return {
51629
51653
  type: "code",
51630
- raw: t[0],
51654
+ raw: n,
51631
51655
  codeBlockStyle: "indented",
51632
- text: this.options.pedantic ? n : z$1(n, `
51633
- `)
51656
+ text: r
51634
51657
  };
51635
51658
  }
51636
51659
  }
@@ -51638,7 +51661,7 @@
51638
51661
  let t = this.rules.block.fences.exec(e);
51639
51662
  if (t) {
51640
51663
  let n = t[0],
51641
- r = Je(n, t[3] || "", this.rules);
51664
+ r = rt(n, t[3] || "", this.rules);
51642
51665
  return {
51643
51666
  type: "code",
51644
51667
  raw: n,
@@ -51652,12 +51675,13 @@
51652
51675
  if (t) {
51653
51676
  let n = t[2].trim();
51654
51677
  if (this.rules.other.endingHash.test(n)) {
51655
- let r = z$1(n, "#");
51678
+ let r = $(n, "#");
51656
51679
  (this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
51657
51680
  }
51658
51681
  return {
51659
51682
  type: "heading",
51660
- raw: t[0],
51683
+ raw: $(t[0], `
51684
+ `),
51661
51685
  depth: t[1].length,
51662
51686
  text: n,
51663
51687
  tokens: this.lexer.inline(n)
@@ -51668,14 +51692,14 @@
51668
51692
  let t = this.rules.block.hr.exec(e);
51669
51693
  if (t) return {
51670
51694
  type: "hr",
51671
- raw: z$1(t[0], `
51695
+ raw: $(t[0], `
51672
51696
  `)
51673
51697
  };
51674
51698
  }
51675
51699
  blockquote(e) {
51676
51700
  let t = this.rules.block.blockquote.exec(e);
51677
51701
  if (t) {
51678
- let n = z$1(t[0], `
51702
+ let n = $(t[0], `
51679
51703
  `).split(`
51680
51704
  `),
51681
51705
  r = "",
@@ -51694,8 +51718,8 @@
51694
51718
  r = r ? `${r}
51695
51719
  ${p}` : p, i = i ? `${i}
51696
51720
  ${c}` : c;
51697
- let g = this.lexer.state.top;
51698
- if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = g, n.length === 0) break;
51721
+ let d = this.lexer.state.top;
51722
+ if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = d, n.length === 0) break;
51699
51723
  let h = s.at(-1);
51700
51724
  if (h?.type === "code") break;
51701
51725
  if (h?.type === "blockquote") {
@@ -51703,16 +51727,16 @@ ${c}` : c;
51703
51727
  f = R.raw + `
51704
51728
  ` + n.join(`
51705
51729
  `),
51706
- O = this.blockquote(f);
51707
- s[s.length - 1] = O, r = r.substring(0, r.length - R.raw.length) + O.raw, i = i.substring(0, i.length - R.text.length) + O.text;
51730
+ S = this.blockquote(f);
51731
+ s[s.length - 1] = S, r = r.substring(0, r.length - R.raw.length) + S.raw, i = i.substring(0, i.length - R.text.length) + S.text;
51708
51732
  break;
51709
51733
  } else if (h?.type === "list") {
51710
51734
  let R = h,
51711
51735
  f = R.raw + `
51712
51736
  ` + n.join(`
51713
51737
  `),
51714
- O = this.list(f);
51715
- s[s.length - 1] = O, r = r.substring(0, r.length - h.raw.length) + O.raw, i = i.substring(0, i.length - R.raw.length) + O.raw, n = f.substring(s.at(-1).raw.length).split(`
51738
+ S = this.list(f);
51739
+ s[s.length - 1] = S, r = r.substring(0, r.length - h.raw.length) + S.raw, i = i.substring(0, i.length - R.raw.length) + S.raw, n = f.substring(s.at(-1).raw.length).split(`
51716
51740
  `);
51717
51741
  continue;
51718
51742
  }
@@ -51747,32 +51771,33 @@ ${c}` : c;
51747
51771
  c = "";
51748
51772
  if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
51749
51773
  p = t[0], e = e.substring(p.length);
51750
- let g = t[2].split(`
51751
- `, 1)[0].replace(this.rules.other.listReplaceTabs, O => " ".repeat(3 * O.length)),
51774
+ let d = fe$1(t[2].split(`
51775
+ `, 1)[0], t[1].length),
51752
51776
  h = e.split(`
51753
51777
  `, 1)[0],
51754
- R = !g.trim(),
51778
+ R = !d.trim(),
51755
51779
  f = 0;
51756
- if (this.options.pedantic ? (f = 2, c = g.trimStart()) : R ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = g.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (p += h + `
51780
+ if (this.options.pedantic ? (f = 2, c = d.trimStart()) : R ? f = t[1].length + 1 : (f = d.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = d.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (p += h + `
51757
51781
  `, e = e.substring(h.length + 1), l = true), !l) {
51758
- let O = this.rules.other.nextBulletRegex(f),
51759
- V = this.rules.other.hrRegex(f),
51760
- Y = this.rules.other.fencesBeginRegex(f),
51761
- ee = this.rules.other.headingBeginRegex(f),
51762
- fe = this.rules.other.htmlBeginRegex(f);
51782
+ let S = this.rules.other.nextBulletRegex(f),
51783
+ ee = this.rules.other.hrRegex(f),
51784
+ te = this.rules.other.fencesBeginRegex(f),
51785
+ ne = this.rules.other.headingBeginRegex(f),
51786
+ xe = this.rules.other.htmlBeginRegex(f),
51787
+ be = this.rules.other.blockquoteBeginRegex(f);
51763
51788
  for (; e;) {
51764
- let H = e.split(`
51789
+ let Z = e.split(`
51765
51790
  `, 1)[0],
51766
51791
  A;
51767
- if (h = H, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), Y.test(h) || ee.test(h) || fe.test(h) || O.test(h) || V.test(h)) break;
51792
+ if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), te.test(h) || ne.test(h) || xe.test(h) || be.test(h) || S.test(h) || ee.test(h)) break;
51768
51793
  if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
51769
51794
  ` + A.slice(f);else {
51770
- if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || Y.test(g) || ee.test(g) || V.test(g)) break;
51795
+ if (R || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(d) || ne.test(d) || ee.test(d)) break;
51771
51796
  c += `
51772
51797
  ` + h;
51773
51798
  }
51774
- !R && !h.trim() && (R = true), p += H + `
51775
- `, e = e.substring(H.length + 1), g = A.slice(f);
51799
+ R = !h.trim(), p += Z + `
51800
+ `, e = e.substring(Z.length + 1), d = A.slice(f);
51776
51801
  }
51777
51802
  }
51778
51803
  i.loose || (a ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (a = true)), i.items.push({
@@ -51812,8 +51837,8 @@ ${c}` : c;
51812
51837
  }
51813
51838
  }
51814
51839
  if (!i.loose) {
51815
- let p = l.tokens.filter(g => g.type === "space"),
51816
- c = p.length > 0 && p.some(g => this.rules.other.anyLine.test(g.raw));
51840
+ let p = l.tokens.filter(d => d.type === "space"),
51841
+ c = p.length > 0 && p.some(d => this.rules.other.anyLine.test(d.raw));
51817
51842
  i.loose = c;
51818
51843
  }
51819
51844
  }
@@ -51826,13 +51851,16 @@ ${c}` : c;
51826
51851
  }
51827
51852
  html(e) {
51828
51853
  let t = this.rules.block.html.exec(e);
51829
- if (t) return {
51830
- type: "html",
51831
- block: true,
51832
- raw: t[0],
51833
- pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
51834
- text: t[0]
51835
- };
51854
+ if (t) {
51855
+ let n = Y$1(t[0]);
51856
+ return {
51857
+ type: "html",
51858
+ block: true,
51859
+ raw: n,
51860
+ pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
51861
+ text: n
51862
+ };
51863
+ }
51836
51864
  }
51837
51865
  def(e) {
51838
51866
  let t = this.rules.block.def.exec(e);
@@ -51843,7 +51871,8 @@ ${c}` : c;
51843
51871
  return {
51844
51872
  type: "def",
51845
51873
  tag: n,
51846
- raw: t[0],
51874
+ raw: $(t[0], `
51875
+ `),
51847
51876
  href: r,
51848
51877
  title: i
51849
51878
  };
@@ -51852,13 +51881,14 @@ ${c}` : c;
51852
51881
  table(e) {
51853
51882
  let t = this.rules.block.table.exec(e);
51854
51883
  if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
51855
- let n = J(t[1]),
51884
+ let n = V(t[1]),
51856
51885
  r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"),
51857
51886
  i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
51858
51887
  `) : [],
51859
51888
  s = {
51860
51889
  type: "table",
51861
- raw: t[0],
51890
+ raw: $(t[0], `
51891
+ `),
51862
51892
  header: [],
51863
51893
  align: [],
51864
51894
  rows: []
@@ -51871,7 +51901,7 @@ ${c}` : c;
51871
51901
  header: true,
51872
51902
  align: s.align[a]
51873
51903
  });
51874
- for (let a of i) s.rows.push(J(a, s.header.length).map((o, l) => ({
51904
+ for (let a of i) s.rows.push(V(a, s.header.length).map((o, l) => ({
51875
51905
  text: o,
51876
51906
  tokens: this.lexer.inline(o),
51877
51907
  header: false,
@@ -51882,13 +51912,17 @@ ${c}` : c;
51882
51912
  }
51883
51913
  lheading(e) {
51884
51914
  let t = this.rules.block.lheading.exec(e);
51885
- if (t) return {
51886
- type: "heading",
51887
- raw: t[0],
51888
- depth: t[2].charAt(0) === "=" ? 1 : 2,
51889
- text: t[1],
51890
- tokens: this.lexer.inline(t[1])
51891
- };
51915
+ if (t) {
51916
+ let n = t[1].trim();
51917
+ return {
51918
+ type: "heading",
51919
+ raw: $(t[0], `
51920
+ `),
51921
+ depth: t[2].charAt(0) === "=" ? 1 : 2,
51922
+ text: n,
51923
+ tokens: this.lexer.inline(n)
51924
+ };
51925
+ }
51892
51926
  }
51893
51927
  paragraph(e) {
51894
51928
  let t = this.rules.block.paragraph.exec(e);
@@ -51937,10 +51971,10 @@ ${c}` : c;
51937
51971
  let n = t[2].trim();
51938
51972
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
51939
51973
  if (!this.rules.other.endAngleBracket.test(n)) return;
51940
- let s = z$1(n.slice(0, -1), "\\");
51974
+ let s = $(n.slice(0, -1), "\\");
51941
51975
  if ((n.length - s.length) % 2 === 0) return;
51942
51976
  } else {
51943
- let s = de(t[2], "()");
51977
+ let s = ge(t[2], "()");
51944
51978
  if (s === -2) return;
51945
51979
  if (s > -1) {
51946
51980
  let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
@@ -51953,7 +51987,7 @@ ${c}` : c;
51953
51987
  let s = this.rules.other.pedanticHrefTitle.exec(r);
51954
51988
  s && (r = s[1], i = s[3]);
51955
51989
  } else i = t[3] ? t[3].slice(1, -1) : "";
51956
- return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), ge(t, {
51990
+ return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), me(t, {
51957
51991
  href: r && r.replace(this.rules.inline.anyPunctuation, "$1"),
51958
51992
  title: i && i.replace(this.rules.inline.anyPunctuation, "$1")
51959
51993
  }, t[0], this.lexer, this.rules);
@@ -51972,20 +52006,20 @@ ${c}` : c;
51972
52006
  text: s
51973
52007
  };
51974
52008
  }
51975
- return ge(n, i, n[0], this.lexer, this.rules);
52009
+ return me(n, i, n[0], this.lexer, this.rules);
51976
52010
  }
51977
52011
  }
51978
52012
  emStrong(e, t, n = "") {
51979
52013
  let r = this.rules.inline.emStrongLDelim.exec(e);
51980
- if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
51981
- if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
52014
+ if (!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
52015
+ if (!(r[1] || r[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
51982
52016
  let s = [...r[0]].length - 1,
51983
52017
  a,
51984
52018
  o,
51985
52019
  l = s,
51986
52020
  p = 0,
51987
52021
  c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
51988
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null;) {
52022
+ for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) !== null;) {
51989
52023
  if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
51990
52024
  if (o = [...a].length, r[3] || r[4]) {
51991
52025
  l += o;
@@ -51996,8 +52030,8 @@ ${c}` : c;
51996
52030
  }
51997
52031
  if (l -= o, l > 0) continue;
51998
52032
  o = Math.min(o, o + l + p);
51999
- let g = [...r[0]][0].length,
52000
- h = e.slice(0, s + r.index + g + o);
52033
+ let d = [...r[0]][0].length,
52034
+ h = e.slice(0, s + r.index + d + o);
52001
52035
  if (Math.min(s, o) % 2) {
52002
52036
  let f = h.slice(1, -1);
52003
52037
  return {
@@ -52037,14 +52071,34 @@ ${c}` : c;
52037
52071
  raw: t[0]
52038
52072
  };
52039
52073
  }
52040
- del(e) {
52041
- let t = this.rules.inline.del.exec(e);
52042
- if (t) return {
52043
- type: "del",
52044
- raw: t[0],
52045
- text: t[2],
52046
- tokens: this.lexer.inlineTokens(t[2])
52047
- };
52074
+ del(e, t, n = "") {
52075
+ let r = this.rules.inline.delLDelim.exec(e);
52076
+ if (!r) return;
52077
+ if (!(r[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
52078
+ let s = [...r[0]].length - 1,
52079
+ a,
52080
+ o,
52081
+ l = s,
52082
+ p = this.rules.inline.delRDelim;
52083
+ for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) !== null;) {
52084
+ if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a || (o = [...a].length, o !== s)) continue;
52085
+ if (r[3] || r[4]) {
52086
+ l += o;
52087
+ continue;
52088
+ }
52089
+ if (l -= o, l > 0) continue;
52090
+ o = Math.min(o, o + l);
52091
+ let c = [...r[0]][0].length,
52092
+ d = e.slice(0, s + r.index + c + o),
52093
+ h = d.slice(s, -s);
52094
+ return {
52095
+ type: "del",
52096
+ raw: d,
52097
+ text: h,
52098
+ tokens: this.lexer.inlineTokens(h)
52099
+ };
52100
+ }
52101
+ }
52048
52102
  }
52049
52103
  autolink(e) {
52050
52104
  let t = this.rules.inline.autolink.exec(e);
@@ -52105,22 +52159,22 @@ ${c}` : c;
52105
52159
  inlineQueue;
52106
52160
  tokenizer;
52107
52161
  constructor(e) {
52108
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || T$1, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
52162
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || T$1, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
52109
52163
  inLink: false,
52110
52164
  inRawBlock: false,
52111
52165
  top: true
52112
52166
  };
52113
52167
  let t = {
52114
52168
  other: m,
52115
- block: E.normal,
52116
- inline: M$1.normal
52169
+ block: B.normal,
52170
+ inline: I.normal
52117
52171
  };
52118
- this.options.pedantic ? (t.block = E.pedantic, t.inline = M$1.pedantic) : this.options.gfm && (t.block = E.gfm, this.options.breaks ? t.inline = M$1.breaks : t.inline = M$1.gfm), this.tokenizer.rules = t;
52172
+ this.options.pedantic ? (t.block = B.pedantic, t.inline = I.pedantic) : this.options.gfm && (t.block = B.gfm, this.options.breaks ? t.inline = I.breaks : t.inline = I.gfm), this.tokenizer.rules = t;
52119
52173
  }
52120
52174
  static get rules() {
52121
52175
  return {
52122
- block: E,
52123
- inline: M$1
52176
+ block: B,
52177
+ inline: I
52124
52178
  };
52125
52179
  }
52126
52180
  static lex(e, t) {
@@ -52139,7 +52193,7 @@ ${c}` : c;
52139
52193
  return this.inlineQueue = [], this.tokens;
52140
52194
  }
52141
52195
  blockTokens(e, t = [], n = false) {
52142
- for (this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e;) {
52196
+ for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e;) {
52143
52197
  let r;
52144
52198
  if (this.options.extensions?.block?.some(s => (r = s.call({
52145
52199
  lexer: this
@@ -52249,15 +52303,16 @@ ${c}` : c;
52249
52303
  }), t;
52250
52304
  }
52251
52305
  inlineTokens(e, t = []) {
52306
+ this.tokenizer.lexer = this;
52252
52307
  let n = e,
52253
52308
  r = null;
52254
52309
  if (this.tokens.links) {
52255
52310
  let o = Object.keys(this.tokens.links);
52256
- if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null;) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
52311
+ if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) !== null;) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
52257
52312
  }
52258
- for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
52313
+ for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
52259
52314
  let i;
52260
- for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null;) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
52315
+ for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) !== null;) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
52261
52316
  n = this.options.hooks?.emStrongMask?.call({
52262
52317
  lexer: this
52263
52318
  }, n) ?? n;
@@ -52299,7 +52354,7 @@ ${c}` : c;
52299
52354
  e = e.substring(o.raw.length), t.push(o);
52300
52355
  continue;
52301
52356
  }
52302
- if (o = this.tokenizer.del(e)) {
52357
+ if (o = this.tokenizer.del(e, n, a)) {
52303
52358
  e = e.substring(o.raw.length), t.push(o);
52304
52359
  continue;
52305
52360
  }
@@ -52315,11 +52370,11 @@ ${c}` : c;
52315
52370
  if (this.options.extensions?.startInline) {
52316
52371
  let p = 1 / 0,
52317
52372
  c = e.slice(1),
52318
- g;
52373
+ d;
52319
52374
  this.options.extensions.startInline.forEach(h => {
52320
- g = h.call({
52375
+ d = h.call({
52321
52376
  lexer: this
52322
- }, c), typeof g == "number" && g >= 0 && (p = Math.min(p, g));
52377
+ }, c), typeof d == "number" && d >= 0 && (p = Math.min(p, d));
52323
52378
  }), p < 1 / 0 && p >= 0 && (l = e.substring(0, p + 1));
52324
52379
  }
52325
52380
  if (o = this.tokenizer.inlineText(l)) {
@@ -52339,7 +52394,7 @@ ${c}` : c;
52339
52394
  return t;
52340
52395
  }
52341
52396
  };
52342
- var P$1 = class P {
52397
+ var y = class {
52343
52398
  options;
52344
52399
  parser;
52345
52400
  constructor(e) {
@@ -52356,8 +52411,8 @@ ${c}` : c;
52356
52411
  let r = (t || "").match(m.notSpaceStart)?.[0],
52357
52412
  i = e.replace(m.endingNewline, "") + `
52358
52413
  `;
52359
- return r ? '<pre><code class="language-' + w(r) + '">' + (n ? i : w(i, true)) + `</code></pre>
52360
- ` : "<pre><code>" + (n ? i : w(i, true)) + `</code></pre>
52414
+ return r ? '<pre><code class="language-' + O(r) + '">' + (n ? i : O(i, true)) + `</code></pre>
52415
+ ` : "<pre><code>" + (n ? i : O(i, true)) + `</code></pre>
52361
52416
  `;
52362
52417
  }
52363
52418
  blockquote({
@@ -52463,7 +52518,7 @@ ${e}</tr>
52463
52518
  codespan({
52464
52519
  text: e
52465
52520
  }) {
52466
- return `<code>${w(e, true)}</code>`;
52521
+ return `<code>${O(e, true)}</code>`;
52467
52522
  }
52468
52523
  br(e) {
52469
52524
  return "<br>";
@@ -52479,11 +52534,11 @@ ${e}</tr>
52479
52534
  tokens: n
52480
52535
  }) {
52481
52536
  let r = this.parser.parseInline(n),
52482
- i = X(e);
52537
+ i = J(e);
52483
52538
  if (i === null) return r;
52484
52539
  e = i;
52485
52540
  let s = '<a href="' + e + '"';
52486
- return t && (s += ' title="' + w(t) + '"'), s += ">" + r + "</a>", s;
52541
+ return t && (s += ' title="' + O(t) + '"'), s += ">" + r + "</a>", s;
52487
52542
  }
52488
52543
  image({
52489
52544
  href: e,
@@ -52492,17 +52547,17 @@ ${e}</tr>
52492
52547
  tokens: r
52493
52548
  }) {
52494
52549
  r && (n = this.parser.parseInline(r, this.parser.textRenderer));
52495
- let i = X(e);
52496
- if (i === null) return w(n);
52550
+ let i = J(e);
52551
+ if (i === null) return O(n);
52497
52552
  e = i;
52498
- let s = `<img src="${e}" alt="${n}"`;
52499
- return t && (s += ` title="${w(t)}"`), s += ">", s;
52553
+ let s = `<img src="${e}" alt="${O(n)}"`;
52554
+ return t && (s += ` title="${O(t)}"`), s += ">", s;
52500
52555
  }
52501
52556
  text(e) {
52502
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : w(e.text);
52557
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : O(e.text);
52503
52558
  }
52504
52559
  };
52505
- var $ = class {
52560
+ var L$1 = class L {
52506
52561
  strong({
52507
52562
  text: e
52508
52563
  }) {
@@ -52557,7 +52612,7 @@ ${e}</tr>
52557
52612
  renderer;
52558
52613
  textRenderer;
52559
52614
  constructor(e) {
52560
- this.options = e || T$1, this.options.renderer = this.options.renderer || new P$1(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
52615
+ this.options = e || T$1, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L$1();
52561
52616
  }
52562
52617
  static parse(e, t) {
52563
52618
  return new u(t).parse(e);
@@ -52566,6 +52621,7 @@ ${e}</tr>
52566
52621
  return new u(t).parseInline(e);
52567
52622
  }
52568
52623
  parse(e) {
52624
+ this.renderer.parser = this;
52569
52625
  let t = "";
52570
52626
  for (let n = 0; n < e.length; n++) {
52571
52627
  let r = e[n];
@@ -52652,6 +52708,7 @@ ${e}</tr>
52652
52708
  return t;
52653
52709
  }
52654
52710
  parseInline(e, t = this.renderer) {
52711
+ this.renderer.parser = this;
52655
52712
  let n = "";
52656
52713
  for (let r = 0; r < e.length; r++) {
52657
52714
  let i = e[r];
@@ -52732,7 +52789,7 @@ ${e}</tr>
52732
52789
  return n;
52733
52790
  }
52734
52791
  };
52735
- var S = class {
52792
+ var P$1 = class P {
52736
52793
  options;
52737
52794
  block;
52738
52795
  constructor(e) {
@@ -52752,24 +52809,24 @@ ${e}</tr>
52752
52809
  emStrongMask(e) {
52753
52810
  return e;
52754
52811
  }
52755
- provideLexer() {
52756
- return this.block ? x.lex : x.lexInline;
52812
+ provideLexer(e = this.block) {
52813
+ return e ? x.lex : x.lexInline;
52757
52814
  }
52758
- provideParser() {
52759
- return this.block ? b.parse : b.parseInline;
52815
+ provideParser(e = this.block) {
52816
+ return e ? b.parse : b.parseInline;
52760
52817
  }
52761
52818
  };
52762
- var B = class {
52763
- defaults = L$1();
52819
+ var D = class {
52820
+ defaults = z$1();
52764
52821
  options = this.setOptions;
52765
52822
  parse = this.parseMarkdown(true);
52766
52823
  parseInline = this.parseMarkdown(false);
52767
52824
  Parser = b;
52768
- Renderer = P$1;
52769
- TextRenderer = $;
52825
+ Renderer = y;
52826
+ TextRenderer = L$1;
52770
52827
  Lexer = x;
52771
- Tokenizer = y;
52772
- Hooks = S;
52828
+ Tokenizer = w;
52829
+ Hooks = P$1;
52773
52830
  constructor(...e) {
52774
52831
  this.use(...e);
52775
52832
  }
@@ -52825,7 +52882,7 @@ ${e}</tr>
52825
52882
  }
52826
52883
  "childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
52827
52884
  }), r.extensions = t), n.renderer) {
52828
- let i = this.defaults.renderer || new P$1(this.defaults);
52885
+ let i = this.defaults.renderer || new y(this.defaults);
52829
52886
  for (let s in n.renderer) {
52830
52887
  if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
52831
52888
  if (["options", "parser"].includes(s)) continue;
@@ -52840,7 +52897,7 @@ ${e}</tr>
52840
52897
  r.renderer = i;
52841
52898
  }
52842
52899
  if (n.tokenizer) {
52843
- let i = this.defaults.tokenizer || new y(this.defaults);
52900
+ let i = this.defaults.tokenizer || new w(this.defaults);
52844
52901
  for (let s in n.tokenizer) {
52845
52902
  if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
52846
52903
  if (["options", "rules", "lexer"].includes(s)) continue;
@@ -52855,24 +52912,24 @@ ${e}</tr>
52855
52912
  r.tokenizer = i;
52856
52913
  }
52857
52914
  if (n.hooks) {
52858
- let i = this.defaults.hooks || new S();
52915
+ let i = this.defaults.hooks || new P$1();
52859
52916
  for (let s in n.hooks) {
52860
52917
  if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
52861
52918
  if (["options", "block"].includes(s)) continue;
52862
52919
  let a = s,
52863
52920
  o = n.hooks[a],
52864
52921
  l = i[a];
52865
- S.passThroughHooks.has(s) ? i[a] = p => {
52866
- if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return (async () => {
52867
- let g = await o.call(i, p);
52868
- return l.call(i, g);
52922
+ P$1.passThroughHooks.has(s) ? i[a] = p => {
52923
+ if (this.defaults.async && P$1.passThroughHooksRespectAsync.has(s)) return (async () => {
52924
+ let d = await o.call(i, p);
52925
+ return l.call(i, d);
52869
52926
  })();
52870
52927
  let c = o.call(i, p);
52871
52928
  return l.call(i, c);
52872
52929
  } : i[a] = (...p) => {
52873
52930
  if (this.defaults.async) return (async () => {
52874
- let g = await o.apply(i, p);
52875
- return g === false && (g = await l.apply(i, p)), g;
52931
+ let d = await o.apply(i, p);
52932
+ return d === false && (d = await l.apply(i, p)), d;
52876
52933
  })();
52877
52934
  let c = o.apply(i, p);
52878
52935
  return c === false && (c = l.apply(i, p)), c;
@@ -52921,17 +52978,17 @@ ${e}</tr>
52921
52978
  if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
52922
52979
  if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
52923
52980
  let o = s.hooks ? await s.hooks.preprocess(n) : n,
52924
- p = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s),
52981
+ p = await (s.hooks ? await s.hooks.provideLexer(e) : e ? x.lex : x.lexInline)(o, s),
52925
52982
  c = s.hooks ? await s.hooks.processAllTokens(p) : p;
52926
52983
  s.walkTokens && (await Promise.all(this.walkTokens(c, s.walkTokens)));
52927
- let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
52984
+ let h = await (s.hooks ? await s.hooks.provideParser(e) : e ? b.parse : b.parseInline)(c, s);
52928
52985
  return s.hooks ? await s.hooks.postprocess(h) : h;
52929
52986
  })().catch(a);
52930
52987
  try {
52931
52988
  s.hooks && (n = s.hooks.preprocess(n));
52932
- let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
52989
+ let l = (s.hooks ? s.hooks.provideLexer(e) : e ? x.lex : x.lexInline)(n, s);
52933
52990
  s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
52934
- let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
52991
+ let c = (s.hooks ? s.hooks.provideParser(e) : e ? b.parse : b.parseInline)(l, s);
52935
52992
  return s.hooks && (c = s.hooks.postprocess(c)), c;
52936
52993
  } catch (o) {
52937
52994
  return a(o);
@@ -52942,7 +52999,7 @@ ${e}</tr>
52942
52999
  return n => {
52943
53000
  if (n.message += `
52944
53001
  Please report this to https://github.com/markedjs/marked.`, e) {
52945
- let r = "<p>An error occurred:</p><pre>" + w(n.message + "", true) + "</pre>";
53002
+ let r = "<p>An error occurred:</p><pre>" + O(n.message + "", true) + "</pre>";
52946
53003
  return t ? Promise.resolve(r) : r;
52947
53004
  }
52948
53005
  if (t) return Promise.reject(n);
@@ -52950,36 +53007,36 @@ Please report this to https://github.com/markedjs/marked.`, e) {
52950
53007
  };
52951
53008
  }
52952
53009
  };
52953
- var _ = new B();
52954
- function d(u, e) {
52955
- return _.parse(u, e);
52956
- }
52957
- d.options = d.setOptions = function (u) {
52958
- return _.setOptions(u), d.defaults = _.defaults, Z(d.defaults), d;
52959
- };
52960
- d.getDefaults = L$1;
52961
- d.defaults = T$1;
52962
- d.use = function (...u) {
52963
- return _.use(...u), d.defaults = _.defaults, Z(d.defaults), d;
52964
- };
52965
- d.walkTokens = function (u, e) {
52966
- return _.walkTokens(u, e);
52967
- };
52968
- d.parseInline = _.parseInline;
52969
- d.Parser = b;
52970
- d.parser = b.parse;
52971
- d.Renderer = P$1;
52972
- d.TextRenderer = $;
52973
- d.Lexer = x;
52974
- d.lexer = x.lex;
52975
- d.Tokenizer = y;
52976
- d.Hooks = S;
52977
- d.parse = d;
52978
- d.options;
52979
- d.setOptions;
52980
- d.use;
52981
- d.walkTokens;
52982
- d.parseInline;
53010
+ var M$1 = new D();
53011
+ function g(u, e) {
53012
+ return M$1.parse(u, e);
53013
+ }
53014
+ g.options = g.setOptions = function (u) {
53015
+ return M$1.setOptions(u), g.defaults = M$1.defaults, G(g.defaults), g;
53016
+ };
53017
+ g.getDefaults = z$1;
53018
+ g.defaults = T$1;
53019
+ g.use = function (...u) {
53020
+ return M$1.use(...u), g.defaults = M$1.defaults, G(g.defaults), g;
53021
+ };
53022
+ g.walkTokens = function (u, e) {
53023
+ return M$1.walkTokens(u, e);
53024
+ };
53025
+ g.parseInline = M$1.parseInline;
53026
+ g.Parser = b;
53027
+ g.parser = b.parse;
53028
+ g.Renderer = y;
53029
+ g.TextRenderer = L$1;
53030
+ g.Lexer = x;
53031
+ g.lexer = x.lex;
53032
+ g.Tokenizer = w;
53033
+ g.Hooks = P$1;
53034
+ g.parse = g;
53035
+ g.options;
53036
+ g.setOptions;
53037
+ g.use;
53038
+ g.walkTokens;
53039
+ g.parseInline;
52983
53040
  b.parse;
52984
53041
  x.lex;
52985
53042
 
@@ -53775,6 +53832,50 @@ Please report this to https://github.com/markedjs/marked.`, e) {
53775
53832
  });
53776
53833
  fn(formField);
53777
53834
  }
53835
+
53836
+ /**
53837
+ * Returns a copy of `target` with the value at `path` removed, pruning any
53838
+ * ancestor that becomes empty. Pure: the input is not mutated and untouched
53839
+ * sibling branches keep their original references (path-cloning).
53840
+ *
53841
+ * Pruning rules:
53842
+ * - An object ancestor is removed when it has no own keys left.
53843
+ * - An array ancestor is removed when every entry is nullish. Arrays are
53844
+ * never compacted; `delete` leaves a sparse hole so sibling indexes stay
53845
+ * stable.
53846
+ *
53847
+ * @template T
53848
+ * @param {T} target
53849
+ * @param {Array<string|number>} path
53850
+ * @returns {T}
53851
+ */
53852
+ function pruneAt(target, path) {
53853
+ if (!path.length) {
53854
+ return target;
53855
+ }
53856
+ const cloneContainer = c => Array.isArray(c) ? c.slice() : {
53857
+ ...c
53858
+ };
53859
+ const clones = [cloneContainer(target)];
53860
+ for (let i = 0; i < path.length - 1; i++) {
53861
+ const next = clones[i][path[i]];
53862
+ if (next == null || typeof next !== 'object') {
53863
+ return target;
53864
+ }
53865
+ const cloned = cloneContainer(next);
53866
+ clones[i][path[i]] = cloned;
53867
+ clones.push(cloned);
53868
+ }
53869
+ delete clones[clones.length - 1][path[path.length - 1]];
53870
+ for (let i = clones.length - 1; i > 0; i--) {
53871
+ if (Object.values(clones[i]).every(v => v == null)) {
53872
+ delete clones[i - 1][path[i - 1]];
53873
+ } else {
53874
+ break;
53875
+ }
53876
+ }
53877
+ return clones[0];
53878
+ }
53778
53879
  function wrapObjectKeysWithUnderscores(obj) {
53779
53880
  const newObj = {};
53780
53881
  for (const [key, value] of Object.entries(obj)) {
@@ -60028,7 +60129,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
60028
60129
  */
60029
60130
  render(markdown) {
60030
60131
  // @ts-expect-error
60031
- return d.parse(markdown, {
60132
+ return g.parse(markdown, {
60032
60133
  gfm: true,
60033
60134
  breaks: true
60034
60135
  });
@@ -60561,9 +60662,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
60561
60662
  } = this._form._getState();
60562
60663
  context.oldErrors = clone(errors);
60563
60664
  const fieldErrors = this._validator.validateFieldInstance(fieldInstance, value);
60564
- const updatedErrors = set$1(errors, [id, ...Object.values(indexes || {})], fieldErrors.length ? fieldErrors : undefined);
60665
+ const errorPath = [id, ...Object.values(indexes || {})];
60666
+ let nextErrors;
60667
+ if (fieldErrors.length) {
60668
+ set$1(errors, errorPath, fieldErrors);
60669
+ nextErrors = errors;
60670
+ } else {
60671
+ nextErrors = pruneAt(errors, errorPath);
60672
+ }
60565
60673
  this._form._setState({
60566
- errors: updatedErrors
60674
+ errors: nextErrors
60567
60675
  });
60568
60676
  }
60569
60677
  revert(context) {
@@ -62940,11 +63048,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
62940
63048
  const validator = this.get('validator');
62941
63049
  const fieldErrors = validator.validateFieldInstance(fieldInstance, value);
62942
63050
  set$1(data, valuePath, value);
62943
- set$1(errors, [id, ...Object.values(indexes || {})], fieldErrors.length ? fieldErrors : undefined);
63051
+ const errorPath = [id, ...Object.values(indexes || {})];
63052
+ let nextErrors;
63053
+ if (fieldErrors.length) {
63054
+ set$1(errors, errorPath, fieldErrors);
63055
+ nextErrors = errors;
63056
+ } else {
63057
+ nextErrors = pruneAt(errors, errorPath);
63058
+ }
62944
63059
  this._emit('field.updated', update);
62945
63060
  this._setState({
62946
63061
  data: clone(data),
62947
- errors: clone(errors)
63062
+ errors: clone(nextErrors)
62948
63063
  });
62949
63064
  }
62950
63065