drizzle-cube 0.5.1 → 0.5.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.
Files changed (115) hide show
  1. package/README.md +4 -0
  2. package/dist/adapters/express/index.cjs +1 -1
  3. package/dist/adapters/express/index.js +4 -4
  4. package/dist/adapters/fastify/index.cjs +1 -1
  5. package/dist/adapters/fastify/index.js +4 -4
  6. package/dist/adapters/{handler-3LGcjLtr.js → handler-BC3nFNxV.js} +2 -2
  7. package/dist/adapters/{handler-BzzbVpcl.cjs → handler-Cqf-CqAS.cjs} +2 -2
  8. package/dist/adapters/hono/index.cjs +1 -1
  9. package/dist/adapters/hono/index.js +4 -4
  10. package/dist/adapters/locale-BoiA6WiV.cjs +198 -0
  11. package/dist/adapters/{locale-DTnJrxm1.js → locale-D9VQkLXt.js} +442 -404
  12. package/dist/adapters/mcp-tools.cjs +1 -1
  13. package/dist/adapters/mcp-tools.js +2 -2
  14. package/dist/adapters/mcp-transport-B0mgxRnJ.js +579 -0
  15. package/dist/adapters/mcp-transport-irsahKmD.cjs +39 -0
  16. package/dist/adapters/nextjs/index.cjs +1 -1
  17. package/dist/adapters/nextjs/index.js +4 -4
  18. package/dist/adapters/{openai-C4BD8xnN.cjs → openai-B4N3KfTG.cjs} +1 -1
  19. package/dist/adapters/{openai-CaSQEduB.js → openai-BWdm0JvG.js} +1 -1
  20. package/dist/adapters/openai-CoqT_FM5.cjs +16 -0
  21. package/dist/{server/openai-CqZg6zYL.js → adapters/openai-D0Nsvc9L.js} +824 -720
  22. package/dist/adapters/{utils-DOg9oGdt.js → utils-CTYvfZ3I.js} +711 -713
  23. package/dist/adapters/{utils-DNrj-ryp.cjs → utils-XPOzzMdY.cjs} +5 -5
  24. package/dist/adapters/utils.cjs +1 -1
  25. package/dist/adapters/utils.js +1 -1
  26. package/dist/cli/index.cjs +2 -2
  27. package/dist/client/charts.js +10 -10
  28. package/dist/client/chunks/{DashboardEditModal-cSSIAZGy.js → DashboardEditModal-IU_0dgfC.js} +12 -12
  29. package/dist/client/chunks/{DashboardEditModal-cSSIAZGy.js.map → DashboardEditModal-IU_0dgfC.js.map} +1 -1
  30. package/dist/client/chunks/{FieldSearchModal-CZNo4pNK.js → FieldSearchModal-BCWanpPX.js} +3 -3
  31. package/dist/client/chunks/{FieldSearchModal-CZNo4pNK.js.map → FieldSearchModal-BCWanpPX.js.map} +1 -1
  32. package/dist/client/chunks/KpiDelta-_igN6cJa.js +2 -0
  33. package/dist/client/chunks/KpiNumber-t5n8PtRU.js +2 -0
  34. package/dist/client/chunks/KpiText-BCZJJ6a0.js +2 -0
  35. package/dist/client/chunks/{RetentionCombinedChart-BD8tGeM_.js → RetentionCombinedChart-CQMBODsK.js} +2 -2
  36. package/dist/client/chunks/{RetentionCombinedChart-BD8tGeM_.js.map → RetentionCombinedChart-CQMBODsK.js.map} +1 -1
  37. package/dist/client/chunks/SchemaVisualization-BUUhlOvG.js +2 -0
  38. package/dist/client/chunks/SchemaVisualizationLazy-CwaPCUL0.js +2 -0
  39. package/dist/client/chunks/{analysis-builder-BeVZhiQ5.js → analysis-builder-Dm6eD_AX.js} +6 -6
  40. package/dist/client/chunks/{analysis-builder-BeVZhiQ5.js.map → analysis-builder-Dm6eD_AX.js.map} +1 -1
  41. package/dist/client/chunks/{analysis-builder-shared-BWc7ZZnG.js → analysis-builder-shared-DT5bXwCA.js} +6 -6
  42. package/dist/client/chunks/{analysis-builder-shared-BWc7ZZnG.js.map → analysis-builder-shared-DT5bXwCA.js.map} +1 -1
  43. package/dist/client/chunks/{chart-area-D63kG8OT.js → chart-area-DDti9Qtp.js} +2 -2
  44. package/dist/client/chunks/{chart-area-D63kG8OT.js.map → chart-area-DDti9Qtp.js.map} +1 -1
  45. package/dist/client/chunks/{chart-bar-BEfsCLjl.js → chart-bar-B3s9qDlh.js} +2 -2
  46. package/dist/client/chunks/{chart-bar-BEfsCLjl.js.map → chart-bar-B3s9qDlh.js.map} +1 -1
  47. package/dist/client/chunks/{chart-data-table-C3Xh9jwL.js → chart-data-table-Qrt6EAno.js} +17 -17
  48. package/dist/client/chunks/{chart-data-table-C3Xh9jwL.js.map → chart-data-table-Qrt6EAno.js.map} +1 -1
  49. package/dist/client/chunks/{chart-kpi-delta-CYE0S1x_.js → chart-kpi-delta-CgldZ7zO.js} +3 -3
  50. package/dist/client/chunks/{chart-kpi-delta-CYE0S1x_.js.map → chart-kpi-delta-CgldZ7zO.js.map} +1 -1
  51. package/dist/client/chunks/{chart-kpi-number-BlZ79xHW.js → chart-kpi-number-ByfuX1ki.js} +5 -5
  52. package/dist/client/chunks/{chart-kpi-number-BlZ79xHW.js.map → chart-kpi-number-ByfuX1ki.js.map} +1 -1
  53. package/dist/client/chunks/{chart-kpi-text-DY1BnxPe.js → chart-kpi-text-DeNuDraJ.js} +2 -2
  54. package/dist/client/chunks/{chart-kpi-text-DY1BnxPe.js.map → chart-kpi-text-DeNuDraJ.js.map} +1 -1
  55. package/dist/client/chunks/{chart-line-CBsTThTv.js → chart-line-RdZwtk27.js} +2 -2
  56. package/dist/client/chunks/{chart-line-CBsTThTv.js.map → chart-line-RdZwtk27.js.map} +1 -1
  57. package/dist/client/chunks/{chart-markdown-BWaWVkuz.js → chart-markdown-CiGRZdJj.js} +1203 -1139
  58. package/dist/client/chunks/chart-markdown-CiGRZdJj.js.map +1 -0
  59. package/dist/client/chunks/{chart-measure-profile-B41qCTBG.js → chart-measure-profile-Ckjw9bX6.js} +2 -2
  60. package/dist/client/chunks/{chart-measure-profile-B41qCTBG.js.map → chart-measure-profile-Ckjw9bX6.js.map} +1 -1
  61. package/dist/client/chunks/{chart-pie-Djbu8x2v.js → chart-pie-BvY4FY__.js} +2 -2
  62. package/dist/client/chunks/{chart-pie-Djbu8x2v.js.map → chart-pie-BvY4FY__.js.map} +1 -1
  63. package/dist/client/chunks/{chart-radar-BsTcKV0K.js → chart-radar-DjiiEAmc.js} +2 -2
  64. package/dist/client/chunks/{chart-radar-BsTcKV0K.js.map → chart-radar-DjiiEAmc.js.map} +1 -1
  65. package/dist/client/chunks/{chart-radial-bar-Du7XNnwE.js → chart-radial-bar-lla_JEYu.js} +2 -2
  66. package/dist/client/chunks/{chart-radial-bar-Du7XNnwE.js.map → chart-radial-bar-lla_JEYu.js.map} +1 -1
  67. package/dist/client/chunks/{chart-scatter-D8krEYsA.js → chart-scatter-DwXnI0rr.js} +2 -2
  68. package/dist/client/chunks/{chart-scatter-D8krEYsA.js.map → chart-scatter-DwXnI0rr.js.map} +1 -1
  69. package/dist/client/chunks/{chart-tree-map-C5C2iaWM.js → chart-tree-map-DJHoA26f.js} +2 -2
  70. package/dist/client/chunks/{chart-tree-map-C5C2iaWM.js.map → chart-tree-map-DJHoA26f.js.map} +1 -1
  71. package/dist/client/chunks/{chart-waterfall-BGdPrJ5Y.js → chart-waterfall-Y7c8csO5.js} +2 -2
  72. package/dist/client/chunks/{chart-waterfall-BGdPrJ5Y.js.map → chart-waterfall-Y7c8csO5.js.map} +1 -1
  73. package/dist/client/chunks/{core-DcfMGTVa.js → core-Dk6z6kC0.js} +2 -2
  74. package/dist/client/chunks/{core-DcfMGTVa.js.map → core-Dk6z6kC0.js.map} +1 -1
  75. package/dist/client/chunks/{exceljs.min-CcjgM-qg.js → exceljs.min-DaJsLlWM.js} +24 -24
  76. package/dist/client/chunks/{exceljs.min-CcjgM-qg.js.map → exceljs.min-DaJsLlWM.js.map} +1 -1
  77. package/dist/client/chunks/{schema-visualization-Xp60Ff2W.js → schema-visualization-DWwJukK7.js} +8 -8
  78. package/dist/client/chunks/{schema-visualization-Xp60Ff2W.js.map → schema-visualization-DWwJukK7.js.map} +1 -1
  79. package/dist/client/chunks/{syntaxHighlighting-CnDujqwg.js → syntaxHighlighting-D8J6Yt9j.js} +2 -2
  80. package/dist/client/chunks/{syntaxHighlighting-CnDujqwg.js.map → syntaxHighlighting-D8J6Yt9j.js.map} +1 -1
  81. package/dist/client/chunks/{useDebounce-CfmUMFau.js → useDebounce-DyJVREop.js} +2 -2
  82. package/dist/client/chunks/{useDebounce-CfmUMFau.js.map → useDebounce-DyJVREop.js.map} +1 -1
  83. package/dist/client/chunks/{useExplainAI-BKGmejIj.js → useExplainAI-CxSkjocM.js} +4 -4
  84. package/dist/client/chunks/{useExplainAI-BKGmejIj.js.map → useExplainAI-CxSkjocM.js.map} +1 -1
  85. package/dist/client/chunks/{utils-BldkcRHv.js → utils-BHZdKxua.js} +2 -2
  86. package/dist/client/chunks/{utils-BldkcRHv.js.map → utils-BHZdKxua.js.map} +1 -1
  87. package/dist/client/chunks/{vendor-ClXpIiea.js → vendor-CBD_Olr0.js} +8 -8
  88. package/dist/client/chunks/{vendor-ClXpIiea.js.map → vendor-CBD_Olr0.js.map} +1 -1
  89. package/dist/client/components.js +3 -3
  90. package/dist/client/hooks.js +3 -3
  91. package/dist/client/icons.js +1 -1
  92. package/dist/client/index.js +11 -11
  93. package/dist/client/providers.js +1 -1
  94. package/dist/client/schema.js +1 -1
  95. package/dist/client/utils.js +5 -5
  96. package/dist/client-bundle-stats.html +1 -1
  97. package/dist/mcp-app/mcp-app.html +21 -21
  98. package/dist/server/index.cjs +42 -42
  99. package/dist/server/index.js +1009 -971
  100. package/dist/server/{openai-D9Zjuby1.cjs → openai-BfiZU0rG.cjs} +1 -1
  101. package/dist/server/openai-BwsBio1K.cjs +16 -0
  102. package/dist/server/{openai-rwauPzCT.js → openai-CLWSwD-D.js} +1 -1
  103. package/dist/{adapters/openai-BAnEZgKZ.js → server/openai-zpXlGbbF.js} +824 -720
  104. package/package.json +2 -2
  105. package/dist/adapters/locale-DueXjqMh.cjs +0 -198
  106. package/dist/adapters/mcp-transport-C7VLf4T5.js +0 -579
  107. package/dist/adapters/mcp-transport-poPHl_2j.cjs +0 -39
  108. package/dist/adapters/openai-4JP2B6pB.cjs +0 -16
  109. package/dist/client/chunks/KpiDelta-Dll_eCV1.js +0 -2
  110. package/dist/client/chunks/KpiNumber-BPlR92hI.js +0 -2
  111. package/dist/client/chunks/KpiText-BIxq7Jso.js +0 -2
  112. package/dist/client/chunks/SchemaVisualization-CCICjhvv.js +0 -2
  113. package/dist/client/chunks/SchemaVisualizationLazy-DraGsMx6.js +0 -2
  114. package/dist/client/chunks/chart-markdown-BWaWVkuz.js.map +0 -1
  115. package/dist/server/openai-DmuEbFd6.cjs +0 -16
@@ -15,7 +15,7 @@ function c(e) {
15
15
  }
16
16
  //#endregion
17
17
  //#region node_modules/markdown-to-jsx/dist/index.js
18
- var l = 32, u = 9, d = 13, f = 10, p = 96, m = 126, h = 91, g = 94, _ = 62, v = 35, y = 37, b = 45, x = 61, S = 92, C = 42, w = 95, T = 60, E = 64, D = 93, O = 33, k = 38, A = 58, j = 70, M = 102, N = 104, P = 119, F = 116, I = 112, L = 115, R = 160, ee = 12, te = 44, z = 59, ne = 63, re = 46, ie = 47, ae = 39, oe = 34, se = 43, ce = 124, le = 123, ue = 125, de = 40, fe = 41, pe = 30, me = 31, B = 48, V = 57, H = 65, U = 90, he = 97, ge = 122, _e = 128, ve = 32, W = {
18
+ var l = 32, u = 9, d = 13, f = 10, p = 96, m = 126, h = 91, g = 94, _ = 62, v = 35, y = 37, b = 45, x = 61, S = 92, C = 42, w = 95, T = 60, E = 64, D = 93, O = 33, k = 38, A = 58, j = 70, M = 102, N = 104, P = 119, F = 116, I = 112, ee = 115, L = 160, R = 12, te = 44, ne = 59, re = 63, ie = 46, ae = 47, z = 39, B = 34, oe = 43, se = 124, ce = 123, le = 125, ue = 40, de = 41, fe = 30, pe = 31, V = 48, H = 57, U = 65, W = 90, G = 97, me = 122, he = 128, ge = 32, K = {
19
19
  blockQuote: 0,
20
20
  breakLine: 1,
21
21
  breakThematic: 2,
@@ -40,8 +40,8 @@ var l = 32, u = 9, d = 13, f = 10, p = 96, m = 126, h = 91, g = 94, _ = 62, v =
40
40
  textFormatted: 21,
41
41
  unorderedList: 22
42
42
  };
43
- function ye(e) {
44
- if (!Ee(e, "---")) return null;
43
+ function _e(e) {
44
+ if (!we(e, "---")) return null;
45
45
  let t = 3;
46
46
  for (; t < e.length && (e[t] === " " || e[t] === " ");) t++;
47
47
  if (t < e.length && e[t] === "\r" && t++, t >= e.length || e[t] !== "\n") return null;
@@ -52,16 +52,24 @@ function ye(e) {
52
52
  for (; t < e.length && e[t] !== "\n" && e[t] !== "\r";) t++;
53
53
  if (t >= e.length) break;
54
54
  let i = t;
55
- if (e[t] === "\r" && t++, t < e.length && e[t] === "\n" && t++, Ee(e, "---", r)) return {
55
+ if (e[t] === "\r" && t++, t < e.length && e[t] === "\n" && t++, we(e, "---", r)) return {
56
56
  endPos: t,
57
57
  hasValidYaml: n
58
58
  };
59
- let a = e.indexOf(":", r);
60
- a !== -1 && a < i && (n = !0);
59
+ if (!n) {
60
+ let t = He(e, r, i);
61
+ if (t < i) {
62
+ let r = e.charCodeAt(t);
63
+ if (r >= G && r <= me || r >= U && r <= W || r >= V && r <= H || r === w) {
64
+ for (t++; t < i && (r = e.charCodeAt(t), r >= G && r <= me || r >= U && r <= W || r >= V && r <= H || r === w || r === b || r === ie);) t++;
65
+ t < i && e.charCodeAt(t) === A && (t++, t >= i ? n = !0 : (r = e.charCodeAt(t), (r === l || r === u) && (n = !0)));
66
+ }
67
+ }
68
+ }
61
69
  }
62
70
  return null;
63
71
  }
64
- var be = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, G = {
72
+ var ve = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, q = {
65
73
  class: "className",
66
74
  for: "htmlFor",
67
75
  allowfullscreen: "allowFullScreen",
@@ -105,10 +113,10 @@ var be = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, G = {
105
113
  usemap: "useMap",
106
114
  viewbox: "viewBox"
107
115
  };
108
- function K(e) {
116
+ function J(e) {
109
117
  var t = {};
110
118
  for (var n in e) {
111
- var r = G[n.toLowerCase()];
119
+ var r = q[n.toLowerCase()];
112
120
  if (r) t[r] = e[n];
113
121
  else {
114
122
  var i = n.indexOf(":");
@@ -117,9 +125,9 @@ function K(e) {
117
125
  }
118
126
  return t;
119
127
  }
120
- var xe = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;
121
- function Se(e) {
122
- return e.indexOf("&") === -1 ? e : e.replace(be, (e, t) => {
128
+ var ye = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;
129
+ function be(e) {
130
+ return e.indexOf("&") === -1 ? e : e.replace(ve, (e, t) => {
123
131
  var n = c(t);
124
132
  if (n) return n;
125
133
  if (t[0] === "#") {
@@ -129,20 +137,20 @@ function Se(e) {
129
137
  return e;
130
138
  });
131
139
  }
132
- var Ce = /(javascript|vbscript|data(?!:image)):/i;
133
- function we(e) {
134
- if (Ce.test(e)) return null;
140
+ var xe = /(javascript|vbscript|data(?!:image)):/i;
141
+ function Se(e) {
142
+ if (xe.test(e)) return null;
135
143
  if (e.indexOf("%") === -1) return e;
136
144
  try {
137
145
  let t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
138
- if (Ce.test(t)) return null;
146
+ if (xe.test(t)) return null;
139
147
  } catch {
140
148
  return null;
141
149
  }
142
150
  return e;
143
151
  }
144
- var Te = {}, q, J;
145
- for (q = [
152
+ var Y = {}, Ce, X;
153
+ for (Ce = [
146
154
  192,
147
155
  193,
148
156
  194,
@@ -157,8 +165,8 @@ for (q = [
157
165
  229,
158
166
  230,
159
167
  198
160
- ], J = 0; J < q.length; J++) Te[q[J]] = "a";
161
- for (Te[231] = Te[199] = "c", Te[240] = Te[208] = "d", q = [
168
+ ], X = 0; X < Ce.length; X++) Y[Ce[X]] = "a";
169
+ for (Y[231] = Y[199] = "c", Y[240] = Y[208] = "d", Ce = [
162
170
  200,
163
171
  201,
164
172
  202,
@@ -167,8 +175,8 @@ for (Te[231] = Te[199] = "c", Te[240] = Te[208] = "d", q = [
167
175
  232,
168
176
  234,
169
177
  235
170
- ], J = 0; J < q.length; J++) Te[q[J]] = "e";
171
- for (q = [
178
+ ], X = 0; X < Ce.length; X++) Y[Ce[X]] = "e";
179
+ for (Ce = [
172
180
  207,
173
181
  239,
174
182
  206,
@@ -177,8 +185,8 @@ for (q = [
177
185
  237,
178
186
  204,
179
187
  236
180
- ], J = 0; J < q.length; J++) Te[q[J]] = "i";
181
- for (Te[209] = Te[241] = "n", q = [
188
+ ], X = 0; X < Ce.length; X++) Y[Ce[X]] = "i";
189
+ for (Y[209] = Y[241] = "n", Ce = [
182
190
  248,
183
191
  216,
184
192
  339,
@@ -191,8 +199,8 @@ for (Te[209] = Te[241] = "n", q = [
191
199
  243,
192
200
  210,
193
201
  242
194
- ], J = 0; J < q.length; J++) Te[q[J]] = "o";
195
- for (q = [
202
+ ], X = 0; X < Ce.length; X++) Y[Ce[X]] = "o";
203
+ for (Ce = [
196
204
  220,
197
205
  252,
198
206
  219,
@@ -201,25 +209,33 @@ for (q = [
201
209
  250,
202
210
  217,
203
211
  249
204
- ], J = 0; J < q.length; J++) Te[q[J]] = "u";
205
- Te[376] = Te[255] = Te[221] = Te[253] = "y";
206
- function Y(e) {
207
- for (var t = e.toLowerCase(), n = "", r = -1, i = 0; i < t.length; i++) {
208
- var a = t.charCodeAt(i);
209
- if (a < _e && (ze[a] & (je | Me)) !== 0) r < 0 && (r = i);
210
- else if (a === l || a === b) r >= 0 && (n += t.slice(r, i), r = -1), n += "-";
211
- else {
212
- r >= 0 && (n += t.slice(r, i), r = -1);
213
- var o = Te[a];
214
- o && (n += o);
212
+ ], X = 0; X < Ce.length; X++) Y[Ce[X]] = "u";
213
+ Y[376] = Y[255] = Y[221] = Y[253] = "y";
214
+ function Z(e) {
215
+ for (var t = "", n = -1, r = e.length, i = 0; i < r; i++) {
216
+ var a = e.charCodeAt(i);
217
+ if (a >= G && a <= me || a >= V && a <= H) {
218
+ n < 0 && (n = i);
219
+ continue;
220
+ }
221
+ if (a >= U && a <= W) {
222
+ n >= 0 && (t += e.slice(n, i), n = -1), t += String.fromCharCode(a + ge);
223
+ continue;
215
224
  }
225
+ if (a === l || a === b) {
226
+ n >= 0 && (t += e.slice(n, i), n = -1), t += "-";
227
+ continue;
228
+ }
229
+ n >= 0 && (t += e.slice(n, i), n = -1);
230
+ var o = Y[a];
231
+ o && (t += o);
216
232
  }
217
- return r >= 0 && (n += t.slice(r)), n;
233
+ return n >= 0 && (t += e.slice(n)), t;
218
234
  }
219
- function Ee(e, t, n) {
235
+ function we(e, t, n) {
220
236
  return e.startsWith(t, n);
221
237
  }
222
- var X = new Set([
238
+ var Q = new Set([
223
239
  "area",
224
240
  "base",
225
241
  "br",
@@ -246,48 +262,53 @@ var X = new Set([
246
262
  "animate",
247
263
  "set"
248
264
  ]);
249
- function De(e) {
265
+ function Te(e) {
250
266
  let t = e.toLowerCase();
251
- if (X.has(t)) return !0;
267
+ if (Q.has(t)) return !0;
252
268
  let n = t.indexOf(":");
253
- return n === -1 ? !1 : (t = t.slice(n + 1), X.has(t));
269
+ return n === -1 ? !1 : (t = t.slice(n + 1), Q.has(t));
254
270
  }
255
- var Oe = 1, ke = 2, Ae = 4, je = 8, Me = 16, Ne = 32, Pe = 64, Fe = 1, Ie = 2, Le = 3, Re = 4, ze = (function() {
271
+ var Ee = 1, De = 2, Oe = 4, ke = 8, Ae = 16, je = 32, Me = 64, Ne = 1, Pe = 2, Fe = 3, Ie = 4, Le = (function() {
256
272
  var e = new Uint8Array(128), t;
257
- for (e[u] = Oe, e[f] = Oe | ke, e[ee] = Oe, e[d] = Oe | ke, e[l] = Oe, t = O; t <= ie; t++) e[t] = Ae;
258
- for (t = A; t <= E; t++) e[t] = Ae;
259
- for (t = h; t <= p; t++) e[t] = Ae;
260
- for (t = le; t <= m; t++) e[t] = Ae;
261
- for (t = B; t <= V; t++) e[t] = Me;
262
- for (t = H; t <= U; t++) e[t] = je;
263
- for (t = he; t <= ge; t++) e[t] = je;
273
+ for (e[u] = Ee, e[f] = Ee | De, e[R] = Ee, e[d] = Ee | De, e[l] = Ee, t = O; t <= ae; t++) e[t] = Oe;
274
+ for (t = A; t <= E; t++) e[t] = Oe;
275
+ for (t = h; t <= p; t++) e[t] = Oe;
276
+ for (t = ce; t <= m; t++) e[t] = Oe;
277
+ for (t = V; t <= H; t++) e[t] = Ae;
278
+ for (t = U; t <= W; t++) e[t] = ke;
279
+ for (t = G; t <= me; t++) e[t] = ke;
264
280
  return e;
265
281
  })();
266
282
  (function() {
267
283
  let e = new Uint8Array(128);
268
- return e[S] = Ie, e[h] = Re, e[C] = e[w] = e[m] = e[x] = Le, e[p] = e[T] = e[E] = e[D] = e[f] = e[l] = e[O] = Fe, e[M] = e[N] = e[P] = Fe, e;
284
+ return e[S] = Pe, e[h] = Ie, e[C] = e[w] = e[m] = e[x] = Fe, e[p] = e[T] = e[E] = e[D] = e[f] = e[l] = e[O] = Ne, e[M] = e[N] = e[P] = Ne, e;
269
285
  })();
270
- var Be = /[\p{P}\p{S}]/u, Ve = /\p{Zs}/u, He = [];
271
- function Ue(e) {
286
+ var Re = /[\p{P}\p{S}]/u, ze = /\p{Zs}/u, Be = [];
287
+ function Ve(e) {
272
288
  var t = e.indexOf("\r"), n = e.indexOf("\0");
273
289
  if (t === -1 && n === -1) return e;
274
290
  var r = e.length;
275
- He.length = 0;
291
+ Be.length = 0;
276
292
  var i = 0, a = 0;
277
293
  for (a = t === -1 ? n : n === -1 || t < n ? t : n; a < r; a++) {
278
294
  var o = e.charCodeAt(a);
279
- o === d ? (i < a && He.push(e.slice(i, a)), a + 1 < r && e.charCodeAt(a + 1) === f && a++, He.push("\n"), i = a + 1) : o === 0 && (i < a && He.push(e.slice(i, a)), He.push("�"), i = a + 1);
295
+ o === d ? (i < a && Be.push(e.slice(i, a)), a + 1 < r && e.charCodeAt(a + 1) === f && a++, Be.push("\n"), i = a + 1) : o === 0 && (i < a && Be.push(e.slice(i, a)), Be.push("�"), i = a + 1);
280
296
  }
281
- return i < r && He.push(e.slice(i)), He.join("");
297
+ return i < r && Be.push(e.slice(i)), Be.join("");
282
298
  }
283
- function We(e, t, n) {
299
+ function He(e, t, n) {
300
+ let r = n ?? e.length;
301
+ for (; t < r && (e[t] === " " || e[t] === " ");) t++;
302
+ return t;
303
+ }
304
+ function Ue(e, t, n) {
284
305
  for (var r = e, i = t.split("."), a = 0; a < i.length && (r = r?.[i[a]], r !== void 0);) a++;
285
306
  return r || n;
286
307
  }
287
- function Ge(e) {
308
+ function We(e) {
288
309
  for (var t = !1, n = 0; n < e.length; n++) {
289
310
  var r = e.charCodeAt(n);
290
- if (r <= l || r === oe || r === y || r === T || r === _ || r === h || r === S || r === D || r === g || r === p || r >= 123) {
311
+ if (r <= l || r === B || r === y || r === T || r === _ || r === h || r === S || r === D || r === g || r === p || r >= 123) {
291
312
  t = !0;
292
313
  break;
293
314
  }
@@ -297,7 +318,7 @@ function Ge(e) {
297
318
  var r = e.charCodeAt(n);
298
319
  if (r === y && n + 2 < e.length) {
299
320
  var a = e.charCodeAt(n + 1), o = e.charCodeAt(n + 2);
300
- if ((a >= B && a <= V || a >= H && a <= j || a >= he && a <= M) && (o >= B && o <= V || o >= H && o <= j || o >= he && o <= M)) {
321
+ if ((a >= V && a <= H || a >= U && a <= j || a >= G && a <= M) && (o >= V && o <= H || o >= U && o <= j || o >= G && o <= M)) {
301
322
  i += e[n] + e[n + 1] + e[n + 2], n += 2;
302
323
  continue;
303
324
  }
@@ -306,10 +327,10 @@ function Ge(e) {
306
327
  }
307
328
  return i;
308
329
  }
309
- function Ke(...e) {
330
+ function Ge(...e) {
310
331
  return e.filter(Boolean).join(" ");
311
332
  }
312
- var qe = new Set([
333
+ var Ke = new Set([
313
334
  "title",
314
335
  "textarea",
315
336
  "style",
@@ -319,32 +340,24 @@ var qe = new Set([
319
340
  "noframes",
320
341
  "script",
321
342
  "plaintext"
322
- ]), Je = /<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;
343
+ ]), qe = /<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;
344
+ function Je(e) {
345
+ return Ke.has(e.toLowerCase());
346
+ }
323
347
  function Ye(e) {
324
- return qe.has(e.toLowerCase());
348
+ return qe.lastIndex = 0, qe.test(e);
325
349
  }
326
350
  function Xe(e) {
327
- return Je.lastIndex = 0, Je.test(e);
328
- }
329
- function Ze(e) {
330
- return Je.lastIndex = 0, e.replace(Je, function(e, t, n, r) {
351
+ return qe.lastIndex = 0, e.replace(qe, function(e, t, n, r) {
331
352
  return "&lt;" + t + n + r;
332
353
  });
333
354
  }
334
- var Qe = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, $e = /^<[A-Z]/, et = [
355
+ var Ze = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, Qe = /^<[A-Z]/, $e = [
335
356
  "script",
336
357
  "pre",
337
358
  "style",
338
359
  "textarea"
339
- ], tt = new Set(et), nt = /<(?:pre|script|style|textarea)\b/i, rt = /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m, it = /^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im, at = new Set([
340
- "table",
341
- "thead",
342
- "tbody",
343
- "tfoot",
344
- "tr",
345
- "td",
346
- "th"
347
- ]), ot = new Uint8Array(128);
360
+ ], et = new Set($e), tt = /<(?:pre|script|style|textarea)\b/i, nt = /<(?:pre|script|style|textarea)\b/iy, rt = /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m, it = /^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im, at = new Uint8Array(128);
348
361
  (function() {
349
362
  for (var e = [
350
363
  p,
@@ -356,45 +369,45 @@ var Qe = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, $e = /^<[A-Z]/, et = [
356
369
  O,
357
370
  T,
358
371
  S,
359
- me,
372
+ pe,
360
373
  N,
361
374
  P,
362
375
  M
363
- ], t = 0; t < e.length; t++) ot[e[t]] = 1;
376
+ ], t = 0; t < e.length; t++) at[e[t]] = 1;
364
377
  })();
365
- var st = /([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;
366
- function ct(e) {
367
- return tt.has(e);
378
+ var ot = /([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;
379
+ function st(e) {
380
+ return et.has(e);
368
381
  }
369
- function lt(e) {
370
- return nt.test(e);
382
+ function ct(e) {
383
+ return tt.test(e);
371
384
  }
372
- function ut(e, t, n) {
385
+ function lt(e, t, n) {
373
386
  for (var r = t, i = n; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
374
387
  if (r >= i) return !1;
375
- e.charCodeAt(r) === ce && r++;
388
+ e.charCodeAt(r) === se && r++;
376
389
  for (var a = 0; r < i;) {
377
390
  for (; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
378
391
  if (r >= i) break;
379
- if (e.charCodeAt(r) === ce && a > 0) {
392
+ if (e.charCodeAt(r) === se && a > 0) {
380
393
  for (var o = r + 1; o < i && (e.charCodeAt(o) === l || e.charCodeAt(o) === u);) o++;
381
394
  if (o >= i) return !0;
382
395
  }
383
396
  if (e.charCodeAt(r) === A && r++, r >= i || e.charCodeAt(r) !== b) return !1;
384
397
  for (; r < i && e.charCodeAt(r) === b;) r++;
385
398
  for (r < i && e.charCodeAt(r) === A && r++, a++; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
386
- if (r < i) if (e.charCodeAt(r) === ce) r++;
399
+ if (r < i) if (e.charCodeAt(r) === se) r++;
387
400
  else return !1;
388
401
  }
389
402
  return a > 0;
390
403
  }
391
- function dt(e, t) {
404
+ function ut(e, t) {
392
405
  if (e.charCodeAt(t) !== T) return null;
393
406
  let n = t + 1, r = e.length, i = !1;
394
- e.charCodeAt(n) === ie && (n++, i = !0);
407
+ e.charCodeAt(n) === ae && (n++, i = !0);
395
408
  let a = n, o = e.charCodeAt(n);
396
- if (!(o >= he && o <= ge || o >= H && o <= U)) return null;
397
- for (; n < r && (e.charCodeAt(n) >= he && e.charCodeAt(n) <= ge || e.charCodeAt(n) >= H && e.charCodeAt(n) <= U || e.charCodeAt(n) >= B && e.charCodeAt(n) <= V || e.charCodeAt(n) === b);) n++;
409
+ if (!(o >= G && o <= me || o >= U && o <= W)) return null;
410
+ for (; n < r && (e.charCodeAt(n) >= G && e.charCodeAt(n) <= me || e.charCodeAt(n) >= U && e.charCodeAt(n) <= W || e.charCodeAt(n) >= V && e.charCodeAt(n) <= H || e.charCodeAt(n) === b);) n++;
398
411
  let s = e.slice(a, n);
399
412
  if (!s) return null;
400
413
  let c = n;
@@ -402,7 +415,7 @@ function dt(e, t) {
402
415
  let d = e.slice(c, n);
403
416
  if (n === c && n < r) {
404
417
  var m = e.charCodeAt(n);
405
- if (m !== _ && m !== ie) return null;
418
+ if (m !== _ && m !== ae) return null;
406
419
  }
407
420
  let h = n, g = {}, v = !1;
408
421
  for (; n < r;) {
@@ -424,7 +437,7 @@ function dt(e, t) {
424
437
  n++;
425
438
  continue;
426
439
  }
427
- if (t === ie && n + 1 < r && e.charCodeAt(n + 1) === _) {
440
+ if (t === ae && n + 1 < r && e.charCodeAt(n + 1) === _) {
428
441
  let t = e.slice(h, n);
429
442
  return v = n > h && e.charCodeAt(n - 1) === l, {
430
443
  tag: s,
@@ -438,10 +451,10 @@ function dt(e, t) {
438
451
  };
439
452
  }
440
453
  var y = n, S = e.charCodeAt(n);
441
- if (!(S >= he && S <= ge || S >= H && S <= U || S === w || S === A)) return null;
454
+ if (!(S >= G && S <= me || S >= U && S <= W || S === w || S === A)) return null;
442
455
  for (n++; n < r;) {
443
456
  var C = e.charCodeAt(n);
444
- if (C >= he && C <= ge || C >= H && C <= U || C >= B && C <= V || C === w || C === re || C === A || C === b) n++;
457
+ if (C >= G && C <= me || C >= U && C <= W || C >= V && C <= H || C === w || C === ie || C === A || C === b) n++;
445
458
  else break;
446
459
  }
447
460
  for (var E = e.slice(y, n); n < r && (e.charCodeAt(n) === l || e.charCodeAt(n) === u);) n++;
@@ -451,25 +464,25 @@ function dt(e, t) {
451
464
  }
452
465
  for (n++; n < r && (e.charCodeAt(n) === l || e.charCodeAt(n) === u);) n++;
453
466
  var D = e.charCodeAt(n);
454
- if (D === oe || D === ae) {
467
+ if (D === B || D === z) {
455
468
  n++;
456
469
  for (var O = n; n < r && e.charCodeAt(n) !== D;) n++;
457
470
  if (n >= r) return null;
458
471
  if (g[E] = e.slice(O, n), n++, n < r) {
459
472
  var k = e.charCodeAt(n);
460
- if (k !== l && k !== u && k !== f && k !== _ && k !== ie) return null;
473
+ if (k !== l && k !== u && k !== f && k !== _ && k !== ae) return null;
461
474
  }
462
- } else if (D === le) {
475
+ } else if (D === ce) {
463
476
  var j = 1, O = n;
464
477
  for (n++; n < r && j > 0;) {
465
478
  var C = e.charCodeAt(n);
466
- C === le ? j++ : C === ue && j--, n++;
479
+ C === ce ? j++ : C === le && j--, n++;
467
480
  }
468
481
  g[E] = e.slice(O, n);
469
482
  } else {
470
483
  for (var O = n; n < r;) {
471
484
  var M = e.charCodeAt(n);
472
- if (M === l || M === u || M === _ || M === f || M === oe || M === ae || M === x || M === T || M === p) break;
485
+ if (M === l || M === u || M === _ || M === f || M === B || M === z || M === x || M === T || M === p) break;
473
486
  n++;
474
487
  }
475
488
  if (n === O) return null;
@@ -478,7 +491,8 @@ function dt(e, t) {
478
491
  }
479
492
  return null;
480
493
  }
481
- function ft(e, t, n) {
494
+ function dt(e, t, n) {
495
+ if (!n.streaming && !n.optimizeForStreaming && e.indexOf("[") === -1) return !1;
482
496
  for (var r = 0, i = e.length, a = !1, o = !1; r < i;) {
483
497
  for (var s = e.indexOf("\n", r), c = s < 0 ? i : s, d = r, y = 0; d < c && y < 4;) if (e.charCodeAt(d) === l) y++, d++;
484
498
  else if (e.charCodeAt(d) === u) y += 4, d++;
@@ -536,28 +550,28 @@ function ft(e, t, n) {
536
550
  a = !1;
537
551
  }
538
552
  if (!a && y < 4 && P < c && e.charCodeAt(P) === h && !(P + 1 < i && e.charCodeAt(P + 1) === g)) {
539
- var I = pt(e, P, t);
553
+ var I = ft(e, P, t);
540
554
  if (I) {
541
555
  r = I, a = !1;
542
556
  continue;
543
557
  }
544
558
  }
545
- var L = e.charCodeAt(d);
546
- if (L === v && y < 4) a = !1;
547
- else if (y < 4 && (L === b || L === C || L === w)) {
548
- for (var R = d, ee = 0; R < c;) {
549
- var te = e.charCodeAt(R);
550
- if (te === L) ee++;
559
+ var ee = e.charCodeAt(d);
560
+ if (ee === v && y < 4) a = !1;
561
+ else if (y < 4 && (ee === b || ee === C || ee === w)) {
562
+ for (var L = d, R = 0; L < c;) {
563
+ var te = e.charCodeAt(L);
564
+ if (te === ee) R++;
551
565
  else if (te !== l && te !== u) break;
552
- R++;
566
+ L++;
553
567
  }
554
- a = !(ee >= 3 && R >= c);
568
+ a = !(R >= 3 && L >= c);
555
569
  } else a = !0;
556
570
  r = s < 0 ? i : s + 1;
557
571
  }
558
572
  return o;
559
573
  }
560
- function pt(e, t, n) {
574
+ function ft(e, t, n) {
561
575
  let r = e.length;
562
576
  if (e.charCodeAt(t) !== h) return null;
563
577
  let i = t + 1 < r && e.charCodeAt(t + 1) === g, a = t + 1;
@@ -573,7 +587,7 @@ function pt(e, t, n) {
573
587
  if (a > r || e.charCodeAt(a - 1) !== D) return null;
574
588
  let s = e.slice(t + 1, a - 1);
575
589
  if (s.length > 999) return null;
576
- let c = _t(s);
590
+ let c = gt(s);
577
591
  if (!c || a >= r || e.charCodeAt(a) !== A) return null;
578
592
  a++;
579
593
  let d = !1;
@@ -600,13 +614,13 @@ function pt(e, t, n) {
600
614
  if (b < y) {
601
615
  if (b === a) return null;
602
616
  var x = e.charCodeAt(b);
603
- if (x !== oe && x !== ae && x !== de) return null;
617
+ if (x !== B && x !== z && x !== ue) return null;
604
618
  }
605
619
  } else {
606
620
  for (var m = a, C = 0; a < r;) {
607
621
  var o = e.charCodeAt(a);
608
- if (o === de) C++;
609
- else if (o === fe) {
622
+ if (o === ue) C++;
623
+ else if (o === de) {
610
624
  if (C === 0) break;
611
625
  C--;
612
626
  } else {
@@ -622,38 +636,38 @@ function pt(e, t, n) {
622
636
  if (a === E && a < r) for (M = a + 1; M < r && (e.charCodeAt(M) === l || e.charCodeAt(M) === u);) M++;
623
637
  if (M < r) {
624
638
  var N = e.charCodeAt(M);
625
- if (N === oe || N === ae || N === de) {
626
- for (var P = N === de ? 41 : N, F = M + 1, I = F; F < r;) {
627
- var L = e.charCodeAt(F);
628
- if (L === P) {
629
- for (var R = F + 1; R < r && (e.charCodeAt(R) === l || e.charCodeAt(R) === u);) R++;
630
- (R >= r || e.charCodeAt(R) === f) && (O = e.slice(I, F), k = !0, j = R < r ? R + 1 : r);
639
+ if (N === B || N === z || N === ue) {
640
+ for (var P = N === ue ? 41 : N, F = M + 1, I = F; F < r;) {
641
+ var ee = e.charCodeAt(F);
642
+ if (ee === P) {
643
+ for (var L = F + 1; L < r && (e.charCodeAt(L) === l || e.charCodeAt(L) === u);) L++;
644
+ (L >= r || e.charCodeAt(L) === f) && (O = e.slice(I, F), k = !0, j = L < r ? L + 1 : r);
631
645
  break;
632
646
  }
633
- if (L === S && F + 1 < r) {
647
+ if (ee === S && F + 1 < r) {
634
648
  F += 2;
635
649
  continue;
636
650
  }
637
- if (L === f && F + 1 < r && e.charCodeAt(F + 1) === f) break;
651
+ if (ee === f && F + 1 < r && e.charCodeAt(F + 1) === f) break;
638
652
  F++;
639
653
  }
640
654
  if (!k && M === a) return null;
641
655
  }
642
656
  }
643
657
  if (k) return n[c] || (n[c] = {
644
- target: yt(p),
645
- title: O === void 0 ? O : Se(yt(O))
658
+ target: vt(p),
659
+ title: O === void 0 ? O : be(vt(O))
646
660
  }), j;
647
661
  for (; a < E && (e.charCodeAt(a) === l || e.charCodeAt(a) === u);) a++;
648
662
  return a < E ? null : (n[c] || (n[c] = {
649
- target: yt(p),
663
+ target: vt(p),
650
664
  title: O
651
665
  }), w < 0 ? r : w + 1);
652
666
  }
653
- var mt = new Uint8Array(ze);
654
- for (mt[me] = Oe, mt[v] |= Ne, mt[_] |= Ne, mt[b] |= Ne | Pe, mt[se] |= Ne, mt[C] |= Ne | Pe, mt[w] |= Ne | Pe, mt[p] |= Ne | Pe, mt[m] |= Ne | Pe, mt[T] |= Ne | Pe, mt[h] |= Pe, mt[O] |= Pe, mt[ce] |= Ne, ht = B; ht <= V; ht++) mt[ht] |= Ne;
655
- var ht;
656
- function gt(e) {
667
+ var pt = new Uint8Array(Le);
668
+ for (pt[pe] = Ee, pt[v] |= je, pt[_] |= je, pt[b] |= je | Me, pt[oe] |= je, pt[C] |= je | Me, pt[w] |= je | Me, pt[p] |= je | Me, pt[m] |= je | Me, pt[T] |= je | Me, pt[h] |= Me, pt[O] |= Me, pt[se] |= je, mt = V; mt <= H; mt++) pt[mt] |= je;
669
+ var mt;
670
+ function ht(e) {
657
671
  if (e.indexOf("[") < 0 && e.indexOf("]") < 0) return !1;
658
672
  for (var t = 0; t < e.length; t++) {
659
673
  if (e.charCodeAt(t) === S) {
@@ -664,25 +678,27 @@ function gt(e) {
664
678
  }
665
679
  return !1;
666
680
  }
667
- function _t(e) {
681
+ function gt(e) {
668
682
  var t = e.replace(/\s+/g, " ").trim();
669
683
  return t.indexOf("ẞ") === -1 ? t.toLowerCase() : t.replace(/\u1E9E/g, "ss").toLowerCase();
670
684
  }
671
- function vt(e) {
672
- return e < _e ? mt[e] : e === R ? Oe : 0;
685
+ function _t(e) {
686
+ return e < he ? pt[e] : e === L ? Ee : 0;
673
687
  }
674
- function yt(e) {
688
+ function vt(e) {
675
689
  return e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, "$1");
676
690
  }
677
- function bt(e, t) {
691
+ var yt = null, bt = -1, xt = -1;
692
+ function St(e, t) {
693
+ if (t === bt && e === yt) return xt;
678
694
  var n = e.indexOf("\n", t);
679
695
  return n < 0 ? e.length : n;
680
696
  }
681
- function Z(e, t) {
682
- let n = bt(e, t);
697
+ function $(e, t) {
698
+ let n = St(e, t);
683
699
  return n < e.length ? n + 1 : n;
684
700
  }
685
- function xt(e, t, n) {
701
+ function Ct(e, t, n) {
686
702
  for (; t < n;) {
687
703
  let n = e.charCodeAt(t);
688
704
  if (n !== l && n !== u) break;
@@ -690,67 +706,67 @@ function xt(e, t, n) {
690
706
  }
691
707
  return t;
692
708
  }
693
- function St(e, t) {
694
- let n = Z(e, t);
709
+ function wt(e, t) {
710
+ let n = $(e, t);
695
711
  for (; n < e.length;) {
696
- let t = bt(e, n);
697
- if (Tt(e, n, t)) return n;
698
- n = Z(e, n);
712
+ let t = St(e, n);
713
+ if (kt(e, n, t)) return n;
714
+ n = $(e, n);
699
715
  }
700
716
  return e.length;
701
717
  }
702
- function Ct(e, t, n, r) {
718
+ function Tt(e, t, n, r) {
703
719
  let i = 0;
704
720
  for (; t + i < n && e.charCodeAt(t + i) === r;) i++;
705
721
  return i;
706
722
  }
707
- var Q = 0, $ = 0;
708
- function wt(e, t, n) {
709
- for (Q = 0, $ = 0; t + $ < n;) {
710
- let n = e.charCodeAt(t + $);
711
- if (n === u) Q += 4 - Q % 4;
712
- else if (n === l) Q++;
723
+ var Et = 0, Dt = 0;
724
+ function Ot(e, t, n) {
725
+ for (Et = 0, Dt = 0; t + Dt < n;) {
726
+ let n = e.charCodeAt(t + Dt);
727
+ if (n === u) Et += 4 - Et % 4;
728
+ else if (n === l) Et++;
713
729
  else break;
714
- $++;
730
+ Dt++;
715
731
  }
716
732
  }
717
- function Tt(e, t, n) {
718
- return xt(e, t, n) >= n;
733
+ function kt(e, t, n) {
734
+ return Ct(e, t, n) >= n;
719
735
  }
720
- function Et(e, t, n, r) {
721
- let i = bt(e, t);
722
- if (wt(e, t, i), Q > 3) return null;
723
- let a = t + $;
736
+ function At(e, t, n, r) {
737
+ let i = St(e, t);
738
+ if (Ot(e, t, i), Et > 3) return null;
739
+ let a = t + Dt;
724
740
  if (e.charCodeAt(a) !== v) return null;
725
- let o = Ct(e, a, i, 35);
741
+ let o = Tt(e, a, i, 35);
726
742
  if (o < 1 || o > 6 || (a += o, a < i && e.charCodeAt(a) !== l && e.charCodeAt(a) !== u)) return null;
727
- a = xt(e, a, i);
743
+ a = Ct(e, a, i);
728
744
  for (var s = i; s > a && e.charCodeAt(s - 1) === l;) s--;
729
745
  for (var c = s; s > a && e.charCodeAt(s - 1) === v;) s--;
730
746
  if (s < c) if (s === a || e.charCodeAt(s - 1) === l) for (; s > a && e.charCodeAt(s - 1) === l;) s--;
731
747
  else s = c;
732
- let d = e.slice(a, s), f = vn(d, 0, d.length, n, r), p = (r?.slugify || Y)(d);
748
+ let d = e.slice(a, s), f = Sn(d, 0, d.length, n, r), p = (r?.slugify || Z)(d);
733
749
  return {
734
750
  node: {
735
- type: W.heading,
751
+ type: K.heading,
736
752
  level: o,
737
753
  children: f,
738
754
  id: p
739
755
  },
740
- end: Z(e, i)
756
+ end: $(e, i)
741
757
  };
742
758
  }
743
- function Dt(e, t, n) {
759
+ function jt(e, t, n) {
744
760
  var r = e.charCodeAt(t);
745
761
  if (r !== x && r !== b) return !1;
746
762
  for (var i = t; i < n && e.charCodeAt(i) === r;) i++;
747
763
  for (; i < n && (e.charCodeAt(i) === l || e.charCodeAt(i) === u);) i++;
748
764
  return i >= n;
749
765
  }
750
- function Ot(e, t) {
751
- let n = bt(e, t);
752
- if (wt(e, t, n), Q > 3) return null;
753
- let r = t + $, i = e.charCodeAt(r);
766
+ function Mt(e, t) {
767
+ let n = St(e, t);
768
+ if (Ot(e, t, n), Et > 3) return null;
769
+ let r = t + Dt, i = e.charCodeAt(r);
754
770
  if (i !== b && i !== C && i !== w) return null;
755
771
  let a = 0;
756
772
  for (; r < n;) {
@@ -760,56 +776,56 @@ function Ot(e, t) {
760
776
  r++;
761
777
  }
762
778
  return a < 3 ? null : {
763
- node: { type: W.breakThematic },
764
- end: Z(e, n)
779
+ node: { type: K.breakThematic },
780
+ end: $(e, n)
765
781
  };
766
782
  }
767
- function kt(e, t, n) {
768
- let r = bt(e, t);
769
- if (wt(e, t, r), Q > 3) return null;
770
- let i = Q, a = t + $, o = e.charCodeAt(a);
783
+ function Nt(e, t, n) {
784
+ let r = St(e, t);
785
+ if (Ot(e, t, r), Et > 3) return null;
786
+ let i = Et, a = t + Dt, o = e.charCodeAt(a);
771
787
  if (o !== p && o !== m) return null;
772
- let s = Ct(e, a, r, o);
788
+ let s = Tt(e, a, r, o);
773
789
  if (s < 3) return null;
774
790
  a += s;
775
- let c = xt(e, a, r), d = r;
791
+ let c = Ct(e, a, r), d = r;
776
792
  if (o === p) {
777
793
  for (let t = c; t < r; t++) if (e.charCodeAt(t) === p) return null;
778
794
  }
779
795
  for (; d > c && (e.charCodeAt(d - 1) === l || e.charCodeAt(d - 1) === u);) d--;
780
796
  let h = e.slice(c, d), g = "", _ = "", v = h.indexOf(" ");
781
- v === -1 ? g = h : (g = h.slice(0, v), _ = h.slice(v + 1).trim()), g = yt(g);
797
+ v === -1 ? g = h : (g = h.slice(0, v), _ = h.slice(v + 1).trim()), g = vt(g);
782
798
  var y = void 0;
783
799
  if (_) {
784
- st.lastIndex = 0;
785
- for (var b; (b = st.exec(_)) !== null;) y ||= {}, y[b[1]] = b[2] === void 0 ? b[3] : b[2];
800
+ ot.lastIndex = 0;
801
+ for (var b; (b = ot.exec(_)) !== null;) y ||= {}, y[b[1]] = b[2] === void 0 ? b[3] : b[2];
786
802
  }
787
- let x = Z(e, r), S = x, C = e.length;
803
+ let x = $(e, r), S = x, C = e.length;
788
804
  for (; S < e.length;) {
789
- let t = bt(e, S);
790
- if (wt(e, S, t), Q < 4) {
791
- let n = S + $;
792
- var w = Ct(e, n, t, o);
793
- if (w >= s && Tt(e, n + w, t)) {
794
- C = Z(e, t);
805
+ let t = St(e, S);
806
+ if (Ot(e, S, t), Et < 4) {
807
+ let n = S + Dt;
808
+ var w = Tt(e, n, t, o);
809
+ if (w >= s && kt(e, n + w, t)) {
810
+ C = $(e, t);
795
811
  break;
796
812
  }
797
813
  }
798
- S = Z(e, t);
814
+ S = $(e, t);
799
815
  }
800
816
  var T;
801
817
  if (i === 0) T = S > x && e.charCodeAt(S - 1) === f ? e.slice(x, S - 1) : e.slice(x, S);
802
818
  else {
803
819
  T = "";
804
820
  for (var E = x; E < S;) {
805
- var D = bt(e, E);
806
- wt(e, E, D), T += e.slice(E + Math.min($, i), D) + "\n", E = Z(e, D);
821
+ var D = St(e, E);
822
+ Ot(e, E, D), T += e.slice(E + Math.min(Dt, i), D) + "\n", E = $(e, D);
807
823
  }
808
824
  T.length > 0 && T.charCodeAt(T.length - 1) === f && (T = T.slice(0, -1));
809
825
  }
810
826
  return {
811
827
  node: {
812
- type: W.codeBlock,
828
+ type: K.codeBlock,
813
829
  lang: g || void 0,
814
830
  text: T,
815
831
  infoString: _ || void 0,
@@ -818,19 +834,19 @@ function kt(e, t, n) {
818
834
  end: C
819
835
  };
820
836
  }
821
- function At(e, t) {
822
- if (wt(e, t, bt(e, t)), Q < 4) return null;
837
+ function Pt(e, t) {
838
+ if (Ot(e, t, St(e, t)), Et < 4) return null;
823
839
  let n = "", r = t;
824
840
  for (; r < e.length;) {
825
- let t = bt(e, r);
826
- if (wt(e, r, t), Tt(e, r, t)) {
827
- for (var i = 0, a = Z(e, t); a < e.length;) {
828
- var o = bt(e, a);
829
- if (Tt(e, a, o)) {
830
- i++, a = Z(e, o);
841
+ let t = St(e, r);
842
+ if (Ot(e, r, t), kt(e, r, t)) {
843
+ for (var i = 0, a = $(e, t); a < e.length;) {
844
+ var o = St(e, a);
845
+ if (kt(e, a, o)) {
846
+ i++, a = $(e, o);
831
847
  continue;
832
848
  }
833
- if (wt(e, a, o), Q >= 4) {
849
+ if (Ot(e, a, o), Et >= 4) {
834
850
  for (var s = 0; s <= i; s++) n += "\n";
835
851
  r = a;
836
852
  break;
@@ -840,7 +856,7 @@ function At(e, t) {
840
856
  if (r !== a) break;
841
857
  continue;
842
858
  }
843
- if (Q < 4) break;
859
+ if (Et < 4) break;
844
860
  let f = 0, m = 0;
845
861
  var c = 0;
846
862
  for (let n = r; n < t && m < 4; n++) {
@@ -852,13 +868,13 @@ function At(e, t) {
852
868
  }
853
869
  var d = "";
854
870
  if (c > 0) for (var p = 0; p < c; p++) d += " ";
855
- d += e.slice(r + f, t), n += d + "\n", r = Z(e, t);
871
+ d += e.slice(r + f, t), n += d + "\n", r = $(e, t);
856
872
  }
857
873
  for (; n.length > 0 && n.charCodeAt(n.length - 1) === f;) n = n.slice(0, -1);
858
874
  for (; n.length > 0 && n.charCodeAt(n.length - 1) === f;) n = n.slice(0, -1);
859
875
  return n ? {
860
876
  node: {
861
- type: W.codeBlock,
877
+ type: K.codeBlock,
862
878
  lang: void 0,
863
879
  text: n,
864
880
  infoString: void 0,
@@ -867,18 +883,18 @@ function At(e, t) {
867
883
  end: r
868
884
  } : null;
869
885
  }
870
- function jt(e, t, n, r) {
871
- if (wt(e, t, bt(e, t)), Q > 3) return null;
872
- let i = t + $;
886
+ function Ft(e, t, n, r) {
887
+ if (Ot(e, t, St(e, t)), Et > 3) return null;
888
+ let i = t + Dt;
873
889
  if (e.charCodeAt(i) !== _) return null;
874
890
  let a = "", o = t, s, c = !1, d = !1, f = !1;
875
891
  for (; o < e.length;) {
876
- let t = bt(e, o);
877
- wt(e, o, t);
878
- let n = o + $;
892
+ let t = St(e, o);
893
+ Ot(e, o, t);
894
+ let n = o + Dt;
879
895
  if (e.charCodeAt(n) === _) {
880
896
  let r = n + 1;
881
- var h = Q + 1, g = !1;
897
+ var h = Et + 1, g = !1;
882
898
  if (r < t) {
883
899
  var y = e.charCodeAt(r);
884
900
  y === l ? (r++, h++, g = !0) : y === u && (g = !0);
@@ -901,68 +917,68 @@ function jt(e, t, n, r) {
901
917
  if (!a && !s) {
902
918
  let n = x.match(/^\[!([A-Za-z]+)\]\s*$/);
903
919
  if (n) {
904
- s = n[1].toUpperCase(), o = Z(e, t);
920
+ s = n[1].toUpperCase(), o = $(e, t);
905
921
  continue;
906
922
  }
907
923
  }
908
924
  a += x + "\n";
909
925
  var N = x.trimStart();
910
- N.startsWith("```") || N.startsWith("~~~") ? f = !f : x.startsWith(" ") || x.startsWith(" ") ? f = !0 : N.length > 0 && !f && (f = !1), d = N.length > 0, o = Z(e, t);
911
- } else if (a && !Tt(e, o, t) && d) {
912
- if (Q < 4) {
913
- var P = o + $, F = P < t ? e.charCodeAt(P) : 0;
914
- if (F === v || F === _ || F === p || F === m || F === T || (F === b || F === C || F === w) && Ot(e, o) || (F === b || F === C || F === se) && P + 1 < t && (e.charCodeAt(P + 1) === l || e.charCodeAt(P + 1) === u)) break;
915
- if (F >= B && F <= V) {
916
- for (var I = P; I < t && e.charCodeAt(I) >= B && e.charCodeAt(I) <= V;) I++;
917
- if (I < t && (e.charCodeAt(I) === re || e.charCodeAt(I) === fe)) break;
926
+ N.startsWith("```") || N.startsWith("~~~") ? f = !f : x.startsWith(" ") || x.startsWith(" ") ? f = !0 : N.length > 0 && !f && (f = !1), d = N.length > 0, o = $(e, t);
927
+ } else if (a && !kt(e, o, t) && d) {
928
+ if (Et < 4) {
929
+ var P = o + Dt, F = P < t ? e.charCodeAt(P) : 0;
930
+ if (F === v || F === _ || F === p || F === m || F === T || (F === b || F === C || F === w) && Mt(e, o) || (F === b || F === C || F === oe) && P + 1 < t && (e.charCodeAt(P + 1) === l || e.charCodeAt(P + 1) === u)) break;
931
+ if (F >= V && F <= H) {
932
+ for (var I = P; I < t && e.charCodeAt(I) >= V && e.charCodeAt(I) <= H;) I++;
933
+ if (I < t && (e.charCodeAt(I) === ie || e.charCodeAt(I) === de)) break;
918
934
  }
919
935
  }
920
936
  if (f) break;
921
- a += e.slice(o, t) + "\n", c = !0, o = Z(e, t);
937
+ a += e.slice(o, t) + "\n", c = !0, o = $(e, t);
922
938
  } else break;
923
939
  }
924
940
  if (!a && !s) return null;
925
- var { inBlockQuote: L, g: R } = n;
941
+ var { inBlockQuote: ee, g: L } = n;
926
942
  n.inBlockQuote = !0, c && (n.g = !0);
927
- let ee = bn(a || "", n, r);
928
- return n.inBlockQuote = L, n.g = R, {
943
+ let R = wn(a || "", n, r);
944
+ return n.inBlockQuote = ee, n.g = L, {
929
945
  node: {
930
- type: W.blockQuote,
931
- children: ee,
946
+ type: K.blockQuote,
947
+ children: R,
932
948
  alert: s || void 0
933
949
  },
934
950
  end: o
935
951
  };
936
952
  }
937
- function Mt(e, t, n) {
953
+ function It(e, t, n) {
938
954
  for (var r = 0, i = t; i < n; i++) e.charCodeAt(i) === u ? r += 4 - r % 4 : r++;
939
955
  return r;
940
956
  }
941
- function Nt(e, t, n) {
942
- if (wt(e, t, n), Q > 3) return null;
943
- var r = t + $;
957
+ function Lt(e, t, n) {
958
+ if (Ot(e, t, n), Et > 3) return null;
959
+ var r = t + Dt;
944
960
  if (r >= n) return null;
945
- var i = e.charCodeAt(r), a = Q, o = r;
946
- if (i === b || i === C || i === se) {
961
+ var i = e.charCodeAt(r), a = Et, o = r;
962
+ if (i === b || i === C || i === oe) {
947
963
  if (o = r + 1, o < n && e.charCodeAt(o) !== l && e.charCodeAt(o) !== u && e.charCodeAt(o) !== f) return null;
948
- } else if (i >= B && i <= V) {
964
+ } else if (i >= V && i <= H) {
949
965
  for (var s = r; s < n && s - r < 9;) {
950
966
  var c = e.charCodeAt(s);
951
- if (c < B || c > V) break;
967
+ if (c < V || c > H) break;
952
968
  s++;
953
969
  }
954
970
  if (s > r && s < n) {
955
971
  var d = e.charCodeAt(s);
956
- if (d === re || d === fe) {
972
+ if (d === ie || d === de) {
957
973
  if (o = s + 1, o < n && e.charCodeAt(o) !== l && e.charCodeAt(o) !== u && e.charCodeAt(o) !== f) return null;
958
974
  } else return null;
959
975
  } else return null;
960
976
  } else return null;
961
- var p = o, m = Mt(e, t, o), h = 0, g = p, _ = m;
977
+ var p = o, m = It(e, t, o), h = 0, g = p, _ = m;
962
978
  if (p >= n) return {
963
- ordered: i >= B && i <= V,
964
- marker: i >= B && i <= V ? e[s] : e[r],
965
- start: i >= B && i <= V ? parseInt(e.slice(r, s), 10) : void 0,
979
+ ordered: i >= V && i <= H,
980
+ marker: i >= V && i <= H ? e[s] : e[r],
981
+ start: i >= V && i <= H ? parseInt(e.slice(r, s), 10) : void 0,
966
982
  contentStart: p,
967
983
  contentCol: m + 1,
968
984
  markerCol: a,
@@ -977,24 +993,24 @@ function Nt(e, t, n) {
977
993
  }
978
994
  var y = g >= n, x = _ - m;
979
995
  return y || x > 4 ? (_ = m + 1, g = p + 1, h = 1) : h === 0 && (_ = m + 1, g = p, h = 1), {
980
- ordered: i >= B && i <= V,
981
- marker: i >= B && i <= V ? e[s] : e[r],
982
- start: i >= B && i <= V ? parseInt(e.slice(r, s), 10) : void 0,
996
+ ordered: i >= V && i <= H,
997
+ marker: i >= V && i <= H ? e[s] : e[r],
998
+ start: i >= V && i <= H ? parseInt(e.slice(r, s), 10) : void 0,
983
999
  contentStart: g,
984
1000
  contentCol: _,
985
1001
  markerCol: a,
986
1002
  isEmpty: y
987
1003
  };
988
1004
  }
989
- var Pt = 0;
990
- function Ft(e, t, n, r) {
1005
+ var Rt = 0;
1006
+ function zt(e, t, n, r) {
991
1007
  var i = 0, a = t;
992
- for (Pt = 0; a < n && i < r;) {
1008
+ for (Rt = 0; a < n && i < r;) {
993
1009
  var o = e.charCodeAt(a);
994
1010
  if (o === u) {
995
1011
  var s = 4 - i % 4;
996
1012
  if (i + s > r) {
997
- Pt = i + s - r, a++, i = r;
1013
+ Rt = i + s - r, a++, i = r;
998
1014
  break;
999
1015
  }
1000
1016
  i += s;
@@ -1004,8 +1020,8 @@ function Ft(e, t, n, r) {
1004
1020
  }
1005
1021
  return a;
1006
1022
  }
1007
- function It(e, t, n, r) {
1008
- var i = bt(e, t), a = Nt(e, t, i);
1023
+ function Bt(e, t, n, r) {
1024
+ var i = St(e, t), a = Lt(e, t, i);
1009
1025
  if (!a) return null;
1010
1026
  var o = [], s = t, c = a.contentCol, g = "", y = a.isEmpty, x = !1, S = !1;
1011
1027
  if (!a.isEmpty) {
@@ -1014,7 +1030,7 @@ function It(e, t, n, r) {
1014
1030
  break;
1015
1031
  }
1016
1032
  if (E) {
1017
- var k = "", A = Mt(e, t, a.contentStart), j = A - a.contentCol;
1033
+ var k = "", A = It(e, t, a.contentStart), j = A - a.contentCol;
1018
1034
  if (j > 0) for (var M = 0; M < j; M++) k += " ";
1019
1035
  for (var N = a.contentStart; N < i; N++) if (e.charCodeAt(N) === u) {
1020
1036
  for (var P = 4 - A % 4, F = 0; F < P; F++) k += " ";
@@ -1023,73 +1039,73 @@ function It(e, t, n, r) {
1023
1039
  g = k + "\n";
1024
1040
  } else g = e.slice(a.contentStart, i) + "\n";
1025
1041
  }
1026
- for (s = Z(e, i); s < e.length;) {
1027
- var I = bt(e, s);
1028
- wt(e, s, I);
1029
- var L = e.charCodeAt(s + $);
1030
- if (Q < c && (L === b || L === C || L === w) && Q <= 3 && Ot(e, s)) break;
1031
- var R = Nt(e, s, I);
1032
- if (R && R.ordered === a.ordered && R.marker === a.marker && R.markerCol < c) {
1042
+ for (s = $(e, i); s < e.length;) {
1043
+ var I = St(e, s);
1044
+ Ot(e, s, I);
1045
+ var ee = e.charCodeAt(s + Dt);
1046
+ if (Et < c && (ee === b || ee === C || ee === w) && Et <= 3 && Mt(e, s)) break;
1047
+ var L = Lt(e, s, I);
1048
+ if (L && L.ordered === a.ordered && L.marker === a.marker && L.markerCol < c) {
1033
1049
  o.push({
1034
1050
  contentCol: c,
1035
1051
  raw: g,
1036
1052
  hasBlankAfter: x,
1037
1053
  isEmpty: y
1038
- }), x && (S = !0), c = R.contentCol, y = R.isEmpty, x = !1, g = R.isEmpty ? "" : e.slice(R.contentStart, I) + "\n", s = Z(e, I);
1054
+ }), x && (S = !0), c = L.contentCol, y = L.isEmpty, x = !1, g = L.isEmpty ? "" : e.slice(L.contentStart, I) + "\n", s = $(e, I);
1039
1055
  continue;
1040
1056
  }
1041
- if (Tt(e, s, I)) {
1042
- g += "\n", s = Z(e, I);
1043
- for (var ee = !1, te = 0; te < g.length; te++) {
1044
- var z = g.charCodeAt(te);
1045
- if (z !== f && z !== d && z !== l && z !== u) {
1046
- ee = !0;
1057
+ if (kt(e, s, I)) {
1058
+ g += "\n", s = $(e, I);
1059
+ for (var R = !1, te = 0; te < g.length; te++) {
1060
+ var ne = g.charCodeAt(te);
1061
+ if (ne !== f && ne !== d && ne !== l && ne !== u) {
1062
+ R = !0;
1047
1063
  break;
1048
1064
  }
1049
1065
  }
1050
- if (y && !ee) if (s < e.length) {
1051
- var ne = bt(e, s), re = Nt(e, s, ne);
1052
- if (!re || re.ordered !== a.ordered || re.marker !== a.marker) break;
1066
+ if (y && !R) if (s < e.length) {
1067
+ var re = St(e, s), ie = Lt(e, s, re);
1068
+ if (!ie || ie.ordered !== a.ordered || ie.marker !== a.marker) break;
1053
1069
  x = !0;
1054
1070
  } else break;
1055
1071
  if (s < e.length) {
1056
- var ie = bt(e, s);
1057
- wt(e, s, ie);
1058
- var ae = e.charCodeAt(s + $);
1059
- if ((ae === b || ae === C || ae === w) && Q <= 3 && Ot(e, s)) break;
1060
- var oe = Nt(e, s, ie);
1061
- if (oe && oe.ordered === a.ordered && oe.marker === a.marker && oe.markerCol < c) {
1072
+ var ae = St(e, s);
1073
+ Ot(e, s, ae);
1074
+ var z = e.charCodeAt(s + Dt);
1075
+ if ((z === b || z === C || z === w) && Et <= 3 && Mt(e, s)) break;
1076
+ var B = Lt(e, s, ae);
1077
+ if (B && B.ordered === a.ordered && B.marker === a.marker && B.markerCol < c) {
1062
1078
  x = !0;
1063
1079
  continue;
1064
1080
  }
1065
- if (!Tt(e, s, ie) && Q < c) break;
1081
+ if (!kt(e, s, ae) && Et < c) break;
1066
1082
  }
1067
1083
  continue;
1068
1084
  }
1069
- if (Q >= c) {
1070
- var ce = Ft(e, s, I, c);
1071
- if (Pt > 0) {
1072
- for (var le = "", ue = c, de = 0; de < Pt; de++) le += " ", ue++;
1073
- for (var fe = ce; fe < I; fe++) if (e.charCodeAt(fe) === u) {
1074
- for (var pe = 4 - ue % 4, me = 0; me < pe; me++) le += " ";
1075
- ue += pe;
1076
- } else le += e[fe], ue++;
1077
- g += le + "\n";
1078
- } else g += e.slice(ce, I) + "\n";
1079
- s = Z(e, I);
1085
+ if (Et >= c) {
1086
+ var se = zt(e, s, I, c);
1087
+ if (Rt > 0) {
1088
+ for (var ce = "", le = c, ue = 0; ue < Rt; ue++) ce += " ", le++;
1089
+ for (var de = se; de < I; de++) if (e.charCodeAt(de) === u) {
1090
+ for (var fe = 4 - le % 4, pe = 0; pe < fe; pe++) ce += " ";
1091
+ le += fe;
1092
+ } else ce += e[de], le++;
1093
+ g += ce + "\n";
1094
+ } else g += e.slice(se, I) + "\n";
1095
+ s = $(e, I);
1080
1096
  continue;
1081
1097
  }
1082
- for (var H = !1, U = 0; U < g.length; U++) {
1083
- var he = g.charCodeAt(U);
1084
- if (he !== f && he !== d && he !== l && he !== u) {
1085
- H = !0;
1098
+ for (var U = !1, W = 0; W < g.length; W++) {
1099
+ var G = g.charCodeAt(W);
1100
+ if (G !== f && G !== d && G !== l && G !== u) {
1101
+ U = !0;
1086
1102
  break;
1087
1103
  }
1088
1104
  }
1089
- if (!x && H && !y) {
1090
- var ge = s + $, _e = e.charCodeAt(ge);
1091
- if (!(_e === v || _e === _ || _e === T || _e === p || _e === m || (_e === b || _e === C || _e === w || _e === se) && (Ot(e, s) !== null || Nt(e, s, I) !== null) || _e >= B && _e <= V && Nt(e, s, I) !== null)) {
1092
- g += "" + e.slice(ge, I) + "\n", s = Z(e, I);
1105
+ if (!x && U && !y) {
1106
+ var me = s + Dt, he = e.charCodeAt(me);
1107
+ if (!(he === v || he === _ || he === T || he === p || he === m || (he === b || he === C || he === w || he === oe) && (Mt(e, s) !== null || Lt(e, s, I) !== null) || he >= V && he <= H && Lt(e, s, I) !== null)) {
1108
+ g += "" + e.slice(me, I) + "\n", s = $(e, I);
1093
1109
  continue;
1094
1110
  }
1095
1111
  }
@@ -1101,115 +1117,115 @@ function It(e, t, n, r) {
1101
1117
  hasBlankAfter: x,
1102
1118
  isEmpty: y
1103
1119
  }), o.length === 0) return null;
1104
- var ve = S;
1105
- if (!ve) for (var ye = 0; ye < o.length; ye++) {
1106
- if (o[ye].hasBlankAfter && ye < o.length - 1) {
1107
- ve = !0;
1120
+ var ge = S;
1121
+ if (!ge) for (var _e = 0; _e < o.length; _e++) {
1122
+ if (o[_e].hasBlankAfter && _e < o.length - 1) {
1123
+ ge = !0;
1108
1124
  break;
1109
1125
  }
1110
- if (!o[ye].isEmpty) {
1111
- for (var be = o[ye].raw, G = be.length, K = 0, xe = !1, Se = !1, Ce = !1, we = !1, Te = 0, q = 0, J = -1; K < G;) {
1112
- var Y = be.indexOf("\n", K);
1113
- if (Y < 0 && (Y = G), we) {
1114
- wt(be, K, Y);
1115
- for (var Ee = be.slice(K + $, Y), X = 0; X < Ee.length && Ee.charCodeAt(X) === Te;) X++;
1116
- X >= q && Ee.slice(X).trim() === "" && (we = !1), K = Y < G ? Y + 1 : G;
1126
+ if (!o[_e].isEmpty) {
1127
+ for (var ve = o[_e].raw, q = ve.length, J = 0, ye = !1, be = !1, xe = !1, Se = !1, Y = 0, Ce = 0, X = -1; J < q;) {
1128
+ var Z = ve.indexOf("\n", J);
1129
+ if (Z < 0 && (Z = q), Se) {
1130
+ Ot(ve, J, Z);
1131
+ for (var we = ve.slice(J + Dt, Z), Q = 0; Q < we.length && we.charCodeAt(Q) === Y;) Q++;
1132
+ Q >= Ce && we.slice(Q).trim() === "" && (Se = !1), J = Z < q ? Z + 1 : q;
1117
1133
  continue;
1118
1134
  }
1119
- if (Tt(be, K, Y)) {
1120
- J >= 0 ? Ce = !0 : xe && (Se = !0), K = Y < G ? Y + 1 : G;
1135
+ if (kt(ve, J, Z)) {
1136
+ X >= 0 ? xe = !0 : ye && (be = !0), J = Z < q ? Z + 1 : q;
1121
1137
  continue;
1122
1138
  }
1123
- if (wt(be, K, Y), J >= 0) {
1124
- if (Q >= J) {
1125
- K = Y < G ? Y + 1 : G;
1139
+ if (Ot(ve, J, Z), X >= 0) {
1140
+ if (Et >= X) {
1141
+ J = Z < q ? Z + 1 : q;
1126
1142
  continue;
1127
1143
  }
1128
- var De = Nt(be, K, Y);
1129
- if (De && De.markerCol < J && De.contentCol <= J) {
1130
- K = Y < G ? Y + 1 : G;
1144
+ var Te = Lt(ve, J, Z);
1145
+ if (Te && Te.markerCol < X && Te.contentCol <= X) {
1146
+ J = Z < q ? Z + 1 : q;
1131
1147
  continue;
1132
1148
  }
1133
- if (De) {
1134
- K = Y < G ? Y + 1 : G;
1149
+ if (Te) {
1150
+ J = Z < q ? Z + 1 : q;
1135
1151
  continue;
1136
1152
  }
1137
- J = -1, Ce &&= (Se = !0, !1);
1153
+ X = -1, xe &&= (be = !0, !1);
1138
1154
  }
1139
- var Oe = be.slice(K + $, Y), ke = Oe.charCodeAt(0);
1140
- if ((ke === p || ke === m) && Q <= 3) {
1141
- for (var Ae = 0; Ae < Oe.length && Oe.charCodeAt(Ae) === ke;) Ae++;
1142
- if (Ae >= 3) {
1143
- if (Se && xe) {
1144
- ve = !0;
1155
+ var Ee = ve.slice(J + Dt, Z), De = Ee.charCodeAt(0);
1156
+ if ((De === p || De === m) && Et <= 3) {
1157
+ for (var Oe = 0; Oe < Ee.length && Ee.charCodeAt(Oe) === De;) Oe++;
1158
+ if (Oe >= 3) {
1159
+ if (be && ye) {
1160
+ ge = !0;
1145
1161
  break;
1146
1162
  }
1147
- we = !0, Te = ke, q = Ae, xe = !0, K = Y < G ? Y + 1 : G;
1163
+ Se = !0, Y = De, Ce = Oe, ye = !0, J = Z < q ? Z + 1 : q;
1148
1164
  continue;
1149
1165
  }
1150
1166
  }
1151
- var je = Q <= 3 ? Nt(be, K, Y) : null;
1152
- if (je && xe) {
1153
- if (Se) {
1154
- ve = !0;
1167
+ var ke = Et <= 3 ? Lt(ve, J, Z) : null;
1168
+ if (ke && ye) {
1169
+ if (be) {
1170
+ ge = !0;
1155
1171
  break;
1156
1172
  }
1157
- J = je.contentCol, Ce = !1, K = Y < G ? Y + 1 : G, xe = !0;
1173
+ X = ke.contentCol, xe = !1, J = Z < q ? Z + 1 : q, ye = !0;
1158
1174
  continue;
1159
1175
  }
1160
- if (Se) {
1161
- ve = !0;
1176
+ if (be) {
1177
+ ge = !0;
1162
1178
  break;
1163
1179
  }
1164
- xe = !0, K = Y < G ? Y + 1 : G;
1165
- }
1166
- if (ve) break;
1167
- }
1168
- }
1169
- for (var Me = [], Ne = 0; Ne < o.length; Ne++) {
1170
- for (var Pe = o[Ne], Fe = Pe.raw, Ie = Fe.length; Ie > 0 && Fe.charCodeAt(Ie - 1) === f;) Ie--;
1171
- var Le = Ie < Fe.length ? Fe.slice(0, Ie) : Fe, Re = null;
1172
- if (Le.length >= 3 && Le.charCodeAt(0) === h) {
1173
- var ze = Le[1];
1174
- (ze === " " || ze === "x" || ze === "X") && Le.charCodeAt(2) === D && (Re = {
1175
- type: W.gfmTask,
1176
- completed: ze === "x" || ze === "X"
1177
- }, Le = Le.slice(3));
1178
- }
1179
- var Be;
1180
- if (Pe.isEmpty && Le.trim() === "") Be = [];
1181
- else if (ve) {
1182
- var Ve = n.inList;
1183
- n.inList = !0, Be = bn(Le, n, r), n.inList = Ve;
1180
+ ye = !0, J = Z < q ? Z + 1 : q;
1181
+ }
1182
+ if (ge) break;
1183
+ }
1184
+ }
1185
+ for (var Ae = [], je = 0; je < o.length; je++) {
1186
+ for (var Me = o[je], Ne = Me.raw, Pe = Ne.length; Pe > 0 && Ne.charCodeAt(Pe - 1) === f;) Pe--;
1187
+ var Fe = Pe < Ne.length ? Ne.slice(0, Pe) : Ne, Ie = null;
1188
+ if (Fe.length >= 3 && Fe.charCodeAt(0) === h) {
1189
+ var Le = Fe[1];
1190
+ (Le === " " || Le === "x" || Le === "X") && Fe.charCodeAt(2) === D && (Ie = {
1191
+ type: K.gfmTask,
1192
+ completed: Le === "x" || Le === "X"
1193
+ }, Fe = Fe.slice(3));
1194
+ }
1195
+ var Re;
1196
+ if (Me.isEmpty && Fe.trim() === "") Re = [];
1197
+ else if (ge) {
1198
+ var ze = n.inList;
1199
+ n.inList = !0, Re = wn(Fe, n, r), n.inList = ze;
1184
1200
  } else {
1185
- var He = n.inList;
1186
- if (n.inList = !0, Be = bn(Le, n, r), n.inList = He, Be.length === 1 && Be[0].type === W.paragraph) Be = Be[0].children;
1201
+ var Be = n.inList;
1202
+ if (n.inList = !0, Re = wn(Fe, n, r), n.inList = Be, Re.length === 1 && Re[0].type === K.paragraph) Re = Re[0].children;
1187
1203
  else {
1188
- for (var Ue = [], We = 0; We < Be.length; We++) if (Be[We].type === W.paragraph) for (var Ge = Be[We].children, Ke = 0; Ke < Ge.length; Ke++) Ue.push(Ge[Ke]);
1189
- else Ue.push(Be[We]);
1190
- Be = Ue;
1204
+ for (var Ve = [], He = 0; He < Re.length; He++) if (Re[He].type === K.paragraph) for (var Ue = Re[He].children, We = 0; We < Ue.length; We++) Ve.push(Ue[We]);
1205
+ else Ve.push(Re[He]);
1206
+ Re = Ve;
1191
1207
  }
1192
1208
  }
1193
- Me.push(Re ? [
1194
- Re,
1209
+ Ae.push(Ie ? [
1210
+ Ie,
1195
1211
  {
1196
- type: W.text,
1212
+ type: K.text,
1197
1213
  text: " "
1198
1214
  },
1199
- ...Be
1200
- ] : Be);
1215
+ ...Re
1216
+ ] : Re);
1201
1217
  }
1202
1218
  return {
1203
1219
  node: {
1204
- type: a.ordered ? W.orderedList : W.unorderedList,
1220
+ type: a.ordered ? K.orderedList : K.unorderedList,
1205
1221
  start: a.ordered ? a.start : void 0,
1206
- items: Me
1222
+ items: Ae
1207
1223
  },
1208
1224
  end: s
1209
1225
  };
1210
1226
  }
1211
- var Lt = new Set(/* @__PURE__ */ "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.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul".split("."));
1212
- function Rt(e, t, n) {
1227
+ var Vt = new Set(/* @__PURE__ */ "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.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul".split("."));
1228
+ function Ht(e, t, n) {
1213
1229
  let r = {};
1214
1230
  for (let [o, s] of Object.entries(e)) {
1215
1231
  let e = o, c = o.toLowerCase();
@@ -1217,7 +1233,7 @@ function Rt(e, t, n) {
1217
1233
  let t = {}, n = [], i = 0, a = 0;
1218
1234
  for (let e = 0; e < s.length; e++) {
1219
1235
  let t = s.charCodeAt(e);
1220
- t === de ? i++ : t === fe ? i-- : t === z && i === 0 && (n.push(s.slice(a, e)), a = e + 1);
1236
+ t === ue ? i++ : t === de ? i-- : t === ne && i === 0 && (n.push(s.slice(a, e)), a = e + 1);
1221
1237
  }
1222
1238
  a < s.length && n.push(s.slice(a));
1223
1239
  let o = !1;
@@ -1238,11 +1254,11 @@ function Rt(e, t, n) {
1238
1254
  let i = n.sanitizer(s, t, c);
1239
1255
  i !== null && (r[e] = i);
1240
1256
  } else if (s === "") r[e] = !0;
1241
- else if (s.length >= 2 && s.charCodeAt(0) === le && s.charCodeAt(s.length - 1) === ue) {
1257
+ else if (s.length >= 2 && s.charCodeAt(0) === ce && s.charCodeAt(s.length - 1) === le) {
1242
1258
  var i = s.slice(1, -1);
1243
1259
  if (i.length > 0) {
1244
1260
  var a = i.charCodeAt(0);
1245
- if (a === h || a === le) try {
1261
+ if (a === h || a === ce) try {
1246
1262
  r[e] = JSON.parse(i);
1247
1263
  continue;
1248
1264
  } catch {}
@@ -1264,36 +1280,53 @@ function Rt(e, t, n) {
1264
1280
  }
1265
1281
  return r;
1266
1282
  }
1267
- function zt(e, t, n) {
1283
+ function Ut(e, t, n) {
1268
1284
  let r = t.length;
1285
+ if (r === 0) return n;
1269
1286
  var i = t.charCodeAt(0);
1270
- i >= H && i <= U && (i += ve);
1271
- for (let o = n; o <= e.length - r; o++) {
1272
- var a = e.charCodeAt(o);
1273
- if (a >= H && a <= U && (a += ve), a !== i) continue;
1287
+ if (!(i >= U && i <= W || i >= G && i <= me)) {
1288
+ for (var a = String.fromCharCode(i), o = e.length - r, s = n; s <= o;) {
1289
+ var c = e.indexOf(a, s);
1290
+ if (c === -1 || c > o) return -1;
1291
+ for (var l = !0, u = 1; u < r; u++) {
1292
+ var d = e.charCodeAt(c + u), f = t.charCodeAt(u);
1293
+ if (d >= U && d <= W && (d += ge), f >= U && f <= W && (f += ge), d !== f) {
1294
+ l = !1;
1295
+ break;
1296
+ }
1297
+ }
1298
+ if (l) return c;
1299
+ s = c + 1;
1300
+ }
1301
+ return -1;
1302
+ }
1303
+ i >= U && i <= W && (i += ge);
1304
+ for (let a = n; a <= e.length - r; a++) {
1305
+ var p = e.charCodeAt(a);
1306
+ if (p >= U && p <= W && (p += ge), p !== i) continue;
1274
1307
  let n = !0;
1275
1308
  for (let i = 1; i < r; i++) {
1276
- let r = e.charCodeAt(o + i), a = t.charCodeAt(i);
1277
- if (r >= H && r <= U && (r += ve), a >= H && a <= U && (a += ve), r !== a) {
1309
+ let r = e.charCodeAt(a + i), o = t.charCodeAt(i);
1310
+ if (r >= U && r <= W && (r += ge), o >= U && o <= W && (o += ge), r !== o) {
1278
1311
  n = !1;
1279
1312
  break;
1280
1313
  }
1281
1314
  }
1282
- if (n) return o;
1315
+ if (n) return a;
1283
1316
  }
1284
1317
  return -1;
1285
1318
  }
1286
- function Bt(e, t, n) {
1319
+ function Wt(e, t, n) {
1287
1320
  let r = t.length;
1288
1321
  var i = t.charCodeAt(0);
1289
- i >= H && i <= U && (i += ve);
1322
+ i >= U && i <= W && (i += ge);
1290
1323
  for (let o = Math.min(n, e.length - r); o >= 0; o--) {
1291
1324
  var a = e.charCodeAt(o);
1292
- if (a >= H && a <= U && (a += ve), a !== i) continue;
1325
+ if (a >= U && a <= W && (a += ge), a !== i) continue;
1293
1326
  let n = !0;
1294
1327
  for (let i = 1; i < r; i++) {
1295
1328
  let r = e.charCodeAt(o + i), a = t.charCodeAt(i);
1296
- if (r >= H && r <= U && (r += ve), a >= H && a <= U && (a += ve), r !== a) {
1329
+ if (r >= U && r <= W && (r += ge), a >= U && a <= W && (a += ge), r !== a) {
1297
1330
  n = !1;
1298
1331
  break;
1299
1332
  }
@@ -1302,19 +1335,19 @@ function Bt(e, t, n) {
1302
1335
  }
1303
1336
  return -1;
1304
1337
  }
1305
- var Vt = -1;
1306
- function Ht(e, t, n) {
1338
+ var Gt = -1;
1339
+ function Kt(e, t, n) {
1307
1340
  let r = n.toLowerCase(), i = "<" + r, a = "</" + r, o = 1, s = t, c = e.length;
1308
- for (Vt = -1; s < c && o > 0;) {
1309
- let t = zt(e, i, s), n = zt(e, a, s);
1341
+ for (Gt = -1; s < c && o > 0;) {
1342
+ let t = Ut(e, i, s), n = Ut(e, a, s);
1310
1343
  if (n === -1) return -1;
1311
1344
  if (t !== -1 && t < n) {
1312
- let n = dt(e, t);
1313
- n ? (n.tag.toLowerCase() === r && !n.isClosing && !n.selfClosing && !De(n.tag) && o++, s = n.end) : s = t + 1;
1345
+ let n = ut(e, t);
1346
+ n ? (n.tag.toLowerCase() === r && !n.isClosing && !n.selfClosing && !Te(n.tag) && o++, s = n.end) : s = t + 1;
1314
1347
  } else {
1315
1348
  var d = n + a.length, p = d < c ? e.charCodeAt(d) : 62;
1316
1349
  if ((p === _ || p === l || p === u || p === f) && (o--, o === 0)) {
1317
- Vt = n;
1350
+ Gt = n;
1318
1351
  let t = n + a.length;
1319
1352
  for (; t < c && e.charCodeAt(t) !== _;) t++;
1320
1353
  return t + 1;
@@ -1324,37 +1357,37 @@ function Ht(e, t, n) {
1324
1357
  }
1325
1358
  return -1;
1326
1359
  }
1327
- function Ut(e, t, n, r) {
1360
+ function qt(e, t, n, r) {
1328
1361
  if (r.ignoreHTMLBlocks || r.disableParsingRawHTML) return null;
1329
- var i = bt(e, t);
1330
- if (wt(e, t, i), Q > 3 && !n.inHTML) return null;
1331
- var a = t + $;
1362
+ var i = St(e, t);
1363
+ if (Ot(e, t, i), Et > 3 && !n.inHTML) return null;
1364
+ var a = t + Dt;
1332
1365
  if (e.charCodeAt(a) !== T) return null;
1333
1366
  var o = e.indexOf(">", a + 1);
1334
1367
  if (o !== -1 && o < i) {
1335
1368
  var s = e.slice(a + 1, o);
1336
1369
  if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s) || /^[^\s@]+@[^\s@]+$/.test(s)) return null;
1337
1370
  }
1338
- var c = Wt(e, a);
1371
+ var c = Jt(e, a);
1339
1372
  if (c >= 1 && c <= 5) {
1340
1373
  var d = e.length;
1341
1374
  if (c === 1) {
1342
- for (var p = e.length, m = 0; m < et.length; m++) {
1343
- var h = zt(e, "</" + et[m] + ">", a);
1375
+ for (var p = e.length, m = 0; m < $e.length; m++) {
1376
+ var h = Ut(e, "</" + $e[m] + ">", a);
1344
1377
  h >= 0 && h < p && (p = h);
1345
1378
  }
1346
1379
  if (p < e.length) {
1347
1380
  var g = e.indexOf(">", p);
1348
- d = g >= 0 ? Z(e, g + 1) : e.length;
1381
+ d = g >= 0 ? $(e, g + 1) : e.length;
1349
1382
  }
1350
1383
  } else {
1351
1384
  var v = c === 2 ? "-->" : c === 3 ? "?>" : c === 4 ? ">" : "]]>", y = e.indexOf(v, a);
1352
- y >= 0 && (d = Z(e, y + v.length));
1385
+ y >= 0 && (d = $(e, y + v.length));
1353
1386
  }
1354
1387
  var b = e.slice(a, d);
1355
1388
  if (c >= 2) return {
1356
1389
  node: {
1357
- type: W.htmlComment,
1390
+ type: K.htmlComment,
1358
1391
  text: b,
1359
1392
  h: !1,
1360
1393
  raw: !0,
@@ -1364,9 +1397,9 @@ function Ut(e, t, n, r) {
1364
1397
  };
1365
1398
  var x = "div", S = b.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);
1366
1399
  S && (x = S[1]);
1367
- var C = dt(e, a), w = {}, E;
1368
- C && !C.isClosing && (w = Rt(C.attrs, x, r), E = C.whitespaceBeforeAttrs + C.rawAttrs);
1369
- var D = [], O = zt(b, "</" + x.toLowerCase(), 0), k = b, A = "";
1400
+ var C = ut(e, a), w = {}, E;
1401
+ C && !C.isClosing && (w = Ht(C.attrs, x, r), E = C.whitespaceBeforeAttrs + C.rawAttrs);
1402
+ var D = [], O = Ut(b, "</" + x.toLowerCase(), 0), k = b, A = "";
1370
1403
  if (C && C.isClosing) for (k = b.slice(C.end - a); k.length > 0 && k.charCodeAt(k.length - 1) === f;) k = k.slice(0, -1);
1371
1404
  else if (C && !C.isClosing) {
1372
1405
  var j = C.end - a;
@@ -1376,7 +1409,7 @@ function Ut(e, t, n, r) {
1376
1409
  }
1377
1410
  return {
1378
1411
  node: {
1379
- type: W.htmlBlock,
1412
+ type: K.htmlBlock,
1380
1413
  tag: x,
1381
1414
  attrs: w,
1382
1415
  f: E,
@@ -1392,303 +1425,324 @@ function Ut(e, t, n, r) {
1392
1425
  };
1393
1426
  }
1394
1427
  if (c === 6 || c === 7) {
1395
- var M = St(e, t), N = M < e.length ? M : e.length, P = e.slice(a, N), F = M < e.length ? Z(e, M) : e.length, I = dt(e, a);
1396
- if (I) {
1397
- var L = I.tag, R = L.toLowerCase();
1398
- if (I.isClosing) {
1399
- var ee = e.slice(I.end, N);
1428
+ var M = wt(e, t), N = M < e.length ? M : e.length, P = e.slice(a, N), L = M < e.length ? $(e, M) : e.length, R = ut(e, a);
1429
+ if (R) {
1430
+ var te = R.tag, ne = te.toLowerCase();
1431
+ if (R.isClosing) {
1432
+ var re = e.slice(R.end, N);
1400
1433
  return {
1401
1434
  node: {
1402
- type: W.htmlBlock,
1403
- tag: L,
1435
+ type: K.htmlBlock,
1436
+ tag: te,
1404
1437
  attrs: {},
1405
1438
  children: [],
1406
- a: ee,
1407
- text: ee,
1439
+ a: re,
1440
+ text: re,
1408
1441
  c: !0,
1409
1442
  b: !0,
1410
1443
  endPos: N,
1411
1444
  e: c === 6
1412
1445
  },
1413
- end: F
1446
+ end: L
1414
1447
  };
1415
1448
  }
1416
- if (I.selfClosing || De(L)) return {
1449
+ if (R.selfClosing || Te(te)) return {
1417
1450
  node: {
1418
- type: W.htmlBlock,
1419
- tag: L,
1420
- attrs: Rt(I.attrs, L, r),
1421
- f: I.whitespaceBeforeAttrs + I.rawAttrs,
1451
+ type: K.htmlBlock,
1452
+ tag: te,
1453
+ attrs: Ht(R.attrs, te, r),
1454
+ f: R.whitespaceBeforeAttrs + R.rawAttrs,
1422
1455
  children: [],
1423
1456
  a: "",
1424
1457
  text: "",
1425
1458
  c: !1,
1426
1459
  b: !1,
1427
- endPos: I.end,
1460
+ endPos: R.end,
1428
1461
  e: c === 6
1429
1462
  },
1430
- end: Z(e, I.end)
1463
+ end: R.end < e.length && e.charCodeAt(R.end) === f ? R.end + 1 : R.end
1431
1464
  };
1432
- var te = n.d || 0, z = e.slice(a, N), ne = -1, re = -1;
1433
- if (te < 10) {
1434
- for (var ae = "</" + R, oe = I.end - a, se = 1, ce = oe; ce < z.length && se > 0;) {
1435
- var le = zt(z, "<" + R, ce), ue = zt(z, ae, ce);
1436
- if (ue === -1) break;
1437
- if (le !== -1 && le < ue) {
1438
- var de = le + R.length + 1;
1439
- if (de < z.length) {
1440
- var fe = z.charCodeAt(de);
1441
- (fe === l || fe === u || fe === f || fe === _ || fe === ie) && se++;
1465
+ var ie = n.d || 0, z = e.slice(a, N), B = -1, oe = -1;
1466
+ if (ie < 10) {
1467
+ for (var se = "</" + ne, ce = R.end - a, le = 1, ue = ce; ue < z.length && le > 0;) {
1468
+ var de = Ut(z, "<" + ne, ue), fe = Ut(z, se, ue);
1469
+ if (fe === -1) break;
1470
+ if (de !== -1 && de < fe) {
1471
+ var pe = de + ne.length + 1;
1472
+ if (pe < z.length) {
1473
+ var V = z.charCodeAt(pe);
1474
+ (V === l || V === u || V === f || V === _ || V === ae) && le++;
1442
1475
  }
1443
- ce = le + 1;
1476
+ ue = de + 1;
1444
1477
  } else {
1445
- var pe = ue + ae.length;
1446
- if (pe < z.length) {
1447
- var me = z.charCodeAt(pe);
1448
- if ((me === _ || me === l || me === u || me === f) && (se--, se === 0)) {
1449
- ne = ue;
1450
- for (var B = pe; B < z.length && z.charCodeAt(B) !== _;) B++;
1451
- re = B + 1;
1478
+ var H = fe + se.length;
1479
+ if (H < z.length) {
1480
+ var G = z.charCodeAt(H);
1481
+ if ((G === _ || G === l || G === u || G === f) && (le--, le === 0)) {
1482
+ B = fe;
1483
+ for (var me = H; me < z.length && z.charCodeAt(me) !== _;) me++;
1484
+ oe = me + 1;
1452
1485
  break;
1453
1486
  }
1454
- } else if (se--, se === 0) {
1455
- ne = ue, re = z.length;
1487
+ } else if (le--, le === 0) {
1488
+ B = fe, oe = z.length;
1456
1489
  break;
1457
1490
  }
1458
- ce = ue + 1;
1491
+ ue = fe + 1;
1459
1492
  }
1460
1493
  }
1461
- var V = !1;
1462
- if (ne === -1 && c === 6 && !I.isClosing && !at.has(R)) {
1463
- var he = Ht(e, I.end, R);
1464
- if (he !== -1) {
1465
- var ge = Vt;
1466
- if (e.substring(I.end, ge).indexOf("\n\n") !== -1) {
1467
- var _e = bt(e, he);
1468
- N = _e, F = Z(e, _e), z = e.slice(a, N), P = e.slice(a, N), ne = ge - a, re = he - a, V = !0;
1494
+ var he = !1;
1495
+ if (B === -1 && c === 6 && !R.isClosing) {
1496
+ var ge = Kt(e, R.end, ne);
1497
+ if (ge !== -1) {
1498
+ for (var _e = Gt, ve = R.end, q = !1, J = !1, ye = !1, be = 0, xe = !1, Se = !1, Y = ve; Y < _e;) {
1499
+ var Ce = e.charCodeAt(Y);
1500
+ if (Ce === f) Se && (q = !0), xe || be++, Se = !0, Y++;
1501
+ else if (Ce === l || Ce === u) Y++;
1502
+ else {
1503
+ if (!xe && (xe = !0, be >= 2 && Ce === T)) {
1504
+ ye = !0;
1505
+ break;
1506
+ }
1507
+ if (Se = !1, Ce === T) {
1508
+ var X = e.charCodeAt(Y + 1) | 32;
1509
+ if ((X === I || X === ee || X === F) && (nt.lastIndex = Y, nt.test(e))) {
1510
+ J = !0;
1511
+ break;
1512
+ }
1513
+ }
1514
+ Y++;
1515
+ }
1516
+ }
1517
+ if (q && !ye && !J) {
1518
+ var Z = St(e, ge);
1519
+ N = Z, L = $(e, Z), z = e.slice(a, N), P = e.slice(a, N), B = _e - a, oe = ge - a, he = !0;
1469
1520
  }
1470
1521
  }
1471
1522
  }
1472
1523
  }
1473
- var ve = I.rawAttrs.indexOf("\n") !== -1 || I.whitespaceBeforeAttrs.indexOf("\n") !== -1, ye = !1;
1474
- ne !== -1 && (ye = z.slice(re).trim().length === 0);
1475
- var be = !1, G = N, K = F;
1476
- if (ne !== -1) {
1477
- var xe = a + re, Se = bt(e, xe - 1);
1478
- if (xe < Se) {
1479
- for (var Ce = xe; Ce < Se && (e.charCodeAt(Ce) === l || e.charCodeAt(Ce) === u);) Ce++;
1480
- if (Ce < Se && e.charCodeAt(Ce) === T) {
1481
- var we = dt(e, Ce);
1482
- we && !we.isClosing && (be = !0, G = xe, K = xe, ye = !0);
1524
+ var we = R.rawAttrs.indexOf("\n") !== -1 || R.whitespaceBeforeAttrs.indexOf("\n") !== -1, Q = !1;
1525
+ B !== -1 && (Q = z.slice(oe).trim().length === 0);
1526
+ var Ee = !1, De = N, Oe = L;
1527
+ if (B !== -1) {
1528
+ var ke = a + oe, Ae = St(e, ke - 1);
1529
+ if (ke < Ae) {
1530
+ for (var je = ke; je < Ae && (e.charCodeAt(je) === l || e.charCodeAt(je) === u);) je++;
1531
+ if (je < Ae && e.charCodeAt(je) === T) {
1532
+ var Me = ut(e, je);
1533
+ Me && !Me.isClosing && (Ee = !0, De = ke, Oe = ke, Q = !0);
1483
1534
  }
1484
1535
  }
1485
- if (!be) {
1486
- var Te = Z(e, Se);
1487
- if (Te < N) {
1488
- for (var q = Te; q < N && (e.charCodeAt(q) === l || e.charCodeAt(q) === u);) q++;
1489
- q < N && e.charCodeAt(q) === T && dt(e, q) && (be = !0, G = Se, K = Te, ye = !0);
1536
+ if (!Ee) {
1537
+ var Ne = $(e, Ae);
1538
+ if (Ne < N) {
1539
+ for (var Pe = Ne; Pe < N && (e.charCodeAt(Pe) === l || e.charCodeAt(Pe) === u);) Pe++;
1540
+ Pe < N && e.charCodeAt(Pe) === T && ut(e, Pe) && (Ee = !0, De = Ae, Oe = Ne, Q = !0);
1490
1541
  }
1491
1542
  }
1492
- !be && n.inHTML && (be = !0, G = Se, K = Z(e, Se), ye = e.slice(xe, Se).trim().length === 0);
1493
- }
1494
- var J = [], Y = "";
1495
- if (ne !== -1) {
1496
- Y = z.slice(I.end - a, ne);
1497
- var Ee = Y.trim();
1498
- if (Ee) {
1499
- var { inline: X, inHTML: Oe, d: ke } = n;
1500
- if (n.inHTML = !0, n.d = te + 1, R === "p") n.inline = !0, J = vn(Ee, 0, Ee.length, n, r);
1543
+ !Ee && n.inHTML && (Ee = !0, De = Ae, Oe = $(e, Ae), Q = e.slice(ke, Ae).trim().length === 0);
1544
+ }
1545
+ var Fe = [], Ie = "";
1546
+ if (B !== -1) {
1547
+ Ie = z.slice(R.end - a, B);
1548
+ var Le = Ie.trim();
1549
+ if (Le) {
1550
+ var { inline: Re, inHTML: ze, d: Be } = n;
1551
+ if (n.inHTML = !0, n.d = ie + 1, ne === "p") n.inline = !0, Fe = Sn(Le, 0, Le.length, n, r);
1501
1552
  else {
1502
- var Ae = Y.indexOf("\n\n") !== -1, je = rt.test(Ee), Me = it.test(Ee);
1503
- Ae || je || n.inHTML && Me || Me ? (n.inline = !1, J = bn(Y, n, r)) : (n.inline = !0, J = vn(Ee, 0, Ee.length, n, r));
1553
+ var Ve = Ie.indexOf("\n\n") !== -1, He = rt.test(Le), Ue = it.test(Le), We = Ve || He || n.inHTML && Ue;
1554
+ Ie.length >= 2 && Ie.charCodeAt(0) === f && Ie.charCodeAt(Ie.length - 1) === f && !Ve && !He && !Ue ? Fe = [{
1555
+ type: K.text,
1556
+ text: Le
1557
+ }] : We || Ue ? (n.inline = !1, Fe = wn(Ie, n, r)) : (n.inline = !0, Fe = Sn(Le, 0, Le.length, n, r));
1504
1558
  }
1505
- n.inline = X, n.inHTML = Oe, n.d = ke;
1559
+ n.inline = Re, n.inHTML = ze, n.d = Be;
1506
1560
  }
1507
1561
  }
1508
- var Ne = !1;
1509
- if (c === 6 && ne !== -1 && !n.inHTML && !ve) {
1510
- var Pe = Y, Fe = /<[a-zA-Z][^>]*>/.test(Pe), Ie = /\n\n/.test(Pe) || /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(Pe);
1511
- Fe && !Ie && (Ne = !0);
1512
- }
1513
- if (n.inHTML || c === 7 || ve || !ye || Ne) {
1514
- var Le;
1515
- if (ne !== -1 && be) {
1516
- var Re = !1;
1517
- if (n.inHTML && re < z.length) {
1518
- for (var ze = re; ze < z.length && z.charCodeAt(ze) !== f;) ze++;
1519
- var Be = z.slice(re, ze).trim();
1520
- Re = Be.length > 1 && Be.charCodeAt(0) === T && Be.charCodeAt(1) !== ie;
1562
+ var Ge = !1;
1563
+ if (c === 6 && B !== -1 && !n.inHTML && !we) {
1564
+ var Ke = Ie, qe = /<[a-zA-Z][^>]*>/.test(Ke), Je = /\n\n/.test(Ke) || /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(Ke);
1565
+ qe && !Je && (Ge = !0);
1566
+ }
1567
+ if (!he && (n.inHTML || c === 7 || we || !Q || Ge)) {
1568
+ var Ye;
1569
+ if (B !== -1 && Ee) {
1570
+ var Xe = !1;
1571
+ if (n.inHTML && oe < z.length) {
1572
+ for (var Ze = oe; Ze < z.length && z.charCodeAt(Ze) !== f;) Ze++;
1573
+ var Qe = z.slice(oe, Ze).trim();
1574
+ Xe = Qe.length > 1 && Qe.charCodeAt(0) === T && Qe.charCodeAt(1) !== ae;
1521
1575
  }
1522
- Le = Re ? z.slice(I.end - a) : Y;
1523
- } else (c === 7 || n.inHTML) && ne !== -1 ? (Le = z.slice(I.end - a), Le.charCodeAt(0) === f && (Le = Le.slice(1))) : be ? Le = e.slice(a, G) : ve ? Le = P : (Le = z.slice(I.end - a), Le.charCodeAt(0) === f && (Le = Le.slice(1)));
1576
+ Ye = Xe ? z.slice(R.end - a) : Ie;
1577
+ } else (c === 7 || n.inHTML) && B !== -1 ? (Ye = z.slice(R.end - a), Ye.charCodeAt(0) === f && (Ye = Ye.slice(1))) : Ee ? Ye = e.slice(a, De) : we ? Ye = P : (Ye = z.slice(R.end - a), Ye.charCodeAt(0) === f && (Ye = Ye.slice(1)));
1524
1578
  return {
1525
1579
  node: {
1526
- type: W.htmlBlock,
1527
- tag: L,
1528
- attrs: Rt(I.attrs, L, r),
1529
- f: I.whitespaceBeforeAttrs + I.rawAttrs,
1530
- children: J,
1531
- a: Le,
1532
- text: Le,
1580
+ type: K.htmlBlock,
1581
+ tag: te,
1582
+ attrs: Ht(R.attrs, te, r),
1583
+ f: R.whitespaceBeforeAttrs + R.rawAttrs,
1584
+ children: Fe,
1585
+ a: Ye,
1586
+ text: Ye,
1533
1587
  c: !0,
1534
1588
  b: !1,
1535
- endPos: G,
1589
+ endPos: De,
1536
1590
  e: c === 6
1537
1591
  },
1538
- end: K
1592
+ end: Oe
1539
1593
  };
1540
1594
  }
1541
1595
  return {
1542
1596
  node: {
1543
- type: W.htmlBlock,
1544
- tag: L,
1545
- attrs: Rt(I.attrs, L, r),
1546
- f: I.whitespaceBeforeAttrs + I.rawAttrs,
1547
- children: J,
1548
- a: V ? "" : Y,
1549
- text: Y,
1597
+ type: K.htmlBlock,
1598
+ tag: te,
1599
+ attrs: Ht(R.attrs, te, r),
1600
+ f: R.whitespaceBeforeAttrs + R.rawAttrs,
1601
+ children: Fe,
1602
+ a: he ? "" : Ie,
1603
+ text: Ie,
1550
1604
  c: !1,
1551
1605
  b: !1,
1552
- endPos: G,
1606
+ endPos: De,
1553
1607
  e: c === 6
1554
1608
  },
1555
- end: K
1609
+ end: Oe
1556
1610
  };
1557
1611
  }
1558
- var Ve = P.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/), He = Ve ? Ve[2] : "div", Ue = Ve ? Ve[1] === "/" : !1, We = P;
1559
- if (Ue) {
1560
- var Ge = P.indexOf(">");
1561
- Ge !== -1 && (We = P.slice(Ge + 1));
1612
+ var tt = P.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/), at = tt ? tt[2] : "div", ot = tt ? tt[1] === "/" : !1, st = P;
1613
+ if (ot) {
1614
+ var ct = P.indexOf(">");
1615
+ ct !== -1 && (st = P.slice(ct + 1));
1562
1616
  }
1563
1617
  return {
1564
1618
  node: {
1565
- type: W.htmlBlock,
1566
- tag: He,
1619
+ type: K.htmlBlock,
1620
+ tag: at,
1567
1621
  attrs: {},
1568
1622
  children: [],
1569
- a: We,
1570
- text: We,
1623
+ a: st,
1624
+ text: st,
1571
1625
  c: !0,
1572
- b: Ue,
1626
+ b: ot,
1573
1627
  endPos: N,
1574
1628
  e: c === 6
1575
1629
  },
1576
- end: F
1630
+ end: L
1577
1631
  };
1578
1632
  }
1579
- var Ke = dt(e, a);
1580
- if (!Ke) return null;
1581
- var qe = Ke.tag, Je = qe.toLowerCase(), Ye = qe.charCodeAt(0), Xe = Ye >= H && Ye <= U;
1582
- if (!Xe && !Lt.has(Je) && !tt.has(Je) && !Je.includes("-")) return null;
1583
- if (Ke.isClosing) return {
1633
+ var lt = ut(e, a);
1634
+ if (!lt) return null;
1635
+ var dt = lt.tag, ft = dt.toLowerCase(), pt = dt.charCodeAt(0), mt = pt >= U && pt <= W;
1636
+ if (!mt && !Vt.has(ft) && !et.has(ft) && !ft.includes("-")) return null;
1637
+ if (lt.isClosing) return {
1584
1638
  node: {
1585
- type: W.htmlSelfClosing,
1586
- tag: qe,
1639
+ type: K.htmlSelfClosing,
1640
+ tag: dt,
1587
1641
  attrs: {},
1588
- a: e.slice(a, Ke.end),
1642
+ a: e.slice(a, lt.end),
1589
1643
  b: !0,
1590
- endPos: Ke.end
1644
+ endPos: lt.end
1591
1645
  },
1592
- end: Ke.end
1646
+ end: lt.end
1593
1647
  };
1594
- var Ze = Ht(e, Ke.end, qe), Qe = [];
1595
- if (Ze !== -1) {
1596
- var $e = e.slice(Ke.end, Vt), nt = $e.trim();
1597
- if (nt) {
1598
- var ot = $e.indexOf("\n\n") !== -1, st = rt.test(nt), ct = it.test(nt), lt = n.inline, ut = n.inHTML, ft = n.d;
1599
- n.inHTML = !0, n.d = (n.d || 0) + 1, ot || st || ct ? (n.inline = !1, Qe = bn($e, n, r)) : (n.inline = !0, Qe = vn(nt, 0, nt.length, n, r)), n.inline = lt, n.inHTML = ut, n.d = ft;
1600
- }
1601
- var pt = bt(e, Ze), mt = e.slice(Ze, pt).trim() ? Ze : Z(e, Ze), ht = Xe ? e.slice(a, Ze) : e.slice(a, mt), gt = Xe ? Ze : mt;
1648
+ var ht = Kt(e, lt.end, dt), gt = [];
1649
+ if (ht !== -1) {
1650
+ var _t = e.slice(lt.end, Gt), vt = _t.trim();
1651
+ if (vt) {
1652
+ var yt = _t.indexOf("\n\n") !== -1, bt = rt.test(vt), xt = it.test(vt), Ct = n.inline, Tt = n.inHTML, kt = n.d;
1653
+ n.inHTML = !0, n.d = (n.d || 0) + 1, yt || bt || xt ? (n.inline = !1, gt = wn(_t, n, r)) : (n.inline = !0, gt = Sn(vt, 0, vt.length, n, r)), n.inline = Ct, n.inHTML = Tt, n.d = kt;
1654
+ }
1655
+ var At = St(e, ht), jt = e.slice(ht, At).trim() ? ht : $(e, ht), Mt = mt ? e.slice(a, ht) : e.slice(a, jt), Nt = mt ? ht : jt;
1602
1656
  return {
1603
1657
  node: {
1604
- type: W.htmlBlock,
1605
- tag: qe,
1606
- attrs: Rt(Ke.attrs, qe, r),
1607
- f: Ke.whitespaceBeforeAttrs + Ke.rawAttrs,
1608
- children: Qe,
1609
- a: ht,
1610
- text: Xe ? $e : ht,
1658
+ type: K.htmlBlock,
1659
+ tag: dt,
1660
+ attrs: Ht(lt.attrs, dt, r),
1661
+ f: lt.whitespaceBeforeAttrs + lt.rawAttrs,
1662
+ children: gt,
1663
+ a: Mt,
1664
+ text: mt ? _t : Mt,
1611
1665
  c: !0,
1612
1666
  b: !1,
1613
- endPos: gt,
1667
+ endPos: Nt,
1614
1668
  e: !1
1615
1669
  },
1616
- end: mt
1670
+ end: jt
1617
1671
  };
1618
1672
  }
1619
- var _t = St(e, Ke.end), vt = _t < e.length ? Z(e, _t) : _t, yt = e.slice(Ke.end, _t);
1620
- if (yt.trim()) {
1621
- var { inline: xt, inHTML: Ct, d: Tt } = n;
1622
- n.inline = !1, n.inHTML = !0, n.d = (n.d || 0) + 1, Qe = bn(yt, n, r), n.inline = xt, n.inHTML = Ct, n.d = Tt;
1673
+ var Pt = wt(e, lt.end), Ft = Pt < e.length ? $(e, Pt) : Pt, It = e.slice(lt.end, Pt);
1674
+ if (It.trim()) {
1675
+ var { inline: Lt, inHTML: Rt, d: zt } = n;
1676
+ n.inline = !1, n.inHTML = !0, n.d = (n.d || 0) + 1, gt = wn(It, n, r), n.inline = Lt, n.inHTML = Rt, n.d = zt;
1623
1677
  }
1624
- var Et = e.slice(Ke.end, _t);
1678
+ var Bt = e.slice(lt.end, Pt);
1625
1679
  return {
1626
1680
  node: {
1627
- type: W.htmlBlock,
1628
- tag: qe,
1629
- attrs: Rt(Ke.attrs, qe, r),
1630
- f: Ke.whitespaceBeforeAttrs + Ke.rawAttrs,
1631
- children: Qe,
1632
- a: Et,
1633
- text: yt,
1681
+ type: K.htmlBlock,
1682
+ tag: dt,
1683
+ attrs: Ht(lt.attrs, dt, r),
1684
+ f: lt.whitespaceBeforeAttrs + lt.rawAttrs,
1685
+ children: gt,
1686
+ a: Bt,
1687
+ text: It,
1634
1688
  c: !0,
1635
1689
  b: !1,
1636
- endPos: _t,
1690
+ endPos: Pt,
1637
1691
  e: !1
1638
1692
  },
1639
- end: vt
1693
+ end: Ft
1640
1694
  };
1641
1695
  }
1642
- function Wt(e, t) {
1696
+ function Jt(e, t) {
1643
1697
  if (e.charCodeAt(t) !== T) return 0;
1644
1698
  var n = t + 1, r = e.length;
1645
1699
  if (e.charCodeAt(n) === O && e.charCodeAt(n + 1) === b && e.charCodeAt(n + 2) === b) return 2;
1646
- if (e.charCodeAt(n) === ne) return 3;
1700
+ if (e.charCodeAt(n) === re) return 3;
1647
1701
  if (e.charCodeAt(n) === O) {
1648
1702
  var i = e.charCodeAt(n + 1);
1649
- if (i >= H && i <= U) return 4;
1703
+ if (i >= U && i <= W) return 4;
1650
1704
  if (e.slice(n + 1, n + 8) === "[CDATA[") return 5;
1651
1705
  }
1652
- for (var a = e.charCodeAt(n) === ie, o = a ? n + 1 : n, s = o; s < r;) {
1706
+ for (var a = e.charCodeAt(n) === ae, o = a ? n + 1 : n, s = o; s < r;) {
1653
1707
  var c = e.charCodeAt(s);
1654
- if (c >= H && c <= U || c >= he && c <= ge || c >= B && c <= V || c === b) s++;
1708
+ if (c >= U && c <= W || c >= G && c <= me || c >= V && c <= H || c === b) s++;
1655
1709
  else break;
1656
1710
  }
1657
1711
  if (s === o) return 0;
1658
1712
  var d = e.slice(o, s);
1659
- if (tt.has(d.toLowerCase())) {
1713
+ if (et.has(d.toLowerCase())) {
1660
1714
  if (a) return 0;
1661
1715
  var p = e.charCodeAt(s);
1662
- return p === l || p === u || p === _ || p === f || s >= r ? 1 : 0;
1716
+ return +(p === l || p === u || p === _ || p === f || s >= r);
1663
1717
  }
1664
- if (Lt.has(d.toLowerCase())) {
1718
+ if (Vt.has(d.toLowerCase())) {
1665
1719
  if (a) {
1666
1720
  for (var m = s; m < r && (e.charCodeAt(m) === l || e.charCodeAt(m) === u);) m++;
1667
1721
  return m < r && e.charCodeAt(m) === _ ? 6 : 0;
1668
1722
  }
1669
1723
  var h = s < r ? e.charCodeAt(s) : -1;
1670
- return h === l || h === u || h === _ || h === f || h === ie || h === -1 ? 6 : 0;
1724
+ return h === l || h === u || h === _ || h === f || h === ae || h === -1 ? 6 : 0;
1671
1725
  }
1672
1726
  if (a) {
1673
1727
  for (var g = s; g < r && (e.charCodeAt(g) === l || e.charCodeAt(g) === u);) g++;
1674
1728
  if (g < r && e.charCodeAt(g) === _) {
1675
- var v = bt(e, t);
1729
+ var v = St(e, t);
1676
1730
  if (e.slice(g + 1, v).trim() === "") return 7;
1677
1731
  }
1678
1732
  } else {
1679
- var y = bt(e, t), x = dt(e, t);
1733
+ var y = St(e, t), x = ut(e, t);
1680
1734
  if (x && x.end <= y && e.slice(x.end, y).trim() === "") return 7;
1681
1735
  }
1682
1736
  return 0;
1683
1737
  }
1684
- function Gt(e, t, n) {
1738
+ function Yt(e, t, n) {
1685
1739
  for (var r = 0, i = e.length; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
1686
1740
  for (; i > r && (e.charCodeAt(i - 1) === l || e.charCodeAt(i - 1) === u);) i--;
1687
- r < i && e.charCodeAt(r) === ce && r++, i > r && e.charCodeAt(i - 1) === ce && (i - 2 < r || e.charCodeAt(i - 2) !== S) && i--;
1741
+ r < i && e.charCodeAt(r) === se && r++, i > r && e.charCodeAt(i - 1) === se && (i - 2 < r || e.charCodeAt(i - 2) !== S) && i--;
1688
1742
  for (var a = [], o = r, s = !1, c = [], d = r; d < i;) {
1689
1743
  var f = e.charCodeAt(d);
1690
1744
  if (f === S && d + 1 < i) {
1691
- e.charCodeAt(d + 1) === ce ? (s || (s = !0, c = []), c.push(e.slice(o, d)), c.push("|"), d += 2, o = d) : d += 2;
1745
+ e.charCodeAt(d + 1) === se ? (s || (s = !0, c = []), c.push(e.slice(o, d)), c.push("|"), d += 2, o = d) : d += 2;
1692
1746
  continue;
1693
1747
  }
1694
1748
  if (f === p) {
@@ -1699,7 +1753,7 @@ function Gt(e, t, n) {
1699
1753
  }
1700
1754
  continue;
1701
1755
  }
1702
- if (f === ce) {
1756
+ if (f === se) {
1703
1757
  var _ = s ? (c.push(e.slice(o, d)), c.join("")) : e.slice(o, d);
1704
1758
  a.push(_.trim()), d++, o = d, s = !1, c = [];
1705
1759
  continue;
@@ -1709,50 +1763,50 @@ function Gt(e, t, n) {
1709
1763
  var v = s ? (c.push(e.slice(o, i)), c.join("")) : e.slice(o, i);
1710
1764
  return a.push(v.trim()), a.map(function(e) {
1711
1765
  var r = e.indexOf("\\|") === -1 ? e : e.replace(/\\\|/g, "|");
1712
- return vn(r, 0, r.length, t, n);
1766
+ return Sn(r, 0, r.length, t, n);
1713
1767
  });
1714
1768
  }
1715
- function Kt(e, t, n, r) {
1716
- let i = bt(e, t);
1769
+ function Xt(e, t, n, r) {
1770
+ let i = St(e, t);
1717
1771
  var a = e.indexOf("|", t);
1718
1772
  if (a < 0 || a >= i) return null;
1719
- let o = Z(e, i);
1773
+ let o = $(e, i);
1720
1774
  if (o >= e.length) return null;
1721
- let s = bt(e, o);
1722
- if (!ut(e, o, s)) return null;
1775
+ let s = St(e, o);
1776
+ if (!lt(e, o, s)) return null;
1723
1777
  let c = e.slice(t, i), d = e.slice(o, s);
1724
1778
  for (var f = [], h = 0, g = d.length; h < g && (d.charCodeAt(h) === l || d.charCodeAt(h) === u);) h++;
1725
- for (h < g && d.charCodeAt(h) === ce && h++; h < g;) {
1779
+ for (h < g && d.charCodeAt(h) === se && h++; h < g;) {
1726
1780
  for (; h < g && (d.charCodeAt(h) === l || d.charCodeAt(h) === u);) h++;
1727
- if (h >= g || d.charCodeAt(h) === ce) break;
1781
+ if (h >= g || d.charCodeAt(h) === se) break;
1728
1782
  var y = d.charCodeAt(h) === A;
1729
1783
  for (y && h++; h < g && d.charCodeAt(h) === b;) h++;
1730
1784
  var x = h < g && d.charCodeAt(h) === A;
1731
1785
  for (x && h++, f.push(y && x ? "center" : x ? "right" : y ? "left" : null); h < g && (d.charCodeAt(h) === l || d.charCodeAt(h) === u);) h++;
1732
- h < g && d.charCodeAt(h) === ce && h++;
1786
+ h < g && d.charCodeAt(h) === se && h++;
1733
1787
  }
1734
- let S = Gt(c, n, r);
1788
+ let S = Yt(c, n, r);
1735
1789
  if (f.length !== S.length) return null;
1736
- let T = [], E = Z(e, s);
1790
+ let T = [], E = $(e, s);
1737
1791
  for (; E < e.length;) {
1738
- let t = bt(e, E), i = e.slice(E, t);
1739
- if (Tt(e, E, t)) break;
1740
- if (wt(e, E, t), Q < 4) {
1741
- var D = e.charCodeAt(E + $);
1742
- if (D === _ || D === v || (D === b || D === C || D === w) && Ot(e, E)) break;
1792
+ let t = St(e, E), i = e.slice(E, t);
1793
+ if (kt(e, E, t)) break;
1794
+ if (Ot(e, E, t), Et < 4) {
1795
+ var D = e.charCodeAt(E + Dt);
1796
+ if (D === _ || D === v || (D === b || D === C || D === w) && Mt(e, E)) break;
1743
1797
  if (D === p || D === m) {
1744
- for (var O = E + $, k = 0; O < t && e.charCodeAt(O) === D;) k++, O++;
1798
+ for (var O = E + Dt, k = 0; O < t && e.charCodeAt(O) === D;) k++, O++;
1745
1799
  if (k >= 3) break;
1746
1800
  }
1747
1801
  }
1748
- T.push(Gt(i, n, r)), E = Z(e, t);
1802
+ T.push(Yt(i, n, r)), E = $(e, t);
1749
1803
  }
1750
1804
  if ((r.streaming || r.optimizeForStreaming) && T.length === 0) return null;
1751
1805
  for (var j = S.length, M = 0; M < T.length; M++) if (T[M].length < j) for (; T[M].length < j;) T[M].push([]);
1752
1806
  else T[M].length > j && (T[M].length = j);
1753
1807
  return {
1754
1808
  node: {
1755
- type: W.table,
1809
+ type: K.table,
1756
1810
  header: S,
1757
1811
  cells: T,
1758
1812
  align: f
@@ -1760,19 +1814,19 @@ function Kt(e, t, n, r) {
1760
1814
  end: E
1761
1815
  };
1762
1816
  }
1763
- function qt(e, t, n) {
1764
- if (wt(e, t, bt(e, t)), Q > 3) return null;
1765
- var r = t + $;
1817
+ function Zt(e, t, n) {
1818
+ if (Ot(e, t, St(e, t)), Et > 3) return null;
1819
+ var r = t + Dt;
1766
1820
  if (e.charCodeAt(r) !== h) return null;
1767
- if (r + 1 < e.length && e.charCodeAt(r + 1) === g) return Jt(e, r, n) || null;
1821
+ if (r + 1 < e.length && e.charCodeAt(r + 1) === g) return Qt(e, r, n) || null;
1768
1822
  n.refs ||= {};
1769
- var i = pt(e, r, n.refs);
1823
+ var i = ft(e, r, n.refs);
1770
1824
  return i === null ? null : {
1771
- node: { type: W.refCollection },
1825
+ node: { type: K.refCollection },
1772
1826
  end: i
1773
1827
  };
1774
1828
  }
1775
- function Jt(e, t, n) {
1829
+ function Qt(e, t, n) {
1776
1830
  var r = e.length;
1777
1831
  if (e.charCodeAt(t) !== h || t + 1 >= r || e.charCodeAt(t + 1) !== g) return null;
1778
1832
  for (var i = t + 2, a = i; i < r && e.charCodeAt(i) !== D;) {
@@ -1787,12 +1841,12 @@ function Jt(e, t, n) {
1787
1841
  var s = e.indexOf("\n", i);
1788
1842
  s < 0 && (s = r);
1789
1843
  for (var c = e.slice(i, s).trim(), d = s < r ? s + 1 : r; d < r;) {
1790
- var p = bt(e, d);
1791
- if (wt(e, d, p), Q >= 2 && !Tt(e, d, p)) c += "\n" + e.slice(d, p), d = Z(e, p);
1792
- else if (Tt(e, d, p)) {
1793
- var m = Z(e, p);
1794
- if (m < r && (wt(e, m, bt(e, m)), Q >= 2)) {
1795
- c += "\n", d = Z(e, p);
1844
+ var p = St(e, d);
1845
+ if (Ot(e, d, p), Et >= 2 && !kt(e, d, p)) c += "\n" + e.slice(d, p), d = $(e, p);
1846
+ else if (kt(e, d, p)) {
1847
+ var m = $(e, p);
1848
+ if (m < r && (Ot(e, m, St(e, m)), Et >= 2)) {
1849
+ c += "\n", d = $(e, p);
1796
1850
  continue;
1797
1851
  }
1798
1852
  break;
@@ -1802,101 +1856,101 @@ function Jt(e, t, n) {
1802
1856
  target: c,
1803
1857
  title: void 0
1804
1858
  }), {
1805
- node: { type: W.footnote },
1859
+ node: { type: K.footnote },
1806
1860
  end: d
1807
1861
  };
1808
1862
  }
1809
- function Yt(e, t, n, r) {
1863
+ function $t(e, t, n, r) {
1810
1864
  let i = t, a = 0, o = 0, s = -1;
1811
1865
  for (; i < e.length;) {
1812
- let t = s >= 0 ? s : bt(e, i);
1813
- if (s = -1, Tt(e, i, t)) break;
1814
- if (wt(e, i, t), Q < 4 && o > 0 && !n.g) {
1815
- let n = e.charCodeAt(i + $);
1866
+ let t = s >= 0 ? s : St(e, i);
1867
+ if (s = -1, kt(e, i, t)) break;
1868
+ if (Ot(e, i, t), Et < 4 && o > 0 && !n.g) {
1869
+ let n = e.charCodeAt(i + Dt);
1816
1870
  if (n === x || n === b) {
1817
- let r = i + $;
1871
+ let r = i + Dt;
1818
1872
  for (; r < t && e.charCodeAt(r) === n;) r++;
1819
1873
  for (; r < t && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
1820
1874
  if (r >= t) {
1821
- a = n === x ? 1 : 2, i = Z(e, t);
1875
+ a = n === x ? 1 : 2, i = $(e, t);
1822
1876
  break;
1823
1877
  }
1824
1878
  }
1825
1879
  }
1826
1880
  o = t;
1827
- let d = Z(e, t);
1881
+ let d = $(e, t);
1828
1882
  if (d < e.length) {
1829
- if (e.charCodeAt(d) === pe) {
1830
- var c = bt(e, d);
1831
- i = Z(e, c), o = c;
1883
+ if (e.charCodeAt(d) === fe) {
1884
+ var c = St(e, d);
1885
+ i = $(e, c), o = c;
1832
1886
  continue;
1833
1887
  }
1834
- let t = bt(e, d);
1835
- if (s = t, wt(e, d, t), Q < 4) {
1836
- let a = e.charCodeAt(d + $);
1888
+ let t = St(e, d);
1889
+ if (s = t, Ot(e, d, t), Et < 4) {
1890
+ let a = e.charCodeAt(d + Dt);
1837
1891
  if (a === _) {
1838
1892
  i = d;
1839
1893
  break;
1840
1894
  }
1841
- if (a === v && Et(e, d, n, r)) {
1895
+ if (a === v && At(e, d, n, r)) {
1842
1896
  i = d;
1843
1897
  break;
1844
1898
  }
1845
1899
  if (a === p || a === m) {
1846
- for (var h = d + $, g = 0; h < t && e.charCodeAt(h) === a;) g++, h++;
1900
+ for (var h = d + Dt, g = 0; h < t && e.charCodeAt(h) === a;) g++, h++;
1847
1901
  if (g >= 3) {
1848
1902
  i = d;
1849
1903
  break;
1850
1904
  }
1851
1905
  }
1852
1906
  if (a === T) {
1853
- var y = d + $ + 1, S = y < t ? e.charCodeAt(y) : 0, E = S === O || S === ne;
1854
- if (!E && S === ie) {
1855
- for (var D = y + 1, k = D; k < t && (e.charCodeAt(k) >= H && e.charCodeAt(k) <= U || e.charCodeAt(k) >= he && e.charCodeAt(k) <= ge || e.charCodeAt(k) >= B && e.charCodeAt(k) <= V || e.charCodeAt(k) === b);) k++;
1856
- k > D && (E = Lt.has(e.slice(D, k).toLowerCase()));
1907
+ var y = d + Dt + 1, S = y < t ? e.charCodeAt(y) : 0, E = S === O || S === re;
1908
+ if (!E && S === ae) {
1909
+ for (var D = y + 1, k = D; k < t && (e.charCodeAt(k) >= U && e.charCodeAt(k) <= W || e.charCodeAt(k) >= G && e.charCodeAt(k) <= me || e.charCodeAt(k) >= V && e.charCodeAt(k) <= H || e.charCodeAt(k) === b);) k++;
1910
+ k > D && (E = Vt.has(e.slice(D, k).toLowerCase()));
1857
1911
  } else if (!E) {
1858
- for (var A = y; A < t && (e.charCodeAt(A) >= H && e.charCodeAt(A) <= U || e.charCodeAt(A) >= he && e.charCodeAt(A) <= ge || e.charCodeAt(A) >= B && e.charCodeAt(A) <= V || e.charCodeAt(A) === b);) A++;
1912
+ for (var A = y; A < t && (e.charCodeAt(A) >= U && e.charCodeAt(A) <= W || e.charCodeAt(A) >= G && e.charCodeAt(A) <= me || e.charCodeAt(A) >= V && e.charCodeAt(A) <= H || e.charCodeAt(A) === b);) A++;
1859
1913
  if (A > y) {
1860
1914
  var j = e.slice(y, A).toLowerCase();
1861
- E = Lt.has(j) || tt.has(j);
1915
+ E = Vt.has(j) || et.has(j);
1862
1916
  }
1863
1917
  }
1864
- if (E && Ut(e, d, n, r)) {
1918
+ if (E && qt(e, d, n, r)) {
1865
1919
  i = d;
1866
1920
  break;
1867
1921
  }
1868
1922
  }
1869
- if (a === b || a === C || a === se) {
1870
- let n = d + $ + 1;
1871
- if (n < t && (e.charCodeAt(n) === l || e.charCodeAt(n) === u) && xt(e, n, t) < t && !Ot(e, d)) {
1923
+ if (a === b || a === C || a === oe) {
1924
+ let n = d + Dt + 1;
1925
+ if (n < t && (e.charCodeAt(n) === l || e.charCodeAt(n) === u) && Ct(e, n, t) < t && !Mt(e, d)) {
1872
1926
  i = d;
1873
1927
  break;
1874
1928
  }
1875
1929
  }
1876
- if (a >= B && a <= V) {
1877
- let n = d + $;
1878
- for (; n < t && e.charCodeAt(n) >= B && e.charCodeAt(n) <= V;) n++;
1879
- if (n < t && (e.charCodeAt(n) === re || e.charCodeAt(n) === fe) && n - (d + $) === 1 && e.charCodeAt(d + $) === 49) {
1930
+ if (a >= V && a <= H) {
1931
+ let n = d + Dt;
1932
+ for (; n < t && e.charCodeAt(n) >= V && e.charCodeAt(n) <= H;) n++;
1933
+ if (n < t && (e.charCodeAt(n) === ie || e.charCodeAt(n) === de) && n - (d + Dt) === 1 && e.charCodeAt(d + Dt) === 49) {
1880
1934
  var M = n + 1;
1881
- if (M < t && (e.charCodeAt(M) === l || e.charCodeAt(M) === u) && xt(e, M, t) < t) {
1935
+ if (M < t && (e.charCodeAt(M) === l || e.charCodeAt(M) === u) && Ct(e, M, t) < t) {
1882
1936
  i = d;
1883
1937
  break;
1884
1938
  }
1885
1939
  }
1886
1940
  }
1887
- if (a === ce) {
1888
- let n = Z(e, t);
1889
- if (n < e.length && ut(e, n, bt(e, n))) {
1941
+ if (a === se) {
1942
+ let n = $(e, t);
1943
+ if (n < e.length && lt(e, n, St(e, n))) {
1890
1944
  i = d;
1891
1945
  break;
1892
1946
  }
1893
1947
  }
1894
- if ((a === b || a === C || a === w) && Ot(e, d)) {
1948
+ if ((a === b || a === C || a === w) && Mt(e, d)) {
1895
1949
  if (a !== b) {
1896
1950
  i = d;
1897
1951
  break;
1898
1952
  }
1899
- let n = 0, r = d + $;
1953
+ let n = 0, r = d + Dt;
1900
1954
  for (; r < t && e.charCodeAt(r) === b;) n++, r++;
1901
1955
  for (; r < t && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
1902
1956
  if (r < t) {
@@ -1906,25 +1960,25 @@ function Yt(e, t, n, r) {
1906
1960
  }
1907
1961
  }
1908
1962
  }
1909
- i = Z(e, t);
1963
+ i = $(e, t);
1910
1964
  }
1911
1965
  for (var N = a ? o : i; N > t && (e.charCodeAt(N - 1) === f || e.charCodeAt(N - 1) === d || e.charCodeAt(N - 1) === l || e.charCodeAt(N - 1) === u);) N--;
1912
1966
  for (var P = t; P < N && (e.charCodeAt(P) === l || e.charCodeAt(P) === u);) P++;
1913
1967
  if (P >= N) return null;
1914
- for (var F = !1, I = P; I < N; I++) if (e.charCodeAt(I) === pe) {
1968
+ for (var F = !1, I = P; I < N; I++) if (e.charCodeAt(I) === fe) {
1915
1969
  F = !0;
1916
1970
  break;
1917
1971
  }
1918
- var L = F ? e.slice(P, N).replace(/\u001E/g, "") : e.slice(P, N);
1919
- if (!L) return null;
1920
- let R = Xt(L, 0, L.length, n, r);
1972
+ var ee = F ? e.slice(P, N).replace(/\u001E/g, "") : e.slice(P, N);
1973
+ if (!ee) return null;
1974
+ let L = en(ee, 0, ee.length, n, r);
1921
1975
  if (a) {
1922
- let e = (r?.slugify || Y)(L);
1976
+ let e = (r?.slugify || Z)(ee);
1923
1977
  return {
1924
1978
  node: {
1925
- type: W.heading,
1979
+ type: K.heading,
1926
1980
  level: a,
1927
- children: R,
1981
+ children: L,
1928
1982
  id: e
1929
1983
  },
1930
1984
  end: i
@@ -1932,19 +1986,19 @@ function Yt(e, t, n, r) {
1932
1986
  }
1933
1987
  return {
1934
1988
  node: {
1935
- type: W.paragraph,
1936
- children: R
1989
+ type: K.paragraph,
1990
+ children: L
1937
1991
  },
1938
1992
  end: i
1939
1993
  };
1940
1994
  }
1941
- function Xt(e, t, n, r, i) {
1995
+ function en(e, t, n, r, i) {
1942
1996
  var a = e.indexOf("\n", t);
1943
- if (a < 0 || a >= n) return vn(e, t, n, r, i);
1997
+ if (a < 0 || a >= n) return Sn(e, t, n, r, i);
1944
1998
  for (var o = "", s = t, c = t; c < n;) {
1945
1999
  var u = e.charCodeAt(c);
1946
2000
  if (u === p) {
1947
- var d = Qt(e, c, n);
2001
+ var d = nn(e, c, n);
1948
2002
  if (d > c) {
1949
2003
  for (var m = !1, h = c; h < d; h++) if (e.charCodeAt(h) === f) {
1950
2004
  m = !0;
@@ -1955,7 +2009,7 @@ function Xt(e, t, n, r, i) {
1955
2009
  }
1956
2010
  }
1957
2011
  if (u === T) {
1958
- var g = $t(e, c, n);
2012
+ var g = rn(e, c, n);
1959
2013
  if (g > c) {
1960
2014
  c = g;
1961
2015
  continue;
@@ -1979,20 +2033,20 @@ function Xt(e, t, n, r, i) {
1979
2033
  }
1980
2034
  c++;
1981
2035
  }
1982
- return s < n && (o += e.slice(s, n)), vn(o, 0, o.length, r, i);
2036
+ return s < n && (o += e.slice(s, n)), Sn(o, 0, o.length, r, i);
1983
2037
  }
1984
- function Zt(e, t, n) {
2038
+ function tn(e, t, n) {
1985
2039
  if (e.charCodeAt(t) !== p) return null;
1986
- let r = Ct(e, t, n, 96), i = t + r;
2040
+ let r = Tt(e, t, n, 96), i = t + r;
1987
2041
  for (; i < n;) {
1988
2042
  let a = e.indexOf("`", i);
1989
2043
  if (a < 0 || a >= n) return null;
1990
- let o = Ct(e, a, n, 96);
2044
+ let o = Tt(e, a, n, 96);
1991
2045
  if (o === r) {
1992
2046
  let n = e.slice(t + r, a);
1993
2047
  return n = n.replace(/\n/g, " "), n.length > 0 && n[0] === " " && n[n.length - 1] === " " && n.trim().length > 0 && (n = n.slice(1, -1)), {
1994
2048
  node: {
1995
- type: W.codeInline,
2049
+ type: K.codeInline,
1996
2050
  text: n
1997
2051
  },
1998
2052
  end: a + o
@@ -2002,21 +2056,21 @@ function Zt(e, t, n) {
2002
2056
  }
2003
2057
  return null;
2004
2058
  }
2005
- function Qt(e, t, n) {
2059
+ function nn(e, t, n) {
2006
2060
  if (e.charCodeAt(t) !== p) return t;
2007
- let r = Ct(e, t, n, 96), i = t + r;
2061
+ let r = Tt(e, t, n, 96), i = t + r;
2008
2062
  for (; i < n;) {
2009
2063
  let a = e.indexOf("`", i);
2010
2064
  if (a < 0 || a >= n) return t;
2011
- let o = Ct(e, a, n, 96);
2065
+ let o = Tt(e, a, n, 96);
2012
2066
  if (o === r) return a + o;
2013
2067
  i = a + o;
2014
2068
  }
2015
2069
  return t;
2016
2070
  }
2017
- function $t(e, t, n) {
2071
+ function rn(e, t, n) {
2018
2072
  if (e.charCodeAt(t) !== T) return t;
2019
- if (t + 1 < n && e.charCodeAt(t + 1) === ie) {
2073
+ if (t + 1 < n && e.charCodeAt(t + 1) === ae) {
2020
2074
  let r = t + 2;
2021
2075
  for (; r < n && e.charCodeAt(r) !== _;) r++;
2022
2076
  return r < n ? r + 1 : t;
@@ -2028,7 +2082,7 @@ function $t(e, t, n) {
2028
2082
  let r = t + 1, i = r;
2029
2083
  for (; r < n;) {
2030
2084
  let t = e.charCodeAt(r);
2031
- if (t >= H && t <= U || t >= he && t <= ge || t >= B && t <= V || t === b) r++;
2085
+ if (t >= U && t <= W || t >= G && t <= me || t >= V && t <= H || t === b) r++;
2032
2086
  else break;
2033
2087
  }
2034
2088
  if (r === i) return t;
@@ -2039,11 +2093,11 @@ function $t(e, t, n) {
2039
2093
  r++;
2040
2094
  break;
2041
2095
  }
2042
- if (i === ie && r + 1 < n && e.charCodeAt(r + 1) === _) {
2096
+ if (i === ae && r + 1 < n && e.charCodeAt(r + 1) === _) {
2043
2097
  r += 2, o = !0;
2044
2098
  break;
2045
2099
  }
2046
- if (i === oe || i === ae) {
2100
+ if (i === B || i === z) {
2047
2101
  var s = i;
2048
2102
  for (r++; r < n && e.charCodeAt(r) !== s;) r++;
2049
2103
  r < n && r++;
@@ -2052,11 +2106,11 @@ function $t(e, t, n) {
2052
2106
  if (i === f) return t;
2053
2107
  r++;
2054
2108
  }
2055
- if (o || De(a)) return r;
2109
+ if (o || Te(a)) return r;
2056
2110
  let c = 1;
2057
- for (; r < n && c > 0;) if (e.charCodeAt(r) === T) if (r + 1 < n && e.charCodeAt(r + 1) === ie) {
2111
+ for (; r < n && c > 0;) if (e.charCodeAt(r) === T) if (r + 1 < n && e.charCodeAt(r + 1) === ae) {
2058
2112
  let t = r + 2, i = t;
2059
- for (; i < n && (e.charCodeAt(i) >= H && e.charCodeAt(i) <= U || e.charCodeAt(i) >= he && e.charCodeAt(i) <= ge);) i++;
2113
+ for (; i < n && (e.charCodeAt(i) >= U && e.charCodeAt(i) <= W || e.charCodeAt(i) >= G && e.charCodeAt(i) <= me);) i++;
2060
2114
  if (e.slice(t, i).toLowerCase() === a) {
2061
2115
  for (; i < n && e.charCodeAt(i) !== _;) i++;
2062
2116
  if (i < n && i++, c--, c === 0) return i;
@@ -2064,29 +2118,29 @@ function $t(e, t, n) {
2064
2118
  r = i;
2065
2119
  } else {
2066
2120
  let t = r + 1, i = t;
2067
- for (; i < n && (e.charCodeAt(i) >= H && e.charCodeAt(i) <= U || e.charCodeAt(i) >= he && e.charCodeAt(i) <= ge);) i++;
2121
+ for (; i < n && (e.charCodeAt(i) >= U && e.charCodeAt(i) <= W || e.charCodeAt(i) >= G && e.charCodeAt(i) <= me);) i++;
2068
2122
  e.slice(t, i).toLowerCase() === a && c++, r++;
2069
2123
  }
2070
2124
  else r++;
2071
2125
  return r;
2072
2126
  }
2073
- function en(e, t, n, r, i) {
2127
+ function an(e, t, n, r, i) {
2074
2128
  if (e.charCodeAt(t) !== m || t + 1 >= n || e.charCodeAt(t + 1) !== m) return null;
2075
2129
  let a = t + 2;
2076
2130
  for (; a + 1 < n;) {
2077
2131
  let o = e.charCodeAt(a);
2078
2132
  if (o === p) {
2079
- let t = Qt(e, a, n);
2133
+ let t = nn(e, a, n);
2080
2134
  if (t > a) {
2081
2135
  a = t;
2082
2136
  continue;
2083
2137
  }
2084
2138
  }
2085
2139
  if (o === m && e.charCodeAt(a + 1) === m) {
2086
- let n = e.slice(t + 2, a), o = vn(n, 0, n.length, r, i);
2140
+ let n = e.slice(t + 2, a), o = Sn(n, 0, n.length, r, i);
2087
2141
  return {
2088
2142
  node: {
2089
- type: W.textFormatted,
2143
+ type: K.textFormatted,
2090
2144
  tag: "del",
2091
2145
  children: o
2092
2146
  },
@@ -2097,23 +2151,23 @@ function en(e, t, n, r, i) {
2097
2151
  }
2098
2152
  return null;
2099
2153
  }
2100
- function tn(e, t, n, r, i) {
2154
+ function on(e, t, n, r, i) {
2101
2155
  if (e.charCodeAt(t) !== x || t + 1 >= n || e.charCodeAt(t + 1) !== x) return null;
2102
2156
  let a = t + 2;
2103
2157
  for (; a + 1 < n;) {
2104
2158
  let o = e.charCodeAt(a);
2105
2159
  if (o === p) {
2106
- let t = Qt(e, a, n);
2160
+ let t = nn(e, a, n);
2107
2161
  if (t > a) {
2108
2162
  a = t;
2109
2163
  continue;
2110
2164
  }
2111
2165
  }
2112
2166
  if (o === x && e.charCodeAt(a + 1) === x && a > t + 2) {
2113
- let n = e.slice(t + 2, a), o = vn(n, 0, n.length, r, i);
2167
+ let n = e.slice(t + 2, a), o = Sn(n, 0, n.length, r, i);
2114
2168
  return {
2115
2169
  node: {
2116
- type: W.textFormatted,
2170
+ type: K.textFormatted,
2117
2171
  tag: "mark",
2118
2172
  children: o
2119
2173
  },
@@ -2124,25 +2178,25 @@ function tn(e, t, n, r, i) {
2124
2178
  }
2125
2179
  return null;
2126
2180
  }
2127
- function nn(e, t, n) {
2128
- return e < _e ? !!(vt(e) & Ae) : Be.test(t[n]);
2181
+ function sn(e, t, n) {
2182
+ return e < he ? !!(_t(e) & Oe) : Re.test(t[n]);
2129
2183
  }
2130
- function rn(e, t, n) {
2131
- return e < _e ? !!(vt(e) & Oe) : Ve.test(t[n]);
2184
+ function cn(e, t, n) {
2185
+ return e < he ? !!(_t(e) & Ee) : ze.test(t[n]);
2132
2186
  }
2133
- function an(e, t, n) {
2187
+ function ln(e, t, n) {
2134
2188
  var r = e.charCodeAt(t);
2135
2189
  if (r !== C && r !== w) return null;
2136
- var i = Ct(e, t, n, r);
2190
+ var i = Tt(e, t, n, r);
2137
2191
  if (i === 0) return null;
2138
- var a = t > 0 ? e.charCodeAt(t - 1) : 32, o = t + i < n ? e.charCodeAt(t + i) : 32, s = rn(a, e, t - 1), c = rn(o, e, t + i), l = t > 0 ? nn(a, e, t - 1) : !1, u = t + i < n ? nn(o, e, t + i) : !1, d = !c && (!u || s || l), f = !s && (!l || c || u), p, m;
2192
+ var a = t > 0 ? e.charCodeAt(t - 1) : 32, o = t + i < n ? e.charCodeAt(t + i) : 32, s = cn(a, e, t - 1), c = cn(o, e, t + i), l = t > 0 ? sn(a, e, t - 1) : !1, u = t + i < n ? sn(o, e, t + i) : !1, d = !c && (!u || s || l), f = !s && (!l || c || u), p, m;
2139
2193
  return r === C ? (p = d, m = f) : (p = d && (!f || l), m = f && (!d || u)), {
2140
2194
  len: i,
2141
2195
  canOpen: p,
2142
2196
  canClose: m
2143
2197
  };
2144
2198
  }
2145
- function on(e, t, n, r) {
2199
+ function un(e, t, n, r) {
2146
2200
  if (t.length !== 0) {
2147
2201
  for (var i = [], a = 0; a < 12; a++) i[a] = -1;
2148
2202
  for (var o = 0; o < t.length;) {
@@ -2151,7 +2205,7 @@ function on(e, t, n, r) {
2151
2205
  o++;
2152
2206
  continue;
2153
2207
  }
2154
- for (var c = (s.ch === C ? 0 : 1) * 6 + s.len % 3 * 2 + (s.canOpen ? 1 : 0), l = i[c] === void 0 ? -1 : i[c], u = -1, d = o - 1; d > l; d--) {
2208
+ for (var c = (s.ch === C ? 0 : 1) * 6 + s.len % 3 * 2 + +!!s.canOpen, l = i[c] === void 0 ? -1 : i[c], u = -1, d = o - 1; d > l; d--) {
2155
2209
  var f = t[d];
2156
2210
  if (!(!f.active || f.ch !== s.ch || !f.canOpen) && !((s.canOpen || f.canClose) && (f.len + s.len) % 3 == 0 && f.len % 3 != 0)) {
2157
2211
  u = d;
@@ -2167,7 +2221,7 @@ function on(e, t, n, r) {
2167
2221
  var g = e[p.idx], _ = e[s.idx];
2168
2222
  g.text = g.text.slice(0, g.text.length - h), _.text = _.text.slice(h);
2169
2223
  var v = p.idx + 1, y = s.idx, b = e.slice(v, y), x = {
2170
- type: W.textFormatted,
2224
+ type: K.textFormatted,
2171
2225
  tag: m ? "strong" : "em",
2172
2226
  children: b
2173
2227
  };
@@ -2190,10 +2244,10 @@ function on(e, t, n, r) {
2190
2244
  }
2191
2245
  for (var k = 0, A = 0; A < e.length; A++) {
2192
2246
  var j = e[A];
2193
- if (j.type === W.text) {
2247
+ if (j.type === K.text) {
2194
2248
  var M = j;
2195
2249
  if (M.text === "") continue;
2196
- if (k > 0 && e[k - 1].type === W.text) {
2250
+ if (k > 0 && e[k - 1].type === K.text) {
2197
2251
  e[k - 1].text += M.text;
2198
2252
  continue;
2199
2253
  }
@@ -2203,7 +2257,7 @@ function on(e, t, n, r) {
2203
2257
  e.length = k;
2204
2258
  }
2205
2259
  }
2206
- function sn(e, t, n, r, i) {
2260
+ function dn(e, t, n, r, i) {
2207
2261
  let a = e.charCodeAt(t) === O, o = a ? t + 1 : t;
2208
2262
  if (e.charCodeAt(o) !== h) return null;
2209
2263
  var s = e.indexOf("]", o + 1);
@@ -2215,19 +2269,19 @@ function sn(e, t, n, r, i) {
2215
2269
  continue;
2216
2270
  }
2217
2271
  if (d === p) {
2218
- var m = Qt(e, c, n);
2272
+ var m = nn(e, c, n);
2219
2273
  if (m > c) {
2220
2274
  c = m;
2221
2275
  continue;
2222
2276
  }
2223
2277
  }
2224
2278
  if (d === T) {
2225
- var g = cn(e, c, n);
2279
+ var g = fn(e, c, n);
2226
2280
  if (g) {
2227
2281
  c = g.end;
2228
2282
  continue;
2229
2283
  }
2230
- var v = $t(e, c, n);
2284
+ var v = rn(e, c, n);
2231
2285
  if (v > c) {
2232
2286
  c = v;
2233
2287
  continue;
@@ -2237,7 +2291,7 @@ function sn(e, t, n, r, i) {
2237
2291
  }
2238
2292
  if (u !== 0) return null;
2239
2293
  var y = c - 1, b = e.slice(o + 1, y), x = c < n ? e.charCodeAt(c) : 0, C = !1;
2240
- if (x === de) {
2294
+ if (x === ue) {
2241
2295
  var w = !0;
2242
2296
  for (c++; c < n && (e.charCodeAt(c) === l || e.charCodeAt(c) === f);) c++;
2243
2297
  var E = "", k = c;
@@ -2261,8 +2315,8 @@ function sn(e, t, n, r, i) {
2261
2315
  k += 2;
2262
2316
  continue;
2263
2317
  }
2264
- if (j === de) A++;
2265
- else if (j === fe) {
2318
+ if (j === ue) A++;
2319
+ else if (j === de) {
2266
2320
  if (A === 0) break;
2267
2321
  A--;
2268
2322
  } else if (j === l || j === f) break;
@@ -2275,8 +2329,8 @@ function sn(e, t, n, r, i) {
2275
2329
  var M;
2276
2330
  if (c < n) {
2277
2331
  var N = e.charCodeAt(c);
2278
- if (N === oe || N === ae || N === de) {
2279
- var P = N === de ? 41 : N;
2332
+ if (N === B || N === z || N === ue) {
2333
+ var P = N === ue ? 41 : N;
2280
2334
  c++;
2281
2335
  for (var F = c; c < n && e.charCodeAt(c) !== P;) e.charCodeAt(c) === S && c + 1 < n && c++, c++;
2282
2336
  c >= n ? w = !1 : (M = e.slice(F, c), c++);
@@ -2284,97 +2338,97 @@ function sn(e, t, n, r, i) {
2284
2338
  }
2285
2339
  if (w) {
2286
2340
  for (; c < n && (e.charCodeAt(c) === l || e.charCodeAt(c) === f);) c++;
2287
- (c >= n || e.charCodeAt(c) !== fe) && (w = !1);
2341
+ (c >= n || e.charCodeAt(c) !== de) && (w = !1);
2288
2342
  }
2289
2343
  }
2290
2344
  if (w) {
2291
- c++, E = yt(E), M !== void 0 && (M = Se(yt(M)));
2292
- var I = (i?.sanitizer || we)(E, a ? "img" : "a", a ? "src" : "href") === null ? null : E;
2345
+ c++, E = vt(E), M !== void 0 && (M = be(vt(M)));
2346
+ var I = (i?.sanitizer || Se)(E, a ? "img" : "a", a ? "src" : "href") === null ? null : E;
2293
2347
  if (a) {
2294
- var L = pn(vn(b, 0, b.length, r, i));
2348
+ var ee = _n(Sn(b, 0, b.length, r, i));
2295
2349
  return {
2296
2350
  node: {
2297
- type: W.image,
2351
+ type: K.image,
2298
2352
  target: I,
2299
- alt: L,
2353
+ alt: ee,
2300
2354
  title: M
2301
2355
  },
2302
2356
  end: c
2303
2357
  };
2304
2358
  } else {
2305
- var R = r.inAnchor;
2359
+ var L = r.inAnchor;
2306
2360
  r.inAnchor = !0;
2307
- var ee = R ? [{
2308
- type: W.text,
2361
+ var R = L ? [{
2362
+ type: K.text,
2309
2363
  text: b
2310
- }] : vn(b, 0, b.length, r, i);
2311
- return r.inAnchor = R, !r.inAnchor && fn(ee) ? null : {
2364
+ }] : Sn(b, 0, b.length, r, i);
2365
+ return r.inAnchor = L, !r.inAnchor && gn(R) ? null : {
2312
2366
  node: {
2313
- type: W.link,
2367
+ type: K.link,
2314
2368
  target: I,
2315
2369
  title: M,
2316
- children: ee
2370
+ children: R
2317
2371
  },
2318
2372
  end: c
2319
2373
  };
2320
2374
  }
2321
2375
  } else c = y + 1, C = !0;
2322
2376
  }
2323
- var te = "", z = c;
2377
+ var te = "", ne = c;
2324
2378
  if (!C && x === h) {
2325
- var ne = c + 1;
2326
- z = ne;
2327
- for (var re = !1; z < n && e.charCodeAt(z) !== D;) {
2328
- if (e.charCodeAt(z) === S && z + 1 < n) {
2329
- z += 2;
2379
+ var re = c + 1;
2380
+ ne = re;
2381
+ for (var ie = !1; ne < n && e.charCodeAt(ne) !== D;) {
2382
+ if (e.charCodeAt(ne) === S && ne + 1 < n) {
2383
+ ne += 2;
2330
2384
  continue;
2331
2385
  }
2332
- if (e.charCodeAt(z) === h) {
2333
- re = !0;
2386
+ if (e.charCodeAt(ne) === h) {
2387
+ ie = !0;
2334
2388
  break;
2335
2389
  }
2336
- z++;
2390
+ ne++;
2337
2391
  }
2338
- if (re || z >= n) return null;
2339
- var ie = e.slice(ne, z);
2340
- if (ie.trim()) te = _t(ie);
2392
+ if (ie || ne >= n) return null;
2393
+ var ae = e.slice(re, ne);
2394
+ if (ae.trim()) te = gt(ae);
2341
2395
  else {
2342
- if (gt(b)) return null;
2343
- te = _t(b);
2396
+ if (ht(b)) return null;
2397
+ te = gt(b);
2344
2398
  }
2345
- z += 1;
2399
+ ne += 1;
2346
2400
  } else {
2347
- if (gt(b)) return null;
2348
- te = _t(b);
2401
+ if (ht(b)) return null;
2402
+ te = gt(b);
2349
2403
  }
2350
- var se = r.refs[te];
2351
- if (!se) return null;
2404
+ var oe = r.refs[te];
2405
+ if (!oe) return null;
2352
2406
  if (a) return {
2353
2407
  node: {
2354
- type: W.image,
2355
- target: se.target,
2356
- alt: pn(vn(b, 0, b.length, r, i)),
2357
- title: se.title
2408
+ type: K.image,
2409
+ target: oe.target,
2410
+ alt: _n(Sn(b, 0, b.length, r, i)),
2411
+ title: oe.title
2358
2412
  },
2359
- end: z
2413
+ end: ne
2360
2414
  };
2361
- var ce = r.inAnchor;
2415
+ var se = r.inAnchor;
2362
2416
  r.inAnchor = !0;
2363
- var ee = ce ? [{
2364
- type: W.text,
2417
+ var R = se ? [{
2418
+ type: K.text,
2365
2419
  text: b
2366
- }] : vn(b, 0, b.length, r, i);
2367
- return r.inAnchor = ce, !r.inAnchor && fn(ee) ? null : {
2420
+ }] : Sn(b, 0, b.length, r, i);
2421
+ return r.inAnchor = se, !r.inAnchor && gn(R) ? null : {
2368
2422
  node: {
2369
- type: W.link,
2370
- target: se.target,
2371
- title: se.title,
2372
- children: ee
2423
+ type: K.link,
2424
+ target: oe.target,
2425
+ title: oe.title,
2426
+ children: R
2373
2427
  },
2374
- end: z
2428
+ end: ne
2375
2429
  };
2376
2430
  }
2377
- function cn(e, t, n) {
2431
+ function fn(e, t, n) {
2378
2432
  if (e.charCodeAt(t) !== T) return null;
2379
2433
  for (var r = t + 1; r < n;) {
2380
2434
  var i = e.charCodeAt(r);
@@ -2386,29 +2440,29 @@ function cn(e, t, n) {
2386
2440
  var a = e.slice(t + 1, r);
2387
2441
  return a.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/) ? {
2388
2442
  node: {
2389
- type: W.link,
2443
+ type: K.link,
2390
2444
  target: a,
2391
2445
  title: void 0,
2392
2446
  children: [{
2393
- type: W.text,
2447
+ type: K.text,
2394
2448
  text: a
2395
2449
  }]
2396
2450
  },
2397
2451
  end: r + 1
2398
2452
  } : a.indexOf("@") !== -1 && /^[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])?)*$/.test(a) ? {
2399
2453
  node: {
2400
- type: W.link,
2454
+ type: K.link,
2401
2455
  target: "mailto:" + a,
2402
2456
  title: void 0,
2403
2457
  children: [{
2404
- type: W.text,
2458
+ type: K.text,
2405
2459
  text: a
2406
2460
  }]
2407
2461
  },
2408
2462
  end: r + 1
2409
2463
  } : null;
2410
2464
  }
2411
- function ln(e, t, n, r) {
2465
+ function pn(e, t, n, r) {
2412
2466
  if (e.charCodeAt(t) !== h || t + 1 >= n || e.charCodeAt(t + 1) !== g) return null;
2413
2467
  let i = t + 2;
2414
2468
  for (; i < n && e.charCodeAt(i) !== D && e.charCodeAt(i) !== f;) i++;
@@ -2416,17 +2470,17 @@ function ln(e, t, n, r) {
2416
2470
  let a = e.slice(t + 2, i);
2417
2471
  return a ? {
2418
2472
  node: {
2419
- type: W.footnoteReference,
2420
- target: "#" + Y(a),
2473
+ type: K.footnoteReference,
2474
+ target: "#" + Z(a),
2421
2475
  text: a
2422
2476
  },
2423
2477
  end: i + 1
2424
2478
  } : null;
2425
2479
  }
2426
- function un(e, t, n, r) {
2480
+ function mn(e, t, n, r) {
2427
2481
  if (r.disableBareUrls) return null;
2428
2482
  var i = "", a = !1, o = e.charCodeAt(t);
2429
- if (o === N || o === 72 ? t + 8 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === F && e.charCodeAt(t + 3) === I && (e.charCodeAt(t + 4) === L && e.charCodeAt(t + 5) === A && e.charCodeAt(t + 6) === ie && e.charCodeAt(t + 7) === ie ? i = "https://" : e.charCodeAt(t + 4) === A && e.charCodeAt(t + 5) === ie && e.charCodeAt(t + 6) === ie && (i = "http://")) : o === M || o === 70 ? t + 6 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === I && e.charCodeAt(t + 3) === A && e.charCodeAt(t + 4) === ie && e.charCodeAt(t + 5) === ie && (i = "ftp://") : (o === P || o === 87) && t + 4 <= n && e.charCodeAt(t + 1) === P && e.charCodeAt(t + 2) === P && e.charCodeAt(t + 3) === re && (i = "www.", a = !0), !i) return null;
2483
+ if (o === N || o === 72 ? t + 8 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === F && e.charCodeAt(t + 3) === I && (e.charCodeAt(t + 4) === ee && e.charCodeAt(t + 5) === A && e.charCodeAt(t + 6) === ae && e.charCodeAt(t + 7) === ae ? i = "https://" : e.charCodeAt(t + 4) === A && e.charCodeAt(t + 5) === ae && e.charCodeAt(t + 6) === ae && (i = "http://")) : o === M || o === 70 ? t + 6 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === I && e.charCodeAt(t + 3) === A && e.charCodeAt(t + 4) === ae && e.charCodeAt(t + 5) === ae && (i = "ftp://") : (o === P || o === 87) && t + 4 <= n && e.charCodeAt(t + 1) === P && e.charCodeAt(t + 2) === P && e.charCodeAt(t + 3) === ie && (i = "www.", a = !0), !i) return null;
2430
2484
  let s = t + i.length;
2431
2485
  for (; s < n;) {
2432
2486
  let t = e.charCodeAt(s);
@@ -2435,73 +2489,73 @@ function un(e, t, n, r) {
2435
2489
  }
2436
2490
  for (var c = 0, p = 0, h = t; h < s; h++) {
2437
2491
  var g = e.charCodeAt(h);
2438
- g === de ? c++ : g === fe && p++;
2492
+ g === ue ? c++ : g === de && p++;
2439
2493
  }
2440
2494
  let v = s;
2441
2495
  for (; v > t + i.length;) {
2442
2496
  let n = e.charCodeAt(v - 1);
2443
- if (n === re || n === te || n === A || n === O || n === ne || n === fe || n === C || n === w || n === m) {
2444
- if (n === fe) {
2497
+ if (n === ie || n === te || n === A || n === O || n === re || n === de || n === C || n === w || n === m) {
2498
+ if (n === de) {
2445
2499
  if (c >= p) break;
2446
2500
  p--;
2447
2501
  }
2448
2502
  v--;
2449
- } else if (n === z) {
2450
- for (var y = v - 2; y > t && (e.charCodeAt(y) >= H && e.charCodeAt(y) <= U || e.charCodeAt(y) >= he && e.charCodeAt(y) <= ge || e.charCodeAt(y) >= B && e.charCodeAt(y) <= V);) y--;
2503
+ } else if (n === ne) {
2504
+ for (var y = v - 2; y > t && (e.charCodeAt(y) >= U && e.charCodeAt(y) <= W || e.charCodeAt(y) >= G && e.charCodeAt(y) <= me || e.charCodeAt(y) >= V && e.charCodeAt(y) <= H);) y--;
2451
2505
  y >= t && e.charCodeAt(y) === k ? v = y : v--;
2452
2506
  } else break;
2453
2507
  }
2454
2508
  if (v <= t + i.length) return null;
2455
2509
  var b = t + (a ? 4 : i.length), x = e.indexOf("/", b);
2456
2510
  if ((x < 0 || x > v) && (x = v), a && e.indexOf(".", b) === -1) return null;
2457
- for (var S = -1, E = -1, D = x - 1; D >= b; D--) if (e.charCodeAt(D) === re) if (S < 0) S = D;
2511
+ for (var S = -1, E = -1, D = x - 1; D >= b; D--) if (e.charCodeAt(D) === ie) if (S < 0) S = D;
2458
2512
  else {
2459
2513
  E = D;
2460
2514
  break;
2461
2515
  }
2462
2516
  for (var D = E >= 0 ? E + 1 : b; D < x; D++) if (e.charCodeAt(D) === w) return null;
2463
- var j = e.slice(t, v), R = a ? "http://" + j : j;
2517
+ var j = e.slice(t, v), L = a ? "http://" + j : j;
2464
2518
  return {
2465
2519
  node: {
2466
- type: W.link,
2467
- target: R,
2520
+ type: K.link,
2521
+ target: L,
2468
2522
  title: void 0,
2469
2523
  children: [{
2470
- type: W.text,
2524
+ type: K.text,
2471
2525
  text: j
2472
2526
  }]
2473
2527
  },
2474
2528
  end: v
2475
2529
  };
2476
2530
  }
2477
- function dn(e, t, n, r) {
2531
+ function hn(e, t, n, r) {
2478
2532
  if (r.disableBareUrls) return null;
2479
2533
  for (var i = t, a = i; i < n;) {
2480
2534
  var o = e.charCodeAt(i);
2481
- if (o >= H && o <= U || o >= he && o <= ge || o >= B && o <= V || o === re || o === O || o === v || o === 36 || o === y || o === k || o === ae || o === C || o === se || o === ie || o === x || o === ne || o === g || o === w || o === p || o === le || o === ce || o === ue || o === m || o === b) i++;
2535
+ if (o >= U && o <= W || o >= G && o <= me || o >= V && o <= H || o === ie || o === O || o === v || o === 36 || o === y || o === k || o === z || o === C || o === oe || o === ae || o === x || o === re || o === g || o === w || o === p || o === ce || o === se || o === le || o === m || o === b) i++;
2482
2536
  else break;
2483
2537
  }
2484
2538
  if (i === a || i >= n || e.charCodeAt(i) !== E) return null;
2485
2539
  i++;
2486
2540
  for (var s = i, c = -1, l = i; i < n;) {
2487
2541
  var o = e.charCodeAt(i);
2488
- if (o >= H && o <= U || o >= he && o <= ge || o >= B && o <= V) i++;
2542
+ if (o >= U && o <= W || o >= G && o <= me || o >= V && o <= H) i++;
2489
2543
  else if ((o === b || o === w) && i > s) i++;
2490
- else if (o === re) {
2544
+ else if (o === ie) {
2491
2545
  if (i === s) break;
2492
2546
  var u = e.charCodeAt(i - 1);
2493
2547
  if (u === b || u === w || i - l > 63) break;
2494
2548
  if (i + 1 < n) {
2495
2549
  var d = e.charCodeAt(i + 1);
2496
- if (d >= H && d <= U || d >= he && d <= ge || d >= B && d <= V) c = i, l = i + 1, i++;
2550
+ if (d >= U && d <= W || d >= G && d <= me || d >= V && d <= H) c = i, l = i + 1, i++;
2497
2551
  else break;
2498
2552
  } else break;
2499
2553
  } else break;
2500
2554
  }
2501
2555
  if (i - l > 63 || c < 0) return null;
2502
2556
  var f = e.charCodeAt(i - 1);
2503
- if (!(f >= H && f <= U || f >= he && f <= ge || f >= B && f <= V) || i <= c + 1) return null;
2504
- for (var h = -1, _ = c - 1; _ >= s; _--) if (e.charCodeAt(_) === re) {
2557
+ if (!(f >= U && f <= W || f >= G && f <= me || f >= V && f <= H) || i <= c + 1) return null;
2558
+ for (var h = -1, _ = c - 1; _ >= s; _--) if (e.charCodeAt(_) === ie) {
2505
2559
  h = _;
2506
2560
  break;
2507
2561
  }
@@ -2509,36 +2563,36 @@ function dn(e, t, n, r) {
2509
2563
  var S = e.slice(t, i);
2510
2564
  return {
2511
2565
  node: {
2512
- type: W.link,
2566
+ type: K.link,
2513
2567
  target: "mailto:" + S,
2514
2568
  title: void 0,
2515
2569
  children: [{
2516
- type: W.text,
2570
+ type: K.text,
2517
2571
  text: S
2518
2572
  }]
2519
2573
  },
2520
2574
  end: i
2521
2575
  };
2522
2576
  }
2523
- function fn(e) {
2524
- for (var t = 0; t < e.length; t++) if (e[t].type === W.link || "children" in e[t] && Array.isArray(e[t].children) && fn(e[t].children)) return !0;
2577
+ function gn(e) {
2578
+ for (var t = 0; t < e.length; t++) if (e[t].type === K.link || "children" in e[t] && Array.isArray(e[t].children) && gn(e[t].children)) return !0;
2525
2579
  return !1;
2526
2580
  }
2527
- function pn(e) {
2581
+ function _n(e) {
2528
2582
  for (var t = "", n = 0; n < e.length; n++) {
2529
2583
  var r = e[n];
2530
- r.type === W.text ? t += r.text : r.type === W.breakLine ? t += " " : r.type === W.codeInline ? t += r.text : "children" in r && Array.isArray(r.children) ? t += pn(r.children) : r.type === W.image ? t += r.alt || "" : r.type === W.link && (t += pn(r.children));
2584
+ r.type === K.text ? t += r.text : r.type === K.breakLine ? t += " " : r.type === K.codeInline ? t += r.text : "children" in r && Array.isArray(r.children) ? t += _n(r.children) : r.type === K.image ? t += r.alt || "" : r.type === K.link && (t += _n(r.children));
2531
2585
  }
2532
2586
  return t;
2533
2587
  }
2534
- function mn(e) {
2535
- let t = e.includes("&") ? Se(e) : e;
2588
+ function vn(e) {
2589
+ let t = e.includes("&") ? be(e) : e;
2536
2590
  return {
2537
- type: W.text,
2591
+ type: K.text,
2538
2592
  text: t
2539
2593
  };
2540
2594
  }
2541
- function hn(e, t, n, r, i) {
2595
+ function yn(e, t, n, r, i) {
2542
2596
  if (e.charCodeAt(t) !== T) return null;
2543
2597
  var a = t + 1;
2544
2598
  if (a >= n) return null;
@@ -2547,7 +2601,7 @@ function hn(e, t, n, r, i) {
2547
2601
  var s = a + 3;
2548
2602
  if (s < n && e.charCodeAt(s) === _) return {
2549
2603
  node: {
2550
- type: W.htmlComment,
2604
+ type: K.htmlComment,
2551
2605
  text: "",
2552
2606
  h: !0
2553
2607
  },
@@ -2555,7 +2609,7 @@ function hn(e, t, n, r, i) {
2555
2609
  };
2556
2610
  if (s + 1 < n && e.charCodeAt(s) === b && e.charCodeAt(s + 1) === _) return {
2557
2611
  node: {
2558
- type: W.htmlComment,
2612
+ type: K.htmlComment,
2559
2613
  text: "-",
2560
2614
  h: !0
2561
2615
  },
@@ -2564,18 +2618,18 @@ function hn(e, t, n, r, i) {
2564
2618
  var c = e.indexOf("-->", s);
2565
2619
  return c !== -1 && c <= n - 3 ? {
2566
2620
  node: {
2567
- type: W.htmlComment,
2621
+ type: K.htmlComment,
2568
2622
  text: e.slice(t + 4, c),
2569
2623
  h: !1
2570
2624
  },
2571
2625
  end: c + 3
2572
2626
  } : null;
2573
2627
  }
2574
- if (o === ne) {
2628
+ if (o === re) {
2575
2629
  var d = e.indexOf("?>", a + 1);
2576
2630
  return d !== -1 && d < n ? {
2577
2631
  node: {
2578
- type: W.htmlSelfClosing,
2632
+ type: K.htmlSelfClosing,
2579
2633
  tag: "?",
2580
2634
  attrs: {},
2581
2635
  a: e.slice(t, d + 2),
@@ -2590,7 +2644,7 @@ function hn(e, t, n, r, i) {
2590
2644
  var m = e.indexOf("]]>", a + 8);
2591
2645
  return m !== -1 && m < n ? {
2592
2646
  node: {
2593
- type: W.htmlSelfClosing,
2647
+ type: K.htmlSelfClosing,
2594
2648
  tag: "![CDATA[",
2595
2649
  attrs: {},
2596
2650
  a: e.slice(t, m + 3),
@@ -2599,11 +2653,11 @@ function hn(e, t, n, r, i) {
2599
2653
  end: m + 3
2600
2654
  } : null;
2601
2655
  }
2602
- if (p >= H && p <= U) {
2656
+ if (p >= U && p <= W) {
2603
2657
  var g = e.indexOf(">", a + 2);
2604
2658
  return g !== -1 && g < n ? {
2605
2659
  node: {
2606
- type: W.htmlSelfClosing,
2660
+ type: K.htmlSelfClosing,
2607
2661
  tag: "!" + e.slice(a + 1, g),
2608
2662
  attrs: {},
2609
2663
  a: e.slice(t, g + 1),
@@ -2613,14 +2667,14 @@ function hn(e, t, n, r, i) {
2613
2667
  } : null;
2614
2668
  }
2615
2669
  }
2616
- if (o === ie) {
2670
+ if (o === ae) {
2617
2671
  var v = a + 1;
2618
2672
  if (v >= n) return null;
2619
2673
  var y = e.charCodeAt(v);
2620
- if (!(y >= H && y <= U || y >= he && y <= ge)) return null;
2674
+ if (!(y >= U && y <= W || y >= G && y <= me)) return null;
2621
2675
  for (v++; v < n;) {
2622
2676
  var x = e.charCodeAt(v);
2623
- if (x >= H && x <= U || x >= he && x <= ge || x >= B && x <= V || x === b) v++;
2677
+ if (x >= U && x <= W || x >= G && x <= me || x >= V && x <= H || x === b) v++;
2624
2678
  else break;
2625
2679
  }
2626
2680
  for (; v < n && (e.charCodeAt(v) === l || e.charCodeAt(v) === u || e.charCodeAt(v) === f);) v++;
@@ -2628,7 +2682,7 @@ function hn(e, t, n, r, i) {
2628
2682
  var S = e.slice(a + 1, v).trim();
2629
2683
  return {
2630
2684
  node: {
2631
- type: W.htmlSelfClosing,
2685
+ type: K.htmlSelfClosing,
2632
2686
  tag: S,
2633
2687
  attrs: {},
2634
2688
  a: e.slice(t, v + 1),
@@ -2639,48 +2693,48 @@ function hn(e, t, n, r, i) {
2639
2693
  }
2640
2694
  return null;
2641
2695
  }
2642
- if (!(o >= H && o <= U || o >= he && o <= ge)) return null;
2643
- var C = dt(e, t);
2696
+ if (!(o >= U && o <= W || o >= G && o <= me)) return null;
2697
+ var C = ut(e, t);
2644
2698
  if (!C) return null;
2645
2699
  var w = C.tag, E = w.toLowerCase();
2646
- if (C.selfClosing || De(w)) return {
2700
+ if (C.selfClosing || Te(w)) return {
2647
2701
  node: {
2648
- type: W.htmlSelfClosing,
2702
+ type: K.htmlSelfClosing,
2649
2703
  tag: w,
2650
- attrs: Rt(C.attrs, w, i),
2704
+ attrs: Ht(C.attrs, w, i),
2651
2705
  a: e.slice(t, C.end),
2652
2706
  b: !1
2653
2707
  },
2654
2708
  end: C.end
2655
2709
  };
2656
- var D = tt.has(E), k = Ht(e.slice(0, n), C.end, w);
2710
+ var D = et.has(E), k = Kt(e.slice(0, n), C.end, w);
2657
2711
  if (k === -1) return {
2658
2712
  node: {
2659
- type: W.htmlSelfClosing,
2713
+ type: K.htmlSelfClosing,
2660
2714
  tag: w,
2661
- attrs: Rt(C.attrs, w, i),
2715
+ attrs: Ht(C.attrs, w, i),
2662
2716
  a: e.slice(t, C.end),
2663
2717
  b: !1
2664
2718
  },
2665
2719
  end: C.end
2666
2720
  };
2667
- var A = Bt(e, "</" + E, k), j = e.slice(C.end, A), M = [];
2721
+ var A = Wt(e, "</" + E, k), j = e.slice(C.end, A), M = [];
2668
2722
  if (D) j.trim() && (M = [{
2669
- type: W.text,
2723
+ type: K.text,
2670
2724
  text: j
2671
2725
  }]);
2672
2726
  else {
2673
2727
  var N = j.trim();
2674
2728
  if (N) {
2675
2729
  var { inAnchor: P, inline: F } = r;
2676
- E === "a" && (r.inAnchor = !0), N.indexOf("\n\n") !== -1 || /^#{1,6}\s/.test(N) ? (r.inline = !1, M = bn(N, r, i)) : M = vn(N, 0, N.length, r, i), r.inAnchor = P, r.inline = F;
2730
+ E === "a" && (r.inAnchor = !0), N.indexOf("\n\n") !== -1 || /^#{1,6}\s/.test(N) ? (r.inline = !1, M = wn(N, r, i)) : M = Sn(N, 0, N.length, r, i), r.inAnchor = P, r.inline = F;
2677
2731
  }
2678
2732
  }
2679
2733
  return {
2680
2734
  node: {
2681
- type: W.htmlBlock,
2735
+ type: K.htmlBlock,
2682
2736
  tag: w,
2683
- attrs: Rt(C.attrs, w, i),
2737
+ attrs: Ht(C.attrs, w, i),
2684
2738
  f: C.rawAttrs,
2685
2739
  children: M,
2686
2740
  a: void 0,
@@ -2693,10 +2747,10 @@ function hn(e, t, n, r, i) {
2693
2747
  end: k
2694
2748
  };
2695
2749
  }
2696
- var gn = 200, _n = 0;
2697
- function vn(e, t, n, r, i) {
2698
- if (_n++, _n > gn) return _n--, [{
2699
- type: W.text,
2750
+ var bn = 200, xn = 0;
2751
+ function Sn(e, t, n, r, i) {
2752
+ if (xn++, xn > bn) return xn--, [{
2753
+ type: K.text,
2700
2754
  text: e.slice(t, n)
2701
2755
  }];
2702
2756
  let a = r;
@@ -2718,8 +2772,8 @@ function vn(e, t, n, r, i) {
2718
2772
  return t[0] - e[0];
2719
2773
  });
2720
2774
  for (var A = 0; A < k.length; A++) {
2721
- var j = k[A][0], F = k[A][1];
2722
- i = i.slice(0, j) + i.slice(j + F);
2775
+ var j = k[A][0], I = k[A][1];
2776
+ i = i.slice(0, j) + i.slice(j + I);
2723
2777
  }
2724
2778
  let g = 0, x = -1;
2725
2779
  for (let e = 0; e < i.length; e++) i.charCodeAt(e) === p && (g++, x = e);
@@ -2728,228 +2782,236 @@ function vn(e, t, n, r, i) {
2728
2782
  for (; n < i.length;) i.charCodeAt(n) === p && (e ? (e = !1, t = -1) : (t = n, e = !0)), n++;
2729
2783
  e && t !== -1 && (i = i.slice(0, t));
2730
2784
  }
2731
- for (var I = !0; I;) {
2732
- I = !1;
2733
- for (var L = -1, R = -1, ee = -1, te = !1, z = 0; z < i.length; z++) if (i.charCodeAt(z) === h && (z === 0 || i.charCodeAt(z - 1) !== S)) {
2734
- var ne = z > 0 && i.charCodeAt(z - 1) === O, re = ne ? z - 1 : z, ae = r(i, z);
2735
- if (ae === -1) L = re, te = ne, R = z + 1, ee = i.length;
2785
+ for (var ee = !0; ee;) {
2786
+ ee = !1;
2787
+ for (var L = -1, R = -1, te = -1, ne = !1, re = 0; re < i.length; re++) if (i.charCodeAt(re) === h && (re === 0 || i.charCodeAt(re - 1) !== S)) {
2788
+ var ie = re > 0 && i.charCodeAt(re - 1) === O, z = ie ? re - 1 : re, B = r(i, re);
2789
+ if (B === -1) L = z, ne = ie, R = re + 1, te = i.length;
2736
2790
  else {
2737
- var oe = ae + 1;
2738
- if (oe >= i.length) L = re, te = ne, R = z + 1, ee = ae;
2739
- else if (i.charCodeAt(oe) === de) {
2791
+ var oe = B + 1;
2792
+ if (oe >= i.length) L = z, ne = ie, R = re + 1, te = B;
2793
+ else if (i.charCodeAt(oe) === ue) {
2740
2794
  var se = i.indexOf(")", oe + 1);
2741
- se === -1 ? (L = re, te = ne, R = z + 1, ee = ae, z = i.length) : z = se;
2795
+ se === -1 ? (L = z, ne = ie, R = re + 1, te = B, re = i.length) : re = se;
2742
2796
  } else if (i.charCodeAt(oe) === h) {
2743
2797
  var ce = i.indexOf("]", oe + 1);
2744
- ce === -1 ? (L = re, te = ne, R = z + 1, ee = ae, z = i.length) : z = ce;
2745
- } else z = ae;
2798
+ ce === -1 ? (L = z, ne = ie, R = re + 1, te = B, re = i.length) : re = ce;
2799
+ } else re = B;
2746
2800
  }
2747
2801
  }
2748
2802
  if (L >= 0) {
2749
- var le = te ? "" : i.slice(R, ee);
2750
- i = i.slice(0, L) + le, I = !0;
2803
+ var le = ne ? "" : i.slice(R, te);
2804
+ i = i.slice(0, L) + le, ee = !0;
2751
2805
  }
2752
2806
  }
2753
2807
  let T = i.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);
2754
2808
  if (T && T.index !== void 0) {
2755
- var ue = T[0].length - T[2].length;
2756
- if (!(ue >= 2 && T[0].charCodeAt(ue - 2) === ie)) {
2757
- for (var fe = !1, pe = 0, ve = 0; ve < T.index; ve++) i.charCodeAt(ve) === p && pe++;
2758
- if (fe = pe % 2 == 1, !fe) {
2809
+ var de = T[0].length - T[2].length;
2810
+ if (!(de >= 2 && T[0].charCodeAt(de - 2) === ae)) {
2811
+ for (var fe = !1, ge = 0, _e = 0; _e < T.index; _e++) i.charCodeAt(_e) === p && ge++;
2812
+ if (fe = ge % 2 == 1, !fe) {
2759
2813
  let e = T[1];
2760
- zt(i, "</" + e, 0) === -1 && (i = i.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/, "$1"));
2814
+ Ut(i, "</" + e, 0) === -1 && (i = i.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/, "$1"));
2761
2815
  }
2762
2816
  }
2763
2817
  }
2764
2818
  i !== a && (e = e.slice(0, t) + i, n = t + i.length);
2765
2819
  }
2766
- let ye = [];
2767
- var be = [];
2768
- let G = t;
2769
- var K = i.disableAutoLink || i.disableBareUrls || a.inAnchor ? -1 : e.indexOf("@", t);
2770
- for (K >= n && (K = -1); t < n;) {
2820
+ let ve = [];
2821
+ var q = [];
2822
+ let J = t;
2823
+ var ye = i.disableAutoLink || i.disableBareUrls || a.inAnchor ? -1 : e.indexOf("@", t);
2824
+ for (ye >= n && (ye = -1); t < n;) {
2771
2825
  let r = e.charCodeAt(t), o = null;
2772
2826
  if (r === p) {
2773
- if (o = Zt(e, t, n), !o) {
2774
- var xe = Ct(e, t, n, p);
2775
- t += xe - 1;
2827
+ if (o = tn(e, t, n), !o) {
2828
+ var be = Tt(e, t, n, p);
2829
+ t += be - 1;
2776
2830
  }
2777
2831
  } else if (r === C || r === w) {
2778
- var Se = an(e, t, n);
2779
- if (Se) {
2780
- if (Se.canOpen || Se.canClose) {
2781
- t > G && ye.push(mn(e.slice(G, t)));
2782
- var Ce = mn(e.slice(t, t + Se.len));
2783
- be.push({
2784
- idx: ye.length,
2832
+ var xe = ln(e, t, n);
2833
+ if (xe) {
2834
+ if (xe.canOpen || xe.canClose) {
2835
+ t > J && ve.push(vn(e.slice(J, t)));
2836
+ var Se = vn(e.slice(t, t + xe.len));
2837
+ q.push({
2838
+ idx: ve.length,
2785
2839
  ch: r,
2786
- len: Se.len,
2787
- canOpen: Se.canOpen,
2788
- canClose: Se.canClose,
2840
+ len: xe.len,
2841
+ canOpen: xe.canOpen,
2842
+ canClose: xe.canClose,
2789
2843
  active: !0
2790
- }), ye.push(Ce), t += Se.len, G = t;
2844
+ }), ve.push(Se), t += xe.len, J = t;
2791
2845
  continue;
2792
2846
  }
2793
- t += Se.len - 1;
2794
- }
2795
- } else r === m ? o = en(e, t, n, a, i) : r === x ? o = tn(e, t, n, a, i) : r === h ? (t + 1 < n && e.charCodeAt(t + 1) === g && (o = ln(e, t, n, a)), o ||= sn(e, t, n, a, i)) : r === O && t + 1 < n && e.charCodeAt(t + 1) === h ? o = sn(e, t, n, a, i) : r === T ? (o = cn(e, t, n), !o && !i.disableParsingRawHTML && !i.ignoreHTMLBlocks && (o = hn(e, t, n, a, i))) : (r === N || r === P || r === M) && !a.inAnchor && !i.disableAutoLink && (t === 0 || e.charCodeAt(t - 1) !== T) && (o = un(e, t, n, i));
2796
- if (!o && K >= 0 && K - t <= 64 && !a.inAnchor && !i.disableAutoLink && !i.disableBareUrls && (r >= H && r <= U || r >= he && r <= ge || r >= B && r <= V) && (o = dn(e, t, n, i), !o && t >= K && (K = e.indexOf("@", t + 1), K >= n && (K = -1))), r === me) {
2797
- t > G && ye.push(mn(e.slice(G, t))), ye.push({ type: W.breakLine }), t++, G = t;
2847
+ t += xe.len - 1;
2848
+ }
2849
+ } else if (r === m) o = an(e, t, n, a, i);
2850
+ else if (r === x) o = on(e, t, n, a, i);
2851
+ else if (r === h) t + 1 < n && e.charCodeAt(t + 1) === g && (o = pn(e, t, n, a)), o ||= dn(e, t, n, a, i);
2852
+ else if (r === O && t + 1 < n && e.charCodeAt(t + 1) === h) o = dn(e, t, n, a, i);
2853
+ else if (r === T) o = fn(e, t, n), !o && !i.disableParsingRawHTML && !i.ignoreHTMLBlocks && (o = yn(e, t, n, a, i));
2854
+ else if ((r === N || r === P || r === M) && !a.inAnchor && !i.disableAutoLink && (t === 0 || e.charCodeAt(t - 1) !== T)) {
2855
+ var Y = t + 1 < n ? e.charCodeAt(t + 1) : 0;
2856
+ (r === N && Y === F || r === M && Y === F || r === P && Y === P) && (o = mn(e, t, n, i));
2857
+ }
2858
+ if (!o && ye >= 0 && ye - t <= 64 && !a.inAnchor && !i.disableAutoLink && !i.disableBareUrls && (r >= U && r <= W || r >= G && r <= me || r >= V && r <= H) && (o = hn(e, t, n, i), !o && t >= ye && (ye = e.indexOf("@", t + 1), ye >= n && (ye = -1))), r === pe) {
2859
+ t > J && ve.push(vn(e.slice(J, t))), ve.push({ type: K.breakLine }), t++, J = t;
2798
2860
  continue;
2799
2861
  }
2800
- if (o) t > G && ye.push(mn(e.slice(G, t))), ye.push(o.node), t = o.end, G = t;
2862
+ if (o) t > J && ve.push(vn(e.slice(J, t))), ve.push(o.node), t = o.end, J = t;
2801
2863
  else {
2802
- if (r === S && t + 1 < n && vt(e.charCodeAt(t + 1)) & Ae) {
2803
- t > G && ye.push(mn(e.slice(G, t))), ye.push(mn(e[t + 1])), t += 2, G = t;
2864
+ if (r === S && t + 1 < n && _t(e.charCodeAt(t + 1)) & Oe) {
2865
+ t > J && ve.push(vn(e.slice(J, t))), ve.push(vn(e[t + 1])), t += 2, J = t;
2804
2866
  continue;
2805
2867
  }
2806
- if (t++, K < 0 || K - t > 64) for (; t < n;) {
2807
- var we = e.charCodeAt(t);
2808
- if (we < _e && !ot[we]) t++;
2868
+ if (t++, ye < 0 || ye - t > 64) for (; t < n;) {
2869
+ var Ce = e.charCodeAt(t);
2870
+ if (Ce < he && !at[Ce]) t++;
2809
2871
  else break;
2810
2872
  }
2811
2873
  }
2812
2874
  }
2813
- if (n > G) {
2814
- let t = e.slice(G, n);
2815
- t && ye.push(mn(t));
2875
+ if (n > J) {
2876
+ let t = e.slice(J, n);
2877
+ t && ve.push(vn(t));
2816
2878
  }
2817
- return be.length > 0 && on(ye, be, r, i), _n--, ye;
2879
+ return q.length > 0 && un(ve, q, r, i), xn--, ve;
2818
2880
  }
2819
- var yn = 500;
2820
- function bn(e, t, n) {
2881
+ var Cn = 500;
2882
+ function wn(e, t, n) {
2821
2883
  var r = t.i || 0;
2822
- if (r > yn) return [{
2823
- type: W.text,
2884
+ if (r > Cn) return [{
2885
+ type: K.text,
2824
2886
  text: e
2825
2887
  }];
2826
2888
  if (t.i = r + 1, (n.streaming || n.optimizeForStreaming) && !t.j) {
2827
2889
  var i = e.length;
2828
2890
  i > 0 && e.charCodeAt(i - 1) === f && i--;
2829
2891
  for (var a = i; a > 0 && e.charCodeAt(a - 1) !== f;) a--;
2830
- if (a > 0 && e.charCodeAt(a) === ce) {
2892
+ if (a > 0 && e.charCodeAt(a) === se) {
2831
2893
  for (var o = !0, s = a; s < i; s++) {
2832
2894
  var c = e.charCodeAt(s);
2833
- if (c !== l && c !== u && c !== b && c !== A && c !== ce) {
2895
+ if (c !== l && c !== u && c !== b && c !== A && c !== se) {
2834
2896
  o = !1;
2835
2897
  break;
2836
2898
  }
2837
2899
  }
2838
2900
  if (o) {
2839
2901
  for (var d = a - 1; d > 0 && e.charCodeAt(d - 1) !== f;) d--;
2840
- e.charCodeAt(d) === ce && (e = e.slice(0, d).trimEnd());
2902
+ e.charCodeAt(d) === se && (e = e.slice(0, d).trimEnd());
2841
2903
  }
2842
2904
  }
2843
2905
  var g = e.trim(), y = g.lastIndexOf("\n"), x = y === -1 ? g : g.slice(y + 1);
2844
- if (x.length > 0 && x.charCodeAt(0) === ce) {
2906
+ if (x.length > 0 && x.charCodeAt(0) === se) {
2845
2907
  for (var S = !1, E = !1, D = 1; D < x.length; D++) {
2846
2908
  var O = x.charCodeAt(D);
2847
- O === ce && (S = !0), O === b && (E = !0);
2909
+ O === se && (S = !0), O === b && (E = !0);
2848
2910
  }
2849
2911
  S && E && (e = y === -1 ? "" : e.slice(0, e.lastIndexOf(x)).trimEnd());
2850
2912
  }
2851
2913
  for (var k = -1, j = -1, M = -1, N = e.length - 1; N >= 0; N--) if (e.charCodeAt(N) === T) {
2852
2914
  var P = N + 1 < e.length ? e.charCodeAt(N + 1) : 0;
2853
- if (P >= H && P <= U || P >= he && P <= ge) {
2915
+ if (P >= U && P <= W || P >= G && P <= me) {
2854
2916
  for (var F = N + 2; F < e.length;) {
2855
2917
  var I = e.charCodeAt(F);
2856
- if (I >= H && I <= U || I >= he && I <= ge || I >= B && I <= V) F++;
2918
+ if (I >= U && I <= W || I >= G && I <= me || I >= V && I <= H) F++;
2857
2919
  else break;
2858
2920
  }
2859
- for (var L = F; L < e.length && e.charCodeAt(L) !== _;) L++;
2860
- if (L < e.length && e.charCodeAt(L - 1) !== ie) {
2861
- for (var R = !1, ee = L + 1; ee < e.length; ee++) if (e.charCodeAt(ee) === T) {
2862
- R = !0;
2921
+ for (var ee = F; ee < e.length && e.charCodeAt(ee) !== _;) ee++;
2922
+ if (ee < e.length && e.charCodeAt(ee - 1) !== ae) {
2923
+ for (var L = !1, R = ee + 1; R < e.length; R++) if (e.charCodeAt(R) === T) {
2924
+ L = !0;
2863
2925
  break;
2864
2926
  }
2865
- R || (k = N, j = F, M = L + 1);
2927
+ L || (k = N, j = F, M = ee + 1);
2866
2928
  }
2867
2929
  }
2868
2930
  break;
2869
2931
  }
2870
2932
  if (k >= 0) {
2871
- for (var te = 0, z = 0; z < k; z++) e.charCodeAt(z) === p && te++;
2933
+ for (var te = 0, ne = 0; ne < k; ne++) e.charCodeAt(ne) === p && te++;
2872
2934
  if (te % 2 == 0) {
2873
- var ne = e.slice(k + 1, j);
2874
- zt(e, "</" + ne, 0) === -1 && (e = e.slice(0, k) + e.slice(M));
2875
- }
2876
- }
2877
- for (var ae = e.length; ae > 0 && e.charCodeAt(ae - 1) === f;) ae--;
2878
- if (ae > 0) {
2879
- for (var oe = ae; oe > 0 && e.charCodeAt(oe - 1) !== f;) oe--;
2880
- for (var le = oe, ue = 0; le < ae && e.charCodeAt(le) === l && ue < 3;) le++, ue++;
2881
- if (oe > 0 && le < ae && Dt(e, le, ae)) {
2882
- for (var de = oe - 1, me = de; me > 0 && e.charCodeAt(me - 1) !== f;) me--;
2883
- Tt(e, me, de) || (e = e.slice(0, oe).trimEnd());
2884
- }
2885
- }
2886
- var _e = e.length;
2887
- if (_e > 0) {
2888
- for (var ve = e.lastIndexOf("\n"), be = ve === -1 ? 0 : ve + 1, G = _e, K = be, xe = 0; K < G && e.charCodeAt(K) === l && xe < 3;) K++, xe++;
2889
- if (K < G) {
2890
- var Se = e.charCodeAt(K), Ce = !1;
2891
- if (Se === C || Se === b || Se === se) {
2892
- var we = K + 1;
2893
- if (we >= G || e.charCodeAt(we) === l || e.charCodeAt(we) === u) {
2894
- for (var Te = we; Te < G && (e.charCodeAt(Te) === l || e.charCodeAt(Te) === u);) Te++;
2895
- Te >= G && (Ce = !0);
2935
+ var re = e.slice(k + 1, j);
2936
+ Ut(e, "</" + re, 0) === -1 && (e = e.slice(0, k) + e.slice(M));
2937
+ }
2938
+ }
2939
+ for (var z = e.length; z > 0 && e.charCodeAt(z - 1) === f;) z--;
2940
+ if (z > 0) {
2941
+ for (var B = z; B > 0 && e.charCodeAt(B - 1) !== f;) B--;
2942
+ for (var ce = B, le = 0; ce < z && e.charCodeAt(ce) === l && le < 3;) ce++, le++;
2943
+ if (B > 0 && ce < z && jt(e, ce, z)) {
2944
+ for (var ue = B - 1, pe = ue; pe > 0 && e.charCodeAt(pe - 1) !== f;) pe--;
2945
+ kt(e, pe, ue) || (e = e.slice(0, B).trimEnd());
2946
+ }
2947
+ }
2948
+ var he = e.length;
2949
+ if (he > 0) {
2950
+ for (var ge = e.lastIndexOf("\n"), ve = ge === -1 ? 0 : ge + 1, q = he, J = ve, ye = 0; J < q && e.charCodeAt(J) === l && ye < 3;) J++, ye++;
2951
+ if (J < q) {
2952
+ var be = e.charCodeAt(J), xe = !1;
2953
+ if (be === C || be === b || be === oe) {
2954
+ var Se = J + 1;
2955
+ if (Se >= q || e.charCodeAt(Se) === l || e.charCodeAt(Se) === u) {
2956
+ for (var Y = Se; Y < q && (e.charCodeAt(Y) === l || e.charCodeAt(Y) === u);) Y++;
2957
+ Y >= q && (xe = !0);
2896
2958
  }
2897
- } else if (Se >= B && Se <= V) {
2898
- for (var q = K; q < G && e.charCodeAt(q) >= B && e.charCodeAt(q) <= V;) q++;
2899
- if (q < G && (e.charCodeAt(q) === re || e.charCodeAt(q) === fe)) {
2900
- var J = q + 1;
2901
- if (J >= G || e.charCodeAt(J) === l || e.charCodeAt(J) === u) {
2902
- for (var Y = J; Y < G && (e.charCodeAt(Y) === l || e.charCodeAt(Y) === u);) Y++;
2903
- Y >= G && (Ce = !0);
2959
+ } else if (be >= V && be <= H) {
2960
+ for (var Ce = J; Ce < q && e.charCodeAt(Ce) >= V && e.charCodeAt(Ce) <= H;) Ce++;
2961
+ if (Ce < q && (e.charCodeAt(Ce) === ie || e.charCodeAt(Ce) === de)) {
2962
+ var X = Ce + 1;
2963
+ if (X >= q || e.charCodeAt(X) === l || e.charCodeAt(X) === u) {
2964
+ for (var Z = X; Z < q && (e.charCodeAt(Z) === l || e.charCodeAt(Z) === u);) Z++;
2965
+ Z >= q && (xe = !0);
2904
2966
  }
2905
2967
  }
2906
2968
  }
2907
- Ce && (e = e.slice(0, be).trimEnd());
2969
+ xe && (e = e.slice(0, ve).trimEnd());
2908
2970
  }
2909
2971
  }
2910
2972
  }
2911
- if (t.inline) return vn(e, 0, e.length, t, n);
2912
- let Ee = [], X = 0, De = e.length;
2913
- if (X === 0 && e.startsWith("---")) {
2914
- let t = ye(e);
2973
+ if (t.inline) return Sn(e, 0, e.length, t, n);
2974
+ let we = [], Q = 0, Te = e.length;
2975
+ if (Q === 0 && !n.disableFrontmatter && e.startsWith("---")) {
2976
+ let t = _e(e);
2915
2977
  if (t && t.hasValidYaml) {
2916
2978
  if (n.preserveFrontmatter !== !1) {
2917
2979
  let n = e.slice(0, t.endPos).trimEnd();
2918
- Ee.push({
2919
- type: W.frontmatter,
2980
+ we.push({
2981
+ type: K.frontmatter,
2920
2982
  text: n
2921
2983
  });
2922
2984
  }
2923
- X = t.endPos;
2985
+ Q = t.endPos;
2924
2986
  }
2925
2987
  }
2926
- for (; X < De;) {
2927
- for (var Oe = e.indexOf("\n", X), ke = Oe < 0 ? De : Oe; X < De && Tt(e, X, ke);) X = ke < De ? ke + 1 : ke, X < De && (Oe = e.indexOf("\n", X), ke = Oe < 0 ? De : Oe);
2928
- if (X >= De) break;
2929
- e.charCodeAt(X), wt(e, X, ke);
2988
+ for (; Q < Te;) {
2989
+ for (var Ee = e.indexOf("\n", Q), De = Ee < 0 ? Te : Ee; Q < Te && kt(e, Q, De);) Q = De < Te ? De + 1 : De, Q < Te && (Ee = e.indexOf("\n", Q), De = Ee < 0 ? Te : Ee);
2990
+ if (Q >= Te) break;
2991
+ e.charCodeAt(Q), Ot(e, Q, De);
2930
2992
  let r = null;
2931
- if (e.charCodeAt(X) !== pe && Q >= 4 && !t.inHTML) r = At(e, X);
2932
- else if (e.charCodeAt(X) !== pe) {
2933
- let i = X + $, a = e.charCodeAt(i);
2934
- a === v ? r = Et(e, X, t, n) : a === _ ? r = jt(e, X, t, n) : a === p || a === m ? r = kt(e, X, t) : a === b || a === C || a === w ? (r = Ot(e, X), !r && (r = It(e, X, t, n))) : a === se || a >= B && a <= V ? r = It(e, X, t, n) : a === T ? r = Ut(e, X, t, n) : a === ce ? r = Kt(e, X, t, n) : a === h && (r = qt(e, X, t));
2993
+ if (yt = e, bt = Q, xt = De, e.charCodeAt(Q) !== fe && Et >= 4 && !t.inHTML) r = Pt(e, Q);
2994
+ else if (e.charCodeAt(Q) !== fe) {
2995
+ let i = Q + Dt, a = e.charCodeAt(i);
2996
+ a === v ? r = At(e, Q, t, n) : a === _ ? r = Ft(e, Q, t, n) : a === p || a === m ? r = Nt(e, Q, t) : a === b || a === C || a === w ? (r = Mt(e, Q), !r && (r = Bt(e, Q, t, n))) : a === oe || a >= V && a <= H ? r = Bt(e, Q, t, n) : a === T ? r = qt(e, Q, t, n) : a === se ? r = Xt(e, Q, t, n) : a === h && (r = Zt(e, Q, t));
2935
2997
  }
2936
2998
  if (!r) {
2937
- for (var Ae = !1, je = X; je < ke; je++) if (e.charCodeAt(je) === ce) {
2938
- Ae = !0;
2999
+ for (var Oe = !1, ke = Q; ke < De; ke++) if (e.charCodeAt(ke) === se) {
3000
+ Oe = !0;
2939
3001
  break;
2940
3002
  }
2941
- Ae && (r = Kt(e, X, t, n));
3003
+ Oe && (r = Xt(e, Q, t, n));
2942
3004
  }
2943
- if (r ||= Yt(e, X, t, n), r) r.node.type !== W.refCollection && Ee.push(r.node), X = r.end;
3005
+ if (r ||= $t(e, Q, t, n), r) r.node.type !== K.refCollection && we.push(r.node), Q = r.end;
2944
3006
  else {
2945
- var Me = e.indexOf("\n", X);
2946
- X = Me < 0 ? De : Me + 1;
3007
+ var Ae = e.indexOf("\n", Q);
3008
+ Q = Ae < 0 ? Te : Ae + 1;
2947
3009
  }
2948
3010
  }
2949
- return t.i = r, Ee;
3011
+ return t.i = r, we;
2950
3012
  }
2951
- function xn(e, t, n, r) {
2952
- var i = dt(e, t);
3013
+ function Tn(e, t, n, r) {
3014
+ var i = ut(e, t);
2953
3015
  return i ? {
2954
3016
  tagName: i.tag,
2955
3017
  tagLower: i.tag.toLowerCase(),
@@ -2962,112 +3024,112 @@ function xn(e, t, n, r) {
2962
3024
  endPos: i.end
2963
3025
  } : null;
2964
3026
  }
2965
- function Sn(e, t, n) {
2966
- _n = 0, e = Ue(e), !t.refs && (t.refs = {}), t.j = ft(e, t.refs, n);
2967
- let r = bn(e, t, n);
3027
+ function En(e, t, n) {
3028
+ xn = 0, e = Ve(e), !t.refs && (t.refs = {}), t.j = dt(e, t.refs, n);
3029
+ let r = wn(e, t, n);
2968
3030
  return t.refs && Object.keys(t.refs).length > 0 ? [{
2969
- type: W.refCollection,
3031
+ type: K.refCollection,
2970
3032
  refs: t.refs
2971
3033
  }, ...r] : r;
2972
3034
  }
2973
- var Cn = /^\n+/, wn;
3035
+ var Dn = /^\n+/, On;
2974
3036
  try {
2975
- wn = n.createElement("div").$$typeof;
3037
+ On = n.createElement("div").$$typeof;
2976
3038
  } catch {
2977
- wn = Symbol.for("react.transitional.element");
3039
+ On = Symbol.for("react.transitional.element");
2978
3040
  }
2979
- function Tn(e, t, n) {
3041
+ function kn(e, t, n) {
2980
3042
  return {
2981
- $$typeof: wn,
3043
+ $$typeof: On,
2982
3044
  type: e,
2983
3045
  key: n == null ? null : "" + n,
2984
3046
  ref: null,
2985
3047
  props: t,
2986
3048
  _owner: null,
2987
3049
  _store: {},
2988
- k: null,
2989
- l: null
3050
+ _debugStack: null,
3051
+ _debugTask: null
2990
3052
  };
2991
3053
  }
2992
- var En = typeof n.createContext < "u" ? n.createContext(void 0) : void 0;
2993
- function Dn(e, t, r, i, a, o, s, c) {
3054
+ var An = typeof n.createContext < "u" ? n.createContext(void 0) : void 0;
3055
+ function jn(e, t, r, i, a, o, s, c, l) {
2994
3056
  switch (e.type) {
2995
- case W.blockQuote: {
3057
+ case K.blockQuote: {
2996
3058
  let n = { key: r.key };
2997
- return e.alert && (n.className = "markdown-alert-" + o(e.alert.toLowerCase(), Y), e.children.unshift({
3059
+ return e.alert && (n.className = "markdown-alert-" + o(e.alert.toLowerCase(), Z), e.children.unshift({
2998
3060
  attrs: {},
2999
3061
  children: [{
3000
- type: W.text,
3062
+ type: K.text,
3001
3063
  text: e.alert
3002
3064
  }],
3003
3065
  c: !0,
3004
- type: W.htmlBlock,
3066
+ type: K.htmlBlock,
3005
3067
  tag: "header"
3006
3068
  })), i("blockquote", n, t(e.children, r));
3007
3069
  }
3008
- case W.breakLine: return i("br", { key: r.key });
3009
- case W.breakThematic: return i("hr", { key: r.key });
3010
- case W.frontmatter: return c.preserveFrontmatter ? i("pre", { key: r.key }, e.text) : null;
3011
- case W.codeBlock:
3012
- let h = e.lang ? Se(e.lang) : "";
3070
+ case K.breakLine: return i("br", { key: r.key });
3071
+ case K.breakThematic: return i("hr", { key: r.key });
3072
+ case K.frontmatter: return c.preserveFrontmatter ? i("pre", { key: r.key }, e.text) : null;
3073
+ case K.codeBlock:
3074
+ let g = e.lang ? be(e.lang) : "";
3013
3075
  return i("pre", { key: r.key }, i("code", {
3014
- ...K(e.attrs || {}),
3015
- className: h ? `language-${h} lang-${h}` : ""
3076
+ ...J(e.attrs || {}),
3077
+ className: g ? `language-${g} lang-${g}` : ""
3016
3078
  }, e.text));
3017
- case W.codeInline: return i("code", { key: r.key }, e.text);
3018
- case W.footnoteReference: return i("a", {
3079
+ case K.codeInline: return i("code", { key: r.key }, e.text);
3080
+ case K.footnoteReference: return i("a", {
3019
3081
  key: r.key,
3020
3082
  href: a(e.target, "a", "href") || void 0
3021
3083
  }, i("sup", { key: r.key }, e.text));
3022
- case W.gfmTask: return i("input", {
3084
+ case K.gfmTask: return i("input", {
3023
3085
  checked: e.completed,
3024
3086
  key: r.key,
3025
3087
  readOnly: !0,
3026
3088
  type: "checkbox"
3027
3089
  });
3028
- case W.heading: return i(`h${e.level}`, {
3090
+ case K.heading: return i(`h${e.level}`, {
3029
3091
  id: e.id,
3030
3092
  key: r.key
3031
3093
  }, t(e.children, r));
3032
- case W.htmlBlock: {
3033
- let h = e;
3034
- if (c.tagfilter && Ye(h.tag)) {
3035
- var l = "";
3036
- if (h.attrs) for (var u in h.attrs) {
3037
- var d = h.attrs[u];
3038
- d === !0 ? l += " " + u : d != null && d !== !1 && (l += " " + u + "=\"" + String(d) + "\"");
3094
+ case K.htmlBlock: {
3095
+ let g = e;
3096
+ if (c.tagfilter && Je(g.tag)) {
3097
+ var u = "";
3098
+ if (g.attrs) for (var d in g.attrs) {
3099
+ var f = g.attrs[d];
3100
+ f === !0 ? u += " " + d : f != null && f !== !1 && (u += " " + d + "=\"" + String(f) + "\"");
3039
3101
  }
3040
- return i("span", { key: r.key }, "<" + h.tag + l + ">");
3102
+ return i("span", { key: r.key }, "<" + g.tag + u + ">");
3041
3103
  }
3042
- if (h.a && h.c) {
3043
- let l = function(e) {
3044
- if ((e.type === W.htmlSelfClosing || e.type === W.htmlBlock) && e.b) return [];
3045
- if (e.type === W.paragraph) {
3104
+ if (g.a && g.c) {
3105
+ let i = function(e) {
3106
+ if ((e.type === K.htmlSelfClosing || e.type === K.htmlBlock) && e.b) return [];
3107
+ if (e.type === K.paragraph) {
3046
3108
  let t = e.children;
3047
- return t ? t.flatMap(l) : [];
3109
+ return t ? t.flatMap(i) : [];
3048
3110
  }
3049
- return e.type === W.text ? e.text?.trim() ? [e] : [] : e.type === W.htmlBlock && e.children ? [{
3111
+ return e.type === K.text ? e.text?.trim() ? [e] : [] : e.type === K.htmlBlock && e.children ? [{
3050
3112
  ...e,
3051
- children: e.children?.flatMap(l)
3113
+ children: e.children?.flatMap(i)
3052
3114
  }] : [e];
3053
3115
  }, u = function(e) {
3054
- for (var t = 0; t < e.length; t++) e[t].type === W.htmlBlock && (e[t].c = !1), "children" in e[t] && e[t].children && u(e[t].children);
3116
+ for (var t = 0; t < e.length; t++) e[t].type === K.htmlBlock && (e[t].c = !1), "children" in e[t] && e[t].children && u(e[t].children);
3055
3117
  }, d = function(e, t) {
3056
3118
  for (var n = 0; n < e.length; n++) {
3057
3119
  var r = e[n];
3058
- if (r.type === W.paragraph && r.children) for (var i = r.children, a = 0; a < i.length; a++) {
3120
+ if (r.type === K.paragraph && r.children) for (var i = r.children, a = 0; a < i.length; a++) {
3059
3121
  var o = i[a];
3060
- if (o.type === W.htmlSelfClosing && o.b && o.tag.toLowerCase() === t) {
3122
+ if (o.type === K.htmlSelfClosing && o.b && o.tag.toLowerCase() === t) {
3061
3123
  var s = e.slice(0, n);
3062
3124
  a > 0 && s.push({
3063
- type: W.paragraph,
3125
+ type: K.paragraph,
3064
3126
  children: i.slice(0, a)
3065
3127
  });
3066
3128
  var c = [];
3067
3129
  if (a + 1 < i.length) {
3068
3130
  var l = i.slice(a + 1);
3069
3131
  l = l.filter(function(e) {
3070
- return !(e.type === W.htmlSelfClosing && e.b);
3132
+ return !(e.type === K.htmlSelfClosing && e.b);
3071
3133
  }), l.length > 0 && (c = l);
3072
3134
  }
3073
3135
  return c = c.concat(e.slice(n + 1)), {
@@ -3077,7 +3139,7 @@ function Dn(e, t, r, i, a, o, s, c) {
3077
3139
  };
3078
3140
  }
3079
3141
  }
3080
- if ((r.type === W.htmlSelfClosing || r.type === W.htmlBlock) && r.b && r.tag.toLowerCase() === t) return {
3142
+ if ((r.type === K.htmlSelfClosing || r.type === K.htmlBlock) && r.b && r.tag.toLowerCase() === t) return {
3081
3143
  found: !0,
3082
3144
  beforeClose: e.slice(0, n),
3083
3145
  afterClose: e.slice(n + 1)
@@ -3088,92 +3150,92 @@ function Dn(e, t, r, i, a, o, s, c) {
3088
3150
  beforeClose: e,
3089
3151
  afterClose: []
3090
3152
  };
3091
- }, g = h.tag.toLowerCase(), _ = ct(g), v = h.children && h.children.length > 0, y = /<[a-z][^>]{0,100}>/i.test(h.a);
3153
+ }, f = g.tag.toLowerCase(), _ = st(f), v = g.children && g.children.length > 0, y = /<[a-z][^>]{0,100}>/i.test(g.a);
3092
3154
  if (_) {
3093
- let t = h.a.replace(RegExp("\\s*</" + g + ">\\s*$", "i"), "");
3094
- return c.tagfilter && (t = Ze(t)), y ? i(e.tag, {
3155
+ let t = g.a.replace(RegExp("\\s*</" + f + ">\\s*$", "i"), "");
3156
+ return c.tagfilter && (t = Xe(t)), y ? l(e.tag, {
3095
3157
  key: r.key,
3096
- ...K(e.attrs || {}),
3158
+ ...J(e.attrs || {}),
3097
3159
  dangerouslySetInnerHTML: { __html: t }
3098
- }) : i(e.tag, {
3160
+ }) : l(e.tag, {
3099
3161
  key: r.key,
3100
- ...K(e.attrs || {})
3162
+ ...J(e.attrs || {})
3101
3163
  }, t);
3102
3164
  }
3103
- let b = RegExp(`^<${h.tag}(\\s|>)`, "i").test(h.a);
3104
- if (v && !b && c.tagfilter && Xe(h.a)) return i(e.tag, {
3165
+ let b = RegExp(`^<${g.tag}(\\s|>)`, "i").test(g.a);
3166
+ if (v && !b && c.tagfilter && Ye(g.a)) return l(e.tag, {
3105
3167
  key: r.key,
3106
- ...K(e.attrs || {})
3107
- }, t(h.children, r));
3108
- if (lt(h.a)) {
3109
- let t = c.tagfilter ? Ze(h.a) : h.a;
3110
- return i(e.tag, {
3168
+ ...J(e.attrs || {})
3169
+ }, t(g.children, r));
3170
+ if (ct(g.a)) {
3171
+ let t = c.tagfilter ? Xe(g.a) : g.a;
3172
+ return l(e.tag, {
3111
3173
  key: r.key,
3112
- ...K(e.attrs || {}),
3174
+ ...J(e.attrs || {}),
3113
3175
  dangerouslySetInnerHTML: { __html: t }
3114
3176
  });
3115
3177
  }
3116
3178
  let x = {
3117
- slugify: (e) => o(e, Y),
3179
+ slugify: (e) => o(e, Z),
3118
3180
  sanitizer: a,
3119
3181
  tagfilter: !0
3120
- }, S = h.a.replace(/>\s+</g, "><").replace(/\n+/g, " ").trim();
3121
- if (RegExp(`^<${h.tag}(\\s[^>]*)?>(\\s*</${h.tag}>)?$`, "i").test(S)) return h.children && h.children.length > 0 ? i(e.tag, {
3182
+ }, S = g.a.replace(/>\s+</g, "><").replace(/\n+/g, " ").trim();
3183
+ if (RegExp(`^<${g.tag}(\\s[^>]*)?>(\\s*</${g.tag}>)?$`, "i").test(S)) return g.children && g.children.length > 0 ? l(e.tag, {
3122
3184
  key: r.key,
3123
- ...K(e.attrs || {})
3124
- }, t(h.children, r)) : i(e.tag, {
3185
+ ...J(e.attrs || {})
3186
+ }, t(g.children, r)) : l(e.tag, {
3125
3187
  key: r.key,
3126
- ...K(e.attrs || {})
3188
+ ...J(e.attrs || {})
3127
3189
  });
3128
- let C = Sn(S, {
3190
+ let C = En(S, {
3129
3191
  inline: !1,
3130
3192
  refs: s,
3131
3193
  inHTML: !1
3132
3194
  }, x);
3133
3195
  u(C);
3134
- let w = h.tag.toLowerCase(), T = "</" + w + ">", E = RegExp(`^<${h.tag}(\\s|>)`, "i").test(S), D = S.toLowerCase().trimEnd().endsWith(T), O = E && D;
3135
- if (O && v) return i(e.tag, {
3196
+ let w = g.tag.toLowerCase(), T = "</" + w + ">", E = RegExp(`^<${g.tag}(\\s|>)`, "i").test(S), D = S.toLowerCase().trimEnd().endsWith(T), O = E && D;
3197
+ if (O && v) return l(e.tag, {
3136
3198
  key: r.key,
3137
- ...K(e.attrs || {})
3138
- }, t(h.children, r));
3139
- if (O) return t(C.flatMap(l), r);
3140
- var f = d(C, w);
3141
- if (f.found && f.afterClose.length > 0) {
3142
- var p = f.beforeClose.flatMap(l), m = f.afterClose.flatMap(l);
3143
- return Tn(n.Fragment, { children: [i(e.tag, {
3199
+ ...J(e.attrs || {})
3200
+ }, t(g.children, r));
3201
+ if (O) return t(C.flatMap(i), r);
3202
+ var p = d(C, w);
3203
+ if (p.found && p.afterClose.length > 0) {
3204
+ var m = p.beforeClose.flatMap(i), h = p.afterClose.flatMap(i);
3205
+ return kn(n.Fragment, { children: [l(e.tag, {
3144
3206
  key: r.key,
3145
- ...K(e.attrs || {})
3146
- }, t(p, r)), t(m, r)] }, null);
3207
+ ...J(e.attrs || {})
3208
+ }, t(m, r)), t(h, r)] }, null);
3147
3209
  }
3148
- return i(e.tag, {
3210
+ return l(e.tag, {
3149
3211
  key: r.key,
3150
- ...K(e.attrs || {})
3151
- }, t(C.flatMap(l), r));
3212
+ ...J(e.attrs || {})
3213
+ }, t(C.flatMap(i), r));
3152
3214
  }
3153
- return De(e.tag) ? i(e.tag, {
3215
+ return Te(e.tag) ? l(e.tag, {
3154
3216
  key: r.key,
3155
- ...K(e.attrs || {})
3156
- }) : i(e.tag, {
3217
+ ...J(e.attrs || {})
3218
+ }) : l(e.tag, {
3157
3219
  key: r.key,
3158
- ...K(e.attrs || {})
3220
+ ...J(e.attrs || {})
3159
3221
  }, e.children ? t(e.children, r) : "");
3160
3222
  }
3161
- case W.htmlSelfClosing: {
3223
+ case K.htmlSelfClosing: {
3162
3224
  let t = e;
3163
- if (c.tagfilter && Ye(t.tag)) {
3164
- var l = "";
3165
- if (t.attrs) for (var u in t.attrs) {
3166
- var d = t.attrs[u];
3167
- d === !0 ? l += " " + u : d != null && d !== !1 && (l += " " + u + "=\"" + String(d) + "\"");
3225
+ if (c.tagfilter && Je(t.tag)) {
3226
+ var u = "";
3227
+ if (t.attrs) for (var d in t.attrs) {
3228
+ var f = t.attrs[d];
3229
+ f === !0 ? u += " " + d : f != null && f !== !1 && (u += " " + d + "=\"" + String(f) + "\"");
3168
3230
  }
3169
- return i("span", { key: r.key }, "<" + t.tag + l + " />");
3231
+ return i("span", { key: r.key }, "<" + t.tag + u + " />");
3170
3232
  }
3171
- return i(e.tag, {
3233
+ return l(e.tag, {
3172
3234
  key: r.key,
3173
- ...K(e.attrs || {})
3235
+ ...J(e.attrs || {})
3174
3236
  });
3175
3237
  }
3176
- case W.image: {
3238
+ case K.image: {
3177
3239
  let t = e.target == null ? null : a(e.target, "img", "src");
3178
3240
  return i("img", {
3179
3241
  key: r.key,
@@ -3182,18 +3244,18 @@ function Dn(e, t, r, i, a, o, s, c) {
3182
3244
  src: t || void 0
3183
3245
  });
3184
3246
  }
3185
- case W.link: {
3247
+ case K.link: {
3186
3248
  let n = { key: r.key };
3187
- return e.target != null && (n.href = Ge(e.target)), e.title && (n.title = e.title), i("a", n, t(e.children, r));
3249
+ return e.target != null && (n.href = We(e.target)), e.title && (n.title = e.title), i("a", n, t(e.children, r));
3188
3250
  }
3189
- case W.table: {
3251
+ case K.table: {
3190
3252
  let n = e;
3191
- return i("table", { key: r.key }, i("thead", null, i("tr", null, n.header.map(function(e, a) {
3253
+ return i("table", { key: r.key }, i("thead", { key: "thead" }, i("tr", null, n.header.map(function(e, a) {
3192
3254
  return i("th", {
3193
3255
  key: a,
3194
3256
  style: n.align[a] == null ? {} : { textAlign: n.align[a] }
3195
3257
  }, t(e, r));
3196
- }))), n.cells.length > 0 && i("tbody", null, n.cells.map(function(e, a) {
3258
+ }))), n.cells.length > 0 && i("tbody", { key: "tbody" }, n.cells.map(function(e, a) {
3197
3259
  return i("tr", { key: a }, e.map(function(e, a) {
3198
3260
  return i("td", {
3199
3261
  key: a,
@@ -3202,142 +3264,144 @@ function Dn(e, t, r, i, a, o, s, c) {
3202
3264
  }));
3203
3265
  })));
3204
3266
  }
3205
- case W.text: return e.text;
3206
- case W.textFormatted: return i(e.tag, { key: r.key }, t(e.children, r));
3207
- case W.orderedList:
3208
- case W.unorderedList: return i(e.type === W.orderedList ? "ol" : "ul", {
3267
+ case K.text: return e.text;
3268
+ case K.textFormatted: return i(e.tag, { key: r.key }, t(e.children, r));
3269
+ case K.orderedList:
3270
+ case K.unorderedList: return i(e.type === K.orderedList ? "ol" : "ul", {
3209
3271
  key: r.key,
3210
- start: e.type === W.orderedList ? e.start : void 0
3272
+ start: e.type === K.orderedList ? e.start : void 0
3211
3273
  }, e.items.map(function(e, n) {
3212
3274
  return i("li", { key: n }, t(e, r));
3213
3275
  }));
3214
- case W.paragraph: return i("p", { key: r.key }, t(e.children, r));
3215
- case W.ref: return null;
3276
+ case K.paragraph: return i("p", { key: r.key }, t(e.children, r));
3277
+ case K.ref: return null;
3216
3278
  default: return null;
3217
3279
  }
3218
3280
  }
3219
- var On = (e, t, n, r, i, a) => {
3220
- var o = (e) => e.map(function(e) {
3281
+ var Mn = (e, t, n, r, i, a, o) => {
3282
+ var s = (e) => e.map(function(e) {
3221
3283
  return "text" in e ? e.text : "";
3222
- }), s = (c, l = {}) => {
3223
- var u = (l.renderDepth || 0) + 1;
3224
- if (u > 2500) return o(c);
3225
- l.renderDepth = u;
3226
- for (var d = l.key, f = [], p = !1, m = 0; m < c.length; m++) {
3227
- l.key = m;
3228
- var h = e ? e(Dn.bind(null, c[m], s, l, t, n, r, i, a), c[m], s, l) : Dn(c[m], s, l, t, n, r, i, a), g = typeof h == "string";
3229
- if (g && p) f[f.length - 1] += h;
3230
- else if (h !== null) if (Array.isArray(h)) for (var _ = 0; _ < h.length; _++) f.push(h[_]);
3231
- else f.push(h);
3232
- p = g;
3233
- }
3234
- return l.key = d, l.renderDepth = u - 1, f;
3284
+ }), c = (l, u = {}) => {
3285
+ var d = (u.renderDepth || 0) + 1;
3286
+ if (d > 2500) return s(l);
3287
+ u.renderDepth = d;
3288
+ for (var f = u.key, p = [], m = !1, h = 0; h < l.length; h++) {
3289
+ u.key = h;
3290
+ var g = e ? e(jn.bind(null, l[h], c, u, t, n, r, i, a, o), l[h], c, u) : jn(l[h], c, u, t, n, r, i, a, o), _ = typeof g == "string";
3291
+ if (_ && m) p[p.length - 1] += g;
3292
+ else if (g !== null) if (Array.isArray(g)) for (var v = 0; v < g.length; v++) p.push(g[v]);
3293
+ else p.push(g);
3294
+ m = _;
3295
+ }
3296
+ return u.key = f, u.renderDepth = d - 1, p;
3235
3297
  };
3236
- return s;
3237
- }, kn = (e, t) => {
3238
- let n = We(t, e, void 0);
3239
- return n ? typeof n == "function" || typeof n == "object" && "render" in n ? n : We(t, `${e}.component`, e) : e;
3298
+ return c;
3299
+ }, Nn = (e, t) => {
3300
+ let n = Ue(t, e, void 0);
3301
+ return n ? typeof n == "function" || typeof n == "object" && "render" in n ? n : Ue(t, `${e}.component`, e) : e;
3240
3302
  };
3241
- function An(e, t) {
3303
+ function Pn(e, t) {
3242
3304
  let n = { ...t || {} };
3243
3305
  n.overrides = n.overrides || {};
3244
- let r = n.slugify || Y, i = n.sanitizer || we, a = n.createElement, o = n.overrides && Object.keys(n.overrides).length > 0, s = (e) => jn(e, {
3306
+ let r = n.slugify || Z, i = n.sanitizer || Se, a = n.createElement, o = n.overrides && Object.keys(n.overrides).length > 0, s = (e) => Fn(e, {
3245
3307
  ...n,
3246
3308
  wrapper: null
3247
3309
  });
3248
- function c(e, t, ...r) {
3249
- var i = t || {};
3250
- for (var c in i) {
3251
- var l = i[c];
3252
- if (typeof l == "string" && l.length > 0 && l.charCodeAt(0) === T && (Qe.test(l) || $e.test(l) || xn(l, 0))) {
3253
- var u = s(l.trim());
3254
- i[c] = c === "innerHTML" && Array.isArray(u) ? u[0] : u;
3310
+ function c(e) {
3311
+ for (var t in e) {
3312
+ var n = e[t];
3313
+ if (typeof n == "string" && n.length > 0 && n.charCodeAt(0) === T && (Ze.test(n) || Qe.test(n) || Tn(n, 0))) {
3314
+ var r = s(n.trim());
3315
+ e[t] = t === "innerHTML" && Array.isArray(r) ? r[0] : r;
3255
3316
  }
3256
3317
  }
3257
- var d = e;
3318
+ }
3319
+ function l(e, t, ...r) {
3320
+ var i = t || {}, s = e;
3258
3321
  if (o) {
3259
- var f = We(n.overrides, e + ".props", {});
3260
- d = kn(e, n.overrides), i = {
3322
+ var c = Ue(n.overrides, e + ".props", {});
3323
+ s = Nn(e, n.overrides), i = {
3261
3324
  ...i,
3262
- ...f,
3263
- className: Ke(i.className, f.className) || void 0
3325
+ ...c,
3326
+ className: Ge(i.className, c.className) || void 0
3264
3327
  };
3265
3328
  }
3266
3329
  if (!a) {
3267
- var p = i.key;
3268
- return p != null && delete i.key, r.length === 1 ? i.children = r[0] : r.length > 1 && (i.children = r), Tn(d, i, p);
3330
+ var l = i.key;
3331
+ return l != null && delete i.key, r.length === 1 ? i.children = r[0] : r.length > 1 && (i.children = r), kn(s, i, l);
3269
3332
  }
3270
- return a(d, i, ...r);
3333
+ return a(s, i, ...r);
3271
3334
  }
3272
- let l = {
3335
+ function u(e, t, ...n) {
3336
+ return t && c(t), l(e, t, ...n);
3337
+ }
3338
+ let d = {
3273
3339
  ...n,
3274
- slugify: (e) => r(e, Y),
3340
+ slugify: n.slugify ? (e) => n.slugify(e, Z) : Z,
3275
3341
  sanitizer: i,
3276
3342
  tagfilter: n.tagfilter !== !1
3277
- }, u = e[0] && e[0].type === W.refCollection ? e[0].refs : {}, d = On(n.renderRule, c, i, r, u, n), f = d(e, {
3343
+ }, f = e[0] && e[0].type === K.refCollection ? e[0].refs : {}, p = Mn(n.renderRule, l, i, r, f, n, u), m = p(e, {
3278
3344
  inline: n.forceInline,
3279
- refs: u
3280
- }), p = [];
3281
- for (let e in u) e.charCodeAt(0) === g && p.push({
3345
+ refs: f
3346
+ }), h = [];
3347
+ for (let e in f) e.charCodeAt(0) === g && h.push({
3282
3348
  identifier: e,
3283
- footnote: u[e].target
3349
+ footnote: f[e].target
3284
3350
  });
3285
- if (p.length && f.push(c("footer", { key: "footer" }, p.map(function(e) {
3286
- let t = e.identifier.charCodeAt(0) === g ? e.identifier.slice(1) : e.identifier, n = Sn(e.footnote, {
3351
+ if (h.length && m.push(l("footer", { key: "footer" }, h.map(function(e) {
3352
+ let t = e.identifier.charCodeAt(0) === g ? e.identifier.slice(1) : e.identifier, n = En(e.footnote, {
3287
3353
  inline: !0,
3288
- refs: u
3289
- }, l);
3290
- return c("div", {
3291
- id: r(t, Y),
3354
+ refs: f
3355
+ }, d);
3356
+ return l("div", {
3357
+ id: r(t, Z),
3292
3358
  key: e.identifier
3293
- }, t + ": ", d(n, {
3359
+ }, t + ": ", p(n, {
3294
3360
  inline: !0,
3295
- refs: u
3361
+ refs: f
3296
3362
  }));
3297
- }))), n.wrapper === null) return f;
3298
- let m = n.wrapper || (n.forceInline ? "span" : "div"), h;
3299
- if (f.length > 1 || n.forceWrapper) h = f;
3300
- else return f.length === 1 ? f[0] : null;
3301
- var _ = n.wrapperProps ? { ...n.wrapperProps } : {};
3302
- return _.children = h, Tn(m, _, "outer");
3303
- }
3304
- function jn(e = "", t = {}) {
3363
+ }))), n.wrapper === null) return m;
3364
+ let _ = n.wrapper || (n.forceInline ? "span" : "div"), v;
3365
+ if (m.length > 1 || n.forceWrapper) v = m;
3366
+ else return m.length === 1 ? m[0] : null;
3367
+ var y = n.wrapperProps ? { ...n.wrapperProps } : {};
3368
+ return y.children = v, kn(_, y, "outer");
3369
+ }
3370
+ function Fn(e = "", t = {}) {
3305
3371
  let n = { ...t || {} };
3306
3372
  n.overrides = n.overrides || {};
3307
- let r = n.slugify || Y, i = n.sanitizer || we;
3308
- function a(e) {
3309
- let t = n.forceInline || !n.forceBlock && !xe.test(e), a = {
3373
+ let r = n.sanitizer || Se;
3374
+ function i(e) {
3375
+ let t = n.forceInline || !n.forceBlock && !ye.test(e), i = {
3310
3376
  ...n,
3311
- slugify: (e) => r(e, Y),
3312
- sanitizer: i,
3377
+ slugify: n.slugify ? (e) => n.slugify(e, Z) : Z,
3378
+ sanitizer: r,
3313
3379
  tagfilter: n.tagfilter !== !1
3314
- };
3315
- t || ft(e, o, a);
3316
- let s = e;
3380
+ }, o = e;
3317
3381
  if (!t) {
3318
- let e = s.length;
3319
- for (; e > 0 && (s[e - 1] === "\n" || s[e - 1] === "\r");) e--;
3320
- s = s.slice(0, e), s = `${s.replace(Cn, "")}
3382
+ let e = o.length;
3383
+ for (; e > 0 && (o[e - 1] === "\n" || o[e - 1] === "\r");) e--;
3384
+ o = o.slice(0, e), o = `${o.replace(Dn, "")}
3321
3385
 
3322
3386
  `;
3323
3387
  }
3324
3388
  if (n.optimizeForStreaming) {
3325
- var c = s.lastIndexOf("<");
3326
- c !== -1 && s.indexOf(">", c) === -1 && (s = s.slice(0, c)), c = e.lastIndexOf("<"), c !== -1 && e.indexOf(">", c) === -1 && (e = e.slice(0, c));
3389
+ var s = o.lastIndexOf("<");
3390
+ s !== -1 && o.indexOf(">", s) === -1 && (o = o.slice(0, s)), s = e.lastIndexOf("<"), s !== -1 && e.indexOf(">", s) === -1 && (e = e.slice(0, s));
3327
3391
  }
3328
- return An(Sn(t ? e : s, {
3392
+ return Pn(En(t ? e : o, {
3329
3393
  inline: t,
3330
- refs: o
3331
- }, a), {
3332
- ...a,
3394
+ refs: a
3395
+ }, i), {
3396
+ ...i,
3333
3397
  forceInline: t
3334
3398
  });
3335
3399
  }
3336
- let o = {};
3337
- return a(e);
3400
+ let a = {};
3401
+ return i(e);
3338
3402
  }
3339
- var Mn = ({ children: e, options: t, ...r }) => {
3340
- if (!(typeof n.useContext < "u")) return jn(e ?? "", {
3403
+ var In = ({ children: e, options: t, ...r }) => {
3404
+ if (!(typeof n.useContext < "u")) return Fn(e ?? "", {
3341
3405
  ...t,
3342
3406
  overrides: { ...t?.overrides },
3343
3407
  wrapperProps: {
@@ -3345,7 +3409,7 @@ var Mn = ({ children: e, options: t, ...r }) => {
3345
3409
  ...r
3346
3410
  }
3347
3411
  });
3348
- let i = n.useContext(En), a = n.useMemo(() => ({
3412
+ let i = n.useContext(An), a = n.useMemo(() => ({
3349
3413
  ...i,
3350
3414
  ...t,
3351
3415
  overrides: {
@@ -3362,8 +3426,8 @@ var Mn = ({ children: e, options: t, ...r }) => {
3362
3426
  t,
3363
3427
  r
3364
3428
  ]), o = e ?? "";
3365
- return n.useMemo(() => jn(o, a), [o, a]);
3366
- }, Nn = /* @__PURE__ */ e({ default: () => In }), Pn = {
3429
+ return n.useMemo(() => Fn(o, a), [o, a]);
3430
+ }, Ln = /* @__PURE__ */ e({ default: () => Bn }), Rn = {
3367
3431
  small: {
3368
3432
  1: "dc:text-lg",
3369
3433
  2: "dc:text-base",
@@ -3379,11 +3443,11 @@ var Mn = ({ children: e, options: t, ...r }) => {
3379
3443
  2: "dc:text-4xl",
3380
3444
  3: "dc:text-3xl"
3381
3445
  }
3382
- }, Fn = {
3446
+ }, zn = {
3383
3447
  1: "dc:mb-4",
3384
3448
  2: "dc:mb-3",
3385
3449
  3: "dc:mb-2"
3386
- }, In = r.memo(function({ displayConfig: e = {}, height: n = "100%", colorPalette: r }) {
3450
+ }, Bn = r.memo(function({ displayConfig: e = {}, height: n = "100%", colorPalette: r }) {
3387
3451
  let { t: s } = t(), c = e.content || "", l = e.accentColorIndex ?? 0, u = e.fontSize || "medium", d = e.alignment || "left", f = !!e.transparentBackground, p = e.accentBorder || "none", m = i(() => r?.colors && l < r.colors.length ? r.colors[l] : "#8884d8", [r, l]), h = {
3388
3452
  small: "dc:text-sm",
3389
3453
  medium: "dc:text-lg",
@@ -3394,15 +3458,15 @@ var Mn = ({ children: e, options: t, ...r }) => {
3394
3458
  right: "dc:text-right"
3395
3459
  }, _ = i(() => ({ overrides: {
3396
3460
  h1: { props: {
3397
- className: `dc:font-bold ${Pn[u]?.[1] || "dc:text-3xl"} ${Fn[1]}`,
3461
+ className: `dc:font-bold ${Rn[u]?.[1] || "dc:text-3xl"} ${zn[1]}`,
3398
3462
  style: { color: m }
3399
3463
  } },
3400
3464
  h2: { props: {
3401
- className: `dc:font-bold ${Pn[u]?.[2] || "dc:text-2xl"} ${Fn[2]}`,
3465
+ className: `dc:font-bold ${Rn[u]?.[2] || "dc:text-2xl"} ${zn[2]}`,
3402
3466
  style: { color: m }
3403
3467
  } },
3404
3468
  h3: { props: {
3405
- className: `dc:font-bold ${Pn[u]?.[3] || "dc:text-xl"} ${Fn[3]}`,
3469
+ className: `dc:font-bold ${Rn[u]?.[3] || "dc:text-xl"} ${zn[3]}`,
3406
3470
  style: { color: m }
3407
3471
  } },
3408
3472
  p: { props: { className: "dc:mb-3 dc:leading-relaxed text-dc-text" } },
@@ -3462,13 +3526,13 @@ var Mn = ({ children: e, options: t, ...r }) => {
3462
3526
  height: n === "100%" ? "100%" : n,
3463
3527
  ...v
3464
3528
  },
3465
- children: /* @__PURE__ */ a(Mn, {
3529
+ children: /* @__PURE__ */ a(In, {
3466
3530
  options: _,
3467
3531
  children: c
3468
3532
  })
3469
3533
  });
3470
3534
  });
3471
3535
  //#endregion
3472
- export { Nn as n, Mn as r, In as t };
3536
+ export { Ln as n, In as r, Bn as t };
3473
3537
 
3474
- //# sourceMappingURL=chart-markdown-BWaWVkuz.js.map
3538
+ //# sourceMappingURL=chart-markdown-CiGRZdJj.js.map