@linto-ai/transcript-ui-webcomponent 0.9.18 → 0.9.22
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.
- package/dist/{highlight-CJMoAPSe.js → highlight-BOTcN5V7.js} +2 -2
- package/dist/{highlight-CJMoAPSe.js.map → highlight-BOTcN5V7.js.map} +1 -1
- package/dist/{index-CB7gHC-N.js → index-DhBFBHeE.js} +582 -586
- package/dist/{index-CB7gHC-N.js.map → index-DhBFBHeE.js.map} +1 -1
- package/dist/linto-editor.iife.js +419 -423
- package/dist/linto-editor.iife.js.map +1 -1
- package/dist/linto-editor.js +1 -1
- package/package.json +10 -10
|
@@ -305,14 +305,14 @@ class EffectScope {
|
|
|
305
305
|
pause() {
|
|
306
306
|
if (this._active) {
|
|
307
307
|
this._isPaused = true;
|
|
308
|
-
let i2,
|
|
308
|
+
let i2, l2;
|
|
309
309
|
if (this.scopes) {
|
|
310
310
|
const scopes = this.scopes.slice();
|
|
311
|
-
for (i2 = 0,
|
|
311
|
+
for (i2 = 0, l2 = scopes.length; i2 < l2; i2++) {
|
|
312
312
|
scopes[i2].pause();
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
for (i2 = 0,
|
|
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,
|
|
327
|
+
let i2, l2;
|
|
328
328
|
if (this.scopes) {
|
|
329
329
|
const scopes = this.scopes.slice();
|
|
330
|
-
for (i2 = 0,
|
|
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,
|
|
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,
|
|
387
|
-
for (i2 = 0,
|
|
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,
|
|
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,
|
|
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
|
|
658
|
-
removeSub(
|
|
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
|
|
782
|
-
addSub(
|
|
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,
|
|
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,
|
|
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:
|
|
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 (
|
|
5640
|
-
queuePostRenderEffect(
|
|
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
|
|
5795
|
+
const l2 = c2.length;
|
|
5796
5796
|
let e1 = c1.length - 1;
|
|
5797
|
-
let e22 =
|
|
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 <
|
|
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 <
|
|
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,
|
|
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
|
-
|
|
6284
|
+
u4 = 0;
|
|
6285
6285
|
v2 = result.length - 1;
|
|
6286
|
-
while (
|
|
6287
|
-
c2 =
|
|
6286
|
+
while (u4 < v2) {
|
|
6287
|
+
c2 = u4 + v2 >> 1;
|
|
6288
6288
|
if (arr[result[c2]] < arrI) {
|
|
6289
|
-
|
|
6289
|
+
u4 = c2 + 1;
|
|
6290
6290
|
} else {
|
|
6291
6291
|
v2 = c2;
|
|
6292
6292
|
}
|
|
6293
6293
|
}
|
|
6294
|
-
if (arrI < arr[result[
|
|
6295
|
-
if (
|
|
6296
|
-
p2[i2] = result[
|
|
6294
|
+
if (arrI < arr[result[u4]]) {
|
|
6295
|
+
if (u4 > 0) {
|
|
6296
|
+
p2[i2] = result[u4 - 1];
|
|
6297
6297
|
}
|
|
6298
|
-
result[
|
|
6298
|
+
result[u4] = i2;
|
|
6299
6299
|
}
|
|
6300
6300
|
}
|
|
6301
6301
|
}
|
|
6302
|
-
|
|
6303
|
-
v2 = result[
|
|
6304
|
-
while (
|
|
6305
|
-
result[
|
|
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
|
|
6986
|
-
if (
|
|
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 (
|
|
6996
|
+
if (l2 > 3) {
|
|
6997
6997
|
children = Array.prototype.slice.call(arguments, 2);
|
|
6998
|
-
} else if (
|
|
6998
|
+
} else if (l2 === 3 && isVNode(children)) {
|
|
6999
6999
|
children = [children];
|
|
7000
7000
|
}
|
|
7001
7001
|
return createVNode(type, propsOrChildren, children);
|
|
@@ -7376,7 +7376,7 @@ function getTimeout(delays, durations) {
|
|
|
7376
7376
|
while (delays.length < durations.length) {
|
|
7377
7377
|
delays = delays.concat(delays);
|
|
7378
7378
|
}
|
|
7379
|
-
return Math.max(...durations.map((
|
|
7379
|
+
return Math.max(...durations.map((d3, i2) => toMs(d3) + toMs(delays[i2])));
|
|
7380
7380
|
}
|
|
7381
7381
|
function toMs(s2) {
|
|
7382
7382
|
if (s2 === "auto") return 0;
|
|
@@ -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,
|
|
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) {
|
|
@@ -9054,17 +9054,17 @@ function toDate(value) {
|
|
|
9054
9054
|
const d22 = new Date(ms);
|
|
9055
9055
|
return Number.isNaN(d22.getTime()) ? null : d22;
|
|
9056
9056
|
}
|
|
9057
|
-
const
|
|
9058
|
-
return Number.isNaN(
|
|
9057
|
+
const d3 = new Date(value);
|
|
9058
|
+
return Number.isNaN(d3.getTime()) ? null : d3;
|
|
9059
9059
|
}
|
|
9060
9060
|
function formatLongDate(value, locale) {
|
|
9061
|
-
const
|
|
9062
|
-
if (!
|
|
9061
|
+
const d3 = toDate(value);
|
|
9062
|
+
if (!d3) return "";
|
|
9063
9063
|
return new Intl.DateTimeFormat(locale, {
|
|
9064
9064
|
day: "numeric",
|
|
9065
9065
|
month: "long",
|
|
9066
9066
|
year: "numeric"
|
|
9067
|
-
}).format(
|
|
9067
|
+
}).format(d3);
|
|
9068
9068
|
}
|
|
9069
9069
|
function formatDurationMinutes(seconds, locale) {
|
|
9070
9070
|
const minutes = Math.max(0, Math.round(seconds / 60));
|
|
@@ -9102,18 +9102,18 @@ function validateEditorDocument(doc2) {
|
|
|
9102
9102
|
if (doc2 == null || typeof doc2 !== "object") {
|
|
9103
9103
|
throw new DocumentValidationError("document", "must be a non-null object");
|
|
9104
9104
|
}
|
|
9105
|
-
const
|
|
9106
|
-
if (typeof
|
|
9105
|
+
const d3 = doc2;
|
|
9106
|
+
if (typeof d3.title !== "string") {
|
|
9107
9107
|
throw new DocumentValidationError("document.title", "must be a string");
|
|
9108
9108
|
}
|
|
9109
|
-
if (!(
|
|
9109
|
+
if (!(d3.speakers instanceof Map)) {
|
|
9110
9110
|
throw new DocumentValidationError("document.speakers", "must be a Map");
|
|
9111
9111
|
}
|
|
9112
|
-
if (!Array.isArray(
|
|
9112
|
+
if (!Array.isArray(d3.channels)) {
|
|
9113
9113
|
throw new DocumentValidationError("document.channels", "must be an array");
|
|
9114
9114
|
}
|
|
9115
|
-
for (let ci = 0; ci <
|
|
9116
|
-
const ch =
|
|
9115
|
+
for (let ci = 0; ci < d3.channels.length; ci++) {
|
|
9116
|
+
const ch = d3.channels[ci];
|
|
9117
9117
|
const cp = `channels[${ci}]`;
|
|
9118
9118
|
if (ch == null || typeof ch !== "object") {
|
|
9119
9119
|
throw new DocumentValidationError(cp, "must be a non-null object");
|
|
@@ -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-
|
|
10521
|
+
const { highlightCode } = await import("./highlight-BOTcN5V7.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$
|
|
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$
|
|
10844
|
+
}, toDisplayString(opt.label), 9, _hoisted_6$a);
|
|
10845
10845
|
}), 128))
|
|
10846
10846
|
], 16, _hoisted_5$b)), [
|
|
10847
10847
|
[vModelSelect, draft.value]
|
|
@@ -14098,7 +14098,7 @@ const flip$1 = function(options) {
|
|
|
14098
14098
|
const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
14099
14099
|
if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
|
|
14100
14100
|
// overflows the main axis.
|
|
14101
|
-
overflowsData.every((
|
|
14101
|
+
overflowsData.every((d3) => getSideAxis(d3.placement) === initialSideAxis ? d3.overflows[0] > 0 : true)) {
|
|
14102
14102
|
return {
|
|
14103
14103
|
data: {
|
|
14104
14104
|
index: nextIndex,
|
|
@@ -14110,20 +14110,20 @@ const flip$1 = function(options) {
|
|
|
14110
14110
|
};
|
|
14111
14111
|
}
|
|
14112
14112
|
}
|
|
14113
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter((
|
|
14113
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d3) => d3.overflows[0] <= 0).sort((a2, b2) => a2.overflows[1] - b2.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
14114
14114
|
if (!resetPlacement) {
|
|
14115
14115
|
switch (fallbackStrategy) {
|
|
14116
14116
|
case "bestFit": {
|
|
14117
14117
|
var _overflowsData$filter2;
|
|
14118
|
-
const placement2 = (_overflowsData$filter2 = overflowsData.filter((
|
|
14118
|
+
const placement2 = (_overflowsData$filter2 = overflowsData.filter((d3) => {
|
|
14119
14119
|
if (hasFallbackAxisSideDirection) {
|
|
14120
|
-
const currentSideAxis = getSideAxis(
|
|
14120
|
+
const currentSideAxis = getSideAxis(d3.placement);
|
|
14121
14121
|
return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
|
|
14122
14122
|
// reading directions favoring greater width.
|
|
14123
14123
|
currentSideAxis === "y";
|
|
14124
14124
|
}
|
|
14125
14125
|
return true;
|
|
14126
|
-
}).map((
|
|
14126
|
+
}).map((d3) => [d3.placement, d3.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b2) => a2[1] - b2[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
14127
14127
|
if (placement2) {
|
|
14128
14128
|
resetPlacement = placement2;
|
|
14129
14129
|
}
|
|
@@ -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
|
|
18318
|
-
function j(
|
|
18319
|
-
|
|
18317
|
+
var T = A();
|
|
18318
|
+
function j(u4) {
|
|
18319
|
+
T = u4;
|
|
18320
18320
|
}
|
|
18321
|
-
var
|
|
18322
|
-
function I(
|
|
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 =
|
|
18326
|
+
return s2 || (s2 = u4(n2), e3[n2] = s2), s2;
|
|
18327
18327
|
};
|
|
18328
18328
|
}
|
|
18329
|
-
function k(
|
|
18330
|
-
let t2 = typeof
|
|
18331
|
-
let
|
|
18332
|
-
return
|
|
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
|
|
18336
|
+
var Te = ((u4 = "") => {
|
|
18337
18337
|
try {
|
|
18338
|
-
return !!new RegExp("(?<=1)(?<!1)" +
|
|
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: (
|
|
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-",
|
|
18344
|
-
var
|
|
18345
|
-
function
|
|
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 = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, ge = (u4) => kt[u4];
|
|
18345
|
+
function R(u4, e3) {
|
|
18346
18346
|
if (e3) {
|
|
18347
|
-
if (m$1.escapeTest.test(
|
|
18348
|
-
} else if (m$1.escapeTestNoEncode.test(
|
|
18349
|
-
return
|
|
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(
|
|
18351
|
+
function Y(u4) {
|
|
18352
18352
|
try {
|
|
18353
|
-
|
|
18353
|
+
u4 = encodeURI(u4).replace(m$1.percentDecode, "%");
|
|
18354
18354
|
} catch {
|
|
18355
18355
|
return null;
|
|
18356
18356
|
}
|
|
18357
|
-
return
|
|
18357
|
+
return u4;
|
|
18358
18358
|
}
|
|
18359
|
-
function ee(
|
|
18360
|
-
let t2 =
|
|
18361
|
-
let
|
|
18362
|
-
for (; --a2 >= 0 &&
|
|
18363
|
-
return
|
|
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 $(
|
|
18371
|
-
let n2 =
|
|
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 =
|
|
18375
|
+
let r2 = u4.charAt(n2 - s2 - 1);
|
|
18376
18376
|
if (r2 === e3 && true) s2++;
|
|
18377
18377
|
else break;
|
|
18378
18378
|
}
|
|
18379
|
-
return
|
|
18379
|
+
return u4.slice(0, n2 - s2);
|
|
18380
18380
|
}
|
|
18381
|
-
function te(
|
|
18382
|
-
let e3 =
|
|
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 ?
|
|
18385
|
+
return e3.length - t2 <= 2 ? u4 : e3.slice(0, t2 + 1).join(`
|
|
18386
18386
|
`);
|
|
18387
18387
|
}
|
|
18388
|
-
function fe(
|
|
18389
|
-
if (
|
|
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 <
|
|
18392
|
-
else if (
|
|
18393
|
-
else if (
|
|
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(
|
|
18396
|
+
function me(u4, e3 = 0) {
|
|
18397
18397
|
let t2 = e3, n2 = "";
|
|
18398
|
-
for (let s2 of
|
|
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(
|
|
18405
|
-
let r2 = e3.href,
|
|
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(
|
|
18410
|
-
if (n2.state.linkEmitted = a2, n2.state.inLink = false, !
|
|
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:
|
|
18417
|
+
return { type: l2 ? "image" : "link", raw: t2, href: r2, title: o2, text: i2, tokens: c2 };
|
|
18418
18418
|
}
|
|
18419
|
-
function
|
|
18420
|
-
let n2 =
|
|
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
|
|
18426
|
-
if (
|
|
18427
|
-
let [
|
|
18428
|
-
return
|
|
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 ||
|
|
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 =
|
|
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.
|
|
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 = "",
|
|
18479
|
+
`), s2 = "", r2 = "", o2 = [];
|
|
18480
18480
|
for (; n2.length > 0; ) {
|
|
18481
|
-
let
|
|
18482
|
-
for (a2 = 0; a2 < n2.length; a2++) if (this.rules.other.blockquoteStart.test(n2[a2]))
|
|
18483
|
-
else if (!
|
|
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 =
|
|
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,
|
|
18494
|
-
let
|
|
18495
|
-
if (
|
|
18496
|
-
if (
|
|
18497
|
-
let O =
|
|
18493
|
+
if (this.lexer.state.top = true, this.lexer.blockTokens(c2, o2, true), this.lexer.state.top = h2, n2.length === 0) break;
|
|
18494
|
+
let d3 = o2.at(-1);
|
|
18495
|
+
if (d3?.type === "code") break;
|
|
18496
|
+
if (d3?.type === "blockquote") {
|
|
18497
|
+
let O = d3, g2 = n2.join(`
|
|
18498
18498
|
`), w2 = O.raw + `
|
|
18499
|
-
` + g2.replace(this.rules.other.blockquoteSetextReplace2, ""),
|
|
18500
|
-
|
|
18501
|
-
${g2}`, r2 = r2.substring(0, r2.length - O.text.length) +
|
|
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
|
-
} else if (
|
|
18504
|
-
let O =
|
|
18503
|
+
} else if (d3?.type === "list") {
|
|
18504
|
+
let O = d3, g2 = O.raw + `
|
|
18505
18505
|
` + n2.join(`
|
|
18506
18506
|
`), w2 = this.list(g2);
|
|
18507
|
-
|
|
18507
|
+
o2[o2.length - 1] = w2, s2 = s2.substring(0, s2.length - d3.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:
|
|
18512
|
+
return { type: "blockquote", raw: s2, tokens: o2, text: r2 };
|
|
18513
18513
|
}
|
|
18514
18514
|
}
|
|
18515
18515
|
list(e3) {
|
|
@@ -18517,36 +18517,36 @@ ${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
|
|
18520
|
+
let o2 = this.rules.other.listItemRegex(n2), i2 = false;
|
|
18521
18521
|
for (; e3; ) {
|
|
18522
18522
|
let a2 = false, p2 = "", c2 = "";
|
|
18523
|
-
if (!(t2 =
|
|
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
|
-
`, 1)[0], t2[1].length),
|
|
18526
|
+
`, 1)[0], t2[1].length), d3 = e3.split(`
|
|
18527
18527
|
`, 1)[0], O = !h2.trim(), g2 = 0;
|
|
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(
|
|
18529
|
-
`, e3 = e3.substring(
|
|
18530
|
-
let w2 = this.rules.other.nextBulletRegex(g2),
|
|
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(d3) && (p2 += d3 + `
|
|
18529
|
+
`, e3 = e3.substring(d3.length + 1), a2 = true), !a2) {
|
|
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 (
|
|
18535
|
-
if (D.search(this.rules.other.nonSpaceChar) >= g2 || !
|
|
18534
|
+
if (d3 = N, this.options.pedantic ? (d3 = d3.replace(this.rules.other.listReplaceNesting, " "), D = d3) : D = d3.replace(this.rules.other.tabCharGlobal, " "), ne.test(d3) || re.test(d3) || be.test(d3) || Re.test(d3) || w2.test(d3) || z.test(d3)) break;
|
|
18535
|
+
if (D.search(this.rules.other.nonSpaceChar) >= g2 || !d3.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) ||
|
|
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
|
+
` + d3;
|
|
18541
18541
|
}
|
|
18542
|
-
O = !
|
|
18542
|
+
O = !d3.trim(), p2 += N + `
|
|
18543
18543
|
`, e3 = e3.substring(N.length + 1), h2 = D.slice(g2);
|
|
18544
18544
|
}
|
|
18545
18545
|
}
|
|
18546
|
-
r2.loose || (
|
|
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
|
|
18549
|
-
if (
|
|
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
|
-
`) : [],
|
|
18597
|
+
`) : [], o2 = { type: "table", raw: $(t2[0], `
|
|
18598
18598
|
`), header: [], align: [], rows: [] };
|
|
18599
18599
|
if (n2.length === s2.length) {
|
|
18600
|
-
for (let
|
|
18601
|
-
for (let
|
|
18602
|
-
for (let
|
|
18603
|
-
return
|
|
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
|
|
18641
|
-
if ((n2.length -
|
|
18640
|
+
let o2 = $(n2.slice(0, -1), "\\");
|
|
18641
|
+
if ((n2.length - o2.length) % 2 === 0) return;
|
|
18642
18642
|
} else {
|
|
18643
|
-
let
|
|
18644
|
-
if (
|
|
18645
|
-
if (
|
|
18646
|
-
let
|
|
18647
|
-
t2[2] = t2[2].substring(0,
|
|
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
|
|
18653
|
-
|
|
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
|
|
18664
|
-
return { type: "text", raw:
|
|
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
|
|
18674
|
-
for (
|
|
18675
|
-
if (
|
|
18676
|
-
if (
|
|
18677
|
-
a2 +=
|
|
18673
|
+
let o2 = [...s2[0]].length - 1, i2, l2, a2 = o2, p2 = 0, c2 = s2[0][0], h2 = n2 === c2, d3 = c2 === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
18674
|
+
for (d3.lastIndex = 0, t2 = t2.slice(-1 * e3.length + o2); (s2 = d3.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 (
|
|
18681
|
-
p2 +=
|
|
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 -=
|
|
18687
|
-
|
|
18688
|
-
let O = [...s2[0]][0].length, g2 = e3.slice(0,
|
|
18689
|
-
if (Math.min(
|
|
18690
|
-
let
|
|
18691
|
-
return { type: "em", raw: g2, text:
|
|
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,17 +18710,17 @@ ${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
|
|
18714
|
-
for (p2.lastIndex = 0, t2 = t2.slice(-1 * e3.length +
|
|
18715
|
-
if (
|
|
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 +=
|
|
18717
|
+
a2 += l2;
|
|
18718
18718
|
continue;
|
|
18719
18719
|
}
|
|
18720
|
-
if (a2 -=
|
|
18721
|
-
|
|
18722
|
-
let c2 = [...s2[0]][0].length, h2 = e3.slice(0,
|
|
18723
|
-
return { type: "del", raw: h2, text:
|
|
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), d3 = h2.slice(o2, -o2);
|
|
18723
|
+
return { type: "del", raw: h2, text: d3, tokens: this.lexer.inlineTokens(d3) };
|
|
18724
18724
|
}
|
|
18725
18725
|
}
|
|
18726
18726
|
}
|
|
@@ -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
|
|
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 ||
|
|
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
|
|
18772
|
+
return new u(t2).lex(e3);
|
|
18773
18773
|
}
|
|
18774
18774
|
static lexInline(e3, t2) {
|
|
18775
|
-
return new
|
|
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((
|
|
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
|
|
18800
|
-
r2.raw.length === 1 &&
|
|
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
|
|
18807
|
-
|
|
18806
|
+
let i2 = t2.at(-1);
|
|
18807
|
+
i2?.type === "paragraph" || i2?.type === "text" ? (i2.raw += (i2.raw.endsWith(`
|
|
18808
18808
|
`) ? "" : `
|
|
18809
|
-
`) + r2.raw,
|
|
18810
|
-
` + r2.text, this.inlineQueue.at(-1).src =
|
|
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
|
|
18840
|
-
|
|
18839
|
+
let i2 = t2.at(-1);
|
|
18840
|
+
i2?.type === "paragraph" || i2?.type === "text" ? (i2.raw += (i2.raw.endsWith(`
|
|
18841
18841
|
`) ? "" : `
|
|
18842
|
-
`) + r2.raw,
|
|
18843
|
-
` + r2.raw, this.inlineQueue.at(-1).src =
|
|
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
|
|
18854
|
+
let o2 = e3;
|
|
18855
18855
|
if (this.options.extensions?.startBlock) {
|
|
18856
|
-
let
|
|
18856
|
+
let i2 = 1 / 0, l2 = e3.slice(1), a2;
|
|
18857
18857
|
this.options.extensions.startBlock.forEach((p2) => {
|
|
18858
|
-
a2 = p2.call({ lexer: this },
|
|
18859
|
-
}),
|
|
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(
|
|
18862
|
-
let
|
|
18863
|
-
n2 &&
|
|
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,
|
|
18866
|
-
` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src =
|
|
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
|
|
18872
|
-
|
|
18871
|
+
let i2 = t2.at(-1);
|
|
18872
|
+
i2?.type === "text" ? (i2.raw += (i2.raw.endsWith(`
|
|
18873
18873
|
`) ? "" : `
|
|
18874
|
-
`) + r2.raw,
|
|
18875
|
-
` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src =
|
|
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
|
|
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(
|
|
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(
|
|
18911
|
+
n2 = n2.replace(i2, l2);
|
|
18912
18912
|
}
|
|
18913
|
-
n2 = n2.replace(this.tokenizer.rules.inline.anyPunctuation, (
|
|
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
|
|
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 = "",
|
|
18917
|
+
let s2 = false, r2 = "", o2 = 1 / 0;
|
|
18918
18918
|
for (; e3; ) {
|
|
18919
|
-
if (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
|
|
18926
|
-
if (this.options.extensions?.inline?.some((a2) => (
|
|
18927
|
-
if (
|
|
18928
|
-
e3 = e3.substring(
|
|
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 (
|
|
18932
|
-
e3 = e3.substring(
|
|
18931
|
+
if (i2 = this.tokenizer.tag(e3)) {
|
|
18932
|
+
e3 = e3.substring(i2.raw.length), t2.push(i2);
|
|
18933
18933
|
continue;
|
|
18934
18934
|
}
|
|
18935
|
-
if (
|
|
18936
|
-
e3 = e3.substring(
|
|
18935
|
+
if (i2 = this.tokenizer.link(e3)) {
|
|
18936
|
+
e3 = e3.substring(i2.raw.length), t2.push(i2);
|
|
18937
18937
|
continue;
|
|
18938
18938
|
}
|
|
18939
|
-
if (
|
|
18940
|
-
e3 = e3.substring(
|
|
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
|
-
|
|
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 (
|
|
18946
|
-
e3 = e3.substring(
|
|
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 (
|
|
18950
|
-
e3 = e3.substring(
|
|
18949
|
+
if (i2 = this.tokenizer.codespan(e3)) {
|
|
18950
|
+
e3 = e3.substring(i2.raw.length), t2.push(i2);
|
|
18951
18951
|
continue;
|
|
18952
18952
|
}
|
|
18953
|
-
if (
|
|
18954
|
-
e3 = e3.substring(
|
|
18953
|
+
if (i2 = this.tokenizer.br(e3)) {
|
|
18954
|
+
e3 = e3.substring(i2.raw.length), t2.push(i2);
|
|
18955
18955
|
continue;
|
|
18956
18956
|
}
|
|
18957
|
-
if (
|
|
18958
|
-
e3 = e3.substring(
|
|
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 (
|
|
18962
|
-
e3 = e3.substring(
|
|
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 && (
|
|
18966
|
-
e3 = e3.substring(
|
|
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
|
|
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 && (
|
|
18974
|
+
}), a2 < 1 / 0 && a2 >= 0 && (l2 = e3.substring(0, a2 + 1));
|
|
18975
18975
|
}
|
|
18976
|
-
if (
|
|
18977
|
-
e3 = e3.substring(
|
|
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 +=
|
|
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 ||
|
|
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-' +
|
|
19008
|
-
` : "<pre><code>" + (n2 ? r2 :
|
|
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
|
|
19033
|
-
let
|
|
19034
|
-
s2 += this.listitem(
|
|
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",
|
|
19037
|
-
return "<" + r2 +
|
|
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
|
|
19058
|
+
let o2 = e3.rows[r2];
|
|
19059
19059
|
n2 = "";
|
|
19060
|
-
for (let
|
|
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>${
|
|
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,
|
|
19095
|
-
let
|
|
19096
|
-
if (
|
|
19097
|
-
e3 = r2;
|
|
19098
|
-
let
|
|
19099
|
-
return t2 && (
|
|
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
|
|
19104
|
+
if (r2 === null) return R(n2);
|
|
19105
19105
|
e3 = r2;
|
|
19106
|
-
let
|
|
19107
|
-
return t2 && (
|
|
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 :
|
|
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
|
|
19145
|
+
var b$1 = class u2 {
|
|
19146
19146
|
options;
|
|
19147
19147
|
renderer;
|
|
19148
19148
|
textRenderer;
|
|
19149
19149
|
constructor(e3) {
|
|
19150
|
-
this.options = e3 ||
|
|
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
|
|
19153
|
+
return new u2(t2).parse(e3);
|
|
19154
19154
|
}
|
|
19155
19155
|
static parseInline(e3, t2) {
|
|
19156
|
-
return new
|
|
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
|
|
19165
|
-
if (
|
|
19166
|
-
t2 +=
|
|
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
|
|
19222
|
-
if (this.options.silent) return console.error(
|
|
19223
|
-
throw new Error(
|
|
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
|
|
19236
|
-
if (
|
|
19237
|
-
n2 +=
|
|
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
|
|
19242
|
-
switch (
|
|
19241
|
+
let o2 = r2;
|
|
19242
|
+
switch (o2.type) {
|
|
19243
19243
|
case "escape": {
|
|
19244
|
-
n2 += t2.text(
|
|
19244
|
+
n2 += t2.text(o2);
|
|
19245
19245
|
break;
|
|
19246
19246
|
}
|
|
19247
19247
|
case "html": {
|
|
19248
|
-
n2 += t2.html(
|
|
19248
|
+
n2 += t2.html(o2);
|
|
19249
19249
|
break;
|
|
19250
19250
|
}
|
|
19251
19251
|
case "link": {
|
|
19252
|
-
n2 += t2.link(
|
|
19252
|
+
n2 += t2.link(o2);
|
|
19253
19253
|
break;
|
|
19254
19254
|
}
|
|
19255
19255
|
case "image": {
|
|
19256
|
-
n2 += t2.image(
|
|
19256
|
+
n2 += t2.image(o2);
|
|
19257
19257
|
break;
|
|
19258
19258
|
}
|
|
19259
19259
|
case "checkbox": {
|
|
19260
|
-
n2 += t2.checkbox(
|
|
19260
|
+
n2 += t2.checkbox(o2);
|
|
19261
19261
|
break;
|
|
19262
19262
|
}
|
|
19263
19263
|
case "strong": {
|
|
19264
|
-
n2 += t2.strong(
|
|
19264
|
+
n2 += t2.strong(o2);
|
|
19265
19265
|
break;
|
|
19266
19266
|
}
|
|
19267
19267
|
case "em": {
|
|
19268
|
-
n2 += t2.em(
|
|
19268
|
+
n2 += t2.em(o2);
|
|
19269
19269
|
break;
|
|
19270
19270
|
}
|
|
19271
19271
|
case "codespan": {
|
|
19272
|
-
n2 += t2.codespan(
|
|
19272
|
+
n2 += t2.codespan(o2);
|
|
19273
19273
|
break;
|
|
19274
19274
|
}
|
|
19275
19275
|
case "br": {
|
|
19276
|
-
n2 += t2.br(
|
|
19276
|
+
n2 += t2.br(o2);
|
|
19277
19277
|
break;
|
|
19278
19278
|
}
|
|
19279
19279
|
case "del": {
|
|
19280
|
-
n2 += t2.del(
|
|
19280
|
+
n2 += t2.del(o2);
|
|
19281
19281
|
break;
|
|
19282
19282
|
}
|
|
19283
19283
|
case "text": {
|
|
19284
|
-
n2 += t2.text(
|
|
19284
|
+
n2 += t2.text(o2);
|
|
19285
19285
|
break;
|
|
19286
19286
|
}
|
|
19287
19287
|
default: {
|
|
19288
|
-
let
|
|
19289
|
-
if (this.options.silent) return console.error(
|
|
19290
|
-
throw new Error(
|
|
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 ||
|
|
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
|
|
19344
|
-
for (let
|
|
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((
|
|
19355
|
-
let
|
|
19356
|
-
n2 = n2.concat(this.walkTokens(
|
|
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
|
|
19370
|
-
|
|
19371
|
-
let
|
|
19372
|
-
return
|
|
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
|
|
19378
|
-
|
|
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
|
|
19384
|
-
if (!(
|
|
19385
|
-
if (["options", "parser"].includes(
|
|
19386
|
-
let
|
|
19387
|
-
r2[
|
|
19388
|
-
let c2 =
|
|
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
|
|
19397
|
-
if (!(
|
|
19398
|
-
if (["options", "rules", "lexer"].includes(
|
|
19399
|
-
let
|
|
19400
|
-
r2[
|
|
19401
|
-
let c2 =
|
|
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
|
|
19410
|
-
if (!(
|
|
19411
|
-
if (["options", "block"].includes(
|
|
19412
|
-
let
|
|
19413
|
-
S$1.passThroughHooks.has(
|
|
19414
|
-
if (this.defaults.async && S$1.passThroughHooksRespectAsync.has(
|
|
19415
|
-
let h2 = await
|
|
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 =
|
|
19418
|
+
let c2 = l2.call(r2, p2);
|
|
19419
19419
|
return a2.call(r2, c2);
|
|
19420
|
-
} : r2[
|
|
19420
|
+
} : r2[i2] = (...p2) => {
|
|
19421
19421
|
if (this.defaults.async) return (async () => {
|
|
19422
|
-
let h2 = await
|
|
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 =
|
|
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,
|
|
19433
|
-
s2.walkTokens = function(
|
|
19434
|
-
let
|
|
19435
|
-
return
|
|
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 },
|
|
19453
|
-
if (this.defaults.async === true && r2.async === false) return
|
|
19454
|
-
if (typeof n2 > "u" || n2 === null) return
|
|
19455
|
-
if (typeof n2 != "string") return
|
|
19456
|
-
if (
|
|
19457
|
-
let
|
|
19458
|
-
|
|
19459
|
-
let
|
|
19460
|
-
return
|
|
19461
|
-
})().catch(
|
|
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 d3 = 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(d3) : d3;
|
|
19461
|
+
})().catch(i2);
|
|
19462
19462
|
try {
|
|
19463
|
-
|
|
19464
|
-
let a2 = (
|
|
19465
|
-
|
|
19466
|
-
let c2 = (
|
|
19467
|
-
return
|
|
19468
|
-
} catch (
|
|
19469
|
-
return
|
|
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>" +
|
|
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(
|
|
19487
|
-
return M.parse(
|
|
19486
|
+
function f$1(u4, e3) {
|
|
19487
|
+
return M.parse(u4, e3);
|
|
19488
19488
|
}
|
|
19489
|
-
f$1.options = f$1.setOptions = function(
|
|
19490
|
-
return M.setOptions(
|
|
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 =
|
|
19494
|
-
function
|
|
19495
|
-
return M.use(...
|
|
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 =
|
|
19498
|
-
f$1.walkTokens = function(
|
|
19499
|
-
return M.walkTokens(
|
|
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,
|
|
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,
|
|
19528
|
+
var e3, n2, i2, u4, a2 = [], f2 = true, o2 = false;
|
|
19529
19529
|
try {
|
|
19530
|
-
if (i2 = (t2 = t2.call(r2)).next, 0 ===
|
|
19531
|
-
else for (; !(f2 = (e3 = i2.call(t2)).done) && (a2.push(e3.value), a2.length !==
|
|
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 && (
|
|
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
|
|
19634
|
-
while (
|
|
19635
|
-
let element = array[
|
|
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[
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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" ||
|
|
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
|
-
|
|
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
|
|
20792
|
+
let l2 = attributes.length;
|
|
20782
20793
|
const lcTag = transformCaseFunc(currentNode.nodeName);
|
|
20783
|
-
while (
|
|
20784
|
-
const attr = attributes[
|
|
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(
|
|
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$
|
|
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$
|
|
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$
|
|
22142
|
+
const _hoisted_6$8 = { key: 0 };
|
|
22127
22143
|
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
22128
22144
|
__name: "Header",
|
|
22129
22145
|
props: {
|
|
@@ -22185,34 +22201,36 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
22185
22201
|
]),
|
|
22186
22202
|
_: 1
|
|
22187
22203
|
}, 8, ["aria-label"])) : createCommentVNode("", true),
|
|
22188
|
-
|
|
22189
|
-
|
|
22190
|
-
|
|
22191
|
-
|
|
22192
|
-
|
|
22193
|
-
|
|
22194
|
-
|
|
22195
|
-
|
|
22196
|
-
|
|
22197
|
-
|
|
22198
|
-
|
|
22199
|
-
|
|
22200
|
-
|
|
22201
|
-
|
|
22202
|
-
|
|
22203
|
-
|
|
22204
|
-
|
|
22205
|
-
|
|
22206
|
-
|
|
22207
|
-
|
|
22208
|
-
|
|
22209
|
-
|
|
22210
|
-
|
|
22211
|
-
|
|
22212
|
-
|
|
22213
|
-
|
|
22214
|
-
|
|
22215
|
-
|
|
22204
|
+
props.canUndo || props.canRedo ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
22205
|
+
createVNode(unref(Button), {
|
|
22206
|
+
variant: "secondary",
|
|
22207
|
+
"aria-label": unref(t2)("header.undo"),
|
|
22208
|
+
disabled: !props.canUndo,
|
|
22209
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("undo"))
|
|
22210
|
+
}, {
|
|
22211
|
+
icon: withCtx(() => [
|
|
22212
|
+
createVNode(unref(EditorIcon), {
|
|
22213
|
+
name: "undo",
|
|
22214
|
+
size: 16
|
|
22215
|
+
})
|
|
22216
|
+
]),
|
|
22217
|
+
_: 1
|
|
22218
|
+
}, 8, ["aria-label", "disabled"]),
|
|
22219
|
+
createVNode(unref(Button), {
|
|
22220
|
+
variant: "secondary",
|
|
22221
|
+
"aria-label": unref(t2)("header.redo"),
|
|
22222
|
+
disabled: !props.canRedo,
|
|
22223
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("redo"))
|
|
22224
|
+
}, {
|
|
22225
|
+
icon: withCtx(() => [
|
|
22226
|
+
createVNode(unref(EditorIcon), {
|
|
22227
|
+
name: "redo",
|
|
22228
|
+
size: 16
|
|
22229
|
+
})
|
|
22230
|
+
]),
|
|
22231
|
+
_: 1
|
|
22232
|
+
}, 8, ["aria-label", "disabled"])
|
|
22233
|
+
], 64)) : createCommentVNode("", true),
|
|
22216
22234
|
createVNode(unref(Button), {
|
|
22217
22235
|
variant: "primary",
|
|
22218
22236
|
"aria-label": unref(t2)("header.ask"),
|
|
@@ -22226,7 +22244,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
22226
22244
|
})
|
|
22227
22245
|
]),
|
|
22228
22246
|
default: withCtx(() => [
|
|
22229
|
-
!__props.isMobile ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
22247
|
+
!__props.isMobile ? (openBlock(), createElementBlock("span", _hoisted_6$8, toDisplayString(unref(t2)("header.ask")), 1)) : createCommentVNode("", true)
|
|
22230
22248
|
]),
|
|
22231
22249
|
_: 1
|
|
22232
22250
|
}, 8, ["aria-label", "disabled"])
|
|
@@ -22235,8 +22253,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
22235
22253
|
};
|
|
22236
22254
|
}
|
|
22237
22255
|
});
|
|
22238
|
-
const _style_0$p = '\n.editor-header[data-v-
|
|
22239
|
-
const Header = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["styles", [_style_0$p]], ["__scopeId", "data-v-
|
|
22256
|
+
const _style_0$p = '\n.editor-header[data-v-491cf8ab] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--spacing-md);\n padding: var(--spacing-sm) var(--spacing-lg);\n min-height: var(--header-height);\n border-bottom: 1px solid var(--color-border);\n background-color: var(--color-surface);\n flex-shrink: 0;\n}\n.header-main[data-v-491cf8ab] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n flex: 1;\n}\n.document-title[data-v-491cf8ab] {\n font-size: var(--font-size-lg);\n font-weight: 600;\n color: var(--color-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0;\n}\n.document-meta[data-v-491cf8ab] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-xs);\n font-size: var(--font-size-xs);\n color: var(--color-text-muted);\n}\n.document-meta__part[data-v-491cf8ab] {\n text-box: cap alphabetic;\n}\n.document-meta__part + .document-meta__part[data-v-491cf8ab]::before {\n content: "·";\n margin-right: var(--spacing-xs);\n}\n.header-right[data-v-491cf8ab] {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n flex-shrink: 0;\n}\n@media (max-width: 767px) {\n.editor-header[data-v-491cf8ab] {\n padding: var(--spacing-xs) var(--spacing-md);\n}\n.document-title[data-v-491cf8ab] {\n font-size: var(--font-size-base);\n}\n}\n';
|
|
22257
|
+
const Header = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["styles", [_style_0$p]], ["__scopeId", "data-v-491cf8ab"]]);
|
|
22240
22258
|
const TRANSCRIPTION_TAB = "__transcription__";
|
|
22241
22259
|
const VERBATIM_TAB = "__verbatim__";
|
|
22242
22260
|
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
@@ -22348,7 +22366,7 @@ function createStickToBottomEngine(initialOptions = {}) {
|
|
|
22348
22366
|
};
|
|
22349
22367
|
function notify() {
|
|
22350
22368
|
const snapshot = getPublicState();
|
|
22351
|
-
for (const
|
|
22369
|
+
for (const l2 of listeners) l2(snapshot);
|
|
22352
22370
|
}
|
|
22353
22371
|
function getPublicState() {
|
|
22354
22372
|
return {
|
|
@@ -23553,6 +23571,9 @@ function useFollowPlayback(scrollContainer) {
|
|
|
23553
23571
|
if (playing) isFollowing.value = true;
|
|
23554
23572
|
}
|
|
23555
23573
|
);
|
|
23574
|
+
const stopSeekListener = core.on("audio:seek", () => {
|
|
23575
|
+
isFollowing.value = true;
|
|
23576
|
+
});
|
|
23556
23577
|
function onManualScroll() {
|
|
23557
23578
|
isFollowing.value = false;
|
|
23558
23579
|
}
|
|
@@ -23566,7 +23587,6 @@ function useFollowPlayback(scrollContainer) {
|
|
|
23566
23587
|
if (!el) return;
|
|
23567
23588
|
el.addEventListener("wheel", handler, { passive: true });
|
|
23568
23589
|
el.addEventListener("touchstart", handler, { passive: true });
|
|
23569
|
-
el.addEventListener("pointerdown", handler, { passive: true });
|
|
23570
23590
|
el.addEventListener("keydown", checkKeyDownIsScroll);
|
|
23571
23591
|
}
|
|
23572
23592
|
function downScrollListener(handler) {
|
|
@@ -23574,7 +23594,6 @@ function useFollowPlayback(scrollContainer) {
|
|
|
23574
23594
|
if (!el) return;
|
|
23575
23595
|
el.removeEventListener("wheel", handler);
|
|
23576
23596
|
el.removeEventListener("touchstart", handler);
|
|
23577
|
-
el.removeEventListener("pointerdown", handler);
|
|
23578
23597
|
el.removeEventListener("keydown", checkKeyDownIsScroll);
|
|
23579
23598
|
}
|
|
23580
23599
|
onMounted(() => {
|
|
@@ -23582,6 +23601,7 @@ function useFollowPlayback(scrollContainer) {
|
|
|
23582
23601
|
});
|
|
23583
23602
|
onBeforeUnmount(() => {
|
|
23584
23603
|
downScrollListener(onManualScroll);
|
|
23604
|
+
stopSeekListener();
|
|
23585
23605
|
});
|
|
23586
23606
|
function resumeFollow() {
|
|
23587
23607
|
isFollowing.value = true;
|
|
@@ -23604,6 +23624,10 @@ const _hoisted_5$7 = {
|
|
|
23604
23624
|
key: 1,
|
|
23605
23625
|
class: "history-start"
|
|
23606
23626
|
};
|
|
23627
|
+
const _hoisted_6$7 = {
|
|
23628
|
+
key: 0,
|
|
23629
|
+
class: "resume-scroll-anchor"
|
|
23630
|
+
};
|
|
23607
23631
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
23608
23632
|
__name: "TranscriptionPanel",
|
|
23609
23633
|
props: {
|
|
@@ -23739,19 +23763,20 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
23739
23763
|
]),
|
|
23740
23764
|
createVNode(Transition, { name: "fade-slide" }, {
|
|
23741
23765
|
default: withCtx(() => [
|
|
23742
|
-
showResumeButton.value ? (openBlock(),
|
|
23743
|
-
|
|
23744
|
-
|
|
23745
|
-
|
|
23746
|
-
|
|
23747
|
-
|
|
23748
|
-
|
|
23749
|
-
|
|
23750
|
-
|
|
23751
|
-
|
|
23752
|
-
|
|
23753
|
-
|
|
23754
|
-
|
|
23766
|
+
showResumeButton.value ? (openBlock(), createElementBlock("div", _hoisted_6$7, [
|
|
23767
|
+
createVNode(unref(Button), {
|
|
23768
|
+
size: "sm",
|
|
23769
|
+
icon: "arrow-down",
|
|
23770
|
+
class: "resume-scroll-btn",
|
|
23771
|
+
"aria-label": unref(t2)("transcription.resumeScroll"),
|
|
23772
|
+
onClick: onResumeClick
|
|
23773
|
+
}, {
|
|
23774
|
+
default: withCtx(() => [
|
|
23775
|
+
createTextVNode(toDisplayString(unref(t2)("transcription.resumeScroll")), 1)
|
|
23776
|
+
]),
|
|
23777
|
+
_: 1
|
|
23778
|
+
}, 8, ["aria-label"])
|
|
23779
|
+
])) : createCommentVNode("", true)
|
|
23755
23780
|
]),
|
|
23756
23781
|
_: 1
|
|
23757
23782
|
})
|
|
@@ -23760,8 +23785,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
23760
23785
|
};
|
|
23761
23786
|
}
|
|
23762
23787
|
});
|
|
23763
|
-
const _style_0$j = "\n.transcription-panel[data-v-
|
|
23764
|
-
const TranscriptionPanel = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["styles", [_style_0$j]], ["__scopeId", "data-v-
|
|
23788
|
+
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";
|
|
23789
|
+
const TranscriptionPanel = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["styles", [_style_0$j]], ["__scopeId", "data-v-66b767d7"]]);
|
|
23765
23790
|
const _hoisted_1$i = { class: "verbatim-panel" };
|
|
23766
23791
|
const _hoisted_2$f = { class: "verbatim-panel__content" };
|
|
23767
23792
|
const _hoisted_3$c = { class: "verbatim-panel__header" };
|
|
@@ -25292,7 +25317,7 @@ function createLivePlugin(options = {}) {
|
|
|
25292
25317
|
}
|
|
25293
25318
|
function isTranslationTrackFor(active, language) {
|
|
25294
25319
|
if (active.isSource) return false;
|
|
25295
|
-
return active.languages.some((
|
|
25320
|
+
return active.languages.some((l2) => isSameLanguage(l2, language));
|
|
25296
25321
|
}
|
|
25297
25322
|
function onPartial(event, channelId) {
|
|
25298
25323
|
if (core.activeChannelId.value !== channelId) return;
|
|
@@ -25637,25 +25662,25 @@ function t$1(t2, e3, i2, n2) {
|
|
|
25637
25662
|
return new (i2 || (i2 = Promise))((function(s2, r2) {
|
|
25638
25663
|
function o2(t3) {
|
|
25639
25664
|
try {
|
|
25640
|
-
|
|
25665
|
+
l2(n2.next(t3));
|
|
25641
25666
|
} catch (t4) {
|
|
25642
25667
|
r2(t4);
|
|
25643
25668
|
}
|
|
25644
25669
|
}
|
|
25645
25670
|
function a2(t3) {
|
|
25646
25671
|
try {
|
|
25647
|
-
|
|
25672
|
+
l2(n2.throw(t3));
|
|
25648
25673
|
} catch (t4) {
|
|
25649
25674
|
r2(t4);
|
|
25650
25675
|
}
|
|
25651
25676
|
}
|
|
25652
|
-
function
|
|
25677
|
+
function l2(t3) {
|
|
25653
25678
|
var e4;
|
|
25654
25679
|
t3.done ? s2(t3.value) : (e4 = t3.value, e4 instanceof i2 ? e4 : new i2((function(t4) {
|
|
25655
25680
|
t4(e4);
|
|
25656
25681
|
}))).then(o2, a2);
|
|
25657
25682
|
}
|
|
25658
|
-
|
|
25683
|
+
l2((n2 = n2.apply(t2, e3 || [])).next());
|
|
25659
25684
|
}));
|
|
25660
25685
|
}
|
|
25661
25686
|
"function" == typeof SuppressedError && SuppressedError;
|
|
@@ -25799,7 +25824,7 @@ function c(t2, e3) {
|
|
|
25799
25824
|
i2 && (i2(), i2 = void 0), s2.forEach(((t3) => t3()));
|
|
25800
25825
|
};
|
|
25801
25826
|
}
|
|
25802
|
-
class
|
|
25827
|
+
let d$1 = class d extends e$1 {
|
|
25803
25828
|
get isPlayingSignal() {
|
|
25804
25829
|
return this._isPlaying;
|
|
25805
25830
|
}
|
|
@@ -25930,8 +25955,8 @@ class u extends e$1 {
|
|
|
25930
25955
|
setSinkId(t2) {
|
|
25931
25956
|
return this.media.setSinkId(t2);
|
|
25932
25957
|
}
|
|
25933
|
-
}
|
|
25934
|
-
function
|
|
25958
|
+
};
|
|
25959
|
+
function u3({ maxTop: t2, maxBottom: e3, halfHeight: i2, vScale: n2, barMinHeight: s2 = 0, barAlign: r2 }) {
|
|
25935
25960
|
let o2 = Math.round(t2 * i2 * n2);
|
|
25936
25961
|
let a2 = o2 + Math.round(e3 * i2 * n2) || 1;
|
|
25937
25962
|
return a2 < s2 && (a2 = s2, r2 || (o2 = a2 / 2)), { topHeight: o2, totalHeight: a2 };
|
|
@@ -26023,17 +26048,17 @@ class C extends e$1 {
|
|
|
26023
26048
|
if (e4.button !== n2) return;
|
|
26024
26049
|
if (o2.has(e4.pointerId)) return;
|
|
26025
26050
|
if (o2.set(e4.pointerId, e4), o2.size > 1) return;
|
|
26026
|
-
const
|
|
26027
|
-
let c3 = e4.clientX,
|
|
26051
|
+
const l2 = e4.pointerId;
|
|
26052
|
+
let c3 = e4.clientX, d3 = e4.clientY, u4 = false;
|
|
26028
26053
|
const p2 = Date.now(), m2 = t3.getBoundingClientRect(), { left: g2, top: f2 } = m2, v2 = (t4) => {
|
|
26029
|
-
if (t4.pointerId !==
|
|
26054
|
+
if (t4.pointerId !== l2) return;
|
|
26030
26055
|
if (t4.defaultPrevented || o2.size > 1) return;
|
|
26031
26056
|
if (a2 && Date.now() - p2 < s2) return;
|
|
26032
|
-
const e5 = t4.clientX, n3 = t4.clientY, h3 = e5 - c3, m3 = n3 -
|
|
26033
|
-
(
|
|
26057
|
+
const e5 = t4.clientX, n3 = t4.clientY, h3 = e5 - c3, m3 = n3 - d3;
|
|
26058
|
+
(u4 || Math.abs(h3) > i2 || Math.abs(m3) > i2) && (t4.preventDefault(), t4.stopPropagation(), u4 || (r2.set({ type: "start", x: c3 - g2, y: d3 - f2 }), u4 = true), r2.set({ type: "move", x: e5 - g2, y: n3 - f2, deltaX: h3, deltaY: m3 }), c3 = e5, d3 = n3);
|
|
26034
26059
|
}, b2 = (t4) => {
|
|
26035
26060
|
if (o2.delete(t4.pointerId)) {
|
|
26036
|
-
if (t4.pointerId ===
|
|
26061
|
+
if (t4.pointerId === l2 && u4) {
|
|
26037
26062
|
const e5 = t4.clientX, i3 = t4.clientY;
|
|
26038
26063
|
r2.set({ type: "end", x: e5 - g2, y: i3 - f2 });
|
|
26039
26064
|
}
|
|
@@ -26042,9 +26067,9 @@ class C extends e$1 {
|
|
|
26042
26067
|
}, y3 = (t4) => {
|
|
26043
26068
|
t4.relatedTarget && t4.relatedTarget !== document.documentElement || b2(t4);
|
|
26044
26069
|
}, C2 = (t4) => {
|
|
26045
|
-
|
|
26070
|
+
u4 && (t4.stopPropagation(), t4.preventDefault());
|
|
26046
26071
|
}, S3 = (t4) => {
|
|
26047
|
-
t4.defaultPrevented || o2.size > 1 ||
|
|
26072
|
+
t4.defaultPrevented || o2.size > 1 || u4 && t4.preventDefault();
|
|
26048
26073
|
};
|
|
26049
26074
|
document.addEventListener("pointermove", v2), document.addEventListener("pointerup", b2), document.addEventListener("pointerout", y3), document.addEventListener("pointercancel", y3), document.addEventListener("touchmove", S3, { passive: false }), document.addEventListener("click", C2, { capture: true }), h2 = () => {
|
|
26050
26075
|
document.removeEventListener("pointermove", v2), document.removeEventListener("pointerup", b2), document.removeEventListener("pointerout", y3), document.removeEventListener("pointercancel", y3), document.removeEventListener("touchmove", S3), setTimeout((() => {
|
|
@@ -26217,41 +26242,41 @@ class C extends e$1 {
|
|
|
26217
26242
|
var t2;
|
|
26218
26243
|
}
|
|
26219
26244
|
renderBarWaveform(t2, e3, i2, n2) {
|
|
26220
|
-
const { width: s2, height: r2 } = i2.canvas, { halfHeight: o2, barWidth: a2, barRadius:
|
|
26221
|
-
const r3 = e4 / 2, o3 = n3.barWidth ? n3.barWidth * s3 : 1, a3 = n3.barGap ? n3.barGap * s3 : n3.barWidth ? o3 / 2 : 0,
|
|
26222
|
-
return { halfHeight: r3, barWidth: o3, barGap: a3, barRadius: n3.barRadius || 0, barMinHeight: n3.barMinHeight ? n3.barMinHeight * s3 : 0, barIndexScale: i3 > 0 ? t3 /
|
|
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:
|
|
26224
|
-
const h3 = t3[0] || [], c3 = t3[1] || h3,
|
|
26245
|
+
const { width: s2, height: r2 } = i2.canvas, { halfHeight: o2, barWidth: a2, barRadius: l2, barIndexScale: h2, barSpacing: c2, barMinHeight: d3 } = (function({ width: t3, height: e4, length: i3, options: n3, pixelRatio: s3 }) {
|
|
26246
|
+
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;
|
|
26247
|
+
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 };
|
|
26248
|
+
})({ 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 }) {
|
|
26249
|
+
const h3 = t3[0] || [], c3 = t3[1] || h3, d4 = h3.length, m3 = [];
|
|
26225
26250
|
let g2 = 0, f2 = 0, v2 = 0;
|
|
26226
|
-
for (let t4 = 0; t4 <=
|
|
26227
|
-
const
|
|
26228
|
-
if (
|
|
26229
|
-
const { topHeight: t5, totalHeight: e5 } =
|
|
26230
|
-
m3.push({ x: g2 * i3, y: h4, width: n3, height: e5 }), g2 =
|
|
26251
|
+
for (let t4 = 0; t4 <= d4; t4++) {
|
|
26252
|
+
const d5 = Math.round(t4 * e4);
|
|
26253
|
+
if (d5 > g2) {
|
|
26254
|
+
const { topHeight: t5, totalHeight: e5 } = u3({ maxTop: f2, maxBottom: v2, halfHeight: s3, vScale: r3, barMinHeight: l3, barAlign: a3 }), h4 = p({ barAlign: a3, halfHeight: s3, topHeight: t5, totalHeight: e5, canvasHeight: o3 });
|
|
26255
|
+
m3.push({ x: g2 * i3, y: h4, width: n3, height: e5 }), g2 = d5, f2 = 0, v2 = 0;
|
|
26231
26256
|
}
|
|
26232
26257
|
const b2 = Math.abs(h3[t4] || 0), y3 = Math.abs(c3[t4] || 0);
|
|
26233
26258
|
b2 > f2 && (f2 = b2), y3 > v2 && (v2 = y3);
|
|
26234
26259
|
}
|
|
26235
26260
|
return m3;
|
|
26236
|
-
})({ channelData: t2, barIndexScale: h2, barSpacing: c2, barWidth: a2, halfHeight: o2, vScale: n2, canvasHeight: r2, barAlign: e3.barAlign, barMinHeight:
|
|
26261
|
+
})({ channelData: t2, barIndexScale: h2, barSpacing: c2, barWidth: a2, halfHeight: o2, vScale: n2, canvasHeight: r2, barAlign: e3.barAlign, barMinHeight: d3 });
|
|
26237
26262
|
i2.beginPath();
|
|
26238
|
-
for (const t3 of m2)
|
|
26263
|
+
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
26264
|
i2.fill(), i2.closePath();
|
|
26240
26265
|
}
|
|
26241
26266
|
renderLineWaveform(t2, e3, i2, n2) {
|
|
26242
26267
|
const { width: s2, height: r2 } = i2.canvas, o2 = (function({ channelData: t3, width: e4, height: i3, vScale: n3 }) {
|
|
26243
26268
|
const s3 = i3 / 2, r3 = t3[0] || [];
|
|
26244
26269
|
return [r3, t3[1] || r3].map(((t4, i4) => {
|
|
26245
|
-
const r4 = t4.length, o3 = r4 ? e4 / r4 : 0, a2 = s3,
|
|
26246
|
-
let c2 = 0,
|
|
26270
|
+
const r4 = t4.length, o3 = r4 ? e4 / r4 : 0, a2 = s3, l2 = 0 === i4 ? -1 : 1, h2 = [{ x: 0, y: a2 }];
|
|
26271
|
+
let c2 = 0, d3 = 0;
|
|
26247
26272
|
for (let e5 = 0; e5 <= r4; e5++) {
|
|
26248
26273
|
const i5 = Math.round(e5 * o3);
|
|
26249
26274
|
if (i5 > c2) {
|
|
26250
|
-
const t5 = a2 + (Math.round(
|
|
26251
|
-
h2.push({ x: c2, y: t5 }), c2 = i5,
|
|
26275
|
+
const t5 = a2 + (Math.round(d3 * s3 * n3) || 1) * l2;
|
|
26276
|
+
h2.push({ x: c2, y: t5 }), c2 = i5, d3 = 0;
|
|
26252
26277
|
}
|
|
26253
26278
|
const r5 = Math.abs(t4[e5] || 0);
|
|
26254
|
-
r5 >
|
|
26279
|
+
r5 > d3 && (d3 = r5);
|
|
26255
26280
|
}
|
|
26256
26281
|
return h2.push({ x: c2, y: a2 }), h2;
|
|
26257
26282
|
}));
|
|
@@ -26284,43 +26309,43 @@ class C extends e$1 {
|
|
|
26284
26309
|
g(e3) ? this.renderBarWaveform(t2, e3, i2, n2) : this.renderLineWaveform(t2, e3, i2, n2);
|
|
26285
26310
|
}
|
|
26286
26311
|
renderSingleCanvas(t2, e3, i2, n2, s2, r2, o2) {
|
|
26287
|
-
const a2 = this.getPixelRatio(),
|
|
26288
|
-
|
|
26289
|
-
const h2 =
|
|
26290
|
-
if (e3.renderFunction ? (h2.fillStyle = this.convertColorValues(e3.waveColor, h2), e3.renderFunction(t2, h2)) : this.renderWaveform(t2, e3, h2),
|
|
26291
|
-
const t3 =
|
|
26292
|
-
i3.drawImage(
|
|
26312
|
+
const a2 = this.getPixelRatio(), l2 = document.createElement("canvas");
|
|
26313
|
+
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);
|
|
26314
|
+
const h2 = l2.getContext("2d");
|
|
26315
|
+
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) {
|
|
26316
|
+
const t3 = l2.cloneNode(), i3 = t3.getContext("2d");
|
|
26317
|
+
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
26318
|
}
|
|
26294
26319
|
}
|
|
26295
26320
|
renderMultiCanvas(t2, e3, i2, n2, s2, r2) {
|
|
26296
|
-
const o2 = this.getPixelRatio(), { clientWidth: a2 } = this.scrollContainer,
|
|
26321
|
+
const o2 = this.getPixelRatio(), { clientWidth: a2 } = this.scrollContainer, l2 = i2 / o2, h2 = (function({ clientWidth: t3, totalWidth: e4, options: i3 }) {
|
|
26297
26322
|
return f(Math.min(8e3, t3, e4), i3);
|
|
26298
|
-
})({ clientWidth: a2, totalWidth:
|
|
26323
|
+
})({ clientWidth: a2, totalWidth: l2, options: e3 });
|
|
26299
26324
|
let c2 = {};
|
|
26300
26325
|
if (0 === h2) return;
|
|
26301
|
-
const
|
|
26302
|
-
if (i3 < 0 || i3 >=
|
|
26326
|
+
const d3 = (i3) => {
|
|
26327
|
+
if (i3 < 0 || i3 >= u4) return;
|
|
26303
26328
|
if (c2[i3]) return;
|
|
26304
26329
|
c2[i3] = true;
|
|
26305
26330
|
const o3 = i3 * h2;
|
|
26306
|
-
let a3 = Math.min(
|
|
26331
|
+
let a3 = Math.min(l2 - o3, h2);
|
|
26307
26332
|
if (a3 = f(a3, e3), a3 <= 0) return;
|
|
26308
|
-
const
|
|
26333
|
+
const d4 = (function({ channelData: t3, offset: e4, clampedWidth: i4, totalWidth: n3 }) {
|
|
26309
26334
|
return t3.map(((t4) => {
|
|
26310
26335
|
const s3 = Math.floor(e4 / n3 * t4.length), r3 = Math.floor((e4 + i4) / n3 * t4.length);
|
|
26311
26336
|
return t4.slice(s3, r3);
|
|
26312
26337
|
}));
|
|
26313
|
-
})({ channelData: t2, offset: o3, clampedWidth: a3, totalWidth:
|
|
26314
|
-
this.renderSingleCanvas(
|
|
26315
|
-
},
|
|
26338
|
+
})({ channelData: t2, offset: o3, clampedWidth: a3, totalWidth: l2 });
|
|
26339
|
+
this.renderSingleCanvas(d4, e3, a3, n2, o3, s2, r2);
|
|
26340
|
+
}, u4 = Math.ceil(l2 / h2);
|
|
26316
26341
|
if (!this.isScrollable) {
|
|
26317
|
-
for (let t3 = 0; t3 <
|
|
26342
|
+
for (let t3 = 0; t3 < u4; t3++) d3(t3);
|
|
26318
26343
|
return;
|
|
26319
26344
|
}
|
|
26320
|
-
if (v({ scrollLeft: this.scrollContainer.scrollLeft, totalWidth:
|
|
26345
|
+
if (v({ scrollLeft: this.scrollContainer.scrollLeft, totalWidth: l2, numCanvases: u4 }).forEach(((t3) => d3(t3))), u4 > 1) {
|
|
26321
26346
|
const t3 = this.on("scroll", (() => {
|
|
26322
26347
|
const { scrollLeft: t4 } = this.scrollContainer;
|
|
26323
|
-
Object.keys(c2).length > 10 && (s2.innerHTML = "", r2.innerHTML = "", c2 = {}), v({ scrollLeft: t4, totalWidth:
|
|
26348
|
+
Object.keys(c2).length > 10 && (s2.innerHTML = "", r2.innerHTML = "", c2 = {}), v({ scrollLeft: t4, totalWidth: l2, numCanvases: u4 }).forEach(((t5) => d3(t5)));
|
|
26324
26349
|
}));
|
|
26325
26350
|
this.unsubscribeOnScroll.push(t3);
|
|
26326
26351
|
}
|
|
@@ -26337,8 +26362,8 @@ class C extends e$1 {
|
|
|
26337
26362
|
})(e3, ["overlay"]);
|
|
26338
26363
|
const o2 = document.createElement("div"), a2 = this.getHeight(r2.height, r2.splitChannels);
|
|
26339
26364
|
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
|
|
26341
|
-
this.progressWrapper.appendChild(
|
|
26365
|
+
const l2 = o2.cloneNode();
|
|
26366
|
+
this.progressWrapper.appendChild(l2), this.renderMultiCanvas(t2, r2, i2, a2, o2, l2);
|
|
26342
26367
|
}
|
|
26343
26368
|
render(e3) {
|
|
26344
26369
|
return t$1(this, void 0, void 0, (function* () {
|
|
@@ -26376,12 +26401,12 @@ class C extends e$1 {
|
|
|
26376
26401
|
}
|
|
26377
26402
|
scrollIntoView(t2, e3 = false) {
|
|
26378
26403
|
var i2;
|
|
26379
|
-
const { scrollLeft: n2, scrollWidth: s2, clientWidth: r2 } = this.scrollContainer, o2 = t2 * s2, a2 = n2,
|
|
26404
|
+
const { scrollLeft: n2, scrollWidth: s2, clientWidth: r2 } = this.scrollContainer, o2 = t2 * s2, a2 = n2, l2 = n2 + r2, h2 = r2 / 2;
|
|
26380
26405
|
if (this.isDragging) {
|
|
26381
26406
|
const t3 = 30;
|
|
26382
|
-
o2 + t3 >
|
|
26407
|
+
o2 + t3 > l2 ? this.scrollContainer.scrollLeft += t3 : o2 - t3 < a2 && (this.scrollContainer.scrollLeft -= t3);
|
|
26383
26408
|
} else {
|
|
26384
|
-
(o2 < a2 || o2 >
|
|
26409
|
+
(o2 < a2 || o2 > l2) && (this.scrollContainer.scrollLeft = o2 - (this.options.autoCenter ? h2 : 0));
|
|
26385
26410
|
const t3 = o2 - n2 - h2;
|
|
26386
26411
|
if (e3 && this.options.autoCenter && t3 > 0) {
|
|
26387
26412
|
const e4 = null === (i2 = this.audioData) || void 0 === i2 ? void 0 : i2.duration;
|
|
@@ -26583,7 +26608,7 @@ class E extends e$1 {
|
|
|
26583
26608
|
}
|
|
26584
26609
|
}
|
|
26585
26610
|
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
|
|
26611
|
+
class w extends d$1 {
|
|
26587
26612
|
static create(t2) {
|
|
26588
26613
|
return new w(t2);
|
|
26589
26614
|
}
|
|
@@ -26595,19 +26620,19 @@ class w extends u {
|
|
|
26595
26620
|
}
|
|
26596
26621
|
constructor(t2) {
|
|
26597
26622
|
const e3 = t2.media || ("WebAudio" === t2.backend ? new E() : void 0);
|
|
26598
|
-
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.
|
|
26623
|
+
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.options = Object.assign({}, P2, t2);
|
|
26599
26624
|
const { state: i2, actions: n2 } = (function(t3) {
|
|
26600
26625
|
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),
|
|
26602
|
-
return { state: { currentTime: a2, duration: c2, isPlaying:
|
|
26626
|
+
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), d3 = null !== (n3 = null == t3 ? void 0 : t3.isPlaying) && void 0 !== n3 ? n3 : l$1(false), u4 = 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((() => !d3.value), [d3]), 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]);
|
|
26627
|
+
return { state: { currentTime: a2, duration: c2, isPlaying: d3, isPaused: C2, isSeeking: u4, 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
26628
|
const e5 = Math.max(0, Math.min(c2.value || 1 / 0, t4));
|
|
26604
26629
|
a2.set(e5);
|
|
26605
26630
|
}, setDuration: (t4) => {
|
|
26606
26631
|
c2.set(Math.max(0, t4));
|
|
26607
26632
|
}, setPlaying: (t4) => {
|
|
26608
|
-
|
|
26633
|
+
d3.set(t4);
|
|
26609
26634
|
}, setSeeking: (t4) => {
|
|
26610
|
-
|
|
26635
|
+
u4.set(t4);
|
|
26611
26636
|
}, setVolume: (t4) => {
|
|
26612
26637
|
const e5 = Math.max(0, Math.min(1, t4));
|
|
26613
26638
|
p2.set(e5);
|
|
@@ -26628,7 +26653,7 @@ class w extends u {
|
|
|
26628
26653
|
})({ isPlaying: this.isPlayingSignal, currentTime: this.currentTimeSignal, duration: this.durationSignal, volume: this.volumeSignal, playbackRate: this.playbackRateSignal, isSeeking: this.seekingSignal });
|
|
26629
26654
|
this.wavesurferState = i2, this.wavesurferActions = n2, this.timer = new S2();
|
|
26630
26655
|
const s2 = e3 ? void 0 : this.getMediaElement();
|
|
26631
|
-
this.renderer = new C(this.options, s2), this.initPlayerEvents(), this.initRendererEvents(), this.initTimerEvents(), this.
|
|
26656
|
+
this.renderer = new C(this.options, s2), this.initPlayerEvents(), this.initRendererEvents(), this.initTimerEvents(), this.initPlugins();
|
|
26632
26657
|
const r2 = this.options.url || this.getSrc() || "";
|
|
26633
26658
|
Promise.resolve().then((() => {
|
|
26634
26659
|
this.emit("init");
|
|
@@ -26651,36 +26676,6 @@ class w extends u {
|
|
|
26651
26676
|
}
|
|
26652
26677
|
})));
|
|
26653
26678
|
}
|
|
26654
|
-
initReactiveState() {
|
|
26655
|
-
this.reactiveCleanups.push((function(t2, e3) {
|
|
26656
|
-
const i2 = [];
|
|
26657
|
-
i2.push(c((() => {
|
|
26658
|
-
const i3 = t2.isPlaying.value;
|
|
26659
|
-
e3.emit(i3 ? "play" : "pause");
|
|
26660
|
-
}), [t2.isPlaying])), i2.push(c((() => {
|
|
26661
|
-
const i3 = t2.currentTime.value;
|
|
26662
|
-
e3.emit("timeupdate", i3), t2.isPlaying.value && e3.emit("audioprocess", i3);
|
|
26663
|
-
}), [t2.currentTime, t2.isPlaying])), i2.push(c((() => {
|
|
26664
|
-
t2.isSeeking.value && e3.emit("seeking", t2.currentTime.value);
|
|
26665
|
-
}), [t2.isSeeking, t2.currentTime]));
|
|
26666
|
-
let n2 = false;
|
|
26667
|
-
i2.push(c((() => {
|
|
26668
|
-
t2.isReady.value && !n2 && (n2 = true, e3.emit("ready", t2.duration.value));
|
|
26669
|
-
}), [t2.isReady, t2.duration])), i2.push(c((() => {
|
|
26670
|
-
null === t2.audioBuffer.value && (n2 = false);
|
|
26671
|
-
}), [t2.audioBuffer]));
|
|
26672
|
-
let s2 = false;
|
|
26673
|
-
return i2.push(c((() => {
|
|
26674
|
-
const i3 = t2.isPlaying.value, n3 = t2.currentTime.value, r2 = t2.duration.value, o2 = r2 > 0 && n3 >= r2;
|
|
26675
|
-
s2 && !i3 && o2 && e3.emit("finish"), s2 = i3 && o2;
|
|
26676
|
-
}), [t2.isPlaying, t2.currentTime, t2.duration])), i2.push(c((() => {
|
|
26677
|
-
const i3 = t2.zoom.value;
|
|
26678
|
-
i3 > 0 && e3.emit("zoom", i3);
|
|
26679
|
-
}), [t2.zoom])), () => {
|
|
26680
|
-
i2.forEach(((t3) => t3()));
|
|
26681
|
-
};
|
|
26682
|
-
})(this.wavesurferState, { emit: this.emit.bind(this) }));
|
|
26683
|
-
}
|
|
26684
26679
|
initPlayerEvents() {
|
|
26685
26680
|
this.isPlaying() && (this.emit("play"), this.timer.start()), this.mediaSubscriptions.push(this.onMediaEvent("timeupdate", (() => {
|
|
26686
26681
|
const t2 = this.updateProgress();
|
|
@@ -26792,16 +26787,16 @@ class w extends u {
|
|
|
26792
26787
|
}
|
|
26793
26788
|
if (this._isDestroyed || o2 !== this._loadVersion) return;
|
|
26794
26789
|
this.setSrc(e3, n2);
|
|
26795
|
-
const
|
|
26790
|
+
const l2 = yield new Promise(((t3) => {
|
|
26796
26791
|
const e4 = r2 || this.getDuration();
|
|
26797
26792
|
e4 ? t3(e4) : this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata", (() => t3(this.getDuration())), { once: true }));
|
|
26798
26793
|
}));
|
|
26799
26794
|
if (!this._isDestroyed && o2 === this._loadVersion) {
|
|
26800
26795
|
if (!e3 && !n2) {
|
|
26801
26796
|
const t3 = this.getMediaElement();
|
|
26802
|
-
t3 instanceof E && (t3.duration =
|
|
26797
|
+
t3 instanceof E && (t3.duration = l2);
|
|
26803
26798
|
}
|
|
26804
|
-
if (s2) this.decodedData = i$1.createBuffer(s2,
|
|
26799
|
+
if (s2) this.decodedData = i$1.createBuffer(s2, l2 || 0);
|
|
26805
26800
|
else if (n2) {
|
|
26806
26801
|
const t3 = yield n2.arrayBuffer();
|
|
26807
26802
|
if (this._isDestroyed || o2 !== this._loadVersion) return;
|
|
@@ -26900,7 +26895,7 @@ class w extends u {
|
|
|
26900
26895
|
}
|
|
26901
26896
|
destroy() {
|
|
26902
26897
|
var t2;
|
|
26903
|
-
this._isDestroyed = true, this.emit("destroy"), null === (t2 = this.abortController) || void 0 === t2 || t2.abort(), this.plugins.forEach(((t3) => t3.destroy())), this.subscriptions.forEach(((t3) => t3())), this.unsubscribePlayerEvents(), this.
|
|
26898
|
+
this._isDestroyed = true, this.emit("destroy"), null === (t2 = this.abortController) || void 0 === t2 || t2.abort(), this.plugins.forEach(((t3) => t3.destroy())), this.subscriptions.forEach(((t3) => t3())), this.unsubscribePlayerEvents(), this.timer.destroy(), this.renderer.destroy(), super.destroy();
|
|
26904
26899
|
}
|
|
26905
26900
|
}
|
|
26906
26901
|
w.BasePlugin = class extends e$1 {
|
|
@@ -26994,42 +26989,42 @@ function o(t2, e3) {
|
|
|
26994
26989
|
t2.removeEventListener(e3, n2);
|
|
26995
26990
|
}, i2;
|
|
26996
26991
|
}
|
|
26997
|
-
function
|
|
26992
|
+
function l(t2) {
|
|
26998
26993
|
const e3 = t2._cleanup;
|
|
26999
26994
|
"function" == typeof e3 && e3();
|
|
27000
26995
|
}
|
|
27001
26996
|
function h(t2, e3 = {}) {
|
|
27002
26997
|
const { threshold: i2 = 3, mouseButton: n2 = 0, touchDelay: r2 = 100 } = e3, o2 = s(null), h2 = /* @__PURE__ */ new Map(), a2 = matchMedia("(pointer: coarse)").matches;
|
|
27003
|
-
let
|
|
26998
|
+
let d3 = () => {
|
|
27004
26999
|
};
|
|
27005
27000
|
const c2 = (e4) => {
|
|
27006
27001
|
if (e4.button !== n2) return;
|
|
27007
27002
|
if (h2.has(e4.pointerId)) return;
|
|
27008
27003
|
if (h2.set(e4.pointerId, e4), h2.size > 1) return;
|
|
27009
27004
|
const s2 = e4.pointerId;
|
|
27010
|
-
let
|
|
27005
|
+
let l2 = e4.clientX, c3 = e4.clientY, u4 = false;
|
|
27011
27006
|
const p2 = Date.now(), v2 = t2.getBoundingClientRect(), { left: g2, top: m2 } = v2, f2 = (t3) => {
|
|
27012
27007
|
if (t3.pointerId !== s2) return;
|
|
27013
27008
|
if (t3.defaultPrevented || h2.size > 1) return;
|
|
27014
27009
|
if (a2 && Date.now() - p2 < r2) return;
|
|
27015
|
-
const e5 = t3.clientX, n3 = t3.clientY,
|
|
27016
|
-
(
|
|
27010
|
+
const e5 = t3.clientX, n3 = t3.clientY, d4 = e5 - l2, v3 = n3 - c3;
|
|
27011
|
+
(u4 || Math.abs(d4) > 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: d4, deltaY: v3 }), l2 = e5, c3 = n3);
|
|
27017
27012
|
}, b2 = (t3) => {
|
|
27018
27013
|
if (h2.delete(t3.pointerId)) {
|
|
27019
|
-
if (t3.pointerId === s2 &&
|
|
27014
|
+
if (t3.pointerId === s2 && u4) {
|
|
27020
27015
|
const e5 = t3.clientX, i3 = t3.clientY;
|
|
27021
27016
|
o2.set({ type: "end", x: e5 - g2, y: i3 - m2 });
|
|
27022
27017
|
}
|
|
27023
|
-
0 === h2.size &&
|
|
27018
|
+
0 === h2.size && d3();
|
|
27024
27019
|
}
|
|
27025
27020
|
}, E2 = (t3) => {
|
|
27026
27021
|
t3.relatedTarget && t3.relatedTarget !== document.documentElement || b2(t3);
|
|
27027
27022
|
}, C2 = (t3) => {
|
|
27028
|
-
|
|
27023
|
+
u4 && (t3.stopPropagation(), t3.preventDefault());
|
|
27029
27024
|
}, L2 = (t3) => {
|
|
27030
|
-
t3.defaultPrevented || h2.size > 1 ||
|
|
27025
|
+
t3.defaultPrevented || h2.size > 1 || u4 && t3.preventDefault();
|
|
27031
27026
|
};
|
|
27032
|
-
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 }),
|
|
27027
|
+
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 }), d3 = () => {
|
|
27033
27028
|
document.removeEventListener("pointermove", f2), document.removeEventListener("pointerup", b2), document.removeEventListener("pointerout", E2), document.removeEventListener("pointercancel", E2), document.removeEventListener("touchmove", L2), setTimeout((() => {
|
|
27034
27029
|
document.removeEventListener("click", C2, { capture: true });
|
|
27035
27030
|
}), 10);
|
|
@@ -27037,13 +27032,13 @@ function h(t2, e3 = {}) {
|
|
|
27037
27032
|
};
|
|
27038
27033
|
t2.addEventListener("pointerdown", c2);
|
|
27039
27034
|
return { signal: o2, cleanup: () => {
|
|
27040
|
-
|
|
27035
|
+
d3(), t2.removeEventListener("pointerdown", c2), h2.clear(), l(o2);
|
|
27041
27036
|
} };
|
|
27042
27037
|
}
|
|
27043
27038
|
class a extends t {
|
|
27044
27039
|
constructor(t2, e3, i2 = 0) {
|
|
27045
|
-
var n2, s2, r2, o2,
|
|
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 === (
|
|
27040
|
+
var n2, s2, r2, o2, l2, h2, a2, d3, c2, u4;
|
|
27041
|
+
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 !== (d3 = t2.maxLength) && void 0 !== d3 ? d3 : 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
27042
|
}
|
|
27048
27043
|
clampPosition(t2) {
|
|
27049
27044
|
return Math.max(0, Math.min(this.totalDuration, t2));
|
|
@@ -27054,15 +27049,15 @@ class a extends t {
|
|
|
27054
27049
|
null === (t2 = this.element) || void 0 === t2 || t2.setAttribute("part", `${e3 ? "marker" : "region"} ${this.id}`);
|
|
27055
27050
|
}
|
|
27056
27051
|
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 }),
|
|
27052
|
+
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
27053
|
const t3 = o2.signal.value;
|
|
27059
27054
|
t3 && ("move" === t3.type && void 0 !== t3.deltaX ? this.onResize(t3.deltaX, "start") : "end" === t3.type && this.onEndResizing("start"));
|
|
27060
|
-
}), [o2.signal]),
|
|
27061
|
-
const t3 =
|
|
27055
|
+
}), [o2.signal]), d3 = r((() => {
|
|
27056
|
+
const t3 = l2.signal.value;
|
|
27062
27057
|
t3 && ("move" === t3.type && void 0 !== t3.deltaX ? this.onResize(t3.deltaX, "end") : "end" === t3.type && this.onEndResizing("end"));
|
|
27063
|
-
}), [
|
|
27058
|
+
}), [l2.signal]);
|
|
27064
27059
|
this.subscriptions.push((() => {
|
|
27065
|
-
a2(),
|
|
27060
|
+
a2(), d3(), o2.cleanup(), l2.cleanup();
|
|
27066
27061
|
}));
|
|
27067
27062
|
}
|
|
27068
27063
|
removeResizeHandles(t2) {
|
|
@@ -27089,9 +27084,9 @@ class a extends t {
|
|
|
27089
27084
|
initMouseEvents() {
|
|
27090
27085
|
const { element: t2 } = this;
|
|
27091
27086
|
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"),
|
|
27087
|
+
const e3 = o(t2, "click"), i2 = o(t2, "mouseenter"), n2 = o(t2, "mouseleave"), s2 = o(t2, "dblclick"), a2 = o(t2, "pointerdown"), d3 = 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 = d3.subscribe(((t3) => t3 && this.toggleCursor(false)));
|
|
27093
27088
|
this.subscriptions.push((() => {
|
|
27094
|
-
c2(),
|
|
27089
|
+
c2(), u4(), p2(), v2(), g2(), m2(), l(e3), l(i2), l(n2), l(s2), l(a2), l(d3);
|
|
27095
27090
|
}));
|
|
27096
27091
|
const f2 = h(t2), b2 = r((() => {
|
|
27097
27092
|
const t3 = f2.signal.value;
|
|
@@ -27105,13 +27100,13 @@ class a extends t {
|
|
|
27105
27100
|
var n2;
|
|
27106
27101
|
if (!(null === (n2 = this.element) || void 0 === n2 ? void 0 : n2.parentElement)) return;
|
|
27107
27102
|
const { width: s2 } = this.element.parentElement.getBoundingClientRect(), r2 = t2 / s2 * this.totalDuration;
|
|
27108
|
-
let o2 = e3 && "start" !== e3 ? this.start : this.start + r2,
|
|
27103
|
+
let o2 = e3 && "start" !== e3 ? this.start : this.start + r2, l2 = e3 && "end" !== e3 ? this.end : this.end + r2;
|
|
27109
27104
|
const h2 = void 0 !== i2;
|
|
27110
|
-
h2 && this.updatingSide && this.updatingSide !== e3 && ("start" === this.updatingSide ? o2 = i2 :
|
|
27111
|
-
const a2 =
|
|
27105
|
+
h2 && this.updatingSide && this.updatingSide !== e3 && ("start" === this.updatingSide ? o2 = i2 : l2 = i2), o2 = Math.max(0, o2), l2 = Math.min(this.totalDuration, l2);
|
|
27106
|
+
const a2 = l2 - o2;
|
|
27112
27107
|
this.updatingSide = e3;
|
|
27113
|
-
const
|
|
27114
|
-
o2 <=
|
|
27108
|
+
const d3 = a2 >= this.minLength && a2 <= this.maxLength;
|
|
27109
|
+
o2 <= l2 && (d3 || h2) && (this.start = o2, this.end = l2, this.renderPosition(), this.emit("update", e3));
|
|
27115
27110
|
}
|
|
27116
27111
|
onMove(t2) {
|
|
27117
27112
|
this.drag && this._onUpdate(t2);
|
|
@@ -27167,12 +27162,12 @@ class a extends t {
|
|
|
27167
27162
|
this.isRemoved = true, this.emit("remove"), this.subscriptions.forEach(((t2) => t2())), this.subscriptions = [], this.content && this.contentEditable && (this.contentClickListener && (this.content.removeEventListener("click", this.contentClickListener), this.contentClickListener = void 0), this.contentBlurListener && (this.content.removeEventListener("blur", this.contentBlurListener), this.contentBlurListener = void 0)), this.element && (this.element.remove(), this.element = null), this.unAll();
|
|
27168
27163
|
}
|
|
27169
27164
|
}
|
|
27170
|
-
class
|
|
27165
|
+
class d2 extends e2 {
|
|
27171
27166
|
constructor(t2) {
|
|
27172
27167
|
super(t2), this.regions = [], this.regionsContainer = this.initRegionsContainer();
|
|
27173
27168
|
}
|
|
27174
27169
|
static create(t2) {
|
|
27175
|
-
return new
|
|
27170
|
+
return new d2(t2);
|
|
27176
27171
|
}
|
|
27177
27172
|
onInit() {
|
|
27178
27173
|
if (!this.wavesurfer) throw Error("WaveSurfer is not initialized");
|
|
@@ -27223,13 +27218,13 @@ class d extends e2 {
|
|
|
27223
27218
|
if (!n2) return;
|
|
27224
27219
|
const { clientWidth: s2, scrollWidth: r2 } = n2;
|
|
27225
27220
|
if (r2 <= s2) return;
|
|
27226
|
-
const o2 = n2.getBoundingClientRect(),
|
|
27221
|
+
const o2 = n2.getBoundingClientRect(), l2 = t2.element.getBoundingClientRect(), h2 = l2.left - o2.left, a2 = l2.right - o2.left;
|
|
27227
27222
|
h2 < 0 ? n2.scrollLeft += h2 : a2 > s2 && (n2.scrollLeft += a2 - s2);
|
|
27228
27223
|
}
|
|
27229
27224
|
virtualAppend(t2, e3, i2) {
|
|
27230
27225
|
const n2 = () => {
|
|
27231
27226
|
if (!this.wavesurfer) return;
|
|
27232
|
-
const n3 = this.wavesurfer.getWidth(), s2 = this.wavesurfer.getScroll(), r2 = e3.clientWidth, o2 = this.wavesurfer.getDuration(),
|
|
27227
|
+
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
27228
|
h2 && !i2.parentElement ? e3.appendChild(i2) : !h2 && i2.parentElement && i2.remove();
|
|
27234
27229
|
};
|
|
27235
27230
|
setTimeout((() => {
|
|
@@ -27280,20 +27275,20 @@ class d extends e2 {
|
|
|
27280
27275
|
const n2 = null === (i2 = this.wavesurfer) || void 0 === i2 ? void 0 : i2.getWrapper();
|
|
27281
27276
|
if (!(n2 && n2 instanceof HTMLElement)) return () => {
|
|
27282
27277
|
};
|
|
27283
|
-
let s2 = null, o2 = 0,
|
|
27284
|
-
const
|
|
27278
|
+
let s2 = null, o2 = 0, l2 = 0;
|
|
27279
|
+
const d3 = h(n2, { threshold: e3 }), c2 = r((() => {
|
|
27285
27280
|
var e4, i3;
|
|
27286
|
-
const n3 =
|
|
27281
|
+
const n3 = d3.signal.value;
|
|
27287
27282
|
if (n3) if ("start" === n3.type) {
|
|
27288
27283
|
if (o2 = n3.x, !this.wavesurfer) return;
|
|
27289
|
-
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:
|
|
27290
|
-
|
|
27291
|
-
const c3 = n3.x /
|
|
27292
|
-
s2 = new a(Object.assign(Object.assign({}, t2), { start: c3, end:
|
|
27293
|
-
} else "move" === n3.type && void 0 !== n3.deltaX ? s2 && s2._onUpdate(n3.deltaX, n3.x > o2 ? "end" : "start",
|
|
27294
|
-
}), [
|
|
27284
|
+
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: d4 } = this.wavesurfer.getWrapper().getBoundingClientRect();
|
|
27285
|
+
l2 = o2 / d4 * r2;
|
|
27286
|
+
const c3 = n3.x / d4 * r2, u4 = (n3.x + 5) / d4 * r2;
|
|
27287
|
+
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);
|
|
27288
|
+
} 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);
|
|
27289
|
+
}), [d3.signal]);
|
|
27295
27290
|
return () => {
|
|
27296
|
-
c2(),
|
|
27291
|
+
c2(), d3.cleanup();
|
|
27297
27292
|
};
|
|
27298
27293
|
}
|
|
27299
27294
|
clearRegions() {
|
|
@@ -27430,7 +27425,7 @@ function useAudioPlayer(options) {
|
|
|
27430
27425
|
eventUnsubs.push(core.on("channel:reset", onChannelReset));
|
|
27431
27426
|
}
|
|
27432
27427
|
function detachEventListeners() {
|
|
27433
|
-
for (const
|
|
27428
|
+
for (const u4 of eventUnsubs) u4();
|
|
27434
27429
|
eventUnsubs.length = 0;
|
|
27435
27430
|
}
|
|
27436
27431
|
function onPlayerReady() {
|
|
@@ -27465,7 +27460,7 @@ function useAudioPlayer(options) {
|
|
|
27465
27460
|
isLoading.value = true;
|
|
27466
27461
|
isReady.value = false;
|
|
27467
27462
|
loadError.value = null;
|
|
27468
|
-
const regionsPlugin =
|
|
27463
|
+
const regionsPlugin = d2.create();
|
|
27469
27464
|
regions.value = regionsPlugin;
|
|
27470
27465
|
const precomputed = audio.waveform.value;
|
|
27471
27466
|
const peaks = precomputed?.length ? [normalizePeaks(precomputed)] : void 0;
|
|
@@ -27727,6 +27722,7 @@ function createAudioPlugin(options = {}) {
|
|
|
27727
27722
|
});
|
|
27728
27723
|
function seekTo(time) {
|
|
27729
27724
|
seekHandler?.(time);
|
|
27725
|
+
core.emit("audio:seek", { time });
|
|
27730
27726
|
}
|
|
27731
27727
|
function setSeekHandler(fn) {
|
|
27732
27728
|
seekHandler = fn;
|
|
@@ -28000,23 +27996,23 @@ function splitPartialSubtitles({ previousText, previousIndexes: oldCutPositions
|
|
|
28000
27996
|
);
|
|
28001
27997
|
wordIndex += diff.countRemoved;
|
|
28002
27998
|
} else if ("removed" in diff && diff.removed) {
|
|
28003
|
-
const
|
|
28004
|
-
wordIndex +=
|
|
27999
|
+
const d3 = diff;
|
|
28000
|
+
wordIndex += d3.count;
|
|
28005
28001
|
newCutPositions = incrementIndexes(
|
|
28006
28002
|
newCutPositions,
|
|
28007
28003
|
copyCutPositions[0],
|
|
28008
|
-
-
|
|
28004
|
+
-d3.count
|
|
28009
28005
|
);
|
|
28010
28006
|
} else if ("added" in diff && diff.added) {
|
|
28011
|
-
const
|
|
28007
|
+
const d3 = diff;
|
|
28012
28008
|
newCutPositions = incrementIndexes(
|
|
28013
28009
|
newCutPositions,
|
|
28014
28010
|
copyCutPositions[0],
|
|
28015
|
-
|
|
28011
|
+
d3.count
|
|
28016
28012
|
);
|
|
28017
28013
|
} else {
|
|
28018
|
-
const
|
|
28019
|
-
wordIndex +=
|
|
28014
|
+
const d3 = diff;
|
|
28015
|
+
wordIndex += d3.count;
|
|
28020
28016
|
}
|
|
28021
28017
|
}
|
|
28022
28018
|
const lineText = (from, to) => newTextSplitBySpace.slice(from, to).join(" ");
|
|
@@ -30294,4 +30290,4 @@ export {
|
|
|
30294
30290
|
purify as p,
|
|
30295
30291
|
register as r
|
|
30296
30292
|
};
|
|
30297
|
-
//# sourceMappingURL=index-
|
|
30293
|
+
//# sourceMappingURL=index-DhBFBHeE.js.map
|