@pinkpixel/marzipan 1.1.0 → 1.1.2

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 (130) hide show
  1. package/README.md +72 -37
  2. package/dist/_basePickBy-D4kyG5Tu.js +152 -0
  3. package/dist/_basePickBy-D4kyG5Tu.js.map +1 -0
  4. package/dist/_baseUniq-s5uZhHMt.js +615 -0
  5. package/dist/_baseUniq-s5uZhHMt.js.map +1 -0
  6. package/dist/arc-Cd2Fw3V6.js +84 -0
  7. package/dist/arc-Cd2Fw3V6.js.map +1 -0
  8. package/dist/architectureDiagram-VXUJARFQ-ylT61Lln.js +4663 -0
  9. package/dist/architectureDiagram-VXUJARFQ-ylT61Lln.js.map +1 -0
  10. package/dist/blockDiagram-VD42YOAC-CoIxLSyQ.js +2257 -0
  11. package/dist/blockDiagram-VD42YOAC-CoIxLSyQ.js.map +1 -0
  12. package/dist/c4Diagram-YG6GDRKO-CsQimMM6.js +1581 -0
  13. package/dist/c4Diagram-YG6GDRKO-CsQimMM6.js.map +1 -0
  14. package/dist/channel-0tZUlnqz.js +6 -0
  15. package/dist/channel-0tZUlnqz.js.map +1 -0
  16. package/dist/chunk-4BX2VUAB-DVkBhLxy.js +9 -0
  17. package/dist/chunk-4BX2VUAB-DVkBhLxy.js.map +1 -0
  18. package/dist/chunk-55IACEB6-CVQcegI-.js +9 -0
  19. package/dist/chunk-55IACEB6-CVQcegI-.js.map +1 -0
  20. package/dist/chunk-B4BG7PRW-DPUTNckV.js +1376 -0
  21. package/dist/chunk-B4BG7PRW-DPUTNckV.js.map +1 -0
  22. package/dist/chunk-DI55MBZ5-F7DI2N9R.js +1371 -0
  23. package/dist/chunk-DI55MBZ5-F7DI2N9R.js.map +1 -0
  24. package/dist/chunk-FMBD7UC4-C3wNpU7V.js +20 -0
  25. package/dist/chunk-FMBD7UC4-C3wNpU7V.js.map +1 -0
  26. package/dist/chunk-QN33PNHL-BOdqrixJ.js +20 -0
  27. package/dist/chunk-QN33PNHL-BOdqrixJ.js.map +1 -0
  28. package/dist/chunk-QZHKN3VN-BFPNdgmW.js +16 -0
  29. package/dist/chunk-QZHKN3VN-BFPNdgmW.js.map +1 -0
  30. package/dist/chunk-TZMSLE5B-BZuxNW58.js +65 -0
  31. package/dist/chunk-TZMSLE5B-BZuxNW58.js.map +1 -0
  32. package/dist/classDiagram-2ON5EDUG-CiRjpBEe.js +17 -0
  33. package/dist/classDiagram-2ON5EDUG-CiRjpBEe.js.map +1 -0
  34. package/dist/classDiagram-v2-WZHVMYZB-CiRjpBEe.js +17 -0
  35. package/dist/classDiagram-v2-WZHVMYZB-CiRjpBEe.js.map +1 -0
  36. package/dist/clone-Bm_onhkP.js +9 -0
  37. package/dist/clone-Bm_onhkP.js.map +1 -0
  38. package/dist/cose-bilkent-S5V4N54A-D9xMKgKB.js +2609 -0
  39. package/dist/cose-bilkent-S5V4N54A-D9xMKgKB.js.map +1 -0
  40. package/dist/dagre-6UL2VRFP-BhIQJjaK.js +445 -0
  41. package/dist/dagre-6UL2VRFP-BhIQJjaK.js.map +1 -0
  42. package/dist/diagram-PSM6KHXK-h4YEzD1S.js +532 -0
  43. package/dist/diagram-PSM6KHXK-h4YEzD1S.js.map +1 -0
  44. package/dist/diagram-QEK2KX5R-spuV0akZ.js +218 -0
  45. package/dist/diagram-QEK2KX5R-spuV0akZ.js.map +1 -0
  46. package/dist/diagram-S2PKOQOG-CQx-wsyw.js +143 -0
  47. package/dist/diagram-S2PKOQOG-CQx-wsyw.js.map +1 -0
  48. package/dist/erDiagram-Q2GNP2WA-Cqkjjf2a.js +842 -0
  49. package/dist/erDiagram-Q2GNP2WA-Cqkjjf2a.js.map +1 -0
  50. package/dist/flowDiagram-NV44I4VS-mCXE9u9b.js +1621 -0
  51. package/dist/flowDiagram-NV44I4VS-mCXE9u9b.js.map +1 -0
  52. package/dist/ganttDiagram-JELNMOA3-Bz1GBIHE.js +2671 -0
  53. package/dist/ganttDiagram-JELNMOA3-Bz1GBIHE.js.map +1 -0
  54. package/dist/gitGraphDiagram-V2S2FVAM-Be01Oq15.js +700 -0
  55. package/dist/gitGraphDiagram-V2S2FVAM-Be01Oq15.js.map +1 -0
  56. package/dist/graph-DVWVTM7e.js +248 -0
  57. package/dist/graph-DVWVTM7e.js.map +1 -0
  58. package/dist/index-kKw24iiA.js +34 -0
  59. package/dist/index-kKw24iiA.js.map +1 -0
  60. package/dist/index.d.ts +0 -11
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +270 -277
  63. package/dist/index.js.map +1 -1
  64. package/dist/infoDiagram-HS3SLOUP-joTtnw9j.js +25 -0
  65. package/dist/infoDiagram-HS3SLOUP-joTtnw9j.js.map +1 -0
  66. package/dist/journeyDiagram-XKPGCS4Q-CMVu7VEd.js +835 -0
  67. package/dist/journeyDiagram-XKPGCS4Q-CMVu7VEd.js.map +1 -0
  68. package/dist/kanban-definition-3W4ZIXB7-CfanK5Eg.js +720 -0
  69. package/dist/kanban-definition-3W4ZIXB7-CfanK5Eg.js.map +1 -0
  70. package/dist/katex-Cj93GM5Y.js +11605 -0
  71. package/dist/katex-Cj93GM5Y.js.map +1 -0
  72. package/dist/layout-BC8VSiQq.js +1336 -0
  73. package/dist/layout-BC8VSiQq.js.map +1 -0
  74. package/dist/linear-GV5CIa17.js +260 -0
  75. package/dist/linear-GV5CIa17.js.map +1 -0
  76. package/dist/marzipan.d.ts +1 -2
  77. package/dist/marzipan.d.ts.map +1 -1
  78. package/dist/marzipan.js +1 -19
  79. package/dist/marzipan.js.map +1 -1
  80. package/dist/mermaid.core-cSWK5aGH.js +15302 -0
  81. package/dist/mermaid.core-cSWK5aGH.js.map +1 -0
  82. package/dist/mindmap-definition-VGOIOE7T-Vu_RTZar.js +785 -0
  83. package/dist/mindmap-definition-VGOIOE7T-Vu_RTZar.js.map +1 -0
  84. package/dist/parser.d.ts.map +1 -1
  85. package/dist/parser.js +6 -5
  86. package/dist/parser.js.map +1 -1
  87. package/dist/pieDiagram-ADFJNKIX-BUcd1l-6.js +162 -0
  88. package/dist/pieDiagram-ADFJNKIX-BUcd1l-6.js.map +1 -0
  89. package/dist/plugins/accentSwatchPlugin.d.ts +1 -1
  90. package/dist/plugins/accentSwatchPlugin.d.ts.map +1 -1
  91. package/dist/plugins/accentSwatchPlugin.js +162 -81
  92. package/dist/plugins/accentSwatchPlugin.js.map +1 -1
  93. package/dist/plugins/block-handles.d.ts +10 -2
  94. package/dist/plugins/block-handles.d.ts.map +1 -1
  95. package/dist/plugins/block-handles.js +77 -51
  96. package/dist/plugins/block-handles.js.map +1 -1
  97. package/dist/plugins/index.d.ts +0 -2
  98. package/dist/plugins/index.d.ts.map +1 -1
  99. package/dist/plugins/index.js +27 -29
  100. package/dist/plugins/index.js.map +1 -1
  101. package/dist/plugins/mermaidPlugin.js +1 -1
  102. package/dist/plugins/tinyHighlight.d.ts.map +1 -1
  103. package/dist/plugins/tinyHighlight.js +34 -22
  104. package/dist/plugins/tinyHighlight.js.map +1 -1
  105. package/dist/quadrantDiagram-AYHSOK5B-B1ekOH99.js +1023 -0
  106. package/dist/quadrantDiagram-AYHSOK5B-B1ekOH99.js.map +1 -0
  107. package/dist/requirementDiagram-UZGBJVZJ-BNcVcwNf.js +851 -0
  108. package/dist/requirementDiagram-UZGBJVZJ-BNcVcwNf.js.map +1 -0
  109. package/dist/sankeyDiagram-TZEHDZUN-BpHcdj5K.js +811 -0
  110. package/dist/sankeyDiagram-TZEHDZUN-BpHcdj5K.js.map +1 -0
  111. package/dist/sequenceDiagram-WL72ISMW-D5UyNvsv.js +2512 -0
  112. package/dist/sequenceDiagram-WL72ISMW-D5UyNvsv.js.map +1 -0
  113. package/dist/stateDiagram-FKZM4ZOC-C8DBscXu.js +264 -0
  114. package/dist/stateDiagram-FKZM4ZOC-C8DBscXu.js.map +1 -0
  115. package/dist/stateDiagram-v2-4FDKWEC3-CHqwUDPY.js +17 -0
  116. package/dist/stateDiagram-v2-4FDKWEC3-CHqwUDPY.js.map +1 -0
  117. package/dist/timeline-definition-IT6M3QCI-Dtg0oJbr.js +796 -0
  118. package/dist/timeline-definition-IT6M3QCI-Dtg0oJbr.js.map +1 -0
  119. package/dist/treemap-GDKQZRPO-rbQo3Em-.js +17926 -0
  120. package/dist/treemap-GDKQZRPO-rbQo3Em-.js.map +1 -0
  121. package/dist/xychartDiagram-PRI3JC2R-uNpgYSnV.js +1341 -0
  122. package/dist/xychartDiagram-PRI3JC2R-uNpgYSnV.js.map +1 -0
  123. package/docs/.vitepress/config.ts +1 -1
  124. package/docs/README.md +6 -8
  125. package/docs/TABLE_OF_CONTENTS.md +4 -1
  126. package/docs/api.md +262 -202
  127. package/docs/index.md +22 -19
  128. package/docs/plugins.md +27 -23
  129. package/package.json +1 -1
  130. package/docs/block-handles.md +0 -325
package/dist/index.js CHANGED
@@ -1,16 +1,15 @@
1
- import { BlockHandlesPlugin as Ce } from "./plugins/block-handles.js";
2
- import { i as ct } from "./index-DjXgvYA3.js";
3
- import { accentSwatchPlugin as dt, accentSwatchStyles as mt } from "./plugins/accentSwatchPlugin.js";
4
- import { imageManagerPlugin as ut, imageManagerStyles as ft } from "./plugins/imageManagerPlugin.js";
5
- import { imagePickerPlugin as bt } from "./plugins/imagePickerPlugin.js";
6
- import { mermaidPlugin as wt } from "./plugins/mermaidPlugin.js";
7
- import { mermaidExternalPlugin as yt } from "./plugins/mermaidExternal.js";
8
- import { tablePlugin as zt } from "./plugins/tablePlugin.js";
9
- import { tableGridPlugin as St, tableGridStyles as Ct } from "./plugins/tableGridPlugin.js";
10
- import { tableGeneratorPlugin as Tt } from "./plugins/tableGenerator.js";
11
- import { tinyHighlightPlugin as $t, tinyHighlightStyles as Mt } from "./plugins/tinyHighlight.js";
12
- import { b as Pt, r as _t } from "./table-DMIy93NJ.js";
13
- import { imagePickerPlugin as Bt } from "./plugins/imagePicker.js";
1
+ import { i as at } from "./index-kKw24iiA.js";
2
+ import { accentSwatchPlugin as ct, accentSwatchStyles as pt } from "./plugins/accentSwatchPlugin.js";
3
+ import { b as mt, r as ht } from "./table-DMIy93NJ.js";
4
+ import { imagePickerPlugin as ft } from "./plugins/imagePicker.js";
5
+ import { imageManagerPlugin as bt, imageManagerStyles as vt } from "./plugins/imageManagerPlugin.js";
6
+ import { imagePickerPlugin as kt } from "./plugins/imagePickerPlugin.js";
7
+ import { mermaidExternalPlugin as xt } from "./plugins/mermaidExternal.js";
8
+ import { mermaidPlugin as Lt } from "./plugins/mermaidPlugin.js";
9
+ import { tableGeneratorPlugin as Ct } from "./plugins/tableGenerator.js";
10
+ import { tableGridPlugin as Tt, tableGridStyles as Ht } from "./plugins/tableGridPlugin.js";
11
+ import { tablePlugin as Mt } from "./plugins/tablePlugin.js";
12
+ import { tinyHighlightPlugin as _t, tinyHighlightStyles as Pt } from "./plugins/tinyHighlight.js";
14
13
  const I = class I {
15
14
  /**
16
15
  * Reset link index (call before parsing a new document)
@@ -176,8 +175,8 @@ const I = class I {
176
175
  */
177
176
  static parseImages(e) {
178
177
  return e.replace(/!\[([^\]]*)\]\(([^\s)]+)(?:\s+"([^"]+)")?\)/g, (t, n, r, o) => {
179
- const s = this.sanitizeUrl(r), a = this.escapeHtml(n || ""), c = o ? ` title="${this.escapeHtml(o)}"` : "";
180
- return `<img src="${s}" alt="${a}"${c} class="marzipan-image" />`;
178
+ const s = this.sanitizeUrl(r), a = this.escapeHtml(n || ""), l = o ? ` title="${this.escapeHtml(o)}"` : "";
179
+ return `<img src="${s}" alt="${a}"${l} class="marzipan-image" />`;
181
180
  });
182
181
  }
183
182
  /**
@@ -220,13 +219,13 @@ const I = class I {
220
219
  const m = a.index + a[0].indexOf("](") + 2, u = m + a[2].length;
221
220
  o.push({ start: m, end: u });
222
221
  }
223
- const c = /(?<!`)(`+)(?!`)((?:(?!\1).)+?)(\1)(?!`)/g;
222
+ const l = /(?<!`)(`+)(?!`)((?:(?!\1).)+?)(\1)(?!`)/g;
224
223
  let p;
225
224
  const d = [];
226
- for (; (p = c.exec(e)) !== null; ) {
227
- const l = p.index, m = p.index + p[0].length;
225
+ for (; (p = l.exec(e)) !== null; ) {
226
+ const c = p.index, m = p.index + p[0].length;
228
227
  o.some(
229
- (h) => l >= h.start && m <= h.end
228
+ (h) => c >= h.start && m <= h.end
230
229
  ) || d.push({
231
230
  match: p[0],
232
231
  index: p.index,
@@ -235,29 +234,29 @@ const I = class I {
235
234
  closeTicks: p[3]
236
235
  });
237
236
  }
238
- return d.sort((l, m) => m.index - l.index), d.forEach((l) => {
237
+ return d.sort((c, m) => m.index - c.index), d.forEach((c) => {
239
238
  const m = `${n++}`;
240
239
  t.set(m, {
241
240
  type: "code",
242
- original: l.match,
243
- openTicks: l.openTicks,
244
- content: l.content,
245
- closeTicks: l.closeTicks
246
- }), r = r.substring(0, l.index) + m + r.substring(l.index + l.match.length);
247
- }), r = r.replace(/!\[([^\]]*)\]\(([^\s)]+)(?:\s+"([^"]+)")?\)/g, (l, m, u, h) => {
241
+ original: c.match,
242
+ openTicks: c.openTicks,
243
+ content: c.content,
244
+ closeTicks: c.closeTicks
245
+ }), r = r.substring(0, c.index) + m + r.substring(c.index + c.match.length);
246
+ }), r = r.replace(/!\[([^\]]*)\]\(([^\s)]+)(?:\s+"([^"]+)")?\)/g, (c, m, u, h) => {
248
247
  const f = `${n++}`;
249
248
  return t.set(f, {
250
249
  type: "image",
251
- original: l,
250
+ original: c,
252
251
  alt: m,
253
252
  url: u,
254
253
  title: h
255
254
  }), f;
256
- }), r = r.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (l, m, u) => {
255
+ }), r = r.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (c, m, u) => {
257
256
  const h = `${n++}`;
258
257
  return t.set(h, {
259
258
  type: "link",
260
- original: l,
259
+ original: c,
261
260
  linkText: m,
262
261
  url: u
263
262
  }), h;
@@ -279,18 +278,18 @@ const I = class I {
279
278
  if (o.type === "code")
280
279
  s = `<code><span class="syntax-marker">${o.openTicks}</span>${this.escapeHtml(o.content)}<span class="syntax-marker">${o.closeTicks}</span></code>`;
281
280
  else if (o.type === "image") {
282
- const a = this.sanitizeUrl(o.url), c = this.escapeHtml(o.alt || ""), p = o.title ? ` title="${this.escapeHtml(o.title)}"` : "";
283
- s = `<img src="${a}" alt="${c}"${p} class="marzipan-image" />`;
281
+ const a = this.sanitizeUrl(o.url), l = this.escapeHtml(o.alt || ""), p = o.title ? ` title="${this.escapeHtml(o.title)}"` : "";
282
+ s = `<img src="${a}" alt="${l}"${p} class="marzipan-image" />`;
284
283
  } else if (o.type === "link") {
285
284
  let a = o.linkText;
286
- t.forEach((d, l) => {
287
- if (a.includes(l) && d.type === "code") {
285
+ t.forEach((d, c) => {
286
+ if (a.includes(c) && d.type === "code") {
288
287
  const m = `<code><span class="syntax-marker">${d.openTicks}</span>${this.escapeHtml(d.content)}<span class="syntax-marker">${d.closeTicks}</span></code>`;
289
- a = a.replace(l, m);
288
+ a = a.replace(c, m);
290
289
  }
291
290
  }), a = this.parseStrikethrough(a), a = this.parseBold(a), a = this.parseItalic(a);
292
- const c = `--link-${this.linkIndex++}`;
293
- s = `<a href="${this.sanitizeUrl(o.url)}" style="anchor-name: ${c}"><span class="syntax-marker">[</span>${a}<span class="syntax-marker url-part">](${this.escapeHtml(o.url)})</span></a>`;
291
+ const l = `--link-${this.linkIndex++}`;
292
+ s = `<a href="${this.sanitizeUrl(o.url)}" style="anchor-name: ${l}"><span class="syntax-marker">[</span>${a}<span class="syntax-marker url-part">](${this.escapeHtml(o.url)})</span></a>`;
294
293
  }
295
294
  e = e.replace(r, s);
296
295
  }), e;
@@ -319,7 +318,10 @@ const I = class I {
319
318
  if (s)
320
319
  return r = "hr", o = ` data-block-id="${this.generateBlockId()}" data-block-type="${r}" data-line-start="${t}" data-line-end="${t}"`, s.replace("<div", `<div${o}`);
321
320
  const a = this.parseCodeBlock(n);
322
- return a ? (r = "code-fence", o = ` data-block-id="${this.generateBlockId()}" data-block-type="${r}" data-line-start="${t}" data-line-end="${t}"`, a.replace("<div", `<div${o}`)) : (n.match(/^<h[1-6]/) ? r = "heading" : n.includes('class="blockquote"') ? r = "quote" : (n.includes('class="bullet-list"') || n.includes('class="ordered-list"')) && (r = "list-item"), n = this.parseHeader(n), n = this.parseBlockquote(n), n = this.parseBulletList(n), n = this.parseNumberedList(n), n = this.parseInlineElements(n), o = ` data-block-id="${this.generateBlockId()}" data-block-type="${r}" data-line-start="${t}" data-line-end="${t}"`, n.trim() === "" ? `<div${o}>&nbsp;</div>` : `<div${o}>${n}</div>`);
321
+ if (a)
322
+ return r = "code-fence", o = ` data-block-id="${this.generateBlockId()}" data-block-type="${r}" data-line-start="${t}" data-line-end="${t}"`, a.replace("<div", `<div${o}`);
323
+ const l = e.trim();
324
+ return /^#{1,6}\s/.test(l) ? r = "heading" : /^>/.test(l) ? r = "quote" : (/^[-*+]\s/.test(l) || /^\d+\.\s/.test(l)) && (r = "list-item"), n = this.parseHeader(n), n = this.parseBlockquote(n), n = this.parseBulletList(n), n = this.parseNumberedList(n), n = this.parseInlineElements(n), o = ` data-block-id="${this.generateBlockId()}" data-block-type="${r}" data-line-start="${t}" data-line-end="${t}"`, n.trim() === "" ? `<div${o}>&nbsp;</div>` : `<div${o}>${n}</div>`;
323
325
  }
324
326
  /**
325
327
  * Parse full markdown text
@@ -333,23 +335,23 @@ const I = class I {
333
335
  const r = e.split(`
334
336
  `);
335
337
  let o = !1;
336
- const a = r.map((c, p) => {
338
+ const a = r.map((l, p) => {
337
339
  if (n && p === t) {
338
- const m = this.escapeHtml(c) || "&nbsp;";
340
+ const m = this.escapeHtml(l) || "&nbsp;";
339
341
  return `<div class="raw-line" data-block-id="${this.generateBlockId()}" data-block-type="paragraph" data-line-start="${p}" data-line-end="${p}">${m}</div>`;
340
342
  }
341
- if (/^```[^`]*$/.test(c))
342
- return o = !o, this.parseLine(c, p);
343
+ if (/^```[^`]*$/.test(l))
344
+ return o = !o, this.parseLine(l, p);
343
345
  if (o) {
344
- const m = this.escapeHtml(c), u = this.preserveIndentation(m, c);
346
+ const m = this.escapeHtml(l), u = this.preserveIndentation(m, l);
345
347
  return `<div data-block-id="${this.generateBlockId()}" data-block-type="code-content" data-line-start="${p}" data-line-end="${p}">${u || "&nbsp;"}</div>`;
346
348
  }
347
- const l = this.escapeHtml(c);
348
- if (this.isTableRow(l)) {
349
+ const c = this.escapeHtml(l);
350
+ if (this.isTableRow(c)) {
349
351
  const m = this.generateBlockId();
350
- return this.isTableSeparator(l) ? `<div class="table-separator" data-block-id="${m}" data-block-type="table-separator" data-line-start="${p}" data-line-end="${p}">${l}</div>` : `<div class="table-row" data-block-id="${m}" data-block-type="table-row" data-line-start="${p}" data-line-end="${p}">${l}</div>`;
352
+ return this.isTableSeparator(c) ? `<div class="table-separator" data-block-id="${m}" data-block-type="table-separator" data-line-start="${p}" data-line-end="${p}">${c}</div>` : `<div class="table-row" data-block-id="${m}" data-block-type="table-row" data-line-start="${p}" data-line-end="${p}">${c}</div>`;
351
353
  }
352
- return this.parseLine(c, p);
354
+ return this.parseLine(l, p);
353
355
  }).join("");
354
356
  return this.postProcessHTML(a);
355
357
  }
@@ -363,28 +365,28 @@ const I = class I {
363
365
  return this.postProcessHTMLManual(e);
364
366
  const t = document.createElement("div");
365
367
  t.innerHTML = e;
366
- let n = null, r = null, o = null, s = !1, a = null, c = !1;
368
+ let n = null, r = null, o = null, s = !1, a = null, l = !1;
367
369
  const p = Array.from(t.children);
368
370
  for (let d = 0; d < p.length; d++) {
369
- const l = p[d];
370
- if (!l.parentNode) continue;
371
- if (l.classList && (l.classList.contains("table-row") || l.classList.contains("table-separator"))) {
372
- if (l.classList.contains("table-separator")) {
371
+ const c = p[d];
372
+ if (!c.parentNode) continue;
373
+ if (c.classList && (c.classList.contains("table-row") || c.classList.contains("table-separator"))) {
374
+ if (c.classList.contains("table-separator")) {
373
375
  if (!a) {
374
- l.remove();
376
+ c.remove();
375
377
  continue;
376
378
  }
377
- c = !1, l.remove();
379
+ l = !1, c.remove();
378
380
  continue;
379
381
  }
380
- a || (a = document.createElement("table"), a.className = "marzipan-table", t.insertBefore(a, l), c = !0);
381
- const f = l.textContent, g = c ? "th" : "td", b = this.parseTableRow(f, g);
382
+ a || (a = document.createElement("table"), a.className = "marzipan-table", t.insertBefore(a, c), l = !0);
383
+ const f = c.textContent, g = l ? "th" : "td", b = this.parseTableRow(f, g);
382
384
  let v;
383
- c ? (v = a.querySelector("thead"), v || (v = document.createElement("thead"), a.appendChild(v))) : (v = a.querySelector("tbody"), v || (v = document.createElement("tbody"), a.appendChild(v))), v.innerHTML += b, l.remove();
385
+ l ? (v = a.querySelector("thead"), v || (v = document.createElement("thead"), a.appendChild(v))) : (v = a.querySelector("tbody"), v || (v = document.createElement("tbody"), a.appendChild(v))), v.innerHTML += b, c.remove();
384
386
  continue;
385
387
  } else
386
- a = null, c = !1;
387
- const m = l.querySelector(".code-fence");
388
+ a = null, l = !1;
389
+ const m = c.querySelector(".code-fence");
388
390
  if (m) {
389
391
  const h = m.textContent;
390
392
  if (h.startsWith("```"))
@@ -396,36 +398,36 @@ const I = class I {
396
398
  const f = document.createElement("code");
397
399
  o.appendChild(f), o.className = "code-block";
398
400
  const g = h.slice(3).trim();
399
- g && (f.className = `language-${g}`), t.insertBefore(o, l.nextSibling), o._codeElement = f;
401
+ g && (f.className = `language-${g}`), t.insertBefore(o, c.nextSibling), o._codeElement = f;
400
402
  continue;
401
403
  }
402
404
  }
403
- if (s && o && l.tagName === "DIV" && !l.querySelector(".code-fence")) {
405
+ if (s && o && c.tagName === "DIV" && !c.querySelector(".code-fence")) {
404
406
  const h = o._codeElement || o.querySelector("code");
405
407
  h.textContent.length > 0 && (h.textContent += `
406
408
  `);
407
- const f = l.textContent.replace(/\u00A0/g, " ");
408
- h.textContent += f, l.remove();
409
+ const f = c.textContent.replace(/\u00A0/g, " ");
410
+ h.textContent += f, c.remove();
409
411
  continue;
410
412
  }
411
413
  let u = null;
412
- if (l.tagName === "DIV" && (u = l.querySelector("li")), u) {
414
+ if (c.tagName === "DIV" && (u = c.querySelector("li")), u) {
413
415
  const h = u.classList.contains("bullet-list"), f = u.classList.contains("ordered-list");
414
416
  if (!h && !f) {
415
417
  n = null, r = null;
416
418
  continue;
417
419
  }
418
420
  const g = h ? "ul" : "ol";
419
- (!n || r !== g) && (n = document.createElement(g), t.insertBefore(n, l), r = g);
421
+ (!n || r !== g) && (n = document.createElement(g), t.insertBefore(n, c), r = g);
420
422
  const b = [];
421
- for (const v of l.childNodes)
423
+ for (const v of c.childNodes)
422
424
  if (v.nodeType === 3 && v.textContent.match(/^\u00A0+$/))
423
425
  b.push(v.cloneNode(!0));
424
426
  else if (v === u)
425
427
  break;
426
428
  b.forEach((v) => {
427
429
  u.insertBefore(v, u.firstChild);
428
- }), n.appendChild(u), l.remove();
430
+ }), n.appendChild(u), c.remove();
429
431
  } else
430
432
  n = null, r = null;
431
433
  }
@@ -441,9 +443,9 @@ const I = class I {
441
443
  t = t.replace(/((?:<div>(?:&nbsp;)*<li class="bullet-list">.*?<\/li><\/div>\s*)+)/gs, (r) => {
442
444
  const o = r.match(/<div>(?:&nbsp;)*<li class="bullet-list">.*?<\/li><\/div>/gs) || [];
443
445
  return o.length > 0 ? "<ul>" + o.map((a) => {
444
- const c = a.match(/<div>((?:&nbsp;)*)<li/), p = a.match(/<li class="bullet-list">.*?<\/li>/);
445
- if (c && p) {
446
- const d = c[1];
446
+ const l = a.match(/<div>((?:&nbsp;)*)<li/), p = a.match(/<li class="bullet-list">.*?<\/li>/);
447
+ if (l && p) {
448
+ const d = l[1];
447
449
  return p[0].replace(/<li class="bullet-list">/, `<li class="bullet-list">${d}`);
448
450
  }
449
451
  return p ? p[0] : "";
@@ -451,9 +453,9 @@ const I = class I {
451
453
  }), t = t.replace(/((?:<div>(?:&nbsp;)*<li class="ordered-list">.*?<\/li><\/div>\s*)+)/gs, (r) => {
452
454
  const o = r.match(/<div>(?:&nbsp;)*<li class="ordered-list">.*?<\/li><\/div>/gs) || [];
453
455
  return o.length > 0 ? "<ol>" + o.map((a) => {
454
- const c = a.match(/<div>((?:&nbsp;)*)<li/), p = a.match(/<li class="ordered-list">.*?<\/li>/);
455
- if (c && p) {
456
- const d = c[1];
456
+ const l = a.match(/<div>((?:&nbsp;)*)<li/), p = a.match(/<li class="ordered-list">.*?<\/li>/);
457
+ if (l && p) {
458
+ const d = l[1];
457
459
  return p[0].replace(/<li class="ordered-list">/, `<li class="ordered-list">${d}`);
458
460
  }
459
461
  return p ? p[0] : "";
@@ -462,9 +464,9 @@ const I = class I {
462
464
  const n = /<div><span class="code-fence">(```[^<]*)<\/span><\/div>(.*?)<div><span class="code-fence">(```)<\/span><\/div>/gs;
463
465
  return t = t.replace(n, (r, o, s, a) => {
464
466
  const p = (s.match(/<div>(.*?)<\/div>/gs) || []).map((u) => u.replace(/<div>(.*?)<\/div>/s, "$1").replace(/&nbsp;/g, " ")).join(`
465
- `), d = o.slice(3).trim(), l = d ? ` class="language-${d}"` : "";
467
+ `), d = o.slice(3).trim(), c = d ? ` class="language-${d}"` : "";
466
468
  let m = `<div><span class="code-fence">${o}</span></div>`;
467
- return m += `<pre class="code-block"><code${l}>${p}</code></pre>`, m += `<div><span class="code-fence">${a}</span></div>`, m;
469
+ return m += `<pre class="code-block"><code${c}>${p}</code></pre>`, m += `<div><span class="code-fence">${a}</span></div>`, m;
468
470
  }), t;
469
471
  }
470
472
  /**
@@ -485,7 +487,7 @@ const I = class I {
485
487
  }
486
488
  r += u + 1;
487
489
  }
488
- const a = n[o], c = s + a.length, p = a.match(this.LIST_PATTERNS.checkbox);
490
+ const a = n[o], l = s + a.length, p = a.match(this.LIST_PATTERNS.checkbox);
489
491
  if (p)
490
492
  return {
491
493
  inList: !0,
@@ -495,7 +497,7 @@ const I = class I {
495
497
  checked: p[2] === "x",
496
498
  content: p[3],
497
499
  lineStart: s,
498
- lineEnd: c,
500
+ lineEnd: l,
499
501
  markerEndPos: s + p[1].length + p[2].length + 5
500
502
  // indent + "- [ ] "
501
503
  };
@@ -508,20 +510,20 @@ const I = class I {
508
510
  marker: d[2],
509
511
  content: d[3],
510
512
  lineStart: s,
511
- lineEnd: c,
513
+ lineEnd: l,
512
514
  markerEndPos: s + d[1].length + d[2].length + 1
513
515
  // indent + marker + space
514
516
  };
515
- const l = a.match(this.LIST_PATTERNS.numbered);
516
- return l ? {
517
+ const c = a.match(this.LIST_PATTERNS.numbered);
518
+ return c ? {
517
519
  inList: !0,
518
520
  listType: "numbered",
519
- indent: l[1],
520
- marker: parseInt(l[2]),
521
- content: l[3],
521
+ indent: c[1],
522
+ marker: parseInt(c[2]),
523
+ content: c[3],
522
524
  lineStart: s,
523
- lineEnd: c,
524
- markerEndPos: s + l[1].length + l[2].length + 2
525
+ lineEnd: l,
526
+ markerEndPos: s + c[1].length + c[2].length + 2
525
527
  // indent + number + ". "
526
528
  } : {
527
529
  inList: !1,
@@ -530,7 +532,7 @@ const I = class I {
530
532
  marker: null,
531
533
  content: a,
532
534
  lineStart: s,
533
- lineEnd: c,
535
+ lineEnd: l,
534
536
  markerEndPos: s
535
537
  };
536
538
  }
@@ -563,13 +565,13 @@ const I = class I {
563
565
  return t.map((s) => {
564
566
  const a = s.match(this.LIST_PATTERNS.numbered);
565
567
  if (a) {
566
- const c = a[1], p = c.length, d = a[3];
568
+ const l = a[1], p = l.length, d = a[3];
567
569
  r || n.clear();
568
- const l = (n.get(p) || 0) + 1;
569
- n.set(p, l);
570
+ const c = (n.get(p) || 0) + 1;
571
+ n.set(p, c);
570
572
  for (const [m] of n)
571
573
  m > p && n.delete(m);
572
- return r = !0, `${c}${l}. ${d}`;
574
+ return r = !0, `${l}${c}. ${d}`;
573
575
  } else
574
576
  return (s.trim() === "" || !s.match(/^\s/)) && (r = !1, n.clear()), s;
575
577
  }).join(`
@@ -637,7 +639,7 @@ const L = {
637
639
  header5: { prefix: "##### " },
638
640
  header6: { prefix: "###### " }
639
641
  };
640
- function Ee() {
642
+ function Ce() {
641
643
  return {
642
644
  prefix: "",
643
645
  suffix: "",
@@ -655,7 +657,7 @@ function Ee() {
655
657
  }
656
658
  function E(i) {
657
659
  const e = {
658
- ...Ee(),
660
+ ...Ce(),
659
661
  ...i
660
662
  };
661
663
  return e.scanFor = i.scanFor ?? null, e;
@@ -701,14 +703,14 @@ function T(i, e) {
701
703
  `).length,
702
704
  "lines"
703
705
  );
704
- } catch (c) {
705
- x = !1, t && console.log("execCommand threw error:", c);
706
+ } catch (l) {
707
+ x = !1, t && console.log("execCommand threw error:", l);
706
708
  }
707
709
  i.contentEditable = "false";
708
710
  }
709
711
  if (t && (console.log("canInsertText before:", x), console.log("execCommand result:", x)), x) {
710
- const c = o + e.text + s, p = i.value;
711
- t && (console.log("Expected length:", c.length), console.log("Actual length:", p.length)), p !== c && t && (console.log("execCommand changed the value but not as expected"), console.log("Expected:", JSON.stringify(c.slice(0, 100))), console.log("Actual:", JSON.stringify(p.slice(0, 100))));
712
+ const l = o + e.text + s, p = i.value;
713
+ t && (console.log("Expected length:", l.length), console.log("Actual length:", p.length)), p !== l && t && (console.log("execCommand changed the value but not as expected"), console.log("Expected:", JSON.stringify(l.slice(0, 100))), console.log("Actual:", JSON.stringify(p.slice(0, 100))));
712
714
  }
713
715
  if (!x)
714
716
  if (t && console.log("Using manual insertion"), i.value === a) {
@@ -739,20 +741,20 @@ function pe(i) {
739
741
  break;
740
742
  }
741
743
  }
742
- function Te() {
744
+ function Ee() {
743
745
  return x === !0 ? "native" : x === !1 ? "manual" : "auto";
744
746
  }
745
747
  function O(i) {
746
748
  return i.trim().split(`
747
749
  `).length > 1;
748
750
  }
749
- function He(i, e) {
751
+ function Te(i, e) {
750
752
  let t = e;
751
753
  for (; i[t] && i[t - 1] != null && !/\s/.test(i[t - 1]); )
752
754
  t -= 1;
753
755
  return t;
754
756
  }
755
- function $e(i, e, t) {
757
+ function He(i, e, t) {
756
758
  let n = e;
757
759
  const r = t ? /\n/ : /\s/;
758
760
  for (; i[n] && !r.test(i[n]); )
@@ -768,9 +770,9 @@ function de(i) {
768
770
  i.selectionStart >= t && i.selectionStart < t + r && (i.selectionStart = t), i.selectionEnd >= t && i.selectionEnd < t + r && (n === e.length - 1 ? i.selectionEnd = Math.min(t + e[n].length, i.value.length) : i.selectionEnd = t + r - 1), t += r;
769
771
  }
770
772
  }
771
- function Me(i, e, t, n = !1) {
773
+ function $e(i, e, t, n = !1) {
772
774
  if (i.selectionStart === i.selectionEnd)
773
- i.selectionStart = He(i.value, i.selectionStart), i.selectionEnd = $e(i.value, i.selectionEnd, n);
775
+ i.selectionStart = Te(i.value, i.selectionStart), i.selectionEnd = He(i.value, i.selectionEnd, n);
774
776
  else {
775
777
  const r = i.selectionStart - e.length, o = i.selectionEnd + t.length, s = i.value.slice(r, i.selectionStart) === e, a = i.value.slice(i.selectionEnd, o) === t;
776
778
  s && a && (i.selectionStart = r, i.selectionEnd = o);
@@ -779,10 +781,10 @@ function Me(i, e, t, n = !1) {
779
781
  }
780
782
  function U(i) {
781
783
  const e = i.value.slice(0, i.selectionStart), t = i.value.slice(i.selectionEnd), n = e.match(/\n*$/), r = t.match(/^\n*/), o = n ? n[0].length : 0, s = r ? r[0].length : 0;
782
- let a = "", c = "";
784
+ let a = "", l = "";
783
785
  return /\S/.test(e) && o < 2 && (a = `
784
- `.repeat(2 - o)), /\S/.test(t) && s < 2 && (c = `
785
- `.repeat(2 - s)), { newlinesToAppend: a, newlinesToPrepend: c };
786
+ `.repeat(2 - o)), /\S/.test(t) && s < 2 && (l = `
787
+ `.repeat(2 - s)), { newlinesToAppend: a, newlinesToPrepend: l };
786
788
  }
787
789
  function me(i, e) {
788
790
  const t = i.selectionStart, n = i.selectionEnd, r = i.scrollTop;
@@ -802,29 +804,29 @@ function j(i, e, t = {}) {
802
804
  i.selectionStart = a, i.selectionEnd = p;
803
805
  } else
804
806
  de(i);
805
- const c = e(i);
807
+ const l = e(i);
806
808
  if (t.adjustSelection) {
807
- const p = i.value.slice(i.selectionStart, i.selectionEnd), d = t.prefix ?? "", l = d.length > 0 && p.startsWith(d), m = t.adjustSelection(
808
- l,
809
+ const p = i.value.slice(i.selectionStart, i.selectionEnd), d = t.prefix ?? "", c = d.length > 0 && p.startsWith(d), m = t.adjustSelection(
810
+ c,
809
811
  n,
810
812
  r,
811
813
  a
812
814
  );
813
- return c.selectionStart = m.start, c.selectionEnd = m.end, c;
815
+ return l.selectionStart = m.start, l.selectionEnd = m.end, l;
814
816
  }
815
817
  if (t.prefix) {
816
818
  const d = i.value.slice(i.selectionStart, i.selectionEnd).startsWith(t.prefix);
817
819
  if (o)
818
820
  if (d) {
819
- const l = Math.max(n - t.prefix.length, a);
820
- c.selectionStart = l, c.selectionEnd = l;
821
+ const c = Math.max(n - t.prefix.length, a);
822
+ l.selectionStart = c, l.selectionEnd = c;
821
823
  } else {
822
- const l = n + t.prefix.length;
823
- c.selectionStart = l, c.selectionEnd = l;
824
+ const c = n + t.prefix.length;
825
+ l.selectionStart = c, l.selectionEnd = c;
824
826
  }
825
- else d ? (c.selectionStart = Math.max(n - t.prefix.length, a), c.selectionEnd = Math.max(r - t.prefix.length, a)) : (c.selectionStart = n + t.prefix.length, c.selectionEnd = r + t.prefix.length);
827
+ else d ? (l.selectionStart = Math.max(n - t.prefix.length, a), l.selectionEnd = Math.max(r - t.prefix.length, a)) : (l.selectionStart = n + t.prefix.length, l.selectionEnd = r + t.prefix.length);
826
828
  }
827
- return c;
829
+ return l;
828
830
  }
829
831
  function M(i, e) {
830
832
  const {
@@ -834,10 +836,10 @@ function M(i, e) {
834
836
  blockSuffix: o,
835
837
  replaceNext: s,
836
838
  prefixSpace: a,
837
- scanFor: c,
839
+ scanFor: l,
838
840
  surroundWithNewlines: p,
839
841
  trimFirst: d
840
- } = e, l = i.selectionStart, m = i.selectionEnd;
842
+ } = e, c = i.selectionStart, m = i.selectionEnd;
841
843
  let u = i.value.slice(i.selectionStart, i.selectionEnd), h = O(u) && r && r.length > 0 ? `${r}
842
844
  ` : t, f = O(u) && o && o.length > 0 ? `
843
845
  ${o}` : n;
@@ -845,7 +847,7 @@ ${o}` : n;
845
847
  const z = i.value[i.selectionStart - 1];
846
848
  i.selectionStart !== 0 && z != null && !/\s/.test(z) && (h = ` ${h}`);
847
849
  }
848
- u = Me(i, h, f, e.multiline);
850
+ u = $e(i, h, f, e.multiline);
849
851
  let g = i.selectionStart, b = i.selectionEnd;
850
852
  const v = !!s && s.length > 0 && f.includes(s) && u.length > 0;
851
853
  let y = "", Y = "";
@@ -855,8 +857,8 @@ ${o}` : n;
855
857
  }
856
858
  if (u.startsWith(h) && u.endsWith(f)) {
857
859
  const z = u.slice(h.length, u.length - f.length);
858
- if (l === m) {
859
- let S = l - h.length;
860
+ if (c === m) {
861
+ let S = c - h.length;
860
862
  S = Math.max(S, g), S = Math.min(S, g + z.length), g = S, b = S;
861
863
  } else
862
864
  b = g + z.length;
@@ -864,7 +866,7 @@ ${o}` : n;
864
866
  }
865
867
  if (!v) {
866
868
  let z = h + u + f;
867
- g = l + h.length, b = m + h.length;
869
+ g = c + h.length, b = m + h.length;
868
870
  const S = u.match(/^\s*|\s*$/g);
869
871
  if (d && S) {
870
872
  const ee = S[0] ?? "", te = S[1] ?? "";
@@ -872,7 +874,7 @@ ${o}` : n;
872
874
  }
873
875
  return { text: z, selectionStart: g, selectionEnd: b };
874
876
  }
875
- if (c && (typeof c == "string" ? new RegExp(c) : c).test(u)) {
877
+ if (l && (typeof l == "string" ? new RegExp(l) : l).test(u)) {
876
878
  const S = h + f.replace(s, u);
877
879
  return g = g + h.length, b = g, { text: S, selectionStart: g, selectionEnd: b };
878
880
  }
@@ -882,18 +884,18 @@ ${o}` : n;
882
884
  function D(i, e) {
883
885
  const { prefix: t, suffix: n, surroundWithNewlines: r } = e;
884
886
  let o = i.value.slice(i.selectionStart, i.selectionEnd), s = i.selectionStart, a = i.selectionEnd;
885
- const c = o.split(`
887
+ const l = o.split(`
886
888
  `);
887
- if (c.every((d) => d.startsWith(t) && (!n || d.endsWith(n))))
888
- o = c.map((d) => {
889
- let l = d.slice(t.length);
890
- return n && (l = l.slice(0, l.length - n.length)), l;
889
+ if (l.every((d) => d.startsWith(t) && (!n || d.endsWith(n))))
890
+ o = l.map((d) => {
891
+ let c = d.slice(t.length);
892
+ return n && (c = c.slice(0, c.length - n.length)), c;
891
893
  }).join(`
892
894
  `), a = s + o.length;
893
- else if (o = c.map((d) => t + d + (n ?? "")).join(`
895
+ else if (o = l.map((d) => t + d + (n ?? "")).join(`
894
896
  `), r) {
895
- const { newlinesToAppend: d, newlinesToPrepend: l } = U(i);
896
- s += d.length, a = s + o.length, o = d + o + l;
897
+ const { newlinesToAppend: d, newlinesToPrepend: c } = U(i);
898
+ s += d.length, a = s + o.length, o = d + o + c;
897
899
  }
898
900
  return { text: o, selectionStart: s, selectionEnd: a };
899
901
  }
@@ -915,45 +917,45 @@ function ie(i) {
915
917
  processed: n
916
918
  };
917
919
  }
918
- function _(i, e) {
920
+ function P(i, e) {
919
921
  return e ? "- " : `${i + 1}. `;
920
922
  }
921
- function Ae(i, e) {
923
+ function Me(i, e) {
922
924
  let t, n, r;
923
925
  return i.orderedList ? (t = ne(e), n = ie(t.text), r = n.text) : (t = ie(e), n = ne(t.text), r = n.text), [t, n, r];
924
926
  }
925
- function Pe(i, e) {
927
+ function Ae(i, e) {
926
928
  const t = i.selectionStart === i.selectionEnd;
927
929
  let n = i.selectionStart, r = i.selectionEnd;
928
930
  de(i);
929
- const o = i.value.slice(i.selectionStart, i.selectionEnd), [s, a, c] = Ae(e, o), p = c.split(`
930
- `).map((f, g) => `${_(g, e.unorderedList)}${f}`), d = p.reduce((f, g, b) => f + _(b, e.unorderedList).length, 0), l = p.reduce((f, g, b) => f + _(b, !e.unorderedList).length, 0);
931
+ const o = i.value.slice(i.selectionStart, i.selectionEnd), [s, a, l] = Me(e, o), p = l.split(`
932
+ `).map((f, g) => `${P(g, e.unorderedList)}${f}`), d = p.reduce((f, g, b) => f + P(b, e.unorderedList).length, 0), c = p.reduce((f, g, b) => f + P(b, !e.unorderedList).length, 0);
931
933
  if (s.processed)
932
- return t ? (n = Math.max(n - _(0, e.unorderedList).length, 0), r = n) : (n = i.selectionStart, r = i.selectionEnd - d), { text: c, selectionStart: n, selectionEnd: r };
934
+ return t ? (n = Math.max(n - P(0, e.unorderedList).length, 0), r = n) : (n = i.selectionStart, r = i.selectionEnd - d), { text: l, selectionStart: n, selectionEnd: r };
933
935
  const { newlinesToAppend: m, newlinesToPrepend: u } = U(i), h = m + p.join(`
934
936
  `) + u;
935
937
  return t ? (n = Math.max(
936
- n + _(0, e.unorderedList).length + m.length,
938
+ n + P(0, e.unorderedList).length + m.length,
937
939
  0
938
- ), r = n) : a.processed ? (n = Math.max(i.selectionStart + m.length, 0), r = i.selectionEnd + m.length + d - l) : (n = Math.max(i.selectionStart + m.length, 0), r = i.selectionEnd + m.length + d), { text: h, selectionStart: n, selectionEnd: r };
940
+ ), r = n) : a.processed ? (n = Math.max(i.selectionStart + m.length, 0), r = i.selectionEnd + m.length + d - c) : (n = Math.max(i.selectionStart + m.length, 0), r = i.selectionEnd + m.length + d), { text: h, selectionStart: n, selectionEnd: r };
939
941
  }
940
942
  function he(i, e) {
941
943
  const t = j(
942
944
  i,
943
- (n) => Pe(n, e),
945
+ (n) => Ae(n, e),
944
946
  {
945
947
  adjustSelection: (n, r, o, s) => {
946
- const a = i.value.slice(s, i.selectionEnd), c = /^\d+\.\s+/, p = /^- /, d = c.test(a), l = p.test(a), m = e.orderedList && d || e.unorderedList && l;
948
+ const a = i.value.slice(s, i.selectionEnd), l = /^\d+\.\s+/, p = /^- /, d = l.test(a), c = p.test(a), m = e.orderedList && d || e.unorderedList && c;
947
949
  if (r === o) {
948
950
  if (m) {
949
- const f = a.match(e.orderedList ? c : p), g = f ? f[0].length : 0;
951
+ const f = a.match(e.orderedList ? l : p), g = f ? f[0].length : 0;
950
952
  return {
951
953
  start: Math.max(r - g, s),
952
954
  end: Math.max(r - g, s)
953
955
  };
954
956
  }
955
- if (d || l) {
956
- const f = a.match(d ? c : p), g = f ? f[0].length : 0, v = (e.unorderedList ? 2 : 3) - g;
957
+ if (d || c) {
958
+ const f = a.match(d ? l : p), g = f ? f[0].length : 0, v = (e.unorderedList ? 2 : 3) - g;
957
959
  return {
958
960
  start: r + v,
959
961
  end: r + v
@@ -966,14 +968,14 @@ function he(i, e) {
966
968
  };
967
969
  }
968
970
  if (m) {
969
- const h = a.match(e.orderedList ? c : p), f = h ? h[0].length : 0;
971
+ const h = a.match(e.orderedList ? l : p), f = h ? h[0].length : 0;
970
972
  return {
971
973
  start: Math.max(r - f, s),
972
974
  end: Math.max(o - f, s)
973
975
  };
974
976
  }
975
- if (d || l) {
976
- const h = a.match(d ? c : p), f = h ? h[0].length : 0, b = (e.unorderedList ? 2 : 3) - f;
977
+ if (d || c) {
978
+ const h = a.match(d ? l : p), f = h ? h[0].length : 0, b = (e.unorderedList ? 2 : 3) - f;
977
979
  return {
978
980
  start: r + b,
979
981
  end: o + b
@@ -1001,29 +1003,29 @@ function q(i) {
1001
1003
  const e = [], { selectionStart: t, selectionEnd: n, value: r } = i, o = r.split(`
1002
1004
  `);
1003
1005
  let s = 0, a = "";
1004
- for (const l of o) {
1005
- if (t >= s && t <= s + l.length) {
1006
- a = l;
1006
+ for (const c of o) {
1007
+ if (t >= s && t <= s + c.length) {
1008
+ a = c;
1007
1009
  break;
1008
1010
  }
1009
- s += l.length + 1;
1011
+ s += c.length + 1;
1010
1012
  }
1011
1013
  a.startsWith("- ") && (a.startsWith("- [ ] ") || a.startsWith("- [x] ") ? e.push("task-list") : e.push("bullet-list")), /^\d+\.\s/.test(a) && e.push("numbered-list"), a.startsWith("> ") && e.push("quote"), a.startsWith("### ") ? e.push("header-3") : a.startsWith("## ") ? e.push("header-2") : a.startsWith("# ") && e.push("header");
1012
- const c = Math.max(0, t - 10), p = Math.min(r.length, n + 10), d = r.slice(c, p);
1014
+ const l = Math.max(0, t - 10), p = Math.min(r.length, n + 10), d = r.slice(l, p);
1013
1015
  if (d.includes("**")) {
1014
- const l = r.slice(Math.max(0, t - 100), t), m = r.slice(n, Math.min(r.length, n + 100)), u = l.lastIndexOf("**"), h = m.indexOf("**");
1016
+ const c = r.slice(Math.max(0, t - 100), t), m = r.slice(n, Math.min(r.length, n + 100)), u = c.lastIndexOf("**"), h = m.indexOf("**");
1015
1017
  u !== -1 && h !== -1 && e.push("bold");
1016
1018
  }
1017
1019
  if (d.includes("_")) {
1018
- const l = r.slice(Math.max(0, t - 100), t), m = r.slice(n, Math.min(r.length, n + 100)), u = l.lastIndexOf("_"), h = m.indexOf("_");
1020
+ const c = r.slice(Math.max(0, t - 100), t), m = r.slice(n, Math.min(r.length, n + 100)), u = c.lastIndexOf("_"), h = m.indexOf("_");
1019
1021
  u !== -1 && h !== -1 && e.push("italic");
1020
1022
  }
1021
1023
  if (d.includes("`")) {
1022
- const l = r.slice(Math.max(0, t - 100), t), m = r.slice(n, Math.min(r.length, n + 100));
1023
- l.includes("`") && m.includes("`") && e.push("code");
1024
+ const c = r.slice(Math.max(0, t - 100), t), m = r.slice(n, Math.min(r.length, n + 100));
1025
+ c.includes("`") && m.includes("`") && e.push("code");
1024
1026
  }
1025
1027
  if (d.includes("[") && d.includes("]")) {
1026
- const l = r.slice(Math.max(0, t - 100), t), m = r.slice(n, Math.min(r.length, n + 100)), u = l.lastIndexOf("["), h = m.indexOf("]");
1028
+ const c = r.slice(Math.max(0, t - 100), t), m = r.slice(n, Math.min(r.length, n + 100)), u = c.lastIndexOf("["), h = m.indexOf("]");
1027
1029
  u !== -1 && h !== -1 && r.slice(n + h + 1, n + h + 10).startsWith("(") && e.push("link");
1028
1030
  }
1029
1031
  return e;
@@ -1035,31 +1037,31 @@ function fe(i, e = {}) {
1035
1037
  if (!i) return;
1036
1038
  const { toWord: t, toLine: n, toFormat: r } = e, { selectionStart: o, selectionEnd: s, value: a } = i;
1037
1039
  if (n) {
1038
- const c = a.split(`
1040
+ const l = a.split(`
1039
1041
  `);
1040
- let p = 0, d = 0, l = 0;
1041
- for (const m of c) {
1042
- if (o >= l && o <= l + m.length) {
1043
- p = l, d = l + m.length;
1042
+ let p = 0, d = 0, c = 0;
1043
+ for (const m of l) {
1044
+ if (o >= c && o <= c + m.length) {
1045
+ p = c, d = c + m.length;
1044
1046
  break;
1045
1047
  }
1046
- l += m.length + 1;
1048
+ c += m.length + 1;
1047
1049
  }
1048
1050
  i.selectionStart = p, i.selectionEnd = d;
1049
1051
  return;
1050
1052
  }
1051
1053
  if (r && _e(a.slice(o, s), r)) {
1052
- const c = L[r], p = (c.prefix ?? "").length, d = (c.suffix ?? "").length;
1054
+ const l = L[r], p = (l.prefix ?? "").length, d = (l.suffix ?? "").length;
1053
1055
  i.selectionStart = Math.max(0, o - p), i.selectionEnd = Math.min(a.length, s + d);
1054
1056
  return;
1055
1057
  }
1056
1058
  if (t && o === s) {
1057
- let c = o, p = s;
1058
- for (; c > 0 && !/\s/.test(a[c - 1]); )
1059
- c -= 1;
1059
+ let l = o, p = s;
1060
+ for (; l > 0 && !/\s/.test(a[l - 1]); )
1061
+ l -= 1;
1060
1062
  for (; p < a.length && !/\s/.test(a[p]); )
1061
1063
  p += 1;
1062
- i.selectionStart = c, i.selectionEnd = p;
1064
+ i.selectionStart = l, i.selectionEnd = p;
1063
1065
  }
1064
1066
  }
1065
1067
  function C(i) {
@@ -1144,7 +1146,7 @@ function ve(i) {
1144
1146
  `;
1145
1147
  i.setRangeText(o, e, i.selectionEnd, "end"), i.dispatchEvent(new Event("input", { bubbles: !0 }));
1146
1148
  }
1147
- function Ie(i, e, t) {
1149
+ function Pe(i, e, t) {
1148
1150
  let n = e;
1149
1151
  for (; n > 0 && i[n - 1] !== `
1150
1152
  `; )
@@ -1160,10 +1162,10 @@ function R(i, e = 1, t = !1) {
1160
1162
  (e < 1 || e > 6) && (e = 1), k("insertHeader", "============ START ============"), k("insertHeader", `Level: ${e}, Toggle: ${t}`), k("insertHeader", `Initial cursor: ${i.selectionStart}-${i.selectionEnd}`);
1161
1163
  const n = `header${e === 1 ? "1" : e}`, r = E(L[n] || L.header1);
1162
1164
  k("insertHeader", `Style prefix: "${r.prefix}"`);
1163
- const o = i.value, s = i.selectionStart, a = i.selectionEnd, { lineStart: c, lineEnd: p } = Ie(o, s, a), d = o.slice(c, p);
1165
+ const o = i.value, s = i.selectionStart, a = i.selectionEnd, { lineStart: l, lineEnd: p } = Pe(o, s, a), d = o.slice(l, p);
1164
1166
  k("insertHeader", `Current line (before): "${d}"`);
1165
- const l = d.match(/^(#{1,6})\s*/), m = l ? l[1].length : 0, u = l ? l[0].length : 0;
1166
- k("insertHeader", `Existing header match: ${l ? l[0] : "none"}`), k("insertHeader", `Existing level: ${m}`), k("insertHeader", `Target level: ${e}`);
1167
+ const c = d.match(/^(#{1,6})\s*/), m = c ? c[1].length : 0, u = c ? c[0].length : 0;
1168
+ k("insertHeader", `Existing header match: ${c ? c[0] : "none"}`), k("insertHeader", `Existing level: ${m}`), k("insertHeader", `Target level: ${e}`);
1167
1169
  const h = t && m === e;
1168
1170
  k("insertHeader", `Should toggle OFF: ${h}`);
1169
1171
  const f = j(
@@ -1184,10 +1186,10 @@ function R(i, e = 1, t = !1) {
1184
1186
  prefix: r.prefix,
1185
1187
  adjustSelection: (g, b, v) => {
1186
1188
  if (k("insertHeader", `Adjusting selection with existing prefix length ${u}`), h) {
1187
- const y = Math.max(b - u, c);
1189
+ const y = Math.max(b - u, l);
1188
1190
  return {
1189
1191
  start: y,
1190
- end: b === v ? y : Math.max(v - u, c)
1192
+ end: b === v ? y : Math.max(v - u, l)
1191
1193
  };
1192
1194
  }
1193
1195
  if (u > 0) {
@@ -1249,7 +1251,7 @@ const re = {
1249
1251
  setUndoMethod: pe,
1250
1252
  setDebugMode: ce,
1251
1253
  getDebugMode: F
1252
- }, Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1254
+ }, Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1253
1255
  __proto__: null,
1254
1256
  actions: re,
1255
1257
  applyCustomFormat: xe,
@@ -1257,7 +1259,7 @@ const re = {
1257
1259
  expandSelection: fe,
1258
1260
  getActiveFormats: q,
1259
1261
  getDebugMode: F,
1260
- getUndoMethod: Te,
1262
+ getUndoMethod: Ee,
1261
1263
  hasFormat: ue,
1262
1264
  insertHeader: R,
1263
1265
  insertHorizontalRule: ve,
@@ -1276,11 +1278,11 @@ const re = {
1276
1278
  toggleQuote: Q,
1277
1279
  toggleStrikethrough: be,
1278
1280
  toggleTaskList: X
1279
- }, Symbol.toStringTag, { value: "Module" })), Re = {
1281
+ }, Symbol.toStringTag, { value: "Module" })), Be = {
1280
1282
  b: "toggleBold",
1281
1283
  i: "toggleItalic",
1282
1284
  k: "insertLink"
1283
- }, Ne = {
1285
+ }, Re = {
1284
1286
  Digit7: "toggleNumberedList",
1285
1287
  Digit8: "toggleBulletList"
1286
1288
  };
@@ -1290,7 +1292,7 @@ class ze {
1290
1292
  }
1291
1293
  handleKeydown(e) {
1292
1294
  if (!(navigator.platform.toLowerCase().includes("mac") ? e.metaKey : e.ctrlKey)) return !1;
1293
- const o = e.key.toLowerCase(), s = Ne[e.code], a = s ?? Re[o];
1295
+ const o = e.key.toLowerCase(), s = Re[e.code], a = s ?? Be[o];
1294
1296
  return !a || s && !e.shiftKey || !s && (o === "b" || o === "i" || o === "k") && e.shiftKey ? !1 : (e.preventDefault(), this.editor.toolbar ? this.editor.toolbar.handleAction(a) : this.handleAction(a), !0);
1295
1297
  }
1296
1298
  handleAction(e) {
@@ -1325,7 +1327,7 @@ class ze {
1325
1327
  destroy() {
1326
1328
  }
1327
1329
  }
1328
- const P = {
1330
+ const _ = {
1329
1331
  name: "solar",
1330
1332
  colors: {
1331
1333
  bgPrimary: "#faf0ca",
@@ -1428,16 +1430,16 @@ const P = {
1428
1430
  // Table/element borders
1429
1431
  }
1430
1432
  }, se = {
1431
- solar: P,
1433
+ solar: _,
1432
1434
  cave: oe,
1433
1435
  // Aliases for backward compatibility
1434
- light: P,
1436
+ light: _,
1435
1437
  dark: oe
1436
1438
  };
1437
1439
  function $(i) {
1438
1440
  return typeof i == "string" ? { ...se[i] || se.solar, name: i } : i;
1439
1441
  }
1440
- function je(i) {
1442
+ function Ne(i) {
1441
1443
  const e = [];
1442
1444
  for (const [t, n] of Object.entries(i)) {
1443
1445
  const r = t.replace(/([A-Z])/g, "-$1").toLowerCase();
@@ -1455,7 +1457,7 @@ function ae(i, e = {}) {
1455
1457
  }
1456
1458
  };
1457
1459
  }
1458
- function Oe(i = {}) {
1460
+ function je(i = {}) {
1459
1461
  const {
1460
1462
  fontSize: e = "14px",
1461
1463
  lineHeight: t = 1.6,
@@ -1472,7 +1474,7 @@ function Oe(i = {}) {
1472
1474
  `)}
1473
1475
  }
1474
1476
  }
1475
- ` : "", c = o && o.colors ? je(o.colors) : "";
1477
+ ` : "", l = o && o.colors ? Ne(o.colors) : "";
1476
1478
  return `
1477
1479
  /* Marzipan Editor Styles */
1478
1480
 
@@ -1514,9 +1516,9 @@ function Oe(i = {}) {
1514
1516
  overflow: visible !important; /* Allow dropdown to overflow container */
1515
1517
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
1516
1518
  text-align: left !important;
1517
- ${c ? `
1519
+ ${l ? `
1518
1520
  /* Theme Variables */
1519
- ${c}` : ""}
1521
+ ${l}` : ""}
1520
1522
  }
1521
1523
 
1522
1524
  /* Force left alignment for all elements in the editor */
@@ -2299,35 +2301,35 @@ function Oe(i = {}) {
2299
2301
  ${a}
2300
2302
  `;
2301
2303
  }
2302
- const Fe = `<svg viewBox="0 0 18 18">
2304
+ const Oe = `<svg viewBox="0 0 18 18">
2303
2305
  <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"></path>
2304
2306
  <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"></path>
2305
- </svg>`, Ve = `<svg viewBox="0 0 18 18">
2307
+ </svg>`, Fe = `<svg viewBox="0 0 18 18">
2306
2308
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="13" y1="4" y2="4"></line>
2307
2309
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="5" x2="11" y1="14" y2="14"></line>
2308
2310
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="10" y1="14" y2="4"></line>
2309
- </svg>`, Ue = `<svg viewBox="0 0 18 18">
2311
+ </svg>`, Ve = `<svg viewBox="0 0 18 18">
2310
2312
  <path fill="currentColor" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"></path>
2311
- </svg>`, De = `<svg viewBox="0 0 18 18">
2313
+ </svg>`, Ue = `<svg viewBox="0 0 18 18">
2312
2314
  <path fill="currentColor" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"></path>
2313
- </svg>`, qe = `<svg viewBox="0 0 18 18">
2315
+ </svg>`, De = `<svg viewBox="0 0 18 18">
2314
2316
  <path fill="currentColor" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"></path>
2315
- </svg>`, We = `<svg viewBox="0 0 18 18">
2317
+ </svg>`, qe = `<svg viewBox="0 0 18 18">
2316
2318
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="11" y1="7" y2="11"></line>
2317
2319
  <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"></path>
2318
2320
  <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"></path>
2319
- </svg>`, Ke = `<svg viewBox="0 0 18 18">
2321
+ </svg>`, We = `<svg viewBox="0 0 18 18">
2320
2322
  <polyline stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="5 7 3 9 5 11"></polyline>
2321
2323
  <polyline stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="13 7 15 9 13 11"></polyline>
2322
2324
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="10" x2="8" y1="5" y2="13"></line>
2323
- </svg>`, Ze = `<svg viewBox="0 0 18 18">
2325
+ </svg>`, Ke = `<svg viewBox="0 0 18 18">
2324
2326
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="6" x2="15" y1="4" y2="4"></line>
2325
2327
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="6" x2="15" y1="9" y2="9"></line>
2326
2328
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="6" x2="15" y1="14" y2="14"></line>
2327
2329
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="3" x2="3" y1="4" y2="4"></line>
2328
2330
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="3" x2="3" y1="9" y2="9"></line>
2329
2331
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="3" x2="3" y1="14" y2="14"></line>
2330
- </svg>`, Je = `<svg viewBox="0 0 18 18">
2332
+ </svg>`, Ze = `<svg viewBox="0 0 18 18">
2331
2333
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="15" y1="4" y2="4"></line>
2332
2334
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="15" y1="9" y2="9"></line>
2333
2335
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="15" y1="14" y2="14"></line>
@@ -2335,39 +2337,39 @@ const Fe = `<svg viewBox="0 0 18 18">
2335
2337
  <path fill="currentColor" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"></path>
2336
2338
  <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"></path>
2337
2339
  <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"></path>
2338
- </svg>`, Ge = `<svg viewBox="2 2 20 20">
2340
+ </svg>`, Je = `<svg viewBox="2 2 20 20">
2339
2341
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 10.8182L9 10.8182C8.80222 10.8182 8.60888 10.7649 8.44443 10.665C8.27998 10.5651 8.15181 10.4231 8.07612 10.257C8.00043 10.0909 7.98063 9.90808 8.01922 9.73174C8.0578 9.55539 8.15304 9.39341 8.29289 9.26627C8.43275 9.13913 8.61093 9.05255 8.80491 9.01747C8.99889 8.98239 9.19996 9.00039 9.38268 9.0692C9.56541 9.13801 9.72159 9.25453 9.83147 9.40403C9.94135 9.55353 10 9.72929 10 9.90909L10 12.1818C10 12.664 9.78929 13.1265 9.41421 13.4675C9.03914 13.8084 8.53043 14 8 14"></path>
2340
2342
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 10.8182L15 10.8182C14.8022 10.8182 14.6089 10.7649 14.4444 10.665C14.28 10.5651 14.1518 10.4231 14.0761 10.257C14.0004 10.0909 13.9806 9.90808 14.0192 9.73174C14.0578 9.55539 14.153 9.39341 14.2929 9.26627C14.4327 9.13913 14.6109 9.05255 14.8049 9.01747C14.9989 8.98239 15.2 9.00039 15.3827 9.0692C15.5654 9.13801 15.7216 9.25453 15.8315 9.40403C15.9414 9.55353 16 9.72929 16 9.90909L16 12.1818C16 12.664 15.7893 13.1265 15.4142 13.4675C15.0391 13.8084 14.5304 14 14 14"></path>
2341
- </svg>`, Qe = `<svg viewBox="0 0 18 18">
2343
+ </svg>`, Ge = `<svg viewBox="0 0 18 18">
2342
2344
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="16" y1="4" y2="4"></line>
2343
2345
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="16" y1="9" y2="9"></line>
2344
2346
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="16" y1="14" y2="14"></line>
2345
2347
  <rect stroke="currentColor" fill="none" stroke-width="1.5" x="2" y="3" width="3" height="3" rx="0.5"></rect>
2346
2348
  <rect stroke="currentColor" fill="none" stroke-width="1.5" x="2" y="13" width="3" height="3" rx="0.5"></rect>
2347
2349
  <polyline stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" points="2.65 9.5 3.5 10.5 5 8.5"></polyline>
2348
- </svg>`, Xe = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2350
+ </svg>`, Qe = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2349
2351
  <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" fill="none"></path>
2350
2352
  <circle cx="12" cy="12" r="3" fill="none"></circle>
2351
- </svg>`, Ye = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2353
+ </svg>`, Xe = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2352
2354
  <path d="M17.94 17.94A10.94 10.94 0 0 1 12 20c-7 0-11-8-11-8a20.29 20.29 0 0 1 5.06-6.88"></path>
2353
2355
  <path d="M9.9 4.24A10.94 10.94 0 0 1 12 4c7 0 11 8 11 8a20.29 20.29 0 0 1-4.22 5.02"></path>
2354
2356
  <path d="M1 1l22 22"></path>
2355
2357
  <path d="M14.12 14.12A3 3 0 0 1 9.88 9.88"></path>
2356
- </svg>`, et = {
2357
- bold: { name: "bold", icon: Fe, title: "Bold (Ctrl+B)", action: "toggleBold" },
2358
- italic: { name: "italic", icon: Ve, title: "Italic (Ctrl+I)", action: "toggleItalic" },
2359
- code: { name: "code", icon: Ke, title: "Code (Ctrl+`)", action: "toggleCode" },
2360
- link: { name: "link", icon: We, title: "Insert Link (Ctrl+K)", action: "insertLink" },
2361
- quote: { name: "quote", icon: Ge, title: "Quote", action: "toggleQuote" },
2362
- bulletList: { name: "bulletList", icon: Ze, title: "Bullet List", action: "toggleBulletList" },
2363
- orderedList: { name: "orderedList", icon: Je, title: "Numbered List", action: "toggleNumberedList" },
2364
- taskList: { name: "taskList", icon: Qe, title: "Task List", action: "toggleTaskList" },
2365
- h1: { name: "h1", icon: Ue, title: "Heading 1", action: "insertH1" },
2366
- h2: { name: "h2", icon: De, title: "Heading 2", action: "insertH2" },
2367
- h3: { name: "h3", icon: qe, title: "Heading 3", action: "insertH3" },
2368
- view: { name: "viewMode", icon: Xe, title: "View mode", action: "toggle-view-menu", hasDropdown: !0 },
2369
- plain: { name: "togglePlain", icon: Ye, title: "Toggle plain textarea", action: "toggle-plain" }
2370
- }, tt = [
2358
+ </svg>`, Ye = {
2359
+ bold: { name: "bold", icon: Oe, title: "Bold (Ctrl+B)", action: "toggleBold" },
2360
+ italic: { name: "italic", icon: Fe, title: "Italic (Ctrl+I)", action: "toggleItalic" },
2361
+ code: { name: "code", icon: We, title: "Code (Ctrl+`)", action: "toggleCode" },
2362
+ link: { name: "link", icon: qe, title: "Insert Link (Ctrl+K)", action: "insertLink" },
2363
+ quote: { name: "quote", icon: Je, title: "Quote", action: "toggleQuote" },
2364
+ bulletList: { name: "bulletList", icon: Ke, title: "Bullet List", action: "toggleBulletList" },
2365
+ orderedList: { name: "orderedList", icon: Ze, title: "Numbered List", action: "toggleNumberedList" },
2366
+ taskList: { name: "taskList", icon: Ge, title: "Task List", action: "toggleTaskList" },
2367
+ h1: { name: "h1", icon: Ve, title: "Heading 1", action: "insertH1" },
2368
+ h2: { name: "h2", icon: Ue, title: "Heading 2", action: "insertH2" },
2369
+ h3: { name: "h3", icon: De, title: "Heading 3", action: "insertH3" },
2370
+ view: { name: "viewMode", icon: Qe, title: "View mode", action: "toggle-view-menu", hasDropdown: !0 },
2371
+ plain: { name: "togglePlain", icon: Xe, title: "Toggle plain textarea", action: "toggle-plain" }
2372
+ }, et = [
2371
2373
  "bold",
2372
2374
  "italic",
2373
2375
  "|",
@@ -2385,13 +2387,13 @@ const Fe = `<svg viewBox="0 0 18 18">
2385
2387
  "taskList",
2386
2388
  "|",
2387
2389
  "view"
2388
- ], nt = /* @__PURE__ */ new Set(["|", "separator", "divider"]);
2389
- class it {
2390
+ ], tt = /* @__PURE__ */ new Set(["|", "separator", "divider"]);
2391
+ class nt {
2390
2392
  constructor(e, t = null) {
2391
- this.container = null, this.buttons = {}, this.actions = Be, this.editor = e, this.buttonConfig = t;
2393
+ this.container = null, this.buttons = {}, this.actions = Ie, this.editor = e, this.buttonConfig = t;
2392
2394
  }
2393
2395
  create() {
2394
- this.container = document.createElement("div"), this.container.className = "marzipan-toolbar", this.container.setAttribute("role", "toolbar"), this.container.setAttribute("aria-label", "Text formatting"), this.resolveButtons(this.buttonConfig ?? tt).forEach((r) => {
2396
+ this.container = document.createElement("div"), this.container.className = "marzipan-toolbar", this.container.setAttribute("role", "toolbar"), this.container.setAttribute("aria-label", "Text formatting"), this.resolveButtons(this.buttonConfig ?? et).forEach((r) => {
2395
2397
  if (r.separator) {
2396
2398
  const o = document.createElement("div");
2397
2399
  o.className = "marzipan-toolbar-separator", o.setAttribute("role", "separator"), this.container.appendChild(o);
@@ -2408,11 +2410,11 @@ class it {
2408
2410
  return e.forEach((n) => {
2409
2411
  if (n) {
2410
2412
  if (typeof n == "string") {
2411
- if (nt.has(n)) {
2413
+ if (tt.has(n)) {
2412
2414
  t.push({ separator: !0 });
2413
2415
  return;
2414
2416
  }
2415
- const r = et[n];
2417
+ const r = Ye[n];
2416
2418
  r ? t.push({ ...r }) : console.warn(`[Marzipan] Unknown toolbar button preset: ${n}`);
2417
2419
  return;
2418
2420
  }
@@ -2549,10 +2551,10 @@ class it {
2549
2551
  ].forEach((s) => {
2550
2552
  const a = document.createElement("button");
2551
2553
  a.className = "marzipan-dropdown-item", a.type = "button";
2552
- const c = document.createElement("span");
2553
- c.className = "marzipan-dropdown-check", c.textContent = r === s.id ? s.icon : "";
2554
+ const l = document.createElement("span");
2555
+ l.className = "marzipan-dropdown-check", l.textContent = r === s.id ? s.icon : "";
2554
2556
  const p = document.createElement("span");
2555
- p.textContent = s.label, a.appendChild(c), a.appendChild(p), r === s.id && a.classList.add("active"), a.addEventListener("click", (d) => {
2557
+ p.textContent = s.label, a.appendChild(l), a.appendChild(p), r === s.id && a.classList.add("active"), a.addEventListener("click", (d) => {
2556
2558
  d.stopPropagation(), this.setViewMode(s.id), e.remove(), this.viewModeButton?.classList.remove("dropdown-active"), this.handleDocumentClick && document.removeEventListener("click", this.handleDocumentClick);
2557
2559
  }), e.appendChild(a);
2558
2560
  }), e;
@@ -2575,7 +2577,7 @@ class it {
2575
2577
  }
2576
2578
  }
2577
2579
  let le = !1;
2578
- function rt() {
2580
+ function it() {
2579
2581
  if (le || typeof document > "u") return;
2580
2582
  const i = document.createElement("style");
2581
2583
  i.className = "marzipan-link-tooltip-styles", i.textContent = `
@@ -2609,12 +2611,12 @@ function rt() {
2609
2611
  }
2610
2612
  `, document.head.appendChild(i), le = !0;
2611
2613
  }
2612
- class ot {
2614
+ class rt {
2613
2615
  constructor(e) {
2614
2616
  this.editor = e, this.tooltip = null, this.currentLink = null, this.hideTimeout = null, this.supportsAnchor = !1, this._selectionHandler = null, this._keyupHandler = null, this._inputHandler = null, this._scrollHandler = null, this._tooltipEnterHandler = null, this._tooltipLeaveHandler = null, this.init();
2615
2617
  }
2616
2618
  init() {
2617
- typeof CSS > "u" || typeof CSS.supports != "function" || !(CSS.supports("position-anchor: --x") && CSS.supports("position-area: center")) || (rt(), this.supportsAnchor = !0, this.createTooltip(), this.bindListeners());
2619
+ typeof CSS > "u" || typeof CSS.supports != "function" || !(CSS.supports("position-anchor: --x") && CSS.supports("position-area: center")) || (it(), this.supportsAnchor = !0, this.createTooltip(), this.bindListeners());
2618
2620
  }
2619
2621
  bindListeners() {
2620
2622
  !this.supportsAnchor || typeof document > "u" || !this.tooltip || (this._selectionHandler = () => this.handleSelectionChange(), document.addEventListener("selectionchange", this._selectionHandler), this._keyupHandler = (e) => {
@@ -2719,21 +2721,15 @@ const w = class w {
2719
2721
  _init(e, t = {}) {
2720
2722
  this.element = e, this.options = this._mergeOptions(t), this.instanceTheme = this.options.theme ?? null, this.instanceColors = this.options.colors ? { ...this.options.colors } : null, this._appliedThemeColorKeys = /* @__PURE__ */ new Set(), this.instanceId = ++w.instanceCount, this.initialized = !1, this._autoResizeInputHandler = null, this._autoResizeResizeHandler = null, this._minAutoHeight = null, this._maxAutoHeight = null, w.injectStyles(), w.initGlobalListeners();
2721
2723
  const n = e.querySelector(".marzipan-container"), r = e.querySelector(".marzipan-wrapper");
2722
- if (n || r ? this._recoverFromDOM(n, r) : this._buildFromScratch(), this.shortcuts = new ze(this), this.linkTooltip = new ot(this), this.options.toolbar) {
2724
+ if (n || r ? this._recoverFromDOM(n, r) : this._buildFromScratch(), this.shortcuts = new ze(this), this.linkTooltip = new rt(this), this.options.toolbar) {
2723
2725
  const s = typeof this.options.toolbar == "object" ? this.options.toolbar.buttons : null;
2724
- this.toolbar = new it(this, s), this.toolbar.create(), this.textarea.addEventListener("selectionchange", () => {
2726
+ this.toolbar = new nt(this, s), this.toolbar.create(), this.textarea.addEventListener("selectionchange", () => {
2725
2727
  this.toolbar?.updateButtonStates?.();
2726
2728
  }), this.textarea.addEventListener("input", () => {
2727
2729
  this.toolbar?.updateButtonStates?.();
2728
2730
  });
2729
2731
  }
2730
- this.options.blockHandles !== !1 && (this.blockHandlesPlugin = new Ce(
2731
- this.textarea,
2732
- this.preview,
2733
- typeof this.options.blockHandles == "object" ? this.options.blockHandles : {}
2734
- ), this.preview.addEventListener("scroll", () => {
2735
- this.blockHandlesPlugin?.updateAllHandlePositions?.();
2736
- })), this._applyPlugins() && this.updatePreview(), this.initialized = !0, this.options.onChange && this.options.onChange(this.getValue(), this);
2732
+ this._applyPlugins() && this.updatePreview(), this.initialized = !0, this.options.onChange && this.options.onChange(this.getValue(), this);
2737
2733
  }
2738
2734
  /**
2739
2735
  * Merge user options with defaults
@@ -2776,8 +2772,6 @@ const w = class w {
2776
2772
  statsFormatter: null,
2777
2773
  smartLists: !0,
2778
2774
  // Enable smart list continuation
2779
- blockHandles: !0,
2780
- // Enable block handles plugin
2781
2775
  // Theme overrides
2782
2776
  theme: null,
2783
2777
  colors: void 0
@@ -2810,7 +2804,7 @@ const w = class w {
2810
2804
  }
2811
2805
  _resolveTheme() {
2812
2806
  let e = this.instanceTheme;
2813
- return typeof e == "string" && (e = $(e)), e || (e = w.currentTheme || P), typeof e == "string" && (e = $(e)), this.instanceColors ? ae(e, this.instanceColors) : e;
2807
+ return typeof e == "string" && (e = $(e)), e || (e = w.currentTheme || _), typeof e == "string" && (e = $(e)), this.instanceColors ? ae(e, this.instanceColors) : e;
2814
2808
  }
2815
2809
  _applyTheme(e) {
2816
2810
  if (!e) return;
@@ -2892,7 +2886,7 @@ const w = class w {
2892
2886
  } catch (o) {
2893
2887
  console.error("[Marzipan] afterPreviewRender hook error:", o);
2894
2888
  }
2895
- this.blockHandlesPlugin && this.blockHandlesPlugin.refresh(), this._applyCodeBlockBackgrounds(), this.options.showStats && this.statsBar && this._updateStats(), this.options.onChange && this.initialized && this.options.onChange(e, this);
2889
+ this._applyCodeBlockBackgrounds(), this.options.showStats && this.statsBar && this._updateStats(), this.options.onChange && this.initialized && this.options.onChange(e, this);
2896
2890
  }
2897
2891
  /**
2898
2892
  * Apply background styling to code blocks
@@ -2929,15 +2923,15 @@ const w = class w {
2929
2923
  e.preventDefault();
2930
2924
  const n = this.textarea.selectionStart, r = this.textarea.selectionEnd, o = this.textarea.value;
2931
2925
  if (n !== r && e.shiftKey) {
2932
- const s = o.substring(0, n), a = o.substring(n, r), c = o.substring(r), d = a.split(`
2933
- `).map((l) => l.replace(/^ {2}/, "")).join(`
2926
+ const s = o.substring(0, n), a = o.substring(n, r), l = o.substring(r), d = a.split(`
2927
+ `).map((c) => c.replace(/^ {2}/, "")).join(`
2934
2928
  `);
2935
- document.execCommand ? (this.textarea.setSelectionRange(n, r), document.execCommand("insertText", !1, d)) : (this.textarea.value = s + d + c, this.textarea.selectionStart = n, this.textarea.selectionEnd = n + d.length);
2929
+ document.execCommand ? (this.textarea.setSelectionRange(n, r), document.execCommand("insertText", !1, d)) : (this.textarea.value = s + d + l, this.textarea.selectionStart = n, this.textarea.selectionEnd = n + d.length);
2936
2930
  } else if (n !== r) {
2937
- const s = o.substring(0, n), a = o.substring(n, r), c = o.substring(r), d = a.split(`
2938
- `).map((l) => " " + l).join(`
2931
+ const s = o.substring(0, n), a = o.substring(n, r), l = o.substring(r), d = a.split(`
2932
+ `).map((c) => " " + c).join(`
2939
2933
  `);
2940
- document.execCommand ? (this.textarea.setSelectionRange(n, r), document.execCommand("insertText", !1, d)) : (this.textarea.value = s + d + c, this.textarea.selectionStart = n, this.textarea.selectionEnd = n + d.length);
2934
+ document.execCommand ? (this.textarea.setSelectionRange(n, r), document.execCommand("insertText", !1, d)) : (this.textarea.value = s + d + l, this.textarea.selectionStart = n, this.textarea.selectionEnd = n + d.length);
2941
2935
  } else
2942
2936
  document.execCommand ? document.execCommand("insertText", !1, " ") : (this.textarea.value = o.substring(0, n) + " " + o.substring(r), this.textarea.selectionStart = this.textarea.selectionEnd = n + 2);
2943
2937
  this.textarea.dispatchEvent(new Event("input", { bubbles: !0 }));
@@ -3015,8 +3009,8 @@ const w = class w {
3015
3009
  a += o[p].length + 1;
3016
3010
  }
3017
3011
  this.textarea.value = n;
3018
- const c = t + r;
3019
- this.textarea.setSelectionRange(c, c), this.textarea.dispatchEvent(new Event("input", { bubbles: !0 }));
3012
+ const l = t + r;
3013
+ this.textarea.setSelectionRange(l, l), this.textarea.dispatchEvent(new Event("input", { bubbles: !0 }));
3020
3014
  }
3021
3015
  }
3022
3016
  /**
@@ -3122,12 +3116,12 @@ const w = class w {
3122
3116
  };
3123
3117
  const e = this.textarea.value, t = e.split(`
3124
3118
  `), n = e.length, r = e.split(/\s+/).filter((d) => d.length > 0).length, o = this.textarea.selectionStart, a = e.substring(0, o).split(`
3125
- `), c = a.length, p = a[a.length - 1].length + 1;
3119
+ `), l = a.length, p = a[a.length - 1].length + 1;
3126
3120
  return {
3127
3121
  chars: n,
3128
3122
  words: r,
3129
3123
  lines: t.length,
3130
- line: c,
3124
+ line: l,
3131
3125
  column: p
3132
3126
  };
3133
3127
  }
@@ -3163,8 +3157,8 @@ const w = class w {
3163
3157
  let o = e.scrollHeight, s = "hidden";
3164
3158
  const a = this._minAutoHeight;
3165
3159
  typeof a == "number" && a > 0 && (o = Math.max(o, a));
3166
- const c = this._maxAutoHeight;
3167
- typeof c == "number" && c > 0 && o > c && (o = c, s = "auto");
3160
+ const l = this._maxAutoHeight;
3161
+ typeof l == "number" && l > 0 && o > l && (o = l, s = "auto");
3168
3162
  const p = o + "px";
3169
3163
  e.style.setProperty("height", p, "important"), e.style.setProperty("overflow-y", s, "important"), t.style.setProperty("height", p, "important"), t.style.setProperty("overflow-y", s, "important"), n.style.setProperty("height", p, "important"), e.scrollTop = r, t.scrollTop = r, this.previousHeight !== o && (this.previousHeight = o);
3170
3164
  }
@@ -3222,7 +3216,7 @@ const w = class w {
3222
3216
  * Destroy the editor instance
3223
3217
  */
3224
3218
  destroy() {
3225
- if (this.element.MarzipanInstance = null, w.instances.delete(this.element), this.numberUpdateTimeout && (clearTimeout(this.numberUpdateTimeout), this.numberUpdateTimeout = null), this._teardownAutoResize(), this.blockHandlesPlugin && (this.blockHandlesPlugin.destroy(), this.blockHandlesPlugin = null), this.linkTooltip && (this.linkTooltip.destroy(), this.linkTooltip = null), this.toolbar && (this.toolbar.destroy(), this.toolbar = null), this.shortcuts && this.shortcuts.destroy(), this.wrapper) {
3219
+ if (this.element.MarzipanInstance = null, w.instances.delete(this.element), this.numberUpdateTimeout && (clearTimeout(this.numberUpdateTimeout), this.numberUpdateTimeout = null), this._teardownAutoResize(), this.linkTooltip && (this.linkTooltip.destroy(), this.linkTooltip = null), this.toolbar && (this.toolbar.destroy(), this.toolbar = null), this.shortcuts && this.shortcuts.destroy(), this.wrapper) {
3226
3220
  const e = this.getValue();
3227
3221
  this.wrapper.remove(), this.element.textContent = e;
3228
3222
  }
@@ -3268,7 +3262,7 @@ const w = class w {
3268
3262
  if (w.stylesInjected && !e) return;
3269
3263
  const t = document.querySelector("style.marzipan-styles");
3270
3264
  t && t.remove();
3271
- const n = w.currentTheme || P, r = Oe({ theme: n }), o = document.createElement("style");
3265
+ const n = w.currentTheme || _, r = je({ theme: n }), o = document.createElement("style");
3272
3266
  o.className = "marzipan-styles", o.textContent = r, document.head.appendChild(o), w.stylesInjected = !0;
3273
3267
  }
3274
3268
  /**
@@ -3325,45 +3319,44 @@ let A = w;
3325
3319
  A.MarkdownParser = H;
3326
3320
  A.ShortcutsManager = ze;
3327
3321
  A.themes = {
3328
- solar: P,
3322
+ solar: _,
3329
3323
  cave: $("cave"),
3330
3324
  light: $("light"),
3331
3325
  dark: $("dark")
3332
3326
  };
3333
3327
  A.getTheme = $;
3334
- A.currentTheme = P;
3328
+ A.currentTheme = _;
3335
3329
  export {
3336
- Ce as BlockHandlesPlugin,
3337
- ot as LinkTooltip,
3330
+ rt as LinkTooltip,
3338
3331
  H as MarkdownParser,
3339
3332
  A as Marzipan,
3340
3333
  ze as ShortcutsManager,
3341
- it as Toolbar,
3342
- dt as accentSwatchPlugin,
3343
- mt as accentSwatchStyles,
3344
- Be as actions,
3345
- Pt as buildTableMarkdown,
3334
+ nt as Toolbar,
3335
+ ct as accentSwatchPlugin,
3336
+ pt as accentSwatchStyles,
3337
+ Ie as actions,
3338
+ mt as buildTableMarkdown,
3346
3339
  oe as cave,
3347
- Bt as coreImagePickerPlugin,
3340
+ ft as coreImagePickerPlugin,
3348
3341
  A as default,
3349
- Oe as generateStyles,
3342
+ je as generateStyles,
3350
3343
  $ as getTheme,
3351
- ut as imageManagerPlugin,
3352
- ft as imageManagerStyles,
3353
- bt as imagePickerPlugin,
3344
+ bt as imageManagerPlugin,
3345
+ vt as imageManagerStyles,
3346
+ kt as imagePickerPlugin,
3354
3347
  ae as mergeTheme,
3355
- yt as mermaidExternalPlugin,
3356
- wt as mermaidPlugin,
3357
- ct as plugins,
3358
- _t as resolvePositiveInteger,
3359
- P as solar,
3360
- Tt as tableGeneratorPlugin,
3361
- St as tableGridPlugin,
3362
- Ct as tableGridStyles,
3363
- zt as tablePlugin,
3364
- je as themeToCSSVars,
3348
+ xt as mermaidExternalPlugin,
3349
+ Lt as mermaidPlugin,
3350
+ at as plugins,
3351
+ ht as resolvePositiveInteger,
3352
+ _ as solar,
3353
+ Ct as tableGeneratorPlugin,
3354
+ Tt as tableGridPlugin,
3355
+ Ht as tableGridStyles,
3356
+ Mt as tablePlugin,
3357
+ Ne as themeToCSSVars,
3365
3358
  se as themes,
3366
- $t as tinyHighlightPlugin,
3367
- Mt as tinyHighlightStyles
3359
+ _t as tinyHighlightPlugin,
3360
+ Pt as tinyHighlightStyles
3368
3361
  };
3369
3362
  //# sourceMappingURL=index.js.map