@linto-ai/transcript-ui-webcomponent 0.9.18 → 0.9.21

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.
@@ -305,14 +305,14 @@ class EffectScope {
305
305
  pause() {
306
306
  if (this._active) {
307
307
  this._isPaused = true;
308
- let i2, l4;
308
+ let i2, l2;
309
309
  if (this.scopes) {
310
310
  const scopes = this.scopes.slice();
311
- for (i2 = 0, l4 = scopes.length; i2 < l4; i2++) {
311
+ for (i2 = 0, l2 = scopes.length; i2 < l2; i2++) {
312
312
  scopes[i2].pause();
313
313
  }
314
314
  }
315
- for (i2 = 0, l4 = this.effects.length; i2 < l4; i2++) {
315
+ for (i2 = 0, l2 = this.effects.length; i2 < l2; i2++) {
316
316
  this.effects[i2].pause();
317
317
  }
318
318
  }
@@ -324,15 +324,15 @@ class EffectScope {
324
324
  if (this._active) {
325
325
  if (this._isPaused) {
326
326
  this._isPaused = false;
327
- let i2, l4;
327
+ let i2, l2;
328
328
  if (this.scopes) {
329
329
  const scopes = this.scopes.slice();
330
- for (i2 = 0, l4 = scopes.length; i2 < l4; i2++) {
330
+ for (i2 = 0, l2 = scopes.length; i2 < l2; i2++) {
331
331
  scopes[i2].resume();
332
332
  }
333
333
  }
334
334
  const effects = this.effects.slice();
335
- for (i2 = 0, l4 = effects.length; i2 < l4; i2++) {
335
+ for (i2 = 0, l2 = effects.length; i2 < l2; i2++) {
336
336
  effects[i2].resume();
337
337
  }
338
338
  }
@@ -383,18 +383,18 @@ class EffectScope {
383
383
  stop(fromParent) {
384
384
  if (this._active) {
385
385
  this._active = false;
386
- let i2, l4;
387
- for (i2 = 0, l4 = this.effects.length; i2 < l4; i2++) {
386
+ let i2, l2;
387
+ for (i2 = 0, l2 = this.effects.length; i2 < l2; i2++) {
388
388
  this.effects[i2].stop();
389
389
  }
390
390
  this.effects.length = 0;
391
- for (i2 = 0, l4 = this.cleanups.length; i2 < l4; i2++) {
391
+ for (i2 = 0, l2 = this.cleanups.length; i2 < l2; i2++) {
392
392
  this.cleanups[i2]();
393
393
  }
394
394
  this.cleanups.length = 0;
395
395
  if (this.scopes) {
396
396
  const scopes = this.scopes.slice();
397
- for (i2 = 0, l4 = scopes.length; i2 < l4; i2++) {
397
+ for (i2 = 0, l2 = scopes.length; i2 < l2; i2++) {
398
398
  scopes[i2].stop(true);
399
399
  }
400
400
  this.scopes.length = 0;
@@ -654,8 +654,8 @@ function removeSub(link, soft = false) {
654
654
  dep.subs = prevSub;
655
655
  if (!prevSub && dep.computed) {
656
656
  dep.computed.flags &= -5;
657
- for (let l4 = dep.computed.deps; l4; l4 = l4.nextDep) {
658
- removeSub(l4, true);
657
+ for (let l2 = dep.computed.deps; l2; l2 = l2.nextDep) {
658
+ removeSub(l2, true);
659
659
  }
660
660
  }
661
661
  }
@@ -778,8 +778,8 @@ function addSub(link) {
778
778
  const computed2 = link.dep.computed;
779
779
  if (computed2 && !link.dep.subs) {
780
780
  computed2.flags |= 4 | 16;
781
- for (let l4 = computed2.deps; l4; l4 = l4.nextDep) {
782
- addSub(l4);
781
+ for (let l2 = computed2.deps; l2; l2 = l2.nextDep) {
782
+ addSub(l2);
783
783
  }
784
784
  }
785
785
  const currentTail = link.dep.subs;
@@ -3484,7 +3484,7 @@ function renderList(source, renderItem, cache, index) {
3484
3484
  source = shallowReadArray(source);
3485
3485
  }
3486
3486
  ret = new Array(source.length);
3487
- for (let i2 = 0, l4 = source.length; i2 < l4; i2++) {
3487
+ for (let i2 = 0, l2 = source.length; i2 < l2; i2++) {
3488
3488
  ret[i2] = renderItem(
3489
3489
  needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i2])) : toReactive(source[i2]) : source[i2],
3490
3490
  i2,
@@ -3508,7 +3508,7 @@ function renderList(source, renderItem, cache, index) {
3508
3508
  } else {
3509
3509
  const keys = Object.keys(source);
3510
3510
  ret = new Array(keys.length);
3511
- for (let i2 = 0, l4 = keys.length; i2 < l4; i2++) {
3511
+ for (let i2 = 0, l2 = keys.length; i2 < l2; i2++) {
3512
3512
  const key = keys[i2];
3513
3513
  ret[i2] = renderItem(source[key], key, i2, cached && cached[i2]);
3514
3514
  }
@@ -5586,7 +5586,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5586
5586
  instance.isMounted = true;
5587
5587
  initialVNode = container = anchor = null;
5588
5588
  } else {
5589
- let { next: next2, bu, u: u2, parent, vnode } = instance;
5589
+ let { next: next2, bu, u: u4, parent, vnode } = instance;
5590
5590
  {
5591
5591
  const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
5592
5592
  if (nonHydratedAsyncRoot) {
@@ -5636,8 +5636,8 @@ function baseCreateRenderer(options, createHydrationFns) {
5636
5636
  if (originNext === null) {
5637
5637
  updateHOCHostEl(instance, nextTree.el);
5638
5638
  }
5639
- if (u2) {
5640
- queuePostRenderEffect(u2, parentSuspense);
5639
+ if (u4) {
5640
+ queuePostRenderEffect(u4, parentSuspense);
5641
5641
  }
5642
5642
  if (vnodeHook = next2.props && next2.props.onVnodeUpdated) {
5643
5643
  queuePostRenderEffect(
@@ -5792,9 +5792,9 @@ function baseCreateRenderer(options, createHydrationFns) {
5792
5792
  };
5793
5793
  const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
5794
5794
  let i2 = 0;
5795
- const l22 = c2.length;
5795
+ const l2 = c2.length;
5796
5796
  let e1 = c1.length - 1;
5797
- let e22 = l22 - 1;
5797
+ let e22 = l2 - 1;
5798
5798
  while (i2 <= e1 && i2 <= e22) {
5799
5799
  const n1 = c1[i2];
5800
5800
  const n2 = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]);
@@ -5839,7 +5839,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5839
5839
  if (i2 > e1) {
5840
5840
  if (i2 <= e22) {
5841
5841
  const nextPos = e22 + 1;
5842
- const anchor = nextPos < l22 ? c2[nextPos].el : parentAnchor;
5842
+ const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
5843
5843
  while (i2 <= e22) {
5844
5844
  patch(
5845
5845
  null,
@@ -5923,7 +5923,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5923
5923
  const nextIndex = s2 + i2;
5924
5924
  const nextChild = c2[nextIndex];
5925
5925
  const anchorVNode = c2[nextIndex + 1];
5926
- const anchor = nextIndex + 1 < l22 ? (
5926
+ const anchor = nextIndex + 1 < l2 ? (
5927
5927
  // #13559, #14173 fallback to el placeholder for unresolved async component
5928
5928
  anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
5929
5929
  ) : parentAnchor;
@@ -6270,7 +6270,7 @@ function traverseStaticChildren(n1, n2, shallow = false) {
6270
6270
  function getSequence(arr) {
6271
6271
  const p2 = arr.slice();
6272
6272
  const result = [0];
6273
- let i2, j2, u2, v2, c2;
6273
+ let i2, j2, u4, v2, c2;
6274
6274
  const len = arr.length;
6275
6275
  for (i2 = 0; i2 < len; i2++) {
6276
6276
  const arrI = arr[i2];
@@ -6281,28 +6281,28 @@ function getSequence(arr) {
6281
6281
  result.push(i2);
6282
6282
  continue;
6283
6283
  }
6284
- u2 = 0;
6284
+ u4 = 0;
6285
6285
  v2 = result.length - 1;
6286
- while (u2 < v2) {
6287
- c2 = u2 + v2 >> 1;
6286
+ while (u4 < v2) {
6287
+ c2 = u4 + v2 >> 1;
6288
6288
  if (arr[result[c2]] < arrI) {
6289
- u2 = c2 + 1;
6289
+ u4 = c2 + 1;
6290
6290
  } else {
6291
6291
  v2 = c2;
6292
6292
  }
6293
6293
  }
6294
- if (arrI < arr[result[u2]]) {
6295
- if (u2 > 0) {
6296
- p2[i2] = result[u2 - 1];
6294
+ if (arrI < arr[result[u4]]) {
6295
+ if (u4 > 0) {
6296
+ p2[i2] = result[u4 - 1];
6297
6297
  }
6298
- result[u2] = i2;
6298
+ result[u4] = i2;
6299
6299
  }
6300
6300
  }
6301
6301
  }
6302
- u2 = result.length;
6303
- v2 = result[u2 - 1];
6304
- while (u2-- > 0) {
6305
- result[u2] = v2;
6302
+ u4 = result.length;
6303
+ v2 = result[u4 - 1];
6304
+ while (u4-- > 0) {
6305
+ result[u4] = v2;
6306
6306
  v2 = p2[v2];
6307
6307
  }
6308
6308
  return result;
@@ -6982,8 +6982,8 @@ const computed = (getterOrOptions, debugOptions) => {
6982
6982
  function h$2(type, propsOrChildren, children) {
6983
6983
  try {
6984
6984
  setBlockTracking(-1);
6985
- const l4 = arguments.length;
6986
- if (l4 === 2) {
6985
+ const l2 = arguments.length;
6986
+ if (l2 === 2) {
6987
6987
  if (isObject$1(propsOrChildren) && !isArray(propsOrChildren)) {
6988
6988
  if (isVNode(propsOrChildren)) {
6989
6989
  return createVNode(type, null, [propsOrChildren]);
@@ -6993,9 +6993,9 @@ function h$2(type, propsOrChildren, children) {
6993
6993
  return createVNode(type, null, propsOrChildren);
6994
6994
  }
6995
6995
  } else {
6996
- if (l4 > 3) {
6996
+ if (l2 > 3) {
6997
6997
  children = Array.prototype.slice.call(arguments, 2);
6998
- } else if (l4 === 3 && isVNode(children)) {
6998
+ } else if (l2 === 3 && isVNode(children)) {
6999
6999
  children = [children];
7000
7000
  }
7001
7001
  return createVNode(type, propsOrChildren, children);
@@ -8414,7 +8414,7 @@ function setSelected(el, value) {
8414
8414
  if (isMultiple && !isArrayValue && !isSet(value)) {
8415
8415
  return;
8416
8416
  }
8417
- for (let i2 = 0, l4 = el.options.length; i2 < l4; i2++) {
8417
+ for (let i2 = 0, l2 = el.options.length; i2 < l2; i2++) {
8418
8418
  const option = el.options[i2];
8419
8419
  const optionValue = getValue(option);
8420
8420
  if (isMultiple) {
@@ -10518,7 +10518,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
10518
10518
  highlighted.value = null;
10519
10519
  return;
10520
10520
  }
10521
- const { highlightCode } = await import("./highlight-CJMoAPSe.js");
10521
+ const { highlightCode } = await import("./highlight-B6rbGA8f.js");
10522
10522
  if (run === seq) highlighted.value = highlightCode(code, lang ?? "");
10523
10523
  },
10524
10524
  { immediate: true }
@@ -10682,7 +10682,7 @@ const _hoisted_3$m = {
10682
10682
  };
10683
10683
  const _hoisted_4$c = { class: "form-field__input-wrapper" };
10684
10684
  const _hoisted_5$b = ["id", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"];
10685
- const _hoisted_6$9 = ["value"];
10685
+ const _hoisted_6$a = ["value"];
10686
10686
  const _hoisted_7$5 = ["type", "id", "disabled", "readonly", "placeholder", "autocomplete", "required", "aria-required", "aria-invalid", "aria-describedby"];
10687
10687
  const _hoisted_8$3 = {
10688
10688
  key: 3,
@@ -10841,7 +10841,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
10841
10841
  return openBlock(), createElementBlock("option", {
10842
10842
  key: opt.value,
10843
10843
  value: opt.value
10844
- }, toDisplayString(opt.label), 9, _hoisted_6$9);
10844
+ }, toDisplayString(opt.label), 9, _hoisted_6$a);
10845
10845
  }), 128))
10846
10846
  ], 16, _hoisted_5$b)), [
10847
10847
  [vModelSelect, draft.value]
@@ -18314,118 +18314,118 @@ function gfm(turndownService) {
18314
18314
  function A() {
18315
18315
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
18316
18316
  }
18317
- var R = A();
18318
- function j(l4) {
18319
- R = l4;
18317
+ var T = A();
18318
+ function j(u4) {
18319
+ T = u4;
18320
18320
  }
18321
- var z = { exec: () => null };
18322
- function I(l4) {
18321
+ var E$1 = { exec: () => null };
18322
+ function I(u4) {
18323
18323
  let e3 = [];
18324
18324
  return (t2) => {
18325
18325
  let n2 = Math.max(0, Math.min(3, t2 - 1)), s2 = e3[n2];
18326
- return s2 || (s2 = l4(n2), e3[n2] = s2), s2;
18326
+ return s2 || (s2 = u4(n2), e3[n2] = s2), s2;
18327
18327
  };
18328
18328
  }
18329
- function k(l4, e3 = "") {
18330
- let t2 = typeof l4 == "string" ? l4 : l4.source, n2 = { replace: (s2, r2) => {
18331
- let i2 = typeof r2 == "string" ? r2 : r2.source;
18332
- return i2 = i2.replace(m$1.caret, "$1"), t2 = t2.replace(s2, i2), n2;
18329
+ function k(u4, e3 = "") {
18330
+ let t2 = typeof u4 == "string" ? u4 : u4.source, n2 = { replace: (s2, r2) => {
18331
+ let o2 = typeof r2 == "string" ? r2 : r2.source;
18332
+ return o2 = o2.replace(m$1.caret, "$1"), t2 = t2.replace(s2, o2), n2;
18333
18333
  }, getRegex: () => new RegExp(t2, e3) };
18334
18334
  return n2;
18335
18335
  }
18336
- var Oe = ((l4 = "") => {
18336
+ var Te = ((u4 = "") => {
18337
18337
  try {
18338
- return !!new RegExp("(?<=1)(?<!1)" + l4);
18338
+ return !!new RegExp("(?<=1)(?<!1)" + u4);
18339
18339
  } catch {
18340
18340
  return false;
18341
18341
  }
18342
- })(), m$1 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l4) => new RegExp(`^( {0,3}${l4})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: I((l4) => new RegExp(`^ {0,${l4}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:\`\`\`|~~~)`)), headingBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}#`)), htmlBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}>`)) }, Te = /^(?:[ \t]*(?:\n|$))+/, we = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ye = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, q = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Pe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, U = / {0,3}(?:[*+-]|\d{1,9}[.)])/, oe = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ae = k(oe).replace(/bull/g, U).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Se = k(oe).replace(/bull/g, U).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), K = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, _e = /^[^\n]+/, W = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, $e = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", W).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Le = k(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, U).getRegex(), Q = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", X = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ee = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", X).replace("tag", Q).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), le = (l4) => k(K).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", l4).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex(), ze = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Me = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Ae = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Me).getRegex(), J = { blockquote: Ae, code: we, def: $e, fences: ye, heading: Pe, hr: q, html: Ee, lheading: ae, list: Le, newline: Te, paragraph: ze, table: z, text: _e }, se = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex(), Ie = { ...J, lheading: Se, table: se, paragraph: k(K).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", se).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex() }, Ce = { ...J, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", X).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: z, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: k(K).replace("hr", q).replace("heading", ` *#{1,6} *[^
18343
- ]`).replace("lheading", ae).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Be = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, De = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ue = /^( {2,}|\\)\n(?!\s*$)/, qe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, _ = /[\p{P}\p{S}]/u, C$1 = /[\s\p{P}\p{S}]/u, v$1 = /[^\s\p{P}\p{S}]/u, ve = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, C$1).getRegex(), He = /[\p{Pi}\p{Ps}"']/u, pe = /(?!~)[\p{P}\p{S}]/u, Ze = /(?!~)[\s\p{P}\p{S}]/u, Ge = /(?:[^\s\p{P}\p{S}]|~)/u, Qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Oe ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ce = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Ne = k(ce, "u").replace(/punct/g, _).getRegex(), je = k(ce, "u").replace(/punct/g, pe).getRegex(), Fe = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, Ue = k(Fe, "u").replace(/openQuote/g, He).replace(/punct/g, _).getRegex(), he = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ke = k(he, "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), We = k(he, "gu").replace(/notPunctSpace/g, Ge).replace(/punctSpace/g, Ze).replace(/punct/g, pe).getRegex(), Xe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", Je = k(Xe, "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), Ve = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), Ye = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", et = k(Ye, "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), tt = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _).getRegex(), nt = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", rt = k(nt, "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), st = k(/\\(punct)/, "gu").replace(/punct/g, _).getRegex(), it = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ot = k(X).replace("(?:-->|$)", "-->").getRegex(), at = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ot).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), G = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, lt = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", G).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ke = k(/^!?\[(label)\]\[(ref)\]/).replace("label", G).replace("ref", W).getRegex(), de = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", W).getRegex(), ut = k("reflink|nolink(?!\\()", "g").replace("reflink", ke).replace("nolink", de).getRegex(), ie = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, V = { _backpedal: z, anyPunctuation: st, autolink: it, blockSkip: Qe, br: ue, code: De, del: z, delLDelim: z, delRDelim: z, emStrongLDelim: Ne, emStrongRDelimAst: Ke, emStrongRDelimUnd: Ve, escape: Be, link: lt, nolink: de, punctuation: ve, reflink: ke, reflinkSearch: ut, tag: at, text: qe, url: z }, pt = { ...V, emStrongLDelim: Ue, emStrongRDelimAst: Je, emStrongRDelimUnd: et, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", G).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", G).getRegex() }, F = { ...V, emStrongRDelimAst: We, emStrongLDelim: je, delLDelim: tt, delRDelim: rt, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ie).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: k(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ie).getRegex() }, ct = { ...F, br: k(ue).replace("{2,}", "*").getRegex(), text: k(F.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, H = { normal: J, gfm: Ie, pedantic: Ce }, B = { normal: V, gfm: F, breaks: ct, pedantic: pt };
18344
- var ht = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ge = (l4) => ht[l4];
18345
- function T(l4, e3) {
18342
+ })(), m$1 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, endingSpaceTabChar: /[ \t]$/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (u4) => new RegExp(`^( {0,3}${u4})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: I((u4) => new RegExp(`^ {0,${u4}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: I((u4) => new RegExp(`^ {0,${u4}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: I((u4) => new RegExp(`^ {0,${u4}}(?:\`\`\`|~~~)`)), headingBeginRegex: I((u4) => new RegExp(`^ {0,${u4}}#`)), htmlBeginRegex: I((u4) => new RegExp(`^ {0,${u4}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: I((u4) => new RegExp(`^ {0,${u4}}>`)) }, Oe = /^(?:[ \t]*(?:\n|$))+/, we = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ye = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, q = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Pe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, U = / {0,3}(?:[*+-]|\d{1,9}[.)])/, oe = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ae = k(oe).replace(/bull/g, U).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Se = k(oe).replace(/bull/g, U).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), K = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, _e = /^[^\n]+/, W = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, $e = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", W).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Le = k(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, U).getRegex(), Q = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", X = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, ze = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", X).replace("tag", Q).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), le = (u4) => k(K).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", u4).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex(), Ee = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Me = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Ae = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Me).getRegex(), J = { blockquote: Ae, code: we, def: $e, fences: ye, heading: Pe, hr: q, html: ze, lheading: ae, list: Le, newline: Oe, paragraph: Ee, table: E$1, text: _e }, se = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex(), Ie = { ...J, lheading: Se, table: se, paragraph: k(K).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", se).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex() }, Ce = { ...J, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", X).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: E$1, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: k(K).replace("hr", q).replace("heading", ` *#{1,6} *[^
18343
+ ]`).replace("lheading", ae).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Be = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, De = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ue = /^( {2,}|\\)\n(?!\s*$)/, qe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, _ = /[\p{P}\p{S}]/u, C$1 = /[\s\p{P}\p{S}]/u, v$1 = /[^\s\p{P}\p{S}]/u, ve = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, C$1).getRegex(), He = /[\p{Pi}\p{Ps}"']/u, pe = /(?!~)[\p{P}\p{S}]/u, Ze = /(?!~)[\s\p{P}\p{S}]/u, Ge = /(?:[^\s\p{P}\p{S}]|~)/u, Qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Te ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ce = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Ne = k(ce, "u").replace(/punct/g, _).getRegex(), je = k(ce, "u").replace(/punct/g, pe).getRegex(), Fe = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, Ue = k(Fe, "u").replace(/openQuote/g, He).replace(/punct/g, _).getRegex(), he = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ke = k(he, "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), We = k(he, "gu").replace(/notPunctSpace/g, Ge).replace(/punctSpace/g, Ze).replace(/punct/g, pe).getRegex(), Xe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", Je = k(Xe, "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), Ve = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), Ye = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", et = k(Ye, "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), tt = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _).getRegex(), nt = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", rt = k(nt, "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), st = k(/\\(punct)/, "gu").replace(/punct/g, _).getRegex(), it = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ot = k(X).replace("(?:-->|$)", "-->").getRegex(), at = k("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ot).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), lt = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, G = k(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", lt).getRegex(), ut = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", G).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ke = k(/^!?\[(label)\]\[(ref)\]/).replace("label", G).replace("ref", W).getRegex(), de = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", W).getRegex(), pt = k("reflink|nolink(?!\\()", "g").replace("reflink", ke).replace("nolink", de).getRegex(), ie = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, V = { _backpedal: E$1, anyPunctuation: st, autolink: it, blockSkip: Qe, br: ue, code: De, del: E$1, delLDelim: E$1, delRDelim: E$1, emStrongLDelim: Ne, emStrongRDelimAst: Ke, emStrongRDelimUnd: Ve, escape: Be, link: ut, nolink: de, punctuation: ve, reflink: ke, reflinkSearch: pt, tag: at, text: qe, url: E$1 }, ct = { ...V, emStrongLDelim: Ue, emStrongRDelimAst: Je, emStrongRDelimUnd: et, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", G).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", G).getRegex() }, F = { ...V, emStrongRDelimAst: We, emStrongLDelim: je, delLDelim: tt, delRDelim: rt, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ie).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: k(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ie).getRegex() }, ht = { ...F, br: k(ue).replace("{2,}", "*").getRegex(), text: k(F.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, H = { normal: J, gfm: Ie, pedantic: Ce }, B = { normal: V, gfm: F, breaks: ht, pedantic: ct };
18344
+ var kt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ge = (u4) => kt[u4];
18345
+ function R(u4, e3) {
18346
18346
  if (e3) {
18347
- if (m$1.escapeTest.test(l4)) return l4.replace(m$1.escapeReplace, ge);
18348
- } else if (m$1.escapeTestNoEncode.test(l4)) return l4.replace(m$1.escapeReplaceNoEncode, ge);
18349
- return l4;
18347
+ if (m$1.escapeTest.test(u4)) return u4.replace(m$1.escapeReplace, ge);
18348
+ } else if (m$1.escapeTestNoEncode.test(u4)) return u4.replace(m$1.escapeReplaceNoEncode, ge);
18349
+ return u4;
18350
18350
  }
18351
- function Y(l4) {
18351
+ function Y(u4) {
18352
18352
  try {
18353
- l4 = encodeURI(l4).replace(m$1.percentDecode, "%");
18353
+ u4 = encodeURI(u4).replace(m$1.percentDecode, "%");
18354
18354
  } catch {
18355
18355
  return null;
18356
18356
  }
18357
- return l4;
18357
+ return u4;
18358
18358
  }
18359
- function ee(l4, e3) {
18360
- let t2 = l4.replace(m$1.findPipe, (r2, i2, o2) => {
18361
- let u2 = false, a2 = i2;
18362
- for (; --a2 >= 0 && o2[a2] === "\\"; ) u2 = !u2;
18363
- return u2 ? "|" : " |";
18359
+ function ee(u4, e3) {
18360
+ let t2 = u4.replace(m$1.findPipe, (r2, o2, i2) => {
18361
+ let l2 = false, a2 = o2;
18362
+ for (; --a2 >= 0 && i2[a2] === "\\"; ) l2 = !l2;
18363
+ return l2 ? "|" : " |";
18364
18364
  }), n2 = t2.split(m$1.splitPipe), s2 = 0;
18365
18365
  if (n2[0].trim() || n2.shift(), n2.length > 0 && !n2.at(-1)?.trim() && n2.pop(), e3) if (n2.length > e3) n2.splice(e3);
18366
18366
  else for (; n2.length < e3; ) n2.push("");
18367
18367
  for (; s2 < n2.length; s2++) n2[s2] = n2[s2].trim().replace(m$1.slashPipe, "|");
18368
18368
  return n2;
18369
18369
  }
18370
- function $(l4, e3, t2) {
18371
- let n2 = l4.length;
18370
+ function $(u4, e3, t2) {
18371
+ let n2 = u4.length;
18372
18372
  if (n2 === 0) return "";
18373
18373
  let s2 = 0;
18374
18374
  for (; s2 < n2; ) {
18375
- let r2 = l4.charAt(n2 - s2 - 1);
18375
+ let r2 = u4.charAt(n2 - s2 - 1);
18376
18376
  if (r2 === e3 && true) s2++;
18377
18377
  else break;
18378
18378
  }
18379
- return l4.slice(0, n2 - s2);
18379
+ return u4.slice(0, n2 - s2);
18380
18380
  }
18381
- function te(l4) {
18382
- let e3 = l4.split(`
18381
+ function te(u4) {
18382
+ let e3 = u4.split(`
18383
18383
  `), t2 = e3.length - 1;
18384
18384
  for (; t2 >= 0 && m$1.blankLine.test(e3[t2]); ) t2--;
18385
- return e3.length - t2 <= 2 ? l4 : e3.slice(0, t2 + 1).join(`
18385
+ return e3.length - t2 <= 2 ? u4 : e3.slice(0, t2 + 1).join(`
18386
18386
  `);
18387
18387
  }
18388
- function fe(l4, e3) {
18389
- if (l4.indexOf(e3[1]) === -1) return -1;
18388
+ function fe(u4, e3) {
18389
+ if (u4.indexOf(e3[1]) === -1) return -1;
18390
18390
  let t2 = 0;
18391
- for (let n2 = 0; n2 < l4.length; n2++) if (l4[n2] === "\\") n2++;
18392
- else if (l4[n2] === e3[0]) t2++;
18393
- else if (l4[n2] === e3[1] && (t2--, t2 < 0)) return n2;
18391
+ for (let n2 = 0; n2 < u4.length; n2++) if (u4[n2] === "\\") n2++;
18392
+ else if (u4[n2] === e3[0]) t2++;
18393
+ else if (u4[n2] === e3[1] && (t2--, t2 < 0)) return n2;
18394
18394
  return t2 > 0 ? -2 : -1;
18395
18395
  }
18396
- function me(l4, e3 = 0) {
18396
+ function me(u4, e3 = 0) {
18397
18397
  let t2 = e3, n2 = "";
18398
- for (let s2 of l4) if (s2 === " ") {
18398
+ for (let s2 of u4) if (s2 === " ") {
18399
18399
  let r2 = 4 - t2 % 4;
18400
18400
  n2 += " ".repeat(r2), t2 += r2;
18401
18401
  } else n2 += s2, t2++;
18402
18402
  return n2;
18403
18403
  }
18404
- function xe(l4, e3, t2, n2, s2) {
18405
- let r2 = e3.href, i2 = e3.title || null, o2 = l4[1].replace(s2.other.outputLinkReplace, "$1"), u2 = l4[0].charAt(0) === "!";
18404
+ function xe(u4, e3, t2, n2, s2) {
18405
+ let r2 = e3.href, o2 = e3.title || null, i2 = u4[1].replace(s2.other.outputLinkReplace, "$1"), l2 = u4[0].charAt(0) === "!";
18406
18406
  n2.state.inLink = true;
18407
18407
  let a2 = n2.state.linkEmitted, p2 = n2.state.inRawBlock;
18408
18408
  n2.state.linkEmitted = false;
18409
- let c2 = n2.inlineTokens(o2), h2 = n2.state.linkEmitted;
18410
- if (n2.state.linkEmitted = a2, n2.state.inLink = false, !u2) {
18409
+ let c2 = n2.inlineTokens(i2), h2 = n2.state.linkEmitted;
18410
+ if (n2.state.linkEmitted = a2, n2.state.inLink = false, !l2) {
18411
18411
  if (h2) {
18412
18412
  n2.state.inRawBlock = p2;
18413
18413
  return;
18414
18414
  }
18415
18415
  n2.state.linkEmitted = true;
18416
18416
  }
18417
- return { type: u2 ? "image" : "link", raw: t2, href: r2, title: i2, text: o2, tokens: c2 };
18417
+ return { type: l2 ? "image" : "link", raw: t2, href: r2, title: o2, text: i2, tokens: c2 };
18418
18418
  }
18419
- function kt(l4, e3, t2) {
18420
- let n2 = l4.match(t2.other.indentCodeCompensation);
18419
+ function dt(u4, e3, t2) {
18420
+ let n2 = u4.match(t2.other.indentCodeCompensation);
18421
18421
  if (n2 === null) return e3;
18422
18422
  let s2 = n2[1];
18423
18423
  return e3.split(`
18424
18424
  `).map((r2) => {
18425
- let i2 = r2.match(t2.other.beginningSpace);
18426
- if (i2 === null) return r2;
18427
- let [o2] = i2;
18428
- return o2.length >= s2.length ? r2.slice(s2.length) : r2;
18425
+ let o2 = r2.match(t2.other.beginningSpace);
18426
+ if (o2 === null) return r2;
18427
+ let [i2] = o2;
18428
+ return r2.slice(Math.min(i2.length, s2.length));
18429
18429
  }).join(`
18430
18430
  `);
18431
18431
  }
@@ -18434,7 +18434,7 @@ var y$1 = class y {
18434
18434
  rules;
18435
18435
  lexer;
18436
18436
  constructor(e3) {
18437
- this.options = e3 || R;
18437
+ this.options = e3 || T;
18438
18438
  }
18439
18439
  space(e3) {
18440
18440
  let t2 = this.rules.block.newline.exec(e3);
@@ -18450,7 +18450,7 @@ var y$1 = class y {
18450
18450
  fences(e3) {
18451
18451
  let t2 = this.rules.block.fences.exec(e3);
18452
18452
  if (t2) {
18453
- let n2 = t2[0], s2 = kt(n2, t2[3] || "", this.rules);
18453
+ let n2 = t2[0], s2 = dt(n2, t2[3] || "", this.rules);
18454
18454
  return { type: "code", raw: n2, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: s2 };
18455
18455
  }
18456
18456
  }
@@ -18460,7 +18460,7 @@ var y$1 = class y {
18460
18460
  let n2 = t2[2].trim();
18461
18461
  if (this.rules.other.endingHash.test(n2)) {
18462
18462
  let s2 = $(n2, "#");
18463
- (this.options.pedantic || !s2 || this.rules.other.endingSpaceChar.test(s2)) && (n2 = s2.trim());
18463
+ (this.options.pedantic || !s2 || this.rules.other.endingSpaceTabChar.test(s2)) && (n2 = s2.trim());
18464
18464
  }
18465
18465
  return { type: "heading", raw: $(t2[0], `
18466
18466
  `), depth: t2[1].length, text: n2, tokens: this.lexer.inline(n2) };
@@ -18476,40 +18476,40 @@ var y$1 = class y {
18476
18476
  if (t2) {
18477
18477
  let n2 = $(t2[0], `
18478
18478
  `).split(`
18479
- `), s2 = "", r2 = "", i2 = [];
18479
+ `), s2 = "", r2 = "", o2 = [];
18480
18480
  for (; n2.length > 0; ) {
18481
- let o2 = false, u2 = [], a2;
18482
- for (a2 = 0; a2 < n2.length; a2++) if (this.rules.other.blockquoteStart.test(n2[a2])) u2.push(n2[a2]), o2 = true;
18483
- else if (!o2) u2.push(n2[a2]);
18481
+ let i2 = false, l2 = [], a2;
18482
+ for (a2 = 0; a2 < n2.length; a2++) if (this.rules.other.blockquoteStart.test(n2[a2])) l2.push(n2[a2]), i2 = true;
18483
+ else if (!i2) l2.push(n2[a2]);
18484
18484
  else break;
18485
18485
  n2 = n2.slice(a2);
18486
- let p2 = u2.join(`
18486
+ let p2 = l2.join(`
18487
18487
  `), c2 = p2.replace(this.rules.other.blockquoteSetextReplace, `
18488
18488
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
18489
18489
  s2 = s2 ? `${s2}
18490
18490
  ${p2}` : p2, r2 = r2 ? `${r2}
18491
18491
  ${c2}` : c2;
18492
18492
  let h2 = this.lexer.state.top;
18493
- if (this.lexer.state.top = true, this.lexer.blockTokens(c2, i2, true), this.lexer.state.top = h2, n2.length === 0) break;
18494
- let d2 = i2.at(-1);
18493
+ if (this.lexer.state.top = true, this.lexer.blockTokens(c2, o2, true), this.lexer.state.top = h2, n2.length === 0) break;
18494
+ let d2 = o2.at(-1);
18495
18495
  if (d2?.type === "code") break;
18496
18496
  if (d2?.type === "blockquote") {
18497
18497
  let O = d2, g2 = n2.join(`
18498
18498
  `), w2 = O.raw + `
18499
- ` + g2.replace(this.rules.other.blockquoteSetextReplace2, ""), E2 = this.blockquote(w2);
18500
- i2[i2.length - 1] = E2, s2 = `${s2}
18501
- ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + E2.text;
18499
+ ` + g2.replace(this.rules.other.blockquoteSetextReplace2, ""), z = this.blockquote(w2);
18500
+ o2[o2.length - 1] = z, s2 = `${s2}
18501
+ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
18502
18502
  break;
18503
18503
  } else if (d2?.type === "list") {
18504
18504
  let O = d2, g2 = O.raw + `
18505
18505
  ` + n2.join(`
18506
18506
  `), w2 = this.list(g2);
18507
- i2[i2.length - 1] = w2, s2 = s2.substring(0, s2.length - d2.raw.length) + w2.raw, r2 = r2.substring(0, r2.length - O.raw.length) + w2.raw, n2 = g2.substring(i2.at(-1).raw.length).split(`
18507
+ o2[o2.length - 1] = w2, s2 = s2.substring(0, s2.length - d2.raw.length) + w2.raw, r2 = r2.substring(0, r2.length - O.raw.length) + w2.raw, n2 = g2.substring(o2.at(-1).raw.length).split(`
18508
18508
  `);
18509
18509
  continue;
18510
18510
  }
18511
18511
  }
18512
- return { type: "blockquote", raw: s2, tokens: i2, text: r2 };
18512
+ return { type: "blockquote", raw: s2, tokens: o2, text: r2 };
18513
18513
  }
18514
18514
  }
18515
18515
  list(e3) {
@@ -18517,25 +18517,25 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + E2.text;
18517
18517
  if (t2) {
18518
18518
  let n2 = t2[1].trim(), s2 = n2.length > 1, r2 = { type: "list", raw: "", ordered: s2, start: s2 ? +n2.slice(0, -1) : "", loose: false, items: [] };
18519
18519
  n2 = s2 ? `\\d{1,9}\\${n2.slice(-1)}` : `\\${n2}`, this.options.pedantic && (n2 = s2 ? n2 : "[*+-]");
18520
- let i2 = this.rules.other.listItemRegex(n2), o2 = false;
18520
+ let o2 = this.rules.other.listItemRegex(n2), i2 = false;
18521
18521
  for (; e3; ) {
18522
18522
  let a2 = false, p2 = "", c2 = "";
18523
- if (!(t2 = i2.exec(e3)) || this.rules.block.hr.test(e3)) break;
18523
+ if (!(t2 = o2.exec(e3)) || this.rules.block.hr.test(e3)) break;
18524
18524
  p2 = t2[0], e3 = e3.substring(p2.length);
18525
18525
  let h2 = me(t2[2].split(`
18526
18526
  `, 1)[0], t2[1].length), d2 = e3.split(`
18527
18527
  `, 1)[0], O = !h2.trim(), g2 = 0;
18528
18528
  if (this.options.pedantic ? (g2 = 2, c2 = h2.trimStart()) : O ? g2 = t2[1].length + 1 : (g2 = h2.search(this.rules.other.nonSpaceChar), g2 = g2 > 4 ? 1 : g2, c2 = h2.slice(g2), g2 += t2[1].length), O && this.rules.other.blankLine.test(d2) && (p2 += d2 + `
18529
18529
  `, e3 = e3.substring(d2.length + 1), a2 = true), !a2) {
18530
- let w2 = this.rules.other.nextBulletRegex(g2), E2 = this.rules.other.hrRegex(g2), ne = this.rules.other.fencesBeginRegex(g2), re = this.rules.other.headingBeginRegex(g2), be = this.rules.other.htmlBeginRegex(g2), Re = this.rules.other.blockquoteBeginRegex(g2);
18530
+ let w2 = this.rules.other.nextBulletRegex(g2), z = this.rules.other.hrRegex(g2), ne = this.rules.other.fencesBeginRegex(g2), re = this.rules.other.headingBeginRegex(g2), be = this.rules.other.htmlBeginRegex(g2), Re = this.rules.other.blockquoteBeginRegex(g2);
18531
18531
  for (; e3; ) {
18532
18532
  let N = e3.split(`
18533
18533
  `, 1)[0], D;
18534
- if (d2 = N, this.options.pedantic ? (d2 = d2.replace(this.rules.other.listReplaceNesting, " "), D = d2) : D = d2.replace(this.rules.other.tabCharGlobal, " "), ne.test(d2) || re.test(d2) || be.test(d2) || Re.test(d2) || w2.test(d2) || E2.test(d2)) break;
18534
+ if (d2 = N, this.options.pedantic ? (d2 = d2.replace(this.rules.other.listReplaceNesting, " "), D = d2) : D = d2.replace(this.rules.other.tabCharGlobal, " "), ne.test(d2) || re.test(d2) || be.test(d2) || Re.test(d2) || w2.test(d2) || z.test(d2)) break;
18535
18535
  if (D.search(this.rules.other.nonSpaceChar) >= g2 || !d2.trim()) c2 += `
18536
18536
  ` + D.slice(g2);
18537
18537
  else {
18538
- if (O || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ne.test(h2) || re.test(h2) || E2.test(h2)) break;
18538
+ if (O || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ne.test(h2) || re.test(h2) || z.test(h2)) break;
18539
18539
  c2 += `
18540
18540
  ` + d2;
18541
18541
  }
@@ -18543,10 +18543,10 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + E2.text;
18543
18543
  `, e3 = e3.substring(N.length + 1), h2 = D.slice(g2);
18544
18544
  }
18545
18545
  }
18546
- r2.loose || (o2 ? r2.loose = true : this.rules.other.doubleBlankLine.test(p2) && (o2 = true)), r2.items.push({ type: "list_item", raw: p2, task: !!this.options.gfm && this.rules.other.listIsTask.test(c2), loose: false, text: c2, tokens: [] }), r2.raw += p2;
18546
+ r2.loose || (i2 ? r2.loose = true : this.rules.other.doubleBlankLine.test(p2) && (i2 = true)), r2.items.push({ type: "list_item", raw: p2, task: !!this.options.gfm && this.rules.other.listIsTask.test(c2), loose: false, text: c2, tokens: [] }), r2.raw += p2;
18547
18547
  }
18548
- let u2 = r2.items.at(-1);
18549
- if (u2) u2.raw = u2.raw.trimEnd(), u2.text = u2.text.trimEnd();
18548
+ let l2 = r2.items.at(-1);
18549
+ if (l2) l2.raw = l2.raw.trimEnd(), l2.text = l2.text.trimEnd();
18550
18550
  else return;
18551
18551
  r2.raw = r2.raw.trimEnd();
18552
18552
  for (let a2 of r2.items) if (this.lexer.state.top = false, a2.tokens = this.lexer.blockTokens(a2.text, []), !r2.loose) {
@@ -18594,13 +18594,13 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + E2.text;
18594
18594
  let t2 = this.rules.block.table.exec(e3);
18595
18595
  if (!t2 || !this.rules.other.tableDelimiter.test(t2[2])) return;
18596
18596
  let n2 = ee(t2[1]), s2 = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t2[3]?.trim() ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split(`
18597
- `) : [], i2 = { type: "table", raw: $(t2[0], `
18597
+ `) : [], o2 = { type: "table", raw: $(t2[0], `
18598
18598
  `), header: [], align: [], rows: [] };
18599
18599
  if (n2.length === s2.length) {
18600
- for (let o2 of s2) this.rules.other.tableAlignRight.test(o2) ? i2.align.push("right") : this.rules.other.tableAlignCenter.test(o2) ? i2.align.push("center") : this.rules.other.tableAlignLeft.test(o2) ? i2.align.push("left") : i2.align.push(null);
18601
- for (let o2 = 0; o2 < n2.length; o2++) i2.header.push({ text: n2[o2], tokens: this.lexer.inline(n2[o2]), header: true, align: i2.align[o2] });
18602
- for (let o2 of r2) i2.rows.push(ee(o2, i2.header.length).map((u2, a2) => ({ text: u2, tokens: this.lexer.inline(u2), header: false, align: i2.align[a2] })));
18603
- return i2;
18600
+ for (let i2 of s2) this.rules.other.tableAlignRight.test(i2) ? o2.align.push("right") : this.rules.other.tableAlignCenter.test(i2) ? o2.align.push("center") : this.rules.other.tableAlignLeft.test(i2) ? o2.align.push("left") : o2.align.push(null);
18601
+ for (let i2 = 0; i2 < n2.length; i2++) o2.header.push({ text: n2[i2], tokens: this.lexer.inline(n2[i2]), header: true, align: o2.align[i2] });
18602
+ for (let i2 of r2) o2.rows.push(ee(i2, o2.header.length).map((l2, a2) => ({ text: l2, tokens: this.lexer.inline(l2), header: false, align: o2.align[a2] })));
18603
+ return o2;
18604
18604
  }
18605
18605
  }
18606
18606
  lheading(e3) {
@@ -18637,20 +18637,20 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + E2.text;
18637
18637
  let n2 = t2[2].trim();
18638
18638
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n2)) {
18639
18639
  if (!this.rules.other.endAngleBracket.test(n2)) return;
18640
- let i2 = $(n2.slice(0, -1), "\\");
18641
- if ((n2.length - i2.length) % 2 === 0) return;
18640
+ let o2 = $(n2.slice(0, -1), "\\");
18641
+ if ((n2.length - o2.length) % 2 === 0) return;
18642
18642
  } else {
18643
- let i2 = fe(t2[2], "()");
18644
- if (i2 === -2) return;
18645
- if (i2 > -1) {
18646
- let u2 = (t2[0].indexOf("!") === 0 ? 5 : 4) + t2[1].length + i2;
18647
- t2[2] = t2[2].substring(0, i2), t2[0] = t2[0].substring(0, u2).trim(), t2[3] = "";
18643
+ let o2 = fe(t2[2], "()");
18644
+ if (o2 === -2) return;
18645
+ if (o2 > -1) {
18646
+ let l2 = (t2[0].indexOf("!") === 0 ? 5 : 4) + t2[1].length + o2;
18647
+ t2[2] = t2[2].substring(0, o2), t2[0] = t2[0].substring(0, l2).trim(), t2[3] = "";
18648
18648
  }
18649
18649
  }
18650
18650
  let s2 = t2[2], r2 = "";
18651
18651
  if (this.options.pedantic) {
18652
- let i2 = this.rules.other.pedanticHrefTitle.exec(s2);
18653
- i2 && (s2 = i2[1], r2 = i2[3]);
18652
+ let o2 = this.rules.other.pedanticHrefTitle.exec(s2);
18653
+ o2 && (s2 = o2[1], r2 = o2[3]);
18654
18654
  } else r2 = t2[3] ? t2[3].slice(1, -1) : "";
18655
18655
  return s2 = s2.trim(), this.rules.other.startAngleBracket.test(s2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n2) ? s2 = s2.slice(1) : s2 = s2.slice(1, -1)), xe(t2, { href: s2 && s2.replace(this.rules.inline.anyPunctuation, "$1"), title: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1") }, t2[0], this.lexer, this.rules);
18656
18656
  }
@@ -18660,8 +18660,8 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + E2.text;
18660
18660
  if ((n2 = this.rules.inline.reflink.exec(e3)) || (n2 = this.rules.inline.nolink.exec(e3))) {
18661
18661
  let s2 = (n2[2] || n2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), r2 = t2[s2.toLowerCase()];
18662
18662
  if (!r2) {
18663
- let i2 = n2[0].charAt(0);
18664
- return { type: "text", raw: i2, text: i2 };
18663
+ let o2 = n2[0].charAt(0);
18664
+ return { type: "text", raw: o2, text: o2 };
18665
18665
  }
18666
18666
  return xe(n2, r2, n2[0], this.lexer, this.rules);
18667
18667
  }
@@ -18670,25 +18670,25 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + E2.text;
18670
18670
  let s2 = this.rules.inline.emStrongLDelim.exec(e3);
18671
18671
  if (!s2 || !s2[1] && !s2[2] && !s2[3] && !s2[4] || s2[4] && n2.match(this.rules.other.unicodeAlphaNumeric)) return;
18672
18672
  if (!(s2[1] || s2[3] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
18673
- let i2 = [...s2[0]].length - 1, o2, u2, a2 = i2, p2 = 0, c2 = s2[0][0], h2 = n2 === c2, d2 = c2 === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
18674
- for (d2.lastIndex = 0, t2 = t2.slice(-1 * e3.length + i2); (s2 = d2.exec(t2)) !== null; ) {
18675
- if (o2 = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !o2) continue;
18676
- if (u2 = [...o2].length, s2[3] || s2[4]) {
18677
- a2 += u2;
18673
+ let o2 = [...s2[0]].length - 1, i2, l2, a2 = o2, p2 = 0, c2 = s2[0][0], h2 = n2 === c2, d2 = c2 === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
18674
+ for (d2.lastIndex = 0, t2 = t2.slice(-1 * e3.length + o2); (s2 = d2.exec(t2)) !== null; ) {
18675
+ if (i2 = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !i2) continue;
18676
+ if (l2 = [...i2].length, s2[3] || s2[4]) {
18677
+ a2 += l2;
18678
18678
  continue;
18679
18679
  } else if (s2[5] || s2[6]) {
18680
- if (i2 % 3 && !((i2 + u2) % 3)) {
18681
- p2 += u2;
18680
+ if (o2 % 3 && !((o2 + l2) % 3)) {
18681
+ p2 += l2;
18682
18682
  continue;
18683
18683
  }
18684
18684
  if (h2) break;
18685
18685
  }
18686
- if (a2 -= u2, a2 > 0) continue;
18687
- u2 = Math.min(u2, u2 + a2 + p2);
18688
- let O = [...s2[0]][0].length, g2 = e3.slice(0, i2 + s2.index + O + u2);
18689
- if (Math.min(i2, u2) % 2) {
18690
- let E2 = g2.slice(1, -1);
18691
- return { type: "em", raw: g2, text: E2, tokens: this.lexer.inlineTokens(E2) };
18686
+ if (a2 -= l2, a2 > 0) continue;
18687
+ l2 = Math.min(l2, l2 + a2 + p2);
18688
+ let O = [...s2[0]][0].length, g2 = e3.slice(0, o2 + s2.index + O + l2);
18689
+ if (Math.min(o2, l2) % 2) {
18690
+ let z = g2.slice(1, -1);
18691
+ return { type: "em", raw: g2, text: z, tokens: this.lexer.inlineTokens(z) };
18692
18692
  }
18693
18693
  let w2 = g2.slice(2, -2);
18694
18694
  return { type: "strong", raw: g2, text: w2, tokens: this.lexer.inlineTokens(w2) };
@@ -18710,16 +18710,16 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + E2.text;
18710
18710
  let s2 = this.rules.inline.delLDelim.exec(e3);
18711
18711
  if (!s2) return;
18712
18712
  if (!(s2[1] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
18713
- let i2 = [...s2[0]].length - 1, o2, u2, a2 = i2, p2 = this.rules.inline.delRDelim;
18714
- for (p2.lastIndex = 0, t2 = t2.slice(-1 * e3.length + i2); (s2 = p2.exec(t2)) !== null; ) {
18715
- if (o2 = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !o2 || (u2 = [...o2].length, u2 !== i2)) continue;
18713
+ let o2 = [...s2[0]].length - 1, i2, l2, a2 = o2, p2 = this.rules.inline.delRDelim;
18714
+ for (p2.lastIndex = 0, t2 = t2.slice(-1 * e3.length + o2); (s2 = p2.exec(t2)) !== null; ) {
18715
+ if (i2 = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !i2 || (l2 = [...i2].length, l2 !== o2)) continue;
18716
18716
  if (s2[3] || s2[4]) {
18717
- a2 += u2;
18717
+ a2 += l2;
18718
18718
  continue;
18719
18719
  }
18720
- if (a2 -= u2, a2 > 0) continue;
18721
- u2 = Math.min(u2, u2 + a2);
18722
- let c2 = [...s2[0]][0].length, h2 = e3.slice(0, i2 + s2.index + c2 + u2), d2 = h2.slice(i2, -i2);
18720
+ if (a2 -= l2, a2 > 0) continue;
18721
+ l2 = Math.min(l2, l2 + a2);
18722
+ let c2 = [...s2[0]][0].length, h2 = e3.slice(0, o2 + s2.index + c2 + l2), d2 = h2.slice(o2, -o2);
18723
18723
  return { type: "del", raw: h2, text: d2, tokens: this.lexer.inlineTokens(d2) };
18724
18724
  }
18725
18725
  }
@@ -18728,7 +18728,7 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + E2.text;
18728
18728
  let t2 = this.rules.inline.autolink.exec(e3);
18729
18729
  if (t2) {
18730
18730
  let n2, s2;
18731
- return t2[2] === "@" ? (n2 = t2[1], s2 = "mailto:" + n2) : (n2 = t2[1], s2 = n2), { type: "link", raw: t2[0], text: n2, href: s2, tokens: [{ type: "text", raw: n2, text: n2 }] };
18731
+ return t2[2] === "@" ? (n2 = t2[1], s2 = "mailto:" + n2) : (n2 = t2[1], s2 = n2), { type: "link", raw: t2[0], text: n2, href: s2, autolink: true, tokens: [{ type: "text", raw: n2, text: n2 }] };
18732
18732
  }
18733
18733
  }
18734
18734
  url(e3) {
@@ -18743,7 +18743,7 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + E2.text;
18743
18743
  while (r2 !== t2[0]);
18744
18744
  n2 = t2[0], t2[1] === "www." ? s2 = "http://" + t2[0] : s2 = t2[0];
18745
18745
  }
18746
- return { type: "link", raw: t2[0], text: n2, href: s2, tokens: [{ type: "text", raw: n2, text: n2 }] };
18746
+ return { type: "link", raw: t2[0], text: n2, href: s2, autolink: true, tokens: [{ type: "text", raw: n2, text: n2 }] };
18747
18747
  }
18748
18748
  }
18749
18749
  inlineText(e3) {
@@ -18754,14 +18754,14 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + E2.text;
18754
18754
  }
18755
18755
  }
18756
18756
  };
18757
- var x = class l {
18757
+ var x = class u {
18758
18758
  tokens;
18759
18759
  options;
18760
18760
  state;
18761
18761
  inlineQueue;
18762
18762
  tokenizer;
18763
18763
  constructor(e3) {
18764
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e3 || R, this.options.tokenizer = this.options.tokenizer || new y$1(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, linkEmitted: false, top: true };
18764
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e3 || T, this.options.tokenizer = this.options.tokenizer || new y$1(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, linkEmitted: false, top: true };
18765
18765
  let t2 = { other: m$1, block: H.normal, inline: B.normal };
18766
18766
  this.options.pedantic ? (t2.block = H.pedantic, t2.inline = B.pedantic) : this.options.gfm && (t2.block = H.gfm, this.options.breaks ? t2.inline = B.breaks : t2.inline = B.gfm), this.tokenizer.rules = t2;
18767
18767
  }
@@ -18769,10 +18769,10 @@ var x = class l {
18769
18769
  return { block: H, inline: B };
18770
18770
  }
18771
18771
  static lex(e3, t2) {
18772
- return new l(t2).lex(e3);
18772
+ return new u(t2).lex(e3);
18773
18773
  }
18774
18774
  static lexInline(e3, t2) {
18775
- return new l(t2).inlineTokens(e3);
18775
+ return new u(t2).inlineTokens(e3);
18776
18776
  }
18777
18777
  lex(e3) {
18778
18778
  e3 = e3.replace(m$1.carriageReturn, `
@@ -18793,21 +18793,21 @@ var x = class l {
18793
18793
  break;
18794
18794
  }
18795
18795
  let r2;
18796
- if (this.options.extensions?.block?.some((o2) => (r2 = o2.call({ lexer: this }, e3, t2)) ? (e3 = e3.substring(r2.raw.length), t2.push(r2), true) : false)) continue;
18796
+ if (this.options.extensions?.block?.some((i2) => (r2 = i2.call({ lexer: this }, e3, t2)) ? (e3 = e3.substring(r2.raw.length), t2.push(r2), true) : false)) continue;
18797
18797
  if (r2 = this.tokenizer.space(e3)) {
18798
18798
  e3 = e3.substring(r2.raw.length);
18799
- let o2 = t2.at(-1);
18800
- r2.raw.length === 1 && o2 !== void 0 ? o2.raw += `
18799
+ let i2 = t2.at(-1);
18800
+ r2.raw.length === 1 && i2 !== void 0 ? i2.raw += `
18801
18801
  ` : t2.push(r2);
18802
18802
  continue;
18803
18803
  }
18804
18804
  if (r2 = this.tokenizer.code(e3)) {
18805
18805
  e3 = e3.substring(r2.raw.length);
18806
- let o2 = t2.at(-1);
18807
- o2?.type === "paragraph" || o2?.type === "text" ? (o2.raw += (o2.raw.endsWith(`
18806
+ let i2 = t2.at(-1);
18807
+ i2?.type === "paragraph" || i2?.type === "text" ? (i2.raw += (i2.raw.endsWith(`
18808
18808
  `) ? "" : `
18809
- `) + r2.raw, o2.text += `
18810
- ` + r2.text, this.inlineQueue.at(-1).src = o2.text) : t2.push(r2);
18809
+ `) + r2.raw, i2.text += `
18810
+ ` + r2.text, this.inlineQueue.at(-1).src = i2.text) : t2.push(r2);
18811
18811
  continue;
18812
18812
  }
18813
18813
  if (r2 = this.tokenizer.fences(e3)) {
@@ -18836,11 +18836,11 @@ var x = class l {
18836
18836
  }
18837
18837
  if (r2 = this.tokenizer.def(e3)) {
18838
18838
  e3 = e3.substring(r2.raw.length);
18839
- let o2 = t2.at(-1);
18840
- o2?.type === "paragraph" || o2?.type === "text" ? (o2.raw += (o2.raw.endsWith(`
18839
+ let i2 = t2.at(-1);
18840
+ i2?.type === "paragraph" || i2?.type === "text" ? (i2.raw += (i2.raw.endsWith(`
18841
18841
  `) ? "" : `
18842
- `) + r2.raw, o2.text += `
18843
- ` + r2.raw, this.inlineQueue.at(-1).src = o2.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title }, t2.push(r2));
18842
+ `) + r2.raw, i2.text += `
18843
+ ` + r2.raw, this.inlineQueue.at(-1).src = i2.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title }, t2.push(r2));
18844
18844
  continue;
18845
18845
  }
18846
18846
  if (r2 = this.tokenizer.table(e3)) {
@@ -18851,28 +18851,28 @@ var x = class l {
18851
18851
  e3 = e3.substring(r2.raw.length), t2.push(r2);
18852
18852
  continue;
18853
18853
  }
18854
- let i2 = e3;
18854
+ let o2 = e3;
18855
18855
  if (this.options.extensions?.startBlock) {
18856
- let o2 = 1 / 0, u2 = e3.slice(1), a2;
18856
+ let i2 = 1 / 0, l2 = e3.slice(1), a2;
18857
18857
  this.options.extensions.startBlock.forEach((p2) => {
18858
- a2 = p2.call({ lexer: this }, u2), typeof a2 == "number" && a2 >= 0 && (o2 = Math.min(o2, a2));
18859
- }), o2 < 1 / 0 && o2 >= 0 && (i2 = e3.substring(0, o2 + 1));
18858
+ a2 = p2.call({ lexer: this }, l2), typeof a2 == "number" && a2 >= 0 && (i2 = Math.min(i2, a2));
18859
+ }), i2 < 1 / 0 && i2 >= 0 && (o2 = e3.substring(0, i2 + 1));
18860
18860
  }
18861
- if (this.state.top && (r2 = this.tokenizer.paragraph(i2))) {
18862
- let o2 = t2.at(-1);
18863
- n2 && o2?.type === "paragraph" ? (o2.raw += (o2.raw.endsWith(`
18861
+ if (this.state.top && (r2 = this.tokenizer.paragraph(o2))) {
18862
+ let i2 = t2.at(-1);
18863
+ n2 && i2?.type === "paragraph" ? (i2.raw += (i2.raw.endsWith(`
18864
18864
  `) ? "" : `
18865
- `) + r2.raw, o2.text += `
18866
- ` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = o2.text) : t2.push(r2), n2 = i2.length !== e3.length, e3 = e3.substring(r2.raw.length);
18865
+ `) + r2.raw, i2.text += `
18866
+ ` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = i2.text) : t2.push(r2), n2 = o2.length !== e3.length, e3 = e3.substring(r2.raw.length);
18867
18867
  continue;
18868
18868
  }
18869
18869
  if (r2 = this.tokenizer.text(e3)) {
18870
18870
  e3 = e3.substring(r2.raw.length);
18871
- let o2 = t2.at(-1);
18872
- o2?.type === "text" ? (o2.raw += (o2.raw.endsWith(`
18871
+ let i2 = t2.at(-1);
18872
+ i2?.type === "text" ? (i2.raw += (i2.raw.endsWith(`
18873
18873
  `) ? "" : `
18874
- `) + r2.raw, o2.text += `
18875
- ` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = o2.text) : t2.push(r2);
18874
+ `) + r2.raw, i2.text += `
18875
+ ` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = i2.text) : t2.push(r2);
18876
18876
  continue;
18877
18877
  }
18878
18878
  if (e3) {
@@ -18899,84 +18899,84 @@ var x = class l {
18899
18899
  this.tokenizer.lexer = this;
18900
18900
  let n2 = e3;
18901
18901
  if (this.tokens.links && e3.includes("[")) {
18902
- let o2 = this.tokenizer.rules.inline.reflinkSearch, u2 = (a2) => {
18902
+ let i2 = this.tokenizer.rules.inline.reflinkSearch, l2 = (a2) => {
18903
18903
  let p2 = a2.lastIndexOf("[");
18904
18904
  if (!Object.hasOwn(this.tokens.links, a2.slice(p2 + 1, -1))) return a2;
18905
18905
  if (p2 > 1 && a2.charAt(0) !== "!") {
18906
18906
  let c2 = a2.slice(1, p2 - 1);
18907
- if (this.linkInText(c2)) return "[" + c2.replace(o2, u2) + "][" + "a".repeat(a2.length - p2 - 2) + "]";
18907
+ if (this.linkInText(c2)) return "[" + c2.replace(i2, l2) + "][" + "a".repeat(a2.length - p2 - 2) + "]";
18908
18908
  }
18909
18909
  return "[" + "a".repeat(a2.length - 2) + "]";
18910
18910
  };
18911
- n2 = n2.replace(o2, u2);
18911
+ n2 = n2.replace(i2, l2);
18912
18912
  }
18913
- n2 = n2.replace(this.tokenizer.rules.inline.anyPunctuation, (o2) => "+".repeat(o2.length)), n2 = n2.replace(this.tokenizer.rules.inline.blockSkip, (o2, u2, a2) => {
18913
+ n2 = n2.replace(this.tokenizer.rules.inline.anyPunctuation, (i2) => "+".repeat(i2.length)), n2 = n2.replace(this.tokenizer.rules.inline.blockSkip, (i2, l2, a2) => {
18914
18914
  let p2 = a2 ? a2.length : 0;
18915
- return o2.slice(0, p2) + "[" + "a".repeat(o2.length - p2 - 2) + "]";
18915
+ return i2.slice(0, p2) + "[" + "a".repeat(i2.length - p2 - 2) + "]";
18916
18916
  }), n2 = this.options.hooks?.emStrongMask?.call({ lexer: this }, n2) ?? n2;
18917
- let s2 = false, r2 = "", i2 = 1 / 0;
18917
+ let s2 = false, r2 = "", o2 = 1 / 0;
18918
18918
  for (; e3; ) {
18919
- if (e3.length < i2) i2 = e3.length;
18919
+ if (e3.length < o2) o2 = e3.length;
18920
18920
  else {
18921
18921
  this.infiniteLoopError(e3.charCodeAt(0));
18922
18922
  break;
18923
18923
  }
18924
18924
  s2 || (r2 = ""), s2 = false;
18925
- let o2;
18926
- if (this.options.extensions?.inline?.some((a2) => (o2 = a2.call({ lexer: this }, e3, t2)) ? (e3 = e3.substring(o2.raw.length), t2.push(o2), true) : false)) continue;
18927
- if (o2 = this.tokenizer.escape(e3)) {
18928
- e3 = e3.substring(o2.raw.length), t2.push(o2);
18925
+ let i2;
18926
+ if (this.options.extensions?.inline?.some((a2) => (i2 = a2.call({ lexer: this }, e3, t2)) ? (e3 = e3.substring(i2.raw.length), t2.push(i2), true) : false)) continue;
18927
+ if (i2 = this.tokenizer.escape(e3)) {
18928
+ e3 = e3.substring(i2.raw.length), t2.push(i2);
18929
18929
  continue;
18930
18930
  }
18931
- if (o2 = this.tokenizer.tag(e3)) {
18932
- e3 = e3.substring(o2.raw.length), t2.push(o2);
18931
+ if (i2 = this.tokenizer.tag(e3)) {
18932
+ e3 = e3.substring(i2.raw.length), t2.push(i2);
18933
18933
  continue;
18934
18934
  }
18935
- if (o2 = this.tokenizer.link(e3)) {
18936
- e3 = e3.substring(o2.raw.length), t2.push(o2);
18935
+ if (i2 = this.tokenizer.link(e3)) {
18936
+ e3 = e3.substring(i2.raw.length), t2.push(i2);
18937
18937
  continue;
18938
18938
  }
18939
- if (o2 = this.tokenizer.reflink(e3, this.tokens.links)) {
18940
- e3 = e3.substring(o2.raw.length);
18939
+ if (i2 = this.tokenizer.reflink(e3, this.tokens.links)) {
18940
+ e3 = e3.substring(i2.raw.length);
18941
18941
  let a2 = t2.at(-1);
18942
- o2.type === "text" && a2?.type === "text" ? (a2.raw += o2.raw, a2.text += o2.text) : t2.push(o2);
18942
+ i2.type === "text" && a2?.type === "text" ? (a2.raw += i2.raw, a2.text += i2.text) : t2.push(i2);
18943
18943
  continue;
18944
18944
  }
18945
- if (o2 = this.tokenizer.emStrong(e3, n2, r2)) {
18946
- e3 = e3.substring(o2.raw.length), t2.push(o2);
18945
+ if (i2 = this.tokenizer.emStrong(e3, n2, r2)) {
18946
+ e3 = e3.substring(i2.raw.length), t2.push(i2);
18947
18947
  continue;
18948
18948
  }
18949
- if (o2 = this.tokenizer.codespan(e3)) {
18950
- e3 = e3.substring(o2.raw.length), t2.push(o2);
18949
+ if (i2 = this.tokenizer.codespan(e3)) {
18950
+ e3 = e3.substring(i2.raw.length), t2.push(i2);
18951
18951
  continue;
18952
18952
  }
18953
- if (o2 = this.tokenizer.br(e3)) {
18954
- e3 = e3.substring(o2.raw.length), t2.push(o2);
18953
+ if (i2 = this.tokenizer.br(e3)) {
18954
+ e3 = e3.substring(i2.raw.length), t2.push(i2);
18955
18955
  continue;
18956
18956
  }
18957
- if (o2 = this.tokenizer.del(e3, n2, r2)) {
18958
- e3 = e3.substring(o2.raw.length), t2.push(o2);
18957
+ if (i2 = this.tokenizer.del(e3, n2, r2)) {
18958
+ e3 = e3.substring(i2.raw.length), t2.push(i2);
18959
18959
  continue;
18960
18960
  }
18961
- if (o2 = this.tokenizer.autolink(e3)) {
18962
- e3 = e3.substring(o2.raw.length), t2.push(o2);
18961
+ if (i2 = this.tokenizer.autolink(e3)) {
18962
+ e3 = e3.substring(i2.raw.length), t2.push(i2);
18963
18963
  continue;
18964
18964
  }
18965
- if (!this.state.inLink && (o2 = this.tokenizer.url(e3))) {
18966
- e3 = e3.substring(o2.raw.length), t2.push(o2);
18965
+ if (!this.state.inLink && (i2 = this.tokenizer.url(e3))) {
18966
+ e3 = e3.substring(i2.raw.length), t2.push(i2);
18967
18967
  continue;
18968
18968
  }
18969
- let u2 = e3;
18969
+ let l2 = e3;
18970
18970
  if (this.options.extensions?.startInline) {
18971
18971
  let a2 = 1 / 0, p2 = e3.slice(1), c2;
18972
18972
  this.options.extensions.startInline.forEach((h2) => {
18973
18973
  c2 = h2.call({ lexer: this }, p2), typeof c2 == "number" && c2 >= 0 && (a2 = Math.min(a2, c2));
18974
- }), a2 < 1 / 0 && a2 >= 0 && (u2 = e3.substring(0, a2 + 1));
18974
+ }), a2 < 1 / 0 && a2 >= 0 && (l2 = e3.substring(0, a2 + 1));
18975
18975
  }
18976
- if (o2 = this.tokenizer.inlineText(u2)) {
18977
- e3 = e3.substring(o2.raw.length), o2.raw.slice(-1) !== "_" && (r2 = o2.raw.slice(-1)), s2 = true;
18976
+ if (i2 = this.tokenizer.inlineText(l2)) {
18977
+ e3 = e3.substring(i2.raw.length), i2.raw.slice(-1) !== "_" && (r2 = i2.raw.slice(-1)), s2 = true;
18978
18978
  let a2 = t2.at(-1);
18979
- a2?.type === "text" ? (a2.raw += o2.raw, a2.text += o2.text) : t2.push(o2);
18979
+ a2?.type === "text" ? (a2.raw += i2.raw, a2.text += i2.text) : t2.push(i2);
18980
18980
  continue;
18981
18981
  }
18982
18982
  if (e3) {
@@ -18996,16 +18996,16 @@ var P$1 = class P {
18996
18996
  options;
18997
18997
  parser;
18998
18998
  constructor(e3) {
18999
- this.options = e3 || R;
18999
+ this.options = e3 || T;
19000
19000
  }
19001
19001
  space(e3) {
19002
19002
  return "";
19003
19003
  }
19004
19004
  code({ text: e3, lang: t2, escaped: n2 }) {
19005
- let s2 = (t2 || "").match(m$1.notSpaceStart)?.[0], r2 = e3.replace(m$1.endingNewline, "") + `
19006
- `;
19007
- return s2 ? '<pre><code class="language-' + T(s2) + '">' + (n2 ? r2 : T(r2, true)) + `</code></pre>
19008
- ` : "<pre><code>" + (n2 ? r2 : T(r2, true)) + `</code></pre>
19005
+ let s2 = (t2 || "").match(m$1.notSpaceStart)?.[0], r2 = e3 ? e3.replace(m$1.endingNewline, "") + `
19006
+ ` : "";
19007
+ return s2 ? '<pre><code class="language-' + R(s2) + '">' + (n2 ? r2 : R(r2, true)) + `</code></pre>
19008
+ ` : "<pre><code>" + (n2 ? r2 : R(r2, true)) + `</code></pre>
19009
19009
  `;
19010
19010
  }
19011
19011
  blockquote({ tokens: e3 }) {
@@ -19029,12 +19029,12 @@ ${this.parser.parse(e3)}</blockquote>
19029
19029
  }
19030
19030
  list(e3) {
19031
19031
  let t2 = e3.ordered, n2 = e3.start, s2 = "";
19032
- for (let o2 = 0; o2 < e3.items.length; o2++) {
19033
- let u2 = e3.items[o2];
19034
- s2 += this.listitem(u2);
19032
+ for (let i2 = 0; i2 < e3.items.length; i2++) {
19033
+ let l2 = e3.items[i2];
19034
+ s2 += this.listitem(l2);
19035
19035
  }
19036
- let r2 = t2 ? "ol" : "ul", i2 = t2 && n2 !== 1 ? ' start="' + n2 + '"' : "";
19037
- return "<" + r2 + i2 + `>
19036
+ let r2 = t2 ? "ol" : "ul", o2 = t2 && n2 !== 1 ? ' start="' + n2 + '"' : "";
19037
+ return "<" + r2 + o2 + `>
19038
19038
  ` + s2 + "</" + r2 + `>
19039
19039
  `;
19040
19040
  }
@@ -19055,9 +19055,9 @@ ${this.parser.parse(e3)}</blockquote>
19055
19055
  t2 += this.tablerow({ text: n2 });
19056
19056
  let s2 = "";
19057
19057
  for (let r2 = 0; r2 < e3.rows.length; r2++) {
19058
- let i2 = e3.rows[r2];
19058
+ let o2 = e3.rows[r2];
19059
19059
  n2 = "";
19060
- for (let o2 = 0; o2 < i2.length; o2++) n2 += this.tablecell(i2[o2]);
19060
+ for (let i2 = 0; i2 < o2.length; i2++) n2 += this.tablecell(o2[i2]);
19061
19061
  s2 += this.tablerow({ text: n2 });
19062
19062
  }
19063
19063
  return s2 && (s2 = `<tbody>${s2}</tbody>`), `<table>
@@ -19083,7 +19083,7 @@ ${e3}</tr>
19083
19083
  return `<em>${this.parser.parseInline(e3)}</em>`;
19084
19084
  }
19085
19085
  codespan({ text: e3 }) {
19086
- return `<code>${T(e3, true)}</code>`;
19086
+ return `<code>${R(e3, true)}</code>`;
19087
19087
  }
19088
19088
  br(e3) {
19089
19089
  return "<br>";
@@ -19091,23 +19091,23 @@ ${e3}</tr>
19091
19091
  del({ tokens: e3 }) {
19092
19092
  return `<del>${this.parser.parseInline(e3)}</del>`;
19093
19093
  }
19094
- link({ href: e3, title: t2, tokens: n2 }) {
19095
- let s2 = this.parser.parseInline(n2), r2 = Y(e3);
19096
- if (r2 === null) return s2;
19097
- e3 = r2;
19098
- let i2 = '<a href="' + e3 + '"';
19099
- return t2 && (i2 += ' title="' + T(t2) + '"'), i2 += ">" + s2 + "</a>", i2;
19094
+ link({ href: e3, title: t2, text: n2, tokens: s2, autolink: r2 }) {
19095
+ let o2 = r2 ? R(n2, true) : this.parser.parseInline(s2), i2 = Y(e3);
19096
+ if (i2 === null) return o2;
19097
+ e3 = R(i2, r2);
19098
+ let l2 = '<a href="' + e3 + '"';
19099
+ return t2 && (l2 += ' title="' + R(t2) + '"'), l2 += ">" + o2 + "</a>", l2;
19100
19100
  }
19101
19101
  image({ href: e3, title: t2, text: n2, tokens: s2 }) {
19102
19102
  s2 && (n2 = this.parser.parseInline(s2, this.parser.textRenderer));
19103
19103
  let r2 = Y(e3);
19104
- if (r2 === null) return T(n2);
19104
+ if (r2 === null) return R(n2);
19105
19105
  e3 = r2;
19106
- let i2 = `<img src="${e3}" alt="${T(n2)}"`;
19107
- return t2 && (i2 += ` title="${T(t2)}"`), i2 += ">", i2;
19106
+ let o2 = `<img src="${R(e3)}" alt="${R(n2)}"`;
19107
+ return t2 && (o2 += ` title="${R(t2)}"`), o2 += ">", o2;
19108
19108
  }
19109
19109
  text(e3) {
19110
- return "tokens" in e3 && e3.tokens ? this.parser.parseInline(e3.tokens) : "escaped" in e3 && e3.escaped ? e3.text : T(e3.text);
19110
+ return "tokens" in e3 && e3.tokens ? this.parser.parseInline(e3.tokens) : "escaped" in e3 && e3.escaped ? e3.text : R(e3.text);
19111
19111
  }
19112
19112
  };
19113
19113
  var L = class {
@@ -19142,18 +19142,18 @@ var L = class {
19142
19142
  return e3;
19143
19143
  }
19144
19144
  };
19145
- var b$1 = class l2 {
19145
+ var b$1 = class u2 {
19146
19146
  options;
19147
19147
  renderer;
19148
19148
  textRenderer;
19149
19149
  constructor(e3) {
19150
- this.options = e3 || R, this.options.renderer = this.options.renderer || new P$1(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
19150
+ this.options = e3 || T, this.options.renderer = this.options.renderer || new P$1(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
19151
19151
  }
19152
19152
  static parse(e3, t2) {
19153
- return new l2(t2).parse(e3);
19153
+ return new u2(t2).parse(e3);
19154
19154
  }
19155
19155
  static parseInline(e3, t2) {
19156
- return new l2(t2).parseInline(e3);
19156
+ return new u2(t2).parseInline(e3);
19157
19157
  }
19158
19158
  parse(e3) {
19159
19159
  this.renderer.parser = this;
@@ -19161,9 +19161,9 @@ var b$1 = class l2 {
19161
19161
  for (let n2 = 0; n2 < e3.length; n2++) {
19162
19162
  let s2 = e3[n2];
19163
19163
  if (this.options.extensions?.renderers?.[s2.type]) {
19164
- let i2 = s2, o2 = this.options.extensions.renderers[i2.type].call({ parser: this }, i2);
19165
- if (o2 !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(i2.type)) {
19166
- t2 += o2 || "";
19164
+ let o2 = s2, i2 = this.options.extensions.renderers[o2.type].call({ parser: this }, o2);
19165
+ if (i2 !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(o2.type)) {
19166
+ t2 += i2 || "";
19167
19167
  continue;
19168
19168
  }
19169
19169
  }
@@ -19218,9 +19218,9 @@ var b$1 = class l2 {
19218
19218
  break;
19219
19219
  }
19220
19220
  default: {
19221
- let i2 = 'Token with "' + r2.type + '" type was not found.';
19222
- if (this.options.silent) return console.error(i2), "";
19223
- throw new Error(i2);
19221
+ let o2 = 'Token with "' + r2.type + '" type was not found.';
19222
+ if (this.options.silent) return console.error(o2), "";
19223
+ throw new Error(o2);
19224
19224
  }
19225
19225
  }
19226
19226
  }
@@ -19232,62 +19232,62 @@ var b$1 = class l2 {
19232
19232
  for (let s2 = 0; s2 < e3.length; s2++) {
19233
19233
  let r2 = e3[s2];
19234
19234
  if (this.options.extensions?.renderers?.[r2.type]) {
19235
- let o2 = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
19236
- if (o2 !== false || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
19237
- n2 += o2 || "";
19235
+ let i2 = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
19236
+ if (i2 !== false || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
19237
+ n2 += i2 || "";
19238
19238
  continue;
19239
19239
  }
19240
19240
  }
19241
- let i2 = r2;
19242
- switch (i2.type) {
19241
+ let o2 = r2;
19242
+ switch (o2.type) {
19243
19243
  case "escape": {
19244
- n2 += t2.text(i2);
19244
+ n2 += t2.text(o2);
19245
19245
  break;
19246
19246
  }
19247
19247
  case "html": {
19248
- n2 += t2.html(i2);
19248
+ n2 += t2.html(o2);
19249
19249
  break;
19250
19250
  }
19251
19251
  case "link": {
19252
- n2 += t2.link(i2);
19252
+ n2 += t2.link(o2);
19253
19253
  break;
19254
19254
  }
19255
19255
  case "image": {
19256
- n2 += t2.image(i2);
19256
+ n2 += t2.image(o2);
19257
19257
  break;
19258
19258
  }
19259
19259
  case "checkbox": {
19260
- n2 += t2.checkbox(i2);
19260
+ n2 += t2.checkbox(o2);
19261
19261
  break;
19262
19262
  }
19263
19263
  case "strong": {
19264
- n2 += t2.strong(i2);
19264
+ n2 += t2.strong(o2);
19265
19265
  break;
19266
19266
  }
19267
19267
  case "em": {
19268
- n2 += t2.em(i2);
19268
+ n2 += t2.em(o2);
19269
19269
  break;
19270
19270
  }
19271
19271
  case "codespan": {
19272
- n2 += t2.codespan(i2);
19272
+ n2 += t2.codespan(o2);
19273
19273
  break;
19274
19274
  }
19275
19275
  case "br": {
19276
- n2 += t2.br(i2);
19276
+ n2 += t2.br(o2);
19277
19277
  break;
19278
19278
  }
19279
19279
  case "del": {
19280
- n2 += t2.del(i2);
19280
+ n2 += t2.del(o2);
19281
19281
  break;
19282
19282
  }
19283
19283
  case "text": {
19284
- n2 += t2.text(i2);
19284
+ n2 += t2.text(o2);
19285
19285
  break;
19286
19286
  }
19287
19287
  default: {
19288
- let o2 = 'Token with "' + i2.type + '" type was not found.';
19289
- if (this.options.silent) return console.error(o2), "";
19290
- throw new Error(o2);
19288
+ let i2 = 'Token with "' + o2.type + '" type was not found.';
19289
+ if (this.options.silent) return console.error(i2), "";
19290
+ throw new Error(i2);
19291
19291
  }
19292
19292
  }
19293
19293
  }
@@ -19298,7 +19298,7 @@ var S$1 = class S {
19298
19298
  options;
19299
19299
  block;
19300
19300
  constructor(e3) {
19301
- this.options = e3 || R;
19301
+ this.options = e3 || T;
19302
19302
  }
19303
19303
  static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
19304
19304
  static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
@@ -19340,8 +19340,8 @@ var Z = class {
19340
19340
  for (let s2 of e3) switch (n2 = n2.concat(t2.call(this, s2)), s2.type) {
19341
19341
  case "table": {
19342
19342
  let r2 = s2;
19343
- for (let i2 of r2.header) n2 = n2.concat(this.walkTokens(i2.tokens, t2));
19344
- for (let i2 of r2.rows) for (let o2 of i2) n2 = n2.concat(this.walkTokens(o2.tokens, t2));
19343
+ for (let o2 of r2.header) n2 = n2.concat(this.walkTokens(o2.tokens, t2));
19344
+ for (let o2 of r2.rows) for (let i2 of o2) n2 = n2.concat(this.walkTokens(i2.tokens, t2));
19345
19345
  break;
19346
19346
  }
19347
19347
  case "list": {
@@ -19351,9 +19351,9 @@ var Z = class {
19351
19351
  }
19352
19352
  default: {
19353
19353
  let r2 = s2;
19354
- this.defaults.extensions?.childTokens?.[r2.type] ? this.defaults.extensions.childTokens[r2.type].forEach((i2) => {
19355
- let o2 = r2[i2].flat(1 / 0);
19356
- n2 = n2.concat(this.walkTokens(o2, t2));
19354
+ this.defaults.extensions?.childTokens?.[r2.type] ? this.defaults.extensions.childTokens[r2.type].forEach((o2) => {
19355
+ let i2 = r2[o2].flat(1 / 0);
19356
+ n2 = n2.concat(this.walkTokens(i2, t2));
19357
19357
  }) : r2.tokens && (n2 = n2.concat(this.walkTokens(r2.tokens, t2)));
19358
19358
  }
19359
19359
  }
@@ -19366,26 +19366,26 @@ var Z = class {
19366
19366
  if (s2.async = this.defaults.async || s2.async || false, n2.extensions && (n2.extensions.forEach((r2) => {
19367
19367
  if (!r2.name) throw new Error("extension name required");
19368
19368
  if ("renderer" in r2) {
19369
- let i2 = t2.renderers[r2.name];
19370
- i2 ? t2.renderers[r2.name] = function(...o2) {
19371
- let u2 = r2.renderer.apply(this, o2);
19372
- return u2 === false && (u2 = i2.apply(this, o2)), u2;
19369
+ let o2 = t2.renderers[r2.name];
19370
+ o2 ? t2.renderers[r2.name] = function(...i2) {
19371
+ let l2 = r2.renderer.apply(this, i2);
19372
+ return l2 === false && (l2 = o2.apply(this, i2)), l2;
19373
19373
  } : t2.renderers[r2.name] = r2.renderer;
19374
19374
  }
19375
19375
  if ("tokenizer" in r2) {
19376
19376
  if (!r2.level || r2.level !== "block" && r2.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
19377
- let i2 = t2[r2.level];
19378
- i2 ? i2.unshift(r2.tokenizer) : t2[r2.level] = [r2.tokenizer], r2.start && (r2.level === "block" ? t2.startBlock ? t2.startBlock.push(r2.start) : t2.startBlock = [r2.start] : r2.level === "inline" && (t2.startInline ? t2.startInline.push(r2.start) : t2.startInline = [r2.start]));
19377
+ let o2 = t2[r2.level];
19378
+ o2 ? o2.unshift(r2.tokenizer) : t2[r2.level] = [r2.tokenizer], r2.start && (r2.level === "block" ? t2.startBlock ? t2.startBlock.push(r2.start) : t2.startBlock = [r2.start] : r2.level === "inline" && (t2.startInline ? t2.startInline.push(r2.start) : t2.startInline = [r2.start]));
19379
19379
  }
19380
19380
  "childTokens" in r2 && r2.childTokens && (t2.childTokens[r2.name] = r2.childTokens);
19381
19381
  }), s2.extensions = t2), n2.renderer) {
19382
19382
  let r2 = this.defaults.renderer || new P$1(this.defaults);
19383
- for (let i2 in n2.renderer) {
19384
- if (!(i2 in r2)) throw new Error(`renderer '${i2}' does not exist`);
19385
- if (["options", "parser"].includes(i2)) continue;
19386
- let o2 = i2, u2 = n2.renderer[o2], a2 = r2[o2];
19387
- r2[o2] = (...p2) => {
19388
- let c2 = u2.apply(r2, p2);
19383
+ for (let o2 in n2.renderer) {
19384
+ if (!(o2 in r2)) throw new Error(`renderer '${o2}' does not exist`);
19385
+ if (["options", "parser"].includes(o2)) continue;
19386
+ let i2 = o2, l2 = n2.renderer[i2], a2 = r2[i2];
19387
+ r2[i2] = (...p2) => {
19388
+ let c2 = l2.apply(r2, p2);
19389
19389
  return c2 === false && (c2 = a2.apply(r2, p2)), c2 || "";
19390
19390
  };
19391
19391
  }
@@ -19393,12 +19393,12 @@ var Z = class {
19393
19393
  }
19394
19394
  if (n2.tokenizer) {
19395
19395
  let r2 = this.defaults.tokenizer || new y$1(this.defaults);
19396
- for (let i2 in n2.tokenizer) {
19397
- if (!(i2 in r2)) throw new Error(`tokenizer '${i2}' does not exist`);
19398
- if (["options", "rules", "lexer"].includes(i2)) continue;
19399
- let o2 = i2, u2 = n2.tokenizer[o2], a2 = r2[o2];
19400
- r2[o2] = (...p2) => {
19401
- let c2 = u2.apply(r2, p2);
19396
+ for (let o2 in n2.tokenizer) {
19397
+ if (!(o2 in r2)) throw new Error(`tokenizer '${o2}' does not exist`);
19398
+ if (["options", "rules", "lexer"].includes(o2)) continue;
19399
+ let i2 = o2, l2 = n2.tokenizer[i2], a2 = r2[i2];
19400
+ r2[i2] = (...p2) => {
19401
+ let c2 = l2.apply(r2, p2);
19402
19402
  return c2 === false && (c2 = a2.apply(r2, p2)), c2;
19403
19403
  };
19404
19404
  }
@@ -19406,33 +19406,33 @@ var Z = class {
19406
19406
  }
19407
19407
  if (n2.hooks) {
19408
19408
  let r2 = this.defaults.hooks || new S$1();
19409
- for (let i2 in n2.hooks) {
19410
- if (!(i2 in r2)) throw new Error(`hook '${i2}' does not exist`);
19411
- if (["options", "block"].includes(i2)) continue;
19412
- let o2 = i2, u2 = n2.hooks[o2], a2 = r2[o2];
19413
- S$1.passThroughHooks.has(i2) ? r2[o2] = (p2) => {
19414
- if (this.defaults.async && S$1.passThroughHooksRespectAsync.has(i2)) return (async () => {
19415
- let h2 = await u2.call(r2, p2);
19409
+ for (let o2 in n2.hooks) {
19410
+ if (!(o2 in r2)) throw new Error(`hook '${o2}' does not exist`);
19411
+ if (["options", "block"].includes(o2)) continue;
19412
+ let i2 = o2, l2 = n2.hooks[i2], a2 = r2[i2];
19413
+ S$1.passThroughHooks.has(o2) ? r2[i2] = (p2) => {
19414
+ if (this.defaults.async && S$1.passThroughHooksRespectAsync.has(o2)) return (async () => {
19415
+ let h2 = await l2.call(r2, p2);
19416
19416
  return a2.call(r2, h2);
19417
19417
  })();
19418
- let c2 = u2.call(r2, p2);
19418
+ let c2 = l2.call(r2, p2);
19419
19419
  return a2.call(r2, c2);
19420
- } : r2[o2] = (...p2) => {
19420
+ } : r2[i2] = (...p2) => {
19421
19421
  if (this.defaults.async) return (async () => {
19422
- let h2 = await u2.apply(r2, p2);
19422
+ let h2 = await l2.apply(r2, p2);
19423
19423
  return h2 === false && (h2 = await a2.apply(r2, p2)), h2;
19424
19424
  })();
19425
- let c2 = u2.apply(r2, p2);
19425
+ let c2 = l2.apply(r2, p2);
19426
19426
  return c2 === false && (c2 = a2.apply(r2, p2)), c2;
19427
19427
  };
19428
19428
  }
19429
19429
  s2.hooks = r2;
19430
19430
  }
19431
19431
  if (n2.walkTokens) {
19432
- let r2 = this.defaults.walkTokens, i2 = n2.walkTokens;
19433
- s2.walkTokens = function(o2) {
19434
- let u2 = [];
19435
- return u2.push(i2.call(this, o2)), r2 && (u2 = u2.concat(r2.call(this, o2))), u2;
19432
+ let r2 = this.defaults.walkTokens, o2 = n2.walkTokens;
19433
+ s2.walkTokens = function(i2) {
19434
+ let l2 = [];
19435
+ return l2.push(o2.call(this, i2)), r2 && (l2 = l2.concat(r2.call(this, i2))), l2;
19436
19436
  };
19437
19437
  }
19438
19438
  this.defaults = { ...this.defaults, ...s2 };
@@ -19449,24 +19449,24 @@ var Z = class {
19449
19449
  }
19450
19450
  parseMarkdown(e3) {
19451
19451
  return (n2, s2) => {
19452
- let r2 = { ...s2 }, i2 = { ...this.defaults, ...r2 }, o2 = this.onError(!!i2.silent, !!i2.async);
19453
- if (this.defaults.async === true && r2.async === false) return o2(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
19454
- if (typeof n2 > "u" || n2 === null) return o2(new Error("marked(): input parameter is undefined or null"));
19455
- if (typeof n2 != "string") return o2(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n2) + ", string expected"));
19456
- if (i2.hooks && (i2.hooks.options = i2, i2.hooks.block = e3), i2.async) return (async () => {
19457
- let u2 = i2.hooks ? await i2.hooks.preprocess(n2) : n2, p2 = await (i2.hooks ? await i2.hooks.provideLexer(e3) : e3 ? x.lex : x.lexInline)(u2, i2), c2 = i2.hooks ? await i2.hooks.processAllTokens(p2) : p2;
19458
- i2.walkTokens && await Promise.all(this.walkTokens(c2, i2.walkTokens));
19459
- let d2 = await (i2.hooks ? await i2.hooks.provideParser(e3) : e3 ? b$1.parse : b$1.parseInline)(c2, i2);
19460
- return i2.hooks ? await i2.hooks.postprocess(d2) : d2;
19461
- })().catch(o2);
19452
+ let r2 = { ...s2 }, o2 = { ...this.defaults, ...r2 }, i2 = this.onError(!!o2.silent, !!o2.async);
19453
+ if (this.defaults.async === true && r2.async === false) return i2(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
19454
+ if (typeof n2 > "u" || n2 === null) return i2(new Error("marked(): input parameter is undefined or null"));
19455
+ if (typeof n2 != "string") return i2(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n2) + ", string expected"));
19456
+ if (o2.hooks && (o2.hooks.options = o2, o2.hooks.block = e3), o2.async) return (async () => {
19457
+ let l2 = o2.hooks ? await o2.hooks.preprocess(n2) : n2, p2 = await (o2.hooks ? await o2.hooks.provideLexer(e3) : e3 ? x.lex : x.lexInline)(l2, o2), c2 = o2.hooks ? await o2.hooks.processAllTokens(p2) : p2;
19458
+ o2.walkTokens && await Promise.all(this.walkTokens(c2, o2.walkTokens));
19459
+ let d2 = await (o2.hooks ? await o2.hooks.provideParser(e3) : e3 ? b$1.parse : b$1.parseInline)(c2, o2);
19460
+ return o2.hooks ? await o2.hooks.postprocess(d2) : d2;
19461
+ })().catch(i2);
19462
19462
  try {
19463
- i2.hooks && (n2 = i2.hooks.preprocess(n2));
19464
- let a2 = (i2.hooks ? i2.hooks.provideLexer(e3) : e3 ? x.lex : x.lexInline)(n2, i2);
19465
- i2.hooks && (a2 = i2.hooks.processAllTokens(a2)), i2.walkTokens && this.walkTokens(a2, i2.walkTokens);
19466
- let c2 = (i2.hooks ? i2.hooks.provideParser(e3) : e3 ? b$1.parse : b$1.parseInline)(a2, i2);
19467
- return i2.hooks && (c2 = i2.hooks.postprocess(c2)), c2;
19468
- } catch (u2) {
19469
- return o2(u2);
19463
+ o2.hooks && (n2 = o2.hooks.preprocess(n2));
19464
+ let a2 = (o2.hooks ? o2.hooks.provideLexer(e3) : e3 ? x.lex : x.lexInline)(n2, o2);
19465
+ o2.hooks && (a2 = o2.hooks.processAllTokens(a2)), o2.walkTokens && this.walkTokens(a2, o2.walkTokens);
19466
+ let c2 = (o2.hooks ? o2.hooks.provideParser(e3) : e3 ? b$1.parse : b$1.parseInline)(a2, o2);
19467
+ return o2.hooks && (c2 = o2.hooks.postprocess(c2)), c2;
19468
+ } catch (l2) {
19469
+ return i2(l2);
19470
19470
  }
19471
19471
  };
19472
19472
  }
@@ -19474,7 +19474,7 @@ var Z = class {
19474
19474
  return (n2) => {
19475
19475
  if (n2.message += `
19476
19476
  Please report this to https://github.com/markedjs/marked.`, e3) {
19477
- let s2 = "<p>An error occurred:</p><pre>" + T(n2.message + "", true) + "</pre>";
19477
+ let s2 = "<p>An error occurred:</p><pre>" + R(n2.message + "", true) + "</pre>";
19478
19478
  return t2 ? Promise.resolve(s2) : s2;
19479
19479
  }
19480
19480
  if (t2) return Promise.reject(n2);
@@ -19483,20 +19483,20 @@ Please report this to https://github.com/markedjs/marked.`, e3) {
19483
19483
  }
19484
19484
  };
19485
19485
  var M = new Z();
19486
- function f$1(l4, e3) {
19487
- return M.parse(l4, e3);
19486
+ function f$1(u4, e3) {
19487
+ return M.parse(u4, e3);
19488
19488
  }
19489
- f$1.options = f$1.setOptions = function(l4) {
19490
- return M.setOptions(l4), f$1.defaults = M.defaults, j(f$1.defaults), f$1;
19489
+ f$1.options = f$1.setOptions = function(u4) {
19490
+ return M.setOptions(u4), f$1.defaults = M.defaults, j(f$1.defaults), f$1;
19491
19491
  };
19492
19492
  f$1.getDefaults = A;
19493
- f$1.defaults = R;
19494
- function dt(...l4) {
19495
- return M.use(...l4), f$1.defaults = M.defaults, j(f$1.defaults), f$1;
19493
+ f$1.defaults = T;
19494
+ function gt(...u4) {
19495
+ return M.use(...u4), f$1.defaults = M.defaults, j(f$1.defaults), f$1;
19496
19496
  }
19497
- f$1.use = dt;
19498
- f$1.walkTokens = function(l4, e3) {
19499
- return M.walkTokens(l4, e3);
19497
+ f$1.use = gt;
19498
+ f$1.walkTokens = function(u4, e3) {
19499
+ return M.walkTokens(u4, e3);
19500
19500
  };
19501
19501
  f$1.parseInline = M.parseInline;
19502
19502
  f$1.Parser = b$1;
@@ -19522,18 +19522,18 @@ function _arrayLikeToArray(r2, a2) {
19522
19522
  function _arrayWithHoles(r2) {
19523
19523
  if (Array.isArray(r2)) return r2;
19524
19524
  }
19525
- function _iterableToArrayLimit(r2, l4) {
19525
+ function _iterableToArrayLimit(r2, l2) {
19526
19526
  var t2 = null == r2 ? null : "undefined" != typeof Symbol && r2[Symbol.iterator] || r2["@@iterator"];
19527
19527
  if (null != t2) {
19528
- var e3, n2, i2, u2, a2 = [], f2 = true, o2 = false;
19528
+ var e3, n2, i2, u4, a2 = [], f2 = true, o2 = false;
19529
19529
  try {
19530
- if (i2 = (t2 = t2.call(r2)).next, 0 === l4) ;
19531
- else for (; !(f2 = (e3 = i2.call(t2)).done) && (a2.push(e3.value), a2.length !== l4); f2 = true) ;
19530
+ if (i2 = (t2 = t2.call(r2)).next, 0 === l2) ;
19531
+ else for (; !(f2 = (e3 = i2.call(t2)).done) && (a2.push(e3.value), a2.length !== l2); f2 = true) ;
19532
19532
  } catch (r3) {
19533
19533
  o2 = true, n2 = r3;
19534
19534
  } finally {
19535
19535
  try {
19536
- if (!f2 && null != t2.return && (u2 = t2.return(), Object(u2) !== u2)) return;
19536
+ if (!f2 && null != t2.return && (u4 = t2.return(), Object(u4) !== u4)) return;
19537
19537
  } finally {
19538
19538
  if (o2) throw n2;
19539
19539
  }
@@ -19630,14 +19630,14 @@ function addToSet(set, array) {
19630
19630
  if (!arrayIsArray(array)) {
19631
19631
  return set;
19632
19632
  }
19633
- let l4 = array.length;
19634
- while (l4--) {
19635
- let element = array[l4];
19633
+ let l2 = array.length;
19634
+ while (l2--) {
19635
+ let element = array[l2];
19636
19636
  if (typeof element === "string") {
19637
19637
  const lcElement = transformCaseFunc(element);
19638
19638
  if (lcElement !== element) {
19639
19639
  if (!isFrozen(array)) {
19640
- array[l4] = lcElement;
19640
+ array[l2] = lcElement;
19641
19641
  }
19642
19642
  element = lcElement;
19643
19643
  }
@@ -19845,7 +19845,7 @@ const _resolveObjectOption = function _resolveObjectOption2(cfg, key, makeFallba
19845
19845
  function createDOMPurify() {
19846
19846
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
19847
19847
  const DOMPurify = (root2) => createDOMPurify(root2);
19848
- DOMPurify.version = "3.4.14";
19848
+ DOMPurify.version = "3.4.15";
19849
19849
  DOMPurify.removed = [];
19850
19850
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
19851
19851
  DOMPurify.isSupported = false;
@@ -19862,6 +19862,7 @@ function createDOMPurify() {
19862
19862
  const ElementPrototype = Element2.prototype;
19863
19863
  const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
19864
19864
  const remove2 = lookupGetter(ElementPrototype, "remove");
19865
+ const removeAttributeNode = lookupGetter(ElementPrototype, "removeAttributeNode");
19865
19866
  const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
19866
19867
  const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
19867
19868
  const getParentNode2 = lookupGetter(ElementPrototype, "parentNode");
@@ -20295,7 +20296,7 @@ function createDOMPurify() {
20295
20296
  };
20296
20297
  const _stripAttributeNode = function _stripAttributeNode2(element, attribute, name) {
20297
20298
  try {
20298
- element.removeAttributeNode(attribute);
20299
+ removeAttributeNode(element, attribute);
20299
20300
  } catch (_2) {
20300
20301
  try {
20301
20302
  element.removeAttribute(name);
@@ -20343,7 +20344,7 @@ function createDOMPurify() {
20343
20344
  });
20344
20345
  try {
20345
20346
  if (attr) {
20346
- element.removeAttributeNode(attr);
20347
+ removeAttributeNode(element, attr);
20347
20348
  } else {
20348
20349
  element.removeAttribute(name);
20349
20350
  }
@@ -20531,7 +20532,16 @@ function createDOMPurify() {
20531
20532
  // makes the direct read diverge from the cached read; a clean form
20532
20533
  // (same-realm OR foreign-realm) has both reads pointing at the same
20533
20534
  // canonical NamedNodeMap.
20534
- element.attributes !== getAttributes(element) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
20535
+ element.attributes !== getAttributes(element) || typeof element.removeAttribute !== "function" || // A form descendant named "removeAttributeNode" or "getAttributeNode"
20536
+ // shadows these Attr-node methods via [LegacyOverrideBuiltIns].
20537
+ // _removeAttribute() / _stripAttributeNode() reach for
20538
+ // element.removeAttributeNode(attr) first; when it is shadowed the call
20539
+ // throws and the name-based fallback element.removeAttribute(name)
20540
+ // ASCII-lowercases its lookup key in an HTML document, silently missing
20541
+ // a case-preserved event-handler attribute (e.g. an ONANIMATIONSTART
20542
+ // that reached the sanitizer through an XML/XHTML parse). Flag the form
20543
+ // so it is removed wholesale, exactly as for the other shadowed methods.
20544
+ typeof element.removeAttributeNode !== "function" || typeof element.getAttributeNode !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
20535
20545
  // returns the integer 1 for any Element regardless of realm; direct
20536
20546
  // read on a clobbered form (e.g. <input name="nodeType">) returns
20537
20547
  // the named child element. Cheap addition — nodeType is read from
@@ -20757,11 +20767,12 @@ function createDOMPurify() {
20757
20767
  }
20758
20768
  if (_isClobbered(currentNode)) {
20759
20769
  _forceRemove(currentNode);
20760
- } else {
20761
- arrayPop(DOMPurify.removed);
20770
+ return false;
20762
20771
  }
20772
+ return true;
20763
20773
  } catch (_2) {
20764
20774
  _removeAttribute(name, currentNode);
20775
+ return false;
20765
20776
  }
20766
20777
  };
20767
20778
  const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
@@ -20778,14 +20789,15 @@ function createDOMPurify() {
20778
20789
  allowedAttributes: ALLOWED_ATTR,
20779
20790
  forceKeepAttr: void 0
20780
20791
  };
20781
- let l4 = attributes.length;
20792
+ let l2 = attributes.length;
20782
20793
  const lcTag = transformCaseFunc(currentNode.nodeName);
20783
- while (l4--) {
20784
- const attr = attributes[l4];
20794
+ while (l2--) {
20795
+ const attr = attributes[l2];
20785
20796
  const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
20786
20797
  const lcName = transformCaseFunc(name);
20787
20798
  const initValue = attrValue;
20788
20799
  let value = name === "value" ? initValue : stringTrim(initValue);
20800
+ let recreatedNamedProp = false;
20789
20801
  hookEvent.attrName = lcName;
20790
20802
  hookEvent.attrValue = value;
20791
20803
  hookEvent.keepAttr = true;
@@ -20795,6 +20807,7 @@ function createDOMPurify() {
20795
20807
  if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
20796
20808
  _removeAttribute(name, currentNode, attr);
20797
20809
  value = SANITIZE_NAMED_PROPS_PREFIX + value;
20810
+ recreatedNamedProp = true;
20798
20811
  }
20799
20812
  if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
20800
20813
  _removeAttribute(name, currentNode, attr);
@@ -20824,7 +20837,10 @@ function createDOMPurify() {
20824
20837
  }
20825
20838
  value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);
20826
20839
  if (value !== initValue) {
20827
- _setAttributeValue(currentNode, name, namespaceURI, value);
20840
+ const cleanWrite = _setAttributeValue(currentNode, name, namespaceURI, value);
20841
+ if (cleanWrite && recreatedNamedProp) {
20842
+ arrayPop(DOMPurify.removed);
20843
+ }
20828
20844
  }
20829
20845
  }
20830
20846
  _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
@@ -20962,7 +20978,7 @@ function createDOMPurify() {
20962
20978
  } else {
20963
20979
  body.appendChild(importedNode);
20964
20980
  }
20965
- _sanitizeAttachedShadowRoots(importedNode);
20981
+ _sanitizeAttachedShadowRoots(body);
20966
20982
  } else {
20967
20983
  if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
20968
20984
  dirty.indexOf("<") === -1) {
@@ -21773,7 +21789,7 @@ const _hoisted_2$n = {
21773
21789
  const _hoisted_3$h = { class: "document-article__toolbar-left" };
21774
21790
  const _hoisted_4$a = { class: "document-article__toolbar-center" };
21775
21791
  const _hoisted_5$9 = { class: "document-article__toolbar-right" };
21776
- const _hoisted_6$8 = { class: "document-article__body" };
21792
+ const _hoisted_6$9 = { class: "document-article__body" };
21777
21793
  const _hoisted_7$4 = {
21778
21794
  key: 0,
21779
21795
  class: "document-article__center document-article__center--processing",
@@ -21827,7 +21843,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
21827
21843
  renderSlot(_ctx.$slots, "toolbar-right", {}, void 0, true)
21828
21844
  ])
21829
21845
  ])) : createCommentVNode("", true),
21830
- createBaseVNode("div", _hoisted_6$8, [
21846
+ createBaseVNode("div", _hoisted_6$9, [
21831
21847
  props.status === "processing" ? (openBlock(), createElementBlock("div", _hoisted_7$4, [
21832
21848
  createVNode(EditorIcon, {
21833
21849
  name: "spinner",
@@ -22123,7 +22139,7 @@ const _hoisted_4$9 = {
22123
22139
  class: "document-meta"
22124
22140
  };
22125
22141
  const _hoisted_5$8 = { class: "header-right" };
22126
- const _hoisted_6$7 = { key: 0 };
22142
+ const _hoisted_6$8 = { key: 0 };
22127
22143
  const _sfc_main$u = /* @__PURE__ */ defineComponent({
22128
22144
  __name: "Header",
22129
22145
  props: {
@@ -22226,7 +22242,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
22226
22242
  })
22227
22243
  ]),
22228
22244
  default: withCtx(() => [
22229
- !__props.isMobile ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(unref(t2)("header.ask")), 1)) : createCommentVNode("", true)
22245
+ !__props.isMobile ? (openBlock(), createElementBlock("span", _hoisted_6$8, toDisplayString(unref(t2)("header.ask")), 1)) : createCommentVNode("", true)
22230
22246
  ]),
22231
22247
  _: 1
22232
22248
  }, 8, ["aria-label", "disabled"])
@@ -22348,7 +22364,7 @@ function createStickToBottomEngine(initialOptions = {}) {
22348
22364
  };
22349
22365
  function notify() {
22350
22366
  const snapshot = getPublicState();
22351
- for (const l4 of listeners) l4(snapshot);
22367
+ for (const l2 of listeners) l2(snapshot);
22352
22368
  }
22353
22369
  function getPublicState() {
22354
22370
  return {
@@ -23553,6 +23569,9 @@ function useFollowPlayback(scrollContainer) {
23553
23569
  if (playing) isFollowing.value = true;
23554
23570
  }
23555
23571
  );
23572
+ const stopSeekListener = core.on("audio:seek", () => {
23573
+ isFollowing.value = true;
23574
+ });
23556
23575
  function onManualScroll() {
23557
23576
  isFollowing.value = false;
23558
23577
  }
@@ -23566,7 +23585,6 @@ function useFollowPlayback(scrollContainer) {
23566
23585
  if (!el) return;
23567
23586
  el.addEventListener("wheel", handler, { passive: true });
23568
23587
  el.addEventListener("touchstart", handler, { passive: true });
23569
- el.addEventListener("pointerdown", handler, { passive: true });
23570
23588
  el.addEventListener("keydown", checkKeyDownIsScroll);
23571
23589
  }
23572
23590
  function downScrollListener(handler) {
@@ -23574,7 +23592,6 @@ function useFollowPlayback(scrollContainer) {
23574
23592
  if (!el) return;
23575
23593
  el.removeEventListener("wheel", handler);
23576
23594
  el.removeEventListener("touchstart", handler);
23577
- el.removeEventListener("pointerdown", handler);
23578
23595
  el.removeEventListener("keydown", checkKeyDownIsScroll);
23579
23596
  }
23580
23597
  onMounted(() => {
@@ -23582,6 +23599,7 @@ function useFollowPlayback(scrollContainer) {
23582
23599
  });
23583
23600
  onBeforeUnmount(() => {
23584
23601
  downScrollListener(onManualScroll);
23602
+ stopSeekListener();
23585
23603
  });
23586
23604
  function resumeFollow() {
23587
23605
  isFollowing.value = true;
@@ -23604,6 +23622,10 @@ const _hoisted_5$7 = {
23604
23622
  key: 1,
23605
23623
  class: "history-start"
23606
23624
  };
23625
+ const _hoisted_6$7 = {
23626
+ key: 0,
23627
+ class: "resume-scroll-anchor"
23628
+ };
23607
23629
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
23608
23630
  __name: "TranscriptionPanel",
23609
23631
  props: {
@@ -23739,19 +23761,20 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
23739
23761
  ]),
23740
23762
  createVNode(Transition, { name: "fade-slide" }, {
23741
23763
  default: withCtx(() => [
23742
- showResumeButton.value ? (openBlock(), createBlock(unref(Button), {
23743
- key: 0,
23744
- size: "sm",
23745
- icon: "arrow-down",
23746
- class: "resume-scroll-btn",
23747
- "aria-label": unref(t2)("transcription.resumeScroll"),
23748
- onClick: onResumeClick
23749
- }, {
23750
- default: withCtx(() => [
23751
- createTextVNode(toDisplayString(unref(t2)("transcription.resumeScroll")), 1)
23752
- ]),
23753
- _: 1
23754
- }, 8, ["aria-label"])) : createCommentVNode("", true)
23764
+ showResumeButton.value ? (openBlock(), createElementBlock("div", _hoisted_6$7, [
23765
+ createVNode(unref(Button), {
23766
+ size: "sm",
23767
+ icon: "arrow-down",
23768
+ class: "resume-scroll-btn",
23769
+ "aria-label": unref(t2)("transcription.resumeScroll"),
23770
+ onClick: onResumeClick
23771
+ }, {
23772
+ default: withCtx(() => [
23773
+ createTextVNode(toDisplayString(unref(t2)("transcription.resumeScroll")), 1)
23774
+ ]),
23775
+ _: 1
23776
+ }, 8, ["aria-label"])
23777
+ ])) : createCommentVNode("", true)
23755
23778
  ]),
23756
23779
  _: 1
23757
23780
  })
@@ -23760,8 +23783,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
23760
23783
  };
23761
23784
  }
23762
23785
  });
23763
- const _style_0$j = "\n.transcription-panel[data-v-7f4303ed] {\n min-height: 0;\n overflow: hidden;\n background-color: var(--color-surface);\n}\n.scroll-container[data-v-7f4303ed] {\n height: 100%;\n overflow: auto;\n position: relative;\n}\n.turns-container[data-v-7f4303ed] {\n max-width: 80ch;\n margin-inline: auto;\n padding: var(--spacing-lg);\n}\n.turns-container[data-v-7f4303ed]:has(.transcription-empty) {\n display: flex;\n flex-direction: column;\n min-height: 100%;\n}\n.history-loading[data-v-7f4303ed] {\n text-align: center;\n padding: var(--spacing-md);\n}\n.history-loading progress[data-v-7f4303ed] {\n width: 120px;\n}\n.history-start[data-v-7f4303ed] {\n text-align: center;\n padding: var(--spacing-md);\n color: var(--color-text-muted);\n font-size: var(--font-size-sm);\n}\n\n/* Resume scroll button */\n.resume-scroll-btn[data-v-7f4303ed] {\n position: sticky;\n bottom: var(--spacing-lg);\n left: 50%;\n translate: -50% 0;\n z-index: var(--z-sticky);\n /* No backdrop-filter: this button is sticky inside the tall scroll\n container, where a backdrop-filter makes WebRender allocate a render\n target spanning the whole scroll height — multi-GB on a long transcript. */\n background: white !important;\n border: 1px solid var(--color-border);\n box-shadow: var(--shadow-sm);\n}\n\n/* Transition */\n.fade-slide-enter-active[data-v-7f4303ed],\n.fade-slide-leave-active[data-v-7f4303ed] {\n transition:\n opacity 200ms ease,\n translate 200ms ease;\n}\n.fade-slide-enter-from[data-v-7f4303ed],\n.fade-slide-leave-to[data-v-7f4303ed] {\n opacity: 0;\n translate: -50% 8px;\n}\n@media (prefers-reduced-motion: reduce) {\n.fade-slide-enter-active[data-v-7f4303ed],\n .fade-slide-leave-active[data-v-7f4303ed] {\n transition: none;\n}\n}\n@media (max-width: 767px) {\n.turns-container[data-v-7f4303ed] {\n padding: var(--spacing-md);\n}\n}\n";
23764
- const TranscriptionPanel = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["styles", [_style_0$j]], ["__scopeId", "data-v-7f4303ed"]]);
23786
+ const _style_0$j = "\n.transcription-panel[data-v-66b767d7] {\n min-height: 0;\n overflow: hidden;\n background-color: var(--color-surface);\n}\n.scroll-container[data-v-66b767d7] {\n height: 100%;\n overflow: auto;\n position: relative;\n}\n.turns-container[data-v-66b767d7] {\n max-width: 80ch;\n margin-inline: auto;\n padding: var(--spacing-lg);\n}\n.turns-container[data-v-66b767d7]:has(.transcription-empty) {\n display: flex;\n flex-direction: column;\n min-height: 100%;\n}\n.history-loading[data-v-66b767d7] {\n text-align: center;\n padding: var(--spacing-md);\n}\n.history-loading progress[data-v-66b767d7] {\n width: 120px;\n}\n.history-start[data-v-66b767d7] {\n text-align: center;\n padding: var(--spacing-md);\n color: var(--color-text-muted);\n font-size: var(--font-size-sm);\n}\n\n/* Resume scroll button — placement lives on this wrapper, never on the\n button itself: Button.vue's `.editor-btn` base rule resets `position` via\n `all: unset` (and, in the webcomponent build, gets re-injected a second\n time after everything else to reach teleported popovers/dialogs — see\n packages/webcomponent/src/index.ts), so any positioning put directly on\n the button is one rebuild away from being silently overridden again. */\n.resume-scroll-anchor[data-v-66b767d7] {\n position: sticky;\n bottom: var(--spacing-lg);\n z-index: var(--z-sticky);\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.resume-scroll-btn[data-v-66b767d7] {\n /* No backdrop-filter: this button is sticky inside the tall scroll\n container, where a backdrop-filter makes WebRender allocate a render\n target spanning the whole scroll height — multi-GB on a long transcript. */\n background: white !important;\n border: 1px solid var(--color-border);\n box-shadow: var(--shadow-sm);\n}\n\n/* Transition */\n.fade-slide-enter-active[data-v-66b767d7],\n.fade-slide-leave-active[data-v-66b767d7] {\n transition:\n opacity 200ms ease,\n translate 200ms ease;\n}\n.fade-slide-enter-from[data-v-66b767d7],\n.fade-slide-leave-to[data-v-66b767d7] {\n opacity: 0;\n translate: 0 8px;\n}\n@media (prefers-reduced-motion: reduce) {\n.fade-slide-enter-active[data-v-66b767d7],\n .fade-slide-leave-active[data-v-66b767d7] {\n transition: none;\n}\n}\n@media (max-width: 767px) {\n.turns-container[data-v-66b767d7] {\n padding: var(--spacing-md);\n}\n}\n";
23787
+ const TranscriptionPanel = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["styles", [_style_0$j]], ["__scopeId", "data-v-66b767d7"]]);
23765
23788
  const _hoisted_1$i = { class: "verbatim-panel" };
23766
23789
  const _hoisted_2$f = { class: "verbatim-panel__content" };
23767
23790
  const _hoisted_3$c = { class: "verbatim-panel__header" };
@@ -25292,7 +25315,7 @@ function createLivePlugin(options = {}) {
25292
25315
  }
25293
25316
  function isTranslationTrackFor(active, language) {
25294
25317
  if (active.isSource) return false;
25295
- return active.languages.some((l4) => isSameLanguage(l4, language));
25318
+ return active.languages.some((l2) => isSameLanguage(l2, language));
25296
25319
  }
25297
25320
  function onPartial(event, channelId) {
25298
25321
  if (core.activeChannelId.value !== channelId) return;
@@ -25637,25 +25660,25 @@ function t$1(t2, e3, i2, n2) {
25637
25660
  return new (i2 || (i2 = Promise))((function(s2, r2) {
25638
25661
  function o2(t3) {
25639
25662
  try {
25640
- l4(n2.next(t3));
25663
+ l2(n2.next(t3));
25641
25664
  } catch (t4) {
25642
25665
  r2(t4);
25643
25666
  }
25644
25667
  }
25645
25668
  function a2(t3) {
25646
25669
  try {
25647
- l4(n2.throw(t3));
25670
+ l2(n2.throw(t3));
25648
25671
  } catch (t4) {
25649
25672
  r2(t4);
25650
25673
  }
25651
25674
  }
25652
- function l4(t3) {
25675
+ function l2(t3) {
25653
25676
  var e4;
25654
25677
  t3.done ? s2(t3.value) : (e4 = t3.value, e4 instanceof i2 ? e4 : new i2((function(t4) {
25655
25678
  t4(e4);
25656
25679
  }))).then(o2, a2);
25657
25680
  }
25658
- l4((n2 = n2.apply(t2, e3 || [])).next());
25681
+ l2((n2 = n2.apply(t2, e3 || [])).next());
25659
25682
  }));
25660
25683
  }
25661
25684
  "function" == typeof SuppressedError && SuppressedError;
@@ -25799,7 +25822,7 @@ function c(t2, e3) {
25799
25822
  i2 && (i2(), i2 = void 0), s2.forEach(((t3) => t3()));
25800
25823
  };
25801
25824
  }
25802
- class u extends e$1 {
25825
+ class u3 extends e$1 {
25803
25826
  get isPlayingSignal() {
25804
25827
  return this._isPlaying;
25805
25828
  }
@@ -26023,17 +26046,17 @@ class C extends e$1 {
26023
26046
  if (e4.button !== n2) return;
26024
26047
  if (o2.has(e4.pointerId)) return;
26025
26048
  if (o2.set(e4.pointerId, e4), o2.size > 1) return;
26026
- const l4 = e4.pointerId;
26027
- let c3 = e4.clientX, u2 = e4.clientY, d2 = false;
26049
+ const l2 = e4.pointerId;
26050
+ let c3 = e4.clientX, u4 = e4.clientY, d2 = false;
26028
26051
  const p2 = Date.now(), m2 = t3.getBoundingClientRect(), { left: g2, top: f2 } = m2, v2 = (t4) => {
26029
- if (t4.pointerId !== l4) return;
26052
+ if (t4.pointerId !== l2) return;
26030
26053
  if (t4.defaultPrevented || o2.size > 1) return;
26031
26054
  if (a2 && Date.now() - p2 < s2) return;
26032
- const e5 = t4.clientX, n3 = t4.clientY, h3 = e5 - c3, m3 = n3 - u2;
26033
- (d2 || Math.abs(h3) > i2 || Math.abs(m3) > i2) && (t4.preventDefault(), t4.stopPropagation(), d2 || (r2.set({ type: "start", x: c3 - g2, y: u2 - f2 }), d2 = true), r2.set({ type: "move", x: e5 - g2, y: n3 - f2, deltaX: h3, deltaY: m3 }), c3 = e5, u2 = n3);
26055
+ const e5 = t4.clientX, n3 = t4.clientY, h3 = e5 - c3, m3 = n3 - u4;
26056
+ (d2 || Math.abs(h3) > i2 || Math.abs(m3) > i2) && (t4.preventDefault(), t4.stopPropagation(), d2 || (r2.set({ type: "start", x: c3 - g2, y: u4 - f2 }), d2 = true), r2.set({ type: "move", x: e5 - g2, y: n3 - f2, deltaX: h3, deltaY: m3 }), c3 = e5, u4 = n3);
26034
26057
  }, b2 = (t4) => {
26035
26058
  if (o2.delete(t4.pointerId)) {
26036
- if (t4.pointerId === l4 && d2) {
26059
+ if (t4.pointerId === l2 && d2) {
26037
26060
  const e5 = t4.clientX, i3 = t4.clientY;
26038
26061
  r2.set({ type: "end", x: e5 - g2, y: i3 - f2 });
26039
26062
  }
@@ -26217,41 +26240,41 @@ class C extends e$1 {
26217
26240
  var t2;
26218
26241
  }
26219
26242
  renderBarWaveform(t2, e3, i2, n2) {
26220
- const { width: s2, height: r2 } = i2.canvas, { halfHeight: o2, barWidth: a2, barRadius: l4, barIndexScale: h2, barSpacing: c2, barMinHeight: u2 } = (function({ width: t3, height: e4, length: i3, options: n3, pixelRatio: s3 }) {
26221
- const r3 = e4 / 2, o3 = n3.barWidth ? n3.barWidth * s3 : 1, a3 = n3.barGap ? n3.barGap * s3 : n3.barWidth ? o3 / 2 : 0, l5 = o3 + a3 || 1;
26222
- return { halfHeight: r3, barWidth: o3, barGap: a3, barRadius: n3.barRadius || 0, barMinHeight: n3.barMinHeight ? n3.barMinHeight * s3 : 0, barIndexScale: i3 > 0 ? t3 / l5 / i3 : 0, barSpacing: l5 };
26223
- })({ width: s2, height: r2, length: (t2[0] || []).length, options: e3, pixelRatio: this.getPixelRatio() }), m2 = (function({ channelData: t3, barIndexScale: e4, barSpacing: i3, barWidth: n3, halfHeight: s3, vScale: r3, canvasHeight: o3, barAlign: a3, barMinHeight: l5 }) {
26224
- const h3 = t3[0] || [], c3 = t3[1] || h3, u3 = h3.length, m3 = [];
26243
+ const { width: s2, height: r2 } = i2.canvas, { halfHeight: o2, barWidth: a2, barRadius: l2, barIndexScale: h2, barSpacing: c2, barMinHeight: u4 } = (function({ width: t3, height: e4, length: i3, options: n3, pixelRatio: s3 }) {
26244
+ const r3 = e4 / 2, o3 = n3.barWidth ? n3.barWidth * s3 : 1, a3 = n3.barGap ? n3.barGap * s3 : n3.barWidth ? o3 / 2 : 0, l3 = o3 + a3 || 1;
26245
+ return { halfHeight: r3, barWidth: o3, barGap: a3, barRadius: n3.barRadius || 0, barMinHeight: n3.barMinHeight ? n3.barMinHeight * s3 : 0, barIndexScale: i3 > 0 ? t3 / l3 / i3 : 0, barSpacing: l3 };
26246
+ })({ width: s2, height: r2, length: (t2[0] || []).length, options: e3, pixelRatio: this.getPixelRatio() }), m2 = (function({ channelData: t3, barIndexScale: e4, barSpacing: i3, barWidth: n3, halfHeight: s3, vScale: r3, canvasHeight: o3, barAlign: a3, barMinHeight: l3 }) {
26247
+ const h3 = t3[0] || [], c3 = t3[1] || h3, u5 = h3.length, m3 = [];
26225
26248
  let g2 = 0, f2 = 0, v2 = 0;
26226
- for (let t4 = 0; t4 <= u3; t4++) {
26227
- const u4 = Math.round(t4 * e4);
26228
- if (u4 > g2) {
26229
- const { topHeight: t5, totalHeight: e5 } = d$1({ maxTop: f2, maxBottom: v2, halfHeight: s3, vScale: r3, barMinHeight: l5, barAlign: a3 }), h4 = p({ barAlign: a3, halfHeight: s3, topHeight: t5, totalHeight: e5, canvasHeight: o3 });
26230
- m3.push({ x: g2 * i3, y: h4, width: n3, height: e5 }), g2 = u4, f2 = 0, v2 = 0;
26249
+ for (let t4 = 0; t4 <= u5; t4++) {
26250
+ const u6 = Math.round(t4 * e4);
26251
+ if (u6 > g2) {
26252
+ const { topHeight: t5, totalHeight: e5 } = d$1({ maxTop: f2, maxBottom: v2, halfHeight: s3, vScale: r3, barMinHeight: l3, barAlign: a3 }), h4 = p({ barAlign: a3, halfHeight: s3, topHeight: t5, totalHeight: e5, canvasHeight: o3 });
26253
+ m3.push({ x: g2 * i3, y: h4, width: n3, height: e5 }), g2 = u6, f2 = 0, v2 = 0;
26231
26254
  }
26232
26255
  const b2 = Math.abs(h3[t4] || 0), y3 = Math.abs(c3[t4] || 0);
26233
26256
  b2 > f2 && (f2 = b2), y3 > v2 && (v2 = y3);
26234
26257
  }
26235
26258
  return m3;
26236
- })({ channelData: t2, barIndexScale: h2, barSpacing: c2, barWidth: a2, halfHeight: o2, vScale: n2, canvasHeight: r2, barAlign: e3.barAlign, barMinHeight: u2 });
26259
+ })({ channelData: t2, barIndexScale: h2, barSpacing: c2, barWidth: a2, halfHeight: o2, vScale: n2, canvasHeight: r2, barAlign: e3.barAlign, barMinHeight: u4 });
26237
26260
  i2.beginPath();
26238
- for (const t3 of m2) l4 && "roundRect" in i2 ? i2.roundRect(t3.x, t3.y, t3.width, t3.height, l4) : i2.rect(t3.x, t3.y, t3.width, t3.height);
26261
+ for (const t3 of m2) l2 && "roundRect" in i2 ? i2.roundRect(t3.x, t3.y, t3.width, t3.height, l2) : i2.rect(t3.x, t3.y, t3.width, t3.height);
26239
26262
  i2.fill(), i2.closePath();
26240
26263
  }
26241
26264
  renderLineWaveform(t2, e3, i2, n2) {
26242
26265
  const { width: s2, height: r2 } = i2.canvas, o2 = (function({ channelData: t3, width: e4, height: i3, vScale: n3 }) {
26243
26266
  const s3 = i3 / 2, r3 = t3[0] || [];
26244
26267
  return [r3, t3[1] || r3].map(((t4, i4) => {
26245
- const r4 = t4.length, o3 = r4 ? e4 / r4 : 0, a2 = s3, l4 = 0 === i4 ? -1 : 1, h2 = [{ x: 0, y: a2 }];
26246
- let c2 = 0, u2 = 0;
26268
+ const r4 = t4.length, o3 = r4 ? e4 / r4 : 0, a2 = s3, l2 = 0 === i4 ? -1 : 1, h2 = [{ x: 0, y: a2 }];
26269
+ let c2 = 0, u4 = 0;
26247
26270
  for (let e5 = 0; e5 <= r4; e5++) {
26248
26271
  const i5 = Math.round(e5 * o3);
26249
26272
  if (i5 > c2) {
26250
- const t5 = a2 + (Math.round(u2 * s3 * n3) || 1) * l4;
26251
- h2.push({ x: c2, y: t5 }), c2 = i5, u2 = 0;
26273
+ const t5 = a2 + (Math.round(u4 * s3 * n3) || 1) * l2;
26274
+ h2.push({ x: c2, y: t5 }), c2 = i5, u4 = 0;
26252
26275
  }
26253
26276
  const r5 = Math.abs(t4[e5] || 0);
26254
- r5 > u2 && (u2 = r5);
26277
+ r5 > u4 && (u4 = r5);
26255
26278
  }
26256
26279
  return h2.push({ x: c2, y: a2 }), h2;
26257
26280
  }));
@@ -26284,43 +26307,43 @@ class C extends e$1 {
26284
26307
  g(e3) ? this.renderBarWaveform(t2, e3, i2, n2) : this.renderLineWaveform(t2, e3, i2, n2);
26285
26308
  }
26286
26309
  renderSingleCanvas(t2, e3, i2, n2, s2, r2, o2) {
26287
- const a2 = this.getPixelRatio(), l4 = document.createElement("canvas");
26288
- l4.width = Math.round(i2 * a2), l4.height = Math.round(n2 * a2), l4.style.width = `${i2}px`, l4.style.height = `${n2}px`, l4.style.left = `${Math.round(s2)}px`, r2.appendChild(l4);
26289
- const h2 = l4.getContext("2d");
26290
- if (e3.renderFunction ? (h2.fillStyle = this.convertColorValues(e3.waveColor, h2), e3.renderFunction(t2, h2)) : this.renderWaveform(t2, e3, h2), l4.width > 0 && l4.height > 0) {
26291
- const t3 = l4.cloneNode(), i3 = t3.getContext("2d");
26292
- i3.drawImage(l4, 0, 0), i3.globalCompositeOperation = "source-in", i3.fillStyle = this.convertColorValues(e3.progressColor, i3), i3.fillRect(0, 0, l4.width, l4.height), o2.appendChild(t3);
26310
+ const a2 = this.getPixelRatio(), l2 = document.createElement("canvas");
26311
+ l2.width = Math.round(i2 * a2), l2.height = Math.round(n2 * a2), l2.style.width = `${i2}px`, l2.style.height = `${n2}px`, l2.style.left = `${Math.round(s2)}px`, r2.appendChild(l2);
26312
+ const h2 = l2.getContext("2d");
26313
+ if (e3.renderFunction ? (h2.fillStyle = this.convertColorValues(e3.waveColor, h2), e3.renderFunction(t2, h2)) : this.renderWaveform(t2, e3, h2), l2.width > 0 && l2.height > 0) {
26314
+ const t3 = l2.cloneNode(), i3 = t3.getContext("2d");
26315
+ i3.drawImage(l2, 0, 0), i3.globalCompositeOperation = "source-in", i3.fillStyle = this.convertColorValues(e3.progressColor, i3), i3.fillRect(0, 0, l2.width, l2.height), o2.appendChild(t3);
26293
26316
  }
26294
26317
  }
26295
26318
  renderMultiCanvas(t2, e3, i2, n2, s2, r2) {
26296
- const o2 = this.getPixelRatio(), { clientWidth: a2 } = this.scrollContainer, l4 = i2 / o2, h2 = (function({ clientWidth: t3, totalWidth: e4, options: i3 }) {
26319
+ const o2 = this.getPixelRatio(), { clientWidth: a2 } = this.scrollContainer, l2 = i2 / o2, h2 = (function({ clientWidth: t3, totalWidth: e4, options: i3 }) {
26297
26320
  return f(Math.min(8e3, t3, e4), i3);
26298
- })({ clientWidth: a2, totalWidth: l4, options: e3 });
26321
+ })({ clientWidth: a2, totalWidth: l2, options: e3 });
26299
26322
  let c2 = {};
26300
26323
  if (0 === h2) return;
26301
- const u2 = (i3) => {
26324
+ const u4 = (i3) => {
26302
26325
  if (i3 < 0 || i3 >= d2) return;
26303
26326
  if (c2[i3]) return;
26304
26327
  c2[i3] = true;
26305
26328
  const o3 = i3 * h2;
26306
- let a3 = Math.min(l4 - o3, h2);
26329
+ let a3 = Math.min(l2 - o3, h2);
26307
26330
  if (a3 = f(a3, e3), a3 <= 0) return;
26308
- const u3 = (function({ channelData: t3, offset: e4, clampedWidth: i4, totalWidth: n3 }) {
26331
+ const u5 = (function({ channelData: t3, offset: e4, clampedWidth: i4, totalWidth: n3 }) {
26309
26332
  return t3.map(((t4) => {
26310
26333
  const s3 = Math.floor(e4 / n3 * t4.length), r3 = Math.floor((e4 + i4) / n3 * t4.length);
26311
26334
  return t4.slice(s3, r3);
26312
26335
  }));
26313
- })({ channelData: t2, offset: o3, clampedWidth: a3, totalWidth: l4 });
26314
- this.renderSingleCanvas(u3, e3, a3, n2, o3, s2, r2);
26315
- }, d2 = Math.ceil(l4 / h2);
26336
+ })({ channelData: t2, offset: o3, clampedWidth: a3, totalWidth: l2 });
26337
+ this.renderSingleCanvas(u5, e3, a3, n2, o3, s2, r2);
26338
+ }, d2 = Math.ceil(l2 / h2);
26316
26339
  if (!this.isScrollable) {
26317
- for (let t3 = 0; t3 < d2; t3++) u2(t3);
26340
+ for (let t3 = 0; t3 < d2; t3++) u4(t3);
26318
26341
  return;
26319
26342
  }
26320
- if (v({ scrollLeft: this.scrollContainer.scrollLeft, totalWidth: l4, numCanvases: d2 }).forEach(((t3) => u2(t3))), d2 > 1) {
26343
+ if (v({ scrollLeft: this.scrollContainer.scrollLeft, totalWidth: l2, numCanvases: d2 }).forEach(((t3) => u4(t3))), d2 > 1) {
26321
26344
  const t3 = this.on("scroll", (() => {
26322
26345
  const { scrollLeft: t4 } = this.scrollContainer;
26323
- Object.keys(c2).length > 10 && (s2.innerHTML = "", r2.innerHTML = "", c2 = {}), v({ scrollLeft: t4, totalWidth: l4, numCanvases: d2 }).forEach(((t5) => u2(t5)));
26346
+ Object.keys(c2).length > 10 && (s2.innerHTML = "", r2.innerHTML = "", c2 = {}), v({ scrollLeft: t4, totalWidth: l2, numCanvases: d2 }).forEach(((t5) => u4(t5)));
26324
26347
  }));
26325
26348
  this.unsubscribeOnScroll.push(t3);
26326
26349
  }
@@ -26337,8 +26360,8 @@ class C extends e$1 {
26337
26360
  })(e3, ["overlay"]);
26338
26361
  const o2 = document.createElement("div"), a2 = this.getHeight(r2.height, r2.splitChannels);
26339
26362
  o2.style.height = `${a2}px`, s2 && n2 > 0 && (o2.style.marginTop = `-${a2}px`), this.canvasWrapper.style.minHeight = `${a2}px`, this.canvasWrapper.appendChild(o2);
26340
- const l4 = o2.cloneNode();
26341
- this.progressWrapper.appendChild(l4), this.renderMultiCanvas(t2, r2, i2, a2, o2, l4);
26363
+ const l2 = o2.cloneNode();
26364
+ this.progressWrapper.appendChild(l2), this.renderMultiCanvas(t2, r2, i2, a2, o2, l2);
26342
26365
  }
26343
26366
  render(e3) {
26344
26367
  return t$1(this, void 0, void 0, (function* () {
@@ -26376,12 +26399,12 @@ class C extends e$1 {
26376
26399
  }
26377
26400
  scrollIntoView(t2, e3 = false) {
26378
26401
  var i2;
26379
- const { scrollLeft: n2, scrollWidth: s2, clientWidth: r2 } = this.scrollContainer, o2 = t2 * s2, a2 = n2, l4 = n2 + r2, h2 = r2 / 2;
26402
+ const { scrollLeft: n2, scrollWidth: s2, clientWidth: r2 } = this.scrollContainer, o2 = t2 * s2, a2 = n2, l2 = n2 + r2, h2 = r2 / 2;
26380
26403
  if (this.isDragging) {
26381
26404
  const t3 = 30;
26382
- o2 + t3 > l4 ? this.scrollContainer.scrollLeft += t3 : o2 - t3 < a2 && (this.scrollContainer.scrollLeft -= t3);
26405
+ o2 + t3 > l2 ? this.scrollContainer.scrollLeft += t3 : o2 - t3 < a2 && (this.scrollContainer.scrollLeft -= t3);
26383
26406
  } else {
26384
- (o2 < a2 || o2 > l4) && (this.scrollContainer.scrollLeft = o2 - (this.options.autoCenter ? h2 : 0));
26407
+ (o2 < a2 || o2 > l2) && (this.scrollContainer.scrollLeft = o2 - (this.options.autoCenter ? h2 : 0));
26385
26408
  const t3 = o2 - n2 - h2;
26386
26409
  if (e3 && this.options.autoCenter && t3 > 0) {
26387
26410
  const e4 = null === (i2 = this.audioData) || void 0 === i2 ? void 0 : i2.duration;
@@ -26583,7 +26606,7 @@ class E extends e$1 {
26583
26606
  }
26584
26607
  }
26585
26608
  const P2 = { waveColor: "#999", progressColor: "#555", cursorWidth: 1, minPxPerSec: 0, fillParent: true, interact: true, dragToSeek: false, autoScroll: true, autoCenter: true, sampleRate: 8e3 };
26586
- class w extends u {
26609
+ class w extends u3 {
26587
26610
  static create(t2) {
26588
26611
  return new w(t2);
26589
26612
  }
@@ -26598,14 +26621,14 @@ class w extends u {
26598
26621
  super({ media: e3, mediaControls: t2.mediaControls, autoplay: t2.autoplay, playbackRate: t2.audioRate }), this.plugins = [], this.decodedData = null, this.stopAtPosition = null, this.subscriptions = [], this.mediaSubscriptions = [], this.abortController = null, this._isDestroyed = false, this._loadVersion = 0, this.reactiveCleanups = [], this.options = Object.assign({}, P2, t2);
26599
26622
  const { state: i2, actions: n2 } = (function(t3) {
26600
26623
  var e4, i3, n3, s3, r3, o2;
26601
- const a2 = null !== (e4 = null == t3 ? void 0 : t3.currentTime) && void 0 !== e4 ? e4 : l$1(0), c2 = null !== (i3 = null == t3 ? void 0 : t3.duration) && void 0 !== i3 ? i3 : l$1(0), u2 = null !== (n3 = null == t3 ? void 0 : t3.isPlaying) && void 0 !== n3 ? n3 : l$1(false), d2 = null !== (s3 = null == t3 ? void 0 : t3.isSeeking) && void 0 !== s3 ? s3 : l$1(false), p2 = null !== (r3 = null == t3 ? void 0 : t3.volume) && void 0 !== r3 ? r3 : l$1(1), m2 = null !== (o2 = null == t3 ? void 0 : t3.playbackRate) && void 0 !== o2 ? o2 : l$1(1), g2 = l$1(null), f2 = l$1(null), v2 = l$1(""), b2 = l$1(0), y3 = l$1(0), C2 = h$1((() => !u2.value), [u2]), S3 = h$1((() => null !== g2.value), [g2]), E2 = h$1((() => S3.value && c2.value > 0), [S3, c2]), P3 = h$1((() => a2.value), [a2]), w2 = h$1((() => c2.value > 0 ? a2.value / c2.value : 0), [a2, c2]);
26602
- return { state: { currentTime: a2, duration: c2, isPlaying: u2, isPaused: C2, isSeeking: d2, volume: p2, playbackRate: m2, audioBuffer: g2, peaks: f2, url: v2, zoom: b2, scrollPosition: y3, canPlay: S3, isReady: E2, progress: P3, progressPercent: w2 }, actions: { setCurrentTime: (t4) => {
26624
+ const a2 = null !== (e4 = null == t3 ? void 0 : t3.currentTime) && void 0 !== e4 ? e4 : l$1(0), c2 = null !== (i3 = null == t3 ? void 0 : t3.duration) && void 0 !== i3 ? i3 : l$1(0), u4 = null !== (n3 = null == t3 ? void 0 : t3.isPlaying) && void 0 !== n3 ? n3 : l$1(false), d2 = null !== (s3 = null == t3 ? void 0 : t3.isSeeking) && void 0 !== s3 ? s3 : l$1(false), p2 = null !== (r3 = null == t3 ? void 0 : t3.volume) && void 0 !== r3 ? r3 : l$1(1), m2 = null !== (o2 = null == t3 ? void 0 : t3.playbackRate) && void 0 !== o2 ? o2 : l$1(1), g2 = l$1(null), f2 = l$1(null), v2 = l$1(""), b2 = l$1(0), y3 = l$1(0), C2 = h$1((() => !u4.value), [u4]), S3 = h$1((() => null !== g2.value), [g2]), E2 = h$1((() => S3.value && c2.value > 0), [S3, c2]), P3 = h$1((() => a2.value), [a2]), w2 = h$1((() => c2.value > 0 ? a2.value / c2.value : 0), [a2, c2]);
26625
+ return { state: { currentTime: a2, duration: c2, isPlaying: u4, isPaused: C2, isSeeking: d2, volume: p2, playbackRate: m2, audioBuffer: g2, peaks: f2, url: v2, zoom: b2, scrollPosition: y3, canPlay: S3, isReady: E2, progress: P3, progressPercent: w2 }, actions: { setCurrentTime: (t4) => {
26603
26626
  const e5 = Math.max(0, Math.min(c2.value || 1 / 0, t4));
26604
26627
  a2.set(e5);
26605
26628
  }, setDuration: (t4) => {
26606
26629
  c2.set(Math.max(0, t4));
26607
26630
  }, setPlaying: (t4) => {
26608
- u2.set(t4);
26631
+ u4.set(t4);
26609
26632
  }, setSeeking: (t4) => {
26610
26633
  d2.set(t4);
26611
26634
  }, setVolume: (t4) => {
@@ -26792,16 +26815,16 @@ class w extends u {
26792
26815
  }
26793
26816
  if (this._isDestroyed || o2 !== this._loadVersion) return;
26794
26817
  this.setSrc(e3, n2);
26795
- const l4 = yield new Promise(((t3) => {
26818
+ const l2 = yield new Promise(((t3) => {
26796
26819
  const e4 = r2 || this.getDuration();
26797
26820
  e4 ? t3(e4) : this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata", (() => t3(this.getDuration())), { once: true }));
26798
26821
  }));
26799
26822
  if (!this._isDestroyed && o2 === this._loadVersion) {
26800
26823
  if (!e3 && !n2) {
26801
26824
  const t3 = this.getMediaElement();
26802
- t3 instanceof E && (t3.duration = l4);
26825
+ t3 instanceof E && (t3.duration = l2);
26803
26826
  }
26804
- if (s2) this.decodedData = i$1.createBuffer(s2, l4 || 0);
26827
+ if (s2) this.decodedData = i$1.createBuffer(s2, l2 || 0);
26805
26828
  else if (n2) {
26806
26829
  const t3 = yield n2.arrayBuffer();
26807
26830
  if (this._isDestroyed || o2 !== this._loadVersion) return;
@@ -26994,7 +27017,7 @@ function o(t2, e3) {
26994
27017
  t2.removeEventListener(e3, n2);
26995
27018
  }, i2;
26996
27019
  }
26997
- function l3(t2) {
27020
+ function l(t2) {
26998
27021
  const e3 = t2._cleanup;
26999
27022
  "function" == typeof e3 && e3();
27000
27023
  }
@@ -27007,16 +27030,16 @@ function h(t2, e3 = {}) {
27007
27030
  if (h2.has(e4.pointerId)) return;
27008
27031
  if (h2.set(e4.pointerId, e4), h2.size > 1) return;
27009
27032
  const s2 = e4.pointerId;
27010
- let l4 = e4.clientX, c3 = e4.clientY, u2 = false;
27033
+ let l2 = e4.clientX, c3 = e4.clientY, u4 = false;
27011
27034
  const p2 = Date.now(), v2 = t2.getBoundingClientRect(), { left: g2, top: m2 } = v2, f2 = (t3) => {
27012
27035
  if (t3.pointerId !== s2) return;
27013
27036
  if (t3.defaultPrevented || h2.size > 1) return;
27014
27037
  if (a2 && Date.now() - p2 < r2) return;
27015
- const e5 = t3.clientX, n3 = t3.clientY, d3 = e5 - l4, v3 = n3 - c3;
27016
- (u2 || Math.abs(d3) > i2 || Math.abs(v3) > i2) && (t3.preventDefault(), t3.stopPropagation(), u2 || (o2.set({ type: "start", x: l4 - g2, y: c3 - m2 }), u2 = true), o2.set({ type: "move", x: e5 - g2, y: n3 - m2, deltaX: d3, deltaY: v3 }), l4 = e5, c3 = n3);
27038
+ const e5 = t3.clientX, n3 = t3.clientY, d3 = e5 - l2, v3 = n3 - c3;
27039
+ (u4 || Math.abs(d3) > i2 || Math.abs(v3) > i2) && (t3.preventDefault(), t3.stopPropagation(), u4 || (o2.set({ type: "start", x: l2 - g2, y: c3 - m2 }), u4 = true), o2.set({ type: "move", x: e5 - g2, y: n3 - m2, deltaX: d3, deltaY: v3 }), l2 = e5, c3 = n3);
27017
27040
  }, b2 = (t3) => {
27018
27041
  if (h2.delete(t3.pointerId)) {
27019
- if (t3.pointerId === s2 && u2) {
27042
+ if (t3.pointerId === s2 && u4) {
27020
27043
  const e5 = t3.clientX, i3 = t3.clientY;
27021
27044
  o2.set({ type: "end", x: e5 - g2, y: i3 - m2 });
27022
27045
  }
@@ -27025,9 +27048,9 @@ function h(t2, e3 = {}) {
27025
27048
  }, E2 = (t3) => {
27026
27049
  t3.relatedTarget && t3.relatedTarget !== document.documentElement || b2(t3);
27027
27050
  }, C2 = (t3) => {
27028
- u2 && (t3.stopPropagation(), t3.preventDefault());
27051
+ u4 && (t3.stopPropagation(), t3.preventDefault());
27029
27052
  }, L2 = (t3) => {
27030
- t3.defaultPrevented || h2.size > 1 || u2 && t3.preventDefault();
27053
+ t3.defaultPrevented || h2.size > 1 || u4 && t3.preventDefault();
27031
27054
  };
27032
27055
  document.addEventListener("pointermove", f2), document.addEventListener("pointerup", b2), document.addEventListener("pointerout", E2), document.addEventListener("pointercancel", E2), document.addEventListener("touchmove", L2, { passive: false }), document.addEventListener("click", C2, { capture: true }), d2 = () => {
27033
27056
  document.removeEventListener("pointermove", f2), document.removeEventListener("pointerup", b2), document.removeEventListener("pointerout", E2), document.removeEventListener("pointercancel", E2), document.removeEventListener("touchmove", L2), setTimeout((() => {
@@ -27037,13 +27060,13 @@ function h(t2, e3 = {}) {
27037
27060
  };
27038
27061
  t2.addEventListener("pointerdown", c2);
27039
27062
  return { signal: o2, cleanup: () => {
27040
- d2(), t2.removeEventListener("pointerdown", c2), h2.clear(), l3(o2);
27063
+ d2(), t2.removeEventListener("pointerdown", c2), h2.clear(), l(o2);
27041
27064
  } };
27042
27065
  }
27043
27066
  class a extends t {
27044
27067
  constructor(t2, e3, i2 = 0) {
27045
- var n2, s2, r2, o2, l4, h2, a2, d2, c2, u2;
27046
- super(), this.totalDuration = e3, this.numberOfChannels = i2, this.element = null, this.minLength = 0, this.maxLength = 1 / 0, this.contentEditable = false, this.subscriptions = [], this.updatingSide = void 0, this.isRemoved = false, this.subscriptions = [], this.id = t2.id || `region-${Math.random().toString(32).slice(2)}`, this.start = this.clampPosition(t2.start), this.end = this.clampPosition(null !== (n2 = t2.end) && void 0 !== n2 ? n2 : t2.start), this.drag = null === (s2 = t2.drag) || void 0 === s2 || s2, this.resize = null === (r2 = t2.resize) || void 0 === r2 || r2, this.resizeStart = null === (o2 = t2.resizeStart) || void 0 === o2 || o2, this.resizeEnd = null === (l4 = t2.resizeEnd) || void 0 === l4 || l4, this.color = null !== (h2 = t2.color) && void 0 !== h2 ? h2 : "rgba(0, 0, 0, 0.1)", this.minLength = null !== (a2 = t2.minLength) && void 0 !== a2 ? a2 : this.minLength, this.maxLength = null !== (d2 = t2.maxLength) && void 0 !== d2 ? d2 : this.maxLength, this.channelIdx = null !== (c2 = t2.channelIdx) && void 0 !== c2 ? c2 : -1, this.contentEditable = null !== (u2 = t2.contentEditable) && void 0 !== u2 ? u2 : this.contentEditable, this.element = this.initElement(), this.setContent(t2.content), this.setPart(), this.renderPosition(), this.initMouseEvents();
27068
+ var n2, s2, r2, o2, l2, h2, a2, d2, c2, u4;
27069
+ super(), this.totalDuration = e3, this.numberOfChannels = i2, this.element = null, this.minLength = 0, this.maxLength = 1 / 0, this.contentEditable = false, this.subscriptions = [], this.updatingSide = void 0, this.isRemoved = false, this.subscriptions = [], this.id = t2.id || `region-${Math.random().toString(32).slice(2)}`, this.start = this.clampPosition(t2.start), this.end = this.clampPosition(null !== (n2 = t2.end) && void 0 !== n2 ? n2 : t2.start), this.drag = null === (s2 = t2.drag) || void 0 === s2 || s2, this.resize = null === (r2 = t2.resize) || void 0 === r2 || r2, this.resizeStart = null === (o2 = t2.resizeStart) || void 0 === o2 || o2, this.resizeEnd = null === (l2 = t2.resizeEnd) || void 0 === l2 || l2, this.color = null !== (h2 = t2.color) && void 0 !== h2 ? h2 : "rgba(0, 0, 0, 0.1)", this.minLength = null !== (a2 = t2.minLength) && void 0 !== a2 ? a2 : this.minLength, this.maxLength = null !== (d2 = t2.maxLength) && void 0 !== d2 ? d2 : this.maxLength, this.channelIdx = null !== (c2 = t2.channelIdx) && void 0 !== c2 ? c2 : -1, this.contentEditable = null !== (u4 = t2.contentEditable) && void 0 !== u4 ? u4 : this.contentEditable, this.element = this.initElement(), this.setContent(t2.content), this.setPart(), this.renderPosition(), this.initMouseEvents();
27047
27070
  }
27048
27071
  clampPosition(t2) {
27049
27072
  return Math.max(0, Math.min(this.totalDuration, t2));
@@ -27054,15 +27077,15 @@ class a extends t {
27054
27077
  null === (t2 = this.element) || void 0 === t2 || t2.setAttribute("part", `${e3 ? "marker" : "region"} ${this.id}`);
27055
27078
  }
27056
27079
  addResizeHandles(t2) {
27057
- const e3 = { position: "absolute", zIndex: "2", width: "6px", height: "100%", top: "0", cursor: "ew-resize", wordBreak: "keep-all" }, i2 = n("div", { part: "region-handle region-handle-left", style: Object.assign(Object.assign({}, e3), { left: "0", borderLeft: "2px solid rgba(0, 0, 0, 0.5)", borderRadius: "2px 0 0 2px" }) }, t2), s2 = n("div", { part: "region-handle region-handle-right", style: Object.assign(Object.assign({}, e3), { right: "0", borderRight: "2px solid rgba(0, 0, 0, 0.5)", borderRadius: "0 2px 2px 0" }) }, t2), o2 = h(i2, { threshold: 1 }), l4 = h(s2, { threshold: 1 }), a2 = r((() => {
27080
+ const e3 = { position: "absolute", zIndex: "2", width: "6px", height: "100%", top: "0", cursor: "ew-resize", wordBreak: "keep-all" }, i2 = n("div", { part: "region-handle region-handle-left", style: Object.assign(Object.assign({}, e3), { left: "0", borderLeft: "2px solid rgba(0, 0, 0, 0.5)", borderRadius: "2px 0 0 2px" }) }, t2), s2 = n("div", { part: "region-handle region-handle-right", style: Object.assign(Object.assign({}, e3), { right: "0", borderRight: "2px solid rgba(0, 0, 0, 0.5)", borderRadius: "0 2px 2px 0" }) }, t2), o2 = h(i2, { threshold: 1 }), l2 = h(s2, { threshold: 1 }), a2 = r((() => {
27058
27081
  const t3 = o2.signal.value;
27059
27082
  t3 && ("move" === t3.type && void 0 !== t3.deltaX ? this.onResize(t3.deltaX, "start") : "end" === t3.type && this.onEndResizing("start"));
27060
27083
  }), [o2.signal]), d2 = r((() => {
27061
- const t3 = l4.signal.value;
27084
+ const t3 = l2.signal.value;
27062
27085
  t3 && ("move" === t3.type && void 0 !== t3.deltaX ? this.onResize(t3.deltaX, "end") : "end" === t3.type && this.onEndResizing("end"));
27063
- }), [l4.signal]);
27086
+ }), [l2.signal]);
27064
27087
  this.subscriptions.push((() => {
27065
- a2(), d2(), o2.cleanup(), l4.cleanup();
27088
+ a2(), d2(), o2.cleanup(), l2.cleanup();
27066
27089
  }));
27067
27090
  }
27068
27091
  removeResizeHandles(t2) {
@@ -27089,9 +27112,9 @@ class a extends t {
27089
27112
  initMouseEvents() {
27090
27113
  const { element: t2 } = this;
27091
27114
  if (!t2) return;
27092
- const e3 = o(t2, "click"), i2 = o(t2, "mouseenter"), n2 = o(t2, "mouseleave"), s2 = o(t2, "dblclick"), a2 = o(t2, "pointerdown"), d2 = o(t2, "pointerup"), c2 = e3.subscribe(((t3) => t3 && this.emit("click", t3))), u2 = i2.subscribe(((t3) => t3 && this.emit("over", t3))), p2 = n2.subscribe(((t3) => t3 && this.emit("leave", t3))), v2 = s2.subscribe(((t3) => t3 && this.emit("dblclick", t3))), g2 = a2.subscribe(((t3) => t3 && this.toggleCursor(true))), m2 = d2.subscribe(((t3) => t3 && this.toggleCursor(false)));
27115
+ const e3 = o(t2, "click"), i2 = o(t2, "mouseenter"), n2 = o(t2, "mouseleave"), s2 = o(t2, "dblclick"), a2 = o(t2, "pointerdown"), d2 = o(t2, "pointerup"), c2 = e3.subscribe(((t3) => t3 && this.emit("click", t3))), u4 = i2.subscribe(((t3) => t3 && this.emit("over", t3))), p2 = n2.subscribe(((t3) => t3 && this.emit("leave", t3))), v2 = s2.subscribe(((t3) => t3 && this.emit("dblclick", t3))), g2 = a2.subscribe(((t3) => t3 && this.toggleCursor(true))), m2 = d2.subscribe(((t3) => t3 && this.toggleCursor(false)));
27093
27116
  this.subscriptions.push((() => {
27094
- c2(), u2(), p2(), v2(), g2(), m2(), l3(e3), l3(i2), l3(n2), l3(s2), l3(a2), l3(d2);
27117
+ c2(), u4(), p2(), v2(), g2(), m2(), l(e3), l(i2), l(n2), l(s2), l(a2), l(d2);
27095
27118
  }));
27096
27119
  const f2 = h(t2), b2 = r((() => {
27097
27120
  const t3 = f2.signal.value;
@@ -27105,13 +27128,13 @@ class a extends t {
27105
27128
  var n2;
27106
27129
  if (!(null === (n2 = this.element) || void 0 === n2 ? void 0 : n2.parentElement)) return;
27107
27130
  const { width: s2 } = this.element.parentElement.getBoundingClientRect(), r2 = t2 / s2 * this.totalDuration;
27108
- let o2 = e3 && "start" !== e3 ? this.start : this.start + r2, l4 = e3 && "end" !== e3 ? this.end : this.end + r2;
27131
+ let o2 = e3 && "start" !== e3 ? this.start : this.start + r2, l2 = e3 && "end" !== e3 ? this.end : this.end + r2;
27109
27132
  const h2 = void 0 !== i2;
27110
- h2 && this.updatingSide && this.updatingSide !== e3 && ("start" === this.updatingSide ? o2 = i2 : l4 = i2), o2 = Math.max(0, o2), l4 = Math.min(this.totalDuration, l4);
27111
- const a2 = l4 - o2;
27133
+ h2 && this.updatingSide && this.updatingSide !== e3 && ("start" === this.updatingSide ? o2 = i2 : l2 = i2), o2 = Math.max(0, o2), l2 = Math.min(this.totalDuration, l2);
27134
+ const a2 = l2 - o2;
27112
27135
  this.updatingSide = e3;
27113
27136
  const d2 = a2 >= this.minLength && a2 <= this.maxLength;
27114
- o2 <= l4 && (d2 || h2) && (this.start = o2, this.end = l4, this.renderPosition(), this.emit("update", e3));
27137
+ o2 <= l2 && (d2 || h2) && (this.start = o2, this.end = l2, this.renderPosition(), this.emit("update", e3));
27115
27138
  }
27116
27139
  onMove(t2) {
27117
27140
  this.drag && this._onUpdate(t2);
@@ -27223,13 +27246,13 @@ class d extends e2 {
27223
27246
  if (!n2) return;
27224
27247
  const { clientWidth: s2, scrollWidth: r2 } = n2;
27225
27248
  if (r2 <= s2) return;
27226
- const o2 = n2.getBoundingClientRect(), l4 = t2.element.getBoundingClientRect(), h2 = l4.left - o2.left, a2 = l4.right - o2.left;
27249
+ const o2 = n2.getBoundingClientRect(), l2 = t2.element.getBoundingClientRect(), h2 = l2.left - o2.left, a2 = l2.right - o2.left;
27227
27250
  h2 < 0 ? n2.scrollLeft += h2 : a2 > s2 && (n2.scrollLeft += a2 - s2);
27228
27251
  }
27229
27252
  virtualAppend(t2, e3, i2) {
27230
27253
  const n2 = () => {
27231
27254
  if (!this.wavesurfer) return;
27232
- const n3 = this.wavesurfer.getWidth(), s2 = this.wavesurfer.getScroll(), r2 = e3.clientWidth, o2 = this.wavesurfer.getDuration(), l4 = Math.round(t2.start / o2 * r2), h2 = l4 + (Math.round((t2.end - t2.start) / o2 * r2) || 1) > s2 && l4 < s2 + n3;
27255
+ const n3 = this.wavesurfer.getWidth(), s2 = this.wavesurfer.getScroll(), r2 = e3.clientWidth, o2 = this.wavesurfer.getDuration(), l2 = Math.round(t2.start / o2 * r2), h2 = l2 + (Math.round((t2.end - t2.start) / o2 * r2) || 1) > s2 && l2 < s2 + n3;
27233
27256
  h2 && !i2.parentElement ? e3.appendChild(i2) : !h2 && i2.parentElement && i2.remove();
27234
27257
  };
27235
27258
  setTimeout((() => {
@@ -27280,17 +27303,17 @@ class d extends e2 {
27280
27303
  const n2 = null === (i2 = this.wavesurfer) || void 0 === i2 ? void 0 : i2.getWrapper();
27281
27304
  if (!(n2 && n2 instanceof HTMLElement)) return () => {
27282
27305
  };
27283
- let s2 = null, o2 = 0, l4 = 0;
27306
+ let s2 = null, o2 = 0, l2 = 0;
27284
27307
  const d2 = h(n2, { threshold: e3 }), c2 = r((() => {
27285
27308
  var e4, i3;
27286
27309
  const n3 = d2.signal.value;
27287
27310
  if (n3) if ("start" === n3.type) {
27288
27311
  if (o2 = n3.x, !this.wavesurfer) return;
27289
27312
  const r2 = this.wavesurfer.getDuration(), h2 = null === (i3 = null === (e4 = this.wavesurfer) || void 0 === e4 ? void 0 : e4.getDecodedData()) || void 0 === i3 ? void 0 : i3.numberOfChannels, { width: d3 } = this.wavesurfer.getWrapper().getBoundingClientRect();
27290
- l4 = o2 / d3 * r2;
27291
- const c3 = n3.x / d3 * r2, u2 = (n3.x + 5) / d3 * r2;
27292
- s2 = new a(Object.assign(Object.assign({}, t2), { start: c3, end: u2 }), r2, h2), this.emit("region-initialized", s2), s2.element && this.regionsContainer.appendChild(s2.element);
27293
- } else "move" === n3.type && void 0 !== n3.deltaX ? s2 && s2._onUpdate(n3.deltaX, n3.x > o2 ? "end" : "start", l4) : "end" === n3.type && s2 && (this.saveRegion(s2), s2.updatingSide = void 0, s2 = null);
27313
+ l2 = o2 / d3 * r2;
27314
+ const c3 = n3.x / d3 * r2, u4 = (n3.x + 5) / d3 * r2;
27315
+ s2 = new a(Object.assign(Object.assign({}, t2), { start: c3, end: u4 }), r2, h2), this.emit("region-initialized", s2), s2.element && this.regionsContainer.appendChild(s2.element);
27316
+ } else "move" === n3.type && void 0 !== n3.deltaX ? s2 && s2._onUpdate(n3.deltaX, n3.x > o2 ? "end" : "start", l2) : "end" === n3.type && s2 && (this.saveRegion(s2), s2.updatingSide = void 0, s2 = null);
27294
27317
  }), [d2.signal]);
27295
27318
  return () => {
27296
27319
  c2(), d2.cleanup();
@@ -27430,7 +27453,7 @@ function useAudioPlayer(options) {
27430
27453
  eventUnsubs.push(core.on("channel:reset", onChannelReset));
27431
27454
  }
27432
27455
  function detachEventListeners() {
27433
- for (const u2 of eventUnsubs) u2();
27456
+ for (const u4 of eventUnsubs) u4();
27434
27457
  eventUnsubs.length = 0;
27435
27458
  }
27436
27459
  function onPlayerReady() {
@@ -27727,6 +27750,7 @@ function createAudioPlugin(options = {}) {
27727
27750
  });
27728
27751
  function seekTo(time) {
27729
27752
  seekHandler?.(time);
27753
+ core.emit("audio:seek", { time });
27730
27754
  }
27731
27755
  function setSeekHandler(fn) {
27732
27756
  seekHandler = fn;
@@ -30294,4 +30318,4 @@ export {
30294
30318
  purify as p,
30295
30319
  register as r
30296
30320
  };
30297
- //# sourceMappingURL=index-CB7gHC-N.js.map
30321
+ //# sourceMappingURL=index-CopL8cVA.js.map